gts-snapshot-121130/0000755000175100017510000000000012055775530011251 500000000000000gts-snapshot-121130/COPYING0000644000175100017510000006131412055775440012231 00000000000000 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 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., 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. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! gts-snapshot-121130/README0000644000175100017510000000530412055775440012053 00000000000000General Information =================== This is the GTS library. GTS stands for the GNU Triangulated Surface Library. It includes a number of useful functions to deal with triangulated surfaces including, but not limited to, multi-resolution models, Delaunay and Constrained Delaunay triangulations, set operations on surfaces (intersection, union etc ...), bounding-boxes trees for efficient collision and intersection detection, triangle strips generation for fast rendering. The official web site is: http://gts.sourceforge.net Copying ======= The GTS library is distributed under the terms of the Library General Public License which is compliant with the guidelines of the Open Source and Free Software Fundations. See the file COPYING for details. The robust geometric predicates code (src/predicates.c) was written and placed in the public domain by Jonathan R. Shewchuk. The original version of the code can be found at http://www.cs.cmu.edu/~quake/robust.html Installation ============ GTS uses the glib library which is part of gtk (http://www.gtk.org). If you use linux there is a good chance that this library is already on your system, otherwise, you'll need to install it. A WIN32 glib port is available at http://www.gimp.org/~tml/gimp/win32/downloads.html, however it is recommended to use GTS within the Cygwin environment under windows. Unix users (including cygwin users): If you checked out GTS from sourceforge.net, you will need to have the gnu autoconf tools installed. Generate the "configure" script with the following commands: aclocal autoheader automake -a autoconf After this, or if you are installing from source where the configure script is already built: ./configure make make install See the file 'INSTALL' for generic configure instructions. Windows users: If you have Microsoft C try: cd src nmake -f makefile.msc install or use Cygwin (http://www.cygwin.com) Using GTS ========= From version 0.5.0 you can use the `gts-config' script in order to obtain the compile flags and link flags necessary to use the GTS library (à la Glib). - To compile add `gts-config --cflags` to your compiler flags. - To link add `gts-config --libs` to your linker flags. When developping code using GTS you probably want to enable control over casting operations between objects of the GTS object hierarchy. This can be done easily by defining GTS_CHECK_CASTS either in the CFLAGS environement variable (CFLAGS=-DGTS_CHECK_CASTS) or on the command-line of your compiler. This will slow down your code but will warn you when you try to perform illegal casts between GtsObjects. You can also to do that using the `--check' option of gts-config, i.e. by adding `gts-config --cflags --check' to your compiler flags. gts-snapshot-121130/debian/0000755000175100017510000000000012055775530012473 500000000000000gts-snapshot-121130/debian/libgts-snapshot.install0000644000175100017510000000136212055775440017126 00000000000000debian/tmp/usr/bin/gts2oogl debian/tmp/usr/bin/gtscheck debian/tmp/usr/bin/gtscompare debian/tmp/usr/bin/gtstemplate debian/tmp/usr/bin/stl2gts debian/tmp/usr/bin/transform debian/tmp/usr/bin/delaunay debian/tmp/usr/bin/happrox debian/tmp/usr/bin/gts2dxf debian/tmp/usr/bin/gts2stl debian/tmp/usr/lib/*.so.* debian/tmp/usr/lib/pkgconfig/*.pc debian/tmp/usr/share/man/man1/gts2oogl.1 debian/tmp/usr/share/man/man1/gtscheck.1 debian/tmp/usr/share/man/man1/gtscompare.1 debian/tmp/usr/share/man/man1/gtstemplate.1 debian/tmp/usr/share/man/man1/stl2gts.1 debian/tmp/usr/share/man/man1/transform.1 debian/tmp/usr/share/man/man1/delaunay.1 debian/tmp/usr/share/man/man1/happrox.1 debian/tmp/usr/share/man/man1/gts2dxf.1 debian/tmp/usr/share/man/man1/gts2stl.1 gts-snapshot-121130/debian/compat0000644000175100017510000000000212055775440013611 000000000000005 gts-snapshot-121130/debian/Makefile.in0000644000175100017510000002406612055775445014475 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ subdir = debian DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ EXTRA_DIST = changelog.sh compat control copyright \ libgts-snapshot-dev.install \ libgts-snapshot-doc.docs \ libgts-snapshot.install \ libgts-snapshot.symbols \ rules all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 debian/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu debian/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): 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 "$(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 check-am: all-am check: check-am all-am: Makefile 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) -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-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-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: .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-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 # 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: gts-snapshot-121130/debian/Makefile.am0000644000175100017510000000025512055775440014451 00000000000000EXTRA_DIST = changelog.sh compat control copyright \ libgts-snapshot-dev.install \ libgts-snapshot-doc.docs \ libgts-snapshot.install \ libgts-snapshot.symbols \ rules gts-snapshot-121130/debian/libgts-snapshot-doc.docs0000644000175100017510000000001112055775440017141 00000000000000doc/html gts-snapshot-121130/debian/changelog.sh0000644000175100017510000000067212055775440014703 00000000000000GTS_VERSION=`grep GTS_MAJOR_VERSION config.h | awk '{print $3;}'`.`grep GTS_MINOR_VERSION config.h | awk '{print $3;}'`.`grep GTS_MICRO_VERSION config.h | awk '{print $3;}'` version=`date +%y%m%d` date=`date +"%a, %e %b %Y %T %z"` cat < debian/changelog gts-snapshot ($GTS_VERSION-$version) jaunty; urgency=low * gts-snapshot release (based on Ruben Molina's official debian) -- Stephane Popinet $date EOF gts-snapshot-121130/debian/libgts-snapshot-dev.install0000644000175100017510000000030412055775440017675 00000000000000debian/tmp/usr/bin/gts-config debian/tmp/usr/include debian/tmp/usr/lib/*.so debian/tmp/usr/lib/*.a debian/tmp/usr/lib/*.la debian/tmp/usr/share/aclocal debian/tmp/usr/share/man/man1/gts-config.1 gts-snapshot-121130/debian/libgts-snapshot.symbols0000644000175100017510000000010612055775440017143 00000000000000# dummy file just here to force dh_makeshlibs to call dpkg-gensymbols gts-snapshot-121130/debian/copyright0000644000175100017510000000023412055775440014345 00000000000000Copyright: GNU Library General Public License, Version 2. On Debian systems, the complete text of the LGPL is located in /usr/share/common-licenses/LGPL-2 gts-snapshot-121130/debian/rules0000644000175100017510000000044712055775440013475 00000000000000#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk GTS_VERSION = $(shell grep -o "[0-9]*\.[0-9]*\.[0-9]*" $(CURDIR)/debian/changelog) DEB_DH_MAKESHLIBS_ARGS_libgts-snapshot = -- -v$(GTS_VERSION) -c0 clean:: rm -f src/predicates_init gts-snapshot-121130/debian/control0000644000175100017510000000324212055775440014017 00000000000000Source: gts-snapshot Section: math Priority: optional Maintainer: Stephane Popinet Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libglib2.0-dev, libnetpbm10-dev, gtk-doc-tools (>= 1.3-4) Homepage: http://gts.sourceforge.net/ Package: libgts-snapshot-dev Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libglib2.0-dev, libgts-snapshot (= ${binary:Version}) Conflicts: libgts-dev, libgts-bin Suggests: libgts-snapshot-doc Description: GTS Library (development snapshot) GTS includes a number of useful functions to deal with triangulated surfaces including, but not limited to, multi-resolution models, Delaunay and Constrained Delaunay triangulations, set operations on surfaces (intersection, union etc ...), bounding-boxes trees for efficient collision and intersection detection, triangle strips and binary heaps. Package: libgts-snapshot Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libgts-0.7-1, libgts-0.7-5, libgts-bin Description: GTS Library (development snapshot) -- runtime environment GTS includes a number of useful functions to deal with triangulated surfaces. Refer to the libgts-dev package description for more details. . This package provides runtime support for GTS Package: libgts-snapshot-doc Section: doc Architecture: all Conflicts: libgts-doc Depends: ${shlibs:Depends}, ${misc:Depends} Description: GTS Library documentation (development snapshot) GTS includes a number of useful functions to deal with triangulated surfaces. Refer to the libgts-dev package description for more details. . This package contains the GTS Reference, in HTML format. gts-snapshot-121130/config.guess0000755000175100017510000012761512055775445013532 00000000000000#! /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: gts-snapshot-121130/config.h.in0000644000175100017510000000432512055775444013224 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if C preprocessor supports warning directive. */ #undef CPP_HAS_WARNING /* Binary age */ #undef GTS_BINARY_AGE /* Interface age */ #undef GTS_INTERFACE_AGE /* Major version */ #undef GTS_MAJOR_VERSION /* Micro version */ #undef GTS_MICRO_VERSION /* Minor version */ #undef GTS_MINOR_VERSION /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOATINGPOINT_H /* Define to 1 if you have the header file. */ #undef HAVE_FPU_CONTROL_H /* 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_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* 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 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 the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if netpbm include files are in netpbm/. */ #undef NETPBM_INCLUDE /* 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 you have the ANSI C header files. */ #undef STDC_HEADERS gts-snapshot-121130/ChangeLog0000644000175100017510000004307512055775530012754 00000000000000Fri Nov 30 01:17:32 CET 2012 Release tagged 2012-07-08 Sun Jul 8 02:17:44 CEST 2012 Stephane Popinet * Updated gts.spec for distribution of gts2xyz Ignore-this: efa10e0038bb56c88545fa77ad4e0ed3 Wed Nov 28 22:26:21 CET 2012 Stephane Popinet * Renamed configure.in to configure.ac Ignore-this: 33404c9648b7cc3a20fffe3ea4dcde29 Thu Nov 29 11:06:14 CET 2012 Stephane Popinet * New function gts_file_new_from_buffer() Ignore-this: f0e8f65445082791c2978bedcadda658 Fri Jul 6 13:27:01 CEST 2012 Release tagged 2012-07-01 Sun Jul 1 06:36:19 CEST 2012 Stephane Popinet * Gnuplot output for meshes in gts2oogl Ignore-this: 601620293013066815a9a7f918aa48c2 Sun Jul 1 06:33:49 CEST 2012 Stephane Popinet * New tool 'gts2xyz' Ignore-this: 68d93c5dc0dadd288b2cda79bc516a8b Sun Jul 1 06:33:28 CEST 2012 Stephane Popinet * New 'slope maximization' option for delaunay Ignore-this: d9324d96e017b1872a92c7ee3ff3e46 Fri Apr 27 10:29:28 CEST 2012 Release tagged 2012-04-26 Thu Apr 26 23:54:05 CEST 2012 Stephane Popinet * Cleanup of Mac OSX autogen patch Ignore-this: 8c9fff4bbf9c2dac276365c491883c Mon Dec 19 08:56:13 CET 2011 stephane.zaleski@gmail.com * Fixes to let autogen.sh work on MacOS X - Darwin with macports Ignore-this: 78e989ace253e7ccbcace2564fd071a4 Tue Oct 25 00:58:11 CEST 2011 Stephane Popinet * Fix for reading objects with "assign" Ignore-this: 76ac1d5ac6a35b02ab0f2921d5368fd4 Mon Mar 28 21:41:27 CEST 2011 Stephane Popinet * gts_file_assign_variables() can read GtsObjects. Ignore-this: e9fb5cf6d9b0cbf42a77e88bc2f98ce9 Fri Jan 21 05:40:28 CET 2011 Stephane Popinet tagged 2011-01-08 Ignore-this: 6c994ba8a5b9f819334ce1093e0848bb Sat Jan 8 19:32:21 CET 2011 Stephane Popinet * Applied manpages patch from Benoit Knecht Ignore-this: ad1395e04314b53d39c390bcf2f84226 Fri Nov 12 05:33:49 CET 2010 Stephane Popinet tagged 2010-11-11 Ignore-this: e6f88624cca361c064457b7ddecc7c8d Thu Nov 11 17:48:28 CET 2010 Stephane Popinet * Added missing -lm library Ignore-this: 9a717673c7bf1b358fd2fcbc3823a9ff Fri Nov 5 05:00:33 CET 2010 Stephane Popinet * Fixed hanging last read for gts_graph_read() Ignore-this: 61cf97c47d424ca6a83c2a0e2569e89d Thu Mar 25 12:58:09 CET 2010 Stephane Popinet tagged 2010-03-21 Ignore-this: a15108ffd296c68adf3fa80c554f3054 Sun Mar 21 22:06:14 CET 2010 Stephane Popinet * Fixed typo in debian control file Ignore-this: 28e44e8068291caabc6bb641207ce29d Sun Mar 21 14:56:48 CET 2010 Stephane Popinet tagged 2010-03-21 Sun Mar 21 08:34:30 CET 2010 Stephane Popinet * Fixed conflicts with default debian package Ignore-this: bb5a0f540259d966a0250b59fd342f76 Thu Mar 18 14:57:32 CET 2010 Stephane Popinet * old tag: 2010-03-18 Thu Mar 18 08:21:23 CET 2010 Stephane Popinet * Updated packaging rules for debian and buildservice Ignore-this: aa37b682d66f45fbdb6a8c5b7030b029 Wed Mar 17 08:32:50 CET 2010 Stephane Popinet * gts.spec supports SLED10 rather than openSUSE 11.0 Ignore-this: 602099f4860001ae9a863789b00f6833 Wed Mar 17 14:17:57 CET 2010 Stephane Popinet tagged 2010-03-17 Wed Mar 17 02:07:03 CET 2010 Stephane Popinet * Fixed incomplete netpbm library check Ignore-this: df601bcb7a6403b84db0d2c1bcfee1ed Tue Mar 16 04:04:08 CET 2010 Stephane Popinet * Added buildservice-snapshot makefile target Ignore-this: 8d308ac08d4a5ffd3ebace5cce92040c Mon Mar 15 22:42:00 CET 2010 Stephane Popinet * Added configure support for netpbm include directory Ignore-this: db2365fc0cdd8c40a7edf0f579d7a5ec Mon Mar 15 22:04:44 CET 2010 Stephane Popinet * Updated RPM spec file for use with buildservice Ignore-this: 57b2c25def646536fa5518104e251ef6 Fri Mar 12 03:39:04 CET 2010 Stephane Popinet * Changed DTD definition for docs Ignore-this: 875dbf923b9ae8d29597e622ba34006d Wed Feb 3 08:48:14 CET 2010 Stephane Popinet * Changed ubuntu distribution to jaunty Sat Jan 30 19:34:13 CET 2010 Stephane Popinet * old tag: 2010-01-29 Fri Jan 29 11:42:41 CET 2010 Stephane Popinet * gts_file_assign_variables() supports quoted GTS_STRINGs Wed Sep 9 17:03:53 CEST 2009 Stephane Popinet * old tag: 2009-09-08 Wed Sep 9 00:39:16 CEST 2009 Stephane Popinet * Fixed incorrect man pages install directory in RPM spec Tue Sep 8 00:03:56 CEST 2009 Matthieu Castellazzi * add man pages to rpm spec file Sun May 10 07:53:23 CEST 2009 Stephane Popinet * Added 'launchpad-snapshot' Makefile target Sat May 9 01:32:01 CEST 2009 Stephane Popinet * autogen.sh copies missing files Sat May 2 01:24:22 CEST 2009 Stephane Popinet * Man pages need to be distributed Ignore-this: c842267e75ff47e0870d0446d818de67 Fri May 1 06:20:54 CEST 2009 Stephane Popinet * Added man pages from debian (thanks Ruben!) Ignore-this: 6219302d9f3660f284b855e0f3ef68cb Fri May 1 03:27:40 CEST 2009 Stephane Popinet * Updated debian package build (based on Ruben Molina's) Ignore-this: 96eda30e02f7132cf5c8629410c0455d Fri May 1 02:59:11 CEST 2009 Stephane Popinet * stl2gts ignores degenerate facets Ignore-this: 76dfa27e377ad0544249b11e3d9e16a2 Wed Apr 29 13:09:24 CEST 2009 Stephane Popinet * Fix for debian package symbols generation Sun Oct 5 02:06:14 CEST 2008 Stephane Popinet * Fix for versioning of debian packages Wed Jul 16 04:31:11 CEST 2008 Stephane Popinet * Minor fixes for RPM spec file (I. Vari) Fri Jul 4 04:40:33 CEST 2008 Stephane Popinet * Fixed typos in RPM spec file (I. Vari) Tue Jul 1 06:02:02 CEST 2008 Stephane Popinet * RPM spec updated for Fedora (I. Vari) Mon Jan 7 21:45:25 CET 2008 Stephane Popinet * RPM build fix (I. Vari) Removed %{?_smp_mflags} from make due to intermittent build errors on some SMP systems. Wed Dec 19 00:31:01 CET 2007 Stephane Popinet * RPM spec file fix (Ivan Vari) Mon Nov 12 03:48:48 CET 2007 Stephane Popinet * Fixed package (install) dependencies Tue Oct 30 02:53:14 CET 2007 Stephane Popinet * Added specs for RPM packaging (thanks to Ivan Vari) Tue Oct 30 03:53:28 CET 2007 Stephane Popinet * Added math library for netpbm library check. Thu Sep 13 23:56:41 CEST 2007 Stephane Popinet * Explicit check when trying to partition a graph with too few nodes Wed Sep 12 06:23:28 CEST 2007 Stephane Popinet * example/volume also computes the area Wed Sep 12 06:22:39 CEST 2007 Stephane Popinet * New "all" option for example/set For outputting all combinations of boolean operations. Fri Apr 13 06:02:10 CEST 2007 Stephane Popinet * Added math lib to gts.pc Thu Feb 22 05:01:21 CET 2007 Stephane Popinet * Force regeneration of ChangeLog before creating debian package Wed Feb 14 02:50:50 CET 2007 Stephane Popinet * Fix for getopt_long and unknown arguments Mon Jan 22 23:48:30 CET 2007 Stephane Popinet * New function gts_point_in_sphere() Fri Nov 24 04:04:32 CET 2006 Stephane Popinet * Fixed function inlining mess I made all inlined functions "static inline" in the gts.h header file. This should fix the problem when linking GTS with non-optimised objects. Wed Oct 25 04:28:12 CEST 2006 Stephane Popinet * Removed g_ptr_array_foreach() call for compatibility with glib-1.2 Wed Oct 18 23:32:43 CEST 2006 Stephane Popinet * Simplified Debian package dependencies To make them compatible with Ubuntu. It's a bit messy though as I am not sure what the issues are with binary compatibility of Ubuntu/Debian libraries etc... Wed Oct 18 05:45:35 CEST 2006 Stephane Popinet * Fix for memory leak in GtsEHeap with glib >= 2.10 The GMemChunk glib structure previously used for allocating GtsEHeapPair is deprecated in glib 2.10. Furthermore, it seems that the new slice allocator in glib 2.10 is not backward compatible with GMemChunk (despite what is said in the doc). This causes massive memory leaks. The solution is to use good old g_malloc instead. Fri Oct 6 02:20:31 CEST 2006 Stephane Popinet * Fixed autogen.sh for Mac OSX Thu Jul 13 00:00:55 CEST 2006 Stephane Popinet * Bug fix in gts_edge_swap() (thanks to Oliver Burghard) Wed Mar 29 06:43:17 CEST 2006 Stephane Popinet tagged release_0_7_6 Wed Mar 29 06:03:21 CEST 2006 Stephane Popinet * Updated NEWS for release 0.7.6 Fri Mar 24 00:47:26 CET 2006 Stephane Popinet * Changed 'gtstransform' to 'transform' in Debian package Fri Mar 10 00:48:43 CET 2006 Stephane Popinet * Marcello's debian patch for ARM and Alpha was breaking floating-point control! Thu Mar 9 22:41:16 CET 2006 Stephane Popinet * Debian snapshot packages were not correctly versioned Sun Mar 5 09:11:09 CET 2006 Stephane Popinet * Removed 'arch' junk Fri Feb 3 11:50:14 CET 2006 Stephane Popinet * Updated macros for automake 1.8 Wed Jan 25 18:48:18 CET 2006 Stephane Popinet * predicates_init.h has nothing to do in darcs Wed Jan 25 18:45:30 CET 2006 Stephane Popinet * LC_ALL is set to POSIX in all executables This fixes problems when running the tools/examples on non-English systems. Sun Dec 4 22:34:17 CET 2005 Stephane Popinet * Changelog is manual for debian package Thu Dec 1 21:58:57 CET 2005 Stephane Popinet * Debian packages use correct versioning Thu Dec 1 06:11:53 CET 2005 Stephane Popinet * Updated macro docs for new version of gtk-doc Thu Dec 1 05:12:38 CET 2005 Stephane Popinet * Floating-point control for Alpha and ARM (from M. Magallon debian port) Thu Dec 1 05:07:48 CET 2005 Stephane Popinet * Debian snapshot creation (based on Marcelo Magalon official debian packages) Tue Nov 29 03:44:36 CET 2005 Stephane Popinet * Fixed doc for gts_triangle_quality() Tue Nov 29 01:17:28 CET 2005 Stephane Popinet * Removed USE_ROBUST_PREDICATES option (predicates are always robust now) Mon Oct 17 00:21:35 CEST 2005 Stephane Popinet * old tag: 0.7.4 Mon Oct 17 00:19:49 CEST 2005 Stephane Popinet * Doc updates for release 0.7.4 Fri Aug 26 01:07:41 CEST 2005 Stephane Popinet * Fixes for compilation warnings (thanks to Omar Cornut) Mon Aug 15 06:01:28 CEST 2005 Stephane Popinet * Cleanup Sun Aug 14 12:07:41 CEST 2005 Stephane Popinet * New function gts_bbox_overlaps_segment() Using the same fast routine as gts_bbox_overlaps_triangle() but with a degenerate triangle as input. Wed Jul 20 06:26:02 CEST 2005 Stephane Popinet * Removed attribute byte count check for stl2gts Wed Jul 13 01:27:25 CEST 2005 Stephane Popinet * Added ChangeLog target Tue Jul 12 06:02:33 CEST 2005 Stephane Popinet * Version set to 0.7.4 prior to release Fri Jul 1 00:53:59 CEST 2005 Stephane Popinet * GtsFile now reports errors starting at column number 1 Fri Jul 1 00:53:09 CEST 2005 Stephane Popinet * Fix for comments not being fully ignored by GtsFile Thu Jun 30 07:44:52 CEST 2005 Stephane Popinet * Fix for customised handling of parsing of GtsFile Thu Jun 30 07:44:00 CEST 2005 Stephane Popinet * gts_file_new_from_string() makes a copy of the string Wed Jun 29 03:27:34 CEST 2005 Stephane Popinet * Small change to interface of gts_file_new_from_string() Sun Jun 12 11:00:09 CEST 2005 Stephane Popinet * new gts_file_new_from_string() function Fri Jun 10 02:26:49 CEST 2005 Stephane Popinet * added const qualifier to gts_object_class_from_name() Tue Jun 7 05:52:53 CEST 2005 Stephane Popinet * Fixed bug in gts_delaunay_remove_vertex Tue Jun 7 05:41:56 CEST 2005 Stephane Popinet * Fix for degenerate case in isotetra_bcl() It handles the degenerate case where an interpolated point falls directly on a mesh vertex (the previous code would generate edges with length zero). Tue Jun 7 05:41:30 CEST 2005 Stephane Popinet * Added Magnus to thanks Tue Jun 7 05:40:46 CEST 2005 Stephane Popinet * Fixed gts.def Tue Jun 7 05:28:20 CEST 2005 Stephane Popinet * Support binary STL files in stl2gts on win32 Thu May 26 05:19:54 CEST 2005 Stephane Popinet * Added autogen.sh Wed Mar 9 03:26:55 CET 2005 Stephane Popinet * delaunay is installed Wed Jan 19 06:41:50 CET 2005 Stephane Popinet * Updates for switch to darcs Mon Nov 15 00:44:04 CET 2004 Stephane Popinet * Bug fixes for gts_delaunay_add_constraint (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-12) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-12 Keywords: This function was returning destroyed conflicting constraints. Improper handling of special cases in remove_intersected_edge was causing failure in some cases. Tue Nov 9 06:20:14 CET 2004 Stephane Popinet * closest face for glib >= 2.4 did not use planar distance (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-11) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-11 Keywords: This was fixed for the glib 1.2 version a while ago. Thu Nov 4 03:12:42 CET 2004 Stephane Popinet * New function gts_triangle_interpolate_height() (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-10) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-10 Keywords: Thu Oct 28 07:46:25 CEST 2004 Stephane Popinet * Added fast triangle-box intersection test (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-9) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-9 Keywords: Written by Tomas Akenine-Moller. Tue Oct 26 06:21:27 CEST 2004 Stephane Popinet * New "closed" option for happrox (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-8) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-8 Keywords: Tue Oct 26 06:20:51 CEST 2004 Stephane Popinet * happrox is installed (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-7) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-7 Keywords: Tue Oct 26 06:20:06 CEST 2004 Stephane Popinet * New function gts_face_is_compatible (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-6) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-6 Keywords: Mon Oct 18 02:43:55 CEST 2004 Stephane Popinet * Updates before release 0.7.3 (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-5) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-5 Keywords: Mon Oct 18 02:20:36 CEST 2004 Stephane Popinet * Added vertex indices in doc/isocube.fig (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-4) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-4 Keywords: Thu Oct 14 00:06:27 CEST 2004 Stephane Popinet * Simpler and more efficient gts_file_read function (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-3) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-3 Keywords: Mon Oct 11 02:00:09 CEST 2004 Stephane Popinet * Glib-2.0 and mingwin support (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-2) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-2 Keywords: Based on patches by Tim Fenn and others. Mon Oct 11 00:32:18 CEST 2004 Stephane Popinet * Interoperability with CVS (s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-1) s.popinet@niwa.co.nz--2004/gts--mainline--0.7--patch-1 Keywords: Wed Jan 19 05:47:16 CET 2005 Stephane Popinet * Initial commit (s.popinet@niwa.co.nz--2004/gts--mainline--0.7) gts-snapshot-121130/ltmain.sh0000755000175100017510000105017112055775441013022 00000000000000 # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --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 # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed 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) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3293 # 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 # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # 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" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="grep -E"} : ${FGREP="grep -F"} : ${GREP="grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: 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. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # 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" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname 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). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # 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. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # 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 "$removedotparts" -e "$collapseslashes" -e "$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 "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$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_normal_abspath_result=$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_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { 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 "x$func_relative_path_tlibdir" = x ; 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 "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. 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 # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to 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 '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && 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_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_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 "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # 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 () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent 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 () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent 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 () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi 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 () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # 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. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" 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= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "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 "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; 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 } # 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 # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # 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 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; 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." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # 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 \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 "$lalib_p" = yes } # 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 () { func_lalib_p "$1" } # 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 () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" 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 () { $opt_debug 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 () { $opt_debug 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 "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; 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 "$lt_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 () { $opt_debug # 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 () { $opt_debug 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 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug $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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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_mode_compile arg... func_mode_compile () { $opt_debug # 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 | *.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 "$build_libtool_libs" != yes && \ func_fatal_configuration "can not 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 "$build_old_libs" = yes; 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 "$pic_mode" = no && test "$deplibs_check_method" != pass_all; 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 "$compiler_c_o" = no; 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 "$need_locks" = yes; 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 "$need_locks" = warn; 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 "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; 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 "$need_locks" = warn && 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 "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; 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 "$need_locks" = warn && 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 "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && 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 -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 () { $opt_debug # 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 test "X$opt_dry_run" = Xfalse; then 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" else # 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 fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug 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_silent && 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 "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # 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=no 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=yes ;; -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$prev" = x-m && 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=yes if test "$isdir" = yes; 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 ;; 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 "$build_old_libs" = yes; 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=yes 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'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; 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_silent || { 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_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $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 "$opt_mode" = install && 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 () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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$TIMESTAMP) $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 con'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 /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; 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 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[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," 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" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; 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"' # 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_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 () { $opt_debug 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 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 } }'` 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 () { $opt_debug 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 () { $opt_debug 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 which possess that section. Heuristic: eliminate # all those which 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_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 () { $opt_debug 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 () { $opt_debug 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_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 () { $opt_debug 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 () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; 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 "$lock_old_archive_extraction" = yes; 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 () { $opt_debug 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` darwin_base_archive=`basename "$darwin_archive"` 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 "$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 in which 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$TIMESTAMP) $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/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which 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$TIMESTAMP) $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 () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done 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 "$fast_install" = yes; 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 "$shlibpath_overrides_runpath" = yes && 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 /* 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 platforms) ... */ #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 # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #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 ((void *) 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]; int 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 = 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 (strcmp (str, pat) == 0) *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 int 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) { int orig_value_len = strlen (orig_value); int 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 #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\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 -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' 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 () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug 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 # which 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 which 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= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no 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 "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && 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) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; 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 ;; 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 "$pic_object" = none && test "$non_pic_object" = none; 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 "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; 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 "$pic_object" = none ; 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 ;; 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 "$prev" = rpath; 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$arg" = "X-export-symbols"; 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$arg" = "X-lc" || test "X$arg" = "X-lm"; 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$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && 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$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" 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) 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 ;; -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 # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -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*|-flto*|-fwhopr*|-fuse-linker-plugin) 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 ;; # 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 "$pic_object" = none && test "$non_pic_object" = none; 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 "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; 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 "$pic_object" = none ; 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 "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; 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 "$export_dynamic" = yes && 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\" 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 "$linkmode" = lib; 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=no 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 "$linkmode,$pass" = "lib,link"; 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 "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; 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 "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; 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 "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; 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 "$pass" = conv && 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 "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; 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 "$pass" = link; 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 "$pass" = conv; 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=no 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=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then 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." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; 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=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # 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 "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; 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 "$linkmode" != prog && test "$linkmode" != lib; 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 "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; 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 "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; 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 "X$installed" = Xyes; 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 "X$hardcode_automatic" = Xyes && 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 "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; 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 "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; 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 "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes 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 test "$linkalldeplibs" = yes; 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 "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || 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 test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && 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 "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; 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 "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; 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 "$linkmode" = lib && test "$hardcode_into_libs" = yes; 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*) 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 "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; 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 can not # 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 "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # 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 "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; 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 "$linkmode" = prog; 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 "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; 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 "$linkmode" = prog; 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 "$linkmode" = prog; 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 "$hardcode_direct" != unsupported; 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 "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; 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 can not 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 "$module" = yes; 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 "$build_old_libs" = no; 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 "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; 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 "$link_static" = no && 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 "$link_all_deplibs" != no; 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 "$pass" = link; then if test "$linkmode" = "prog"; 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 "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # 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= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_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 # 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 "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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 "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; 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 "$deplibs_check_method" != pass_all; 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 "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; 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 # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|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" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; 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 "$loop" -ne 0; 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) 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 "$loop" -ne 0; 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" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. 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 "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; 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 "X$precious_files_regex" != "X"; 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 "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; 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 "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; 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 "$build_libtool_libs" = yes; 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 "$build_libtool_need_lc" = "yes"; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$deplibs_check_method" = "Xnone"; 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 "$droppeddeps" = yes; then if test "$module" = yes; 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 "$build_old_libs" = no; 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 "$allow_undefined" = no; 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 "$build_old_libs" = no; 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 "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && 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_apped 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" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi 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 "$opt_mode" != relink && 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 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # 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 fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || 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 "$try_normal_branch" = yes \ && { 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 "X$skipped_export" != "X:"; 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 "X$skipped_export" != "X:" && 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 "$compiler_needs_object" = yes && 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 "$thread_safe" = yes && 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 "$opt_mode" = relink; 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 "$module" = yes && 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 "X$skipped_export" != "X:" && 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 "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; 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 "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; 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 "X$objlist" = X || 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 "$k" -eq 1 ; 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 if ${skipped_export-false}; then 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 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_silent || { 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 "$opt_mode" = relink; 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 if ${skipped_export-false}; then 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 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 "$module" = yes && 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="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { 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 "$opt_mode" = relink; 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 "$opt_mode" = relink; 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 "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` 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 "$build_libtool_libs" != yes && 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" ### testsuite: skip nested quoting test 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 if test "$build_libtool_libs" != yes; then 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 fi if test -n "$pic_flag" || test "$pic_mode" != default; 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" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ 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 "$tagname" = CXX ; 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 "$build_old_libs" = yes; 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@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # 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 fi 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 "$no_install" = yes; 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 if test "$hardcode_action" = relink; then # 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" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # 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 if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi 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 "$build_libtool_libs" = yes; 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 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 "X$oldobjs" = "X" ; 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 "$build_old_libs" = yes && 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 "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; 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" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 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 "x$bindir" != x ; 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$TIMESTAMP) $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 can not 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 "$installed" = no && test "$need_relink" = yes; 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 } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= 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=yes ;; -*) 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 "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; 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 test "$rmforce" = yes; 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" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || 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 "$pic_object" != none; 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 "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; 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 "$fast_install" = yes && 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 } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} 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 # in which 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: # vi:sw=2 gts-snapshot-121130/Makefile.in0000644000175100017510000006403712055775446013256 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/gts.pc.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS THANKS TODO config.guess config.sub \ depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = gts.pc CONFIG_CLEAN_VPATH_FILES = 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 = 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__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) 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)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ SUBDIRS = src tools examples doc test debian OSC_DIR = $(HOME)/local/src/osc/home:popinet/$(PACKAGE)-snapshot pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gts.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 .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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 gts.pc: $(top_builddir)/config.status $(srcdir)/gts.pc.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-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ 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)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # 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; \ ($(am__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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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) set x; \ 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 || \ set "$$@" "$$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; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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 "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -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) | 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-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(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) 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 \ && ../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 \ && cd "$$am__cwd" \ || exit 1 $(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: @$(am__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)$(pkgconfigdir)"; 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: 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-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-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: 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-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .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-xz 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-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-pkgconfigDATA install-ps \ install-ps-am install-strip 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-pkgconfigDATA ChangeLog: darcs changes > ChangeLog debian-snapshot: config.h darcs changes > ChangeLog sh debian/changelog.sh dpkg-buildpackage -rfakeroot -b rm -f debian/repo/* mv -f ../*.changes ../*.deb debian/repo cd debian/repo && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz launchpad-snapshot: config.h dist tar xzf $(PACKAGE)-?.?.?.tar.gz cd $(PACKAGE)-?.?.? && ./configure && darcs changes > ChangeLog && sh debian/changelog.sh && dpkg-buildpackage -rfakeroot -k07AB22DC -S -sa rm -f $(PACKAGE)-?.?.?.tar.gz rm -r -f $(PACKAGE)-?.?.? buildservice-snapshot: config.h dist tar xzf $(PACKAGE)-?.?.?.tar.gz rm -f $(PACKAGE)-?.?.?.tar.gz mv -f $(PACKAGE)-?.?.? $(PACKAGE)-snapshot cd $(PACKAGE)-snapshot && ./configure && darcs changes > ChangeLog && sh debian/changelog.sh && chmod +x debian/rules && make distclean tar czvf $(PACKAGE)-snapshot.tar.gz $(PACKAGE)-snapshot dpkg-source -b $(PACKAGE)-snapshot rm -r -f $(PACKAGE)-snapshot cd $(OSC_DIR) && osc update && rm -f $(OSC_DIR)/* cp -f rpm/$(PACKAGE).spec $(OSC_DIR) mv -f $(PACKAGE)-snapshot.tar.gz $(PACKAGE)-snapshot_*.tar.gz $(PACKAGE)-snapshot_*.dsc $(OSC_DIR) cd $(OSC_DIR) && osc addremove && osc commit -m "snapshot release" # 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: gts-snapshot-121130/NEWS0000644000175100017510000001633012055775440011673 0000000000000029/03/2006: Release of version 0.7.6 Important changes: - Debian snapshot package creation. - LC_ALL is set to POSIX in all executables to avoid problems with locale-dependent floating-point conventions. 17/10/2005: Release of version 0.7.4 Important changes: - Switched to darcs for version control (the CVS tree is obsolete). Bug Fixes: - For constrained Delaunay, closest face for glib >= 2.4 did not use planar distance. - Several fixes for gts_delaunay_add_constraint. - Fix for degenerate case in isotetra_bcl(). - Fix for comments not being fully ignored by GtsFile. Minor changes and features: - delaunay and happrox are installed. - Fast triangle-box intersection test by Tomas Akenine-Moller. - New function gts_triangle_interpolate_height(). - binary STL files work on win32. 18/10/2004: Release of version 0.7.3 New features/important changes include: - Autodetection and support for glib >= 2.4 (but glib >= 1.2.8 is still supported): glib >= 2.0 and < 2.4 is not supported (send me patches!). - pkgconfig preliminary support - Mingwin support. - Changes to the interface of gts_graph_read(). Bug Fixes: - Constrained Delaunay Triangulation guess selection - Boolean operations: Now uses SOS for segment/triangle intersections. 15/05/2004: Release of version 0.7.2 New features includes: - gts2dxf and gts2stl filters. - New GtsColorVertex class. - "Dual" isosurface calculation by Tim F. - New "happrox" algorithm to approximate terrain models. - New GtsMatrix implementation (quaternions) by Wayne Gramlich and Michael Loehr. - Attributes inheritance when computing intersections. Bug fixes: - Major changes to inner loops triangulation for boolean operations. - compilation on SGI Altix - Fixed gts.def generation for Windows support. - Cygwin support. 08/01/2003: Release of version 0.7.1 New features includes: - Sphere tessellation by Jerome Benoit. As well as a number of bug and compilation fixes. The interface to the gts_surface_refine() function has been made more generic. 08/11/2002: Release of version 0.7.0 Boolean operations have been almost entirely rewritten and now use a Simulation of Simplicity (SoS) technique to deal with degenerate cases. This should fix most of the problems encountered when dealing with "simple" geometric objects (i.e. cube/cube intersections with coplanar faces etc...) Almost all the test cases in the test suite (including significant tests submitted by users) now pass. Difficult test cases like an object intersecting with a simplified version of itself (created using coarsen for example) work fine despite the huge number of degenerate cases (coincident and nearly coincident edges, faces, vertices). There is still a caveat however for intersections which creates multiple closed loops contained within one another (note that this wasn't a problem in the previous version). This needs to be fixed at some point. Another problem is that the surfaces resulting from a boolean operation while guaranteed to be topologically consistent may contain degenerate edges/faces which will prevent them from being used in a subsequent boolean operation. The degenerate entities need first to be eliminated (through edge/face collapse). The gts_point_is_inside_surface() function has been rewritten using SoS. A new stl2gts tool provides conversion between STL (stereolithography) format and GTS format. Ray Jones has added new functions to compute gaussian curvature, principal curvature directions etc... The gts_file_close() function call has been replaced by a gts_file_destroy() function which does not close the file. This is better left to the caller. Your application might need a slight modification there. The whole automake/autoconf stuff has been upgraded to use version 1.6.3 of automake. Gert Wollny has added a marching tetrahedra isosurface construction technique which should avoid topological defects in isosurfaces (created by inconsistencies inherent to the marching cube technique). A number of bugs have been fixed (thanks to bug reporters). 08/10/2001: Release of version 0.5.0. Configuration and compilation have been cleaned and updated. Now builds both shared and static libraries. A new `gts-config' script allows simpler use of the library (a la glib), together with a gts.m4 macro definition for your own autoconf usage. A number of new features have been added: - Configurable out-of-core simplification framework for surfaces larger than the main memory. - Conforming constrained Delaunay triangulation and Delaunay refinement by addition of Steiner points. - Simple implementation of FIFOs (First-In First-out queues). - New graph objects and operations on graphs. In particular efficient graph partitioning routines. - "Stabbing" functions have been added to bounding box trees, which now allows for efficient testing whether a point lies inside or outside a surface. A number of bug fixes and improvements have also been added: - More generic object methods for surfaces. - Easily definable inheritance of face attributes (in particular for boolean operations). - Bug fixes for boolean operations. The srf2oogl converter has been renamed to gts2oogl and an 'isolines' functionality was added. 31/01/2001: Release of version 0.4.0. Much has happened since 0.3.0. A new object structure inspired by GTK allows to use classical inheritance mechanisms and virtual functions. As a consequence the object hierarchy has been restructured and now uses points, vertices, segments, edges, triangles, faces and surfaces. The Delaunay triangulation has been entirely re-written and is now fully-dynamic (insertion or deletion of vertices). The constrained Delaunay triangulation is semi-dynamic (insertion of vertices and constraints). Boolean operations between surfaces have also been re-written and are more robust (and also benefit from a much more robust implementation of the Delaunay triangulation). Surface coarsening routines have been improved both in term of a more generic interface and in order to avoid artefacts such as folds in the simplified surface. An interesting new extension is the implementation of progressive surfaces which allow dynamic real-time continuous level-of-detail representation of a surface. Progressive transmission of surfaces is also possible. The first building blocks for a hierarchical surface extension have been written. This will allow for dynamic view-dependent simplification of surfaces. The floating-point control interface necessary for robust geometric predicates has been cleaned and GTS should now build on any (touch wood) UNIX-based machine. Preliminary support has been added for win32 compilation using Microsoft C. Please note that the html reference manual is now distributed with the sources. 15/02/2000: Samples geometry files are avalaible at http://gts.sourceforge.net/samples.html 02/02/2000: Release of version 0.2.0. New data structures and algorithms including triangle strips and binary heaps. The algorithms for surface coarsening and refinement are more efficient and general. See Changelog for a more complete history. 17/01/2000: Release of version 0.1.0. GTS has officially moved to gts.sourceforge.net. A number of bug fixes. A few interface changes. Most of the functions have been checked for memory leaks. Nearly all the functions are now documented. gts-snapshot-121130/INSTALL0000644000175100017510000003633212055775446012237 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 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 commands `./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. 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 bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /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. gts-snapshot-121130/aclocal.m40000644000175100017510000126234212055775443013046 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. 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'.])]) # Configure paths for GLIB # Owen Taylor 1997-2001 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, dnl gthread, or gio is specified in MODULES, pass to pkg-config dnl AC_DEFUN([AM_PATH_GLIB_2_0], [dnl dnl Get the cflags and libraries from pkg-config dnl AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], , enable_glibtest=yes) pkg_config_args=glib-2.0 for module in . $4 do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; gio*) pkg_config_args="$pkg_config_args $module-2.0" ;; esac done PKG_PROG_PKG_CONFIG([0.16]) no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi min_glib_version=ifelse([$1], ,2.0.0,$1) AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" dnl dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.glibtest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_TRY_LINK([ #include #include ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_GENMARSHAL) AC_SUBST(GOBJECT_QUERY) AC_SUBST(GLIB_MKENUMS) rm -f conf.glibtest ]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 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) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 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.58])dnl We use AC_INCLUDES_DEFAULT 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_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _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([], [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 _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which 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 "X${COLLECT_NAMES+set}" != Xset; 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 # 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], [[!?.]$], [], [.]) )]) # _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\\"\\\`\\\\\\"" ;; *) 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\\"\\\`\\\\\\"" ;; *) 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 $lt_write_fail = 0 && 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) 2010 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 "$silent" = yes && 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 which 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 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _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 "X${COLLECT_NAMES+set}" != Xset; 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) _LT_PROG_REPLACE_SHELLFNS 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' TIMESTAMP='$TIMESTAMP' 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)], [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 # _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([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 test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; 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 -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; 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 "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # 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 "$lt_cv_ld_force_load" = "yes"; 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\"`' 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*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; 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 "$lt_cv_apple_cc_single_mod" != "yes"; 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 "${lt_cv_aix_libpath+set}" = 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 which will find a shell with a builtin # printf (which 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], [ --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 "$GCC" = yes; 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 in which 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 "x$enable_libtool_lock" != xno && 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 which ABI we are using. 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 which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; 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* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. 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*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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" ;; ppc*-*linux*|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 x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. 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*) LD="${LD-ld} -m elf64_sparc" ;; *) 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 "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; 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 openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$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" # 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 x"[$]$2" = xyes; 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 x"[$]$2" = xyes; 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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 ;; 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"; 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 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 "$cross_compiling" = yes; 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 -fvisbility=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 "x$enable_dlopen" != xyes; 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 ]) ;; *) 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 "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && 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 "x$lt_cv_dlopen_self" = xyes; 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 "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 in which 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 "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; 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 "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; 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_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 AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; 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` 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" else 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 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 need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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%'\''`; test $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 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 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 ;; freebsd1*) dynamic_linker=no ;; 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[[123]]*) 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} $libname${shared_ext}' 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 ;; gnu*) version_type=linux 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 hardcode_into_libs=yes ;; haiku*) version_type=linux 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=yes 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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 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 "$lt_cv_prog_gnu_ld" = yes; then version_type=linux 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 ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux 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 # Append ld.so.conf contents 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 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 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 "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux 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 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 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 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 "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _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], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which 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 which 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 "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; 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 "$with_gnu_ld" = yes; 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 /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 ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; 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 Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-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*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 ;; 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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) 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 "$lt_cv_path_NM" != "no"; 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 /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) 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 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 "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # 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 "$GCC" = yes; 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 "$host_cpu" = ia64; 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 # 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/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 # and D for any global 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};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print 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 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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 "$pipe_works" = yes; 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_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_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 "$GXX" = yes; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; 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']) ;; 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 "$host_cpu" = ia64; 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 "$host_cpu" != ia64; 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) 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 "$GCC" = yes; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; 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']) ;; 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 ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; 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 "$host_cpu" = ia64; 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 ;; 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']) ;; 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) 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' ;; 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\ F* | *Sun*Fortran*) # 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\ 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,' ;; 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 which 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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _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_flag_spec_ld, $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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no 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' ;; 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 "x$supports_anon_versioning" = xyes; 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 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)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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 can not *** 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; 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,' if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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(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 ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes; 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 "$lt_cv_irix_exported_symbol" = yes; 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 ;; 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*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _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' ;; esac 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 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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_flag_spec_ld], [1], [[If ld is used when linking, 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 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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; 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_flag_spec_ld, $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 "$_lt_caught_CXX_error" != yes; 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 "$GXX" = yes; 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 "$GXX" = yes; 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 "$with_gnu_ld" = yes; 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 "$host_cpu" = ia64; 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 # need to do runtime linking. 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 ;; 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,' if test "$GXX" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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) ;; 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 ;; freebsd[[12]]*) # 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 ;; gnu*) ;; 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 $output_objdir/$soname = $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 "$GXX" = yes; 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 $output_objdir/$soname = $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 $with_gnu_ld = no; 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 "$GXX" = yes; then if test $with_gnu_ld = no; 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 "$GXX" = yes; then if test "$with_gnu_ld" = no; 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) 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 "x$supports_anon_versioning" = xyes; 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 ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 $LDFLAGS $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 -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 $LDFLAGS $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 -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 can NOT 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$_lt_caught_CXX_error" != yes 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 ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; 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 ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 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 $p = "-L" || test $p = "-R"; 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 "$pre_test_object_deps_done" = no; 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 "$pre_test_object_deps_done" = no; 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)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; 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 "X$F77" = "Xno"; 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_flag_spec_ld, $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 "$_lt_disable_F77" != yes; 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 "$_lt_disable_F77" != yes 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 "X$FC" = "Xno"; 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_flag_spec_ld, $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 "$_lt_disable_FC" != yes; 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 "$_lt_disable_FC" != yes 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 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_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 "x${GCJFLAGS+set}" = xset || 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_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 $lt_ac_count -gt 10 && 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], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 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_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which 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 # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 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_SET_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_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], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && 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], []) 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])]) # 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 ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 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 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 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])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 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. # 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.11' 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.11.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.11.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, 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. # 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], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 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 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$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, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 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 10 # 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", "GCJ", or "OBJC". # 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 ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" 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'. 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 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"]) ]) # 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 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # 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 16 # 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.62])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 ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl 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 ]) 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, 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. # 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}" != 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, 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])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 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_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 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 4 # 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, 1999, 2000, 2001, 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 6 # 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 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 --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, 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # 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 ( 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, 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 2 # _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, 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([acinclude.m4]) gts-snapshot-121130/AUTHORS0000644000175100017510000000112412055775440012237 00000000000000Original Authors ---------------- Stéphane Popinet Contributors ------------ Marcelo E. Magallon, Ruben Molina: Debian packages. Jonathan R. Shewchuk: robust geometric predicates. Ray Jones: discrete differential operators. Gert Wollny: marching tetrahedra. Jerome Benoit: surface tesselation. Wagner Toledo Correa: triangle strips. Marcelo E. Magallon: Debian packages. Wayne C Gramlich, Michael Loehr: 4x4 GtsMatrix implementation. Tim Fenn: "dual" marching tetrahedra. Tomas Akenine-Moller: fast triangle-box intersection test. Ivan Adam Vari: RPM packages. gts-snapshot-121130/configure0000755000175100017510000160636212055775447013125 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 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" 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 : # 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 export CONFIG_SHELL 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+"$@"} 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_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; } # 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src/gts.h" # 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 LIBOBJS GLIB_DEPLIBS glib_module_libs glib_module_cflags glib_thread_libs glib_thread_cflags glib_libs glib_cflags GLIB_CONFIG GLIB_MKENUMS GOBJECT_QUERY GLIB_GENMARSHAL GLIB_LIBS GLIB_CFLAGS PKG_CONFIG HAS_NETPBM_FALSE HAS_NETPBM_TRUE MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE CPP 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 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 host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL 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 LT_AGE LT_REVISION LT_CURRENT LT_RELEASE GTS_VERSION GTS_MICRO_VERSION GTS_MINOR_VERSION GTS_MAJOR_VERSION 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 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_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_maintainer_mode enable_glibtest with_glib_prefix with_glib_exec_prefix ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG' # 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' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' 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 ;; -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 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 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 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 this package 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] --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/PACKAGE] --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 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-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-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-glibtest do not try to compile and run a test GLIB program --disable-glibtest Do not try to compile and run a test GLIB program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --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-glib-prefix=PFX Prefix where GLIB is installed (optional) --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional) 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 CPP C preprocessor PKG_CONFIG path to pkg-config utility 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 configure generated by GNU Autoconf 2.68 Copyright (C) 2010 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 || $as_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 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 $as_me, which was generated by GNU Autoconf 2.68. 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_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl # Making releases: # GTS_MICRO_VERSION += 1; # GTS_INTERFACE_AGE += 1; # GTS_BINARY_AGE += 1; # if any functions have been added, set GTS_INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set GTS_BINARY_AGE and GTS_INTERFACE_AGE to 0. # GTS_MAJOR_VERSION=0 GTS_MINOR_VERSION=7 GTS_MICRO_VERSION=6 GTS_INTERFACE_AGE=1 GTS_BINARY_AGE=1 GTS_VERSION=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION.$GTS_MICRO_VERSION #AC_DIVERT_POP()dnl # libtool versioning LT_RELEASE=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION LT_CURRENT=`expr $GTS_MICRO_VERSION - $GTS_INTERFACE_AGE` LT_REVISION=$GTS_INTERFACE_AGE LT_AGE=`expr $GTS_BINARY_AGE - $GTS_INTERFACE_AGE` # For automake. VERSION=$GTS_VERSION PACKAGE=gts am__api_version='1.11' 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 # 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 ( 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` 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 --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 if test x"${install_sh}" != 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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=$PACKAGE VERSION=$VERSION # 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 -' # Specify a configuration file ac_config_headers="$ac_config_headers config.h" cat >>confdefs.h <<_ACEOF #define GTS_MAJOR_VERSION $GTS_MAJOR_VERSION _ACEOF cat >>confdefs.h <<_ACEOF #define GTS_MINOR_VERSION $GTS_MINOR_VERSION _ACEOF cat >>confdefs.h <<_ACEOF #define GTS_MICRO_VERSION $GTS_MICRO_VERSION _ACEOF cat >>confdefs.h <<_ACEOF #define GTS_INTERFACE_AGE $GTS_INTERFACE_AGE _ACEOF cat >>confdefs.h <<_ACEOF #define GTS_BINARY_AGE $GTS_BINARY_AGE _ACEOF 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' macro_revision='1.3293' 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 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='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 #include #include /* 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 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 { $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" { test -f "$ac_path_SED" && $as_test_x "$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" { test -f "$ac_path_GREP" && $as_test_x "$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" { test -f "$ac_path_EGREP" && $as_test_x "$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" { test -f "$ac_path_FGREP" && $as_test_x "$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 "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; 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 "$with_gnu_ld" = yes; 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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) 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 "$lt_cv_path_NM" != "no"; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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 ;; 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"; 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 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"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } 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 "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 # which 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. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && 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 ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; 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 Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-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*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 ;; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 "$ac_status" -eq 0; 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 "$ac_status" -ne 0; 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 "x$lt_cv_ar_at_file" = xno; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$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 "$host_cpu" = ia64; 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 # 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/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 # and D for any global 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};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print 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 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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 "$pipe_works" = yes; 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 "$GCC" = yes; 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; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && 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 which ABI we are using. 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 which ABI we are using. 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 "$lt_cv_prog_gnu_ld" = yes; 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* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. 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*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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" ;; ppc*-*linux*|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 x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. 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*) LD="${LD-ld} -m elf64_sparc" ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 "x$lt_cv_path_mainfest_tool" != xyes; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; 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 -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; 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 "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; 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; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # 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 # 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 "X${COLLECT_NAMES+set}" != Xset; 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 for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # 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* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; 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" # 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 x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; 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 "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; 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' ;; 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 ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; 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' ;; 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) 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' ;; 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\ F* | *Sun*Fortran*) # 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\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; 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 which 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" # 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 x"$lt_cv_prog_compiler_pic_works" = xyes; 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 x"$lt_cv_prog_compiler_static_works" = xyes; 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 "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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_flag_spec_ld= 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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no 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' ;; 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 "x$supports_anon_versioning" = xyes; 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 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= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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 can not *** 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 "$ld_shlibs" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; 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,' if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 "${lt_cv_aix_libpath+set}" = 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 "${lt_cv_aix_libpath+set}" = 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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; 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 ;; freebsd1*) ld_shlibs=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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 x"$lt_cv_prog_compiler__b" = xyes; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes; 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 "$lt_cv_irix_exported_symbol" = yes; 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 ;; 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*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$ld_shlibs" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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 "$GCC" = yes; 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` 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" else 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 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 need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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%'\''`; test $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 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 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 ;; freebsd1*) dynamic_linker=no ;; 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[123]*) 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} $libname${shared_ext}' 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 ;; gnu*) version_type=linux 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 hardcode_into_libs=yes ;; haiku*) version_type=linux 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=yes 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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 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 "$lt_cv_prog_gnu_ld" = yes; then version_type=linux 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 ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux 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 # Append ld.so.conf contents 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 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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 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 "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux 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 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 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 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 "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $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 "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; 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 "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; 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 ;; *) 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 "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && 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 "$cross_compiling" = yes; 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 -fvisbility=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 "x$lt_cv_dlopen_self" = xyes; 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 "$cross_compiling" = yes; 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 -fvisbility=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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { $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 #include #include /* 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 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 if test x$GCC = xyes ; then CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" fi 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} 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 strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; 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_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $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 ac_fn_c_check_header_mongrel "$LINENO" "pgm.h" "ac_cv_header_pgm_h" "$ac_includes_default" if test "x$ac_cv_header_pgm_h" = xyes; then : netpbm="true" else netpbm="false" fi if test x$netpbm = xfalse ; then ac_fn_c_check_header_mongrel "$LINENO" "netpbm/pgm.h" "ac_cv_header_netpbm_pgm_h" "$ac_includes_default" if test "x$ac_cv_header_netpbm_pgm_h" = xyes; then : netpbm="true" $as_echo "#define NETPBM_INCLUDE 1" >>confdefs.h else netpbm="false" fi fi if test x$netpbm = xtrue ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pgm_init in -lnetpbm" >&5 $as_echo_n "checking for pgm_init in -lnetpbm... " >&6; } if ${ac_cv_lib_netpbm_pgm_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnetpbm -lm $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 pgm_init (); int main () { return pgm_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_netpbm_pgm_init=yes else ac_cv_lib_netpbm_pgm_init=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_netpbm_pgm_init" >&5 $as_echo "$ac_cv_lib_netpbm_pgm_init" >&6; } if test "x$ac_cv_lib_netpbm_pgm_init" = xyes; then : netpbm="true" else netpbm="false" fi fi if test x$netpbm = xfalse ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libnetpbm not found. Some programs will not be available." >&5 $as_echo "$as_me: WARNING: libnetpbm not found. Some programs will not be available." >&2;} fi if test x$netpbm = xtrue; then HAS_NETPBM_TRUE= HAS_NETPBM_FALSE='#' else HAS_NETPBM_TRUE='#' HAS_NETPBM_FALSE= fi # Check whether --enable-glibtest was given. if test "${enable_glibtest+set}" = set; then : enableval=$enable_glibtest; else enable_glibtest=yes fi pkg_config_args=glib-2.0 for module in . gthread gmodule do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; gio*) pkg_config_args="$pkg_config_args $module-2.0" ;; esac done if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$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 PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$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 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.16 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi min_glib_version=2.4.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5 $as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; } if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_glib=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 $as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; } has_glib2=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" has_glib2=no fi rm -f conf.glibtest if test x$has_glib2 = xyes; then glib_cflags=`$PKG_CONFIG glib-2.0 --cflags` glib_thread_cflags=`$PKG_CONFIG glib-2.0 --cflags gthread-2.0` glib_module_cflags=`$PKG_CONFIG glib-2.0 --cflags gmodule-2.0` glib_libs=`$PKG_CONFIG glib-2.0 --libs` glib_thread_libs=`$PKG_CONFIG glib-2.0 --libs gthread-2.0` glib_module_libs=`$PKG_CONFIG glib-2.0 --libs gmodule-2.0` GLIB_LIBS="$glib_libs" GLIB_DEPLIBS="$glib_libs" else if test x$with_glib = xyes ; then as_fn_error $? " *** Directory must be specified for --with-glib" "$LINENO" 5 fi if test x$with_glib = x ; then # Look for separately installed glib GLIB_REQUIRED_VERSION=1.2.8 # Check whether --with-glib-prefix was given. if test "${with_glib_prefix+set}" = set; then : withval=$with_glib_prefix; glib_config_prefix="$withval" else glib_config_prefix="" fi # Check whether --with-glib-exec-prefix was given. if test "${with_glib_exec_prefix+set}" = set; then : withval=$with_glib_exec_prefix; glib_config_exec_prefix="$withval" else glib_config_exec_prefix="" fi # Check whether --enable-glibtest was given. if test "${enable_glibtest+set}" = set; then : enableval=$enable_glibtest; else enable_glibtest=yes fi if test x$glib_config_exec_prefix != x ; then glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config fi fi if test x$glib_config_prefix != x ; then glib_config_args="$glib_config_args --prefix=$glib_config_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_prefix/bin/glib-config fi fi for module in . gmodule gthread do case "$module" in gmodule) glib_config_args="$glib_config_args gmodule" ;; gthread) glib_config_args="$glib_config_args gthread" ;; esac done # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; 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_GLIB_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GLIB_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GLIB_CONFIG="$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_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no" ;; esac fi GLIB_CONFIG=$ac_cv_path_GLIB_CONFIG if test -n "$GLIB_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_CONFIG" >&5 $as_echo "$GLIB_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi min_glib_version=$GLIB_REQUIRED_VERSION { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5 $as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; } no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes else GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If glib-config was correct, then it is best\n"); printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the glib-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); printf("*** correct copy of glib-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_glib=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; 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" >&5 $as_echo "no" >&6; } if test "$GLIB_CONFIG" = "no" ; then echo "*** The glib-config script installed by GLIB could not be found" echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GLIB_CONFIG environment variable to the" echo "*** full path to glib-config." else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB was incorrectly installed" echo "*** or that you have moved GLIB since it was installed. In the latter case, you" echo "*** may want to edit the glib-config script: $GLIB_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" as_fn_error $? " *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of GLIB *** is always available from ftp://ftp.gtk.org/." "$LINENO" 5 fi rm -f conf.glibtest glib_cflags=`$GLIB_CONFIG --cflags` glib_thread_cflags=`$GLIB_CONFIG --cflags gthread` glib_module_cflags=`$GLIB_CONFIG --cflags gmodule` glib_libs=`$GLIB_CONFIG --libs` glib_thread_libs=`$GLIB_CONFIG --libs gthread` glib_module_libs=`$GLIB_CONFIG --libs gmodule` GLIB_LIBS="$glib_libs" GLIB_DEPLIBS="$glib_libs" else # Use uninstalled glib (assume they got the version right) GLIB_CONFIG=$with_glib/glib-config if test -x $GLIB_CONFIG ; then : else as_fn_error $? "GLIB directory ($with_glib) not present or not configured" "$LINENO" 5 fi # For use in gts-config glib_cflags=`$GLIB_CONFIG --cflags` glib_thread_cflags=`$GLIB_CONFIG --cflags gthread` glib_module_cflags=`$GLIB_CONFIG --cflags gmodule` glib_libs=`$GLIB_CONFIG --libs` glib_thread_libs=`$GLIB_CONFIG --libs gthread` glib_module_libs=`$GLIB_CONFIG --libs gmodule` glib_release=`$GLIB_CONFIG --version | sed 's%\\.[0-9]*$%%'` # canonicalize relative paths case $with_glib in /*) glib_dir=$with_glib ;; *) glib_dir="\$(top_builddir)/$with_glib" ;; esac GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule" GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule.la" GLIB_DEPLIBS= fi fi CFLAGS="$CFLAGS $glib_cflags" LDFLAGS="$LDFLAGS $glib_libs" ac_config_commands="$ac_config_commands default-1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { "{ #warning test }" ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define CPP_HAS_WARNING 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"C preprocessor does not support warning directive.\"" >&5 $as_echo "$as_me: WARNING: \"C preprocessor does not support warning directive.\"" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext for ac_header in fpu_control.h do : ac_fn_c_check_header_mongrel "$LINENO" "fpu_control.h" "ac_cv_header_fpu_control_h" "$ac_includes_default" if test "x$ac_cv_header_fpu_control_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FPU_CONTROL_H 1 _ACEOF $as_echo "#define HAVE_FPU_CONTROL_H 1" >>confdefs.h fi done for ac_header in floatingpoint.h do : ac_fn_c_check_header_mongrel "$LINENO" "floatingpoint.h" "ac_cv_header_floatingpoint_h" "$ac_includes_default" if test "x$ac_cv_header_floatingpoint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FLOATINGPOINT_H 1 _ACEOF $as_echo "#define HAVE_FLOATINGPOINT_H 1" >>confdefs.h fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF $as_echo "#define HAVE_UNISTD_H 1" >>confdefs.h fi done 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 $as_echo "#define HAVE_GETOPT_H 1" >>confdefs.h 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 ac_config_files="$ac_config_files Makefile gts.pc src/Makefile src/gts-config tools/Makefile doc/Makefile doc/manpages/Makefile examples/Makefile test/Makefile test/boolean/Makefile test/delaunay/Makefile test/coarsen/Makefile debian/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 -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 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" 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 "${HAS_NETPBM_TRUE}" && test -z "${HAS_NETPBM_FALSE}"; then as_fn_error $? "conditional \"HAS_NETPBM\" 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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 $as_me, which was generated by GNU Autoconf 2.68. 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="\\ config.status configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 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"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $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_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"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $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_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $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"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $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 \ 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_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ 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_flag_spec_ld \ 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\\"\\\`\\\\\\"" ;; *) 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 \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which 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' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' gts_defines=" #define GTS_MAJOR_VERSION $GTS_MAJOR_VERSION #define GTS_MINOR_VERSION $GTS_MINOR_VERSION #define GTS_MICRO_VERSION $GTS_MICRO_VERSION" build="$build" _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" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "gts.pc") CONFIG_FILES="$CONFIG_FILES gts.pc" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/gts-config") CONFIG_FILES="$CONFIG_FILES src/gts-config" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/manpages/Makefile") CONFIG_FILES="$CONFIG_FILES doc/manpages/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/boolean/Makefile") CONFIG_FILES="$CONFIG_FILES test/boolean/Makefile" ;; "test/delaunay/Makefile") CONFIG_FILES="$CONFIG_FILES test/delaunay/Makefile" ;; "test/coarsen/Makefile") CONFIG_FILES="$CONFIG_FILES test/coarsen/Makefile" ;; "debian/Makefile") CONFIG_FILES="$CONFIG_FILES debian/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 which 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 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### 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 # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # 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 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 # 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 in which our libraries should be installed. lt_sysroot=$lt_sysroot # 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 # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # 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 # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # 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 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 "X${COLLECT_NAMES+set}" != Xset; 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) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "default-1":C) echo creating src/gtsconfig.h cat >src/gtsconfig.h <<\__EOF /* gtsconfig.h * * This is a generated file. Please modify `configure.ac' */ #ifndef GTSCONFIG_H #define GTSCONFIG_H __EOF case "$build" in *-cray-unicos*) echo "/* CRAY inlining directives */" >> src/gtsconfig.h awk ' BEGIN { nc = 10; nf = 0; } { if ( == "G_INLINE_FUNC") { nc = 0; start = 2; } else start = 1; for (i = start; i <= NF; i++) { if (nc == 1) { if (substr ($i, 1, 1) != "*") { in_list = 0; for (j = 0; j < nf && !inlist; j++) if ($i == f[j]) inlist = 1; if (!inlist) f[nf++] = $i; nc = 10; } } else nc++; } } END { if (nf > 0) { printf ("#pragma _CRI inline %s", f[0]); for (i = 1; i < nf; i++) printf (", %s", f[i]); printf ("\n"); } } ' < src/gts.h >> src/gtsconfig.h ;; esac cat >>src/gtsconfig.h <<__EOF $gts_defines #endif /* GTSCONFIG_H */ __EOF ;; 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 gts-snapshot-121130/depcomp0000755000175100017510000004426712055775445012570 00000000000000#! /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, 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 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: gts-snapshot-121130/test/0000755000175100017510000000000012055775530012230 500000000000000gts-snapshot-121130/test/delaunay/0000755000175100017510000000000012055775530014032 500000000000000gts-snapshot-121130/test/delaunay/random_speed.sh0000644000175100017510000000243112055775440016746 00000000000000#! /bin/bash rm -f random_speed if ./random 1000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "1000 $speed" >> random_speed if ./random 2000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "2000 $speed" >> random_speed if ./random 4000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "4000 $speed" >> random_speed if ./random 8000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "8000 $speed" >> random_speed if ./random 16000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "16000 $speed" >> random_speed if ./random 32000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "32000 $speed" >> random_speed if ./random 64000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "64000 $speed" >> random_speed if ./random 128000 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "128000 $speed" >> random_speed exit 0 gts-snapshot-121130/test/delaunay/too_close.sh0000644000175100017510000000014212055775440016271 00000000000000#! /bin/bash if ../../examples/delaunay -o < too_close.gts > /dev/null; then exit 0 fi exit 1 gts-snapshot-121130/test/delaunay/cartesian.sh0000644000175100017510000000013212055775440016253 00000000000000#! /bin/bash if ./cartesian 10 10 0.1 2> /dev/null > /dev/null; then exit 1 fi exit 0 gts-snapshot-121130/test/delaunay/cartesian_speed.sh0000644000175100017510000000156512055775440017446 00000000000000#! /bin/bash rm -f cartesian_speed if ./cartesian 32 32 0.1 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "1024 $speed" >> cartesian_speed if ./cartesian 45 45 0.1 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "2025 $speed" >> cartesian_speed if ./cartesian 64 64 0.1 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "4096 $speed" >> cartesian_speed if ./cartesian 90 90 0.1 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "8100 $speed" >> cartesian_speed if ./cartesian 128 128 0.1 > /dev/null 2> /tmp/speed; then exit 1 fi speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed` echo "16384 $speed" >> cartesian_speed exit 0 gts-snapshot-121130/test/delaunay/random.c0000644000175100017510000000516712055775440015407 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" int main (int argc, char * argv[]) { guint i, n; GtsSurface * surface; GSList * l, * vertices = NULL; GtsTriangle * t; GtsVertex * v1, * v2, * v3; GTimer * timer; if (argc != 2) { fprintf (stderr, "usage: random n\n"); return 0; } n = atoi (argv[1]); timer = g_timer_new (); g_timer_start (timer); for (i = 0; i < n; i++) vertices = g_slist_prepend (vertices, gts_vertex_new (gts_vertex_class (), rand (), rand (), 0.)); t = gts_triangle_enclosing (gts_triangle_class (), vertices, 100.); gts_triangle_vertices (t, &v1, &v2, &v3); surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_add_face (surface, gts_face_new (gts_face_class (), t->e1, t->e2, t->e3)); g_timer_stop (timer); fprintf (stderr, "Input: %g s\n", g_timer_elapsed (timer, NULL)); g_timer_reset (timer); g_timer_start (timer); l = vertices; while (l) { gts_delaunay_add_vertex (surface, l->data, NULL); l = l->next; } gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (v1)); gts_object_destroy (GTS_OBJECT (v2)); gts_object_destroy (GTS_OBJECT (v3)); gts_allow_floating_vertices = FALSE; g_timer_stop (timer); fprintf (stderr, "Triangulation: %g s speed: %.0f vertex/s\n", g_timer_elapsed (timer, NULL), g_slist_length (vertices)/g_timer_elapsed (timer, NULL)); g_timer_reset (timer); g_timer_start (timer); gts_surface_write (surface, stdout); g_timer_stop (timer); fprintf (stderr, "Output: %g s\n", g_timer_elapsed (timer, NULL)); if (gts_delaunay_check (surface)) { fprintf (stderr, "WARNING: surface is not Delaunay\n"); return 0; } return 1; } gts-snapshot-121130/test/delaunay/two_segments.gts0000644000175100017510000000007112055775440017205 000000000000006 2 0 -1 0 0 0.5 0 0 -0.5 0 0 1 0 0 0 1 0 0 -1 0 1 2 3 4 gts-snapshot-121130/test/delaunay/Makefile.in0000644000175100017510000004355312055775446016037 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ check_PROGRAMS = cartesian$(EXEEXT) random$(EXEEXT) subdir = test/delaunay DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = cartesian_SOURCES = cartesian.c cartesian_OBJECTS = cartesian.$(OBJEXT) cartesian_LDADD = $(LDADD) cartesian_DEPENDENCIES = $(top_builddir)/src/libgts.la random_SOURCES = random.c random_OBJECTS = random.$(OBJEXT) random_LDADD = $(LDADD) random_DEPENDENCIES = $(top_builddir)/src/libgts.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --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 = cartesian.c random.c DIST_SOURCES = cartesian.c random.c ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) \ -DG_LOG_DOMAIN=\"Gts-test\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la TESTS = cartesian.sh two_segments.sh too_close.sh EXTRA_DIST = \ cartesian.sh \ cartesian_speed.sh \ random_speed.sh \ two_segments.gts two_segments.sh \ too_close.gts too_close.sh all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 test/delaunay/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/delaunay/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_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 cartesian$(EXEEXT): $(cartesian_OBJECTS) $(cartesian_DEPENDENCIES) @rm -f cartesian$(EXEEXT) $(LINK) $(cartesian_OBJECTS) $(cartesian_LDADD) $(LIBS) random$(EXEEXT): $(random_OBJECTS) $(random_DEPENDENCIES) @rm -f random$(EXEEXT) $(LINK) $(random_OBJECTS) $(random_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cartesian.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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) set x; \ 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; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi 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 "$(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 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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) -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-checkPROGRAMS 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-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: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS 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-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: gts-snapshot-121130/test/delaunay/cartesian.c0000644000175100017510000000566312055775440016101 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" int main (int argc, char * argv[]) { guint i, j, nx, ny; gdouble cosa, sina; GtsSurface * surface; GSList * l, * vertices = NULL; GtsTriangle * t; GtsVertex * v1, * v2, * v3; GTimer * timer; if (argc != 4) { fprintf (stderr, "usage: cartesian nx ny angle\n"); return 0; } nx = atoi (argv[1]); ny = atoi (argv[2]); cosa = cos (atof (argv[3])); sina = sin (atof (argv[3])); timer = g_timer_new (); g_timer_start (timer); for (i = 0; i < nx; i++) { gdouble x = (gdouble) i/(gdouble) (nx - 1); for (j = 0; j < ny; j++) { gdouble y = (gdouble) j/(gdouble) (nx - 1); vertices = g_slist_prepend (vertices, gts_vertex_new (gts_vertex_class (), cosa*x - sina*y, sina*x + cosa*y, 0.)); } } t = gts_triangle_enclosing (gts_triangle_class (), vertices, 100.); gts_triangle_vertices (t, &v1, &v2, &v3); surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_add_face (surface, gts_face_new (gts_face_class (), t->e1, t->e2, t->e3)); g_timer_stop (timer); fprintf (stderr, "Input: %g s\n", g_timer_elapsed (timer, NULL)); g_timer_reset (timer); g_timer_start (timer); l = vertices; while (l) { g_assert (gts_delaunay_add_vertex (surface, l->data, NULL) == NULL); l = l->next; } gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (v1)); gts_object_destroy (GTS_OBJECT (v2)); gts_object_destroy (GTS_OBJECT (v3)); gts_allow_floating_vertices = FALSE; g_timer_stop (timer); fprintf (stderr, "Triangulation: %g s speed: %.0f vertex/s\n", g_timer_elapsed (timer, NULL), g_slist_length (vertices)/g_timer_elapsed (timer, NULL)); g_timer_reset (timer); g_timer_start (timer); gts_surface_write (surface, stdout); g_timer_stop (timer); fprintf (stderr, "Output: %g s\n", g_timer_elapsed (timer, NULL)); if (gts_delaunay_check (surface)) { fprintf (stderr, "WARNING: surface is not Delaunay\n"); return 0; } return 1; } gts-snapshot-121130/test/delaunay/two_segments.sh0000644000175100017510000000014212055775440017021 00000000000000#! /bin/bash if ../../examples/delaunay < two_segments.gts > /dev/null; then exit 0 fi exit 1 gts-snapshot-121130/test/delaunay/too_close.gts0000644000175100017510000000010012055775440016446 000000000000006 2 0 -1 0 0 0.5 0 0 -0.5 -0.15 0 1 -0.5 0 0 1 0 0 -1 0 1 2 3 4 gts-snapshot-121130/test/delaunay/Makefile.am0000644000175100017510000000071012055775440016004 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) \ -DG_LOG_DOMAIN=\"Gts-test\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la check_PROGRAMS = cartesian random TESTS = cartesian.sh two_segments.sh too_close.sh EXTRA_DIST = \ cartesian.sh \ cartesian_speed.sh \ random_speed.sh \ two_segments.gts two_segments.sh \ too_close.gts too_close.sh gts-snapshot-121130/test/boolean/0000755000175100017510000000000012055775530013647 500000000000000gts-snapshot-121130/test/boolean/surfaces/0000755000175100017510000000000012055775440015462 500000000000000gts-snapshot-121130/test/boolean/surfaces/t310000644000175100017510000000013712055775440015735 000000000000004 5 2 -1 0 0 A 1 0 0 B 0 1 0 C 0 -1 0 D 1 2 AB 2 3 BC 3 1 CA 1 4 AD 4 2 DB 1 2 3 ABC 4 5 1 ADB gts-snapshot-121130/test/boolean/surfaces/a8.gts0000644000175100017510000000016312055775440016431 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 2 0 0 0 0 2 0 2 0 0 0 0 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/horse6.gts0000644000175100017510000017205412055775440017340 00000000000000669 2001 1334 GtsSurface GtsFace GtsEdge GtsVertex 0.02962649335 -0.06641720658 -0.05375212223 0.03335170537 -0.06107709776 -0.04461499438 0.03016465976 -0.06494629927 -0.05644835678 -0.007085127866 0.03564635767 -0.07638334676 -0.009173034367 0.04266160542 -0.07630177668 -0.008100441376 0.03778387049 -0.07154616339 0.02535142102 0.038331004 -0.004951347501 0.02637504126 0.03427224666 -0.01436069547 0.02254067071 0.04149480505 -0.002956423267 -0.004536771511 -0.09171935376 -0.0596337959 -0.005587896129 -0.08426498952 -0.05186155545 -0.007297024687 -0.08558963229 -0.05685900539 -0.005805645546 -0.003626100812 -0.009630271776 -0.009675965322 -0.007598849321 -0.004054405596 -0.007811588953 0.003877114822 -0.001241527921 0.03040737694 -0.03015238108 -0.003727831953 0.03832709098 -0.03802134781 -0.0008496010631 0.03405714066 -0.03939595292 -0.006695002592 -0.001406711205 0.002753603588 0.02238336614 -1.129644064e-05 0.009627589021 0.02569459522 -0.005354685152 0.007333403608 0.01769795984 -0.01189837632 0.06800247822 0.03881281895 -0.01700467748 0.06435674695 0.04119157374 -0.008099068313 0.06391979197 0.04115649045 -0.009376257181 0.08251457779 0.04163053179 -0.01218401615 0.07373390327 0.03844031124 -0.01647273404 0.08032602946 0.03979616203 0.002309943555 0.03222442803 -0.06183483548 -0.0002231259948 0.02975147719 -0.06316127468 0.0002298124264 0.03008275703 -0.05263038667 0.03716994439 -0.03005093787 0.01924021205 0.03980719373 -0.03592123776 0.02018312064 0.03498726073 -0.02617335596 0.02506663539 0.03209841854 0.04093247244 0.006165539005 0.03228020953 0.03663471983 0.001771070218 0.02942845422 0.03815241274 -0.003043695099 -0.008924081005 -0.06483299 -0.01934224052 -0.006699201995 -0.05844444203 -0.01313774953 -0.008881936659 -0.06046185748 -0.007184726425 0.00799191833 0.02685028608 -0.01690064788 0.005842128849 0.03256739097 -0.01503583978 0.004528814147 0.02623025041 -0.01780551176 0.0368034213 -0.05478233823 -0.02365851981 0.03445571373 -0.05147346958 -0.02485289334 0.03928833575 -0.05042546035 -0.01658308968 0.02830806584 -0.06727415617 -0.07485495062 0.03863759719 -0.05898967523 -0.07447284379 0.02767455511 -0.06096744022 -0.07505969831 -0.009088088463 -0.06659303614 -0.002537607506 -0.00671535347 -0.06804113113 0.01295355231 -0.01058614586 -0.06438457337 0.009244616703 0.007768569793 0.02140696444 0.03914973109 0.004684134042 0.02528802916 0.03737829518 0.0009014128763 0.02189278717 0.03311258235 0.003506668826 0.006572697301 -0.01632559698 0.006787592086 0.01432461261 -0.01761928153 0.003804577565 0.01605629848 -0.0138074565 -0.009082795257 0.04093537448 0.007619646928 -0.009230928649 0.03646217029 -3.99780785e-05 -0.004554704059 0.04261891496 -0.0020273806 0.002781248518 0.03142260764 0.03540721119 -0.002920902919 0.02952287296 0.03115692761 0.001369020202 0.03568831948 0.03226640654 -0.009840414345 -0.06724964738 -0.01545216991 -0.005449690441 -0.07289533929 -0.0278541801 0.03471431876 -0.04206998787 -0.009058191316 0.02996229802 0.04317899348 0.01885127101 0.0313589558 0.03945887273 0.02116821636 0.03346637719 0.03911113342 0.01113532869 -0.002148931364 0.04686111893 -0.07646155409 0.002563878615 0.04219996445 -0.0759461022 -0.001456943849 0.0391326167 -0.0653246089 0.004422508056 0.0444206985 0.06024319101 -0.0001381988126 0.05077434362 0.06274313157 -0.002803981347 0.04978285588 0.05599314099 0.007372340201 0.04348168683 0.0009767514566 0.01779622969 0.04555267492 0.002715749059 0.01246962678 0.04730214654 0.01228101422 -0.01914840392 0.06984274566 0.07583277918 -0.02066652781 0.06615912544 0.0740179218 -0.015580526 0.07237406407 0.07110934033 0.01673604574 0.05296128209 0.02799217386 0.007076024978 0.0616052387 0.03798058455 0.01208255361 0.05201400555 0.02247903428 -0.005202484873 0.03905212201 -0.06659100095 -0.002761358513 0.03563921568 -0.053334567 0.02871432373 0.01115935953 0.02218121229 0.02887055394 0.02348015699 0.02777713473 0.03211056812 0.01217783457 0.01599352678 -0.003268191417 0.02808095794 -0.05530371466 -0.004768429904 0.03301240741 -0.05682792023 -0.005269832081 0.03041980394 -0.05020398004 -0.009920703037 -0.05856132105 0.02078853133 -0.01258111517 -0.06036211575 0.005621857649 -0.01129505789 -0.05117947714 0.02014639057 0.008947017658 -0.05390034587 -0.005404032848 -0.002812812154 -0.0495940622 -0.005055962984 0.004182746428 -0.05616860907 -0.008282149861 0.039901086 -0.04474400169 -0.002162081859 -0.02857300968 0.07398478501 0.05112898863 -0.03221046355 0.08044632361 0.05103597276 -0.037368047 0.08124797562 0.04326686079 -0.01176246326 0.0272912813 0.00181310195 -0.008852027889 0.02332058261 0.01714778567 -0.01111655274 0.03096097789 0.005495534657 -0.004930090474 -0.06275948489 0.0254747509 0.001386656671 -0.06516825208 0.02915183071 0.0008411995687 -0.0572979729 0.03314940991 0.02910555332 0.02795474709 -0.02108275448 0.02937411784 0.02528148559 -0.02472762018 0.02898726479 0.02593885071 -0.03466121606 0.0200483424 0.0173672083 -0.01887227514 0.01529007503 0.005999184686 -0.01844084832 0.01855153173 0.02510600723 -0.01789194963 0.0308594713 0.01771928484 -0.04856782514 0.03406450107 0.01411485799 -0.06575122704 0.03053075934 0.01669582781 -0.06497414728 -0.005642941021 -0.07825186394 -0.07223775214 -0.004601143901 -0.08184543482 -0.06469302326 -0.008158713906 -0.0814358753 -0.07113496806 0.02693919448 0.01503905874 -0.06642508428 0.03082825422 0.02288239522 -0.0747792263 0.0348485623 0.02539411196 -0.006000407659 0.03518946641 0.03211052072 -0.001971335973 0.03294316716 0.02428600962 -0.01060207306 -0.006910022961 0.04279437698 -0.07134216778 -0.01391429131 0.07857736702 0.07025533526 -0.0233492817 0.07295943983 0.06392457642 -0.0230027126 0.0796825737 0.06135732864 -0.01177939922 0.03170550973 -0.002756488467 0.03474764188 -0.06888999765 0.01430858835 0.03034743528 -0.07102275673 0.01163587617 0.03302717636 -0.06941638174 0.01982813821 0.003720294257 -0.04180070946 -0.002430702563 0.002336538457 -0.03664092815 -0.003564054212 -0.004447423494 -0.0385896076 0.0002912090823 0.02906004092 -0.06506824105 -0.06619611312 0.03012660078 -0.07243252037 -0.06048750405 0.02809075927 -0.06822093777 -0.06005173396 -0.005650163315 -0.07257297394 -0.02353907927 -0.002313980992 -0.07504178891 -0.02257502067 -0.003961829708 -0.07871912192 -0.0281974942 -0.01365214824 0.06472117553 0.06687649643 -0.01395702307 0.06493398409 0.06194418608 -0.00187287415 0.07648865146 0.06195552134 -0.0007703703722 0.07452971487 0.05641658826 0.003987788381 0.07210753421 0.05870572975 0.02893785989 0.04571963901 0.01298997539 0.0008615523349 0.04513056926 0.002195005773 -0.004915778348 0.04488374695 0.006995527292 -0.006193621728 0.02897202509 -0.02199593164 -0.009088929065 0.03245039722 -0.0143562763 -0.009339019758 0.02820489794 -0.01160492972 0.03388204993 0.008238938556 -0.05888287115 0.02993114876 0.006121244768 -0.0598082949 0.02916878069 0.01231213994 -0.04517423152 -0.01140240561 -0.05302208175 0.01325014492 -0.009991483685 -0.04221314323 0.02285702339 0.02204879529 -0.05208759604 0.03657286724 0.0105735708 -0.05438089912 0.03600333683 0.01337854774 -0.04478313393 0.03739231078 0.03358851548 -0.06056440171 -0.02261954573 0.03287484171 -0.06627423351 -0.02506244305 0.03555796707 -0.06295597011 -0.03148568706 0.03055716745 -0.06752781609 0.003518700777 0.02491404154 -0.06004574476 -0.005079100384 0.02542506722 -0.07004344366 0.0106184576 0.04007380336 -0.06016162866 0.008857087601 0.04217730909 -0.05544734142 0.01150120914 0.04030558614 -0.06054344024 0.01674311978 0.03420842037 0.01383426301 -0.06039505323 -0.002383355077 0.0584033014 0.03885017414 -0.002963422497 0.0646026035 0.03914591659 -0.005144885091 0.06159091928 0.04104902099 -0.01401768875 0.0617341441 0.04790375928 -0.02247065548 0.06647536163 0.04844900731 0.004567399436 0.06995600928 0.06469268297 -0.004930396719 0.07716889533 0.06743878225 -0.01263710116 0.07311801984 0.0711518866 -0.006347549286 0.07076257562 0.07207679617 -0.008025276612 0.07797936939 0.07007158927 -0.004037263641 0.03791370322 -0.007084879162 -0.006915446453 0.03611493678 -0.01205017226 0.03376825917 -0.06800502046 -0.03993364734 0.03550532273 -0.06289301581 -0.04451673049 -0.01978470067 0.07459022271 0.03922459204 -0.02369599598 0.07095749149 0.04108053623 0.007834297039 -0.03802775544 0.03648600479 0.00451013359 -0.04726475826 0.03617031616 -0.01008563318 0.03062096097 0.01720925685 -0.0111047131 0.03471950873 0.009170491974 -0.007801881425 0.03558098282 0.02156101572 0.03628493799 -0.06643627725 -0.06571495304 0.03778768281 -0.06680935939 -0.07045711349 -0.009800128788 -0.01979102603 -0.003830649372 -0.008123705052 -0.01295940229 -0.008012197061 -0.01177248002 -0.01407353483 -0.00026892976 3.650324692e-05 0.03454312443 -0.05378598861 0.001334051395 0.03635208526 -0.05916496664 -0.004494396457 0.02123036702 -0.01233363819 -0.003960910338 0.02707843897 -0.02147364593 -0.004658707892 0.02285045891 -0.01654024562 0.01065297341 -0.02927999043 -0.01261695593 0.02197334405 -0.01938320126 -0.01518498761 0.01009674155 -0.02000123198 -0.01669226004 -0.03784903899 0.09182293002 0.03547962608 -0.04282505732 0.08763019624 0.03843958666 -0.03780228863 0.09165533886 0.04150263512 0.009732643234 0.03864677157 0.05758488409 0.007260307242 0.03220331045 0.04897934166 -0.003251023438 -0.0447552923 0.03259379591 -0.005284672865 -0.05559800646 0.02863956947 0.03854807205 -0.0182611157 -0.0007614023309 0.02907343063 -0.02405004051 -0.008689663897 0.03359433352 -0.06833625846 -0.06725069897 0.03794723301 -0.07030887579 -0.05881938525 -0.01399840703 0.08714074202 0.04634697262 -0.01484911168 0.08706952227 0.05273427957 -0.02733040503 0.0878704236 0.04692254306 0.03269788383 0.02775015327 -0.01366796978 -0.01128429909 -0.02485031801 0.003081221163 -0.0129859567 -0.01591968388 0.007913952437 0.02542780431 0.01909055879 0.03106341807 -0.02635914018 0.07915309019 0.03807716572 -0.02491705167 0.08466753188 0.03876460009 -0.03217161864 0.09147933287 0.03789558468 -0.03218712753 0.08911622586 0.0341413841 0.02063172974 -0.06160672797 0.03358912586 0.009489627049 -0.06099083018 0.03356238062 0.01595837083 -0.06792313981 0.02903236206 -0.02758969493 0.07128663335 0.04509322135 2.838504548e-05 0.01228287617 -0.007247194823 -0.002237714427 0.01601225063 -0.005054624448 -0.004998376443 0.01270034048 0.001089531139 -0.0242325673 0.08642920773 0.05259896161 -0.01477728238 0.08898762418 0.05976252503 -0.008106716999 0.03959898948 0.01814619648 -0.00183701391 0.04442405283 0.01992884363 -0.002643194393 0.04094815494 0.02455225652 -0.0002691989922 0.03518768253 -0.07654061203 -0.005465735125 0.03343264514 -0.07113263805 -0.003379478842 0.05727409694 0.04624414223 0.001656723856 0.04848782548 0.02429126544 0.001611458581 -0.08067259011 -0.07140745427 0.001953108693 -0.0870777528 -0.07110689566 -0.001232488378 -0.08210912741 -0.06524027641 0.01999275189 0.04838758748 0.01771313046 0.02238698184 0.04734407942 0.02228583168 0.001165015411 0.02523473928 -0.03957528094 0.003859985386 0.030503596 -0.03796539631 3.053135066e-06 0.02298255619 -0.02714101308 0.00371580233 0.02819407126 -0.02732040999 0.001684703402 0.02229032018 -0.01852954358 0.02477637757 0.004354718713 0.02561298272 0.02748297406 -0.01004226619 0.02769893061 0.02149635857 0.003501056099 0.02754019633 -0.005333140649 0.06906533641 0.04005591241 0.002235786241 0.0684583935 0.04597748357 0.002775716032 0.06317505905 0.03893341964 0.0160501704 0.003030806358 0.02936801766 0.01854084239 -0.002603163604 0.02863700407 -0.01957786973 0.06858231372 0.0648466221 -0.02022875158 0.06525639334 0.06904066694 -0.007202391548 0.02872365639 -0.04064738284 -0.005084087819 0.03298719044 -0.0393757119 -0.004811703586 0.03067656454 -0.02964777687 0.01694610211 -0.03267611406 -0.009547622002 0.02611754153 -0.03173703844 -0.006920989989 0.02614493406 -0.03555648278 -0.007780372509 0.03633285438 -0.05791195421 0.02922635121 0.02934076775 -0.06684164846 0.02767621927 0.02893575 -0.0584011768 0.03346739941 -0.004604250904 0.05293397731 0.05217938164 -0.01083062954 0.06358070346 0.05593217573 -0.03564270472 0.08936314535 0.0394096548 0.0395461749 -0.02033376398 0.01689739857 0.03741999645 -0.01167648657 0.01925222409 0.0393980472 -0.009840464917 0.01233370548 0.02169564295 0.02095299525 -0.02990126581 0.02237646084 0.0252829334 -0.02853123328 -0.01044045315 -0.01220798807 0.01559637819 -0.009958264691 -0.003240776769 0.01322719602 0.02874224069 -0.06043928335 -0.01464576601 0.02885606501 -0.06561053536 -0.02705401515 0.001232619025 -0.07343124511 -0.0137606811 0.003231243289 -0.07112104785 -0.01418805167 0.004232990494 -0.06975664315 -0.009904810305 -0.00486873724 0.03368474405 -0.02253258244 0.02054443199 0.02928264463 -0.0166495365 0.01178095237 0.02162485764 -0.01766781495 0.002149090871 0.01640352192 -0.009391249327 0.004332741479 0.05150400472 0.02030183153 0.0004055637994 0.06048918322 0.03581186398 0.02632023335 0.01369241067 -0.05461711851 0.02617082923 0.01742829908 -0.04948899405 0.02514402885 0.01494986558 -0.04392418522 0.02790811512 0.009448615656 -0.05445451174 0.03599465039 0.01623447891 -0.06930745811 0.001928368353 -0.08385545643 -0.05860391459 0.0007248613389 -0.0855319873 -0.06623703604 -0.004903729313 -0.08437217664 -0.03488469304 -0.00747775439 -0.07956851802 -0.03375280404 -0.002370371413 -0.08901025047 -0.04957606007 -0.001854499151 0.03630830475 -0.01720664645 -0.003023223782 0.03689876005 -0.01428045114 0.03484461278 -0.07041376736 -0.05216786003 0.03431450721 -0.07333197893 -0.06052955731 -0.003436630754 0.02305290178 -0.02816454175 -0.004643444165 0.02572492431 -0.03396760095 -0.03953644856 0.0878015 0.03347939611 -0.03490372235 0.08345415302 0.0319104425 0.02708001608 0.01518640862 -0.02805826278 0.02296206176 0.01671309902 -0.02826889086 0.02351755587 0.01405402613 -0.03579356187 0.03670792269 -0.05755250953 -0.02221128778 0.03364189406 0.00667071772 0.01264755433 0.03728356288 -0.002519490705 0.006673115045 0.004803071068 -0.05657736202 -0.00624039143 -0.002201104622 -0.06138291913 -0.01336018198 -0.0001397320446 -0.06436613319 -0.01783643742 -0.008292380674 -0.05433978831 -0.006033333384 -0.01127767867 -0.06361510143 -0.003449801907 0.02775605679 0.044457884 0.003041643892 -0.007670255173 -0.06821987553 -0.007885953674 -0.008066661468 -0.07056682418 -0.01423482642 0.01574729827 -0.0438970843 -0.00236719304 0.02710872598 -0.04428706106 -0.003945715263 0.01764931377 -0.04035018275 -0.00280366738 -0.005546692799 0.01526842926 0.002527295982 -0.007410334392 0.01930575954 -0.006408775776 -0.02836972014 0.07546960952 0.05724751004 0.002048361976 0.0384456956 0.04646301628 0.002260233483 -0.01489908193 -0.01624085139 0.004642121386 -0.001390260362 -0.01845204011 -0.002087084639 -0.007981395122 -0.01432260928 2.486208878e-06 -0.07848470699 -0.03904760635 0.002249396081 -0.07553035366 -0.03267282679 -0.0002004852621 -0.06977706592 -0.02571841209 0.01209028559 0.04935565948 0.06303955069 0.01351351406 0.03795583589 0.0557550827 0.01484957073 0.04125258376 0.05596637533 -0.009205072944 0.08364869889 0.06652972477 -0.005528705413 0.08038648212 0.06084279874 -0.007373362028 0.08594032103 0.07094837851 0.02912743072 -0.0432888465 -0.00950359489 -0.002391239919 -0.07540734893 -0.01631687422 0.0009200957863 -0.07252032514 -0.008175284989 0.02276330509 0.02125389017 -0.03878583309 0.02463089872 0.02432008656 -0.03652127371 0.0363259308 -0.04348679263 0.03222553575 0.03062908426 -0.04694012281 0.03575588741 0.02980493714 -0.03487685828 0.03569007639 -0.005904921947 -0.08527671917 -0.06466071736 0.02842053044 -0.04709943398 -0.01318200474 0.02539830185 -0.05124026618 -0.004420045871 -0.004278999891 -0.07096265984 -0.02827767819 -0.003951698007 -0.08089973237 -0.04879939623 0.007695496251 0.0477421018 0.06466960439 0.02063477557 0.04182151577 -0.007423344504 -0.0003806743401 0.0336985005 -0.06598962272 0.003118413566 -0.07216026131 -0.02278780341 0.003800820262 -0.06906615479 -0.01870720802 0.01491891397 0.02108046035 0.04064579087 0.01137802593 0.0194166479 0.03957014773 0.003427658456 0.04801976596 0.01399046933 0.02257575744 -0.03562010631 0.03710042754 0.001898213149 -0.06241057522 -0.003908033091 -0.002121382733 -0.05986972801 -0.004787799809 0.003614300956 -0.05867827093 -0.003724138884 0.03768463927 -0.06636351823 -0.0582302456 0.03632467085 -0.06500388715 -0.05143360138 -0.007802955599 0.0622621514 0.04773787304 0.031366571 0.01638469475 -0.0424139127 0.0281591643 0.01329487936 -0.03581532057 0.01511922717 -0.07131458197 0.01896426176 0.02633927088 -0.07175808354 0.01595602098 0.0252868685 0.0205595257 -0.0756060991 0.03432955517 0.02061503566 -0.07509283024 0.01114566337 0.002452825351 -0.0189631103 4.216264003e-05 -0.06239066165 -0.01755679235 0.02662037451 0.0128331273 -0.04325455763 -0.003745565394 -0.0839623205 -0.03135169903 -0.004615265916 -0.08135572054 -0.02321813181 -0.01045466918 -0.000838781802 0.007235843675 -0.006808135417 0.0102528793 0.01012071438 0.0385279125 -0.03472752123 0.02776378146 0.03624357937 -0.04656652041 -0.01755100238 0.002176875164 -0.07981589911 -0.01992365433 0.0175459281 0.0562577589 0.04012783456 0.02402770205 0.04461141168 0.0268166256 -0.02085549003 0.06711975757 0.06119068085 -0.02688164037 0.07019660655 0.06127785015 -0.0252392767 0.06717077689 0.05758382128 -0.003648821003 0.05421163955 0.04604919067 -0.006432823538 0.06141563121 0.0504325137 0.03409188565 0.01012708684 -0.07298428284 0.02693404587 0.01067397942 -0.07605959684 0.03582166209 0.01517849893 -0.07519236184 0.01775157172 -0.008968039062 -0.01788617078 -0.0066383874 0.02789687002 0.02529792784 0.02451892911 0.003543890639 -0.01258118312 0.02860889576 -0.007942587906 -0.01241862023 0.03284842343 -0.00573572018 -0.008116617695 -0.00420701637 0.01318169426 0.02035685162 -0.007252350565 0.01814837516 0.01917593968 -0.005276644166 0.02217310274 0.02483524933 0.03715347579 -0.05644422613 -0.009048044381 0.03160833761 -0.06026948452 -0.00843476285 0.03714697573 -0.06008602984 -0.005950557306 0.03244783772 -0.07142891455 -0.05349790195 0.03144701921 -0.06693341806 -0.03620119947 6.607648773e-05 0.04139450911 -0.007297118402 -0.009581380469 0.03444434173 -0.005699179837 -0.01016924937 0.0247760859 -0.009559116582 0.03708496031 -0.003474162443 0.001054708953 0.03061900876 0.0133467021 0.002002309256 0.03203009993 0.0122719363 0.007437237639 -0.007119833689 0.08387059694 0.05079214763 0.007365237926 -0.06724293325 0.02937228994 0.003196416636 -0.07114902211 0.02474457173 0.03088904705 -0.05786669635 -0.03540575433 0.03349195092 -0.05630633846 -0.03348465438 -0.00445985922 0.03497845392 -0.06865973203 0.02606826381 0.01511735257 -0.0188088438 0.02840159955 -0.04003688586 -0.005090979071 0.02333618187 0.009711474743 -0.01259493025 0.02634804637 0.01449175906 -0.005437967049 -0.003819231087 -0.03366319073 0.03017149794 -0.007746377079 -0.0374026414 0.02691084367 0.0008968501693 0.03530702528 -0.07179526831 0.0009714533434 0.03703042404 -0.06647131937 0.03089064656 -0.06050120226 -0.01307657932 0.03060544353 -0.06659763448 -0.0429516769 0.007067031694 -0.02104495762 0.03027262223 0.009379687586 -0.009803777028 0.02879054905 0.003824087986 -0.007415382276 0.02668055451 0.02581896795 0.01216517712 0.02653176114 0.02535099807 -0.01470978538 -0.01470762876 0.02979778621 -0.05747354326 -0.07283430042 0.03059346381 -0.06355187697 -0.0652653792 0.006379866881 -0.07366522334 0.02021739984 0.01281749976 -0.06966791736 0.02623641938 0.008245665504 0.03986554838 -0.008369729239 -0.003094402987 -0.06889178703 0.004887670204 -0.0004866502088 -0.07383541725 0.00327767356 -0.003826910892 0.07890845054 0.04285519678 -0.007911690243 0.07417906142 0.04069141723 0.03150619377 0.01091674601 -0.06595755273 -0.03338263951 0.09117640205 0.04225995133 0.002670335991 0.03376816005 -0.03673883163 0.02960125006 -0.06318553245 -0.04099272634 -0.006865202713 0.01645731084 0.01255787163 -0.009099464301 0.02070544377 0.003923672813 0.0357828043 0.026274599 0.003598662727 0.03390075998 0.0196294244 -0.001279798879 0.04031265639 -0.05660766153 0.002407907755 0.0360744451 -0.06211049714 0.004534842105 0.03260151503 0.03338237983 -0.006523976992 0.03118264969 0.03516871605 -0.01003089707 -0.01136068348 0.06864122248 0.07064429773 -0.006901479836 0.06061069469 0.06857057348 0.01679328243 -0.05562619591 -0.00370951823 0.01628598726 -0.06223913581 0.001303798037 0.009116459633 -0.05832062002 -0.003808989204 -0.007364301239 -0.0655903637 0.01843792326 -0.00196793248 -0.0924961494 -0.05993592601 0.0008963181932 0.06568728797 0.07054028896 0.01040316472 -0.07209156303 0.005458972078 0.00854142203 -0.07081448448 0.0009911011157 -0.02369891067 0.08733866181 0.04185304346 -0.02669541901 0.08488316045 0.05445163764 -0.01834546333 0.08677225527 0.06096639685 0.03562533751 -0.05958262208 -0.03641795898 0.03786372614 -0.05828384459 -0.03027705225 0.009531395473 -0.01174729879 -0.01879292893 -0.003540246983 -0.08741634819 -0.0661178097 -0.003123157572 0.0180818 0.0280930842 0.008494293556 0.001798585491 0.02879530636 -0.01469702996 0.08448317854 0.06361696362 0.03003055915 -0.05644625496 -0.01822557042 0.02808882416 -0.05700958393 -0.01037585993 0.02778627434 -0.05772210268 -0.02054866171 0.03417911788 -0.0312596887 0.002049184095 0.04103405708 -0.03840871487 0.005148958662 0.03942781892 -0.03667289771 0.01137860165 0.03453329986 -0.06495725391 0.02343999802 0.03604970893 -0.06553730507 0.01514057711 0.02531780715 0.01492227815 -0.07298663437 0.02230632439 0.01715666452 -0.03682695676 0.03841945299 -0.02335509195 0.003086499411 -0.004947727418 0.02947881842 -0.06376257823 0.02874998283 0.0236523034 -0.02450281726 0.0300426303 0.02085370936 -0.01134700257 0.01478686342 0.05822673578 0.04866955315 0.01926030889 0.05211090058 0.04170128107 -0.008729973724 -0.08521804853 -0.07245066659 -0.007157319253 -0.07673766878 -0.07620159841 -0.008558961662 -0.08429067105 -0.07612955647 -0.008923311148 -0.0488093219 0.02527860165 -0.002559613891 -0.07696783235 -0.07503183334 0.004849320445 -0.06654081366 0.001597316469 0.01214652341 -0.06892115598 0.004942074572 0.02141393735 0.04032770947 0.0349775259 0.01997359085 0.03817995504 0.04077992363 0.01775917418 0.05097555095 0.04600427635 -0.01582497583 0.06802054685 0.07464088641 -0.004157397876 -0.07691588945 -0.03728019479 -0.001018853449 -0.08162814825 -0.05050039973 0.02817520721 0.01827955856 -0.01994709679 -0.002574990396 0.03420072851 -0.02964704313 0.001320084259 -0.03473791533 0.03429652713 0.001777935154 -0.0226111434 0.02817490183 0.03327873912 -0.01056461005 0.02397173155 0.03065047123 -0.02269005762 0.02819745661 0.02870642544 0.01875378799 -0.04929687506 0.0001922875997 -0.08373275371 -0.04744139233 0.02154119496 0.03212762987 0.0364752413 0.01666297493 0.02726410721 0.04306789963 0.03311971159 -0.03398043155 0.03337575262 0.009730373954 0.0642806027 0.04998786614 0.005407980083 0.06523444265 0.04700285823 -0.006747573494 0.04340968931 0.01183606054 0.002887557047 -0.03095184247 -0.008725172836 0.0100429379 -0.03952644137 -0.003466345143 0.02822367542 -0.04933882536 -0.01920753085 0.02628485239 -0.05770928736 -0.02765902392 0.02786365826 -0.05500275066 -0.02916962697 -0.001669219445 0.04538702267 0.02720611487 -0.03230859001 0.07813936645 0.03994506261 -0.04048994453 0.08225886938 0.03671169125 -0.009868051828 0.08008567713 0.0719260116 0.0265315378 -0.05926785564 -0.007859116072 -0.03332074475 0.08453421154 0.0501524775 -0.03381937335 0.08841933055 0.04617110365 0.02814850066 0.01205585131 -0.0671371803 -0.004492723768 -0.0163266252 -0.01144296732 0.01053163859 -0.03198215045 0.03529929745 0.01972097157 -0.01973919687 0.03149693119 0.01048767357 -0.02063130137 0.03129823553 0.03985961936 -0.05288664573 -0.003213911302 -0.005624338707 -0.08197296193 -0.04261050798 0.0006759714639 -0.07365036769 0.0133127436 0.004212329876 -0.07475205279 0.0119180825 0.03323506627 -0.0696954875 -0.07480025266 -0.001579009108 0.02696084562 -0.04952981044 -0.003312288919 0.02325754164 -0.03921236104 -0.004147579526 -0.02945824378 -0.005629744723 0.001253442277 -0.02335747355 -0.01301557741 0.03911524678 -0.06043209602 0.02292888367 0.03491775407 0.03295238847 0.005743549755 0.03351039451 0.03148191133 0.01630992884 -0.03888012536 0.08242966403 0.04378159402 -0.001462520407 -0.08315525292 -0.02223603134 0.02841336148 0.02811863487 0.02765089755 0.01959305432 0.02002495738 0.03629630459 -0.003857603844 0.03529443842 0.02770147706 -0.004193103055 -0.05857007453 -0.00812421203 0.002987702293 -0.06667477542 -0.007354935051 0.03062458964 0.0170145161 -0.03471861989 0.0215023614 -0.003203140851 -0.01664771037 -0.0069726581 -0.02228900251 -0.007252770267 0.02877372334 0.01379869097 -0.001824148201 0.03219097785 0.01710936853 0.003970973929 -0.001478252966 -0.07066783702 0.01717061126 0.04090799929 -0.05048766972 0.002477469733 0.04221058388 -0.04585286067 0.008652735317 0.04129956782 -0.0441744636 0.0165648413 0.04173377532 -0.05045311238 0.01690273366 -0.009654189623 -0.02345030435 0.01726071745 -0.0004818671806 0.01835426962 -0.01799662106 0.03125825441 0.003380579928 0.01998651054 -0.03919248768 0.08479295282 0.03976483444 0.003520651884 -0.07698137746 -0.03005855642 0.007973550041 0.01351410662 0.03593835636 0.03272371506 0.01249381504 -0.0531731552 0.03734630827 -0.05298459102 0.03031383303 -0.01118920924 -0.04589732423 -0.0006055461399 -0.01285895631 -0.05447083728 0.002553862308 0.03412837706 -0.06375930285 -0.05431811234 0.008961397042 0.0637895756 0.06371092318 0.01427783805 0.05723610966 0.05657762965 -0.003326030827 -0.05337569876 -0.00816300105 0.03449232394 -0.01447509712 -0.007085189085 -0.001399696964 0.07360918529 0.04738228773 0.01482836949 -0.0503736023 -0.00361868336 0.001175117703 0.04001887574 0.03541236732 -0.001654754589 0.04403139999 0.03136603031 0.02013522102 0.005521818577 -0.01645881801 0.02887962947 0.03476326802 0.02733829569 0.004702017954 -0.07433493442 0.004067149564 -0.003331472651 -0.02627186955 0.02464260162 0.04016155504 -0.01733728772 0.007963893729 0.0397206916 -0.02491526377 0.01076551855 -0.01112576914 -0.005316011207 0.002302332574 -0.006927365029 -0.03178226048 0.01912703705 -0.0102274856 -0.02782264648 0.01210044819 0.03734668377 -0.05742997169 -0.01645298422 0.02466980407 -0.070910477 0.02289710424 0.01385901705 0.05949049579 0.04023338261 0.03240174381 0.02011033079 -0.0344847917 0.03395723161 -0.06758874851 0.005171270084 0.02458864391 -0.02115590763 0.03120326966 -0.01035079762 0.08472342609 0.06104253917 0.001684861081 0.05917736027 0.07005330408 -0.006536190487 0.03548836799 -0.06267864689 0.008895654965 -0.002048438485 0.02823154318 -0.001194226204 -0.00612117961 0.02382173563 -0.041466062 0.08773778344 0.04181971279 0.001007978701 0.03349913939 -0.0282564572 0.007628281862 0.03634278651 -0.01242744678 0.0230054381 0.03936685429 -0.01065390101 0.001368915261 -0.08394618474 -0.03381885488 0.002632628316 -0.08255247796 -0.02412757231 -0.00354013088 -0.07196116749 -0.008333162013 0.03078262752 -0.04618993488 -0.01805172639 0.006631522763 0.05681432904 0.06801000768 0.03454065289 0.02451513562 0.01138156728 0.03383925403 0.01813973081 0.01100557987 0.01893751459 0.008940117663 0.03115693827 -0.006957234426 -0.070454112 -0.003727535227 0.02106392657 -0.01061953913 0.02950665781 0.03987355539 -0.04569553711 0.02707910533 0.02655665416 0.02996360952 -0.02032420263 -0.0008854950036 0.04548580806 0.04725969924 0.03298333243 0.0006369486471 -0.005490274346 -0.02477651358 0.06909514574 0.05263016405 0.0108876158 -0.07350102942 0.01540372207 -0.01151240102 -0.04770396553 0.01170553782 -0.01337948023 -0.04918765216 0.003439276179 0.03931723504 -0.01024753114 0.003331953417 0.03407506517 -0.06279539986 -0.0644464214 0.03350940515 -0.0555615256 -0.07453310785 0.01670513491 0.05031005658 0.05116246645 0.03219513956 0.02763777255 0.02156794773 0.02614738372 0.009600674665 -0.06096641274 0.02063628636 -0.06844250988 0.009433137481 -0.005150105969 -0.06225878057 -0.02061781885 0.02463452407 0.04688349139 0.008254127115 -0.007189791113 -0.03780993371 0.008068956686 -0.007576305539 -0.03502248637 0.011572634 0.03786719388 -0.04772718244 -0.007152106251 0.04164745552 -0.05139976523 0.02170403472 0.001368702698 -0.08058572444 -0.07563799719 0.001021217034 -0.08584384473 -0.07578508649 0.03852844441 -0.06468442727 -0.07476173787 -0.0004869179466 0.03535551245 -0.03992346725 -0.008371846789 -0.02901435139 -0.0009720494804 0.01100768797 -0.06564660176 0.003295236801 -0.004957053966 -0.08915640355 -0.07544380165 0.03595913841 -0.0643991254 -0.06383142451 -0.004500428108 -0.03541216466 -0.0001096241416 0.03684824064 -0.009359937734 -0.00345269131 -0.001901313573 0.02151472699 -0.01957940439 0.02427895513 0.04126406169 0.02968521799 0.003926526436 0.02956443196 -0.01833385799 0.02338500841 -0.04382673933 0.03750815578 0.03198393591 0.02261394352 -0.0363035693 -0.009625922757 -0.04059774736 0.01360814369 -0.0001478886239 -0.0869998289 -0.04689507336 -0.01105766555 -0.04249657528 0.004064274564 -0.00620246511 0.0847735636 0.07263749388 -0.006363858177 -0.01268843137 0.02091940448 -0.0189451537 0.06607527142 0.0579000547 0.03693622946 -0.03240344324 0.01255862406 -0.009399355844 0.08512885741 0.07767636647 0.002132865935 -0.0889281017 -0.05841970038 0.01520672892 -0.06872841518 0.01030069829 0.03265859535 0.02074778201 -0.00821641934 0.01189037844 0.0634348859 0.05467467979 1 2 3 2 1 3 4 5 4 6 6 5 7 8 8 9 9 7 10 11 12 11 10 12 13 14 15 14 15 13 16 17 18 17 16 18 19 20 21 20 21 19 22 23 22 24 24 23 25 26 27 26 25 27 28 29 30 28 30 29 31 32 31 33 32 33 34 35 35 36 34 36 37 38 37 39 39 38 40 41 42 40 42 41 43 44 45 44 45 43 46 47 48 46 48 47 49 50 50 51 51 49 52 53 53 54 54 52 55 56 55 57 56 57 58 59 60 58 59 60 61 62 61 63 62 63 37 64 65 37 65 64 66 18 66 17 67 68 68 69 67 69 70 71 70 72 72 71 73 74 74 75 73 75 76 77 78 76 78 77 79 80 81 79 80 81 82 83 84 82 83 84 85 72 85 86 86 72 87 88 87 89 88 89 90 91 90 92 91 92 93 94 93 95 94 95 96 97 96 98 97 98 99 17 66 99 100 101 102 101 100 102 103 104 104 105 105 103 106 107 108 107 106 108 109 110 110 111 109 111 112 113 113 114 112 114 115 116 116 117 115 117 118 119 120 118 119 120 121 122 121 117 117 122 123 124 123 125 125 124 126 72 126 85 127 128 129 127 128 129 130 59 130 105 59 105 131 132 133 131 132 133 134 135 134 136 135 136 137 138 139 138 137 139 140 141 142 140 142 141 75 143 143 144 75 144 145 146 145 147 146 147 148 69 148 67 60 149 60 150 149 150 151 152 151 153 152 153 154 155 154 156 156 155 157 158 157 95 158 95 159 160 159 161 160 161 162 163 164 163 162 164 165 166 165 167 166 167 168 169 169 170 168 170 116 171 171 154 116 154 172 173 172 174 173 174 175 176 23 176 175 23 147 177 178 147 178 177 179 180 181 180 179 181 59 182 182 183 183 59 164 184 185 184 164 185 22 186 22 187 186 187 161 188 189 188 161 189 190 191 190 192 192 191 47 193 193 194 47 194 195 196 197 195 197 196 86 198 198 199 86 199 200 201 201 202 200 202 203 204 205 203 204 205 206 207 208 207 206 208 209 210 52 210 209 52 108 211 211 212 108 212 213 16 214 16 214 213 193 215 193 216 215 216 217 218 217 219 219 218 110 125 220 110 125 220 197 221 221 222 197 222 88 223 87 223 186 224 225 224 225 186 226 206 226 227 206 227 228 229 229 230 228 230 187 231 23 187 231 23 232 233 232 234 233 234 235 236 236 218 235 218 237 238 237 239 239 238 240 4 241 240 241 4 242 172 172 243 243 242 244 245 244 246 246 245 247 248 148 248 247 148 30 249 250 30 250 249 251 252 253 252 253 251 254 255 256 254 256 255 257 258 258 259 257 259 256 260 261 260 256 261 262 263 144 262 263 144 264 265 266 264 266 265 267 268 269 268 269 267 270 271 270 272 271 272 273 274 144 273 144 274 226 275 206 275 276 277 276 278 278 277 279 280 114 279 280 114 21 281 21 282 281 282 163 283 284 283 163 284 215 46 215 137 137 46 285 286 287 286 287 285 151 288 152 288 114 289 290 114 289 290 291 233 232 291 251 249 252 249 292 259 293 292 293 259 294 295 294 296 296 295 156 297 155 297 82 247 82 248 298 117 122 298 299 246 299 300 246 300 301 302 303 302 301 303 41 304 305 304 41 305 306 307 216 307 306 216 208 275 202 308 202 309 308 309 310 227 227 311 310 311 312 313 314 313 312 314 315 162 315 164 316 278 317 278 316 317 318 319 319 320 318 320 39 321 39 322 322 321 36 323 323 34 13 232 55 232 13 55 324 64 64 325 325 324 326 327 328 326 327 328 329 330 233 330 329 233 139 3 1 139 100 331 331 101 210 73 73 332 210 332 304 288 288 183 183 304 333 334 333 335 335 334 41 289 40 289 336 337 338 336 337 338 339 340 341 340 341 339 9 323 36 9 342 343 342 344 343 344 18 345 345 66 285 346 285 347 346 347 348 295 348 349 295 349 350 351 352 350 352 351 264 309 309 266 12 353 10 353 354 345 354 355 355 345 356 336 338 356 12 357 357 11 340 209 358 340 209 358 359 77 9 77 359 9 31 276 33 276 29 360 360 28 338 361 338 362 361 362 363 364 364 260 363 260 292 365 365 243 243 292 184 163 161 366 188 366 191 105 191 59 367 368 368 369 369 367 370 216 371 370 371 216 274 175 175 372 274 372 373 374 156 374 373 156 167 375 376 167 375 376 16 268 214 268 377 378 377 122 122 378 379 290 379 56 56 290 362 320 380 362 380 320 338 380 365 150 149 365 156 381 381 374 382 142 382 383 383 142 384 385 282 384 385 282 33 386 32 386 387 45 66 387 66 45 285 388 388 286 389 390 248 390 389 248 391 392 393 392 391 393 242 394 395 394 395 242 74 143 396 397 397 398 398 396 379 113 113 399 399 379 104 190 104 400 190 400 401 402 403 401 402 403 21 404 20 404 104 405 405 406 406 104 174 242 407 408 407 409 409 408 184 410 411 184 411 410 412 182 182 60 412 60 413 130 413 59 330 200 414 330 200 414 415 416 416 417 417 415 217 25 217 418 25 418 42 253 42 252 230 419 420 419 230 420 289 280 421 422 2 422 421 2 140 65 302 65 302 140 241 6 241 423 423 6 53 61 53 332 61 332 424 313 312 424 328 425 425 327 426 424 427 424 427 426 428 211 429 428 429 211 71 430 71 431 430 431 179 81 127 179 81 127 432 408 407 432 411 433 410 433 434 435 435 436 434 436 105 190 223 437 87 437 438 214 204 214 438 204 439 440 439 137 440 137 375 441 375 442 441 442 149 76 443 76 149 443 444 445 49 444 445 49 446 26 446 447 447 26 448 116 448 396 396 116 448 155 448 154 275 449 226 449 391 128 392 128 321 38 450 86 450 198 284 451 433 451 433 284 329 452 452 453 329 453 454 123 454 455 455 123 456 457 409 457 409 456 458 220 459 220 459 458 180 460 461 460 461 180 22 173 26 22 173 26 56 42 56 253 462 463 463 464 462 464 465 93 93 51 51 465 466 303 10 303 466 10 181 467 177 467 181 177 347 468 347 469 468 469 388 362 361 388 470 219 217 470 471 472 472 235 471 235 473 474 473 44 44 474 224 311 224 227 100 392 393 100 204 475 475 205 476 10 466 476 20 477 478 20 477 478 479 342 479 127 127 342 480 481 480 482 482 481 483 484 483 485 484 485 133 486 133 487 486 487 96 464 462 96 488 377 377 397 488 397 77 323 327 355 327 345 108 229 229 107 331 129 128 331 313 279 489 279 313 489 485 31 32 485 483 213 213 490 483 490 27 186 225 27 360 491 491 423 423 360 470 225 227 225 470 227 492 125 125 493 493 492 24 174 174 372 24 372 233 200 494 389 494 495 495 389 496 497 498 497 498 496 414 103 414 453 453 103 130 414 103 130 454 124 499 429 158 429 158 499 118 500 119 500 469 501 502 501 502 469 503 504 505 503 505 504 143 80 143 506 506 80 507 336 508 336 507 508 29 491 509 492 509 493 510 86 265 86 265 510 411 163 511 434 512 434 511 512 255 513 514 255 513 514 515 115 515 111 111 115 421 1 336 516 337 516 504 517 504 518 517 518 519 350 352 519 83 520 521 83 520 521 522 365 150 522 217 27 523 524 524 135 523 135 525 526 525 527 526 527 259 84 83 259 528 239 238 528 529 311 529 530 311 530 380 318 531 344 531 342 532 166 481 166 532 481 363 209 363 340 471 533 534 471 533 534 535 121 121 397 535 397 172 292 2 185 371 185 2 371 377 398 314 489 269 328 267 328 460 506 460 143 333 536 536 335 537 538 539 538 539 537 540 407 540 409 11 541 541 357 258 83 386 350 386 519 542 543 445 542 445 543 116 298 194 215 544 215 194 544 13 335 196 335 13 196 545 546 545 249 249 546 547 523 547 548 523 548 355 481 481 354 143 263 476 496 476 353 496 353 170 487 549 170 549 487 91 491 90 491 392 331 515 349 295 515 69 550 69 551 550 551 102 552 101 552 6 126 126 5 553 382 553 383 554 88 554 555 555 88 63 556 63 239 556 239 557 319 558 557 319 558 559 312 509 559 509 312 438 560 438 399 560 399 71 240 5 240 71 5 310 530 26 186 208 534 533 208 196 561 536 196 561 536 482 532 412 305 182 305 562 563 455 562 563 455 386 514 514 519 564 445 444 564 99 456 565 99 456 565 36 7 507 356 566 567 568 567 568 566 20 405 477 405 365 78 76 365 569 222 569 281 281 222 524 328 326 524 57 570 570 56 277 571 277 316 316 571 145 343 344 145 432 162 432 163 530 572 552 530 572 552 565 169 565 568 568 169 573 361 337 573 361 337 422 473 422 44 378 298 574 54 52 574 426 401 427 401 238 365 238 243 171 575 575 154 576 272 351 576 351 272 322 577 322 578 578 577 579 2 579 371 290 113 383 141 580 581 580 339 339 581 582 98 582 97 583 214 213 583 117 515 295 117 257 26 173 257 56 40 40 290 155 535 448 535 584 447 257 584 257 447 14 196 96 585 462 585 166 462 166 463 533 129 129 471 566 565 211 511 428 511 65 356 37 356 451 421 1 451 586 394 394 587 586 587 424 588 113 588 424 113 517 554 554 589 517 589 159 228 160 228 396 298 298 398 585 355 585 326 326 355 64 39 443 412 412 149 333 475 205 333 487 168 487 457 168 457 55 291 57 291 461 143 468 590 347 590 253 570 432 283 408 283 512 428 512 591 428 591 153 201 151 201 592 593 213 593 592 213 594 15 14 594 209 73 73 358 254 571 571 87 254 87 569 595 596 569 595 596 576 270 541 507 507 357 318 368 369 318 219 534 219 471 597 432 407 597 271 598 133 598 133 271 425 269 599 248 599 389 600 559 600 492 492 559 203 548 203 523 408 165 408 601 601 165 255 602 602 514 162 597 420 441 542 420 441 542 418 343 418 603 603 343 318 557 604 467 180 467 180 604 85 605 86 605 436 606 607 606 436 607 153 413 153 130 608 208 608 533 609 252 450 252 609 450 610 8 611 610 8 611 445 590 347 445 268 204 573 612 613 573 613 612 211 499 499 212 263 81 81 262 464 318 369 464 614 325 614 324 449 470 449 219 606 478 607 478 197 594 14 197 465 50 615 387 387 44 44 615 604 616 467 616 89 617 618 89 617 618 292 84 136 97 97 577 577 136 619 256 619 260 8 289 8 41 620 614 324 620 303 11 307 138 138 215 307 215 261 621 435 261 435 621 172 293 173 293 622 350 622 386 134 326 134 524 263 80 575 156 373 575 623 109 459 623 109 459 593 490 179 79 506 79 179 506 332 75 624 75 624 332 625 415 625 416 591 595 569 591 465 106 93 106 62 556 192 556 62 192 21 385 623 8 623 289 43 474 231 626 529 626 529 231 207 552 207 572 317 415 417 317 417 563 563 416 109 220 431 360 360 430 395 372 395 274 132 167 132 376 381 294 297 294 297 381 347 287 469 287 15 232 627 543 590 543 627 590 260 606 478 260 628 629 629 157 628 157 222 282 115 575 115 373 30 545 199 28 431 28 431 199 442 420 442 230 364 209 266 510 288 266 510 288 602 352 538 602 538 352 229 419 127 531 127 181 181 531 166 408 284 526 451 526 107 419 107 420 487 131 601 131 601 487 400 54 400 406 54 406 246 508 508 299 420 465 420 106 283 532 283 482 317 630 415 630 631 632 631 47 632 47 505 633 633 504 552 608 608 207 634 617 634 89 35 550 124 550 124 35 617 455 563 617 278 592 276 592 603 342 155 635 635 535 411 284 199 30 174 22 126 70 164 474 473 164 636 166 636 463 637 380 637 338 225 217 148 638 638 247 639 640 640 136 136 639 633 581 505 581 205 548 434 539 435 539 270 549 270 486 549 486 501 558 287 501 558 287 61 624 586 624 61 586 72 431 213 630 630 592 17 484 99 484 115 171 95 499 433 1 138 1 138 433 452 405 405 103 452 103 371 306 381 314 374 314 158 595 158 591 513 571 254 513 448 397 500 246 500 244 69 34 148 34 66 641 99 641 82 599 599 83 642 386 642 568 386 568 612 382 612 553 641 407 45 407 45 641 121 294 121 295 5 70 63 586 388 613 361 613 129 472 127 472 534 449 208 449 142 302 382 302 346 388 204 267 267 203 302 356 283 526 566 99 351 159 272 159 48 439 137 48 24 175 642 549 576 642 576 549 212 106 212 93 309 546 546 308 643 644 644 498 643 498 503 517 228 272 96 318 152 413 645 194 645 544 399 475 399 204 459 36 458 36 54 62 62 53 627 468 222 596 189 160 619 223 555 223 555 619 430 423 430 241 430 240 438 583 167 636 537 188 511 537 511 188 287 320 286 320 296 489 296 314 551 634 634 69 450 646 646 86 302 507 302 541 329 234 234 385 385 329 219 235 139 440 441 543 176 231 519 602 78 247 84 78 247 84 458 125 497 500 497 118 561 195 89 571 633 341 633 339 514 33 195 647 647 561 562 625 625 401 562 401 303 541 582 38 637 582 637 38 310 206 562 416 648 464 501 648 464 501 611 359 9 611 178 145 638 323 323 148 618 417 618 563 254 437 256 437 513 277 306 184 307 184 476 649 245 649 476 245 638 77 276 593 520 494 520 389 631 650 47 650 482 526 443 359 443 611 221 596 423 85 6 85 373 559 559 374 94 51 322 94 322 51 78 638 613 553 273 75 481 525 480 525 226 470 554 634 589 634 388 553 201 266 309 201 93 499 524 267 203 524 365 84 315 474 622 642 622 576 647 651 547 647 547 651 497 643 459 7 334 379 334 56 475 379 475 334 532 408 621 256 255 621 136 651 640 651 518 554 261 606 81 128 367 557 368 557 607 512 512 436 619 363 504 341 297 635 652 583 213 652 251 308 251 653 308 653 553 346 495 505 654 505 495 654 434 537 427 562 345 425 425 18 346 614 347 614 609 655 252 655 596 640 221 640 47 645 218 603 218 418 415 652 630 652 656 159 656 351 650 216 650 370 300 476 245 300 295 489 111 657 657 115 124 458 643 244 643 245 324 39 307 410 410 138 525 615 345 525 615 345 268 18 615 422 32 568 8 459 616 580 616 339 610 41 89 316 316 417 89 417 364 52 364 574 132 165 646 609 236 472 472 479 236 479 31 593 158 658 628 658 158 628 177 580 467 580 659 303 659 466 548 333 548 536 658 640 658 639 489 348 624 394 624 395 577 629 629 660 577 660 210 53 450 30 250 450 98 637 384 594 15 384 655 41 304 655 520 599 453 330 661 145 661 178 510 646 525 482 193 650 383 346 366 537 315 45 597 45 597 315 398 378 521 258 626 100 529 100 605 423 166 355 325 346 652 403 403 625 625 652 49 39 324 49 92 265 264 92 119 246 331 533 550 34 312 374 222 594 222 384 37 637 521 146 146 520 49 322 485 567 567 32 555 363 91 86 91 605 278 630 173 259 321 577 443 610 310 207 385 452 528 243 528 242 609 510 510 304 304 609 493 424 424 509 593 483 486 271 140 64 660 136 660 639 30 198 382 301 644 649 644 245 650 371 42 655 654 390 390 495 662 21 281 662 371 184 350 576 348 279 191 58 237 191 58 237 663 176 175 663 502 648 491 605 555 518 319 287 662 512 662 591 593 664 31 664 305 610 305 443 21 452 452 404 224 529 187 224 187 529 90 264 578 157 629 578 456 540 662 19 409 601 418 446 418 146 446 146 376 598 598 375 600 373 649 498 649 496 19 478 607 19 277 33 634 88 49 620 569 662 237 556 366 352 538 366 264 546 479 603 574 260 665 344 531 665 269 18 55 334 570 202 202 653 653 570 656 161 181 178 657 373 421 527 451 527 405 404 545 90 29 90 545 29 357 119 246 357 456 168 74 358 358 461 461 74 63 587 666 466 666 659 508 516 183 152 544 46 587 528 587 242 516 299 516 666 299 666 500 643 402 583 403 583 634 550 511 189 211 189 561 547 422 185 647 640 221 647 335 55 380 98 262 391 262 128 530 102 584 146 584 446 654 517 589 654 665 661 344 661 401 588 588 426 427 493 560 113 468 502 667 636 463 667 641 540 540 99 501 367 558 367 529 102 303 612 303 382 626 393 25 446 146 258 440 631 439 631 604 461 174 395 170 642 642 169 97 321 38 97 636 375 667 375 518 341 620 445 110 492 110 600 546 90 47 544 121 377 664 483 339 358 616 358 250 252 286 362 424 112 313 112 352 656 253 653 3 579 631 579 3 631 147 520 400 192 400 62 349 280 348 280 584 258 654 503 375 468 375 627 349 111 413 183 390 68 67 390 54 477 477 406 627 441 237 192 67 248 125 668 668 493 384 234 48 632 513 33 669 581 581 494 669 494 548 561 369 501 134 97 595 658 629 658 150 58 520 669 271 228 624 273 110 657 621 602 621 538 177 669 147 669 550 454 617 550 617 454 567 484 366 656 669 580 437 619 663 626 663 393 473 185 358 604 478 574 207 530 640 595 665 178 325 140 176 626 153 200 574 477 668 123 12 119 134 585 318 98 496 118 120 496 566 484 538 435 458 35 346 141 363 518 560 402 438 402 239 587 435 606 429 591 465 564 564 420 291 200 94 578 266 151 440 3 455 668 273 395 274 663 663 144 294 635 57 202 564 50 133 376 76 359 108 189 160 108 564 49 340 518 94 157 667 502 667 468 238 522 522 237 300 466 401 560 588 560 635 121 349 289 579 650 615 421 615 527 72 199 179 460 632 439 153 414 221 195 483 16 353 119 663 391 169 456 547 135 112 279 66 615 68 634 657 600 291 202 271 230 598 230 666 300 135 651 343 146 662 607 381 296 457 601 665 181 265 91 353 120 101 608 533 101 546 251 357 508 525 354 505 494 349 623 603 236 462 355 15 234 542 564 229 160 623 111 58 522 516 659 516 573 573 659 132 601 612 659 68 589 654 68 305 183 485 664 483 17 598 442 356 637 427 668 463 648 648 667 121 488 668 562 262 663 96 134 614 445 43 315 140 346 658 660 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 17 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 68 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 87 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 71 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 90 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 257 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 162 338 339 340 341 266 342 343 290 344 345 346 347 348 349 350 351 352 353 167 354 355 284 127 356 357 358 359 360 361 362 363 364 365 366 367 368 369 318 230 370 371 372 373 374 375 376 377 378 379 380 176 381 382 383 384 385 386 387 388 389 390 391 392 36 393 394 395 396 397 398 399 400 401 402 403 404 405 406 3 104 407 408 409 410 411 412 413 414 415 416 417 418 419 40 420 421 422 423 424 425 426 391 427 428 429 430 431 67 432 433 434 435 436 437 438 439 440 441 442 443 306 12 444 445 446 447 448 449 450 421 451 11 452 453 454 455 456 457 458 32 459 460 28 461 462 463 464 465 466 467 468 469 470 471 175 472 201 473 474 207 475 476 138 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 238 492 493 494 495 496 497 498 499 500 501 502 503 501 464 161 504 505 506 487 507 508 509 510 511 512 513 33 514 515 516 517 518 334 519 520 521 522 523 524 525 526 527 528 529 76 530 151 531 532 533 534 535 536 537 538 539 540 541 542 543 20 544 545 546 547 187 278 548 549 550 551 552 553 554 555 556 557 558 136 559 560 561 562 563 564 565 566 567 568 569 291 570 571 572 573 324 339 574 575 576 577 578 579 580 581 582 583 584 585 586 587 377 588 589 590 401 591 592 593 594 595 596 597 598 599 600 601 602 549 603 604 605 606 554 607 608 609 475 610 210 611 612 253 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 165 317 636 637 524 638 639 388 640 39 641 642 219 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 569 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 465 683 244 684 685 686 687 688 689 690 691 375 692 693 694 525 695 227 696 674 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 668 714 715 716 717 718 719 426 457 720 721 448 722 111 723 135 724 725 726 727 728 729 31 730 731 732 733 734 256 735 736 737 738 739 740 741 742 743 744 745 746 747 403 560 748 749 750 751 752 753 754 755 756 757 758 755 759 760 649 128 761 762 763 764 122 765 766 767 768 769 770 771 772 773 774 775 776 777 778 736 461 779 744 780 781 782 783 472 784 553 785 786 787 788 789 790 791 792 793 1 794 577 795 420 796 797 798 799 800 801 440 802 803 804 805 504 806 27 807 566 808 809 810 811 812 813 814 815 86 816 817 274 818 819 820 502 821 387 822 429 823 824 825 826 453 827 828 829 830 831 832 833 834 471 279 835 836 837 838 532 717 839 840 378 728 310 841 842 843 773 844 416 845 846 847 848 849 550 850 851 452 852 853 297 854 815 800 855 856 857 858 859 860 356 120 861 862 863 864 865 866 867 868 869 870 871 872 873 447 874 304 152 875 876 877 878 879 880 881 93 882 883 884 407 693 438 885 886 887 888 889 890 105 891 892 893 6 894 895 509 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 376 820 734 26 915 831 916 917 918 919 920 826 707 921 555 922 923 924 925 926 927 928 856 625 929 930 931 932 933 427 934 9 775 935 449 936 937 938 939 699 940 941 79 942 943 944 945 946 400 947 57 948 949 950 951 952 953 430 954 174 955 956 957 958 959 960 961 962 963 964 965 966 967 689 357 968 496 969 970 54 971 593 972 973 974 470 184 975 976 977 978 979 980 981 982 983 838 984 117 985 340 986 150 510 987 988 989 101 990 991 992 993 239 886 994 995 996 997 663 499 998 999 1000 1001 634 1002 1003 1004 866 1005 13 41 998 664 1006 1007 715 1008 1009 666 829 1010 1011 1012 938 961 594 1013 1014 1015 65 1016 1017 794 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 171 1029 1030 533 1031 1032 1033 1034 1035 38 64 624 1036 1037 1038 696 1039 1040 1041 1042 56 1043 1044 844 1045 659 678 1046 1047 665 949 1048 1049 603 1050 1051 1052 1053 1054 163 1055 1056 1057 1058 1059 14 1060 1061 455 1062 1063 1064 1065 1066 1067 1068 312 1069 977 1070 1071 853 478 1072 1073 1074 830 1075 1076 1077 604 1078 1079 1080 841 1081 589 523 1082 1083 1084 1085 1086 787 1051 1014 22 264 205 1087 1088 872 1089 1090 1091 789 1092 1093 1094 1076 955 1095 1096 1097 1098 1099 1100 1101 902 385 1102 1103 1104 88 1105 1106 1107 1108 1109 558 1110 1111 1112 1113 917 1114 1115 1116 1117 1118 1119 1120 1121 1047 493 1122 614 1123 1124 1125 235 1126 1127 302 1128 1129 1073 1130 1131 1132 1133 398 1134 1135 683 1136 1137 1108 1138 1060 1139 50 1140 671 1141 1142 1143 1102 1144 1145 1146 1147 1148 346 814 1149 1150 1151 1152 299 1153 1154 1155 418 1156 1133 1157 1158 10 673 1159 1160 1161 1162 1163 1164 1165 1166 186 1167 855 1168 1169 1170 1171 947 875 772 1172 488 1173 1174 1175 1176 1177 732 1057 1178 1179 1180 1181 1182 1183 1184 563 1185 1186 1187 1188 1066 669 1189 1190 1191 1192 1193 774 1180 81 513 326 1194 1155 1195 1196 43 1197 690 1198 1199 1200 1201 1202 959 1203 565 1204 1205 564 1206 113 1207 247 599 1208 1209 485 1210 1211 490 1212 1213 1214 1215 1216 679 1217 1218 393 15 1219 1220 1221 1222 1223 1224 1136 1225 1226 1227 1228 945 327 1229 1230 1174 1231 287 868 779 906 1086 1232 1233 1234 573 1235 1236 827 1237 466 1238 1239 1240 1241 1242 1243 261 1244 571 1245 1246 1247 1089 177 1248 1249 1250 643 1251 1252 572 1253 1254 1255 1256 1257 1258 358 1259 1260 1261 1262 1189 1263 921 1264 1265 1266 1203 1267 1268 1269 1270 1271 771 1272 1273 1201 1146 1274 1275 1276 1277 1278 926 1279 1280 534 497 985 1281 320 1282 1100 1283 428 1000 1284 1285 605 1286 645 1232 1287 29 661 188 1288 1289 131 73 1290 1291 688 1009 1292 1293 1294 503 1295 807 735 1296 286 1297 1298 1299 1300 1301 1302 1270 1303 1304 226 1087 1305 1306 607 1307 1308 1309 1310 1311 1312 1313 1314 1315 621 1235 1095 1316 598 74 1317 1318 1058 102 1319 1320 1229 975 1321 859 1120 1221 170 1322 763 1005 218 1139 1323 1324 1325 1326 1327 1328 369 482 1329 1330 507 1331 1332 1333 1187 1334 1063 1335 1001 834 1336 1337 282 1338 157 1339 1340 1341 103 1342 766 1218 1311 1343 84 1344 1345 1346 1347 1348 1349 894 1350 1351 1352 1353 349 1354 893 1289 1355 1315 1356 62 682 1357 1358 1359 134 1360 916 1361 1362 1363 1364 508 433 1365 519 1366 1367 225 1368 579 1015 1249 329 1369 932 1370 1012 979 1371 1372 617 1373 1374 191 24 1375 1376 1377 1378 1379 1380 1190 1381 1382 373 1383 1384 1385 769 797 1386 1387 1372 1028 714 1130 1388 1389 164 1110 1390 863 1391 1392 1393 695 657 1394 1395 1396 53 1397 1046 1398 1222 1399 1067 943 1049 328 956 173 209 1400 1401 1402 1403 738 1404 1209 1405 276 1406 992 613 1407 1408 1292 179 1409 1410 1411 1412 335 1413 445 877 697 1414 1415 840 1416 888 1417 341 999 419 1418 641 1419 1420 1070 1421 1422 1423 1424 245 1425 271 618 147 1426 1097 857 1427 1428 265 190 928 1093 1429 1430 1431 1432 1433 248 655 1434 1435 764 1436 216 918 1064 1437 91 1438 1439 425 1244 723 1251 63 899 1191 927 514 1440 1441 1436 1442 1443 1444 1445 1309 713 881 1446 362 1421 1447 1448 1449 374 1450 259 924 1206 1451 1452 1453 1454 1455 458 1456 1405 1404 582 1457 193 155 1458 1297 1459 1460 1205 1461 294 1462 1463 950 1334 1464 367 1465 1466 1467 1468 1469 1470 1458 719 83 1128 1172 1056 1282 1471 1472 749 1473 1474 1475 1268 1264 1476 1369 1477 1455 1478 1399 250 1479 1480 1481 583 1335 293 788 486 1482 1483 1484 1485 1486 1302 989 1439 1487 1470 80 1125 1488 1349 153 315 1489 705 1490 1491 1492 637 1134 1026 1493 1494 1166 347 835 1488 1357 1495 1496 443 1497 1127 1498 1380 1367 1499 1500 941 1501 1431 1290 1502 381 1503 1504 1377 1505 1506 1507 753 1508 1385 1509 934 1394 1510 1511 498 1512 1513 1510 1248 824 1514 295 1515 1516 368 1162 242 1517 1300 1518 799 1519 1025 547 1257 538 1354 995 126 300 1223 1520 602 133 1521 477 1522 1523 1524 1525 1109 1154 1526 468 1438 1527 1271 353 1528 1284 993 1529 1530 1531 1532 1533 1365 1534 1495 1535 1536 1537 849 1305 1538 972 1539 1445 1540 1541 431 1542 435 1543 1544 1545 1114 1546 1479 1547 1390 1548 215 77 1182 410 1549 1099 1550 1551 1266 1552 1553 1371 1554 480 1555 1556 1557 1469 1558 1414 1559 351 1313 586 1184 1560 1561 793 1562 130 1433 1563 281 1564 1565 1035 396 1160 1566 1567 1568 1569 1570 492 18 1571 1514 1263 1050 1143 967 1572 1573 515 1347 1574 1176 1195 1575 1576 988 1156 1577 1117 1069 1307 1378 1578 1579 1580 1581 970 1582 1212 178 1583 1418 1584 1116 1585 1586 1587 1588 1471 459 1589 1590 1591 1592 676 1593 1594 672 1595 845 1596 1597 1163 1515 301 1598 1299 1599 436 1559 1600 1601 1602 528 1603 1604 1605 1363 149 580 411 585 1606 1430 1298 1487 288 1607 1608 990 1609 1448 1610 1611 1059 364 1612 1613 1344 802 1614 648 1615 402 1457 1616 1617 1618 1419 781 811 1476 1619 241 1620 1555 1534 1621 895 1148 1461 1280 474 1622 1409 204 915 662 1491 1619 706 1623 1624 1625 1626 839 494 1345 1169 1503 1627 803 854 1199 1628 1629 1429 1241 801 1105 1480 1630 825 1631 873 1632 1542 1132 1633 1634 1635 1636 1565 1637 305 1638 1639 1640 1337 765 721 590 1540 724 1010 1641 887 1642 1339 382 951 321 1483 905 1643 1644 1645 1610 1646 37 1449 804 1647 1648 1649 389 1636 1650 730 1651 1410 1538 785 307 1238 783 1526 1403 1652 1653 1106 1654 1265 383 1655 1626 968 1031 1656 997 298 1657 390 980 1658 1478 1118 228 1450 1659 1660 646 1424 5 277 581 1661 1662 280 1217 434 336 1663 1664 1665 1666 1667 780 761 1126 596 733 1178 1668 711 1669 1080 1075 687 1425 422 463 965 343 1043 394 1101 1072 1523 1670 66 578 1671 1672 1301 642 1607 1673 974 817 1661 1364 361 1674 213 1475 1620 1675 1676 1468 1556 1677 481 42 1678 1612 1679 1680 1537 412 1664 1240 1681 325 1682 202 1683 837 978 1684 439 1600 727 1685 1686 1687 1688 1336 531 632 1689 189 1690 1642 1276 34 1691 767 1453 1692 1630 737 897 1519 1693 904 1312 1694 1052 1695 1696 1697 1588 1698 1699 1700 1658 622 505 942 1701 543 1702 1703 1704 1705 1706 1639 94 506 1216 352 1707 1226 1708 851 1709 654 1710 21 1681 551 1711 1090 1712 1713 1714 1262 1252 110 491 1715 1716 1084 1482 1717 1718 1719 754 1601 1019 1314 700 19 1720 137 759 109 1253 712 140 1137 1720 1721 319 1722 460 1723 92 1275 1724 1637 1158 1673 1287 220 1725 1682 944 273 1726 901 1343 1082 355 1727 1243 1728 442 1729 1381 702 1283 1730 467 1582 1731 1732 822 1733 1734 1541 1081 1511 1735 55 1736 1737 1738 1553 1739 172 1740 677 194 1741 1230 1561 1742 1017 1743 1326 1702 1744 1745 1746 1747 1566 1466 552 600 82 1179 1640 1748 1749 1088 1500 808 1042 652 1750 1675 1718 1384 1751 1752 1753 1149 1501 469 1513 1038 415 1462 1065 612 1754 1356 1021 1755 1756 1595 1757 776 795 1758 413 338 1759 862 331 1760 1761 1662 1762 1763 1764 311 1669 1308 1359 685 1011 842 946 1499 1338 1563 1765 1766 542 1767 1768 889 1416 1769 1013 1770 1771 1506 1442 786 609 1525 836 576 1772 1773 1547 1774 1775 864 395 1294 1609 1776 1777 1778 638 890 958 1779 1714 1780 1781 1782 1027 1783 1732 1784 1785 971 1786 1787 1112 229 1273 1788 592 1666 1789 910 535 1083 1614 1473 1790 680 768 1791 1792 1293 1793 1342 1794 231 1061 409 1795 1310 1796 223 1497 372 106 1797 1629 1798 1348 1799 1628 1800 694 628 25 1801 1633 1529 1767 1627 1802 1647 1124 963 1358 1803 1804 616 1585 269 686 208 1411 1769 1805 1104 660 879 1040 182 1806 548 529 1522 1796 903 1807 181 1808 1762 1260 1757 1809 1810 640 1791 1811 1812 798 1527 1813 627 1724 1814 1815 1085 1816 1817 1729 1706 541 1444 1634 1151 1809 1657 1548 1391 1818 495 1819 125 1697 1820 1668 1821 1576 1822 289 1823 345 1824 500 1413 1825 1826 587 1554 441 1827 1828 1532 292 1829 1830 1831 156 1832 1648 1696 1725 1188 1135 1361 1074 1833 1834 1193 1835 437 1836 1396 1834 1256 1780 1802 1837 1782 1838 1386 1398 1839 1840 1574 7 1509 792 885 1841 1758 1389 1842 1817 1745 867 1318 1655 1281 1843 69 1844 1845 1258 1846 1427 1220 1847 1735 417 1775 1848 1687 212 1849 158 285 743 1850 1851 511 1423 1852 1635 1185 1551 48 1853 1269 1836 1685 322 790 1440 1854 681 1824 520 1855 1856 1857 1858 871 1771 1131 1454 1859 1860 1150 143 1589 1332 1861 615 1393 909 1590 1862 1225 58 476 1686 996 630 1004 1863 160 59 1857 1472 1864 1387 1865 313 1866 1183 1489 1867 1560 114 1868 1869 1242 192 1870 1871 1504 1168 1684 1872 1873 1874 710 1650 1875 1039 1304 1596 1827 1727 1876 1592 1877 1870 1878 611 1401 584 61 1397 1498 1322 97 1879 1880 1800 1772 966 1881 1882 1822 1144 1731 1883 1224 1659 914 1884 1546 1885 1068 1617 1784 1886 1887 397 1670 1888 1689 1879 1746 883 778 1889 1054 222 969 1845 1890 1210 746 1806 1891 1850 129 1748 1892 451 1170 1033 1893 1388 1894 100 275 4 912 1810 991 1447 123 1895 1896 1897 1875 936 1869 1165 1898 1876 473 1739 1897 1370 1320 1278 1562 1899 986 1621 1900 1608 1115 1823 1652 1693 1901 479 1859 1795 370 1362 636 1759 46 1818 1902 1903 908 752 1895 1435 1807 1376 880 1904 900 1754 72 913 1355 1855 1877 987 1737 371 1533 1598 1861 1885 1164 1520 1905 1333 762 1906 1708 1603 982 1907 1908 1261 1909 342 748 619 1847 1840 1910 981 1485 296 1003 1837 1905 1107 608 337 1239 1911 211 539 1833 675 196 1103 1700 922 1036 1624 1351 1077 1671 1152 1605 30 1231 1747 1678 570 1545 1200 1705 263 1912 1426 405 1891 651 1913 1092 1516 1868 1866 1914 1602 1915 316 1916 1215 1917 1528 1918 1736 948 1907 1140 1919 1329 1683 1465 1437 952 1578 1864 1832 1871 1213 141 1920 1477 623 1921 1922 1923 1400 1656 348 1167 626 930 1924 1901 1925 828 907 1667 588 1738 1828 1048 896 1723 1493 1914 314 1211 1926 98 169 1467 876 1719 1790 1927 1928 1854 1722 1464 121 994 791 272 1929 1930 1931 698 1557 254 206 1704 1701 1660 1194 1323 644 1018 1786 1932 1933 1573 937 1651 1649 51 1486 1815 246 742 751 1680 521 1934 1917 1353 1768 1274 1873 1831 1803 1912 537 610 108 821 1776 1894 1835 574 1935 1474 1830 1936 556 198 60 1937 1742 1938 221 1939 89 332 1161 145 939 1744 544 1420 1368 935 1940 658 195 1787 1022 591 1941 1853 1373 1316 1939 1234 720 1034 399 1340 392 1459 1938 812 1568 1159 1446 852 1942 1889 562 1774 1943 1441 516 44 1142 758 1111 1942 1770 234 1922 731 1944 237 1443 1451 1186 1808 962 1346 1245 823 704 1872 760 1277 976 1173 166 892 1481 132 240 861 214 1208 1233 462 656 1207 1177 1892 1945 444 1926 1707 1910 1880 1946 526 933 960 1947 1948 870 810 1826 1949 726 1950 517 1141 1951 1417 70 23 1288 745 846 919 865 1571 1734 309 185 635 631 884 639 725 146 1324 406 1741 1952 1717 1883 1890 701 1584 1618 1663 1909 224 1953 860 633 1030 1874 1279 650 1954 1955 1078 1577 366 1699 183 119 1321 1192 1726 1848 1181 843 1940 1956 359 1764 1957 144 1517 154 1958 953 1924 1919 49 1710 1959 1721 1379 112 236 1960 350 1214 1961 1041 1255 1733 1247 1962 1341 1352 518 197 1246 601 203 1881 1291 782 1653 1963 1695 1524 1959 1918 1044 1953 559 200 1842 1773 1505 1518 1616 954 1785 249 217 1943 1896 878 1964 1237 233 1581 1521 1778 1129 1402 252 898 1965 1966 1113 1967 1531 1382 1968 1259 1749 446 1569 1969 1296 739 684 363 1799 1674 255 692 740 1692 882 1654 567 243 1550 777 1968 1071 561 1615 756 1572 575 1937 1903 1766 1407 848 1898 1306 1094 380 1625 750 1970 1535 1196 1971 1935 1549 270 1972 1631 1008 1973 1852 1974 1611 1975 929 858 1976 1923 722 1977 1175 115 1813 424 1925 1863 1978 806 1613 1544 1665 1952 1867 1816 1962 1740 1886 1979 1980 1981 1029 1976 260 268 1422 404 1586 1360 703 1948 1957 1507 1967 869 344 384 1204 1579 527 1761 1020 1982 1254 139 1964 1945 124 1965 1272 891 360 1558 283 1395 35 1899 1484 670 96 1949 118 323 1463 1878 1153 1971 1977 1841 1079 1715 1920 1805 1752 1882 1055 1911 1496 1981 1123 1983 957 1202 1884 1219 1974 267 1783 1984 1985 1825 1024 116 1408 489 1811 1374 47 333 1986 365 414 1950 1570 432 1829 2 983 1564 1676 1383 964 1980 796 709 1820 1987 16 1944 1988 1236 1989 1955 450 1990 1295 805 1929 973 1045 530 1753 1851 1991 1788 1992 1792 1993 1819 716 1994 1908 1975 1096 1091 1982 1583 1991 1995 1539 1530 1552 1317 1460 1147 1580 1428 1888 1198 330 1286 784 809 1171 142 303 1996 1916 1860 1997 99 1492 741 258 747 484 1375 1814 1157 1998 1992 1452 667 1765 1508 1434 1575 1593 1145 199 923 1986 1328 757 647 1969 1490 874 1228 512 1645 1711 653 1961 483 1915 1690 540 1902 1932 1846 546 940 1958 1713 1098 729 1987 1698 52 232 1606 1934 832 1285 1755 1931 1956 1999 45 1623 1062 1751 75 925 1995 1913 1960 1330 1415 1638 1963 95 818 691 1703 1794 931 1709 1951 1984 1494 597 1406 911 1856 1303 1970 85 354 1432 1906 595 1053 1954 1865 262 1821 454 423 1979 1756 1763 1730 1972 1587 1994 718 833 1632 1887 2000 1858 920 1597 1893 1006 1997 1990 1016 1646 1122 308 1366 1930 1978 1688 1350 1793 850 1641 1966 408 813 1743 1250 1644 1138 251 1849 522 1844 1804 1267 1941 1691 1993 1927 1839 1928 1812 708 1319 1988 545 107 1327 1760 816 1904 606 1325 1567 1779 819 1797 620 1716 1989 1983 1798 1594 180 1750 1947 1121 1998 1543 1604 1862 2001 1777 1946 1996 557 159 1037 386 1694 1412 536 1392 1512 1002 629 1781 1843 1679 1985 1999 1502 1197 1622 1728 847 1032 1973 1007 78 456 1921 984 1677 1936 1227 168 1591 1933 1789 1023 1331 1643 379 2000 148 1900 1838 1536 770 1672 2001 1599 568 1712 1801 8 1119 1456 gts-snapshot-121130/test/boolean/surfaces/t10000644000175100017510000000007612055775440015654 000000000000003 3 1 1 0 0 A 0 1 0 B -1 0 0 C 1 2 AB 2 3 BC 3 1 CA 1 2 3 ABC gts-snapshot-121130/test/boolean/surfaces/2.gts0000644000175100017510000126616512055775440016303 00000000000000722 2160 1440 -50.000004 68.442886 118.442886 -50.000004 70.188126 118.427658 -50.000004 71.932838 118.381966 -50.000004 73.676483 118.305840 -50.000004 75.418533 118.199295 -50.000004 77.158463 118.062355 -50.000004 78.895737 117.895073 -50.000004 80.629822 117.697502 -50.000004 82.360199 117.469696 -50.000004 84.086334 117.211723 -50.000004 85.807709 116.923660 -50.000004 87.523788 116.605606 -50.000004 89.234055 116.257645 -50.000004 90.937988 115.879890 -50.000004 92.635078 115.472458 -50.000004 94.324791 115.035469 -50.000004 96.006622 114.569054 -50.000004 97.680054 114.073364 -50.000004 99.344589 113.548538 -50.000004 100.999702 112.994743 -50.000004 102.644897 112.412148 -50.000004 104.279678 111.800926 -50.000004 105.903549 111.161270 -50.000004 107.515999 110.493370 -50.000004 109.116547 109.797432 -50.000004 110.704712 109.073662 -50.000004 112.279999 108.322289 -50.000004 113.841934 107.543541 -50.000004 115.390045 106.737648 -50.000004 116.923843 105.904854 -50.000004 118.442886 105.045425 -50.000004 119.946693 104.159615 -50.000004 121.434814 103.247696 -50.000004 122.906792 102.309944 -50.000004 124.362175 101.346642 -50.000004 125.800529 100.358093 -50.000004 127.221413 99.344589 -50.000004 128.624390 98.306435 -50.000004 130.009033 97.243965 -50.000004 131.374924 96.157486 -50.000004 132.721649 95.047333 -50.000004 134.048798 93.913841 -50.000004 135.355957 92.757370 -50.000004 136.642731 91.578255 -50.000004 137.908722 90.376869 -50.000004 139.153564 89.153564 -50.000004 140.376862 87.908722 -50.000004 141.578247 86.642723 -50.000004 142.757370 85.355949 -50.000004 143.913849 84.048790 -50.000004 145.047333 82.721649 -50.000004 146.157486 81.374924 -50.000004 147.243958 80.009033 -50.000004 148.306427 78.624390 -50.000004 149.344589 77.221405 -50.000004 150.358093 75.800522 -50.000004 151.346649 74.362167 -50.000004 152.309937 72.906784 -50.000004 153.247696 71.434814 -50.000004 154.159607 69.946686 -50.000004 155.045425 68.442886 -50.000004 155.904846 66.923843 -50.000004 156.737640 65.390038 -50.000004 157.543549 63.841934 -50.000004 158.322296 62.279999 -50.000000 159.073669 60.704708 -50.000000 159.797424 59.116547 -50.000000 160.493378 57.515995 -50.000000 161.161270 55.903542 -50.000000 161.800934 54.279678 -50.000000 162.412140 52.644897 -50.000000 162.994751 50.999699 -50.000000 163.548538 49.344582 -50.000000 164.073364 47.680054 -50.000000 164.569061 46.006622 -50.000000 165.035461 44.324791 -50.000000 165.472458 42.635075 -50.000000 165.879883 40.937988 -50.000000 166.257645 39.234055 -50.000000 166.605606 37.523785 -50.000000 166.923660 35.807701 -50.000000 167.211731 34.086330 -50.000000 167.469696 32.360195 -50.000000 167.697510 30.629818 -50.000000 167.895081 28.895731 -50.000000 168.062347 27.158459 -50.000000 168.199295 25.418531 -50.000000 168.305847 23.676479 -50.000000 168.381958 21.932835 -50.000000 168.427658 20.188126 -50.000000 168.442886 18.442884 -50.000000 168.427658 16.697643 -50.000000 168.381958 14.952934 -50.000000 168.305847 13.209288 -50.000000 168.199295 11.467237 -50.000000 168.062347 9.727310 -50.000000 167.895081 7.990038 -50.000000 167.697510 6.255950 -50.000000 167.469696 4.525575 -50.000000 167.211731 2.799438 -50.000000 166.923660 1.078066 -50.000000 166.605606 -0.638016 -50.000000 166.257645 -2.348284 -50.000000 165.879883 -4.052221 -50.000000 165.472458 -5.749306 -50.000000 165.035461 -7.439020 -50.000000 164.569061 -9.120852 -50.000000 164.073364 -10.794287 -50.000000 163.548538 -12.458815 -50.000000 162.994751 -14.113934 -50.000000 162.412140 -15.759132 -50.000000 161.800934 -17.393913 -50.000000 161.161270 -19.017776 -50.000000 160.493378 -20.630230 -50.000000 159.797424 -22.230782 -50.000000 159.073669 -23.818943 -49.999996 158.322296 -25.394234 -49.999996 157.543549 -26.956169 -49.999996 156.737640 -28.504272 -49.999996 155.904846 -30.038078 -49.999996 155.045425 -31.557117 -49.999996 154.159607 -33.060925 -49.999996 153.247696 -34.549046 -49.999996 152.309937 -36.021023 -49.999996 151.346649 -37.476406 -49.999996 150.358093 -38.914761 -49.999996 149.344589 -40.335644 -49.999996 148.306427 -41.738621 -49.999996 147.243958 -43.123264 -49.999996 146.157486 -44.489155 -49.999996 145.047333 -45.835876 -49.999996 143.913849 -47.163017 -49.999996 142.757370 -48.470177 -49.999996 141.578247 -49.756950 -49.999996 140.376862 -51.022949 -49.999996 139.153564 -52.267792 -49.999996 137.908722 -53.491096 -49.999996 136.642731 -54.692482 -49.999996 135.355957 -55.871597 -49.999996 134.048798 -57.028069 -49.999996 132.721649 -58.161560 -49.999996 131.374924 -59.271713 -49.999996 130.009033 -60.358192 -49.999996 128.624390 -61.420662 -49.999996 127.221413 -62.458817 -49.999996 125.800529 -63.472321 -49.999996 124.362175 -64.460869 -49.999996 122.906792 -65.424171 -49.999996 121.434814 -66.361923 -49.999996 119.946693 -67.273842 -49.999996 118.442886 -68.159653 -49.999996 116.923843 -69.019081 -49.999996 115.390045 -69.851875 -49.999996 113.841934 -70.657768 -49.999996 112.279999 -71.436516 -49.999996 110.704712 -72.187889 -49.999996 109.116547 -72.911659 -49.999996 107.515999 -73.607597 -49.999996 105.903549 -74.275497 -49.999996 104.279678 -74.915154 -49.999996 102.644897 -75.526375 -49.999996 100.999702 -76.108971 -49.999996 99.344589 -76.662766 -49.999996 97.680054 -77.187592 -49.999996 96.006622 -77.683281 -49.999996 94.324791 -78.149696 -49.999996 92.635078 -78.586685 -49.999996 90.937988 -78.994118 -49.999996 89.234055 -79.371872 -49.999996 87.523788 -79.719833 -49.999996 85.807709 -80.037888 -49.999996 84.086334 -80.325951 -49.999996 82.360199 -80.583923 -49.999996 80.629822 -80.811729 -49.999996 78.895737 -81.009300 -49.999996 77.158463 -81.176582 -49.999996 75.418533 -81.313522 -49.999996 73.676483 -81.420067 -49.999996 71.932838 -81.496193 -49.999996 70.188126 -81.541885 -49.999996 68.442886 -81.557114 -49.999996 66.697647 -81.541885 -49.999996 64.952934 -81.496193 -49.999996 63.209290 -81.420067 -49.999996 61.467239 -81.313522 -49.999996 59.727310 -81.176582 -49.999996 57.990040 -81.009300 -49.999996 56.255951 -80.811729 -49.999996 54.525578 -80.583923 -49.999996 52.799438 -80.325951 -49.999996 51.078068 -80.037888 -49.999996 49.361984 -79.719833 -49.999996 47.651718 -79.371872 -49.999996 45.947781 -78.994118 -49.999996 44.250694 -78.586685 -49.999996 42.560982 -78.149696 -49.999996 40.879150 -77.683281 -49.999996 39.205715 -77.187592 -49.999996 37.541187 -76.662766 -49.999996 35.886070 -76.108971 -49.999996 34.240871 -75.526375 -49.999996 32.606091 -74.915154 -49.999996 30.982227 -74.275497 -49.999996 29.369774 -73.607597 -49.999996 27.769222 -72.911659 -49.999996 26.181061 -72.187889 -49.999996 24.605770 -71.436516 -49.999996 23.043835 -70.657768 -49.999996 21.495731 -69.851875 -49.999996 19.961926 -69.019081 -49.999996 18.442886 -68.159653 -49.999996 16.939079 -67.273842 -49.999996 15.450958 -66.361923 -49.999996 13.978981 -65.424171 -49.999996 12.523598 -64.460869 -49.999996 11.085243 -63.472321 -49.999996 9.664360 -62.458817 -49.999996 8.261383 -61.420662 -49.999996 6.876740 -60.358192 -49.999996 5.510849 -59.271713 -49.999996 4.164124 -58.161560 -49.999996 2.836983 -57.028069 -49.999996 1.529823 -55.871597 -49.999996 0.243050 -54.692482 -49.999996 -1.022949 -53.491096 -49.999996 -2.267792 -52.267792 -49.999996 -3.491096 -51.022949 -49.999996 -4.692482 -49.756950 -49.999996 -5.871597 -48.470177 -49.999996 -7.028069 -47.163017 -49.999996 -8.161560 -45.835876 -49.999996 -9.271713 -44.489155 -49.999996 -10.358192 -43.123264 -49.999996 -11.420662 -41.738621 -49.999996 -12.458817 -40.335644 -49.999996 -13.472321 -38.914761 -49.999996 -14.460869 -37.476406 -49.999996 -15.424171 -36.021023 -49.999996 -16.361923 -34.549046 -49.999996 -17.273842 -33.060925 -49.999996 -18.159653 -31.557117 -49.999996 -19.019081 -30.038078 -49.999996 -19.851875 -28.504272 -49.999996 -20.657768 -26.956169 -49.999996 -21.436516 -25.394234 -50.000000 -22.187889 -23.818943 -50.000000 -22.911659 -22.230782 -50.000000 -23.607597 -20.630230 -50.000000 -24.275497 -19.017776 -50.000000 -24.915154 -17.393913 -50.000000 -25.526375 -15.759132 -50.000000 -26.108971 -14.113934 -50.000000 -26.662766 -12.458815 -50.000000 -27.187592 -10.794287 -50.000000 -27.683281 -9.120852 -50.000000 -28.149696 -7.439020 -50.000000 -28.586685 -5.749306 -50.000000 -28.994118 -4.052221 -50.000000 -29.371872 -2.348284 -50.000000 -29.719833 -0.638016 -50.000000 -30.037888 1.078066 -50.000000 -30.325951 2.799438 -50.000000 -30.583923 4.525575 -50.000000 -30.811729 6.255950 -50.000000 -31.009300 7.990038 -50.000000 -31.176582 9.727310 -50.000000 -31.313522 11.467237 -50.000000 -31.420067 13.209288 -50.000000 -31.496193 14.952934 -50.000000 -31.541885 16.697643 -50.000000 -31.557114 18.442884 -50.000000 -31.541885 20.188126 -50.000000 -31.496193 21.932835 -50.000000 -31.420067 23.676479 -50.000000 -31.313522 25.418531 -50.000000 -31.176582 27.158459 -50.000000 -31.009300 28.895731 -50.000000 -30.811729 30.629818 -50.000000 -30.583923 32.360195 -50.000000 -30.325951 34.086330 -50.000000 -30.037888 35.807701 -50.000000 -29.719833 37.523785 -50.000000 -29.371872 39.234055 -50.000000 -28.994118 40.937988 -50.000000 -28.586685 42.635075 -50.000000 -28.149696 44.324791 -50.000000 -27.683281 46.006622 -50.000000 -27.187592 47.680054 -50.000000 -26.662766 49.344582 -50.000000 -26.108971 50.999699 -50.000000 -25.526375 52.644897 -50.000000 -24.915154 54.279678 -50.000000 -24.275497 55.903542 -50.000000 -23.607597 57.515995 -50.000000 -22.911659 59.116547 -50.000000 -22.187889 60.704708 -50.000004 -21.436516 62.279999 -50.000004 -20.657768 63.841934 -50.000004 -19.851875 65.390038 -50.000004 -19.019081 66.923843 -50.000004 -18.159653 68.442886 -50.000004 -17.273842 69.946686 -50.000004 -16.361923 71.434814 -50.000004 -15.424171 72.906784 -50.000004 -14.460869 74.362167 -50.000004 -13.472321 75.800522 -50.000004 -12.458817 77.221405 -50.000004 -11.420662 78.624390 -50.000004 -10.358192 80.009033 -50.000004 -9.271713 81.374924 -50.000004 -8.161560 82.721649 -50.000004 -7.028069 84.048790 -50.000004 -5.871597 85.355949 -50.000004 -4.692482 86.642723 -50.000004 -3.491096 87.908722 -50.000004 -2.267792 89.153564 -50.000004 -1.022949 90.376869 -50.000004 0.243050 91.578255 -50.000004 1.529823 92.757370 -50.000004 2.836983 93.913841 -50.000004 4.164124 95.047333 -50.000004 5.510849 96.157486 -50.000004 6.876740 97.243965 -50.000004 8.261383 98.306435 -50.000004 9.664360 99.344589 -50.000004 11.085243 100.358093 -50.000004 12.523598 101.346642 -50.000004 13.978981 102.309944 -50.000004 15.450958 103.247696 -50.000004 16.939079 104.159615 -50.000004 18.442886 105.045425 -50.000004 19.961926 105.904854 -50.000004 21.495731 106.737648 -50.000004 23.043835 107.543541 -50.000004 24.605770 108.322289 -50.000004 26.181061 109.073662 -50.000004 27.769222 109.797432 -50.000004 29.369774 110.493370 -50.000004 30.982227 111.161270 -50.000004 32.606091 111.800926 -50.000004 34.240871 112.412148 -50.000004 35.886070 112.994743 -50.000004 37.541187 113.548538 -50.000004 39.205715 114.073364 -50.000004 40.879150 114.569054 -50.000004 42.560982 115.035469 -50.000004 44.250694 115.472458 -50.000004 45.947781 115.879890 -50.000004 47.651718 116.257645 -50.000004 49.361984 116.605606 -50.000004 51.078068 116.923660 -50.000004 52.799438 117.211723 -50.000004 54.525578 117.469696 -50.000004 56.255951 117.697502 -50.000004 57.990040 117.895073 -50.000004 59.727310 118.062355 -50.000004 61.467239 118.199295 -50.000004 63.209290 118.305840 -50.000004 64.952934 118.381966 -50.000004 66.697647 118.427658 -0.000004 68.442886 108.442886 -0.000004 70.013603 108.429176 -0.000004 71.583839 108.388062 -0.000004 73.153122 108.319542 -0.000004 74.720970 108.223648 -0.000004 76.286903 108.100410 -0.000004 77.850449 107.949860 -0.000004 79.411125 107.772041 -0.000004 80.968468 107.567009 -0.000004 82.521988 107.334839 -0.000004 84.071220 107.075584 -0.000004 85.615692 106.789330 -0.000004 87.154938 106.476173 -0.000004 88.688477 106.136192 -0.000004 90.215858 105.769501 -0.000004 91.736603 105.376213 -0.000004 93.250244 104.956436 -0.000004 94.756340 104.510315 -0.000004 96.254417 104.037971 -0.000004 97.744019 103.539558 -0.000004 99.224701 103.015221 -0.000004 100.695999 102.465126 -0.000004 102.157478 101.889435 -0.000004 103.608688 101.288322 -0.000004 105.049179 100.661980 -0.000004 106.478531 100.010590 -0.000004 107.896286 99.334351 -0.000004 109.302032 98.633476 -0.000003 110.695328 97.908173 -0.000003 112.075752 97.158661 -0.000003 113.442886 96.385170 -0.000003 114.796310 95.587944 -0.000003 116.135620 94.767212 -0.000003 117.460403 93.923241 -0.000003 118.770248 93.056267 -0.000003 120.064766 92.166573 -0.000003 121.343559 91.254417 -0.000003 122.606239 90.320084 -0.000003 123.852417 89.363853 -0.000003 125.081726 88.386024 -0.000003 126.293770 87.386887 -0.000003 127.488197 86.366745 -0.000003 128.664642 85.325920 -0.000003 129.822739 84.264717 -0.000003 130.962143 83.183472 -0.000003 132.082489 82.082497 -0.000003 133.183472 80.962143 -0.000003 134.264709 79.822739 -0.000003 135.325928 78.664642 -0.000003 136.366745 77.488197 -0.000003 137.386887 76.293770 -0.000002 138.386017 75.081726 -0.000002 139.363861 73.852417 -0.000002 140.320084 72.606239 -0.000002 141.254425 71.343559 -0.000002 142.166565 70.064766 -0.000002 143.056274 68.770248 -0.000002 143.923248 67.460403 -0.000002 144.767212 66.135620 -0.000002 145.587952 64.796310 -0.000002 146.385162 63.442886 -0.000002 147.158661 62.075752 -0.000002 147.908173 60.695328 -0.000002 148.633484 59.302032 -0.000002 149.334351 57.896290 -0.000002 150.010590 56.478531 -0.000002 150.661987 55.049183 -0.000002 151.288330 53.608688 -0.000001 151.889435 52.157478 -0.000001 152.465118 50.696003 -0.000001 153.015228 49.224701 -0.000001 153.539551 47.744019 -0.000001 154.037964 46.254417 -0.000001 154.510315 44.756340 -0.000001 154.956436 43.250248 -0.000001 155.376221 41.736603 -0.000001 155.769501 40.215858 -0.000001 156.136200 38.688480 -0.000001 156.476166 37.154938 -0.000001 156.789337 35.615696 -0.000001 157.075592 34.071220 -0.000001 157.334839 32.521988 -0.000001 157.567017 30.968466 -0.000000 157.772034 29.411127 -0.000000 157.949860 27.850449 -0.000000 158.100403 26.286903 -0.000000 158.223648 24.720970 -0.000000 158.319550 23.153122 -0.000000 158.388062 21.583841 -0.000000 158.429169 20.013603 0.000000 158.442886 18.442886 0.000000 158.429169 16.872169 0.000000 158.388062 15.301931 0.000000 158.319550 13.732651 0.000000 158.223648 12.164804 0.000000 158.100403 10.598869 0.000000 157.949860 9.035325 0.000000 157.772034 7.474646 0.000001 157.567017 5.917307 0.000001 157.334839 4.363785 0.000001 157.075592 2.814550 0.000001 156.789337 1.270077 0.000001 156.476166 -0.269165 0.000001 156.136200 -1.802708 0.000001 155.769501 -3.330084 0.000001 155.376221 -4.850828 0.000001 154.956436 -6.364475 0.000001 154.510315 -7.870567 0.000001 154.037964 -9.368643 0.000001 153.539551 -10.858248 0.000001 153.015228 -12.338926 0.000001 152.465118 -13.810230 0.000001 151.889435 -15.271706 0.000002 151.288330 -16.722916 0.000002 150.661987 -18.163410 0.000002 150.010590 -19.592758 0.000002 149.334351 -21.010517 0.000002 148.633484 -22.416260 0.000002 147.908173 -23.809555 0.000002 147.158661 -25.189980 0.000002 146.385162 -26.557114 0.000002 145.587952 -27.910542 0.000002 144.767212 -29.249847 0.000002 143.923248 -30.574627 0.000002 143.056274 -31.884476 0.000002 142.166565 -33.178993 0.000002 141.254425 -34.457787 0.000002 140.320084 -35.720467 0.000002 139.363861 -36.966648 0.000002 138.386017 -38.195950 0.000003 137.386887 -39.407997 0.000003 136.366745 -40.602425 0.000003 135.325928 -41.778870 0.000003 134.264709 -42.936966 0.000003 133.183472 -44.076366 0.000003 132.082489 -45.196724 0.000003 130.962143 -46.297699 0.000003 129.822739 -47.378944 0.000003 128.664642 -48.440147 0.000003 127.488197 -49.480972 0.000003 126.293770 -50.501114 0.000003 125.081726 -51.500252 0.000003 123.852417 -52.478081 0.000003 122.606239 -53.434311 0.000003 121.343559 -54.368645 0.000003 120.064766 -55.280800 0.000003 118.770248 -56.170494 0.000003 117.460403 -57.037468 0.000003 116.135620 -57.881439 0.000003 114.796310 -58.702171 0.000003 113.442886 -59.499397 0.000003 112.075752 -60.272888 0.000003 110.695328 -61.022400 0.000004 109.302032 -61.747704 0.000004 107.896286 -62.448578 0.000004 106.478531 -63.124817 0.000004 105.049179 -63.776207 0.000004 103.608688 -64.402550 0.000004 102.157478 -65.003662 0.000004 100.695999 -65.579353 0.000004 99.224701 -66.129448 0.000004 97.744019 -66.653786 0.000004 96.254417 -67.152199 0.000004 94.756340 -67.624542 0.000004 93.250244 -68.070663 0.000004 91.736603 -68.490440 0.000004 90.215858 -68.883728 0.000004 88.688477 -69.250420 0.000004 87.154938 -69.590401 0.000004 85.615692 -69.903557 0.000004 84.071220 -70.189812 0.000004 82.521988 -70.449066 0.000004 80.968468 -70.681236 0.000004 79.411125 -70.886269 0.000004 77.850449 -71.064087 0.000004 76.286903 -71.214638 0.000004 74.720970 -71.337875 0.000004 73.153122 -71.433769 0.000004 71.583839 -71.502289 0.000004 70.013603 -71.543404 0.000004 68.442886 -71.557114 0.000004 66.872169 -71.543404 0.000004 65.301933 -71.502289 0.000004 63.732651 -71.433769 0.000004 62.164803 -71.337875 0.000004 60.598869 -71.214638 0.000004 59.035324 -71.064087 0.000004 57.474648 -70.886269 0.000004 55.917305 -70.681236 0.000004 54.363785 -70.449066 0.000004 52.814552 -70.189812 0.000004 51.270077 -69.903557 0.000004 49.730835 -69.590401 0.000004 48.197292 -69.250420 0.000004 46.669914 -68.883728 0.000004 45.149170 -68.490440 0.000004 43.635525 -68.070663 0.000004 42.129433 -67.624542 0.000004 40.631355 -67.152199 0.000004 39.141754 -66.653786 0.000004 37.661072 -66.129448 0.000004 36.189770 -65.579353 0.000004 34.728294 -65.003662 0.000004 33.277084 -64.402550 0.000004 31.836590 -63.776207 0.000004 30.407242 -63.124817 0.000004 28.989483 -62.448578 0.000004 27.583740 -61.747704 0.000003 26.190445 -61.022400 0.000003 24.810020 -60.272888 0.000003 23.442886 -59.499397 0.000003 22.089458 -58.702171 0.000003 20.750153 -57.881439 0.000003 19.425373 -57.037468 0.000003 18.115524 -56.170494 0.000003 16.821007 -55.280800 0.000003 15.542213 -54.368645 0.000003 14.279533 -53.434311 0.000003 13.033352 -52.478081 0.000003 11.804050 -51.500252 0.000003 10.592003 -50.501114 0.000003 9.397575 -49.480972 0.000003 8.221130 -48.440147 0.000003 7.063034 -47.378944 0.000003 5.923634 -46.297699 0.000003 4.803276 -45.196724 0.000003 3.702301 -44.076366 0.000003 2.621056 -42.936966 0.000003 1.559853 -41.778870 0.000003 0.519028 -40.602425 0.000003 -0.501114 -39.407997 0.000002 -1.500252 -38.195950 0.000002 -2.478081 -36.966648 0.000002 -3.434311 -35.720467 0.000002 -4.368645 -34.457787 0.000002 -5.280800 -33.178993 0.000002 -6.170494 -31.884476 0.000002 -7.037468 -30.574627 0.000002 -7.881439 -29.249847 0.000002 -8.702171 -27.910542 0.000002 -9.499397 -26.557114 0.000002 -10.272888 -25.189980 0.000002 -11.022400 -23.809555 0.000002 -11.747704 -22.416260 0.000002 -12.448578 -21.010517 0.000002 -13.124817 -19.592758 0.000002 -13.776207 -18.163410 0.000002 -14.402550 -16.722916 0.000001 -15.003662 -15.271706 0.000001 -15.579353 -13.810230 0.000001 -16.129448 -12.338926 0.000001 -16.653786 -10.858248 0.000001 -17.152199 -9.368643 0.000001 -17.624542 -7.870567 0.000001 -18.070663 -6.364475 0.000001 -18.490440 -4.850828 0.000001 -18.883728 -3.330084 0.000001 -19.250420 -1.802708 0.000001 -19.590401 -0.269165 0.000001 -19.903557 1.270077 0.000001 -20.189812 2.814550 0.000001 -20.449066 4.363785 0.000001 -20.681236 5.917307 0.000000 -20.886269 7.474646 0.000000 -21.064087 9.035325 0.000000 -21.214638 10.598869 0.000000 -21.337875 12.164804 0.000000 -21.433769 13.732651 0.000000 -21.502289 15.301931 0.000000 -21.543404 16.872169 0.000000 -21.557114 18.442886 -0.000000 -21.543404 20.013603 -0.000000 -21.502289 21.583841 -0.000000 -21.433769 23.153122 -0.000000 -21.337875 24.720970 -0.000000 -21.214638 26.286903 -0.000000 -21.064087 27.850449 -0.000000 -20.886269 29.411127 -0.000001 -20.681236 30.968466 -0.000001 -20.449066 32.521988 -0.000001 -20.189812 34.071220 -0.000001 -19.903557 35.615696 -0.000001 -19.590401 37.154938 -0.000001 -19.250420 38.688480 -0.000001 -18.883728 40.215858 -0.000001 -18.490440 41.736603 -0.000001 -18.070663 43.250248 -0.000001 -17.624542 44.756340 -0.000001 -17.152199 46.254417 -0.000001 -16.653786 47.744019 -0.000001 -16.129448 49.224701 -0.000001 -15.579353 50.696003 -0.000001 -15.003662 52.157478 -0.000002 -14.402550 53.608688 -0.000002 -13.776207 55.049183 -0.000002 -13.124817 56.478531 -0.000002 -12.448578 57.896290 -0.000002 -11.747704 59.302032 -0.000002 -11.022400 60.695328 -0.000002 -10.272888 62.075752 -0.000002 -9.499397 63.442886 -0.000002 -8.702171 64.796310 -0.000002 -7.881439 66.135620 -0.000002 -7.037468 67.460403 -0.000002 -6.170494 68.770248 -0.000002 -5.280800 70.064766 -0.000002 -4.368645 71.343559 -0.000002 -3.434311 72.606239 -0.000002 -2.478081 73.852417 -0.000002 -1.500252 75.081726 -0.000003 -0.501114 76.293770 -0.000003 0.519028 77.488197 -0.000003 1.559853 78.664642 -0.000003 2.621056 79.822739 -0.000003 3.702301 80.962143 -0.000003 4.803276 82.082497 -0.000003 5.923634 83.183472 -0.000003 7.063034 84.264717 -0.000003 8.221130 85.325920 -0.000003 9.397575 86.366745 -0.000003 10.592003 87.386887 -0.000003 11.804050 88.386024 -0.000003 13.033352 89.363853 -0.000003 14.279533 90.320084 -0.000003 15.542213 91.254417 -0.000003 16.821007 92.166573 -0.000003 18.115524 93.056267 -0.000003 19.425373 93.923241 -0.000003 20.750153 94.767212 -0.000003 22.089458 95.587944 -0.000003 23.442886 96.385170 -0.000003 24.810020 97.158661 -0.000003 26.190445 97.908173 -0.000004 27.583740 98.633476 -0.000004 28.989483 99.334351 -0.000004 30.407242 100.010590 -0.000004 31.836590 100.661980 -0.000004 33.277084 101.288322 -0.000004 34.728294 101.889435 -0.000004 36.189770 102.465126 -0.000004 37.661072 103.015221 -0.000004 39.141754 103.539558 -0.000004 40.631355 104.037971 -0.000004 42.129433 104.510315 -0.000004 43.635525 104.956436 -0.000004 45.149170 105.376213 -0.000004 46.669914 105.769501 -0.000004 48.197292 106.136192 -0.000004 49.730835 106.476173 -0.000004 51.270077 106.789330 -0.000004 52.814552 107.075584 -0.000004 54.363785 107.334839 -0.000004 55.917305 107.567009 -0.000004 57.474648 107.772041 -0.000004 59.035324 107.949860 -0.000004 60.598869 108.100410 -0.000004 62.164803 108.223648 -0.000004 63.732651 108.319542 -0.000004 65.301933 108.388062 -0.000004 66.872169 108.429176 -50.000999 73.442886 22.442884 -0.001000 72.442886 23.442886 2 1 721 1 1 361 362 361 722 361 361 2 3 2 721 2 2 362 363 362 722 362 362 3 4 3 721 3 3 363 364 363 722 363 363 4 5 4 721 4 4 364 365 364 722 364 364 5 6 5 721 5 5 365 366 365 722 365 365 6 7 6 721 6 6 366 367 366 722 366 366 7 8 7 721 7 7 367 368 367 722 367 367 8 9 8 721 8 8 368 369 368 722 368 368 9 10 9 721 9 9 369 370 369 722 369 369 10 11 10 721 10 10 370 371 370 722 370 370 11 12 11 721 11 11 371 372 371 722 371 371 12 13 12 721 12 12 372 373 372 722 372 372 13 14 13 721 13 13 373 374 373 722 373 373 14 15 14 721 14 14 374 375 374 722 374 374 15 16 15 721 15 15 375 376 375 722 375 375 16 17 16 721 16 16 376 377 376 722 376 376 17 18 17 721 17 17 377 378 377 722 377 377 18 19 18 721 18 18 378 379 378 722 378 378 19 20 19 721 19 19 379 380 379 722 379 379 20 21 20 721 20 20 380 381 380 722 380 380 21 22 21 721 21 21 381 382 381 722 381 381 22 23 22 721 22 22 382 383 382 722 382 382 23 24 23 721 23 23 383 384 383 722 383 383 24 25 24 721 24 24 384 385 384 722 384 384 25 26 25 721 25 25 385 386 385 722 385 385 26 27 26 721 26 26 386 387 386 722 386 386 27 28 27 721 27 27 387 388 387 722 387 387 28 29 28 721 28 28 388 389 388 722 388 388 29 30 29 721 29 29 389 390 389 722 389 389 30 31 30 721 30 30 390 391 390 722 390 390 31 32 31 721 31 31 391 392 391 722 391 391 32 33 32 721 32 32 392 393 392 722 392 392 33 34 33 721 33 33 393 394 393 722 393 393 34 35 34 721 34 34 394 395 394 722 394 394 35 36 35 721 35 35 395 396 395 722 395 395 36 37 36 721 36 36 396 397 396 722 396 396 37 38 37 721 37 37 397 398 397 722 397 397 38 39 38 721 38 38 398 399 398 722 398 398 39 40 39 721 39 39 399 400 399 722 399 399 40 41 40 721 40 40 400 401 400 722 400 400 41 42 41 721 41 41 401 402 401 722 401 401 42 43 42 721 42 42 402 403 402 722 402 402 43 44 43 721 43 43 403 404 403 722 403 403 44 45 44 721 44 44 404 405 404 722 404 404 45 46 45 721 45 45 405 406 405 722 405 405 46 47 46 721 46 46 406 407 406 722 406 406 47 48 47 721 47 47 407 408 407 722 407 407 48 49 48 721 48 48 408 409 408 722 408 408 49 50 49 721 49 49 409 410 409 722 409 409 50 51 50 721 50 50 410 411 410 722 410 410 51 52 51 721 51 51 411 412 411 722 411 411 52 53 52 721 52 52 412 413 412 722 412 412 53 54 53 721 53 53 413 414 413 722 413 413 54 55 54 721 54 54 414 415 414 722 414 414 55 56 55 721 55 55 415 416 415 722 415 415 56 57 56 721 56 56 416 417 416 722 416 416 57 58 57 721 57 57 417 418 417 722 417 417 58 59 58 721 58 58 418 419 418 722 418 418 59 60 59 721 59 59 419 420 419 722 419 419 60 61 60 721 60 60 420 421 420 722 420 420 61 62 61 721 61 61 421 422 421 722 421 421 62 63 62 721 62 62 422 423 422 722 422 422 63 64 63 721 63 63 423 424 423 722 423 423 64 65 64 721 64 64 424 425 424 722 424 424 65 66 65 721 65 65 425 426 425 722 425 425 66 67 66 721 66 66 426 427 426 722 426 426 67 68 67 721 67 67 427 428 427 722 427 427 68 69 68 721 68 68 428 429 428 722 428 428 69 70 69 721 69 69 429 430 429 722 429 429 70 71 70 721 70 70 430 431 430 722 430 430 71 72 71 721 71 71 431 432 431 722 431 431 72 73 72 721 72 72 432 433 432 722 432 432 73 74 73 721 73 73 433 434 433 722 433 433 74 75 74 721 74 74 434 435 434 722 434 434 75 76 75 721 75 75 435 436 435 722 435 435 76 77 76 721 76 76 436 437 436 722 436 436 77 78 77 721 77 77 437 438 437 722 437 437 78 79 78 721 78 78 438 439 438 722 438 438 79 80 79 721 79 79 439 440 439 722 439 439 80 81 80 721 80 80 440 441 440 722 440 440 81 82 81 721 81 81 441 442 441 722 441 441 82 83 82 721 82 82 442 443 442 722 442 442 83 84 83 721 83 83 443 444 443 722 443 443 84 85 84 721 84 84 444 445 444 722 444 444 85 86 85 721 85 85 445 446 445 722 445 445 86 87 86 721 86 86 446 447 446 722 446 446 87 88 87 721 87 87 447 448 447 722 447 447 88 89 88 721 88 88 448 449 448 722 448 448 89 90 89 721 89 89 449 450 449 722 449 449 90 91 90 721 90 90 450 451 450 722 450 450 91 92 91 721 91 91 451 452 451 722 451 451 92 93 92 721 92 92 452 453 452 722 452 452 93 94 93 721 93 93 453 454 453 722 453 453 94 95 94 721 94 94 454 455 454 722 454 454 95 96 95 721 95 95 455 456 455 722 455 455 96 97 96 721 96 96 456 457 456 722 456 456 97 98 97 721 97 97 457 458 457 722 457 457 98 99 98 721 98 98 458 459 458 722 458 458 99 100 99 721 99 99 459 460 459 722 459 459 100 101 100 721 100 100 460 461 460 722 460 460 101 102 101 721 101 101 461 462 461 722 461 461 102 103 102 721 102 102 462 463 462 722 462 462 103 104 103 721 103 103 463 464 463 722 463 463 104 105 104 721 104 104 464 465 464 722 464 464 105 106 105 721 105 105 465 466 465 722 465 465 106 107 106 721 106 106 466 467 466 722 466 466 107 108 107 721 107 107 467 468 467 722 467 467 108 109 108 721 108 108 468 469 468 722 468 468 109 110 109 721 109 109 469 470 469 722 469 469 110 111 110 721 110 110 470 471 470 722 470 470 111 112 111 721 111 111 471 472 471 722 471 471 112 113 112 721 112 112 472 473 472 722 472 472 113 114 113 721 113 113 473 474 473 722 473 473 114 115 114 721 114 114 474 475 474 722 474 474 115 116 115 721 115 115 475 476 475 722 475 475 116 117 116 721 116 116 476 477 476 722 476 476 117 118 117 721 117 117 477 478 477 722 477 477 118 119 118 721 118 118 478 479 478 722 478 478 119 120 119 721 119 119 479 480 479 722 479 479 120 121 120 721 120 120 480 481 480 722 480 480 121 122 121 721 121 121 481 482 481 722 481 481 122 123 122 721 122 122 482 483 482 722 482 482 123 124 123 721 123 123 483 484 483 722 483 483 124 125 124 721 124 124 484 485 484 722 484 484 125 126 125 721 125 125 485 486 485 722 485 485 126 127 126 721 126 126 486 487 486 722 486 486 127 128 127 721 127 127 487 488 487 722 487 487 128 129 128 721 128 128 488 489 488 722 488 488 129 130 129 721 129 129 489 490 489 722 489 489 130 131 130 721 130 130 490 491 490 722 490 490 131 132 131 721 131 131 491 492 491 722 491 491 132 133 132 721 132 132 492 493 492 722 492 492 133 134 133 721 133 133 493 494 493 722 493 493 134 135 134 721 134 134 494 495 494 722 494 494 135 136 135 721 135 135 495 496 495 722 495 495 136 137 136 721 136 136 496 497 496 722 496 496 137 138 137 721 137 137 497 498 497 722 497 497 138 139 138 721 138 138 498 499 498 722 498 498 139 140 139 721 139 139 499 500 499 722 499 499 140 141 140 721 140 140 500 501 500 722 500 500 141 142 141 721 141 141 501 502 501 722 501 501 142 143 142 721 142 142 502 503 502 722 502 502 143 144 143 721 143 143 503 504 503 722 503 503 144 145 144 721 144 144 504 505 504 722 504 504 145 146 145 721 145 145 505 506 505 722 505 505 146 147 146 721 146 146 506 507 506 722 506 506 147 148 147 721 147 147 507 508 507 722 507 507 148 149 148 721 148 148 508 509 508 722 508 508 149 150 149 721 149 149 509 510 509 722 509 509 150 151 150 721 150 150 510 511 510 722 510 510 151 152 151 721 151 151 511 512 511 722 511 511 152 153 152 721 152 152 512 513 512 722 512 512 153 154 153 721 153 153 513 514 513 722 513 513 154 155 154 721 154 154 514 515 514 722 514 514 155 156 155 721 155 155 515 516 515 722 515 515 156 157 156 721 156 156 516 517 516 722 516 516 157 158 157 721 157 157 517 518 517 722 517 517 158 159 158 721 158 158 518 519 518 722 518 518 159 160 159 721 159 159 519 520 519 722 519 519 160 161 160 721 160 160 520 521 520 722 520 520 161 162 161 721 161 161 521 522 521 722 521 521 162 163 162 721 162 162 522 523 522 722 522 522 163 164 163 721 163 163 523 524 523 722 523 523 164 165 164 721 164 164 524 525 524 722 524 524 165 166 165 721 165 165 525 526 525 722 525 525 166 167 166 721 166 166 526 527 526 722 526 526 167 168 167 721 167 167 527 528 527 722 527 527 168 169 168 721 168 168 528 529 528 722 528 528 169 170 169 721 169 169 529 530 529 722 529 529 170 171 170 721 170 170 530 531 530 722 530 530 171 172 171 721 171 171 531 532 531 722 531 531 172 173 172 721 172 172 532 533 532 722 532 532 173 174 173 721 173 173 533 534 533 722 533 533 174 175 174 721 174 174 534 535 534 722 534 534 175 176 175 721 175 175 535 536 535 722 535 535 176 177 176 721 176 176 536 537 536 722 536 536 177 178 177 721 177 177 537 538 537 722 537 537 178 179 178 721 178 178 538 539 538 722 538 538 179 180 179 721 179 179 539 540 539 722 539 539 180 181 180 721 180 180 540 541 540 722 540 540 181 182 181 721 181 181 541 542 541 722 541 541 182 183 182 721 182 182 542 543 542 722 542 542 183 184 183 721 183 183 543 544 543 722 543 543 184 185 184 721 184 184 544 545 544 722 544 544 185 186 185 721 185 185 545 546 545 722 545 545 186 187 186 721 186 186 546 547 546 722 546 546 187 188 187 721 187 187 547 548 547 722 547 547 188 189 188 721 188 188 548 549 548 722 548 548 189 190 189 721 189 189 549 550 549 722 549 549 190 191 190 721 190 190 550 551 550 722 550 550 191 192 191 721 191 191 551 552 551 722 551 551 192 193 192 721 192 192 552 553 552 722 552 552 193 194 193 721 193 193 553 554 553 722 553 553 194 195 194 721 194 194 554 555 554 722 554 554 195 196 195 721 195 195 555 556 555 722 555 555 196 197 196 721 196 196 556 557 556 722 556 556 197 198 197 721 197 197 557 558 557 722 557 557 198 199 198 721 198 198 558 559 558 722 558 558 199 200 199 721 199 199 559 560 559 722 559 559 200 201 200 721 200 200 560 561 560 722 560 560 201 202 201 721 201 201 561 562 561 722 561 561 202 203 202 721 202 202 562 563 562 722 562 562 203 204 203 721 203 203 563 564 563 722 563 563 204 205 204 721 204 204 564 565 564 722 564 564 205 206 205 721 205 205 565 566 565 722 565 565 206 207 206 721 206 206 566 567 566 722 566 566 207 208 207 721 207 207 567 568 567 722 567 567 208 209 208 721 208 208 568 569 568 722 568 568 209 210 209 721 209 209 569 570 569 722 569 569 210 211 210 721 210 210 570 571 570 722 570 570 211 212 211 721 211 211 571 572 571 722 571 571 212 213 212 721 212 212 572 573 572 722 572 572 213 214 213 721 213 213 573 574 573 722 573 573 214 215 214 721 214 214 574 575 574 722 574 574 215 216 215 721 215 215 575 576 575 722 575 575 216 217 216 721 216 216 576 577 576 722 576 576 217 218 217 721 217 217 577 578 577 722 577 577 218 219 218 721 218 218 578 579 578 722 578 578 219 220 219 721 219 219 579 580 579 722 579 579 220 221 220 721 220 220 580 581 580 722 580 580 221 222 221 721 221 221 581 582 581 722 581 581 222 223 222 721 222 222 582 583 582 722 582 582 223 224 223 721 223 223 583 584 583 722 583 583 224 225 224 721 224 224 584 585 584 722 584 584 225 226 225 721 225 225 585 586 585 722 585 585 226 227 226 721 226 226 586 587 586 722 586 586 227 228 227 721 227 227 587 588 587 722 587 587 228 229 228 721 228 228 588 589 588 722 588 588 229 230 229 721 229 229 589 590 589 722 589 589 230 231 230 721 230 230 590 591 590 722 590 590 231 232 231 721 231 231 591 592 591 722 591 591 232 233 232 721 232 232 592 593 592 722 592 592 233 234 233 721 233 233 593 594 593 722 593 593 234 235 234 721 234 234 594 595 594 722 594 594 235 236 235 721 235 235 595 596 595 722 595 595 236 237 236 721 236 236 596 597 596 722 596 596 237 238 237 721 237 237 597 598 597 722 597 597 238 239 238 721 238 238 598 599 598 722 598 598 239 240 239 721 239 239 599 600 599 722 599 599 240 241 240 721 240 240 600 601 600 722 600 600 241 242 241 721 241 241 601 602 601 722 601 601 242 243 242 721 242 242 602 603 602 722 602 602 243 244 243 721 243 243 603 604 603 722 603 603 244 245 244 721 244 244 604 605 604 722 604 604 245 246 245 721 245 245 605 606 605 722 605 605 246 247 246 721 246 246 606 607 606 722 606 606 247 248 247 721 247 247 607 608 607 722 607 607 248 249 248 721 248 248 608 609 608 722 608 608 249 250 249 721 249 249 609 610 609 722 609 609 250 251 250 721 250 250 610 611 610 722 610 610 251 252 251 721 251 251 611 612 611 722 611 611 252 253 252 721 252 252 612 613 612 722 612 612 253 254 253 721 253 253 613 614 613 722 613 613 254 255 254 721 254 254 614 615 614 722 614 614 255 256 255 721 255 255 615 616 615 722 615 615 256 257 256 721 256 256 616 617 616 722 616 616 257 258 257 721 257 257 617 618 617 722 617 617 258 259 258 721 258 258 618 619 618 722 618 618 259 260 259 721 259 259 619 620 619 722 619 619 260 261 260 721 260 260 620 621 620 722 620 620 261 262 261 721 261 261 621 622 621 722 621 621 262 263 262 721 262 262 622 623 622 722 622 622 263 264 263 721 263 263 623 624 623 722 623 623 264 265 264 721 264 264 624 625 624 722 624 624 265 266 265 721 265 265 625 626 625 722 625 625 266 267 266 721 266 266 626 627 626 722 626 626 267 268 267 721 267 267 627 628 627 722 627 627 268 269 268 721 268 268 628 629 628 722 628 628 269 270 269 721 269 269 629 630 629 722 629 629 270 271 270 721 270 270 630 631 630 722 630 630 271 272 271 721 271 271 631 632 631 722 631 631 272 273 272 721 272 272 632 633 632 722 632 632 273 274 273 721 273 273 633 634 633 722 633 633 274 275 274 721 274 274 634 635 634 722 634 634 275 276 275 721 275 275 635 636 635 722 635 635 276 277 276 721 276 276 636 637 636 722 636 636 277 278 277 721 277 277 637 638 637 722 637 637 278 279 278 721 278 278 638 639 638 722 638 638 279 280 279 721 279 279 639 640 639 722 639 639 280 281 280 721 280 280 640 641 640 722 640 640 281 282 281 721 281 281 641 642 641 722 641 641 282 283 282 721 282 282 642 643 642 722 642 642 283 284 283 721 283 283 643 644 643 722 643 643 284 285 284 721 284 284 644 645 644 722 644 644 285 286 285 721 285 285 645 646 645 722 645 645 286 287 286 721 286 286 646 647 646 722 646 646 287 288 287 721 287 287 647 648 647 722 647 647 288 289 288 721 288 288 648 649 648 722 648 648 289 290 289 721 289 289 649 650 649 722 649 649 290 291 290 721 290 290 650 651 650 722 650 650 291 292 291 721 291 291 651 652 651 722 651 651 292 293 292 721 292 292 652 653 652 722 652 652 293 294 293 721 293 293 653 654 653 722 653 653 294 295 294 721 294 294 654 655 654 722 654 654 295 296 295 721 295 295 655 656 655 722 655 655 296 297 296 721 296 296 656 657 656 722 656 656 297 298 297 721 297 297 657 658 657 722 657 657 298 299 298 721 298 298 658 659 658 722 658 658 299 300 299 721 299 299 659 660 659 722 659 659 300 301 300 721 300 300 660 661 660 722 660 660 301 302 301 721 301 301 661 662 661 722 661 661 302 303 302 721 302 302 662 663 662 722 662 662 303 304 303 721 303 303 663 664 663 722 663 663 304 305 304 721 304 304 664 665 664 722 664 664 305 306 305 721 305 305 665 666 665 722 665 665 306 307 306 721 306 306 666 667 666 722 666 666 307 308 307 721 307 307 667 668 667 722 667 667 308 309 308 721 308 308 668 669 668 722 668 668 309 310 309 721 309 309 669 670 669 722 669 669 310 311 310 721 310 310 670 671 670 722 670 670 311 312 311 721 311 311 671 672 671 722 671 671 312 313 312 721 312 312 672 673 672 722 672 672 313 314 313 721 313 313 673 674 673 722 673 673 314 315 314 721 314 314 674 675 674 722 674 674 315 316 315 721 315 315 675 676 675 722 675 675 316 317 316 721 316 316 676 677 676 722 676 676 317 318 317 721 317 317 677 678 677 722 677 677 318 319 318 721 318 318 678 679 678 722 678 678 319 320 319 721 319 319 679 680 679 722 679 679 320 321 320 721 320 320 680 681 680 722 680 680 321 322 321 721 321 321 681 682 681 722 681 681 322 323 322 721 322 322 682 683 682 722 682 682 323 324 323 721 323 323 683 684 683 722 683 683 324 325 324 721 324 324 684 685 684 722 684 684 325 326 325 721 325 325 685 686 685 722 685 685 326 327 326 721 326 326 686 687 686 722 686 686 327 328 327 721 327 327 687 688 687 722 687 687 328 329 328 721 328 328 688 689 688 722 688 688 329 330 329 721 329 329 689 690 689 722 689 689 330 331 330 721 330 330 690 691 690 722 690 690 331 332 331 721 331 331 691 692 691 722 691 691 332 333 332 721 332 332 692 693 692 722 692 692 333 334 333 721 333 333 693 694 693 722 693 693 334 335 334 721 334 334 694 695 694 722 694 694 335 336 335 721 335 335 695 696 695 722 695 695 336 337 336 721 336 336 696 697 696 722 696 696 337 338 337 721 337 337 697 698 697 722 697 697 338 339 338 721 338 338 698 699 698 722 698 698 339 340 339 721 339 339 699 700 699 722 699 699 340 341 340 721 340 340 700 701 700 722 700 700 341 342 341 721 341 341 701 702 701 722 701 701 342 343 342 721 342 342 702 703 702 722 702 702 343 344 343 721 343 343 703 704 703 722 703 703 344 345 344 721 344 344 704 705 704 722 704 704 345 346 345 721 345 345 705 706 705 722 705 705 346 347 346 721 346 346 706 707 706 722 706 706 347 348 347 721 347 347 707 708 707 722 707 707 348 349 348 721 348 348 708 709 708 722 708 708 349 350 349 721 349 349 709 710 709 722 709 709 350 351 350 721 350 350 710 711 710 722 710 710 351 352 351 721 351 351 711 712 711 722 711 711 352 353 352 721 352 352 712 713 712 722 712 712 353 354 353 721 353 353 713 714 713 722 713 713 354 355 354 721 354 354 714 715 714 722 714 714 355 356 355 721 355 355 715 716 715 722 715 715 356 357 356 721 356 356 716 717 716 722 716 716 357 358 357 721 357 357 717 718 717 722 717 717 358 359 358 721 358 358 718 719 718 722 718 718 359 360 359 721 359 359 719 720 719 722 719 719 360 1 360 721 360 360 720 361 720 722 720 720 1 2 1 8 6 1 3 11 4 5 6 4 9 8 7 14 12 7 9 17 10 11 12 10 15 14 13 20 18 13 15 23 16 17 18 16 21 20 19 26 24 19 21 29 22 23 24 22 27 26 25 32 30 25 27 35 28 29 30 28 33 32 31 38 36 31 33 41 34 35 36 34 39 38 37 44 42 37 39 47 40 41 42 40 45 44 43 50 48 43 45 53 46 47 48 46 51 50 49 56 54 49 51 59 52 53 54 52 57 56 55 62 60 55 57 65 58 59 60 58 63 62 61 68 66 61 63 71 64 65 66 64 69 68 67 74 72 67 69 77 70 71 72 70 75 74 73 80 78 73 75 83 76 77 78 76 81 80 79 86 84 79 81 89 82 83 84 82 87 86 85 92 90 85 87 95 88 89 90 88 93 92 91 98 96 91 93 101 94 95 96 94 99 98 97 104 102 97 99 107 100 101 102 100 105 104 103 110 108 103 105 113 106 107 108 106 111 110 109 116 114 109 111 119 112 113 114 112 117 116 115 122 120 115 117 125 118 119 120 118 123 122 121 128 126 121 123 131 124 125 126 124 129 128 127 134 132 127 129 137 130 131 132 130 135 134 133 140 138 133 135 143 136 137 138 136 141 140 139 146 144 139 141 149 142 143 144 142 147 146 145 152 150 145 147 155 148 149 150 148 153 152 151 158 156 151 153 161 154 155 156 154 159 158 157 164 162 157 159 167 160 161 162 160 165 164 163 170 168 163 165 173 166 167 168 166 171 170 169 176 174 169 171 179 172 173 174 172 177 176 175 182 180 175 177 185 178 179 180 178 183 182 181 188 186 181 183 191 184 185 186 184 189 188 187 194 192 187 189 197 190 191 192 190 195 194 193 200 198 193 195 203 196 197 198 196 201 200 199 206 204 199 201 209 202 203 204 202 207 206 205 212 210 205 207 215 208 209 210 208 213 212 211 218 216 211 213 221 214 215 216 214 219 218 217 224 222 217 219 227 220 221 222 220 225 224 223 230 228 223 225 233 226 227 228 226 231 230 229 236 234 229 231 239 232 233 234 232 237 236 235 242 240 235 237 245 238 239 240 238 243 242 241 248 246 241 243 251 244 245 246 244 249 248 247 254 252 247 249 257 250 251 252 250 255 254 253 260 258 253 255 263 256 257 258 256 261 260 259 266 264 259 261 269 262 263 264 262 267 266 265 272 270 265 267 275 268 269 270 268 273 272 271 278 276 271 273 281 274 275 276 274 279 278 277 284 282 277 279 287 280 281 282 280 285 284 283 290 288 283 285 293 286 287 288 286 291 290 289 296 294 289 291 299 292 293 294 292 297 296 295 302 300 295 297 305 298 299 300 298 303 302 301 308 306 301 303 311 304 305 306 304 309 308 307 314 312 307 309 317 310 311 312 310 315 314 313 320 318 313 315 323 316 317 318 316 321 320 319 326 324 319 321 329 322 323 324 322 327 326 325 332 330 325 327 335 328 329 330 328 333 332 331 338 336 331 333 341 334 335 336 334 339 338 337 344 342 337 339 347 340 341 342 340 345 344 343 350 348 343 345 353 346 347 348 346 351 350 349 356 354 349 351 359 352 353 354 352 357 356 355 362 360 355 357 365 358 359 360 358 363 362 361 368 366 361 363 371 364 365 366 364 369 368 367 374 372 367 369 377 370 371 372 370 375 374 373 380 378 373 375 383 376 377 378 376 381 380 379 386 384 379 381 389 382 383 384 382 387 386 385 392 390 385 387 395 388 389 390 388 393 392 391 398 396 391 393 401 394 395 396 394 399 398 397 404 402 397 399 407 400 401 402 400 405 404 403 410 408 403 405 413 406 407 408 406 411 410 409 416 414 409 411 419 412 413 414 412 417 416 415 422 420 415 417 425 418 419 420 418 423 422 421 428 426 421 423 431 424 425 426 424 429 428 427 434 432 427 429 437 430 431 432 430 435 434 433 440 438 433 435 443 436 437 438 436 441 440 439 446 444 439 441 449 442 443 444 442 447 446 445 452 450 445 447 455 448 449 450 448 453 452 451 458 456 451 453 461 454 455 456 454 459 458 457 464 462 457 459 467 460 461 462 460 465 464 463 470 468 463 465 473 466 467 468 466 471 470 469 476 474 469 471 479 472 473 474 472 477 476 475 482 480 475 477 485 478 479 480 478 483 482 481 488 486 481 483 491 484 485 486 484 489 488 487 494 492 487 489 497 490 491 492 490 495 494 493 500 498 493 495 503 496 497 498 496 501 500 499 506 504 499 501 509 502 503 504 502 507 506 505 512 510 505 507 515 508 509 510 508 513 512 511 518 516 511 513 521 514 515 516 514 519 518 517 524 522 517 519 527 520 521 522 520 525 524 523 530 528 523 525 533 526 527 528 526 531 530 529 536 534 529 531 539 532 533 534 532 537 536 535 542 540 535 537 545 538 539 540 538 543 542 541 548 546 541 543 551 544 545 546 544 549 548 547 554 552 547 549 557 550 551 552 550 555 554 553 560 558 553 555 563 556 557 558 556 561 560 559 566 564 559 561 569 562 563 564 562 567 566 565 572 570 565 567 575 568 569 570 568 573 572 571 578 576 571 573 581 574 575 576 574 579 578 577 584 582 577 579 587 580 581 582 580 585 584 583 590 588 583 585 593 586 587 588 586 591 590 589 596 594 589 591 599 592 593 594 592 597 596 595 602 600 595 597 605 598 599 600 598 603 602 601 608 606 601 603 611 604 605 606 604 609 608 607 614 612 607 609 617 610 611 612 610 615 614 613 620 618 613 615 623 616 617 618 616 621 620 619 626 624 619 621 629 622 623 624 622 627 626 625 632 630 625 627 635 628 629 630 628 633 632 631 638 636 631 633 641 634 635 636 634 639 638 637 644 642 637 639 647 640 641 642 640 645 644 643 650 648 643 645 653 646 647 648 646 651 650 649 656 654 649 651 659 652 653 654 652 657 656 655 662 660 655 657 665 658 659 660 658 663 662 661 668 666 661 663 671 664 665 666 664 669 668 667 674 672 667 669 677 670 671 672 670 675 674 673 680 678 673 675 683 676 677 678 676 681 680 679 686 684 679 681 689 682 683 684 682 687 686 685 692 690 685 687 695 688 689 690 688 693 692 691 698 696 691 693 701 694 695 696 694 699 698 697 704 702 697 699 707 700 701 702 700 705 704 703 710 708 703 705 713 706 707 708 706 711 710 709 716 714 709 711 719 712 713 714 712 717 716 715 722 720 715 717 725 718 719 720 718 723 722 721 728 726 721 723 731 724 725 726 724 729 728 727 734 732 727 729 737 730 731 732 730 735 734 733 740 738 733 735 743 736 737 738 736 741 740 739 746 744 739 741 749 742 743 744 742 747 746 745 752 750 745 747 755 748 749 750 748 753 752 751 758 756 751 753 761 754 755 756 754 759 758 757 764 762 757 759 767 760 761 762 760 765 764 763 770 768 763 765 773 766 767 768 766 771 770 769 776 774 769 771 779 772 773 774 772 777 776 775 782 780 775 777 785 778 779 780 778 783 782 781 788 786 781 783 791 784 785 786 784 789 788 787 794 792 787 789 797 790 791 792 790 795 794 793 800 798 793 795 803 796 797 798 796 801 800 799 806 804 799 801 809 802 803 804 802 807 806 805 812 810 805 807 815 808 809 810 808 813 812 811 818 816 811 813 821 814 815 816 814 819 818 817 824 822 817 819 827 820 821 822 820 825 824 823 830 828 823 825 833 826 827 828 826 831 830 829 836 834 829 831 839 832 833 834 832 837 836 835 842 840 835 837 845 838 839 840 838 843 842 841 848 846 841 843 851 844 845 846 844 849 848 847 854 852 847 849 857 850 851 852 850 855 854 853 860 858 853 855 863 856 857 858 856 861 860 859 866 864 859 861 869 862 863 864 862 867 866 865 872 870 865 867 875 868 869 870 868 873 872 871 878 876 871 873 881 874 875 876 874 879 878 877 884 882 877 879 887 880 881 882 880 885 884 883 890 888 883 885 893 886 887 888 886 891 890 889 896 894 889 891 899 892 893 894 892 897 896 895 902 900 895 897 905 898 899 900 898 903 902 901 908 906 901 903 911 904 905 906 904 909 908 907 914 912 907 909 917 910 911 912 910 915 914 913 920 918 913 915 923 916 917 918 916 921 920 919 926 924 919 921 929 922 923 924 922 927 926 925 932 930 925 927 935 928 929 930 928 933 932 931 938 936 931 933 941 934 935 936 934 939 938 937 944 942 937 939 947 940 941 942 940 945 944 943 950 948 943 945 953 946 947 948 946 951 950 949 956 954 949 951 959 952 953 954 952 957 956 955 962 960 955 957 965 958 959 960 958 963 962 961 968 966 961 963 971 964 965 966 964 969 968 967 974 972 967 969 977 970 971 972 970 975 974 973 980 978 973 975 983 976 977 978 976 981 980 979 986 984 979 981 989 982 983 984 982 987 986 985 992 990 985 987 995 988 989 990 988 993 992 991 998 996 991 993 1001 994 995 996 994 999 998 997 1004 1002 997 999 1007 1000 1001 1002 1000 1005 1004 1003 1010 1008 1003 1005 1013 1006 1007 1008 1006 1011 1010 1009 1016 1014 1009 1011 1019 1012 1013 1014 1012 1017 1016 1015 1022 1020 1015 1017 1025 1018 1019 1020 1018 1023 1022 1021 1028 1026 1021 1023 1031 1024 1025 1026 1024 1029 1028 1027 1034 1032 1027 1029 1037 1030 1031 1032 1030 1035 1034 1033 1040 1038 1033 1035 1043 1036 1037 1038 1036 1041 1040 1039 1046 1044 1039 1041 1049 1042 1043 1044 1042 1047 1046 1045 1052 1050 1045 1047 1055 1048 1049 1050 1048 1053 1052 1051 1058 1056 1051 1053 1061 1054 1055 1056 1054 1059 1058 1057 1064 1062 1057 1059 1067 1060 1061 1062 1060 1065 1064 1063 1070 1068 1063 1065 1073 1066 1067 1068 1066 1071 1070 1069 1076 1074 1069 1071 1079 1072 1073 1074 1072 1077 1076 1075 1082 1080 1075 1077 1085 1078 1079 1080 1078 1083 1082 1081 1088 1086 1081 1083 1091 1084 1085 1086 1084 1089 1088 1087 1094 1092 1087 1089 1097 1090 1091 1092 1090 1095 1094 1093 1100 1098 1093 1095 1103 1096 1097 1098 1096 1101 1100 1099 1106 1104 1099 1101 1109 1102 1103 1104 1102 1107 1106 1105 1112 1110 1105 1107 1115 1108 1109 1110 1108 1113 1112 1111 1118 1116 1111 1113 1121 1114 1115 1116 1114 1119 1118 1117 1124 1122 1117 1119 1127 1120 1121 1122 1120 1125 1124 1123 1130 1128 1123 1125 1133 1126 1127 1128 1126 1131 1130 1129 1136 1134 1129 1131 1139 1132 1133 1134 1132 1137 1136 1135 1142 1140 1135 1137 1145 1138 1139 1140 1138 1143 1142 1141 1148 1146 1141 1143 1151 1144 1145 1146 1144 1149 1148 1147 1154 1152 1147 1149 1157 1150 1151 1152 1150 1155 1154 1153 1160 1158 1153 1155 1163 1156 1157 1158 1156 1161 1160 1159 1166 1164 1159 1161 1169 1162 1163 1164 1162 1167 1166 1165 1172 1170 1165 1167 1175 1168 1169 1170 1168 1173 1172 1171 1178 1176 1171 1173 1181 1174 1175 1176 1174 1179 1178 1177 1184 1182 1177 1179 1187 1180 1181 1182 1180 1185 1184 1183 1190 1188 1183 1185 1193 1186 1187 1188 1186 1191 1190 1189 1196 1194 1189 1191 1199 1192 1193 1194 1192 1197 1196 1195 1202 1200 1195 1197 1205 1198 1199 1200 1198 1203 1202 1201 1208 1206 1201 1203 1211 1204 1205 1206 1204 1209 1208 1207 1214 1212 1207 1209 1217 1210 1211 1212 1210 1215 1214 1213 1220 1218 1213 1215 1223 1216 1217 1218 1216 1221 1220 1219 1226 1224 1219 1221 1229 1222 1223 1224 1222 1227 1226 1225 1232 1230 1225 1227 1235 1228 1229 1230 1228 1233 1232 1231 1238 1236 1231 1233 1241 1234 1235 1236 1234 1239 1238 1237 1244 1242 1237 1239 1247 1240 1241 1242 1240 1245 1244 1243 1250 1248 1243 1245 1253 1246 1247 1248 1246 1251 1250 1249 1256 1254 1249 1251 1259 1252 1253 1254 1252 1257 1256 1255 1262 1260 1255 1257 1265 1258 1259 1260 1258 1263 1262 1261 1268 1266 1261 1263 1271 1264 1265 1266 1264 1269 1268 1267 1274 1272 1267 1269 1277 1270 1271 1272 1270 1275 1274 1273 1280 1278 1273 1275 1283 1276 1277 1278 1276 1281 1280 1279 1286 1284 1279 1281 1289 1282 1283 1284 1282 1287 1286 1285 1292 1290 1285 1287 1295 1288 1289 1290 1288 1293 1292 1291 1298 1296 1291 1293 1301 1294 1295 1296 1294 1299 1298 1297 1304 1302 1297 1299 1307 1300 1301 1302 1300 1305 1304 1303 1310 1308 1303 1305 1313 1306 1307 1308 1306 1311 1310 1309 1316 1314 1309 1311 1319 1312 1313 1314 1312 1317 1316 1315 1322 1320 1315 1317 1325 1318 1319 1320 1318 1323 1322 1321 1328 1326 1321 1323 1331 1324 1325 1326 1324 1329 1328 1327 1334 1332 1327 1329 1337 1330 1331 1332 1330 1335 1334 1333 1340 1338 1333 1335 1343 1336 1337 1338 1336 1341 1340 1339 1346 1344 1339 1341 1349 1342 1343 1344 1342 1347 1346 1345 1352 1350 1345 1347 1355 1348 1349 1350 1348 1353 1352 1351 1358 1356 1351 1353 1361 1354 1355 1356 1354 1359 1358 1357 1364 1362 1357 1359 1367 1360 1361 1362 1360 1365 1364 1363 1370 1368 1363 1365 1373 1366 1367 1368 1366 1371 1370 1369 1376 1374 1369 1371 1379 1372 1373 1374 1372 1377 1376 1375 1382 1380 1375 1377 1385 1378 1379 1380 1378 1383 1382 1381 1388 1386 1381 1383 1391 1384 1385 1386 1384 1389 1388 1387 1394 1392 1387 1389 1397 1390 1391 1392 1390 1395 1394 1393 1400 1398 1393 1395 1403 1396 1397 1398 1396 1401 1400 1399 1406 1404 1399 1401 1409 1402 1403 1404 1402 1407 1406 1405 1412 1410 1405 1407 1415 1408 1409 1410 1408 1413 1412 1411 1418 1416 1411 1413 1421 1414 1415 1416 1414 1419 1418 1417 1424 1422 1417 1419 1427 1420 1421 1422 1420 1425 1424 1423 1430 1428 1423 1425 1433 1426 1427 1428 1426 1431 1430 1429 1436 1434 1429 1431 1439 1432 1433 1434 1432 1437 1436 1435 1442 1440 1435 1437 1445 1438 1439 1440 1438 1443 1442 1441 1448 1446 1441 1443 1451 1444 1445 1446 1444 1449 1448 1447 1454 1452 1447 1449 1457 1450 1451 1452 1450 1455 1454 1453 1460 1458 1453 1455 1463 1456 1457 1458 1456 1461 1460 1459 1466 1464 1459 1461 1469 1462 1463 1464 1462 1467 1466 1465 1472 1470 1465 1467 1475 1468 1469 1470 1468 1473 1472 1471 1478 1476 1471 1473 1481 1474 1475 1476 1474 1479 1478 1477 1484 1482 1477 1479 1487 1480 1481 1482 1480 1485 1484 1483 1490 1488 1483 1485 1493 1486 1487 1488 1486 1491 1490 1489 1496 1494 1489 1491 1499 1492 1493 1494 1492 1497 1496 1495 1502 1500 1495 1497 1505 1498 1499 1500 1498 1503 1502 1501 1508 1506 1501 1503 1511 1504 1505 1506 1504 1509 1508 1507 1514 1512 1507 1509 1517 1510 1511 1512 1510 1515 1514 1513 1520 1518 1513 1515 1523 1516 1517 1518 1516 1521 1520 1519 1526 1524 1519 1521 1529 1522 1523 1524 1522 1527 1526 1525 1532 1530 1525 1527 1535 1528 1529 1530 1528 1533 1532 1531 1538 1536 1531 1533 1541 1534 1535 1536 1534 1539 1538 1537 1544 1542 1537 1539 1547 1540 1541 1542 1540 1545 1544 1543 1550 1548 1543 1545 1553 1546 1547 1548 1546 1551 1550 1549 1556 1554 1549 1551 1559 1552 1553 1554 1552 1557 1556 1555 1562 1560 1555 1557 1565 1558 1559 1560 1558 1563 1562 1561 1568 1566 1561 1563 1571 1564 1565 1566 1564 1569 1568 1567 1574 1572 1567 1569 1577 1570 1571 1572 1570 1575 1574 1573 1580 1578 1573 1575 1583 1576 1577 1578 1576 1581 1580 1579 1586 1584 1579 1581 1589 1582 1583 1584 1582 1587 1586 1585 1592 1590 1585 1587 1595 1588 1589 1590 1588 1593 1592 1591 1598 1596 1591 1593 1601 1594 1595 1596 1594 1599 1598 1597 1604 1602 1597 1599 1607 1600 1601 1602 1600 1605 1604 1603 1610 1608 1603 1605 1613 1606 1607 1608 1606 1611 1610 1609 1616 1614 1609 1611 1619 1612 1613 1614 1612 1617 1616 1615 1622 1620 1615 1617 1625 1618 1619 1620 1618 1623 1622 1621 1628 1626 1621 1623 1631 1624 1625 1626 1624 1629 1628 1627 1634 1632 1627 1629 1637 1630 1631 1632 1630 1635 1634 1633 1640 1638 1633 1635 1643 1636 1637 1638 1636 1641 1640 1639 1646 1644 1639 1641 1649 1642 1643 1644 1642 1647 1646 1645 1652 1650 1645 1647 1655 1648 1649 1650 1648 1653 1652 1651 1658 1656 1651 1653 1661 1654 1655 1656 1654 1659 1658 1657 1664 1662 1657 1659 1667 1660 1661 1662 1660 1665 1664 1663 1670 1668 1663 1665 1673 1666 1667 1668 1666 1671 1670 1669 1676 1674 1669 1671 1679 1672 1673 1674 1672 1677 1676 1675 1682 1680 1675 1677 1685 1678 1679 1680 1678 1683 1682 1681 1688 1686 1681 1683 1691 1684 1685 1686 1684 1689 1688 1687 1694 1692 1687 1689 1697 1690 1691 1692 1690 1695 1694 1693 1700 1698 1693 1695 1703 1696 1697 1698 1696 1701 1700 1699 1706 1704 1699 1701 1709 1702 1703 1704 1702 1707 1706 1705 1712 1710 1705 1707 1715 1708 1709 1710 1708 1713 1712 1711 1718 1716 1711 1713 1721 1714 1715 1716 1714 1719 1718 1717 1724 1722 1717 1719 1727 1720 1721 1722 1720 1725 1724 1723 1730 1728 1723 1725 1733 1726 1727 1728 1726 1731 1730 1729 1736 1734 1729 1731 1739 1732 1733 1734 1732 1737 1736 1735 1742 1740 1735 1737 1745 1738 1739 1740 1738 1743 1742 1741 1748 1746 1741 1743 1751 1744 1745 1746 1744 1749 1748 1747 1754 1752 1747 1749 1757 1750 1751 1752 1750 1755 1754 1753 1760 1758 1753 1755 1763 1756 1757 1758 1756 1761 1760 1759 1766 1764 1759 1761 1769 1762 1763 1764 1762 1767 1766 1765 1772 1770 1765 1767 1775 1768 1769 1770 1768 1773 1772 1771 1778 1776 1771 1773 1781 1774 1775 1776 1774 1779 1778 1777 1784 1782 1777 1779 1787 1780 1781 1782 1780 1785 1784 1783 1790 1788 1783 1785 1793 1786 1787 1788 1786 1791 1790 1789 1796 1794 1789 1791 1799 1792 1793 1794 1792 1797 1796 1795 1802 1800 1795 1797 1805 1798 1799 1800 1798 1803 1802 1801 1808 1806 1801 1803 1811 1804 1805 1806 1804 1809 1808 1807 1814 1812 1807 1809 1817 1810 1811 1812 1810 1815 1814 1813 1820 1818 1813 1815 1823 1816 1817 1818 1816 1821 1820 1819 1826 1824 1819 1821 1829 1822 1823 1824 1822 1827 1826 1825 1832 1830 1825 1827 1835 1828 1829 1830 1828 1833 1832 1831 1838 1836 1831 1833 1841 1834 1835 1836 1834 1839 1838 1837 1844 1842 1837 1839 1847 1840 1841 1842 1840 1845 1844 1843 1850 1848 1843 1845 1853 1846 1847 1848 1846 1851 1850 1849 1856 1854 1849 1851 1859 1852 1853 1854 1852 1857 1856 1855 1862 1860 1855 1857 1865 1858 1859 1860 1858 1863 1862 1861 1868 1866 1861 1863 1871 1864 1865 1866 1864 1869 1868 1867 1874 1872 1867 1869 1877 1870 1871 1872 1870 1875 1874 1873 1880 1878 1873 1875 1883 1876 1877 1878 1876 1881 1880 1879 1886 1884 1879 1881 1889 1882 1883 1884 1882 1887 1886 1885 1892 1890 1885 1887 1895 1888 1889 1890 1888 1893 1892 1891 1898 1896 1891 1893 1901 1894 1895 1896 1894 1899 1898 1897 1904 1902 1897 1899 1907 1900 1901 1902 1900 1905 1904 1903 1910 1908 1903 1905 1913 1906 1907 1908 1906 1911 1910 1909 1916 1914 1909 1911 1919 1912 1913 1914 1912 1917 1916 1915 1922 1920 1915 1917 1925 1918 1919 1920 1918 1923 1922 1921 1928 1926 1921 1923 1931 1924 1925 1926 1924 1929 1928 1927 1934 1932 1927 1929 1937 1930 1931 1932 1930 1935 1934 1933 1940 1938 1933 1935 1943 1936 1937 1938 1936 1941 1940 1939 1946 1944 1939 1941 1949 1942 1943 1944 1942 1947 1946 1945 1952 1950 1945 1947 1955 1948 1949 1950 1948 1953 1952 1951 1958 1956 1951 1953 1961 1954 1955 1956 1954 1959 1958 1957 1964 1962 1957 1959 1967 1960 1961 1962 1960 1965 1964 1963 1970 1968 1963 1965 1973 1966 1967 1968 1966 1971 1970 1969 1976 1974 1969 1971 1979 1972 1973 1974 1972 1977 1976 1975 1982 1980 1975 1977 1985 1978 1979 1980 1978 1983 1982 1981 1988 1986 1981 1983 1991 1984 1985 1986 1984 1989 1988 1987 1994 1992 1987 1989 1997 1990 1991 1992 1990 1995 1994 1993 2000 1998 1993 1995 2003 1996 1997 1998 1996 2001 2000 1999 2006 2004 1999 2001 2009 2002 2003 2004 2002 2007 2006 2005 2012 2010 2005 2007 2015 2008 2009 2010 2008 2013 2012 2011 2018 2016 2011 2013 2021 2014 2015 2016 2014 2019 2018 2017 2024 2022 2017 2019 2027 2020 2021 2022 2020 2025 2024 2023 2030 2028 2023 2025 2033 2026 2027 2028 2026 2031 2030 2029 2036 2034 2029 2031 2039 2032 2033 2034 2032 2037 2036 2035 2042 2040 2035 2037 2045 2038 2039 2040 2038 2043 2042 2041 2048 2046 2041 2043 2051 2044 2045 2046 2044 2049 2048 2047 2054 2052 2047 2049 2057 2050 2051 2052 2050 2055 2054 2053 2060 2058 2053 2055 2063 2056 2057 2058 2056 2061 2060 2059 2066 2064 2059 2061 2069 2062 2063 2064 2062 2067 2066 2065 2072 2070 2065 2067 2075 2068 2069 2070 2068 2073 2072 2071 2078 2076 2071 2073 2081 2074 2075 2076 2074 2079 2078 2077 2084 2082 2077 2079 2087 2080 2081 2082 2080 2085 2084 2083 2090 2088 2083 2085 2093 2086 2087 2088 2086 2091 2090 2089 2096 2094 2089 2091 2099 2092 2093 2094 2092 2097 2096 2095 2102 2100 2095 2097 2105 2098 2099 2100 2098 2103 2102 2101 2108 2106 2101 2103 2111 2104 2105 2106 2104 2109 2108 2107 2114 2112 2107 2109 2117 2110 2111 2112 2110 2115 2114 2113 2120 2118 2113 2115 2123 2116 2117 2118 2116 2121 2120 2119 2126 2124 2119 2121 2129 2122 2123 2124 2122 2127 2126 2125 2132 2130 2125 2127 2135 2128 2129 2130 2128 2133 2132 2131 2138 2136 2131 2133 2141 2134 2135 2136 2134 2139 2138 2137 2144 2142 2137 2139 2147 2140 2141 2142 2140 2145 2144 2143 2150 2148 2143 2145 2153 2146 2147 2148 2146 2151 2150 2149 2156 2154 2149 2151 2159 2152 2153 2154 2152 2157 2156 2155 2 2160 2155 2157 5 2158 2159 2160 2158 3 ------=_NextPart_000_162a_28d8_6181 Content-Type: text/plain; name="3.dat"; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="3.dat" 2904 10610 7705 0.000169 5.711062 0.000713 0.000139 3.702301 -4.076366 0.00017 5.73488 0.000712 -0.0002172194856 2.621017421 -2.937017498 0.0001 2.621056 -2.936966 -0.0002172194521 2.621012219 -2.937012016 -0.122871 -0.028322 0.000604 -5.022235 -8.647378 0 -0.028847 -0.0036 0.000609 -9.995821556 0.2758184777 -43.33661781 -9.997995 0.200214 -100 -9.992979 0.374673 -100 9.555504 -2.948279 -100 9.502595 -3.114597 -100 4.324851 4.721829 -99.999001 3e-06 5.923634 -46.297699 -8.462545652 5.327664956 -48.06534508 -8.421535654 5.391673987 -48.11478029 -50.000999 73.442886 22.442884 -50.000004 -4.692482 86.642723 -50.000004 -3.491096 87.908722 2e-06 -7.881439 -29.249847 -3.769877 -9.262182 -28.43965116 -3.815764498 -9.243036617 -28.4884573 2.2e-05 0.519028 -0.602425 2.6e-05 0.778664 0.00065 2.2e-05 0.666653 0.000644 8.9217 4.516995 0 8.999174 4.360604 0 8.999174 4.360604 -100 -9.964154 -0.845957 -42.06697954 -9.964429 -0.842354 -2.070711 -9.964154 -0.845957 -2.066555 -3.45939228e-05 -9.999809098 -18.02105836 2e-06 -13.776207 -18.16341 2e-06 -13.124817 -19.592758 -8.338979156 -5.518552141 -35.70752523 -8.304716 -5.570608 -100 -8.400671 -5.424824 -100 0.000129 4.345796 0.000758 3.182867 5.55602 0.001 0.000128 4.304421 0.000758 -0.0002103872781 1.55981623 -1.778909903 -0.0002103872473 1.559811518 -1.77890471 -0.0002103872178 1.55980693 -1.778899524 1e-06 -19.25042 -1.802708 -50 -29.371872 -2.348284 -50 -28.994118 -4.052221 -1.027619629e-05 -9.999808948 -23.2306326 -1.880269053e-05 -9.999809001 -21.46417056 2e-06 -11.747704 -22.41626 8.105246 5.857047 0 8.206232 5.714698 0 3e-06 9.397575 -49.480972 -0.5901154995 9.982193692 -50.13549137 -0.5845806512 9.982517247 -50.13431201 -0.0002172196169 2.621037804 -2.937038977 -0.0002172195927 2.62103404 -2.937035011 -8.841509 -4.672013 -100 -8.9217 -4.516995 -100 -0.001 72.442886 23.442886 4e-06 34.728294 -65.003662 4e-06 36.18977 -65.579353 -7.915654969 6.110222031 -48.65303898 -7.864263 6.176841 -8.699941 -7.864263 6.176841 -48.70014371 -8.777519454 4.790359242 -47.64230443 -8.73371 4.870554 -7.706071 -8.81103 4.729017 -7.593073 -9.261321633 3.771938569 -46.78006815 -9.262182 3.769877 -100 -9.259578063 3.776118799 -46.78368717 6e-05 1.559853 -1.77887 9.7e-05 3.240125 0.000746 9.5e-05 3.18681 0.000745 3e-06 120.064766 -55.2808 -49.999996 124.362175 -64.460869 3e-06 118.770248 -56.170494 -0.0002562614788 9.397713481 -9.481249445 -0.0002562616041 9.397735882 -9.481268578 -1.711171 9.852507 -10.319616 -0.0002562669542 9.398691788 -9.482085013 -0.000256264717 9.398292052 -9.481743601 -9.981723568 -0.5981392917 -42.35239089 -9.987607 -0.497698 -2.467274 -9.977633 -0.667973 -2.2718 -50 168.442886 18.442884 -50 168.427658 16.697643 -3.607656 -9.326566 -28.27210516 -3.607656 -9.326566 -100 -3.618075805 -9.322430477 -28.28323174 3e-06 4.803276 -45.196724 -9.049093602 4.255901281 -47.19615006 -9.068105834 4.214764348 -47.16105578 -3e-06 118.770248 93.056267 -50.000004 125.800529 100.358093 -50.000004 124.362175 101.346642 -9.78534847 2.059382924 -45.18809624 -49.999996 -3.491096 -51.022949 -9.781402603 2.078525944 -45.20712239 -0.0002172195909 2.621033764 -2.93703472 -0.2359780773 9.996834726 -50.05485511 -0.315214 9.994964 -10.074184 -0.305741 9.995187 -10.071882 -4.136571688 -9.103983432 -28.83816227 -4.249455 -9.052189 -100 -4.249455 -9.052189 -28.96588982 -3.802367238 9.248480452 -50.35368611 -3.72223 9.281434 -100 -3.72223 9.281434 -50.36075448 -8.950617983 -4.45862042 -37.32604814 -8.999174 -4.360604 -100 -9.998777125 -0.1537185698 -42.85986698 -9.998893 -0.148833 -2.865006 -9.998893 -0.148833 -42.86542411 -4.186486 9.081328 -10.311906 -4.198445 9.075914 -10.310428 -4.344374 9.006865 -10.289828 1.2e-05 0.307478 0.000626 8e-06 0.179256 0.000619 6.038652 7.970867 -100 6.176841 7.864263 -100 -3e-06 2.621056 79.822739 2e-06 -8.702171 -27.910542 -3.160608114 -9.487067835 -27.82346907 -3.279965 -9.446789 -27.93888136 0.148833 -9.998893 0 -9.246541637e-05 -9.999809454 -2.208986082 -9.637361379e-05 -9.999809478 -0.7257075356 4.977731 -8.673072 0 4.825609 -8.758624 0 -8.859887693 4.636246009 -47.51686166 -8.817384 4.717387 -100 -8.827986358 4.697146759 -47.56776367 -8.304716 -5.570608 -35.62565575 4.717387 8.817384 0 4.870554 8.73371 0 1e-06 -19.590401 -0.269165 -49.999996 2.836983 -57.028069 -4.041363979 9.146961795 -50.32983866 -4.043881 9.145875 -50.32957245 0.549018 9.984918 -4.858659 0.723194 9.973815 -100 0.549018 9.984918 -100 -8.939555053 4.480711137 -47.38635633 -8.970907 4.418232 -7.33347 -8.951382104 4.457141797 -47.36651105 -8.871257313 -4.614506248 -37.09682232 -49.999996 30.982227 -74.275497 -1.462822885 -9.892129664 -26.45707257 -1.589719 -9.872832 0 -1.589719 -9.872832 -26.54271816 0.000262 8.881948 0.000243 0.000258 8.736074 0.000273 -8.73371 4.870554 -47.7063274 -0.000203511333 0.5190010817 -0.6024626288 -9.977401 -0.671932 -2.267256 -0.0002035113336 0.5190011718 -0.6024627306 9.34498 3.55968 0 9.405683 3.396046 0 -49.999996 122.906792 -65.424171 -0.0002562743586 9.40001472 -9.483214922 -0.0002562673177 9.398756728 -9.482140475 3e-06 10.592003 -50.501114 -0.7684809942 9.97005157 -50.17203251 -0.845957 9.964154 -50.18737229 0 158.442886 18.442886 -9.987607 -0.497698 -100 -9.987607 -0.497698 -42.46769548 -3e-06 120.064766 92.166573 -4.122873016 9.110121011 -50.31981105 -4.043881 9.145875 -10.329534 3e-06 -0.501114 -39.407997 -9.725365763 -2.325925761 -40.25212478 -9.749449 -2.224467 -40.3827758 -0.0002432250619 7.062993734 -7.379044404 0.000263 7.063034 -7.378944 -0.0002432250632 7.062993967 -7.379044616 -49.999996 0.24305 -54.692482 -8.171940509 5.763507843 -48.39882029 -8.176756 5.756795 -48.39377772 -0.957434 -0.247751 0.000564 -6.176841 -7.864263 0 -0.84407 -0.217945 0.00057 -2.394278 9.709141 -50.37679038 -2.224467 9.749449 -100 -2.394278 9.709141 -100 -9.538970204 -3.000128949 -39.37488819 -9.518474 -3.065722 -100 -9.518474 -3.065722 -39.28584172 -4.188761841e-05 -9.999809143 -16.34105347 -0.0002497701199 8.221049542 -8.440224012 -0.0002497700744 8.221041341 -8.440216497 0.025694 9.999967 -5.378673 0.000362 9.999811 -8.784371 0.000343 9.999811 -6.44928 4.562784 8.898371 0 4.717387 8.817384 -100 -3e-06 3.702301 80.962143 0.000157 5.294359 0.000737 0.000156 5.255214 0.000738 -8.304716 -5.570608 0 -0.0002497700756 8.221041559 -8.440216696 -6.919445 7.219372 -9.399 -49.999996 -9.271713 -44.489155 -9.766181729 -2.148057185 -40.48072915 -9.764559306 -2.155467742 -40.47122933 -3.114597 -9.502595 0 -3.114597 -9.502595 -27.77897857 -8.841509 -4.672013 -37.01210519 -9.998893 -0.148833 -100 -9.999967 0.025694 -100 -49.999996 29.369774 -73.607597 9.281434 3.72223 -100 9.34498 3.55968 -100 -8.73371 4.870554 -100 9.959674 -0.897152 0 9.942501 -1.070836 0 3e-06 8.22113 -48.440147 -5.416593603 8.405884899 -50.04998496 -5.3510016 8.447435101 -50.06923039 0.000349 9.397575 -9.480972 -3.653596717 -9.308332559 -28.3198333 0 158.429169 16.872169 -0.0002172194353 2.621009612 -2.937009268 -9.921281 1.251762 -4.376159 -9.931086 1.168788 -4.291569 -0.0002562617742 9.397766267 -9.481294529 -0.0002562616194 9.397738615 -9.481270913 -0.0002562617673 9.397765033 -9.481293476 -0.148833 9.998893 -100 -0.2412392844 9.996710874 -50.05613307 -0.0002240060424 3.702248789 -4.076416433 -9.69671 2.444142 -5.562506 -9.73106 2.302659 -5.42833 -9.999907 0.03105 -3.068635 -9.999967 0.025694 -3.0626 -0.9382705157 9.95550401 -50.20426366 -0.932489065 9.956045883 -50.20320589 8.176756 -5.756795 -100 8.07504 -5.898622 -100 -0.000210387341 1.559825798 -1.778920344 -0.0002103871863 1.559802055 -1.778894014 -0.0002103873399 1.559825627 -1.778920158 -1.461979381 9.892172942 -50.28791316 -1.458224156 9.89272492 -50.28739694 -0.025694 -9.999967 0 -8.374048279e-05 -9.9998094 -5.219700741 -8.825652032e-05 -9.999809428 -3.706631521 -4.819167415 8.762100992 -50.20560735 -4.901385793 8.716008392 -50.18678285 -4.825609 8.758624 -50.20425126 -7.932729758 -6.088094356 -34.7792182 -8.001794 -5.997609 0 -8.001794 -5.997609 -34.9298595 -0.0002562609791 9.397624203 -9.481173194 -2.726059 9.621207 -10.388956 -0.0002562609816 9.397624646 -9.481173572 0.000209 7.071943 0.000569 0.000207 7.008718 0.000578 -0.000249770363 8.221092448 -8.440262165 -0.0002497702625 8.221074763 -8.440246518 -0.000249770214 8.221066239 -8.440238977 -0.0002240061158 3.702260386 -4.076428234 -9.633163 2.682307 -5.786737 -9.649878 2.622633 -5.730781 9.852507 1.711171 0 9.88087 1.538961 0 -7.115088546 7.026229164 -49.27524725 -7.125653 7.015534 -9.268142 -7.093551089 7.048033778 -49.28938534 -4.090826 -9.124973 0 -4.090826 -9.124973 -28.786401 -50 -29.719833 -0.638016 0.207227 9.997794 -4.019516 0.374673 9.992979 0 0.374673 9.992979 -4.38288 -0.0002497708006 8.221169418 -8.440330262 0.000306 8.22113 -8.440147 -0.0002497707459 8.221159792 -8.440321746 -9.544108318 -2.983685682 -39.3972109 -9.570528 -2.899136 -39.50808425 9.073906 4.202882 0 9.145875 4.043881 0 9.145875 4.043881 -100 -0.000256260173 9.397479782 -9.481049359 -0.0002372184695 5.923593307 -6.297786703 -8.551126 5.184206 -7.953385 -0.0002372184749 5.923594378 -6.297787719 -0.497698 9.987607 -50.11580826 -0.497698 9.987607 -100 -0.323315 9.994773 -100 -6.40279255 7.681347187 -49.67231407 -6.408171 7.676936 -100 -6.400895912 7.682902274 -49.67318343 -6.944255 -1.812828 0.000192 -9.281434 -3.72223 0 -9.34498 -3.55968 0 3e-06 117.460403 -57.037468 -49.999996 1.529823 -55.871597 -6.136554163 7.895736808 -49.79089593 -6.205107012 7.841493747 -49.76121149 -8.434236211 -5.371837269 -35.93782653 -8.494069 -5.277384 -100 -50.000004 127.221413 99.344589 -49.999996 -11.420662 -41.738621 -9.172177115 -3.982962076 -38.01872531 -9.145875 -4.043881 -37.93069304 -4.358201844 9.000312184 -50.28791842 -4.360604 8.999174 -100 -4.360604 8.999174 -50.2875781 -0.0002497704648 8.221110347 -8.440278 1.538961 -9.88087 0 1.366281 -9.906224 0 -2.394278 9.709141 -10.376809 -2.318497824 9.727128924 -50.3722228 -0.0002240061135 3.702260035 -4.076427877 -0.0002240060002 3.702241981 -4.076409259 -0.0002240060769 3.702254241 -4.076421981 -9.990656218 -0.4234937501 -42.5524889 -9.994773 -0.323315 -100 -0.0002103872791 1.559816383 -1.77891007 -1.11590487 9.937163057 -50.23531818 -1.111945391 9.937604416 -50.23465376 -7.048202542 7.093781383 -49.31900426 -7.052875 7.089214 -100 -7.048252285 7.093732758 -49.3189732 -0.0002307435433 4.803230173 -5.196794122 -9.260675 3.773488 -6.781114 -0.0002307435442 4.803230326 -5.196794272 -9.951308493 -0.9830422924 -41.90815492 -49.999996 -8.16156 -45.835876 -9.948051089 -1.017805072 -41.86645004 -9.997899394 0.2035502428 -43.25836622 8.841509 4.672013 -100 8.9217 4.516995 -100 -0.0002497703117 8.221083422 -8.440254179 -0.0002497700745 8.221041347 -8.440216502 -0.0002497702637 8.221074979 -8.440246709 -50.000004 -2.267792 89.153564 0.000114 3.827451 0.000756 0.000113 3.781642 0.000756 -0.0002240061295 3.702262564 -4.076430451 -1.193185 9.928559 -100 -1.019728 9.947871 -100 -8.692474526 4.943002072 -47.76370875 -8.653363 5.01172 -7.817884 -8.650765716 5.016283148 -47.82175009 2.104243 9.776102 0 2.274539 9.737887 0 0.000232 7.852854 0.000443 0.00018 4.803276 -5.196724 -0.0002035108056 0.5189210812 -0.602369248 -2.282542 -0.596151 0.000491 -0.0002035107841 0.5189178235 -0.6023654336 -5.12834 8.584878 -10.131289 -2.477898193e-05 9.999808962 -46.44928212 -6.581057595e-06 9.999809054 -48.78437411 4e-06 33.277084 -64.40255 -4.602296 -1.206051 0.000348 -9.906549 -1.363775 -1.448151 -9.906224 -1.366281 -1.445116 -6.796202469 7.335564815 -49.47144468 -6.792271 7.339149 -9.473416 -6.801169 7.331037 -49.46876503 -4.915727834 -8.707998491 -29.78213104 -4.870554 -8.73371 0 4.202882 -9.073906 0 4.043881 -9.145875 0 4.043881 -9.145875 -100 -5.497680304 8.352718016 -50.02459953 -5.424824 8.400671 -10.047477 -5.556021 8.314319 -10.006105 -6.265792518 7.793476254 -49.73493415 -0.000249770414 8.221101422 -8.440270104 -50 168.381958 14.952934 -0.0002035107339 0.5189101978 -0.602356505 -0.0002035107604 0.5189142159 -0.6023612096 -8.368217953 5.474631947 -48.17880392 -4.785211321 -8.780332075 -29.61458344 -4.762702839 -8.792628292 -29.58590261 -7.579720475 -6.522589166 -34.04850363 -49.999996 -14.460869 -37.476406 -7.563929 -6.541175 -34.01588507 -8.64343274 5.028894961 -47.83169643 -9.776102 2.104243 -100 -9.776102 2.104243 -45.23268254 -0.0002240060747 3.7022539 -4.076421634 0.000124 4.17858 0.000759 0.000123 4.136007 0.000758 -8.171428 5.764221 -8.399129 -8.176756 5.756795 -8.393551 8.372684 -5.467923 -100 8.27598 -5.613212 -100 9.88087 1.538961 -100 -8.078895 5.893245 -8.49606 -8.066176 5.910535 -8.508962 -8.069396 5.906208 -8.505742 6.038652 7.970867 0 6.176841 7.864263 0 -5.512347963 -8.343114854 -30.5769623 -5.467923 -8.372684 -100 -5.613212 -8.27598 -100 2.948279 9.555504 0 3.114597 9.502595 0 3.114597 9.502595 -100 -0.0002562636616 9.398103494 -9.481582553 -0.0002562629942 9.397984252 -9.48148071 -0.0002562637097 9.398112085 -9.481589891 1e-06 -19.903557 1.270077 0.000231 7.832326 0.000446 0.000228 7.74269 0.000462 -0.07127527382 9.999370273 -50.01370254 -0.148833 9.998893 -50.0336932 -2.545806 9.670369 -10.383543 -6.965043 -7.175524 -100 -7.089214 -7.052875 -100 -9.480620586 -3.179827788 -39.13023013 2e-06 -1.500252 -38.19595 -9.46352 -3.231376 -39.05993118 -9.123818919 4.093343218 -47.05735705 -9.124973 4.090826 -100 -9.124973 4.090826 -47.05520698 8.976648 -4.406791 -100 8.898371 -4.562784 -100 8.976648 -4.406791 0 -7.825019409 -6.225927628 -34.54888796 -7.787604 -6.273214 -100 -7.895901 -6.136346 -100 -5.022235 -8.647378 -100 -5.022235 -8.647378 -29.91693103 1.589719 9.872832 -100 1.761781 9.843583 -100 -8.928375584 4.502990019 -47.40511505 -8.898371 4.562784 -7.455186 -8.951217 4.457471 -7.366511 -49.999996 121.434814 -66.361923 -0.0002432250145 7.06298553 -7.379036886 -7.745461 6.324982 -8.803466 -0.0002432250158 7.062985764 -7.3790371 -0.000256260913 9.397612394 -9.481163107 -0.000256260908 9.397611506 -9.481162349 -0.06154984384 9.999429723 -50.01119545 -0.140535 9.998943 -10.031647 -0.06666480825 9.999398053 -50.01251368 -0.0002035106708 0.5189006082 -0.602345277 -0.000203510589 0.5188881694 -0.602330713 -0.0002372183958 5.923578751 -6.297772889 -0.0002372183231 5.923564185 -6.297758858 -0.0002372182974 5.923558948 -6.297753712 -8.729935882 4.877184345 -47.71157878 -3e-06 121.343559 91.254417 -7.052875 7.089214 -9.315919 -7.052875 7.089214 -49.31608646 -3.396046 9.405683 -50.38108461 -3.455695157 9.383555203 -50.37787381 -0.000203484643 0.5149459539 -0.5977149336 -0.0002035048989 0.5180236295 -0.6013184602 -1.985055 -0.517936 0.000508 -7.211223 -6.928077 0 -1.843166 -0.48063 0.000516 -5.927504515 8.053390252 -49.87455311 -5.905177 8.069822 -9.883016 -5.883809214 8.085548833 -49.8913366 -8.173754487 5.760978415 -48.39692008 -8.176756 5.756795 -100 2e-06 -9.499397 -26.557114 -1.635444524 -9.86505907 -26.57502754 0.00011 3.688524 0.000755 0.000109 3.641173 0.000754 -0.317164 -0.079407 0.000595 -5.320966 -8.466838 0 -0.218945 -0.053583 0.0006 -9.446328379 3.281255771 -46.34325305 -9.455690906 3.253586989 -46.31776854 -9.446789 3.279965 -46.34207099 -3e-06 4.803276 82.082497 1.019728 -9.947871 0 0.845957 -9.964154 0 0.845957 -9.964154 -100 0.140517 9.207457 -3.874863 -5.467923 -8.372684 -30.5140118 -9.038429 -2.355401 4.5e-05 -9.709207 -2.394 -0.164003 -9.749449 -2.224467 -0.382315 -0.0002562636254 9.398097025 -9.481577028 -3.279965 -9.446789 0 -4.281271323 9.036763981 -50.29881798 -4.202882 9.073906 -10.309879 -4.202882 9.073906 -50.30992338 -1.571909 -0.409311 0.000531 -6.838752 -7.295989 0 -1.442112 -0.375185 0.000538 -49.999996 27.769222 -72.911659 -5.989904718 8.007464427 -49.85058417 -7.588271387 6.512335435 -48.93270368 -7.643902 6.447538 -100 -7.530214 6.579959 -100 4.249455 9.052189 -100 4.406791 8.976648 -100 -8.898371 4.562784 -100 -8.898371 4.562784 -47.45546129 -7.748685 6.32109 -8.800774 0 158.388062 15.301931 -49.999996 -17.273842 -33.060925 -4.717387 -8.817384 -29.52816012 2e-06 -2.478081 -36.966648 -0.131329 9.999 -10.029273 -2.824381249 9.592462833 -50.39025796 -2.821361222 9.593348634 -50.39022022 -0.000210387309 1.559820932 -1.778915034 -0.0002103872154 1.559806569 -1.778899116 -9.122947 4.095245 -7.058693 -9.124973 4.090826 -7.054919 -0.0002497707399 8.221158742 -8.440320817 -0.0002497706869 8.221149408 -8.440312559 -0.0002497703129 8.221083639 -8.440254371 -0.0002497703618 8.221092228 -8.44026197 3.607656 9.326566 -100 3.769877 9.262182 -100 -4.74847315 8.800249447 -50.21969244 -4.825609 8.758624 -100 -4.81147416 8.766252216 -50.20722571 6.313152 7.755264 -100 2e-06 -10.272888 -25.18998 0.00031 9.99981 -2.024125 0.000291 8.968504 -3.570602 0.000221 5.923634 -6.297699 0.000155 5.216143 0.00074 0.000153 5.177132 0.000741 3.930951 9.194978 0 4.090826 9.124973 0 -9.44465433 3.285946201 -46.34754841 5.320966 8.466838 -100 5.467923 8.372684 -100 5.320966 8.466838 0 -6.273214 7.787604 -100 -6.136346 7.895901 -100 -8.563922 5.163087 -7.936871 -50 -30.037888 1.078066 9.786785 2.053977 -100 9.821142 1.88286 -100 9.786785 2.053977 0 -2.478177103 9.687673443 -50.38052141 -5.097028 -1.334231 0.000316 -8.841509 -4.672013 0 -8.9217 -4.516995 0 -9.446789 3.279965 -100 -9.388106 3.444336 -100 -8.370033043 5.471905362 -48.17671694 -8.364771 5.47981 -8.182531 -8.367987 5.474979 -8.178833 3e-06 116.13562 -57.881439 -0.0002562612497 9.397672555 -9.48121449 -0.0002562613455 9.397689672 -9.48122911 -2.053977 9.786785 -10.353634 -0.0002172193815 2.621001094 -2.936999972 -0.0002172195575 2.621028576 -2.937029252 -50.000004 128.62439 98.306435 -0.0002103871872 1.559802182 -1.778894157 -8.896741489 4.565893698 -47.45806027 -3.809037911 9.245737092 -50.35309749 -3.881067225 9.216117599 -50.34674423 -0.0002462326938 7.583471358 -7.85598192 -0.0002497708062 8.221170395 -8.440331127 -0.245185543 -9.99670199 -25.77771454 -0.200214 -9.997995 -100 -0.374673 -9.992979 -100 -7.211223 -6.928077 -100 7.530214 -6.579959 0 7.414231 -6.710379 0 7.414231 -6.710379 -100 -49.999996 -2.267792 -52.267792 -9.394969832 3.425111547 -46.47498746 -9.388106 3.444336 -46.49259192 -50.000004 -1.022949 90.376869 9.843583 -1.761781 0 9.811336 -1.933306 0 -5.116971 8.591535 -10.134144 -6.53592953 7.568385614 -49.60792592 -6.541175 7.563929 -49.60538375 -9.518474 -3.065722 0 1.761781 9.843583 0 1.933306 9.811336 0 1.933306 9.811336 -100 4e-06 31.83659 -63.776207 -3.883647 9.215057 -50.34651689 -9.428194398 -3.331952913 -38.9221395 -9.405683 -3.396046 0 -9.405683 -3.396046 -38.83433114 2.731665 -9.619668 -100 2.563363 -9.665876 -100 2.731665 -9.619668 0 -4.608226561 -8.874566438 -29.39306516 3.444336 9.388106 0 3.607656 9.326566 0 -1.116318864 -9.937200141 -26.23668295 -1.244192 -9.922297 0 -1.070836 -9.942501 0 -0.0002035108428 0.5189267355 -0.6023758682 -0.000203510825 0.5189240385 -0.6023727103 -49.999996 -1.022949 -53.491096 -0.0002568294748 9.999807171 -10.57025334 -0.0002503714068 9.999807229 -11.90819272 -0.828235 9.965502 -10.183933 -0.0002562630256 9.397989859 -9.481485498 -50 168.305847 13.209288 -0.0002103872558 1.559812823 -1.778906185 -0.0002103872483 1.559811663 -1.778904874 -8.071863339 5.902891694 -48.5034982 -0.9423353899 9.95512298 -50.20500732 -9.887363406 1.494165984 -44.62211817 -9.899072 1.417172 -100 -9.872832 1.589719 -100 -2.138608011 9.768250887 -50.36003197 -2.218383 9.750782 -10.366117 -2.206795 9.753318 -10.365237 -8.070050998 5.905327097 -48.50530963 -1.019728 9.947871 -10.219234 -1.012399 9.948558 -10.217893 -8.9217 -4.516995 -37.24047281 0.000172 5.818095 0.000706 0.000171 5.776324 0.000709 -0.0002562609869 9.397625591 -9.481174379 -9.737887 2.274539 -45.40103453 -9.73566 2.283715 -5.409703 -9.737887 2.274539 -5.400681 -0.0002432249676 7.062977417 -7.379029451 -7.85477 6.188712 -8.708243 -0.000243224969 7.062977653 -7.379029668 -0.0002562830341 9.401564779 -9.484538819 -0.0002564076273 9.42382594 -9.503552 1.589719 9.872832 0 0.000317 9.576268 -4.656517 0.000332 9.91916 -5.260298 0.000321 9.999811 -3.570524 0.000311 9.651976 -3.57055 0.025694 9.999967 -3.625584 -3.878989 9.216972 -10.346895 -3.883647 9.215057 -10.346484 3e-06 0.519028 -40.602425 -9.881057423 -1.537689499 -41.2371161 -9.891347572 -1.46760576 -41.32234204 -7.046372124 7.095571001 -49.32014764 -7.044870961 7.097038617 -49.32108526 1e-06 -20.189812 2.81455 0.000158 5.333597 0.000735 -9.927107701 -1.204435195 -41.64148597 -9.928748845 -1.191478768 -41.6571613 -9.927726055 -1.199642695 -41.64728766 -7.289813265 6.845226615 -49.15678398 -7.295989 6.838752 -100 -7.236728497 6.9008787 -49.19338019 0.000147 4.943479 0.000749 0.000145 4.904468 0.00075 -49.999996 119.946693 -67.273842 -0.0002103873101 1.559821094 -1.778915211 -0.025694 -9.999967 -25.68279997 2e-06 -9.999808873 -25.67264335 -0.025694 -9.999967 -100 -0.0002172195223 2.62102312 -2.937023503 -0.0002172195558 2.621028309 -2.937028971 -3e-06 122.606239 90.320084 -0.845957 9.964154 -100 0.57923 9.982992 -4.826776 0.557465 9.984378 -4.849744 -3.909357 -1.023868 0.000393 -8.400671 -5.424824 0 -8.494069 -5.277384 0 -0.0001386158708 -6.041376288 0.0002517094833 -0.000133449614 -6.548448381 0.000219856464 -9.262182 3.769877 -6.777987 -0.0001929130945 -0.7002757404 0.0005717273938 -4.406791 -8.976648 0 -4.249455 -9.052189 0 -9.736601664 2.279835022 -45.40624195 8.176756 -5.756795 0 -0.0002172194173 2.621006768 -2.937006165 -3e-06 5.923634 83.183472 -0.671932 9.977401 -10.152991 3.8e-05 1.193473 0.00067 3.5e-05 1.094404 0.000665 -9.964316678 -0.8438256273 -42.06943773 -0.0002137092172 2.06547389 -2.330743194 -0.0002432248233 7.062952153 -7.379005882 -8.189076 5.738966 -8.380028 -8.168208 5.768711 -8.402502 -0.758648836 9.97079944 -50.17008532 -0.7643094563 9.970368916 -50.1712064 -5.467923 -8.372684 0 -0.0002497708052 8.221170228 -8.44033098 -6.534048542 7.569983952 -49.60883772 -6.475155632 7.620022381 -49.63738171 -9.500610898 3.12047703 -46.19513223 -9.502595 3.114597 -100 -9.47677922 3.191096622 -46.26019515 -4.562784 -8.898371 -29.33682629 9.652575 -2.613003 -100 9.605503 -2.781064 -100 -49.999996 26.181061 -72.187889 -4.35471 -1.140957 0.000364 -8.584878 -5.12834 0 -8.673072 -4.977731 0 -9.462327 3.233923 -6.299331 -9.499136 3.124848 -6.198836 -0.0002372185135 5.923601998 -6.29779495 -0.0002372185122 5.923601739 -6.297794704 -8.372684 5.467923 -100 -6.528392 7.57479 -9.611441 -6.531766 7.571923 -9.609806 -9.325843544 3.609476429 -46.63850841 -9.324120852 3.613818024 -46.64229185 -9.852507 -1.711171 -41.02520432 -9.833971173 -1.812638386 -40.9006938 -9.531109504 3.024962533 -46.10663841 -9.553667373 2.954052488 -46.04091647 0 158.31955 13.732651 -6.916147 7.222486 -9.400959 -0.0002497701211 8.221049754 -8.440224206 -9.193973753 3.933244629 -46.91969942 -9.194978 3.930951 -46.91772706 -2.053977 9.786785 -100 -2.145025474 9.766846444 -50.36052031 -9.843583 1.761781 -100 -9.811336 1.933306 -100 -7.005963174 -7.135105396 -32.95469505 -6.965043 -7.175524 -32.88143689 4e-06 0.046343 0.000612 -0.420128974 9.990794579 -50.09812946 0.200214 9.997995 -5.210624 0.209289 9.997735 -5.201606 4.249455 9.052189 0 8.817384 -4.717387 -100 8.73371 -4.870554 -100 -9.928559 -1.193185 -1.654663 -9.928559 -1.193185 -41.65510511 -8.616982759 -5.073514664 -36.40242981 -8.584878 -5.12834 -100 -8.673072 -4.977731 -100 9.446789 -3.279965 0 9.388106 -3.444336 0 -6.991281583 7.149430373 -49.35455707 -50 -30.325951 2.799438 -9.980064478 0.6251556417 -43.71318666 -9.973815 0.723194 -100 -9.973815 0.723194 -43.81832639 0.0003 9.189136 -3.974833 0.0003 9.187269 -3.971546 -9.462444317 3.233574807 -46.29933096 -9.052189 4.249455 -100 -8.976648 4.406791 -100 8.758624 4.825609 0 8.841509 4.672013 0 3e-06 114.79631 -58.702171 -9.052189 4.249455 -47.19068324 -9.652575 2.613003 -45.72208425 -9.651022282 2.618547188 -45.72728301 -9.676568149 2.521202651 -45.63551376 -0.0002035112537 0.5189891765 -0.6024489778 -9.927155 -1.20407 -1.641486 -9.928879 -1.190309 -1.658129 -50.000004 130.009033 97.243965 -0.0002103873707 1.559830319 -1.778925278 -0.0002497704128 8.221101197 -8.440269905 2e-06 -3.434311 -35.720467 -8.526914149 -5.223475551 -36.16948625 -8.584878 -5.12834 -36.31754329 -1.979157231 -9.801885019 -26.82346745 -2.104243 -9.776102 0 -2.104243 -9.776102 -26.91652804 -0.0002035113063 0.5189971074 -0.6024581365 -9.951344 -0.982676 -1.908155 -8.189284298 5.738665216 -48.38002739 -8.127478546 5.825503075 -48.44539289 3e-06 7.063034 -47.378944 -0.0001945484175 -0.5389024203 0.0005806054043 -0.0002035092887 0.5186906116 -0.6020994004 -0.000203508709 0.5186025326 -0.6019962728 -9.997995 0.200214 -3.254354 -9.997832 0.205902 -3.260514 7.895901 6.136346 0 8.001794 5.997609 0 -0.497698 9.987607 -10.11589 -7.85799 6.184685 -8.705426 3.8e-05 1.196312 0.00067 -0.0002562617855 9.397768292 -9.481296259 -50.000004 0.24305 91.578255 -4.452347389 -8.953787888 -29.20412397 9.619668 2.731665 -100 9.665876 2.563363 -100 -0.0002562610582 9.397638343 -9.48118527 -9.959674 0.897152 -4.003591 -2.320476896 -9.726733985 -27.08554471 -2.444142 -9.69671 0 -2.274539 -9.737887 0 -0.0002562608393 9.397599235 -9.481151869 -3.048414 9.523884 -10.390604 -0.000256260844 9.397600076 -9.481152586 8.73371 -4.870554 0 8.647378 -5.022235 0 8.647378 -5.022235 -100 -5.800754185 -8.145229193 -30.99493371 -5.898622 -8.07504 0 -5.756795 -8.176756 0 3.231376 -9.46352 0 3.065722 -9.518474 0 4e-06 30.407242 -63.124817 -1.289762336 -9.916178541 -26.34428019 -1.244192 -9.922297 -100 -1.417172 -9.899072 -100 -0.0002035104071 0.5188605422 -0.6022983653 -0.0002035103206 0.5188474 -0.6022829776 0.000293 9.924306 1.7e-05 0.000299 9.99981 -0.627502 -50 168.199295 11.467237 -8.514454932 5.243705991 -47.99998322 -8.554291056 5.179070823 -47.94963019 -8.895501 4.568261 -7.459764 -0.0002194617063 2.96899555 -3.303716004 -49.999996 -12.458817 -40.335644 -8.494069 -5.277384 -36.0855899 2e-06 -5.2808 -33.178993 -7.331037 -6.801169 -33.55535767 -7.370581683 -6.757790219 -33.63243726 -7.860738314 6.181248402 -48.70322626 -0.0002372183245 5.923564472 -6.29775914 -1.27928075 9.917449746 -50.2614505 -1.359324 9.907122 -10.273735 -1.285280225 9.916675906 -50.26236748 -0.000203507628 0.5184382849 -0.6018039624 5.613212 8.27598 -100 5.467923 8.372684 0 -9.821142 -1.88286 -40.81452455 -9.821399 -1.88146 -0.815798 -9.821142 -1.88286 -0.814079 -0.000224006231 3.702278615 -4.076446785 -0.0002240061938 3.702272728 -4.076440794 -0.0002240062306 3.70227855 -4.076446718 4e-05 1.289713 0.000674 -6.447538 -7.643902 -100 -6.579959 -7.530214 -100 -0.0002562603516 9.397512081 -9.481077431 -4.500942 8.929653 -10.265057 -0.0002172194872 2.621017669 -2.937017758 -0.0001217171113 -7.699112542 0.0001470828503 -0.0001149916101 -8.355892109 0.0001052856773 6.579959 7.530214 -100 6.710379 7.414231 -100 7.448616 6.67219 -100 7.563929 6.541175 -100 7.448616 6.67219 0 -0.000256260498 9.39753825 -9.481099781 -3.961238 9.181557 -10.338276 -4.027326 9.153023 -10.331285 -9.785274 2.059743 -5.188097 1e-06 -20.449066 4.363785 -0.0002562613495 9.397690393 -9.481229726 -2.036263 9.790342 -10.352013 -0.000256261357 9.397691727 -9.481230865 7.1e-05 2.337992 0.000718 6.9e-05 2.268225 0.000715 -7.530214 6.579959 -48.97892091 -7.523026 6.588042 -8.98419 -7.530214 6.579959 -8.978733 -1.244192 -9.922297 -26.31495809 -9.162088152 4.006063711 -46.98231808 -9.122044505 4.097209902 -47.0606593 0.671932 -9.977401 -100 -9.821295355 -1.882024603 -40.8155499 -0.0002307434855 4.803220506 -5.196784621 -9.352166 3.539714 -6.577032 -9.322288 3.618437 -6.646017 -49.999996 118.442886 -68.159653 -7.640039675 6.452036472 -48.89149227 -7.637017 6.455557 -8.893705 -7.643902 6.447538 -48.88841785 -3e-06 123.852417 89.363853 -0.0002362167947 5.719404753 -6.097129156 -0.0002562619645 9.397800274 -9.481323574 0.0002 6.771683 0.00061 0.000198 6.715881 0.000617 -49.999996 -13.472321 -38.914761 -8.206232 -5.714698 -35.39689434 -8.140838661 -5.80687589 -35.24514414 -6.408171 7.676936 -49.6698476 -1.538961 9.88087 -10.298554 -1.538961 9.88087 -50.29850627 -0.0001961182741 -0.383989289 0.0005890515699 -4.562784 -8.898371 0 -4.717387 -8.817384 0 -6.827409561e-05 -9.999809305 -9.862649611 -4.406791 -8.976648 -29.14938272 0.000101 3.395541 0.000749 0.0001 3.344461 0.000748 8.400671 5.424824 0 8.494069 5.277384 0 8.494069 5.277384 -100 -0.723194 -9.973815 -26.01230404 -0.768487805 -9.970133079 -26.03720728 6.313152 7.755264 0 6.447538 7.643902 0 -0.03910368074 9.999568071 -50.00541009 -3e-06 7.063034 84.264717 -7.044515 7.097386 -9.32114 -7.044604 7.097299 -9.321085 -5.418676608 8.404565459 -50.04937385 -5.410003 8.41006 -10.051826 0.000127 4.262771 0.000759 8.372684 -5.467923 0 -1.933306 -9.811336 0 -49.999996 24.60577 -71.436516 -1.193185 9.928559 -10.248354 0.723194 9.973815 0 0.897152 9.959674 0 -9.800764727 -1.984350753 -40.68941962 -9.821142 -1.88286 -100 -9.80689549 -1.953815676 -40.72705937 -0.0002566248973 9.462645712 -9.536707832 0 158.223648 12.164804 -0.200214 -9.997995 0 -0.200214 -9.997995 -25.75716454 -7.448616 -6.67219 -33.78453996 -9.89837834 1.421734819 -44.54899153 -9.897878 1.425026 -4.551945 -2.053977 9.786785 -50.35360304 -0.0002035100769 0.5188103743 -0.6022396258 -0.0002035102134 0.518831108 -0.602263902 -8.556102283 5.176132598 -47.9473413 -2.563363 9.665876 -50.38430912 -2.487898187 9.685185727 -50.38095341 -2.60011 -0.679645 0.000473 -7.919004347 6.105880369 -48.64996911 -7.970867 6.038652 -100 -7.864263 6.176841 -100 -9.795431401 2.01046648 -45.13947829 -9.809549 1.941975 -5.071044 9.984918 -0.549018 -100 9.973815 -0.723194 -100 9.984918 -0.549018 0 2.563363 -9.665876 0 2.394278 -9.709141 0 0.000152 5.138165 0.000743 -0.0002307435052 4.803223797 -5.196787855 -9.815769845e-05 -9.999809489 0 -3.705387 9.288018 -10.361921 -3.866943 9.221926 -10.347958 -3.717455 9.283301 -10.361066 -9.69425 2.45355 -5.571378 1.193185 -9.928559 0 1.019728 -9.947871 -100 -3.154571125 9.488999905 -50.38873446 -3.147905005 9.491211057 -50.38886973 -50 -30.583923 4.525575 -7.602457438 -6.495828815 -34.0938508 -7.563929 -6.541175 -100 5.277384 -8.494069 0 5.12834 -8.584878 0 3e-06 113.442886 -59.499397 -2.563363 9.665876 -10.384322 -6.128782016 7.901674452 -49.7940737 -0.0002562614704 9.397711978 -9.481248162 -1.865114 9.824383 -10.336079 -6.83100351 -7.303125991 -32.64844612 2e-06 -6.170494 -31.884476 -50.000004 131.374924 96.157486 -0.0002562619732 9.397801826 -9.481324901 -0.0002562619869 9.397804273 -9.48132699 -7.858929055 6.183511101 -48.70480888 -5.424824 8.400671 -100 -4.295112551 -9.030267653 -29.01913787 -0.0002432248771 7.062961673 -7.379014916 -0.0002432248326 7.062953787 -7.379007433 -0.0002562622393 9.39784936 -9.481365499 -0.0002562625312 9.397901518 -9.481410048 -2.899136 9.570528 -50.39118486 3.930951 9.194978 -100 4.090826 9.124973 -100 3e-06 2.621056 -42.936966 -9.950595579 0.9889675079 -44.10149272 -9.952103119 0.973720852 -44.08530025 -8.07504 5.898622 -100 -50.000004 1.529823 92.75737 -3.969873961 9.177828043 -50.3373986 -3.96322182 9.180700244 -50.33810213 -2.308741512 9.72944521 -50.37163512 -2.388358 9.710546 -10.376452 -2.376659 9.713324 -10.375748 -0.000256260519 9.397541996 -9.481102981 0.025694 9.999967 -100 -9.65254679 2.613104327 -45.72217932 3.883647 -9.215057 -100 3.72223 -9.281434 -100 4e-06 28.989483 -62.448578 0.000309 9.590956 -3.570555 0.000305 9.448096 -3.570565 -4.813993 8.764894 -10.206625 -4.825609 8.758624 -10.204181 -0.0002562761765 9.400339533 -9.483492342 -0.000256275164 9.400158637 -9.483337846 -1.705526 -0.444442 0.000524 -1.193185 9.928559 -50.24829487 -9.683196254 -2.495673292 -40.03294654 -9.709141 -2.394278 -0.163644 -9.665876 -2.563363 0 -50 168.062347 9.72731 -6.067229027 7.948655651 -49.81920258 -6.395114 7.687644 -9.675702 -6.398518 7.684853 -9.674141 2e-06 -4.368645 -34.457787 -6.245127479e-05 -9.999809269 -11.4488337 -0.0002307437223 4.803260132 -5.196823563 -5.367535 -1.404317 0.000298 -9.942006448 1.075073189 -44.1929176 -0.0002035113069 0.5189971898 -0.6024582296 9.872832 -1.589719 -100 9.843583 -1.761781 -100 9.872832 -1.589719 0 2.899136 -9.570528 0 -3.065722 9.518474 -50.3905398 -3.062783393 9.5193919 -50.39055088 9.8e-05 3.292665 0.000747 -0.0002251218462 3.878683553 -4.255959577 -0.000230691008 4.794234694 -5.187640591 1e-06 -20.681236 5.917307 0.000104 3.493946 0.000751 -5.202696202 8.53957442 -50.11114628 -5.262338 8.503236 -10.094835 -0.0002240061915 3.702272356 -4.076440415 -0.0002240061917 3.702272402 -4.076440462 -8.241172795 -5.663576812 -35.47865098 -9.326566 3.607656 -100 -0.0002562602593 9.397495605 -9.481063359 -0.0002562601734 9.397479862 -9.48104943 -0.0002562602162 9.397487698 -9.481056363 -6.219958003 -7.82978515 -31.63134514 -6.176841 -7.864263 -31.56363178 -49.999996 116.923843 -69.019081 -9.305880664 -3.659695691 -38.4708143 -9.281434 -3.72223 -100 -9.281434 -3.72223 -38.38434387 3e-06 9.999809102 -49.99533059 -3e-06 125.081726 88.386024 -7.638228282 6.454146866 -48.89293474 -6.13071559 7.90019839 -49.79328412 -1.106051367 9.938260355 -50.23366381 -1.186044 9.929355 -10.247154 -0.2457384953 9.996604795 -50.05722579 -0.323315 9.994773 -50.07606452 -5.627906631e-05 -9.999809231 -13.05638564 -5.997609 8.001794 -100 -0.000230743425 4.803210196 -5.19677422 -9.9927 0.380687 -3.44974 -9.984918 0.549018 -3.631138 -2.988421972 9.542628002 -50.39083883 -0.09093 9.999249 -10.018862 3e-06 3.702301 -44.076366 -9.631019072 2.68996458 -45.79425016 -3e-06 8.22113 85.32592 9.388106 -3.444336 -100 9.326566 -3.607656 -100 -9.843583 1.761781 -44.89140706 -9.842668086 1.766649916 -44.89627203 -49.999996 -10.358192 -43.123264 -9.485033596 -3.166525157 -39.14837157 -49.999996 23.043835 -70.657768 -4.562784 -8.898371 -100 -4.717387 -8.817384 -100 0.0003 9.178287 -3.955523 0.0003 9.178152 -3.955278 -9.196159259 -3.927416488 -38.09899272 -0.0002035112516 0.5189888572 -0.6024486039 -3.700139 -0.968861 0.000406 -0.0002035109124 0.5189373188 -0.6023882597 0 158.100403 10.598869 -8.561526917 5.167128486 -47.94029238 -0.4157402747 9.990975013 -50.0971293 -3.976773175 -9.174913691 -28.66125082 4.562784 8.898371 -100 4.406791 8.976648 0 -9.797267 -2.001771 -0.667501 -5.651395 -1.477862 0.000279 -9.090678342 4.165570847 -47.1190426 -2.731665 9.619668 -10.389116 -0.0002041054013 9.999807631 -20.50396887 2e-06 -7.037468 -30.574627 -7.633788 6.459319 -8.896276 -7.811129054 6.2432884 -48.74661871 -7.965705187 6.045342844 -48.6071645 0.38344 9.992573 -5.028286 -9.605503 2.781064 -45.87967285 -9.621407779 2.72427773 -45.82642499 -9.786785 -2.053977 -100 -4.090826 -9.124973 -100 -50 -30.811729 6.25595 1.244192 9.922297 0 1.417172 9.899072 0 -0.0002562629716 9.397980207 -9.481477255 -0.0002562625692 9.397908306 -9.481415844 9.194978 -3.930951 -100 9.124973 -4.090826 -100 -0.0002562602597 9.397495668 -9.481063412 -4.80993 8.767086 -10.207465 -4.656144 8.849721 -10.237601 -7.251245924 -6.885684381 -33.40421314 -7.331037 -6.801169 -100 -0.0001688690007 -3.072007197 0.0004343289892 -0.0001658924961 -3.36415362 0.0004167498455 -7.169183802 6.971462618 -49.23973658 3e-06 112.075752 -60.272888 -9.977401 -0.671932 -42.26767831 -9.973815 0.723194 -3.817934 -9.984514 0.555354 -3.637934 -6.82595189 7.307638787 -49.45468187 -6.814853473 7.318116652 -49.46098827 -5.997609 8.001794 -49.84762469 -3.319758329 9.432477673 -50.38390526 -3.313078166 9.434823425 -50.38415179 -50.000004 132.721649 95.047333 -2.131427 -0.55642 0.0005 -7.331037 -6.801169 0 -7.448616 -6.67219 0 -9.262182 3.769877 -46.77828349 -9.296497332 3.683417845 -46.70294202 -8.400671 -5.424824 -35.8549337 0.000234 7.926025 0.000429 -0.0001648804507 9.999807959 -26.90559984 -0.0001538367752 9.999808051 -28.60952542 5.756795 8.176756 -100 5.613212 8.27598 0 -9.555504 2.948279 -46.03556538 -9.581092734 2.862699514 -45.95578054 -50.000004 2.836983 93.913841 -9.906224 -1.366281 -41.44555869 -9.906417092 -1.364792109 -41.44736141 -4.127337 -1.081178 0.000379 -0.0002372186231 5.923623667 -6.297815513 -0.0002372185884 5.923616813 -6.297809009 -0.0002372185904 5.923617205 -6.29780938 -49.999996 -15.424171 -36.021023 -6.447538 -7.643902 -31.99464524 -6.355949629 -7.719798776 -31.84679161 8.304716 5.570608 -100 8.400671 5.424824 -100 8.304716 5.570608 0 -0.0002562603051 9.397503789 -9.481070348 4e-06 27.58374 -61.747704 -1.175414 9.930538 -10.245371 -4.516995 8.9217 -100 -6.136346 7.895901 -49.79098561 -50 167.895081 7.990038 -3.930951 -9.194978 -28.61097015 -5.120739461 8.589328341 -50.13327987 -5.113075 8.593816 -10.135122 -5.114643 8.592898 -10.134728 -2.690357136e-05 -9.99980905 -19.72821949 -2.148394811 9.766108225 -50.36077597 -2.104243 -9.776102 -100 -7.356163514 6.773421525 -49.10898458 -7.408220969 6.716903776 -49.07131646 -8.183696436 5.746751086 -48.38615996 -0.0002127870417 9.999807557 -18.99552339 -0.0002562647839 9.398304018 -9.48175382 -0.489793 9.987932 -10.114088 -9.911974425 1.321076264 -44.4468692 -9.899072 1.417172 -44.54438483 -7.895901 -6.136346 -34.69888818 -8.647378 5.022235 -100 9.326566 -3.607656 0 3.065722 -9.518474 -100 2.899136 -9.570528 -100 0.032046 9.999896 -3.639367 0.200214 9.997995 0 0.025694 9.999967 0 -7.74976036 6.319793646 -48.8000763 3.396046 -9.405683 0 -7.755264 6.313152 -8.795284 -2.767181 -0.723571 0.000463 0 -20.886269 7.474646 1.711171 -9.852507 -100 1.538961 -9.88087 -100 -9.709141 -2.394278 -40.16410586 -9.116582459 -4.108596965 -37.83672993 -6.880091512 -7.256556544 -32.73353783 -6.838752 -7.295989 -100 -49.999996 115.390045 -69.851875 -3.22851592 9.464469484 -50.38723148 -0.0002289368317 9.999807418 -16.07481549 0.000371 9.999811 -9.995333 -0.0002210583199 9.999807486 -17.51975469 -3e-06 126.29377 87.386887 -4.129497367 9.107122078 -50.31899197 -1.366281 9.906224 -50.27474452 -1.366281 9.906224 -10.274797 -1.521182 9.883481 -10.296108 -9.326566 3.607656 -46.63692205 -0.0001768105134 -2.289274001 0.0004808403175 -2.948279 -9.555504 0 -4.672013 8.841509 -50.23482195 -0.0001235126124 -7.523772661 0.0001581951928 9.959674 -0.897152 -100 9.942501 -1.070836 -100 -9.931127497 1.168421966 -44.29156905 -49.999996 -4.692482 -49.75695 -9.933556029 1.147580162 -44.26954321 -9.82908255 1.838912733 -44.96847441 -9.758786549 2.181402078 -45.30896061 -9.737887 2.274539 -100 -7.448616 -6.67219 -100 -7.466659601 -6.651689429 -33.8207396 -0.0002307436699 4.80325137 -5.196814952 -0.0002307436509 4.80324819 -5.196811827 -2.274539 -9.737887 -100 -2.444142 -9.69671 -100 -7.089214 -7.052875 -33.10373651 -7.129694483 -7.011469175 -33.17827584 -3e-06 9.397575 86.366745 -7.751570391 6.317608584 -48.79856504 -7.755264 6.313152 -48.79548325 -5.756795 -8.176756 -100 -0.0002035098974 0.5187830872 -0.6022076762 -0.0002035096503 0.5187455453 -0.6021637199 8.27598 -5.613212 0 9.262182 -3.769877 0 -9.709180556 -2.394111384 -40.16432042 -7.895901 -6.136346 0 -7.787604 -6.273214 0 -0.0002562625467 9.397904292 -9.481412416 -49.999996 21.495731 -69.851875 -0.0002372185492 5.923609061 -6.297801652 -6.838752 -7.295989 -32.66156646 -0.0002497707444 8.221159525 -8.44032151 -3.231376 9.46352 -50.38717277 0 157.94986 9.035325 -6.082069373 -7.937373266 -31.41883465 -6.038652 -7.970867 0 -0.5942086346 -9.982037284 -25.9453855 -0.723194 -9.973815 -100 -4.669715043 8.842698172 -50.23523322 -2.43867 -0.6372 0.000482 0.0003 9.183615 -3.965111 0.0003 9.181055 -3.960604 -9.956433455 0.9299247675 -44.0387873 -49.999996 -5.871597 -48.470177 -9.899072 1.417172 -4.544015 -9.046749 4.260784 -7.200007 6.273214 -7.787604 0 6.136346 -7.895901 0 6.136346 -7.895901 -100 -9.964154 -0.845957 -100 -9.977401 -0.671932 -100 -4.039337 9.147837 -10.330014 -0.0002035112853 0.5189939694 -0.6024545896 -0.0002562610666 9.397639847 -9.481186555 -0.000256261061 9.397638834 -9.48118569 0.000119 4.006173 0.000758 0.000118 3.96213 0.000758 -50 -31.0093 7.990038 9.446789 -3.279965 -100 9.502595 -3.114597 0 9.998893 0.148833 0 9.999967 -0.025694 0 -2.658995756 -9.639692945 -27.36670365 -2.781064 -9.605503 -27.4728474 -0.733535 -0.188882 0.000575 -5.987275 8.009399 -9.851478 -49.999996 -18.159653 -31.557117 -2.827072089 -9.591746109 -27.51433136 -2.948279 -9.555504 -27.6236196 -9.752307 -2.211413 -0.399049 -6.594698 -1.722262 0.000216 -6.263687 -1.636501 0.000238 3e-06 110.695328 -61.0224 -9.977538046 -0.6695933543 -42.27036305 -5.570608 8.304716 -100 -9.34119802 3.568822849 -46.6028635 -50.000004 134.048798 93.913841 -2.224467 9.749449 -10.36658 0.000301 9.196949 -3.988591 0.000301 9.206537 -4.005475 -9.811336 1.933306 -45.0627886 -9.811336 1.933306 -5.062429 -9.080162 4.188488 -7.13833 2.224467 -9.749449 0 -50.000004 4.164124 95.047333 -0.0002562622221 9.397846298 -9.481362883 -0.0002562622108 9.397844271 -9.481361153 -6.408171 7.676936 -9.669714 -0.0002562611475 9.397654302 -9.481198901 -6.263323 7.79543 -9.735876 -6.273214 7.787604 -9.731593 -6.122756 7.906274 -9.796412 3e-06 26.190445 -61.0224 -0.0001976268875 -0.2351196064 0.0005970933812 -50 167.69751 6.25595 -4.600617097 8.878442623 -50.24758869 -4.870554 -8.73371 -29.72332997 -4.905987549 -8.713542351 -29.76980332 6.447538 7.643902 -100 9.052189 -4.249455 -100 -6.267705943 7.791962109 -49.73410549 -6.34109714 7.731938711 -49.70059904 -6.273214 7.787604 -49.73172058 -0.0002562612395 9.397670727 -9.48121293 -0.000256261243 9.397671353 -9.481213464 0 -21.064087 9.035325 -1.933306 -9.811336 -100 -3.393261062 9.406661327 -50.38118773 -3.883647 9.215057 -100 2.444142 9.69671 0 -3.396046 9.405683 -100 -3.231376 9.46352 -100 0.000107 3.593262 0.000753 0.000106 3.544768 0.000752 -9.88087 -1.538961 -41.23556965 -49.999996 113.841934 -70.657768 -9.859729282 1.666795714 -44.79600407 -3e-06 127.488197 86.366745 -4.962256 8.681776 -10.172674 -9.69671 2.444142 -45.56284355 9.518474 3.065722 0 9.570528 2.899136 0 9.570528 2.899136 -100 0.000122 4.093093 0.000758 -3e-06 10.592003 87.386887 -0.0002372185511 5.923609433 -6.297802005 -0.0002372185524 5.923609688 -6.297802248 -6.921413773 7.217513689 -49.39799195 -6.928077 7.211223 -100 -6.865345058 7.270448233 -49.4312886 -4.879767573e-05 -9.999809185 -14.68665913 7.295989 -6.838752 -100 -1.933306 -9.811336 -26.78935532 -49.999996 19.961926 -69.019081 -0.549018 -9.984918 -25.92194027 -0.4197566626 -9.990894516 -25.85887901 -5.266159 8.500908 -10.093796 0 157.772034 7.474646 -4.356269 9.001228 -10.288143 -4.360604 8.999174 -10.287528 -7.967513705 6.042998405 -48.60550679 -7.961688 6.05055 -8.610638 -7.964904 6.046381 -8.60769 -9.619668 -2.731665 -39.72669247 -9.638065144 -2.664657641 -39.81376295 -5.413754 8.407684 -10.050725 -8.565605 -2.232899 7.9e-05 -9.570528 -2.899136 0 -0.000224006233 3.702278933 -4.076447108 -9.016492463 4.32380259 -47.2537354 -9.774098 2.113168 -5.241149 -9.776102 2.104243 -5.232326 -3.065722 9.518474 -100 -0.0001814332468 -1.833104099 0.0005074839585 -0.0001791811511 -2.055340219 0.0004945511112 -9.973498992 0.727080721 -43.82247444 -9.973274 0.729848 -3.825035 -9.967607066 0.7995612906 -43.89982868 -3.214169 9.469229 -10.387513 -3.22621 9.465235 -10.387268 -50 -31.176582 9.72731 -0.549018 -9.984918 -100 4e-06 109.302032 -61.747704 -0.723194 -9.973815 0 -9.46352 -3.231376 0 -5.562504236 8.310050918 -50.00416086 -7.211223 -6.928077 -33.32839957 -3.325964038 -9.430366629 -27.98488686 -3.444336 -9.388106 0 -3.444336 -9.388106 -28.10327548 -50.000004 135.355957 92.75737 -8.815590033 4.720670363 -47.58666885 -8.813780185 4.723983219 -47.58931363 0.00015 5.058632 0.000746 0.00015 5.060307 0.000745 2.444142 9.69671 -100 -50.000004 5.510849 96.157486 0.000205 6.94719 0.000587 0.000203 6.887244 0.000595 0.000136 4.589111 0.000756 0.000135 4.549071 0.000757 -2.893681 9.572128 -10.391119 -2.899136 9.570528 -10.391186 -9.605283 2.781799 -5.880026 3e-06 24.81002 -60.272888 -0.5943949754 9.98194284 -50.13640266 -0.0002562603991 9.39752057 -9.481084681 -0.374673 -9.992979 -25.83688456 7.5e-05 2.473235 0.000723 7.3e-05 2.406308 0.000721 -0.0001754049074 9.999807872 -25.24554768 -50 167.469696 4.525575 -8.2174673 -5.698259854 -35.42380923 -0.0002372185917 5.923617456 -6.297809619 -8.267751 5.62512 -8.293679 -9.619668 -2.731665 0 -2.484708395 9.686002415 -50.38081199 -4.870554 -8.73371 -100 -1.348501 9.908518 -10.27208 8.7e-05 2.907418 0.000737 8.6e-05 2.84872 0.000735 9.999967 -0.025694 -100 9.997995 -0.200214 -100 -7.37573449e-05 -9.999809339 -8.296547995 0.148833 -9.998893 -100 -9.999425447 0.07364791962 -43.11705494 3e-06 1.559853 -41.77887 -9.999931759 0.02883989089 -43.06656125 0 -21.214638 10.598869 -0.0002562616098 9.39773689 -9.481269439 -1.693404 9.855433 -10.317444 -0.07054897872 -9.999460158 -25.70191309 0.000165 5.571905 0.000722 0.000164 5.531755 0.000725 -49.999996 112.279999 -71.436516 -5.424824 8.400671 -50.04756986 -7.291631172 6.843320275 -49.15553025 -7.487664303 -6.627824548 -33.86288001 -3e-06 128.664642 85.32592 -1.88286 9.821142 -10.337978 -9.359453485 3.520377852 -46.56037539 -9.354554309 3.533379069 -46.57177797 -1.452126349 9.893619945 -50.2865576 -9.999116446 0.1009941694 -43.14680656 -9.999421 0.074016 -3.117055 -9.998831407 0.1261937537 -43.17422261 -5.217217742 -8.53078041 -30.17253058 -5.320966 -8.466838 -30.31151807 -2.653439582 9.641145024 -50.38687764 -2.646862778 9.642951029 -50.38669037 -0.0002372185104 5.923601385 -6.297794368 -4.592153 -1.203384 0.000349 -0.000237218361 5.923571875 -6.297766364 -0.0002372183533 5.923570356 -6.297764923 -3e-06 11.80405 88.386024 -2.899136 9.570528 -100 -8.001794 -5.997609 -100 -3.926619807 9.196503443 -50.34197278 -9.999967 0.025694 -43.06301609 -9.999353798 -0.07387321157 -42.95029022 0.000335 9.999811 -5.402313 -1.704574 9.853594 -10.31881 -49.999996 18.442886 -68.159653 2.781064 9.605503 -100 2.948279 9.555504 -100 2.781064 9.605503 0 -8.754655021 -4.832666333 -36.77420453 -8.758624 -4.825609 -36.78470571 -9.936620156 -1.120780034 -41.74236238 -9.947871 -1.019728 -1.863703 -0.0002035104784 0.51887137 -0.6023110431 1e-06 157.567017 5.917307 -8.817384 4.717387 -47.58404769 -1.869852453 -9.823265378 -26.74409956 -1.807574936 -9.83497366 -26.69811178 -0.000170632609 -2.898907545 0.0004446796731 0.000177 5.988952 0.000693 0.000176 5.945618 0.000696 -0.0002103871564 1.559797415 -1.77888877 -6.659685 7.459622 -9.544603 -6.541175 7.563929 -9.605245 -0.0002172195207 2.621022863 -2.937023232 -9.872832 1.589719 -4.718222 -9.998687699 -0.1575065508 -42.85555843 -9.998910646 -0.1458861297 -42.86876028 -50 -31.313522 11.467237 -0.0002240061526 3.702266213 -4.076434164 -9.602557 2.79091 -5.888521 -0.0002240061547 3.702266547 -4.076434504 -6.965043 -7.175524 0 -8.326046176 5.537991222 -48.22730222 -8.27598 5.613212 -8.284648 -4.287861386 9.033640972 -50.29788391 -9.810301923 1.938322462 -45.06777443 9.928559 1.193185 -100 9.947871 1.019728 -100 9.928559 1.193185 0 0.000254 8.599451 0.0003 0.00025 8.471066 0.000326 -9.852507 -1.711171 -1.02476 4e-06 107.896286 -62.448578 -8.113194222 -5.845843254 -35.18099312 -6.176841 -7.864263 -100 -8.789182493 -4.76898039 -36.86854459 -50.000004 136.642731 91.578255 -49.999996 -16.361923 -34.549046 -0.0001292123542 9.99980825 -32.16017042 6.408171 -7.676936 0 -9.192212757 3.937266179 -46.92315762 -9.842004 1.770184 -4.89944 0.000134 4.508845 0.000757 -50.000004 6.87674 97.243965 0.671932 -9.977401 0 -7.284955 6.85032 -9.159956 -7.288203 6.846914 -9.157717 -9.230701475 3.845329969 -46.84360405 -9.194978 3.930951 -6.917435 -4.43836957 8.960650291 -50.27512857 7.676936 6.408171 -100 7.787604 6.273214 -100 7.676936 6.408171 0 3e-06 23.442886 -59.499397 -9.215057 -3.883647 -100 -8.604778093 5.094133149 -47.88294744 -8.999174 -4.360604 -37.46973717 -0.625698 -0.160529 0.000581 -6.667080901 7.45311261 -49.54096258 -6.663031 7.456677 -9.542892 -8.228017761 5.682616283 -48.33751835 -50 167.211731 2.799438 -8.814221 4.723176 -7.588409 -8.817384 4.717387 -7.583787 -0.0002432252546 7.063027087 -7.379074966 -0.0002432252078 7.063018989 -7.379067546 -9.101100976 -4.142800182 -37.78706949 -3.477246586 9.375560274 -50.37671367 -3.503781 9.365717 -10.375267 -3.542706 9.351277 -10.373169 -0.0002432251099 7.063002039 -7.379052013 -0.0002432251069 7.063001526 -7.379051543 5.424824 -8.400671 -100 5.277384 -8.494069 -100 5.424824 -8.400671 0 -9.67677 -2.520787 0 -9.544109 -2.486416 9e-06 -9.928559 -1.193185 -100 -9.709141 -2.394278 -100 -3.554781 9.346798 -10.372519 0 -21.337875 12.164804 8.2e-05 2.728183 0.000732 8e-05 2.666253 0.00073 -7.700874228 6.378786945 -48.84087311 -6.622066692 -7.49276747 -32.28622325 -6.710379 -7.414231 -100 -6.710379 -7.414231 -32.43687793 0.000213 7.203997 0.00055 0.000211 7.13699 0.00056 -0.0002035105381 0.5188804478 -0.6023216719 -0.0002172194159 2.62100654 -2.937005916 -0.0002172193828 2.621001312 -2.93700021 -0.000217219388 2.621002131 -2.937001105 -6.665214426 7.454755398 -49.54191759 9.973815 -0.723194 0 -49.999996 110.704712 -72.187889 -4.205340882e-05 9.999808876 -44.1977228 -3e-06 129.822739 84.264717 -0.0002562614656 9.397711134 -9.481247441 -0.0001743110826 -2.535917021 0.0004662846852 -0.0001716713905 -2.796400952 0.0004508091673 -8.271339951 5.61992651 -48.28997256 -8.27598 5.613212 -48.28488006 -2.994293539 -9.540865877 -27.66660215 5.857047 -8.105246 0 5.714698 -8.206232 0 -7.563929 -6.541175 0 0.000298 9.99981 -0.490231 -3e-06 13.033352 89.363853 -8.731747867 4.874000623 -47.70905713 -8.730247 4.876637 -7.710889 -0.0002562671168 9.398720825 -9.482109813 -0.323315 9.994773 -10.076151 -6.038652 -7.970867 -100 8.898371 -4.562784 0 8.817384 -4.717387 0 9.997995 -0.200214 0 -49.999996 16.939079 -67.273842 9.992979 -0.374673 -100 1e-06 157.334839 4.363785 -0.0002103871557 1.559797298 -1.778888637 -2.781064 -9.605503 0 -0.0002497705193 8.22111993 -8.440286478 -0.0002497705723 8.221129263 -8.440294736 -5.703971 8.213563 -9.956467 -9.665876 -2.563363 -39.9453869 -0.4103394826 9.99119764 -50.09589899 -7.171005434 6.969618055 -49.23854048 -7.175524 6.965043 -49.2355739 -3.505188233 -9.365176497 -28.16618079 0.000143 4.826258 0.000752 0.000142 4.787031 0.000753 -0.520434 -0.132852 0.000586 -5.613212 -8.27598 0 -0.417625 -0.105821 0.000591 -8.270968 5.620463 -8.290147 -50 -31.420067 13.209288 9.964154 0.845957 -100 9.977401 0.671932 -100 9.964154 0.845957 0 -2.315219694 9.727906926 -50.3720251 -8.823300745 4.706091756 -47.57496025 -9.652526 2.613179 -5.721915 -0.0002240061136 3.702260042 -4.076427884 -6.67219 7.448616 -100 4e-06 106.478531 -63.124817 -5.11986937 8.589837744 -50.13349821 -5.12834 8.584878 -100 -50.000004 137.908722 90.376869 -8.273153906 5.617300589 -48.28798079 -5.277384 8.494069 -10.090742 -9.774943866 2.109400859 -45.23778132 6.408171 -7.676936 -100 6.273214 -7.787604 -100 -5.657413003 -8.245434599 -30.78428697 -5.756795 -8.176756 -30.92908363 -6.038652 -7.970867 -31.35249928 -50.000004 8.261383 98.306435 -7.676936 -6.408171 -100 3.279965 9.446789 0 3.444336 9.388106 -100 -9.786908699 -2.053361495 -40.60212087 -9.786785 -2.053977 -40.60133532 3e-06 22.089458 -58.702171 -9.652575 2.613003 -5.72175 -50 166.92366 1.078066 -9.194978 3.930951 -100 -5.277384 8.494069 -50.09083042 -9.375664253 3.47735636 -46.52264364 -9.385817102 3.450411879 -46.49812168 -9.502595 3.114597 -46.18971481 5.997609 -8.001794 -100 5.857047 -8.105246 -100 -0.0002497702152 8.221066453 -8.440239166 0.497698 -9.987607 -100 0.000125 4.220829 0.000759 -0.000224006259 3.702283032 -4.076451279 -0.0002240059884 3.702240067 -4.076407241 -2.71418 9.624469 -10.388618 -49.999996 -7.028069 -47.163017 0 -21.433769 13.732651 9.052189 -4.249455 0 -49.999996 109.116547 -72.911659 -3e-06 130.962143 83.183472 -2.150141348 -9.765802255 -26.95209966 -5.277384 8.494069 -100 -8.64524405 5.025836677 -47.82929363 -8.647378 5.022235 -47.82646413 -0.0002562604478 9.397529282 -9.481092122 0.000121 4.04982 0.000758 7.052875 -7.089214 -100 6.928077 -7.211223 -100 -3e-06 14.279533 90.320084 0.000175 5.902716 0.000699 7.643902 -6.447538 -100 7.530214 -6.579959 -100 7.643902 -6.447538 0 -0.9425431262 -9.955185954 -26.13431647 -1.070836 -9.942501 -26.20884147 -9.665876 -2.563363 -100 -49.999996 15.450958 -66.361923 9.605503 -2.781064 0 -8.892324 4.574324 -7.464832 1e-06 157.075592 2.81455 -7.970867 6.038652 -48.60243364 -9.86416735 -1.640372834 -41.11168869 -9.852680394 -1.71011753 -41.02649116 -9.388106 3.444336 -6.492276 -5.849205165 8.110809738 -49.9044452 -5.857047 8.105246 -100 -5.785975471 8.15566649 -49.92724681 -8.372684 5.467923 -48.17366873 -1.784914571 -9.839233848 -26.68137861 -49.999996 -19.019081 -30.038078 -7.755264 6.313152 -100 9.215057 3.883647 0 9.215057 3.883647 -100 -4.969146738 8.677900266 -50.17116184 -5.052808754 8.629107269 -50.15033374 -4.043881 9.145875 -100 0.000141 4.747704 0.000754 -0.0002497704661 8.221110576 -8.440278203 -0.0002497704956 8.22111576 -8.44028279 2.613003 9.652575 0 2.613003 9.652575 -100 -50 -31.496193 14.952934 -0.0002432251598 7.063010684 -7.379059935 -7.295989 6.838752 -9.152349 -7.403501 6.722028 -9.074549 3.231376 -9.46352 -100 -8.894937671 4.569336112 -47.46093734 4e-06 105.049179 -63.776207 -2.731665 9.619668 -100 -0.0002307434539 4.803215153 -5.196779265 -0.0002307434701 4.803217928 -5.196782088 -50.000004 139.153564 89.153564 -9.027240464 -4.301369684 -37.55615317 0.557342 9.984386 -4.779279 4.870554 8.73371 -100 -50.000004 9.66436 99.344589 -7.295989 6.838752 -49.15252628 -7.04124 7.100588 -9.323186 -0.000243225059 7.06299324 -7.37904395 -0.897152 -9.959674 0 -5.70672301 8.211682049 -49.95564232 -5.708736071 8.210306475 -49.95496286 -0.0002432252046 7.063018439 -7.379067042 -7.089214 -7.052875 0 3e-06 20.750153 -57.881439 -50 166.605606 -0.638016 -4.200423815 9.075018471 -50.310227 -9.994883 -0.318653 -2.671847 -0.0002035106327 0.5188948197 -0.6023384994 -0.0002562607747 9.397587692 -9.481142009 -0.0002562607792 9.397588492 -9.481142692 -0.0001894271329 -1.044269604 0.0005525530134 -3.930951 -9.194978 0 -4.406791 -8.976648 -100 -9.257621 3.78081 -6.787452 -8.077209743 5.895595617 -48.49804855 -8.07504 5.898622 -8.500099 -8.07504 5.898622 -48.50032226 7.970867 -6.038652 0 7.864263 -6.176841 0 0 -21.502289 15.301931 -9.954701677 -0.9468304864 -41.95010928 -9.948175 -1.016482 -1.867597 -8.997890878 4.362547224 -47.28659391 -8.975178721 4.409719327 -47.3265815 -8.976648 4.406791 -47.32411582 9.073906 4.202882 -100 -49.999996 107.515999 -73.607597 -2.613003 -9.652575 -27.32671092 -9.984918 0.549018 -43.63153404 -9.989469879 0.4505571494 -43.52543071 -0.0002432251554 7.063009922 -7.379059237 -0.0002432251585 7.063010454 -7.379059724 -3e-06 132.082489 82.082497 -0.0001413905587 9.999808151 -30.36006668 5.172388 8.55841 0 -4.966233 8.67954 -10.171758 -4.977731 8.673072 -10.169106 2.274539 9.737887 -100 -0.0001949948894 9.999807708 -22.04703613 -8.647378 5.022235 -7.826213 -5.714698 8.206232 -49.95295009 -0.0002432252592 7.063027887 -7.379075699 -7.164188 6.976521 -9.242845 -3e-06 15.542213 91.254417 -7.293100386 6.841780539 -49.15451788 -2.613003 -9.652575 -100 -2.781064 -9.605503 -100 -9.921705968 1.248595651 -44.37331758 -9.927409772 1.200327685 -44.32411069 -9.922297 1.244192 -44.3688488 0.000202 6.828773 0.000603 -49.999996 13.978981 -65.424171 -5.365601281 -8.438240585 -30.37302153 -5.320966 -8.466838 -100 -9.958985 0.904118 -4.01099 -9.956397 0.930292 -4.038787 -9.959674 0.897152 -100 -9.959674 0.897152 -44.0039815 1e-06 156.789337 1.270077 2.394278 -9.709141 -100 -0.0002562611445 9.397653751 -9.48119843 -8.827816 4.697472 -7.567764 1.88286 -9.821142 -100 -5.842944 8.115252 -9.906592 -5.846508 8.112723 -9.905307 3.396046 -9.405683 -100 -0.897152 -9.959674 -26.10794889 -50 -31.541885 16.697643 -4.838886 -1.267349 0.000333 -8.758624 -4.825609 0 -1.193215 -0.309744 0.000552 -1.315942 -0.342011 0.000545 4e-06 103.608688 -64.40255 -0.0001557751392 -4.35718051 0.0003562690863 -1.761781 -9.843583 0 -50.000004 140.376862 87.908722 0.000117 3.917675 0.000757 0.000115 3.872789 0.000757 -9.190129 3.942025 -6.926958 -1.624534285 9.866775948 -50.30897522 -1.538961 9.88087 -100 -2.563363 9.665876 -100 -9.947871 -1.019728 -41.86414314 -3.060414 9.520132 -10.390556 4.825609 -8.758624 -100 4.672013 -8.841509 -100 -9.942501 1.070836 -44.18843994 -2.881733 9.575633 -10.39097 -50.000004 11.085243 100.358093 0.549018 9.984918 0 -0.671932 9.977401 -50.1529164 -1.070836 -9.942501 -100 -9.555274278 2.948999753 -46.03623328 -0.000203510874 0.5189314774 -0.6023814203 -2.940228 -0.769068 0.000453 -3.119622 -0.816234 0.000442 3e-06 19.425373 -57.037468 -50 166.257645 -2.348284 -0.0001593655525 -4.004778534 0.0003778501303 -9.994773 -0.323315 -42.66696352 -9.994837794 -0.3205689081 -42.67008699 4.516995 -8.9217 0 4.360604 -8.999174 0 4.360604 -8.999174 -100 -9.947871 -1.019728 -100 5.6e-05 1.815202 0.000697 5.3e-05 1.733217 0.000694 3.55968 -9.34498 -100 -5.570608 8.304716 -50.00160488 5.1e-05 1.649139 0.00069 4.8e-05 1.562863 0.000686 0 -21.543404 16.872169 -3.647041493 9.310827761 -50.36608406 -3.55968 9.34498 -100 7.787604 6.273214 0 -5.642685221 8.255451205 -49.97726592 -5.714698 8.206232 -100 0.000277 9.388021 0.000135 0.000283 9.585105 9.2e-05 -49.999996 105.903549 -74.275497 -3e-06 133.183472 80.962143 9.619668 2.731665 0 -5.122031281 8.588572005 -50.13295568 -5.12834 8.584878 -50.13137212 -9.852507 -1.711171 -100 -5.269031875 8.499157657 -50.09310221 -9.582526773 2.857901196 -45.95130693 -9.60380902 2.786725549 -45.88495073 -3e-06 16.821007 92.166573 5.756795 8.176756 0 -1.019728 9.947871 -50.21916839 -49.999996 12.523598 -64.460869 1e-06 156.476166 -0.269165 -9.941652 1.07811 -4.195739 -1.761781 -9.843583 -26.66429614 -0.0002432252091 7.063019219 -7.379067757 -8.27598 5.613212 -100 -7.473356146 6.643893947 -49.02208352 5.022235 8.647378 0 5.172388 8.55841 -100 -5.559704 8.311894 -10.004944 -5.700349 8.216038 -9.957689 -5.570608 8.304716 -10.001505 -50 -31.557114 18.442884 -0.549018 -9.984918 0 0.897152 9.959674 -100 -0.0002432248716 7.062960703 -7.379013996 1e-06 -18.883728 -3.330084 4e-06 102.157478 -65.003662 -9.443063 3.290405 -6.351312 -9.445985 3.282218 -6.343815 -0.0002432251112 7.06300227 -7.379052225 -50.000004 141.578247 86.642723 -7.643902 6.447538 -8.888225 -6.752113161 -7.375790435 -32.51007716 -4.811144 8.766431 -10.207225 -6.313152 -7.755264 -31.77770222 -6.73732027 7.389241903 -49.50321072 -6.801169 7.331037 -100 -9.605376498 2.781486632 -45.88006683 -0.148833 9.998893 -10.033785 -50.000004 12.523598 101.346642 -5.942323733 -8.042528819 -31.20883615 6.7e-05 2.19694 0.000713 0.000163 5.491803 0.000727 -9.942501 1.070836 -100 3e-06 18.115524 -56.170494 1.070836 9.942501 -100 1.244192 9.922297 -100 1.070836 9.942501 0 -5.271152935 8.49786537 -50.09252528 -50 165.879883 -4.052221 -1.073767 -0.278338 0.000558 -6.313152 -7.755264 0 -0.897152 -9.959674 -100 -9.731147414 2.302300408 -45.42833091 -0.0002035108878 0.518933574 -0.6023838751 -4.817587518 8.762953326 -50.20593955 -9.215057 -3.883647 0 9.977401 0.671932 0 5.997609 -8.001794 0 1e-06 -18.49044 -4.850828 1e-06 -18.070663 -6.364475 9.987607 0.497698 0 9.987607 0.497698 -100 0 -21.557114 18.442886 -9.987711408 -0.4951550406 -42.4706013 9.994773 0.323315 0 -49.999996 104.279678 -74.915154 -7.410036861 6.714932733 -49.0700029 -7.414231 6.710379 -49.06696785 -3e-06 134.264709 79.822739 9.922297 -1.244192 0 9.922297 -1.244192 -100 -9.88087 -1.538961 -100 -3e-06 18.115524 93.056267 0.000217 7.344504 0.000528 0.000215 7.273113 0.000539 6.541175 -7.563929 0 -5.857047 8.105246 -49.90161684 -5.857047 8.105246 -9.901505 -49.999996 11.085243 -63.472321 -9.014022 4.32895 -7.25782 -0.0002307436879 4.803254387 -5.196817916 1e-06 156.1362 -1.802708 -0.0002035112797 0.5189931176 -0.6024535922 0.000221 7.494859 0.000504 0.000223 7.574248 0.00049 -1.417172 -9.899072 -26.42626157 -7.175524 6.965043 -9.235402 -9.387517181 3.445898745 -46.49401417 -9.997995 0.200214 -43.25475367 9.947871 1.019728 0 -9.872029599 1.594437095 -44.72332733 -9.871449 1.597851 -4.72639 -50 -31.541885 20.188126 -5.851186892 8.109403512 -49.90373026 -0.0001912076917 -0.8685644945 0.0005623876059 -6.489998935 -7.607447821 -32.06510677 -6.447538 -7.643902 0 4e-06 100.695999 -65.579353 -2.948279 -9.555504 -100 -3.114597 -9.502595 -100 -50.000004 142.75737 85.355949 -8.466838 5.320966 -100 -8.038013918 -5.948396378 -35.01132708 -8.105246 -5.857047 -35.16254871 -0.0002307436284 4.803244418 -5.19680812 -0.0002372183973 5.923579048 -6.297773171 -8.727049 4.882256 -7.71534 -0.0002372183987 5.923579323 -6.297773432 -9.749449 -2.224467 -100 7.755264 -6.313152 0 -50.000004 13.978981 102.309944 0.323315 -9.994773 -100 -4.202882 9.073906 -100 -1.796451113 9.836927091 -50.32869726 -1.711171 9.852507 -100 -1.711171 9.852507 -50.31957447 3e-06 16.821007 -55.2808 -0.0002035109006 0.5189355154 -0.6023861483 -5.564550315 8.308703716 -50.00351532 -50 165.472458 -5.749306 9.46352 3.231376 0 9.518474 3.065722 -100 -8.643608 5.028598 -7.831212 -8.55841 5.172388 -47.94442408 8.55841 -5.172388 0 0.000133 4.46842 0.000758 -2.557602 9.667351 -10.384067 -0 -21.543404 20.013603 -0.0002562607178 9.397577528 -9.481133328 -3.37895 9.411687 -10.381701 7.755264 -6.313152 -100 -7.406743 6.718509 -9.072204 -49.999996 102.644897 -75.526375 -3e-06 135.325928 78.664642 -0.0001854352653 9.999807788 -23.62682093 0.000151 5.099229 0.000744 0.000151 5.084531 0.000745 0.000179 6.04259 0.000688 0.000178 6.032749 0.000689 -0.0002435788019 9.99980729 -13.27061776 -0.0002000462409 0.003621738515 0.00060997457 -0.0002000493912 0.003932608919 0.0006099929619 -3e-06 19.425373 93.923241 0.000197 6.661287 0.000624 5.714698 -8.206232 -100 -9.998696 -0.157139 -2.855559 4.6e-05 1.47428 0.000682 4.3e-05 1.383272 0.000678 -49.999996 9.66436 -62.458817 0.200214 9.997995 -100 0.374673 9.992979 -100 -5.114966559 8.592708744 -50.13472906 1e-06 155.769501 -3.330084 -0.0002019327238 0.2791482263 -0.3216288897 -6.801169 7.331037 -9.468616 -6.825686 7.307889 -9.454682 -9.073906 -4.202882 -100 -9.145875 -4.043881 -100 -5.829507238 -8.124607975 -31.03800526 8.584878 5.12834 -100 4.202882 -9.073906 -100 -2.656543342 9.640292957 -50.38696622 -2.731665 9.619668 -50.38910836 -6.541175 7.563929 -100 0.497698 -9.987607 0 -50 -31.496193 21.932835 7.7e-05 2.538831 0.000725 -0.0002240060361 3.702247777 -4.076415367 -7.414231 6.710379 -100 -5.846195568e-05 9.999808794 -42.02412697 -6.678575587e-05 9.999808753 -40.90287033 -1.289136672 9.916178121 -50.26295661 4e-06 99.224701 -66.129448 -6.923255795 7.215774436 -49.39689788 -6.928077 7.211223 -49.39403503 -50.000004 143.913849 84.04879 0.000144 4.864045 0.000751 0.000144 4.865399 0.000751 -9.419553739 3.356252918 -46.41193101 -0.0001519352614 -4.73406761 0.0003330620055 1.9e-05 0.550932 0.000638 -5.898622 -8.07504 -100 9.709141 2.394278 0 9.749449 2.224467 0 -50.000004 15.450958 103.247696 0.000168 5.693738 0.000715 -3.391016 9.40745 -10.381255 3e-06 15.542213 -54.368645 0.000132 4.42778 0.000758 -8.024463102 5.966606634 -48.55089264 -8.022896048 5.968713115 -48.55245956 -50 165.035461 -7.43902 -5.067244182 -8.620709356 -29.97554608 -1.967826947 9.804082477 -50.3457184 -2.047726 9.788041 -10.353062 -0 -21.502289 21.583841 -6.710379 -7.414231 0 -7.71491771 -6.361853206 -34.32040865 -7.676936 -6.408171 -34.24239271 -9.906224 -1.366281 -100 -0.0002562611537 9.3976554 -9.481199838 -49.999996 100.999702 -76.108971 -3e-06 136.366745 77.488197 -9.34498 -3.55968 -100 -8.466838 5.320966 -8.059929 -0.0002035112802 0.5189931922 -0.6024536796 9.665876 2.563363 0 -9.050878008 4.252185665 -47.19299907 -9.049885 4.254254 -7.194469 -3e-06 20.750153 94.767212 -8.758624 -4.825609 -100 -2.224467 9.749449 -50.36655517 -5.951461229 -8.03573113 -31.22290754 -8.466838 5.320966 -48.06017148 8.07504 -5.898622 0 -49.999996 8.261383 -61.420662 -9.073906 -4.202882 0 -9.073906 -4.202882 -37.6998353 1e-06 155.376221 -4.850828 -0.0002562606729 9.397569497 -9.48112647 -0.0002497706854 8.22114915 -8.440312331 9.994773 0.323315 -100 -2.444142 -9.69671 -27.18524526 -4.816914303 8.763316552 -50.20608114 0.000104 3.495668 0.000751 -50 -31.420067 23.676479 -8.022676 5.969009 -8.55246 -8.55841 5.172388 -100 0.000301 9.194935 -3.985045 4e-06 97.744019 -66.653786 -3.444336 -9.388106 -100 -50.000004 145.047333 82.721649 5.898622 8.07504 0 -0.0002497706281 8.221139073 -8.440303415 -0.0002497706295 8.221139321 -8.440303635 -9.994773 -0.323315 -2.666544 -3.719585764 9.282467882 -50.36094205 -50.000004 16.939079 104.159615 3.72223 -9.281434 0 3.55968 -9.34498 0 -8.000001806 5.999488239 -48.57444961 3e-06 14.279533 -53.434311 7.331037 6.801169 0 -50 164.569061 -9.120852 -6.928077 7.211223 -9.393873 -7.890998635e-05 -9.99980937 -6.749293515 -0.0002103871256 1.559792628 -1.778883358 -4.672013 8.841509 -10.234761 4.672013 -8.841509 0 -0 -21.433769 23.153122 0.000189 6.403917 0.000653 0.000188 6.355132 0.000659 -3.49912 -0.91601 0.000418 -0.000107597261 -9.077988063 5.9149161e-05 -0.374673 -9.992979 0 -49.999996 99.344589 -76.662766 1.5e-05 0.431286 0.000632 -9.786992 -2.052947 -0.602189 -3e-06 137.386887 76.29377 -4.444917176 8.957406966 -50.27408057 -4.594119013 8.881805287 -50.24875164 -1.88286 9.821142 -100 -9.969738229 -0.7726030459 -42.15157699 -3e-06 22.089458 95.587944 -3.279965 -9.446789 -100 -7.676936 -6.408171 0 -9.749592 -2.223814 -0.383152 -49.999996 6.87674 -60.358192 1e-06 154.956436 -6.364475 -3.065722 9.518474 -10.390535 -9.716510571 2.362586131 -45.48550161 -9.719162018 2.351666779 -45.47514657 -9.552306 2.958332 -6.044556 -9.502595 3.114597 -6.189391 -0.0002562605498 9.39754751 -9.48110769 -6.788948 7.342177 -9.475209 -6.794347695 7.337254932 -49.47244468 0.000173 5.860217 0.000703 -50 -31.313522 25.418531 -9.052189 4.249455 -7.1904 7.895901 6.136346 -100 -1.630723322 9.865757001 -50.30973272 -9.95657618 -0.9268338099 -41.97327729 4e-06 96.254417 -67.152199 -50.000004 146.157486 81.374924 -0.0001278400969 -7.099026778 0.0001851138935 -5.949706 -1.555151 0.000259 -50.000004 18.442886 105.045425 -8.554329 5.17901 -7.949337 6.801169 -7.331037 -100 6.928077 -7.211223 0 3e-06 13.033352 -52.478081 -3.72223 9.281434 -10.360727 -9.368469793 -3.496359756 -38.69626388 -9.405683 -3.396046 -100 -50 164.073364 -10.794287 -8.66142899 -4.997613781 -36.51994777 0.000149 5.021384 0.000747 -9.872832 1.589719 -44.7185886 -9.996534327 -0.248720725 -42.75180907 -3.607656 -9.326566 0 -5.613212 -8.27598 -30.7198874 -0.0001835760294 -1.621654937 0.0005196992493 -0 -21.337875 24.72097 0.000295 9.99981 0 -1.88286 9.821142 -50.33794169 -49.999996 97.680054 -77.187592 -2e-06 138.386017 75.081726 -2.613003 -9.652575 0 0.000266 9.03826 0.00021 -9.88087 -1.538961 -1.235126 -9.852798 -1.709403 -1.02692 -3e-06 23.442886 96.38517 -0.0002372184367 5.923586822 -6.297780548 -0.0002372184311 5.923585713 -6.297779496 -9.145875 -4.043881 0 -7.314071 -1.908643 0.000166 -0.0001856177234 -1.420181145 0.000531250742 -6.579959 -7.530214 0 -49.999996 5.510849 -59.271713 8.55841 -5.172388 -100 1e-06 154.510315 -7.870567 -9.942501 1.070836 -4.188052 -9.992979 0.374673 -43.44365676 -8.105246 -5.857047 -100 -8.206232 -5.714698 -100 -7.524370929 6.586529092 -48.98335633 2.053977 -9.786785 -100 2.053977 -9.786785 0 -50 -31.176582 27.158459 6e-05 1.973274 0.000704 5.8e-05 1.89519 0.000701 4e-06 94.75634 -67.624542 -1.366281 9.906224 -100 -50.000004 147.243958 80.009033 9.821142 1.88286 0 -50.000004 19.961926 105.904854 -7.175524 6.965043 -100 -0.000203510859 0.5189292058 -0.6023787606 -9.446789 3.279965 -6.341752 -7.787604 -6.273214 -34.46970916 3e-06 11.80405 -51.500252 -9.555104 2.949534 -6.036401 -9.589984807 -2.832826458 -39.59464139 -9.570528 -2.899136 -100 -9.619668 -2.731665 -100 0.000192 6.504005 0.000642 0.000191 6.453524 0.000648 -3.490311891 -9.370781996 -28.15080254 -50 163.548538 -12.458815 -1.806281901 9.835131668 -50.3297494 -7.51979 6.59168 -8.986646 -0.0002595116037 9.999807147 -9.995495512 -0 -21.214638 26.286903 -0.000162730899 -3.674467008 0.0003979641561 -49.999996 96.006622 -77.683281 -4.977731 8.673072 -100 -0.0001433906041 -5.572732483 0.0002810101716 -2e-06 139.363861 73.852417 -3e-06 24.81002 97.158661 -0.0002514777511 8.521399494 -8.705953349 -8.122426 -2.118077 0.00011 6.801169 -7.331037 0 6.67219 -7.448616 0 6.67219 -7.448616 -100 -49.999996 4.164124 -58.16156 8.206232 5.714698 -100 -9.915501226 -1.294390161 -41.53258855 1e-06 154.037964 -9.368643 -0.0002240061567 3.702266854 -4.076434816 -1.876438 9.822315 -10.337291 9.811336 -1.933306 -100 -50 -31.0093 28.895731 9.709141 2.394278 -100 -0.0002307435843 4.803237034 -5.196800863 -0.0002307435461 4.803230636 -5.196794576 4e-06 93.250244 -68.070663 -9.605503 2.781064 -100 -50.000004 148.306427 78.62439 -5.172388 -8.55841 -100 -9.998923 -0.143823 -2.870679 -9.695291968 2.449565108 -45.56795753 -8.88874941e-05 9.999808576 -37.89074798 -1.802724292 9.835781477 -50.32936871 -50.000004 21.495731 106.737648 -9.387077 3.447067 -6.494762 -9.400101 3.41074 -6.46151 -9.555504 2.948279 -100 -50 162.994751 -14.113934 9.194978 -3.930951 0 9.124973 -4.090826 0 -9.605503 2.781064 -5.879342 -9.959272097 0.9012153631 -44.00829689 9.992979 -0.374673 0 -0 -21.064087 27.850449 -49.999996 94.324791 -78.149696 -2.981778588 9.544705167 -50.39086564 -2e-06 140.320084 72.606239 -4.971352852 8.676659916 -50.17065358 1.711171 -9.852507 0 -0.0001029967738 9.999808463 -35.92196086 -3e-06 26.190445 97.908173 9.852507 1.711171 -100 6.710379 7.414231 0 6.838752 7.295989 0 6.838752 7.295989 -100 -6.607243719 7.505778381 -49.57157888 0.000194 6.57608 0.000634 0.000194 6.555418 0.000636 7.864263 -6.176841 -100 1e-06 153.539551 -10.858248 0.000161 5.452029 0.000729 0.000162 5.466427 0.000728 -9.987784 -0.493387 -2.4722 0.000167 5.652875 0.000718 0.000166 5.612272 0.00072 -3.640359329 9.313439608 -50.36655733 -3.55968 9.34498 -10.372255 0.00024 8.127215 0.000392 0.000237 8.024174 0.000411 -2.814746502 9.595289092 -50.39013781 -50 -30.811729 30.629818 9.262182 -3.769877 -100 4e-06 91.736603 -68.49044 -5.172388 -8.55841 -30.11247392 -0.838438 9.964726 -10.185954 -6.67219 7.448616 -49.53834861 -50.000004 149.344589 77.221405 8.673072 4.977731 -100 -4.977731 8.673072 -50.16918241 -5.822892 -1.522295 0.000268 -9.797194577 -2.00213209 -40.66750104 3.2e-05 0.992358 0.00066 2.9e-05 0.88717 0.000655 -50.000004 23.043835 107.543541 -4.514646622 8.922863935 -50.26291731 -50 162.41214 -15.759132 -9.193217 3.934973 -6.920894 5.022235 8.647378 -100 -9.326566 3.607656 -6.636622 -1.308017952e-06 -9.999808893 -25.02942272 -0.0002364385942 9.999807352 -14.65898056 -8.976648 4.406791 -7.323837 -3.483932097 9.373080406 -50.37635399 0.000301 9.191033 -3.978174 -8.640408 5.034001 -7.835457 -0 -20.886269 29.411127 -0.664221 9.977853 -10.15135 -49.999996 92.635078 -78.586685 -2e-06 141.254425 71.343559 -0.0002307436255 4.803243931 -5.196807642 -0.0002307436266 4.803244123 -5.19680783 -4e-06 27.58374 98.633476 1e-06 153.015228 -12.338926 -0.0002307435871 4.803237508 -5.19680133 -0.0002307434114 4.803207878 -5.196771861 -0.0002307435853 4.803237206 -5.196801033 9.405683 3.396046 -100 -9.992815581 0.3781955904 -43.4474526 -3.305774 -0.865176 0.00043 -0.0001990781467 -0.09190959773 0.0006047560312 -0.0002432252067 7.063018804 -7.379067376 -50 -30.583923 32.360195 -9.325302 3.610841 -6.639398 -1.532185 9.881866 -10.297622 9.776102 -2.104243 -100 9.737887 -2.274539 -100 -8.105246 -5.857047 0 4e-06 90.215858 -68.883728 -0.0001478178907 -5.13819082 0.0003080461235 -1.417172 -9.899072 0 -50.000004 150.358093 75.800522 -8.973384893 4.41329391 -47.32959126 -50.000004 24.60577 108.322289 -3.55968 9.34498 -50.37227618 0.000243 8.235651 0.000372 -50 161.800934 -17.393913 2e-06 -11.0224 -23.809555 9.281434 3.72223 0 -0.0002432249251 7.062970069 -7.379022718 -0.0002408909623 6.649317786 -6.986478576 -1e-06 -20.681236 30.968466 9.4e-05 3.132685 0.000743 9.2e-05 3.07772 0.000742 -49.999996 90.937988 -78.994118 -2e-06 142.166565 70.064766 -9.752229027 -2.211772363 -40.39904966 0.000186 6.307115 0.000663 0.000185 6.259822 0.000668 1e-06 -17.624542 -7.870567 -4e-06 28.989483 99.334351 -0.0002497705737 8.221129504 -8.440294949 1e-06 152.465118 -13.81023 5.898622 8.07504 -100 9.737887 -2.274539 0 9.69671 -2.444142 0 9.69671 -2.444142 -100 -0.0002035107043 0.5189056937 -0.6023512313 0.000181 6.121855 0.000681 0.00018 6.077038 0.000685 -50 -30.325951 34.08633 8.4e-05 2.78899 0.000733 4e-06 88.688477 -69.25042 -9.69671 2.444142 -100 -9.652575 2.613003 -100 -50.000004 151.346649 74.362167 9.998893 0.148833 -100 -8.462449 5.327815 -8.065219 -50.000004 26.181061 109.073662 -4.516995 8.9217 -50.26254085 0.00031 9.598662 -3.570554 -50 161.16127 -19.017776 0.000111 3.73534 0.000755 -4e-06 60.598869 108.10041 -50.000004 61.467239 118.199295 -4e-06 62.164803 108.223648 -1e-06 -20.449066 32.521988 -8.372684 5.467923 -8.17343 4.516995 -8.9217 -100 -49.999996 89.234055 -79.371872 1e-06 -17.152199 -9.368643 -9.881185 -1.536824 -1.237725 2e-06 -12.448578 -21.010517 -2e-06 143.056274 68.770248 -50.000004 63.20929 118.30584 -4e-06 30.407242 100.01059 0.000139 4.668693 0.000755 0.000137 4.62898 0.000756 -8.45924 5.332824 -8.069088 3.883647 -9.215057 0 0.000226 7.656765 0.000477 -0.671932 9.977401 -100 1e-06 151.889435 -15.271706 -0.0002497701675 8.221058049 -8.44023173 -0.0002432253088 7.063036462 -7.379083557 2.224467 -9.749449 -100 -9.922297 1.244192 -100 -50.000004 68.442886 118.442886 -50.000004 70.188126 118.427658 -7.955727 6.058277 -8.616102 -9.240443453 -3.821911684 -38.2458577 -2.274539 -9.737887 -27.04850893 -50 -30.037888 35.807701 4e-06 87.154938 -69.590401 6.579959 7.530214 0 -0.0002103873719 1.559830498 -1.778925474 -50.000004 152.309937 72.906784 -4e-06 68.442886 108.442886 -9.215057 -3.883647 -38.16008981 -0.0002432252579 7.063027657 -7.379075488 -4e-06 63.732651 108.319542 -9.502254852 3.115607119 -46.19064566 -50.000004 27.769222 109.797432 3.769877 9.262182 0 -5.898622 -8.07504 -31.14153721 -1.977638388 9.802112324 -50.34661621 -50 160.493378 -20.63023 -4e-06 70.013603 108.429176 9.749449 2.224467 -100 -9.984681691 0.5527240789 -43.63550855 0.000246 8.35005 0.00035 -1e-06 -20.189812 34.07122 -7.706069 -2.010205 0.000139 -49.999996 87.523788 -79.719833 -2e-06 143.923248 67.460403 0.035065 9.999862 -5.369649 -50.000004 64.952934 118.381966 -4e-06 31.83659 100.66198 -6.136346 7.895901 -9.790863 -6.13672 7.895606 -9.790702 2e-06 151.28833 -16.722916 -50.000004 71.932838 118.381966 1.417172 9.899072 -100 -50 -29.719833 37.523785 4e-06 85.615692 -69.903557 7.089214 7.052875 -100 7.211223 6.928077 -100 7.089214 7.052875 0 -50.000004 153.247696 71.434814 0.323315 -9.994773 0 -0.0002240060382 3.702248107 -4.076415714 -4e-06 65.301933 108.388062 -50.000004 29.369774 110.49337 -0.0002562606035 9.397557106 -9.481115886 -50 159.797424 -22.230782 -4e-06 71.583839 108.388062 -9.786785 -2.053977 -0.600874 -1e-06 -19.903557 35.615696 -3.396046 9.405683 -10.381069 -49.999996 85.807709 -80.037888 -2e-06 144.767212 66.13562 -9.984918 0.549018 -100 5.570608 -8.304716 -100 -50.000004 66.697647 118.427658 -4e-06 33.277084 101.288322 -6.12623 7.903622 -9.794993 2e-06 150.661987 -18.16341 -50.000004 73.676483 118.30584 -7.414231 6.710379 -9.066785 0.382343 9.992623 -4.399525 -50 -29.371872 39.234055 7.175524 -6.965043 0 7.052875 -7.089214 0 4e-06 84.07122 -70.189812 -5.172388 -8.55841 0 -50.000004 154.159607 69.946686 0.000184 6.213209 0.000672 -8.464358516 5.324835215 -48.06315959 -4e-06 66.872169 108.429176 -50.000004 30.982227 111.16127 -7.405724934e-05 9.999808695 -39.92336454 -50 159.073669 -23.818943 -0.0002562606594 9.397567091 -9.481124414 -4e-06 73.153122 108.319542 -1e-06 -19.590401 37.154938 -49.999996 84.086334 -80.325951 -2e-06 145.587952 64.79631 -8.206232 -5.714698 0 -4e-06 34.728294 101.889435 -6.67219 7.448616 -9.538204 0.000301 9.192965 -3.981575 2e-06 150.01059 -19.592758 -50.000004 75.418533 118.199295 8.001794 5.997609 -100 -7.970867 6.038652 -8.602224 -50 -28.994118 40.937988 4e-06 82.521988 -70.449066 -50.000004 155.045425 68.442886 -9.94267774e-05 -9.875877463 7.976963263e-06 -5.991860133 8.006024707 -49.84983257 -50.000004 32.606091 111.800926 6.5e-05 2.124069 0.00071 6.2e-05 2.04954 0.000707 -49.999996 158.322296 -25.394234 -4e-06 74.72097 108.223648 -9.384106 3.454954 -6.50194 -9.992979 0.374673 -3.443259 8.9e-05 2.965123 0.000739 -8.999174 -4.360604 0 -1e-06 -19.25042 38.68848 -0.0002432248957 7.06296497 -7.379018046 -49.999996 82.360199 -80.583923 2.104243 9.776102 -100 -2e-06 146.385162 63.442886 -4e-06 36.18977 102.465126 -5.714698 8.206232 -9.952844 -4.516995 8.9217 -10.262486 2e-06 149.334351 -21.010517 -50.000004 77.158463 118.062355 -4.672013 8.841509 -100 -50 -28.586685 42.635075 0.00013 4.38691 0.000758 6.965043 7.175524 -100 4e-06 80.968468 -70.681236 -50.000004 155.904846 66.923843 -50.000004 34.240871 112.412148 6.965043 7.175524 0 -49.999996 157.543549 -26.956169 -4e-06 76.286903 108.10041 -8.55841 5.172388 -7.944178 -0.0002103874015 1.559835009 -1.778930397 -1e-06 -18.883728 40.215858 9.46352 3.231376 -100 4.977731 -8.673072 -100 -49.999996 80.629822 -80.811729 -8.704415334 -4.92199869 -36.63658794 -8.673072 -4.977731 -36.55073226 -2e-06 147.158661 62.075752 -4e-06 37.661072 103.015221 1.366281 -9.906224 -100 2e-06 148.633484 -22.41626 -9.74953458 -2.224076205 -40.38327678 -50.000004 78.895737 117.895073 -9.375534 3.477702 -6.522643 -50 -28.149696 44.324791 9.899072 -1.417172 -100 9.899072 -1.417172 0 -6.313152 -7.755264 -100 4e-06 79.411125 -70.886269 -50.000004 156.73764 65.390038 -0.0002432252751 7.063030626 -7.379078209 -50.000004 35.88607 112.994743 -49.999996 156.73764 -28.504272 -9.502002 3.116358 -6.191014 -4e-06 45.14917 105.376213 -4e-06 43.635525 104.956436 -4e-06 77.850449 107.94986 -7.167445 6.973223 -9.240705 -0.654248 9.978436 -10.149226 8.105246 5.857047 -100 -1e-06 -18.49044 41.736603 7.175524 -6.965043 -100 -1.589719 -9.872832 -100 -49.999996 78.895737 -81.0093 -2e-06 147.908173 60.695328 -9.922297 1.244192 -4.368477 -50.000004 42.560982 115.035469 -4e-06 39.141754 103.539558 -1.761781 -9.843583 -100 2e-06 147.908173 -23.809555 -9.555504 2.948279 -6.035238 -9.60006 2.799265 -5.896311 -50.000004 44.250694 115.472458 -50.000004 80.629822 117.697502 -0.0002078657921 1.168669484 -1.33679161 -0.0002562648694 9.398319285 -9.481766859 -0.480065 9.988333 -10.111872 9.776102 -2.104243 0 -50 -27.683281 46.006622 -4.512758 8.9238 -10.263165 4e-06 77.850449 -71.064087 -50.000004 157.543549 63.841934 -50.000004 37.541187 113.548538 -49.999996 155.904846 -30.038078 -4e-06 46.669914 105.769501 -4e-06 79.411125 107.772041 -1e-06 -18.070663 43.250248 0.549018 9.984918 -4.761214 -7.290828 6.844163 -9.155908 -49.999996 77.158463 -81.176582 -0.0001875658432 -1.227941201 0.000542187291 -3.769877 -9.262182 0 -2e-06 148.633484 59.302032 9.555504 -2.948279 0 -0.0001164259735 9.999808354 -34.01299592 -4e-06 40.631355 104.037971 8.466838 -5.320966 -100 8.466838 -5.320966 0 2e-06 147.158661 -25.18998 -50.000004 45.947781 115.87989 -50.000004 82.360199 117.469696 -0.013538 9.999726 -9.998918 -50 -27.187592 47.680054 4e-06 76.286903 -71.214638 -50.000004 158.322296 62.279999 -50.000004 39.205715 114.073364 -49.999996 155.045425 -31.557117 -4e-06 48.197292 106.136192 -4e-06 80.968468 107.567009 -1.634378566 9.86515472 -50.31017967 -1e-06 -17.624542 44.75634 -49.999996 75.418533 -81.313522 -2e-06 149.334351 57.89629 7.8e-05 2.603153 0.000727 -4e-06 42.129433 104.510315 2e-06 146.385162 -26.557114 -50.000004 47.651718 116.257645 -50.000004 84.086334 117.211723 -50 -26.662766 49.344582 5.12834 -8.584878 -100 4e-06 74.72097 -71.337875 -50 159.073669 60.704708 -50.000004 40.87915 114.569054 -6.259887 7.798149 -9.737365 0.000159 5.372943 0.000733 -49.999996 154.159607 -33.060925 -4e-06 49.730835 106.476173 -4e-06 82.521988 107.334839 9.652575 -2.613003 0 -1e-06 -17.152199 46.254417 -49.999996 73.676483 -81.420067 -4.667868 8.843654 -10.235502 -2e-06 150.01059 56.478531 1e-06 -15.003662 -15.271706 2e-06 -14.40255 -16.722916 -9.34498 -3.55968 -38.6091128 0.200214 9.997995 -4.004298 3e-06 0.003986 0.00061 -6.712027036 -7.412713024 -32.43976849 2e-06 145.587952 -27.910542 -50.000004 49.361984 116.605606 -50.000004 85.807709 116.92366 -9.46352 -3.231376 -100 -50 -26.108971 50.999699 1.193185 -9.928559 -100 4e-06 73.153122 -71.433769 0.000195 6.607822 0.00063 -50 159.797424 59.116547 -2.490112309 -9.684694795 -27.22375753 0.000144 4.840078 0.000752 -49.999996 153.247696 -34.549046 -4e-06 51.270077 106.78933 -4e-06 84.07122 107.075584 0.374673 9.992979 -5.037267 -8.974063 4.411943 -7.328175 -6.579959 -7.530214 -32.21439044 -1e-06 -16.653786 47.744019 -49.999996 71.932838 -81.496193 -9.843583 1.761781 -4.891043 -2e-06 150.661987 55.049183 9.906224 1.366281 -100 -0.0002432249649 7.062976957 -7.37902903 2e-06 144.767212 -29.249847 -50.000004 51.078068 116.92366 -50.000004 87.523788 116.605606 -50 -25.526375 52.644897 4e-06 71.583839 -71.502289 -50 160.493378 57.515995 -49.999996 152.309937 -36.021023 -4e-06 52.814552 107.075584 -4e-06 85.615692 106.78933 -1e-06 -16.129448 49.224701 -49.999996 70.188126 -81.541885 -2e-06 151.28833 53.608688 1e-06 -16.653786 -10.858248 2e-06 143.923248 -30.574627 -3.231376 9.46352 -10.387163 -50.000004 52.799438 117.211723 -50.000004 89.234055 116.257645 -50 -24.915154 54.279678 4e-06 70.013603 -71.543404 -50 161.16127 55.903542 -0.0002307437117 4.803258371 -5.196821832 7.331037 6.801169 -100 7.211223 6.928077 0 0.000148 4.982446 0.000748 -49.999996 151.346649 -37.476406 -4e-06 54.363785 107.334839 -4e-06 87.154938 106.476173 -1e-06 -15.579353 50.696003 -49.999996 68.442886 -81.557114 -1e-06 151.889435 52.157478 0.000289 9.800036 4.5e-05 7.970867 -6.038652 -100 0.000103 3.445934 0.00075 2e-06 143.056274 -31.884476 -50.000004 54.525578 117.469696 -50.000004 90.937988 115.87989 -5.98376 8.011987 -9.852828 8.758624 4.825609 -100 -50 -24.275497 55.903542 4e-06 68.442886 -71.557114 -50 161.800934 54.279678 -49.999996 150.358093 -38.914761 -4e-06 55.917305 107.567009 -4e-06 88.688477 106.136192 -1e-06 -15.003662 52.157478 -49.999996 66.697647 -81.541885 -1e-06 152.465118 50.696003 0.0003 9.18543 -3.968307 2e-06 142.166565 -33.178993 -3.556967378 9.345986644 -50.3724225 -50.000004 56.255951 117.697502 -50.000004 92.635078 115.472458 -50 -23.607597 57.515995 4e-06 66.872169 -71.543404 -50 162.41214 52.644897 -49.999996 149.344589 -40.335644 -4e-06 57.474648 107.772041 -4e-06 90.215858 105.769501 9.1e-05 3.021878 0.00074 -2e-06 -14.40255 53.608688 -49.999996 64.952934 -81.496193 -0.0002497701538 8.221055644 -8.440229603 -1e-06 153.015228 49.224701 -3.769877 -9.262182 -100 -3.930951 -9.194978 -100 2e-06 141.254425 -34.457787 -1.001975 9.949535 -10.215985 -50.000004 57.99004 117.895073 -50.000004 94.324791 115.035469 -50 -22.911659 59.116547 4e-06 65.301933 -71.502289 -50 162.994751 50.999699 -49.999996 148.306427 -41.738621 -5.997609 8.001794 -9.847507 -4e-06 59.035324 107.94986 -4e-06 91.736603 105.376213 -2e-06 -13.776207 55.049183 -49.999996 63.20929 -81.420067 -1e-06 153.539551 47.744019 -0.845957 9.964154 -10.187443 2e-06 140.320084 -35.720467 -50.000004 59.72731 118.062355 -50.000004 96.006622 114.569054 -50 -22.187889 60.704708 4e-06 63.732651 -71.433769 -50 163.548538 49.344582 -9.119832 4.102033 -7.064491 9.906224 1.366281 0 -49.999996 147.243958 -43.123264 -4e-06 93.250244 104.956436 -2e-06 -13.124817 56.478531 -49.999996 61.467239 -81.313522 -1e-06 154.037964 46.254417 0.00016 5.412415 0.000731 2e-06 139.363861 -36.966648 -50.000004 97.680054 114.073364 -50.000004 -21.436516 62.279999 4e-06 62.164803 -71.337875 -50 164.073364 47.680054 7.295989 -6.838752 0 -49.999996 146.157486 -44.489155 -4e-06 94.75634 104.510315 -2e-06 -12.448578 57.89629 -49.999996 59.72731 -81.176582 -1e-06 154.510315 44.75634 0.000271 9.206396 0.000174 2e-06 138.386017 -38.19595 -7.526184837 6.584489846 -48.98197974 -50.000004 99.344589 113.548538 0.000219 7.418353 0.000516 -50.000004 -20.657768 63.841934 4e-06 60.598869 -71.214638 -50 164.569061 46.006622 1.88286 -9.821142 0 5.570608 -8.304716 0 -49.999996 145.047333 -45.835876 -4e-06 96.254417 104.037971 -2e-06 -11.747704 59.302032 -49.999996 57.99004 -81.0093 -1e-06 154.956436 43.250248 -49.999996 -19.851875 -28.504272 3e-06 137.386887 -39.407997 -50.000004 100.999702 112.994743 -50.000004 -19.851875 65.390038 4e-06 59.035324 -71.064087 -50 165.035461 44.324791 0.000182 6.167233 0.000677 -49.999996 143.913849 -47.163017 -4e-06 97.744019 103.539558 -2e-06 -11.0224 60.695328 -49.999996 56.255951 -80.811729 -1e-06 155.376221 41.736603 -49.999996 -20.657768 -26.956169 3e-06 136.366745 -40.602425 -50.000004 102.644897 112.412148 -50.000004 -19.019081 66.923843 8.673072 4.977731 0 4e-06 57.474648 -70.886269 -50 165.472458 42.635075 -49.999996 142.75737 -48.470177 -4e-06 99.224701 103.015221 -2e-06 -10.272888 62.075752 -49.999996 54.525578 -80.583923 3.279965 9.446789 -100 -1e-06 155.769501 40.215858 -49.999996 -21.436516 -25.394234 3e-06 135.325928 -41.77887 -50.000004 104.279678 111.800926 -50.000004 -18.159653 68.442886 4e-06 55.917305 -70.681236 -50 165.879883 40.937988 0.000162 5.487802 0.000727 -49.999996 141.578247 -49.75695 -4e-06 100.695999 102.465126 -2e-06 -9.499397 63.442886 -49.999996 52.799438 -80.325951 -1e-06 156.1362 38.68848 -50 -22.187889 -23.818943 3e-06 134.264709 -42.936966 1e-06 -15.579353 -13.81023 -0.0002432250117 7.062985053 -7.379036448 -50.000004 105.903549 111.16127 -50.000004 -17.273842 69.946686 4e-06 54.363785 -70.449066 -50 166.257645 39.234055 -49.999996 140.376862 -51.022949 -4e-06 102.157478 101.889435 -2e-06 -8.702171 64.79631 -49.999996 51.078068 -80.037888 -1e-06 156.476166 37.154938 0.00014 4.708262 0.000754 -50 -22.911659 -22.230782 3e-06 133.183472 -44.076366 -50.000004 107.515999 110.49337 -50.000004 -16.361923 71.434814 8.584878 5.12834 0 4e-06 52.814552 -70.189812 -50 166.605606 37.523785 -49.999996 139.153564 -52.267792 -4e-06 103.608688 101.288322 6.541175 -7.563929 -100 -2e-06 -7.881439 66.13562 -49.999996 49.361984 -79.719833 -1e-06 156.789337 35.615696 -50 -23.607597 -20.63023 3e-06 132.082489 -45.196724 -50.000004 109.116547 109.797432 -50.000004 -15.424171 72.906784 4e-06 51.270077 -69.903557 -50 166.92366 35.807701 1e-06 -16.129448 -12.338926 -49.999996 137.908722 -53.491096 -4e-06 105.049179 100.66198 -2e-06 -7.037468 67.460403 -49.999996 47.651718 -79.371872 -1e-06 157.075592 34.07122 -50 -24.275497 -19.017776 3e-06 130.962143 -46.297699 -50.000004 110.704712 109.073662 -50.000004 -14.460869 74.362167 4e-06 49.730835 -69.590401 -50 167.211731 34.08633 -49.999996 136.642731 -54.692482 -4e-06 106.478531 100.01059 -2e-06 -6.170494 68.770248 -49.999996 45.947781 -78.994118 -1e-06 157.334839 32.521988 -50 -24.915154 -17.393913 3e-06 129.822739 -47.378944 -50.000004 112.279999 108.322289 -1.97417608 9.802807998 -50.34629976 -50.000004 -13.472321 75.800522 4e-06 48.197292 -69.25042 -50 167.469696 32.360195 -49.999996 135.355957 -55.871597 -4e-06 107.896286 99.334351 -2e-06 -5.2808 70.064766 -49.999996 44.250694 -78.586685 -1e-06 157.567017 30.968466 -50 -25.526375 -15.759132 3e-06 128.664642 -48.440147 -50.000004 113.841934 107.543541 -50.000004 -12.458817 77.221405 4e-06 46.669914 -68.883728 -50 167.69751 30.629818 7.563929 6.541175 0 -49.999996 134.048798 -57.028069 -4e-06 109.302032 98.633476 -2e-06 -4.368645 71.343559 -49.999996 42.560982 -78.149696 -0 157.772034 29.411127 -50 -26.108971 -14.113934 3e-06 127.488197 -49.480972 -50.000004 115.390045 106.737648 -50.000004 -11.420662 78.62439 4e-06 45.14917 -68.49044 -50 167.895081 28.895731 -49.999996 132.721649 -58.16156 -3e-06 110.695328 97.908173 -2e-06 -3.434311 72.606239 -49.999996 40.87915 -77.683281 -0 157.94986 27.850449 -50 -26.662766 -12.458815 3e-06 126.29377 -50.501114 -50.000004 116.923843 105.904854 -50.000004 -10.358192 80.009033 4e-06 43.635525 -68.070663 -50 168.062347 27.158459 -49.999996 131.374924 -59.271713 -3e-06 112.075752 97.158661 -2e-06 -2.478081 73.852417 -49.999996 39.205715 -77.187592 -0 158.100403 26.286903 -50 -27.187592 -10.794287 3e-06 125.081726 -51.500252 -50.000004 118.442886 105.045425 -50.000004 -9.271713 81.374924 4e-06 42.129433 -67.624542 -50 168.199295 25.418531 -49.999996 130.009033 -60.358192 -3e-06 113.442886 96.38517 -2e-06 -1.500252 75.081726 -49.999996 37.541187 -76.662766 -0 158.223648 24.72097 -50 -27.683281 -9.120852 3e-06 123.852417 -52.478081 -50.000004 119.946693 104.159615 -50.000004 -8.16156 82.721649 4e-06 40.631355 -67.152199 -50 168.305847 23.676479 -49.999996 128.62439 -61.420662 -3e-06 114.79631 95.587944 -3e-06 -0.501114 76.29377 -49.999996 35.88607 -76.108971 -0 158.31955 23.153122 -50 -28.149696 -7.43902 3e-06 122.606239 -53.434311 -50.000004 121.434814 103.247696 -50.000004 -7.028069 84.04879 4e-06 39.141754 -66.653786 -50 168.381958 21.932835 -49.999996 127.221413 -62.458817 -3e-06 116.13562 94.767212 -3e-06 0.519028 77.488197 -49.999996 34.240871 -75.526375 -0 158.388062 21.583841 -50 -28.586685 -5.749306 3e-06 121.343559 -54.368645 -50.000004 122.906792 102.309944 -50.000004 -5.871597 85.355949 4e-06 37.661072 -66.129448 -50 168.427658 20.188126 -49.999996 125.800529 -63.472321 -3e-06 117.460403 93.923241 -3e-06 1.559853 78.664642 -49.999996 32.606091 -74.915154 -0 158.429169 20.013603 1 2 2 3 1 3 4 5 6 5 6 4 7 8 7 9 9 8 10 11 11 12 10 12 13 14 15 13 15 14 16 17 18 17 16 18 19 20 21 20 19 21 22 23 24 23 22 24 25 26 27 26 25 27 28 29 30 28 29 30 31 32 32 33 31 33 34 35 35 36 34 36 37 38 38 39 37 39 40 41 42 41 42 40 43 44 43 45 45 44 46 47 47 48 48 46 49 50 50 51 49 51 52 53 41 53 41 52 54 55 56 55 54 56 57 5 58 5 58 57 59 60 15 59 15 60 61 62 62 63 61 63 64 65 66 64 66 65 67 68 68 69 67 69 70 71 72 71 72 70 73 74 75 74 73 75 76 77 78 76 77 78 79 80 79 81 80 81 34 82 83 82 34 83 84 85 85 86 84 86 19 87 88 87 19 88 89 90 90 91 91 89 92 93 92 94 94 93 95 96 96 97 97 95 98 99 99 100 100 98 57 101 101 58 102 103 102 104 104 103 105 106 107 106 107 105 108 109 110 109 110 108 111 60 60 112 111 112 113 114 115 113 115 114 116 117 116 118 117 118 25 119 120 119 25 120 121 122 15 121 15 122 123 21 20 123 124 125 126 125 124 126 127 128 128 129 127 129 130 131 41 131 41 130 132 133 133 134 134 132 37 135 135 38 136 137 41 137 41 136 61 138 138 46 61 46 139 140 140 141 139 141 142 143 142 144 144 143 145 146 146 147 145 147 148 59 148 60 63 149 149 62 150 151 152 150 152 151 153 41 154 41 154 153 155 67 155 68 156 157 158 157 156 158 159 160 41 160 41 159 19 77 161 77 19 161 34 162 163 162 34 163 164 165 165 166 164 166 167 88 87 167 84 168 169 168 169 84 61 170 170 95 61 95 171 172 141 171 141 172 173 174 175 174 173 175 176 177 176 178 178 177 179 180 180 181 179 181 182 183 182 184 184 183 185 186 185 187 187 186 188 189 188 190 190 189 191 192 192 193 191 193 194 195 194 196 196 195 197 136 198 197 136 198 61 199 199 123 61 123 5 200 201 200 5 201 37 202 135 202 203 192 203 204 192 204 205 206 206 207 205 207 47 138 125 208 209 208 125 209 148 210 210 59 211 212 15 211 15 212 19 149 213 149 19 213 214 215 15 214 15 215 67 216 155 216 217 218 41 218 41 217 78 161 219 220 221 220 219 221 80 222 79 222 223 89 223 91 61 224 224 167 61 167 225 226 225 227 227 226 96 170 228 229 229 230 230 228 102 231 102 232 232 231 233 234 233 235 234 235 44 236 44 237 236 237 54 238 239 238 54 239 240 241 15 240 15 241 242 243 244 243 244 242 54 245 246 245 54 246 247 248 247 249 248 249 250 251 252 251 250 252 253 254 255 253 255 254 256 257 258 257 256 258 2 259 260 259 2 260 261 262 262 263 261 263 264 265 264 266 265 266 21 199 267 268 41 268 41 267 269 270 271 269 271 270 105 272 273 272 105 273 19 47 274 47 19 274 275 276 275 277 277 276 278 279 280 279 280 278 281 173 282 281 173 282 62 213 283 284 285 283 284 285 163 82 163 286 82 286 287 288 289 288 287 289 290 291 291 292 290 292 164 56 164 290 290 56 293 294 295 294 295 293 296 297 297 298 296 298 156 25 158 25 61 299 299 78 61 78 300 301 301 302 300 302 303 39 39 304 303 304 88 224 19 96 305 96 19 305 225 5 225 6 306 307 307 308 306 308 309 310 309 311 311 310 191 312 312 261 191 261 313 314 41 314 41 313 185 315 316 185 316 315 317 318 319 318 319 317 320 168 168 321 320 321 322 45 43 322 54 323 324 323 54 324 247 128 247 129 325 326 325 327 327 326 328 329 330 329 328 330 331 332 331 333 332 333 334 11 10 334 335 336 15 335 15 336 337 338 339 338 339 337 340 21 19 340 5 341 342 341 5 342 264 2 264 343 343 2 344 345 15 344 15 345 346 347 348 346 348 347 349 350 41 350 41 349 138 274 351 352 351 2 2 352 353 354 355 353 355 354 280 356 278 356 292 231 15 292 15 231 357 358 358 61 357 61 61 359 359 62 360 361 360 362 361 362 363 364 365 364 363 365 366 8 367 8 366 367 368 369 370 368 369 370 371 372 372 373 371 373 161 299 219 374 302 374 219 302 312 279 375 279 375 312 376 88 19 376 377 378 377 355 378 355 228 286 229 286 16 379 379 18 170 305 6 226 380 22 22 381 380 381 382 383 382 384 383 384 16 348 348 385 16 385 100 386 387 386 387 100 388 234 233 388 388 318 388 319 5 389 390 389 5 390 181 391 391 392 181 392 113 211 115 211 393 394 15 393 15 394 395 267 268 395 396 397 396 398 397 398 199 340 399 400 41 400 41 399 401 402 402 403 401 403 404 405 406 404 405 406 407 408 409 408 407 409 61 410 410 138 2 411 412 411 2 412 164 413 413 414 164 414 185 415 315 415 416 417 15 416 15 417 418 419 419 420 418 420 213 359 421 422 421 423 423 422 424 425 425 426 426 424 427 428 428 429 427 429 366 430 431 430 431 366 432 433 15 432 15 433 434 435 435 436 434 436 437 161 19 437 438 439 440 439 438 440 224 376 441 286 442 286 442 441 443 444 445 444 443 445 446 447 447 377 446 377 448 449 448 450 450 449 16 451 16 67 67 451 61 452 452 170 271 453 454 271 454 453 139 455 455 456 139 456 457 458 457 7 458 7 459 460 459 461 461 460 462 463 464 462 464 463 465 466 465 181 181 466 467 152 468 152 467 468 5 469 470 469 5 470 471 472 471 473 473 472 474 475 476 475 474 476 61 477 477 199 478 479 480 478 479 480 481 277 481 275 401 482 482 402 483 484 485 484 483 485 409 486 486 407 125 487 208 487 274 410 488 489 490 488 490 489 491 492 491 493 493 492 494 213 19 494 219 495 462 495 219 462 496 497 497 498 496 498 499 500 15 499 15 500 434 501 502 501 502 434 299 437 438 503 439 503 61 504 504 224 505 506 505 381 381 506 507 308 507 307 443 508 508 444 54 509 510 509 54 510 16 346 305 452 511 45 511 512 512 45 423 513 513 514 423 514 515 279 516 279 516 515 261 517 518 261 517 518 519 520 15 519 15 520 521 522 521 523 522 523 122 524 524 400 400 122 465 391 525 468 525 152 526 527 526 528 528 527 529 41 530 41 530 529 531 532 41 532 41 531 533 474 475 533 340 477 534 535 535 536 536 534 537 538 15 537 15 538 162 222 163 222 287 539 288 539 540 274 19 540 541 542 542 543 543 541 544 415 185 544 545 546 546 547 545 547 359 494 548 549 15 548 15 549 550 551 551 552 550 552 61 553 553 299 554 555 554 556 555 556 376 504 101 557 558 557 558 101 559 305 19 559 560 45 560 512 561 501 561 502 139 562 562 563 139 563 564 565 564 193 565 193 566 567 567 568 566 568 417 569 15 569 570 571 572 570 571 572 201 41 529 201 409 286 409 83 83 286 573 574 573 575 575 574 576 340 19 576 577 578 41 578 41 577 278 579 579 356 300 580 580 581 300 581 188 582 190 582 410 540 583 584 585 583 584 585 61 586 586 359 563 587 139 587 588 589 590 589 588 590 591 592 592 593 593 591 505 594 506 594 379 550 379 551 595 596 519 595 596 519 597 598 599 598 597 599 437 553 600 25 601 25 601 600 602 348 602 346 603 604 604 61 603 61 486 605 606 486 606 605 607 376 19 607 608 44 609 608 44 609 610 397 610 398 452 559 54 611 238 611 612 613 613 614 612 614 615 616 615 617 617 616 337 193 193 338 179 618 618 610 179 610 238 619 238 620 620 619 111 547 621 547 111 621 622 41 623 41 623 622 258 222 258 624 624 222 625 626 626 627 625 627 628 629 630 629 628 630 631 632 632 222 631 222 433 633 633 432 634 635 634 177 177 635 477 576 486 222 606 222 636 637 637 638 636 638 587 639 639 640 587 640 641 642 643 642 641 643 644 326 326 645 645 644 61 646 646 410 5 647 200 647 648 649 650 648 649 650 494 586 651 652 653 652 653 651 654 41 655 41 655 654 15 613 15 614 656 437 19 656 657 322 511 657 322 511 504 607 658 659 660 659 658 660 558 661 662 558 661 662 61 663 663 452 54 414 54 102 414 102 238 664 611 664 665 666 666 143 143 665 667 668 668 669 667 669 670 41 671 41 671 670 407 606 328 672 329 672 673 674 673 675 675 674 676 626 676 625 628 177 630 177 241 677 677 240 6 678 678 225 61 679 679 477 680 605 486 680 681 41 682 41 682 681 683 32 683 31 557 5 5 684 684 557 685 686 686 687 685 687 164 688 688 689 164 689 401 690 482 690 278 691 691 279 219 692 693 692 219 693 540 646 694 695 696 695 696 694 505 697 594 697 698 699 15 698 15 699 700 494 19 700 701 702 702 703 701 703 696 704 704 705 696 705 706 450 707 450 707 706 550 708 379 708 262 709 262 710 709 710 553 656 573 711 573 712 712 711 332 713 713 714 332 714 99 715 715 716 99 716 61 717 717 504 559 663 192 718 719 718 192 719 573 720 720 721 573 721 191 691 691 516 191 516 615 722 615 723 723 722 724 725 15 724 15 725 383 726 726 727 383 727 728 120 25 728 729 292 729 290 481 730 731 730 481 731 500 732 732 499 576 679 733 734 15 733 15 734 258 286 256 286 650 735 736 650 736 735 563 639 737 738 738 739 737 739 740 741 41 741 41 740 742 326 742 645 743 540 19 743 744 745 746 745 746 744 747 481 748 481 748 747 586 700 749 696 704 749 750 751 15 750 15 751 752 753 335 752 753 335 61 754 754 553 573 755 755 94 573 94 756 757 758 757 756 758 607 717 759 760 760 761 759 761 762 559 19 762 718 204 763 322 242 763 242 322 764 193 261 193 261 764 765 766 767 766 765 767 768 769 770 768 770 769 408 606 771 772 33 772 771 33 773 774 775 774 773 775 776 41 673 41 673 776 777 158 778 158 778 777 322 779 780 779 322 780 670 599 671 599 781 782 41 782 41 781 729 783 290 783 628 784 629 784 328 352 330 352 681 785 41 785 786 286 228 786 693 295 693 293 787 576 19 787 505 788 697 788 789 790 15 789 15 790 791 286 624 286 624 791 792 684 557 792 793 794 795 794 793 795 796 797 798 797 796 798 799 800 801 799 800 801 646 743 802 803 804 803 802 804 164 445 445 413 805 806 41 806 41 805 61 807 807 586 808 809 809 810 808 810 811 182 812 811 812 182 813 814 813 352 352 814 656 754 815 607 19 815 339 709 262 339 663 762 602 816 816 817 602 817 502 818 818 435 502 435 684 819 819 61 684 61 820 766 766 821 820 821 822 823 824 823 822 824 825 629 825 784 448 826 449 826 827 828 829 828 827 829 179 774 774 180 248 830 248 778 830 778 43 779 535 831 831 832 832 535 833 834 834 835 833 835 836 837 838 836 837 838 785 839 785 25 25 839 840 841 15 840 15 841 842 843 843 118 842 118 844 6 4 844 845 41 846 41 846 845 847 848 15 847 15 848 679 787 849 850 850 851 851 849 852 853 852 854 853 854 100 855 855 98 244 560 657 560 657 244 61 856 856 646 857 858 859 858 857 859 73 860 861 860 73 861 862 863 863 864 862 864 700 807 808 598 865 598 808 865 457 9 866 867 866 421 867 421 480 868 15 480 15 868 714 869 332 869 870 871 872 871 870 872 873 656 19 873 717 815 518 193 517 193 874 875 876 875 874 876 61 877 877 663 776 674 878 450 436 878 450 436 879 286 786 879 322 73 43 73 438 177 440 177 880 41 881 41 881 880 882 883 883 884 882 884 293 885 885 693 245 886 887 886 245 887 888 889 889 890 888 890 891 233 891 319 319 233 505 892 788 892 166 239 164 239 73 893 894 893 73 894 895 896 897 895 896 897 467 898 899 898 467 899 900 901 41 901 41 900 164 443 164 902 902 443 61 903 903 679 230 222 229 222 341 41 342 41 327 904 904 905 327 905 472 690 471 690 906 907 220 906 220 907 743 856 5 42 908 42 5 908 394 909 909 393 910 769 768 910 911 700 19 911 250 522 252 522 324 912 323 912 913 914 41 914 41 913 754 873 915 916 917 916 917 915 34 918 632 918 34 632 61 919 919 717 517 262 337 517 337 262 566 920 921 920 566 921 922 824 822 922 762 877 923 924 612 923 612 924 925 615 925 617 248 926 248 927 926 927 827 344 829 344 817 928 602 928 786 230 54 929 930 929 54 930 600 931 601 931 706 289 707 289 932 933 933 934 932 934 935 855 855 936 935 936 192 279 203 279 937 938 938 939 939 937 940 941 41 941 41 940 5 530 942 530 5 942 330 943 870 943 330 870 787 903 129 944 944 247 945 946 947 946 945 947 325 904 388 948 948 234 949 478 950 949 478 950 164 951 164 952 952 951 953 743 19 953 954 955 954 382 955 382 956 957 41 957 41 956 807 911 458 25 457 25 41 478 41 949 61 958 958 754 624 959 791 959 219 960 960 302 815 919 961 962 79 962 961 79 963 822 964 822 963 964 965 762 19 965 561 818 966 222 966 967 967 222 968 825 968 629 906 969 220 969 505 970 892 970 971 972 685 972 971 685 973 974 973 619 974 619 54 975 509 975 976 977 15 976 15 977 978 979 978 980 979 980 98 935 466 981 15 466 15 981 467 865 467 597 865 597 982 787 19 982 54 983 984 983 54 984 985 986 985 987 987 986 988 853 852 988 319 948 423 866 734 801 799 734 856 953 443 989 902 989 990 756 757 990 991 992 15 991 15 992 821 303 820 303 61 993 993 807 526 994 526 995 994 995 252 996 996 997 252 997 34 998 999 998 34 999 446 491 1000 491 446 1000 164 323 323 1001 164 1001 873 958 1002 1003 1003 1004 1002 1004 300 363 300 365 1005 815 19 1005 877 965 300 1006 1006 960 300 960 293 1007 1007 1008 293 1008 967 879 879 966 1009 884 1009 883 191 565 691 565 1010 878 1011 878 1010 1011 1012 547 1012 545 978 1013 979 1013 1014 25 1014 156 935 386 386 98 1015 1016 1016 1017 1017 1015 1018 593 591 1018 164 1019 164 1020 1020 1019 73 1021 74 1021 903 982 336 30 15 30 352 1022 1022 1023 352 1023 61 1024 1024 856 1025 5 1025 73 73 5 1026 356 356 1027 1026 1027 1028 2 1028 1029 1029 2 765 1030 135 1030 765 135 911 993 555 222 554 222 1031 71 15 1031 15 71 250 996 1032 1033 1034 1032 1033 1034 1035 183 1036 183 1035 1036 1037 873 19 1037 1038 1039 1038 1040 1040 1039 921 567 791 222 383 922 383 824 919 1005 358 54 1041 54 358 1041 61 1042 1042 877 1043 497 496 1043 301 1044 302 1044 505 273 505 105 1045 1046 324 1046 1045 324 825 934 968 934 164 1047 1047 1048 164 1048 1049 1010 1049 878 538 1050 15 1050 328 1051 943 1051 943 328 140 171 244 1052 1053 1052 244 1053 54 1020 1054 1020 54 1054 902 508 902 1055 1055 508 981 933 15 933 1056 757 1057 757 1056 1057 61 1058 1058 903 445 989 319 2 388 2 953 1024 1059 1060 1060 741 741 1059 978 1061 1062 1061 978 1062 1063 190 190 1064 1063 1064 1065 911 19 1065 1066 1067 15 1066 15 1067 528 1068 1069 1068 528 1069 958 1037 1038 297 1040 297 1070 306 306 1063 1070 1063 1071 1072 1073 1071 1073 1072 61 1074 1074 919 817 1075 928 1075 54 729 1076 729 54 1076 965 1042 505 1077 273 1077 500 1078 1078 1079 1079 500 1080 1081 1080 1012 1081 1012 94 1082 573 1082 256 1083 257 1083 1084 1085 1085 964 1084 964 657 1052 523 54 54 521 496 864 864 1086 496 1086 1087 934 1087 968 1088 933 932 1088 481 142 481 1089 142 1089 54 951 54 952 99 1090 1090 1091 99 1091 982 1058 1092 916 15 1092 15 916 1093 106 15 1093 15 106 1094 953 19 1094 1095 1096 41 1096 41 1095 1097 222 1098 222 1098 1097 1099 1100 15 1099 15 1100 648 332 332 650 1101 1102 1103 1102 1101 1103 993 1065 1104 569 569 1105 1104 1105 1106 41 1107 41 1107 1106 974 222 973 222 179 269 269 1108 179 1108 61 1109 1109 958 1110 86 86 157 1110 157 604 49 50 604 744 1111 1111 1112 744 1112 1113 300 300 1114 1114 1113 1005 1074 1006 1050 1115 1050 1115 1006 602 379 602 550 54 1116 1117 1116 54 1117 1118 965 19 1118 295 1007 1119 1120 1120 1121 1119 1121 573 1122 1122 1123 573 1123 256 222 244 73 657 73 820 1124 1124 37 820 37 352 1125 351 1125 725 386 15 386 1126 1127 1126 507 1127 507 831 1128 1128 1129 1129 831 99 1130 1130 1131 99 1131 1132 982 19 1132 641 1133 1134 1133 641 1134 760 1135 760 667 1135 667 1136 1137 1136 1138 1137 1138 1139 1140 1140 1141 1139 1141 1024 1094 811 25 812 25 1142 1143 1143 1144 1144 1142 457 158 458 158 1101 1145 1145 1103 61 1146 1146 993 973 1147 619 1147 1148 310 15 1148 15 310 1037 1109 1044 1149 1149 301 1150 1005 19 1150 505 1151 1077 1151 1152 1153 1153 1154 1152 1154 50 127 50 1155 1155 127 1042 1118 164 1156 164 723 723 1156 768 1157 770 1157 179 1158 1158 1159 179 1159 773 179 179 1160 1160 773 1161 1084 1084 61 1161 61 1162 783 1163 783 1162 1163 1164 613 1165 613 1165 1164 882 253 253 1166 882 1166 346 1167 348 1167 741 1168 1168 1060 1169 1170 15 1169 15 1170 1171 1172 1173 1172 1171 1173 1058 1132 775 1174 775 1087 1174 1087 353 25 355 25 1175 805 41 1175 1087 1176 1176 629 1087 629 1177 931 600 1177 61 1178 1178 1024 1179 1180 15 1179 15 1180 943 872 1181 484 484 1003 1181 1003 1065 1146 1182 306 308 1182 1106 794 1107 794 1183 1184 1184 416 1183 416 41 479 1185 1037 19 1185 1117 951 1117 1186 951 1186 1074 1150 1187 1188 1187 1189 1189 1188 61 1190 1190 1042 54 1191 54 488 488 1191 1192 1193 1193 1194 1192 1194 711 1195 573 1195 1196 1197 1197 208 1196 208 139 1198 1198 521 139 521 129 1199 845 1199 129 845 1200 1201 1201 217 217 1200 1202 1203 1202 1204 1203 1204 1203 1205 1205 1062 1203 1062 1206 386 386 1207 1206 1207 83 1162 1162 222 83 222 862 498 862 496 922 1208 1208 1209 1209 922 1210 352 1211 352 1211 1210 1212 1213 15 1212 15 1213 822 1214 1215 1214 822 1215 15 1207 61 1216 1216 1058 1217 1218 1218 1174 1174 1217 403 1219 15 403 15 1219 1220 158 1221 158 1221 1220 909 1222 41 1222 41 909 1094 1178 1168 1223 41 1223 41 1168 1143 897 15 1143 15 897 1224 484 1224 1181 427 1225 1226 1225 427 1226 1097 1227 1227 1098 1228 1065 19 1228 1229 450 706 1229 300 1044 300 1149 1183 1230 1230 1184 505 223 505 23 23 223 1155 34 34 127 1109 1185 1231 1027 280 1027 1231 280 1186 1232 1232 1117 61 1233 1233 1074 1234 183 1235 183 1234 1235 1118 1190 1041 902 54 902 1236 1237 898 1237 898 1236 139 1238 1238 1198 134 16 16 132 601 1239 931 1239 312 193 375 193 765 303 765 821 1240 481 1241 481 1241 1240 1242 1203 1242 1243 1243 1203 1164 1244 1244 226 1164 226 1181 1002 1211 1245 1210 1245 1246 1247 1248 1246 1247 1248 383 1183 383 1230 1249 1250 15 1249 15 1250 1132 1216 116 1251 172 116 1251 172 1239 354 353 1239 771 25 1252 25 1252 771 1253 286 1254 286 1254 1253 5 1255 1256 1255 5 1256 1257 1094 19 1257 14 1258 1258 1259 1259 14 943 352 870 352 1260 1261 41 1261 41 1260 124 1262 1263 1262 124 1263 1264 803 803 1235 1264 1235 375 1265 312 1265 1146 1228 1183 492 1230 492 1266 1267 1266 1268 1268 1267 1269 1270 1269 1271 1270 1271 61 1272 1272 1109 1273 86 1273 1110 1150 1233 371 1274 1274 969 371 969 1275 711 1195 1275 1276 1118 19 1276 723 616 616 1277 723 1277 353 601 1278 1279 1279 481 1278 481 1280 936 936 1281 1280 1281 1211 1282 1245 1282 941 1283 41 1283 15 1105 248 447 248 377 1284 1132 19 1284 1285 1147 1285 973 536 832 852 222 988 222 973 1286 1286 1285 885 1008 1008 1287 885 1287 15 801 1178 1257 1288 987 1288 986 970 674 892 674 34 191 191 127 1007 1289 1290 1007 1289 1290 375 1291 1265 1291 61 1292 1292 1146 1293 41 888 41 888 1293 1185 1272 1294 1150 19 1294 521 1295 521 1238 1295 1238 1190 1276 366 1296 1297 1296 366 1297 524 1298 15 524 15 1298 1299 424 15 1299 15 424 1070 507 1070 307 1300 1301 1302 1301 1300 1302 1216 1284 719 279 1303 616 1304 616 1303 1304 61 1305 1305 1178 768 1306 1306 1157 139 1307 1307 455 563 1308 587 1308 350 1309 41 1309 1116 1310 1310 1311 1116 1311 1228 1292 5 1312 1313 1312 5 1313 641 1314 642 1314 1293 890 1315 1185 19 1315 1233 1294 1203 1061 1061 1316 1203 1316 303 1124 141 1251 737 702 767 702 737 767 1202 978 978 1204 61 1317 1317 1190 760 1072 1071 760 822 727 822 726 1033 1153 1153 1318 1033 1318 221 969 1319 948 1319 234 1320 1321 1322 1320 1321 1322 173 1224 174 1224 624 256 390 41 1323 41 1323 390 966 786 684 57 57 557 61 1324 1324 1216 1325 551 1326 551 1325 1326 22 892 22 788 1327 1328 1329 1328 1329 1327 191 1330 1330 127 572 1331 15 572 15 1331 1225 254 253 1225 796 222 798 222 1257 1305 768 1332 1332 1306 1041 164 1068 481 1069 481 1333 1228 19 1333 525 1334 1334 1335 525 1335 195 222 1188 222 195 1188 1272 1315 1231 1336 1027 1336 61 1337 1337 1233 311 1338 1338 1339 311 1339 1276 1317 775 269 775 271 414 989 413 989 1340 1341 1341 1342 1340 1342 173 1343 1344 1343 173 1344 1345 373 1345 372 431 8 1346 582 582 1347 1346 1347 1348 838 836 1348 1349 93 92 1349 1284 1324 193 904 338 904 22 697 387 1350 1350 1351 387 1351 1020 1352 1054 1352 1330 1049 127 1049 483 1347 483 1346 1353 41 1354 41 1354 1353 1355 1356 1357 1355 1357 1356 951 1358 1358 1359 951 1359 242 657 1360 1257 19 1360 1361 1237 15 1361 15 1237 1292 1333 1124 39 370 991 991 369 139 983 983 140 61 1362 1362 1272 820 135 1236 1363 898 1363 1064 582 1364 582 1064 1364 1294 1337 1365 373 371 1365 1366 1215 822 1366 1367 1368 1369 1367 1369 1368 1370 1276 19 1370 869 834 869 833 1191 116 1191 117 1371 133 1372 133 1372 1371 791 1254 5 1373 5 1374 1373 1374 1375 350 1309 1375 1376 1284 19 1376 22 970 806 1018 41 1018 594 890 594 889 34 409 641 649 648 641 1305 1360 1377 41 1378 41 1378 1377 5 1379 1380 1379 5 1380 1381 1382 797 1381 1382 797 343 1383 343 265 1383 265 419 1040 419 1038 61 1384 1384 1292 164 55 55 1385 164 1385 1386 286 842 286 842 1386 467 1387 1335 1387 467 1335 1388 41 1389 41 1389 1388 1315 1362 1390 765 1126 765 1390 1126 1391 1294 19 1391 822 1104 823 1104 1392 882 882 820 1392 820 1317 1370 1071 25 1073 25 967 286 171 116 171 1191 1166 427 1166 1225 1393 1394 686 1394 1393 686 289 450 287 450 1347 1395 483 1395 54 1396 544 1396 54 544 366 1397 1397 430 827 1398 1001 827 1001 1398 1399 41 1400 41 1400 1399 1401 1402 15 1401 15 1402 1403 225 1403 6 1324 1376 91 22 22 223 977 499 499 532 532 977 506 890 1303 1277 1353 487 1354 487 1404 660 15 1404 15 660 1405 1406 1406 1407 1405 1407 61 1408 1408 1305 1017 577 577 1016 1409 1410 229 1410 1409 229 1333 1384 287 528 289 528 34 229 229 555 34 555 467 921 467 1411 921 1411 5 1412 1413 1412 5 1413 1414 1315 19 1414 561 434 1415 969 1415 371 1416 652 651 1416 1337 1391 383 1214 1214 726 384 1417 383 1417 61 1418 1418 1317 1419 858 859 1419 1420 1031 1421 1031 1421 1420 1034 1318 1422 246 54 1422 1423 1424 1425 1423 1425 1424 609 236 657 512 1085 1426 1427 1426 1085 1427 54 1428 1429 1428 54 1429 1296 1397 1397 1297 1430 707 289 1430 760 360 760 1431 360 1431 1432 826 826 1433 1433 1432 61 1434 1434 1324 1352 1435 1054 1435 1157 1212 15 1157 253 1436 255 1436 15 11 15 12 139 1437 1437 984 139 984 1406 1438 1406 1439 1438 1439 1360 1408 764 375 635 194 635 1440 1440 194 1409 1441 1410 1441 1442 1333 19 1442 1443 1444 1444 1445 1445 1443 1145 1033 1145 1034 1446 306 306 1447 1447 1446 1125 41 41 351 1362 1414 1448 1449 1449 761 1448 761 1450 158 811 158 811 1450 124 1332 124 768 381 1067 1067 1397 381 1397 61 1451 1451 1337 1371 1452 1452 133 148 546 210 546 1453 467 467 1454 1453 1454 1455 61 61 1106 1106 1455 1370 1418 928 288 817 288 140 1251 983 1251 1456 41 1457 41 1457 1456 15 1142 1458 560 243 560 1458 243 1144 895 895 1143 1258 1059 15 1258 15 1059 1376 1434 1169 805 806 1169 1006 538 710 1459 1460 1459 710 1460 844 1461 844 1462 1461 1462 54 171 1463 1464 1406 1464 1463 1406 1465 1360 19 1465 1466 1467 1468 1467 1466 1468 492 1469 491 1469 1470 1471 1471 551 1470 551 139 1472 1472 309 139 309 1473 725 1473 1280 1280 725 1474 1475 1475 1476 1476 1474 1384 1442 1477 41 1478 41 1478 1477 360 1479 360 834 1479 834 61 1480 1480 1362 1231 279 506 1067 1481 882 884 1481 1391 1451 1234 1482 1036 1482 1036 1234 1209 822 507 1447 1483 1447 507 1483 219 295 1301 295 219 1301 1484 1370 19 1484 1034 222 1033 222 1485 366 1485 431 44 73 609 73 1486 173 173 641 1486 641 1393 1136 1136 686 1487 1246 41 1246 41 1487 573 866 866 1488 573 1488 1255 41 1256 41 101 1489 558 1489 1380 41 1490 41 1490 1380 1491 1376 19 1491 375 261 479 1492 41 1492 735 760 650 760 1416 1493 1493 1494 1416 1494 660 567 15 567 588 1364 420 588 420 1364 113 1463 1464 113 1408 1465 1495 1496 721 1495 721 1496 1472 1497 309 1497 1498 1499 1499 1500 1500 1498 248 1450 447 1450 61 1501 1501 1384 1502 1039 15 1502 15 1039 602 1075 1075 1503 602 1503 507 111 1504 111 507 1504 1505 804 1505 803 1506 1459 1459 1507 1506 1507 1414 1480 606 1097 1097 408 1348 705 1348 704 842 1032 1145 842 1145 1032 1508 686 773 1508 686 773 1509 1391 19 1509 1452 1510 1510 1511 1452 1511 1330 1512 1512 1513 1330 1513 525 808 525 865 1182 507 507 1514 1182 1514 1418 1484 1515 1516 1516 1517 1515 1517 1518 685 1519 685 1519 1518 1166 429 720 1495 1520 1521 1521 1522 1522 1520 1071 759 759 156 1071 156 1523 1524 1524 1004 1523 1004 1434 1491 650 1525 736 1525 1002 1526 1181 1526 960 1291 1006 1291 1266 126 1266 1367 1367 126 945 1517 945 1527 1517 1527 41 1199 61 1528 1528 1408 73 1529 1530 1529 73 1530 983 854 854 1251 775 1043 775 1531 1531 1043 1532 1533 1534 1533 1534 1532 1088 1340 1088 1341 1535 41 1536 41 1536 1535 447 158 1537 158 1537 447 1442 1501 1538 1539 1540 1538 1539 1540 1446 507 1541 1506 1541 1459 939 1542 41 1542 41 939 1543 1414 19 1543 264 319 264 317 454 905 905 453 1392 1009 1392 883 1451 1509 1544 357 1544 61 61 1545 1545 1418 1196 41 1196 1354 859 1546 1546 1419 1547 41 1548 41 1548 1547 602 1549 1550 1549 602 1550 1551 208 1551 1197 1136 528 1393 528 1281 1489 101 1281 1552 1553 41 1553 41 1552 1239 1554 354 1554 1252 156 1252 1014 1555 814 814 1173 1555 1173 61 1556 1556 1434 1557 1558 155 1558 1557 155 139 488 488 1472 1559 1560 103 1560 1559 103 1266 125 1234 1561 1561 1482 1303 222 1304 222 1562 1563 41 1563 41 1562 589 1364 1465 1528 1261 1564 41 1564 1189 124 124 22 1189 22 248 812 248 811 1565 1442 19 1565 1566 937 15 1566 15 937 259 41 259 1536 1480 1543 61 1567 1567 1451 1371 1510 1568 560 1568 1458 418 1063 1063 420 1484 1545 1547 1569 1548 1569 1470 379 16 1470 209 1551 54 1437 765 737 180 687 774 687 73 1399 73 1400 1570 1571 1570 1572 1571 1572 1573 1344 173 1573 164 1076 164 1574 1574 1076 1575 653 1576 653 1575 1576 1577 1266 1266 89 89 1577 594 1067 1578 41 1579 41 1579 1578 1101 1034 1580 1581 1580 1582 1582 1581 1491 1556 1137 1583 1138 1583 950 480 1165 1244 1405 1243 1243 1407 1584 1465 19 1584 1585 1586 1586 1587 1587 1585 1588 315 1588 986 986 315 602 1452 1452 1589 602 1589 1501 1565 732 1079 41 1079 41 732 317 1590 1591 1590 317 1591 1506 1592 1541 1592 637 481 481 638 61 1593 1593 1480 16 1372 67 1372 1509 1567 1594 1595 1594 1152 1152 1595 1422 1194 1192 1422 1596 1484 19 1596 1354 208 1546 222 859 222 580 709 692 580 692 709 1597 1550 1470 1597 1550 1470 221 1598 1598 907 221 907 164 238 164 611 1056 1599 1056 100 1599 100 820 767 1600 1601 1601 1487 1487 1600 1602 804 1603 1602 1603 804 1402 1261 1261 1401 1072 202 202 668 1072 668 651 1493 1604 1235 1234 1604 1605 1491 19 1605 1189 61 1187 61 955 1606 954 1606 963 383 1230 963 1450 1537 303 668 1124 668 1607 595 1608 1607 595 1608 1332 910 205 1609 1609 1610 205 1610 1528 1584 1374 41 1373 41 1473 936 1222 677 41 677 602 1371 602 1372 61 1611 1611 1501 41 1321 41 1320 317 1612 1590 1612 1543 1593 4 1538 6 1538 1613 1509 19 1613 1545 1596 1488 1614 866 1614 101 5 558 5 523 139 1615 221 1615 1598 91 1266 1616 574 574 1617 1616 1617 99 1618 1618 715 15 402 1619 1620 15 1619 15 1620 262 279 1621 279 1621 262 868 1622 15 1622 1556 1605 1623 908 5 1623 1624 1625 1348 1625 1348 1624 1591 1625 317 1625 757 266 1057 266 258 1626 1626 257 1463 1243 1463 1627 1627 1243 61 1628 1628 1528 1629 426 41 426 41 1629 1565 1611 128 1106 128 1455 788 889 697 889 1630 1543 19 1630 1372 1589 1371 1589 1567 1613 1488 720 1488 1495 61 1631 1631 1545 1614 422 866 422 765 37 765 1124 1266 770 1266 1632 1632 770 221 1633 1615 1633 602 1634 1634 1635 602 1635 1616 92 92 574 852 286 1636 286 1636 852 1104 1366 1366 569 1637 41 1637 1323 1638 1639 15 1638 15 1639 98 1203 1203 99 1386 118 61 1640 1640 1556 2 1457 1641 1457 2 1641 891 264 1642 1643 1643 1644 1644 1642 1645 599 1646 1645 1646 599 1584 1628 1344 1647 1573 1647 218 1201 1648 1565 19 1648 1519 176 178 1519 699 13 13 1649 1649 699 561 1650 1650 818 1593 1630 61 1651 1651 1567 1652 1342 1340 1652 332 1653 1653 1654 332 1654 510 1382 509 1382 54 1385 1596 1631 1466 1383 1467 1383 574 1655 575 1655 823 1105 1011 436 1656 1657 1658 1657 1658 1656 550 1659 602 1659 1660 1661 1661 1454 1454 1660 248 1221 248 1220 1087 1662 1218 1662 1218 1087 1021 41 74 41 1045 1147 1147 1046 1409 286 284 1663 1664 284 1663 1664 1286 966 967 1286 251 1665 251 1666 1665 1666 983 1667 1667 1308 983 1308 1605 1640 5 1579 1668 1579 5 1668 1669 279 1669 1670 1670 279 1309 1671 1672 1309 1671 1672 766 702 1032 1102 1032 1101 1673 1584 19 1673 128 1107 1047 231 232 1047 1674 1675 1674 1676 1675 1676 1611 1648 1677 1169 805 1677 951 1311 1311 1352 951 1352 1678 561 1678 1650 61 1679 1679 1593 179 327 327 454 179 454 1613 1651 820 1030 510 1680 509 1680 870 1681 1681 1682 1682 870 1683 1596 19 1683 562 639 1684 1504 507 1684 842 1033 5 2 5 819 2 819 1685 913 1685 665 913 665 198 1686 15 198 15 1686 489 118 117 489 1254 624 98 1056 1386 222 842 222 761 735 1687 1605 19 1687 954 384 954 1554 384 1554 179 1688 1688 1158 338 1689 1689 904 1519 1690 1690 176 1691 599 1645 1691 952 1358 1628 1673 1658 1692 1658 1693 1692 1693 1674 1694 1694 1675 336 753 461 1695 461 1000 1000 1695 61 1696 1696 1611 1186 1311 1630 1679 1697 1613 19 1697 1678 501 1698 117 1191 1698 243 1699 560 1699 1631 1683 507 148 621 148 507 621 574 549 575 549 1453 1661 1700 446 447 1700 1701 1358 1702 1358 1701 1702 1703 1704 1704 272 1703 272 1285 967 1375 1672 1045 345 324 345 970 106 106 1705 970 1705 1496 1706 1495 1706 1707 1708 1709 1707 1709 1708 874 1086 1086 875 1640 1687 1710 1711 41 1711 41 1710 179 66 179 64 61 1712 1712 1628 1713 772 772 1714 1713 1714 15 1310 15 1311 1715 1716 1717 1715 1716 1717 1648 1696 29 283 1718 29 283 1718 414 231 1719 1630 19 1719 1651 1697 1136 450 1393 450 1266 1720 1266 1262 1262 1720 1406 1721 1406 1722 1721 1722 1723 177 1723 1724 1724 177 61 1725 1725 1631 1301 294 294 537 1301 537 1577 124 124 89 1503 385 602 385 352 878 1011 352 1726 1486 1486 61 1726 61 163 103 1559 163 1727 536 41 536 41 1727 1098 974 974 1227 1728 1729 1153 1728 1729 1153 1599 386 1599 387 1730 349 350 1730 1084 1731 1731 964 348 1732 1635 348 1635 1732 1733 1658 1693 1733 1734 270 1734 1735 270 1735 1043 874 1043 1086 61 1736 1736 1640 1737 1688 1158 1737 1738 1739 15 1738 15 1739 467 658 1411 658 1673 1712 1740 1741 1742 1741 1740 1742 771 1014 2 1378 1743 1378 2 1743 1694 177 1674 177 1744 1648 19 1744 844 924 1462 924 1745 1746 1746 402 1745 402 1679 1719 1539 1747 1748 1747 1539 1748 1357 1749 1750 1749 1750 1357 775 64 775 932 64 932 61 1751 1751 1651 1701 222 1702 222 1683 1725 592 1752 15 592 15 1752 1429 257 1429 1626 346 451 1753 286 1253 1753 132 1754 1754 1650 132 1650 1187 124 450 528 528 878 1242 978 980 1242 380 505 163 104 1755 1179 15 1755 1756 463 463 1757 1756 1757 1758 1677 15 1758 15 1677 1344 1004 1573 1004 1495 1614 721 1614 398 1708 1708 396 1127 61 1126 61 1687 1736 467 1759 1759 899 1760 1673 19 1760 1401 1260 978 1473 935 1473 978 935 1761 1762 1761 360 1762 360 1537 1763 1764 1763 1537 1764 1654 713 1696 1744 286 1033 1745 1427 1427 1746 61 1765 1765 1679 446 158 1700 158 458 830 458 473 830 473 1697 1751 1766 910 1766 1767 1767 910 1768 1683 19 1768 1769 41 1770 41 1770 1769 1488 1771 866 1771 1325 552 1772 1773 887 1773 887 1772 1429 1774 1428 1774 348 1634 385 1634 1775 1448 1775 1449 1020 1776 1054 1776 300 1693 300 1733 1158 1416 1416 1737 1777 1778 15 1777 15 1778 1203 979 1203 1779 1779 979 970 107 441 1780 1083 1780 441 1083 1411 920 247 920 1411 247 1113 1329 300 1329 1781 1687 19 1781 1259 740 740 1258 1782 913 41 1782 1712 1760 54 1783 54 688 1783 688 1645 1784 1646 1784 1461 5 844 5 92 72 1495 72 92 1495 716 1131 1785 1131 716 1785 1450 1763 1786 1787 1788 1787 1786 1788 1340 933 1652 933 614 724 383 1215 61 1789 1789 1696 1540 5 1539 5 1186 1359 1678 434 1719 1765 1790 1697 19 1790 1594 1153 1288 286 1753 1288 1285 286 1732 347 1791 41 1766 41 1766 1791 1406 1792 1793 1792 1406 1793 1725 1768 1794 1795 1796 1794 1795 1796 525 921 525 1411 1325 528 1326 528 1690 177 440 1690 1448 1797 1775 1797 1407 1438 1798 41 1799 41 1799 1798 1800 1758 15 1800 300 1365 1801 1365 300 1801 1802 41 1803 41 1803 1802 205 1573 205 1344 978 1205 1736 1781 61 1804 1804 1712 1805 109 109 1806 1805 1806 1807 781 41 1807 1537 25 1450 25 868 479 1808 1809 1809 1274 1808 1274 1744 1789 1810 1811 1811 41 1810 41 1812 1719 19 1812 1751 1790 219 1327 219 742 1327 742 1660 467 229 1546 1546 555 1791 910 473 7 796 1776 797 1776 61 1813 1813 1725 824 1121 824 1120 1321 1814 789 1321 1814 789 140 1667 1815 1595 1815 1816 1816 1595 1654 1817 713 1817 1158 651 952 1352 219 1818 1026 1818 219 1026 333 1797 1797 331 943 1681 99 1819 1819 1820 99 1820 61 1821 1821 1736 1129 1822 1822 1128 5 1323 669 702 766 669 1760 1804 644 1689 1689 645 666 142 1823 664 1823 345 345 664 1574 292 1048 292 1048 1574 1824 1744 19 1824 1765 1812 61 1825 1825 1751 1635 1167 1694 685 1674 685 1466 2 343 1466 1768 1813 678 227 678 1826 227 1826 481 1171 638 1171 1827 468 467 1827 1513 1493 1828 1493 1513 1828 1823 1045 1823 1147 1597 1829 1550 1829 1243 115 1243 1464 1464 115 1559 222 360 835 775 1159 775 1830 1159 1830 15 144 15 143 327 644 644 325 5 40 1781 1821 1831 1727 1832 1831 1727 1832 1833 1834 1835 1834 1833 1835 1836 1760 19 1836 846 1837 845 1837 143 1838 1838 913 913 143 1839 397 971 397 1839 971 1789 1824 41 405 41 404 129 1840 128 1840 1301 1007 1220 926 1220 1264 926 1264 16 1678 16 434 1253 624 61 1841 1841 1765 1790 1825 474 1842 1842 1843 474 1843 1844 685 1518 1844 830 25 1845 1768 19 1845 467 150 1549 1394 1508 1549 1508 1394 440 1846 1690 1846 600 353 1056 716 1056 1131 1161 22 1189 1161 1847 1230 963 1847 250 1848 1848 996 1139 1849 1849 1035 1139 1035 1850 1851 1851 1592 1850 1592 1091 1820 1091 1852 1820 1852 317 2 1591 2 1431 1762 414 1853 1853 104 414 104 1540 1748 970 675 107 675 1854 1781 19 1854 1855 1235 1855 803 1856 861 73 1856 1804 1836 907 1345 906 1345 93 1245 1349 1245 1413 41 1857 41 1857 1413 1137 1471 1583 1471 980 1858 979 1858 133 216 15 133 15 216 61 1859 1859 1789 1860 1861 1861 1862 1862 1860 641 1775 641 1448 1863 1027 1863 1336 1812 1841 1864 1790 19 1864 533 1842 300 1658 300 1656 1813 1845 1865 1866 1865 182 182 1866 899 1237 1237 1867 899 1867 467 808 1868 1056 1056 676 1868 676 1846 439 1137 528 1326 1137 158 1869 158 1786 1786 1869 54 1048 54 1574 1870 250 1870 1848 1030 1392 527 481 995 481 995 527 1270 1871 1271 1871 1587 1872 1872 1586 1385 680 1783 680 1385 1783 1588 186 1588 316 316 186 1821 1854 1247 1873 41 1873 41 1247 249 1874 1874 1875 249 1875 1872 1876 1877 1872 1876 1877 61 1878 1878 1804 1627 1879 1879 169 1627 169 1161 1085 1253 442 1253 256 256 442 611 619 1823 619 611 1823 1876 1880 41 1880 41 1876 1824 1859 173 1610 173 1609 1863 1633 1818 1633 1818 1863 1881 1812 19 1881 1723 685 1844 1723 1825 1864 179 1882 1882 1883 179 1883 474 548 533 548 464 1658 464 1656 61 1884 1884 1813 218 1885 1886 218 1885 1886 642 1887 1314 1887 124 770 124 1632 1056 1819 1131 1819 1355 745 1355 746 15 294 141 1667 1371 69 69 1510 61 1888 1888 1821 1889 41 1890 41 1890 1889 1891 1487 1600 1891 1836 1878 309 1338 1472 1338 1439 1464 1892 1757 1757 1893 1892 1893 766 738 767 738 1894 1824 19 1894 1210 1895 1896 1895 1210 1896 1841 1881 1108 653 1108 1575 61 1897 1897 1825 248 759 248 1898 759 1898 1882 1830 1883 1830 105 675 1845 1884 54 166 54 165 1899 1900 1900 41 1899 41 758 1612 1612 948 758 948 1731 822 1816 579 1816 356 150 810 150 1901 1901 810 1828 1512 1828 1902 1512 1902 574 1903 1617 1903 1328 1851 1329 1851 1870 522 1852 1090 381 367 890 367 381 890 1243 334 334 1904 1243 1904 1430 528 1905 1587 41 1587 41 1905 930 187 1396 187 1396 930 249 1547 249 1548 1906 1907 1316 1906 1316 1907 1854 1888 1908 1836 19 1908 1472 310 1909 1757 1909 1892 1910 41 1703 41 1703 1910 331 641 641 333 1911 1912 1140 1912 1911 1140 1558 68 1859 1894 832 1129 41 1129 41 832 61 1913 1913 1841 464 1909 1656 1909 205 175 205 174 1468 2 179 1830 1864 1897 645 271 645 775 1551 1914 1914 1915 1551 1915 1916 1845 19 1916 1731 61 17 1917 18 1917 1009 1918 1919 1918 1009 1919 1920 352 1920 1211 1902 1493 1903 575 1921 1922 1923 1922 1921 1923 528 1279 528 1278 174 1526 1526 1924 174 1924 1104 1120 823 1120 61 776 776 888 61 888 597 809 865 809 1925 1644 1642 1925 973 966 966 230 973 230 1138 528 1926 1854 19 1926 1622 1927 15 1927 1878 1908 310 1928 1472 1928 1910 272 433 585 15 585 333 1775 332 1775 1929 1930 1931 1930 1931 1929 61 1932 1932 1859 16 816 816 17 1873 1552 1620 1873 1552 1620 1896 352 1786 1933 1786 353 1933 353 1881 1913 1934 1274 1934 1801 1801 1274 822 1230 205 1181 205 1002 1935 1864 19 1935 1551 1268 1268 1914 1884 1916 1936 1320 1937 1936 1320 1937 99 1852 1815 579 1634 1938 1635 1938 1512 177 1828 177 1557 1922 451 1557 451 1922 928 1939 602 1939 800 1940 41 1940 41 800 1941 41 1941 1490 61 673 693 294 885 294 1014 33 1014 32 1396 959 1396 1942 1942 959 1888 1926 1542 217 61 1943 1943 1878 1944 1945 1359 1945 1944 1359 1711 1925 1946 1711 1925 1946 1839 396 1076 292 1894 1932 15 109 15 1806 1892 464 1882 1676 1676 1947 1882 1947 179 1087 179 968 1948 1881 19 1948 822 1183 1103 843 1145 843 1897 1935 61 1949 1949 1884 1868 99 99 676 1950 1390 1950 1009 1390 1009 1939 1075 5 1951 1952 1951 5 1952 974 1285 2 1953 1954 1953 2 1954 604 1188 604 1955 1955 1188 61 1956 1956 1957 61 1957 1085 1603 802 1603 1085 802 61 1958 1958 1888 2 881 1959 881 2 1959 179 1218 1908 1943 786 1194 786 1193 1349 750 1349 751 695 548 696 548 1960 1552 1553 1960 1931 962 1931 81 81 962 1203 1741 1741 1202 560 1961 512 1961 1962 41 1963 41 1963 1962 1964 1894 19 1964 730 1965 1965 1966 730 1966 54 887 54 1772 1159 1882 1159 1676 1599 1350 1392 765 1009 765 54 1001 54 827 1913 1948 1967 139 139 1666 1666 1967 61 1968 1968 1897 1386 1636 1916 1949 899 1363 1957 1969 1957 9 9 1969 22 1085 1114 1970 1970 1971 1114 1971 1514 1972 1972 1973 1514 1973 532 732 1974 802 803 1974 897 1975 1975 896 746 1356 1976 370 15 1976 15 370 1977 1083 1978 1083 1977 1978 693 1979 1979 294 1844 1519 1085 1602 1926 1958 1492 1980 41 1980 1981 1908 19 1981 879 1193 300 1909 300 1892 93 750 763 1458 763 1568 73 1982 1388 1982 73 1388 1983 1625 318 1983 1625 318 1624 2 1348 2 1839 177 971 177 1680 1774 15 1680 15 1774 1932 1964 25 1963 839 1963 1882 1984 1159 1984 1985 92 1985 1986 92 1986 54 1192 1987 1192 54 1987 61 1988 1988 1913 1989 1328 1989 1990 1990 1328 1935 1968 1991 1916 19 1991 5 1992 5 1993 1992 1993 573 533 573 1994 1994 533 1995 1767 1995 151 151 1767 1243 1721 1243 1722 27 41 1996 41 1996 27 802 1997 1997 1974 1998 1999 41 1999 41 1998 1745 472 1427 472 1158 652 1688 652 164 510 164 509 2000 1926 19 2000 158 1071 158 1073 1 5 2001 1 5 2001 1943 1981 1909 1657 1892 1657 54 1823 54 1045 177 279 177 564 279 564 544 1942 415 1942 1922 1558 874 497 455 2002 1307 2002 61 2003 2003 1932 5 1941 2004 1941 5 2004 2005 933 933 2006 2006 2005 1636 842 1948 1988 2007 1935 19 2007 2008 8 2008 431 1949 1991 974 286 179 1707 1707 774 1995 41 1995 1766 1608 519 2009 2010 2009 858 858 2010 5 655 1993 655 1158 1675 1688 1675 1657 1809 15 1657 15 1809 1987 344 829 1987 1138 1393 219 1692 1808 1692 219 1808 930 959 1958 2000 775 1088 1911 840 1140 840 638 526 526 636 54 1295 347 1922 1923 347 242 1458 61 2011 2011 1943 41 1891 1847 492 2012 492 1847 2012 882 2013 2013 2014 882 2014 1964 2003 2015 1525 15 2015 15 1525 2016 1753 1288 2016 2017 1948 19 2017 1968 2007 61 2018 2018 1949 456 1310 455 1310 41 1822 610 1709 179 1709 1039 2019 1038 2019 289 2020 1430 2020 1731 989 1731 1950 1950 989 2021 771 1898 771 1898 2021 1814 2022 41 2022 41 1814 2023 1245 1245 2024 2023 2024 61 2025 2025 1958 1483 2026 2026 59 1483 59 164 985 164 2027 2027 985 746 1111 714 1479 714 834 1981 2011 1855 1561 1561 2028 2028 1855 1929 962 602 2029 2029 816 1715 751 1715 1349 670 598 2030 1710 41 2030 2031 1964 19 2031 1557 216 451 216 1514 2032 2033 2032 1514 2033 1988 2017 487 1368 1367 487 1138 1394 1394 1583 61 2034 2034 1968 1610 206 365 1114 34 442 442 2035 34 2035 1991 2018 2036 907 516 907 2036 516 2037 1876 1880 2037 793 1213 2038 1213 2038 793 1411 567 129 846 64 968 64 825 93 2023 692 1979 523 251 2039 251 523 2039 332 917 332 915 2000 2025 2023 750 2023 755 755 750 1447 2026 54 1156 54 723 1313 41 2040 41 2040 1313 2041 1981 19 2041 714 1817 122 399 2005 2042 2042 397 2005 397 816 2043 2043 1917 816 1917 1001 344 1911 841 2003 2031 1316 614 1316 724 2044 1278 528 2044 1215 417 1215 569 61 2045 2045 1988 1367 2046 1369 2046 2007 2034 1326 1229 1326 450 300 1506 300 1541 1076 1163 1076 783 2047 1991 19 2047 922 1121 2048 399 121 2048 399 121 1326 706 1325 706 825 66 15 1600 15 1601 2049 373 2050 373 2049 2050 243 2051 1699 2051 525 566 2052 109 1805 2052 2053 2000 19 2053 2054 2055 41 2055 41 2054 2011 2041 15 1078 2005 2056 2056 2042 816 288 773 16 16 1508 507 419 1127 419 1013 1858 1013 1779 1779 1858 61 2057 2057 2003 2058 851 849 2058 1214 417 975 1382 2017 2045 173 207 173 206 2059 2007 19 2059 222 918 1188 918 1137 450 2018 2047 843 1338 1339 843 974 620 1227 620 1934 373 373 1833 1934 1833 1990 204 204 2060 1990 2060 2061 1568 2062 1568 2061 2062 521 2063 1198 2063 2049 279 2050 279 678 5 251 1870 2039 1870 2025 2053 276 1782 41 276 264 1625 1591 264 131 2064 41 2064 61 2065 2065 2011 2066 41 2067 41 2067 2066 1524 483 1524 484 1001 912 912 1398 1073 2068 1933 1073 1933 2068 2031 2057 667 1072 674 889 788 674 2069 2070 2069 920 920 2070 2071 2017 19 2071 2072 41 2072 1996 1114 1851 365 1851 2034 2059 915 1080 1080 2073 915 2073 1121 1209 61 2074 2074 2018 1252 1898 2021 1252 1792 1699 1792 2051 1056 625 1056 1206 625 1206 54 2075 54 2076 2076 2075 1203 1906 179 825 722 2077 15 722 15 2077 1209 383 243 73 560 73 2049 1833 1692 1809 1627 1110 1110 2078 1627 2078 139 252 139 251 61 2079 2079 2025 1927 1980 1980 1622 2041 2065 1915 2080 15 1915 15 2080 931 2081 1239 2081 207 1269 1269 2082 207 2082 2083 2031 19 2083 790 1814 1818 1027 2045 2071 186 722 15 186 1723 1519 1268 1197 2021 1449 1714 1449 2021 1714 61 2084 2084 2034 2047 2074 1776 2085 1358 1776 2085 1358 99 2086 2086 2087 99 2087 837 2088 2089 2088 837 2089 1327 718 1329 718 2090 852 852 842 2090 842 54 615 15 664 1365 1274 1365 1934 363 2091 2092 363 2092 2091 2053 2079 1483 1762 1447 1762 1993 41 1992 41 2 2093 622 2093 2 622 2094 2041 19 2094 755 2024 2024 2095 755 2095 775 618 774 618 1499 2096 15 1499 15 2096 2057 2083 1772 2097 2097 1773 1297 1485 1549 1829 1508 1829 2098 1249 31 1249 31 2098 61 2099 2099 2045 2059 2084 1417 1208 1417 1209 2100 2047 19 2100 15 1860 15 1861 1199 61 1199 2101 61 2101 306 621 306 148 1046 912 2090 286 988 286 988 2090 54 1588 985 1588 54 985 1269 2102 1271 2102 334 1425 1904 1425 2086 234 1319 2086 2052 947 1805 947 1788 254 1787 254 54 251 82 1559 82 222 467 1901 2103 2053 19 2103 539 2104 288 2104 2065 2094 1639 2105 2105 2106 2106 1639 61 2107 2107 2057 826 450 2108 946 947 2108 2109 2110 590 2110 590 2109 1220 25 1221 25 2062 85 1568 85 1262 1569 1263 1569 365 1970 2071 2099 704 1022 704 1023 2111 2059 19 2111 2112 765 2112 737 516 1571 191 1571 1205 1281 1205 1489 2074 2100 2113 41 2113 1373 1203 2114 2114 612 1203 612 306 1514 306 2033 179 1340 179 1652 323 345 1627 2115 2115 1793 1627 1793 1349 1895 1895 1245 89 2116 2116 1577 2079 2103 1445 404 404 1444 1871 297 1270 297 1085 2117 1602 2117 2118 2116 2118 1368 1368 2116 61 2119 2119 2065 813 1555 2120 1555 813 2120 817 2043 2083 2107 2009 2077 2121 2077 2121 2009 73 1802 73 1803 1472 118 118 1338 193 905 2122 2071 19 2122 1686 136 137 1686 2084 2111 1417 1121 61 2123 2123 2074 1227 222 1713 1797 1797 1249 1713 1249 54 185 108 2108 108 946 1243 10 525 1646 525 1645 1262 2124 1720 2124 1627 2098 2098 1713 1627 1713 838 2089 1160 392 181 1160 2125 41 153 2125 1692 1834 1808 1834 1906 614 1793 321 1792 321 360 2126 360 2127 2126 2127 61 2128 2128 2079 972 177 972 1839 2129 450 2130 450 2130 2129 2102 2032 2032 2131 2102 2131 307 1973 1973 1502 307 1502 2132 298 2132 296 54 925 2094 2119 2133 41 2118 41 2118 2133 1763 1912 1912 2134 1763 2134 2135 2083 19 2135 2136 800 1940 2136 2092 1851 1850 2092 2099 2122 15 1375 15 1672 1772 1441 2097 1441 824 1208 61 2137 2137 2084 978 2114 978 612 1088 2056 1340 2056 979 2138 1779 2138 573 1495 2100 2123 507 210 2016 286 2098 772 1243 2139 2139 10 467 1334 884 2140 2140 2141 884 2141 1830 2142 179 2142 2069 41 2069 846 2143 1755 1755 2144 2144 2143 1217 439 1174 439 1793 1699 1604 2028 1604 1561 15 2019 1085 482 1085 401 2103 2128 41 1455 2133 2116 2145 2094 19 2145 352 1811 352 1810 193 279 338 279 2146 41 2147 41 2147 2146 2107 2135 1586 1877 15 1586 15 1877 1145 222 2127 1479 61 2148 2148 2099 1772 1410 2111 2137 164 1396 164 544 1652 2056 1422 2149 246 2149 573 72 2150 2100 19 2150 543 2151 2151 542 333 1713 333 1714 555 1303 554 1303 2078 683 1627 683 1883 1947 838 2 837 2 1848 1318 1318 996 828 1193 829 1193 1724 1519 2152 2103 19 2152 652 2153 15 652 15 2153 158 2154 158 600 600 2154 1522 956 956 1521 2119 2145 475 2155 2155 704 475 704 882 2156 2156 2013 191 564 61 2157 2157 2107 41 595 41 1607 1785 2158 1130 2158 1785 1130 1969 61 2159 2160 2160 2161 2159 2161 2122 2148 2 2162 2163 2162 2 2163 2164 2116 2164 1368 1430 450 887 1410 886 1410 2165 2111 19 2165 2123 2150 2166 1930 2166 2121 2121 1930 1222 394 1548 2124 2124 1569 1518 2167 1844 2167 1743 41 880 1743 1085 1745 918 2168 2168 1188 82 1560 2128 2152 759 1014 41 1172 41 1173 61 2169 2169 2119 476 2155 2135 2157 1266 1369 15 1642 15 1643 2170 795 2170 769 769 795 253 429 488 118 905 564 2171 2122 19 2171 341 1770 54 1978 54 1977 1665 2172 251 2172 34 1033 34 286 2137 2165 837 1028 1029 837 819 1022 819 1625 1022 1625 2173 41 670 2173 2159 282 173 2159 61 2174 2174 2123 194 1188 54 2027 1674 1723 1724 1674 1085 431 1085 2008 760 361 61 2175 2175 2128 564 2176 565 2176 1117 1945 1116 1945 1266 793 1266 2038 15 1975 1269 1346 1269 2177 1346 2177 2145 2169 164 1429 164 929 929 1429 2178 2179 2180 2178 2179 2180 2181 2135 19 2181 1107 795 2182 52 53 2182 2170 41 2170 1107 1425 779 779 1424 1051 1681 2148 2171 15 497 15 498 1330 564 1134 361 2183 1134 2183 361 61 2184 2184 2137 2185 1625 1468 1625 1468 2185 2173 598 173 1181 1307 1310 2150 2174 1206 627 627 1350 1206 1350 2139 12 1923 2130 2130 347 1929 2186 962 2186 1850 2091 980 1749 1749 1858 2152 2175 2187 577 578 2187 2006 179 179 2056 2056 2006 2188 2145 19 2188 790 2189 15 2189 2157 2181 15 1306 2190 330 2191 2190 330 2191 61 2192 2192 2148 1820 2193 1819 2193 1293 367 2165 2184 1779 1826 1826 2138 2194 2150 19 2194 2195 1746 15 2195 15 1746 2033 1972 1921 528 1923 528 1085 366 1439 237 237 2196 1439 2196 191 35 1495 71 1312 41 2197 948 758 2197 2198 978 978 1056 2198 1056 1929 2199 2199 1930 1978 1780 2200 2152 19 2200 891 1983 233 1983 714 916 916 1817 2176 918 918 61 2176 61 2169 2188 602 18 602 17 2201 2202 1655 2202 2201 1655 61 164 164 2157 1987 1193 1303 1253 1303 1753 2171 2192 633 583 41 583 41 633 2193 2203 1819 2203 54 456 54 1515 456 1515 2204 2165 19 2204 923 613 2174 2194 2205 2206 41 2206 41 2205 505 1296 1296 380 124 2164 1577 2164 1438 237 2207 265 1383 2207 2112 820 820 737 2120 1173 2166 1419 2199 2166 2199 1419 802 1219 1219 1997 1170 806 562 1308 2208 1749 1749 1242 1242 2208 2130 528 2175 2200 937 2209 2209 1566 61 2210 2210 2169 1682 1051 475 548 476 548 2181 164 2022 1998 116 854 2211 2171 19 2211 2212 1435 2212 1054 2184 2204 1013 1826 61 2213 2213 2174 354 1121 1121 1554 1266 2164 2164 1369 139 1665 1665 2214 139 2214 1439 212 1438 212 2215 313 1180 2215 313 1180 2216 2198 2198 61 2216 61 788 1066 697 1066 15 534 15 535 1624 704 1801 1833 1801 1835 2176 632 1481 1009 61 2217 2217 2175 2151 267 2218 2151 267 2218 830 471 1243 1423 1423 1405 2219 2220 2221 2219 2220 2221 2188 2210 352 1477 352 1478 1304 554 41 1885 139 2181 19 139 1372 69 219 1541 2222 1541 219 2222 2 2223 2224 2223 2 2224 1669 193 312 1669 1192 344 1192 2149 2149 344 2192 2211 2225 1946 1711 2225 231 989 61 2226 2226 2184 441 222 441 256 2194 2213 41 1644 41 1925 191 719 92 533 92 475 2227 41 2227 2228 2228 41 523 250 139 250 2036 1345 1331 571 773 602 602 1508 169 2229 2229 85 169 85 2185 1028 837 2185 2200 2217 5 2230 2231 2230 5 2231 64 934 2232 2233 2233 945 2232 945 352 2234 2235 2234 352 2235 1001 345 54 2236 1978 2236 2237 2188 19 2237 593 940 940 592 2016 1303 1060 2238 2238 1168 164 139 49 1955 212 11 1670 312 174 484 61 2239 2239 2192 1059 740 139 311 1485 2008 1485 2240 2240 2008 1026 1595 1816 1026 408 605 408 2241 605 2241 2204 2226 1506 2242 2242 1592 2243 2194 19 2243 1975 2244 15 2244 1571 312 1989 204 573 1903 139 2245 2245 1666 1627 1792 1792 320 1627 320 2246 1080 2246 1081 2247 205 205 332 2247 332 25 2248 2249 2248 25 2249 1406 1425 1406 1423 1879 2229 2250 2200 19 2250 2056 933 2210 2237 352 153 352 154 2164 2046 2046 90 2164 90 661 844 1461 661 2211 2239 139 2075 2075 2251 139 2251 22 594 22 506 1090 1383 1090 2207 2252 2204 19 2252 2183 2015 2183 1525 720 2253 721 2253 2213 2243 2254 1832 15 2254 15 1832 892 1705 1275 2255 2255 871 1275 871 915 1092 2036 279 1016 2187 15 1016 15 2187 2256 467 2257 467 2256 2257 1715 2258 1717 2258 1668 41 54 2259 1515 2259 1326 1471 2217 2250 2260 481 747 2260 1304 2016 1909 1756 2130 2261 2129 2261 374 1301 61 2262 2262 2210 1954 41 1953 41 542 2218 407 680 2263 680 407 2263 2264 2211 19 2264 1974 1085 2226 2252 61 2265 2265 2213 1617 549 549 1616 41 896 41 895 641 1110 641 2078 1195 2255 54 316 1527 2233 1840 1874 128 1874 2266 513 2267 513 2266 2267 661 6 1020 952 2013 1226 2156 1226 61 2268 2268 2217 5 1637 1255 1637 1206 1599 30 1718 15 1718 2237 2262 1100 2205 2205 1099 1726 419 419 173 1726 173 908 41 300 139 19 300 653 2153 1576 2153 704 1842 704 1843 2140 1481 2239 2264 777 1221 2189 2022 1998 2189 2077 1930 49 127 866 514 61 2269 2269 2226 1531 1846 1531 439 2243 2265 53 1144 1142 53 967 1398 967 912 2270 2271 2272 2271 2272 2270 2247 1609 215 2273 2273 159 159 215 1406 2139 2274 2139 1406 2274 1609 915 1609 2073 1869 1788 2275 1788 1869 2275 1275 1031 1195 1031 2276 41 1293 2276 1000 1469 1469 1695 219 1850 1541 1850 2250 2268 1297 505 1250 168 15 168 1828 1694 1694 2277 1828 2277 1764 2134 2134 2012 1764 2012 2278 2237 19 2278 2039 250 191 2176 2279 871 872 2279 173 833 173 869 1422 2280 1194 2280 2281 2282 15 2281 15 2282 1485 1603 1485 802 1481 1919 2283 1481 1919 2283 61 2284 2284 2239 2285 2286 2286 151 2285 151 2 1900 2 1899 1266 768 1820 1467 1819 1467 2252 2269 2287 2243 19 2287 1406 84 1406 169 15 1015 1304 286 15 1914 1715 2288 2288 1716 22 1296 54 2212 975 2212 610 981 1709 981 2081 1226 2013 2081 2289 2250 19 2289 1269 296 296 1270 156 32 157 32 2232 1806 2290 1806 2290 2232 2262 2278 837 1625 1029 1625 1713 331 352 2291 2234 2291 2264 2284 15 831 2216 978 514 1771 2292 2252 19 2292 139 1232 139 1117 720 1614 2265 2287 1582 690 690 1581 891 837 837 264 460 1120 459 1120 2256 2293 2293 525 2256 525 219 1006 495 1006 1869 25 1786 25 2276 367 2294 159 215 2294 1918 2283 653 1902 653 1493 1694 1724 1898 1449 2268 2289 1946 1642 2295 972 2295 1839 759 771 685 177 177 2296 2296 685 1959 41 61 2297 2297 2262 2298 41 2299 41 2299 2298 2185 343 1468 343 1838 1860 1860 914 914 1838 1951 41 1952 41 300 1990 1990 742 300 742 2300 2264 19 2300 2218 395 15 2218 15 395 1141 1849 1815 1154 1154 579 2121 1419 525 1236 1236 1334 1064 189 2269 2292 189 2160 188 2160 689 165 1722 2274 61 2301 2301 2265 1627 31 1796 1976 15 1796 16 1075 16 817 1455 1548 2302 205 207 2302 915 2247 1092 2247 34 631 1571 193 1570 193 2303 41 2304 41 2304 2303 320 1879 320 2229 934 1662 15 934 15 1662 248 1875 1875 2305 248 2305 61 2306 2306 2268 1898 25 2021 25 2121 858 2278 2297 778 471 2064 1794 41 1794 2271 1051 1682 2271 179 300 19 179 751 501 15 501 300 1989 300 1327 1327 1989 2284 2300 1152 1815 713 2127 713 1479 2027 987 2027 1277 1277 987 1571 1834 2307 1834 1571 2307 1700 491 61 2308 2308 2269 2253 1496 2287 2301 2309 121 2048 2309 1624 1022 355 1119 354 1119 1326 289 1923 450 1921 450 1670 193 196 635 196 177 92 1488 92 866 2310 2311 2312 2310 2311 2312 1581 804 1580 804 34 2176 2313 377 377 158 2313 158 2289 2306 139 108 108 562 711 1031 1497 1339 311 1497 2 2314 2315 2314 2 2315 2316 2278 19 2316 2317 1400 73 2317 347 1938 1938 1732 645 300 1879 168 61 2318 2318 2284 1406 334 1406 10 758 2319 2319 2320 758 2320 1834 1572 2292 2308 446 25 1700 25 2321 2287 19 2321 54 2232 2259 2232 1374 1952 378 1119 1200 1542 1267 1569 1267 1263 357 219 358 219 1546 2186 2186 1419 2037 2322 2322 1880 2029 2323 2323 2020 2029 2020 2206 1100 1286 912 1709 398 2013 428 2156 428 127 1403 1403 2061 127 2061 2324 2289 19 2324 1684 2032 2033 1684 246 2280 124 209 2251 2325 139 2325 2297 2316 25 1996 1229 528 706 528 526 637 526 2326 637 2326 328 2271 2300 2318 980 1748 980 1747 2080 2046 15 2046 300 2242 2242 1850 300 1850 2197 2319 985 186 2027 186 2327 2292 19 2327 307 1871 2131 1871 307 2131 1518 863 2167 863 92 1715 92 2288 2301 2321 34 1559 999 1853 444 1853 999 444 1203 1740 1203 1742 337 1007 517 1007 239 664 166 664 5 2328 469 2328 2329 2330 2331 2329 2330 2331 525 1901 1901 808 2306 2324 926 25 2106 2178 2178 2105 1266 209 61 2332 2332 2297 706 2333 1229 2333 2334 1796 15 2334 1398 828 2335 2300 19 2335 2247 173 979 1748 2161 1647 15 2161 15 1647 300 1415 300 371 54 1805 54 108 1805 108 2308 2327 548 749 2061 2336 1403 2336 1518 177 1844 177 360 2337 2337 2126 50 2338 2338 51 61 2339 2339 2301 378 25 1576 1902 2183 760 648 2183 760 648 446 2313 2172 522 251 522 411 351 528 1241 1068 1241 19 2330 2340 2330 19 2340 766 304 304 738 1546 961 961 222 61 2341 2341 2306 1877 2037 15 2037 5 2342 2343 2342 5 2343 2316 2332 706 2344 2333 2344 2345 2054 992 2345 2054 992 602 179 19 602 2346 412 2 2346 332 1448 1448 649 332 649 2318 2335 1187 467 467 124 34 1097 1097 974 34 974 1783 291 1783 2347 2347 291 61 2348 2348 2308 2349 2091 1507 2091 2349 1507 2350 564 1330 2350 2214 2172 92 712 1123 712 92 1123 1485 1602 2321 2339 2351 2143 2143 1283 1283 2351 1740 2352 1164 2352 1164 1740 19 2353 2354 2353 19 2354 2042 2355 2042 1341 2355 1341 1218 1176 70 1122 1123 70 2197 1319 1319 2319 2356 1502 2356 1039 1215 460 1366 460 2357 795 793 2357 964 1604 964 1234 2331 2340 1977 1774 1978 1774 467 1236 429 1436 2324 2341 1906 2114 978 1906 2191 328 1684 1972 15 2273 2358 2316 19 2358 90 1577 363 1114 1114 2092 129 2069 1128 2309 15 1128 15 2309 1659 552 54 1472 54 1497 517 1289 518 1289 61 2359 2359 2318 2360 2219 848 2360 2219 848 308 1973 2327 2348 1634 1167 2361 1111 1356 1111 2361 1356 2362 2321 19 2362 2363 2354 2353 2363 2076 2251 2356 2364 2364 1502 1432 69 1432 68 2365 1735 2365 1734 1080 545 1080 1761 545 1761 61 2366 2366 2331 61 2331 1978 1680 2367 695 2367 1618 1618 695 2368 2324 19 2368 129 46 46 944 2272 330 2190 2272 774 466 774 981 2332 2358 596 2369 520 596 2369 520 279 222 279 2176 222 2176 1594 1026 1152 1026 1672 1443 15 1443 1134 2015 2335 2359 1085 2370 1855 2370 1085 1855 1485 2117 164 2371 2371 925 164 925 2372 2327 19 2372 1330 685 1330 2296 2367 705 694 2367 694 705 2339 2362 481 194 635 481 490 1928 1698 1928 1698 490 2352 613 869 916 928 2043 61 2373 2373 2363 61 2363 1463 2115 1123 72 28 336 176 1086 178 1086 1632 795 2357 1632 1656 1756 2374 541 15 2374 15 541 1243 744 744 2375 1243 2375 2208 1747 1747 1242 2340 2366 2341 2368 2376 41 2376 1478 1019 952 775 2056 61 2377 2377 2332 1269 2378 2177 2378 2256 49 1955 2256 884 2283 649 736 2379 2335 19 2379 1385 291 2348 2372 2325 2076 61 2380 2380 2339 1535 1890 1740 226 2354 2373 2381 194 481 2381 2236 1680 2190 2271 1188 603 15 1274 686 391 392 686 1502 1070 2382 2340 19 2382 61 2383 2383 2341 1072 2068 2068 202 645 179 300 2092 1664 214 214 1663 701 1135 1135 702 139 1116 1116 1307 2358 2377 1184 963 1592 1979 15 1592 15 1979 573 602 19 573 990 2320 756 2320 411 41 412 41 1138 450 1485 401 2117 401 2359 2379 18 708 1659 708 1659 18 248 156 248 158 301 2384 2384 2385 301 2385 61 2386 2386 2348 2362 2380 2294 214 1062 724 1205 724 2387 2354 19 2387 978 1316 1243 1357 1243 1355 139 1295 2236 1780 1920 2271 2267 2271 2267 1920 2302 173 307 2364 2364 1871 1063 2356 1063 2364 2366 2382 2368 2383 240 1222 1861 2388 2388 1095 1095 1861 2389 2358 19 2389 1695 460 1215 1695 1195 2279 2279 2255 2277 1724 2141 38 15 2141 15 38 1049 2296 525 150 490 117 61 2390 2390 2359 18 2333 1659 2333 2391 2392 2392 2393 2393 2391 139 2232 2232 1805 139 1805 969 1633 573 70 2191 352 1266 2357 2372 2386 2394 2362 19 2394 2373 2387 1203 1164 2395 127 1404 2395 127 1404 339 1008 1008 709 2356 1871 1945 2002 1116 2002 183 1866 1855 1604 219 1365 219 371 1497 843 2176 286 1983 626 2396 626 1983 2396 61 2397 2397 2366 2398 2368 19 2398 115 2196 2196 114 254 2283 1788 2283 1944 222 1944 1701 645 219 2377 2389 1485 482 914 1862 711 2279 1832 534 25 73 73 1963 332 736 314 949 1855 1997 1997 1561 2379 2390 2399 945 2399 1517 2400 2372 19 2400 66 784 784 65 2380 2394 61 2401 2401 2373 139 1497 1497 2075 978 1280 2187 2281 337 1008 875 1846 876 1846 639 853 640 853 1670 1570 649 1525 1448 1525 1666 2172 2245 2172 49 2293 2176 631 2382 2397 821 304 716 1130 2383 2398 760 701 1828 685 2402 1269 2246 2402 1269 2246 1621 710 347 2261 61 2403 2403 2377 662 557 661 557 456 2404 2404 1516 456 1516 2328 41 2328 342 1525 1797 15 1797 1437 562 1437 563 92 1421 92 1420 2405 2379 19 2405 848 2221 15 2221 1568 73 1458 73 301 538 1149 538 2386 2400 306 210 92 704 92 749 61 2406 2406 2380 2387 2401 178 864 2375 2407 2375 1721 1721 2407 2364 1070 137 1831 41 1831 371 220 371 906 2307 193 1106 2124 2124 1455 1903 549 2408 1520 15 2408 15 1520 2369 531 976 2369 531 976 2409 2382 19 2409 1485 1745 482 1745 61 2410 2410 2383 41 283 41 29 2285 41 2285 1995 2129 528 2389 2403 101 661 455 2404 557 1747 557 1539 388 1983 99 573 19 99 1862 1095 41 1862 1136 1326 2385 2411 2411 2384 2390 2405 688 2241 688 605 562 946 61 2412 2412 2386 210 1483 306 1483 139 2076 2076 1295 2394 2406 180 466 2413 2387 19 2413 2258 1895 1715 1895 2216 989 2198 989 515 1336 515 1231 162 999 999 222 876 1531 2414 2167 1844 2414 2415 1782 2415 276 66 934 1955 61 337 279 339 279 876 497 794 2124 332 833 833 917 739 2026 15 739 15 2026 2365 685 1512 685 1512 2365 1983 627 2397 2409 2398 2410 456 1116 456 1307 573 1717 573 1715 45 2196 45 237 2416 2389 19 2416 1847 1184 1564 2209 1566 1564 1050 1657 2417 2418 41 2418 41 2417 1149 2384 61 2419 2419 2390 473 2420 7 2420 2400 2412 2191 2271 1801 1808 300 1808 2421 2394 19 2421 219 1658 2401 2413 1568 2229 1304 617 554 617 2 2304 2422 2304 2 2422 966 1398 1485 1427 1057 2320 2320 2193 1057 2193 1571 279 2307 279 1032 222 1101 222 1030 202 816 2423 17 2423 1248 1619 15 1248 61 2424 2424 2397 2425 2398 19 2425 983 171 573 2023 1243 1750 2403 2416 2426 1986 61 1986 2426 61 196 279 195 279 2405 2419 188 282 281 188 179 932 179 1088 2427 2400 19 2427 2428 1516 2428 1517 2266 514 34 230 34 973 61 2168 2168 603 2406 2421 413 1853 1989 742 505 1485 300 220 300 906 61 2429 2429 2401 1684 112 1504 112 1322 789 1485 1426 1702 796 759 25 2409 2424 1983 2 2396 2 2410 2425 984 854 1243 2208 2208 1750 1431 703 703 1762 552 2333 61 2430 2430 2403 5 1770 57 855 855 819 57 819 882 427 427 2156 2431 2405 19 2431 263 279 2349 279 2349 263 139 1698 139 490 1808 1365 1808 1934 2412 2427 16 1549 1470 1549 1985 1544 1985 61 2266 352 2267 352 1155 36 61 2432 2432 2406 925 2077 925 722 2367 715 2413 2429 642 2337 643 2337 2019 2110 15 2110 2433 202 1030 2433 1464 211 1602 403 1602 1219 15 1322 54 562 573 1349 2353 2409 61 2434 2434 2410 41 2151 41 543 1513 1494 2416 2430 160 1936 41 1936 1554 2081 2242 1507 1507 2435 2242 2435 19 1203 326 1328 15 326 15 1328 2436 2044 528 2436 179 876 179 1531 2419 2431 389 41 164 1232 61 2437 2437 2412 906 1415 2421 2432 2438 2413 19 2438 1863 1615 1420 549 549 1031 2096 2439 2439 781 781 2096 756 1590 756 1612 2078 1249 2078 1250 15 1838 1969 1293 1969 2276 520 976 388 2396 128 2101 128 671 2101 671 2056 2440 2440 2042 2424 2353 643 362 1133 643 1133 362 2425 2434 997 1318 1377 260 2 1377 2441 2416 19 2441 573 1617 1778 2334 61 2442 2442 2419 139 171 139 1191 918 603 2427 2437 1571 1670 2443 2421 19 2443 1113 219 219 1329 2429 2438 2423 2344 2344 2323 2423 2323 1515 1310 2259 1310 850 1498 15 850 15 1498 92 867 1082 867 92 1082 757 2320 2029 1917 1702 1776 1161 1188 942 41 129 2444 2444 2069 2445 1115 1115 495 495 2445 2363 2424 2446 2425 19 2446 2105 2180 45 73 2430 2441 73 2447 2448 2447 73 2448 2028 1485 1485 1139 2028 1139 573 475 573 476 1412 2231 73 1798 73 1799 2431 2442 1100 1299 54 2371 2449 2427 19 2449 2432 2443 1286 1046 1285 1046 124 2357 61 2450 2450 2429 1617 1420 1420 2451 1617 2451 1670 1756 1670 463 10 2452 2139 2452 2453 41 1399 2453 978 2208 736 761 2396 233 2396 235 300 693 300 692 597 1784 1784 809 1201 1886 15 1201 15 1886 1652 2440 271 644 1081 2454 2454 2032 1081 2032 2434 2446 580 1979 61 2455 2455 2430 409 1097 2206 1629 544 187 2295 971 971 2456 2456 2295 179 874 1927 1404 139 110 2346 41 935 725 2457 2431 19 2457 65 2355 64 2355 139 2052 2052 110 585 2458 2458 584 338 203 203 1689 2437 2449 61 2459 2459 2432 2050 1345 1123 672 672 872 1123 872 1455 249 2438 2450 963 1139 1139 383 587 1437 94 2023 358 164 1127 989 1127 1726 1726 989 867 422 1685 1782 972 687 61 2460 2460 2434 893 41 894 41 150 2286 1901 2286 2441 2455 573 1421 573 1420 1572 1756 2461 1756 1572 2461 263 719 2349 719 2076 2462 2462 1103 2076 1103 1477 154 835 1080 1080 360 19 1243 2399 2428 80 1441 1441 81 15 1997 15 1561 162 104 162 1853 2442 2457 1470 708 708 1829 1470 1829 512 73 61 2463 2463 2437 1666 1595 1595 2172 248 355 248 353 2443 2459 691 579 691 1154 1122 672 2222 1460 581 2222 581 1460 2464 2438 19 2464 1097 286 1098 286 17 2344 2291 41 2234 41 2298 75 73 2298 2446 2460 944 2444 2444 127 944 127 2465 1148 15 2465 1974 1485 1485 2370 2370 1974 2275 2283 2283 2433 2275 2433 110 2108 2061 2305 2305 2336 2466 2441 19 2466 1155 918 2325 2462 602 2423 2423 2029 92 1994 574 1994 5 2467 40 2467 1155 603 1085 2240 1426 2240 80 1409 1409 222 2468 2391 15 2468 15 2391 61 2469 2469 2442 2449 2463 61 846 61 845 1139 1534 1139 1532 2470 2443 19 2470 712 1275 1026 1815 71 1614 2450 2464 2044 481 2436 481 1763 1865 1865 1912 1464 2196 1994 548 1994 549 1663 2294 41 2294 41 1663 2471 2446 19 2471 2129 1923 1923 1432 2129 1432 2220 2472 41 2472 41 2220 2455 2466 481 666 2191 1706 2191 1496 1415 372 510 1381 2428 222 2399 222 1141 1912 1866 1912 1141 1866 2457 2469 15 1749 15 1858 1785 2203 1130 2203 1286 222 2473 2449 19 2473 1595 1967 1967 1594 2459 2470 1570 1756 179 1576 179 653 2426 92 61 2474 2474 2450 2423 1917 2002 2404 2104 2475 2475 539 58 1281 58 936 1994 1842 1632 1212 2357 1212 1167 2043 15 1167 15 2043 1525 648 2476 763 2361 2476 763 2361 821 669 1131 2203 694 715 2460 2471 15 1973 2028 1085 583 433 61 2477 2477 2455 1063 588 2076 1148 2325 1148 58 557 2273 2478 2478 160 160 2273 2479 1777 1777 130 130 2479 1645 1867 1645 1759 1759 1867 511 780 2452 780 511 2452 1154 2176 286 1154 2480 2457 19 2480 820 2481 2481 2482 820 2482 2463 2473 844 1540 844 1539 61 2483 2483 2459 1665 1318 251 1318 1531 1174 2464 2474 1048 231 793 1212 1754 69 1754 1510 1390 989 1126 989 1904 11 41 2178 41 2106 61 2484 2484 2460 2189 2374 54 290 2466 2477 419 2356 1040 2356 2008 2420 8 2420 1475 1585 15 1475 15 1585 2257 1187 2257 61 19 1627 41 1671 22 1077 22 273 2469 2480 15 112 51 2293 1180 2485 2485 313 61 2486 2486 2463 300 1302 300 1301 61 704 2426 704 2487 175 173 2487 1497 310 2470 2483 775 2142 775 496 496 2142 2488 2464 19 2488 1615 1336 1336 1598 209 1915 2086 235 1666 1729 2245 1729 2361 1568 2154 1786 1918 1436 1436 2140 1918 2140 1585 1905 1905 1475 2489 2202 2451 2202 2489 2451 145 436 436 146 125 1915 125 2080 1155 2338 235 626 2471 2484 54 2097 2490 2466 19 2490 1063 188 332 2183 332 1134 2491 1015 1015 2492 2492 2491 2493 840 15 2493 1903 2451 2451 2201 1903 2201 61 2494 2494 2469 575 2201 2473 2486 92 16 1985 16 1113 1850 2495 2470 19 2495 1432 448 448 68 2487 2082 2302 2487 2082 2302 2474 2488 774 396 396 687 191 263 191 2349 1450 1865 2086 2319 1918 255 712 1031 1123 1031 1420 2489 281 205 205 282 2496 905 2496 270 905 270 2497 2471 19 2497 1500 1807 41 1500 1492 868 2477 2490 1035 2493 1849 2493 1223 2205 765 2482 765 2481 2259 1517 2259 1527 1654 2127 511 73 2480 2494 977 531 2498 2473 19 2498 1461 557 2483 2495 2367 2499 1618 2499 61 2500 2500 2501 61 2501 61 2502 2502 2474 1852 1467 1852 1383 2361 2062 1707 396 2049 193 2307 2049 1056 1820 2 1535 2 1536 603 50 2365 2503 1735 2503 61 2276 2276 1956 1570 279 2444 41 56 2263 56 2504 2504 2263 2496 2350 2350 905 2484 2497 15 2439 1446 820 1446 2481 1616 573 1420 1616 2505 2182 15 2505 15 2182 61 2506 2506 2477 1105 1208 15 1208 2507 1638 1638 2417 2417 2507 1108 2153 269 2153 810 2508 15 810 15 2508 318 1350 1625 1350 124 1267 2509 2480 19 2509 2303 2067 239 620 2486 2498 61 2510 2510 2483 1741 2511 2511 227 1741 227 448 528 1432 528 2501 2512 2512 2500 2488 2502 811 1865 1056 715 1893 463 1297 1085 1224 1526 801 2136 15 2136 61 2513 2513 2484 1822 2048 41 2048 92 1275 2490 2506 139 2290 1454 910 1454 1767 2508 2514 15 2514 332 1627 19 332 2153 326 269 326 271 326 454 326 2494 2509 1653 2126 1653 2127 61 2515 2515 2486 2495 2510 1131 2516 2516 2517 1131 2517 1519 177 978 1165 923 1165 978 923 2050 193 19 2512 2518 2512 19 2518 2519 2488 19 2519 61 1910 1910 673 1671 1445 1443 1671 1969 2520 2520 61 447 1764 493 1764 447 493 2035 1945 2035 1516 1516 1945 1296 367 367 380 1229 1325 2281 578 83 2521 1162 2521 2497 2513 2350 177 2496 177 1574 1163 1574 2522 2522 1163 2282 2523 2523 2281 2524 2490 19 2524 55 2263 139 1515 139 2259 1982 41 1211 2272 1211 330 475 749 41 1144 1103 2525 2525 2462 1108 1735 269 1735 453 270 61 2526 2526 2494 584 349 349 2458 2498 2515 1519 864 2527 2495 19 2527 1130 2516 1049 289 289 1432 1049 1432 99 696 99 694 2500 2518 2502 2519 845 1363 1363 1199 1079 197 197 1078 1117 1311 1918 254 10 780 2230 2001 2528 2497 19 2528 37 668 2422 41 1961 1699 901 2360 41 2360 2506 2524 1125 2235 928 2104 2266 2271 2270 2266 2093 41 2222 692 2209 939 41 2209 2509 2526 2061 560 2061 45 1622 1492 2529 2498 19 2529 1280 1205 846 2070 2510 2527 1453 124 1734 177 1734 2496 54 413 1049 450 61 1703 61 2530 2530 2500 61 2531 2531 2502 649 761 1837 1363 447 25 1807 1499 2199 2186 164 1186 346 216 216 1167 2513 2528 2481 1762 2481 703 839 41 61 2532 2532 2506 56 291 55 291 1984 652 15 1984 1023 2271 2271 704 1829 466 15 1829 481 2533 2415 2533 481 2415 1688 2534 2534 1675 2535 2509 19 2535 41 2345 2536 1704 2536 2537 2537 1704 822 1417 822 384 1402 1566 2515 2529 61 2538 2538 2510 943 672 517 279 2518 2530 2519 2531 2087 1207 1207 2319 2087 2319 683 1249 2101 41 1830 1984 1883 1984 1649 2539 41 2539 41 1649 1486 989 1486 2540 2540 989 15 2352 1275 1421 964 1847 346 1922 61 2541 2541 2513 2315 41 1953 2315 2542 393 393 2543 2543 2542 2524 2532 19 205 2492 1017 41 1017 41 2492 2036 2049 2050 2036 99 1319 1737 2534 2020 288 2526 2535 1802 1799 2444 920 2224 41 2223 41 61 2544 2544 2515 223 90 2527 2538 565 1154 111 2454 547 2454 1035 1866 2545 2518 19 2545 2546 2519 19 2546 632 1055 2547 1055 632 2547 1035 1482 1482 2493 1156 1277 677 2030 73 2299 173 915 2528 2541 1747 792 2520 684 2548 2524 19 2548 1737 1494 1494 2534 1264 1505 1730 1375 1056 2197 1056 2086 2086 2197 2399 286 2090 2399 1737 652 61 2549 2549 2526 61 2536 2536 1703 15 2322 1880 1260 1260 2322 2529 2544 2550 2527 19 2550 1849 1866 1454 1306 1306 1453 2530 2545 2531 2546 676 2087 2087 626 2540 2216 1141 840 1149 2411 1266 505 91 505 1787 1225 775 1108 1920 2266 1021 894 2190 1496 2551 2528 19 2551 41 584 15 2225 15 1946 2087 1868 2532 2548 2004 41 2467 41 2467 2004 2049 1571 145 501 434 145 929 1774 419 590 419 588 54 1047 54 232 2535 2549 1172 276 205 1224 377 461 377 459 2552 2529 19 2552 289 2129 2129 287 2538 2550 565 279 1454 1332 1830 2414 1830 2167 61 2553 2553 2530 61 2554 2554 2531 631 1055 2101 1363 54 1931 2555 1931 54 2555 41 284 798 442 798 1381 442 1381 978 1740 978 1164 2541 2551 1601 1248 1246 1601 61 2556 2556 2532 836 705 2458 1730 61 2133 2133 2536 15 2542 816 2020 462 1657 464 1657 164 102 2557 2535 19 2557 1332 1453 2544 2552 742 2060 2060 1689 742 1689 2313 1000 2313 461 61 2558 2558 2538 303 669 2078 32 1883 2414 2545 2553 2546 2554 2266 2272 2008 2195 2240 2195 597 1646 528 2260 528 747 1044 538 73 2559 1982 2559 1843 2155 2075 843 843 2525 2075 2525 1254 415 1253 415 61 2560 2560 2541 2190 352 2370 1997 2548 2556 2428 286 1063 205 19 1063 248 2520 158 2520 41 1259 1063 1038 1063 1040 555 1253 34 1253 2549 2557 606 286 61 2561 2561 2544 573 423 2550 2558 1424 236 1423 236 2562 2545 19 2562 4 924 2563 2546 19 2563 1818 221 394 240 2476 2062 1632 769 847 901 2360 847 917 835 917 1080 2551 2560 2345 991 61 2118 1658 1809 1620 1960 15 1960 2564 2548 19 2564 2565 956 957 2565 1795 368 1976 1795 368 1976 15 2143 164 185 1666 1153 1153 1967 857 554 857 1304 61 2566 2566 2549 749 573 749 99 1758 2055 2055 1800 2552 2561 742 1328 2567 2550 19 2567 1019 1776 1019 2085 1049 1326 879 222 786 222 179 1043 1329 1114 1329 1971 2553 2562 2554 2563 1602 1581 2117 1581 1800 2054 22 105 1002 1573 857 2010 15 542 1524 1395 2568 2551 19 2568 54 689 857 222 518 2569 261 2569 820 306 1969 457 2520 457 2556 2564 2063 1102 521 1102 164 232 377 25 2313 25 486 286 2557 2566 15 2319 15 2320 2570 41 647 41 647 2570 2571 2552 19 2571 1057 265 2558 2567 1019 1352 775 968 2481 1447 61 2572 2572 2553 61 2573 2573 2554 1454 2514 2514 1306 978 1741 516 2049 41 593 1032 1848 1102 1848 61 1353 1353 2118 1456 1954 2 1456 1254 1942 2560 2568 2569 1289 203 193 248 1933 248 1071 1071 1933 2311 2574 41 2574 41 2311 61 2575 2575 2556 1267 1197 2061 557 2061 684 838 1625 1634 2261 2261 1938 1569 1197 1547 1197 2576 2557 19 2576 422 750 15 422 219 464 2577 1102 2577 2063 2561 2571 989 1041 61 2578 2578 2558 2562 2572 2563 2573 1330 2579 2579 2580 1330 2580 1904 780 1904 779 824 1105 1063 2109 2109 2581 1063 2581 2036 193 2559 41 442 222 383 823 383 1104 693 1287 1723 1947 1724 1947 481 2582 2582 275 1504 2454 281 419 2501 2560 728 41 41 2583 2583 728 1546 286 859 286 2564 2575 521 2465 1198 2465 19 306 2584 1139 1139 1847 1847 2584 131 1777 1211 2271 2566 2576 61 2585 2585 2561 2567 2578 2061 763 2061 2476 659 127 659 2256 2256 127 2586 2562 19 2586 2587 2563 19 2587 334 780 1047 1560 1048 1560 61 1354 5 529 929 959 959 1626 929 1626 1044 2411 164 1192 164 1987 15 425 1753 986 1753 315 1961 2196 114 1961 1723 2414 1947 2414 2482 2112 1254 222 1253 222 1544 775 357 775 2568 2501 2588 189 15 2588 15 189 2589 2564 19 2589 2485 2590 2590 314 314 2485 2240 2420 2456 2355 2456 2042 2162 41 2163 41 1933 25 1869 1933 15 969 891 1348 891 1624 75 41 1210 2271 61 2591 2591 2566 2592 41 2592 1959 2146 2448 73 2146 2571 2585 2245 1728 173 1002 2593 2567 19 2593 2594 2124 1720 2594 2026 1446 2572 2586 1253 315 2573 2587 1335 568 568 1361 1335 1361 882 255 988 946 2090 946 2061 608 2061 322 322 608 859 555 555 857 5 2595 1578 2595 5 1578 716 2203 715 2203 205 2159 2512 2568 401 1581 2575 2589 1619 1247 1873 1619 2117 403 2035 222 2035 1944 493 2012 369 2345 41 369 385 2261 2576 2591 2214 1666 2136 2542 2596 2571 19 2596 1203 1165 2578 2593 1285 222 2594 1738 1720 1738 61 1196 61 2597 2597 2572 4 1244 924 1244 61 2598 2598 2573 562 109 1852 2193 2599 1966 1966 144 2599 144 2288 751 751 147 147 2288 1895 146 1895 2600 146 2600 1038 298 2203 695 715 695 73 1389 1933 2275 2068 2275 2246 2073 2073 2402 1139 2601 2601 1911 1139 1911 61 2602 2602 2575 2370 803 15 428 15 429 15 1352 15 1435 383 882 382 882 286 1153 1458 2229 2603 2576 19 2603 578 2523 41 2523 1453 1266 1266 1332 2096 1807 662 1907 2604 1907 662 2604 2585 2596 61 2605 2605 2578 1742 2511 952 2085 2375 1112 1721 1112 2586 2597 573 1716 2587 2598 946 639 1314 1653 1314 2126 541 1999 1999 2374 2090 222 1783 605 5 1490 2295 177 2456 177 395 2606 15 2606 134 1372 2589 2602 2235 41 1028 1625 1084 1188 1188 1731 1379 41 19 820 1203 923 385 1167 1547 1196 2378 589 2378 1364 2607 784 2607 628 2591 2603 61 2608 2608 2585 1009 954 2014 954 1009 2014 61 1547 2593 2605 126 2080 1955 2257 2257 1188 2609 2586 19 2609 1446 765 2610 2587 19 2610 927 812 927 25 300 2222 15 1633 1139 1036 1742 2352 2295 2355 1917 708 1213 1738 275 1172 2582 1172 16 1503 2611 2589 19 2611 15 809 41 799 1643 572 570 1643 516 193 228 222 2428 2035 219 54 61 2612 2612 2591 5 2570 2596 2608 882 1919 882 1918 2613 2593 19 2613 1056 2087 2597 2609 2598 2610 2142 498 1830 498 1428 1977 643 1887 1887 2015 643 2015 1644 570 2185 2516 2185 2517 2115 321 321 211 2115 211 2602 2611 430 2195 15 430 1530 41 2559 1530 1158 1676 15 2105 1625 855 164 1783 2603 2612 61 1548 43 609 608 43 1207 1868 2614 2596 19 2614 248 777 2605 2613 1049 1433 61 2615 2615 2597 1002 1647 1647 1526 2185 264 61 2616 2616 2598 927 1264 184 1264 927 184 1461 1907 661 1907 964 1141 964 1140 1028 2516 2225 1710 124 1367 2584 964 602 1678 602 561 720 1771 14 2539 2539 13 61 2617 2617 2602 998 631 515 193 2159 1347 282 1347 2309 1822 277 2415 73 2147 1798 2147 1064 2588 1064 418 2588 418 1603 1219 2177 582 2607 65 2618 2603 19 2618 2594 794 1415 1345 2608 2614 248 458 61 2619 2619 2605 659 525 525 658 1741 2352 878 2296 2296 61 878 61 2609 2615 1693 1834 1693 1572 2610 2616 2109 589 964 2601 1532 2601 964 1532 1920 2272 282 2160 2606 1474 15 1474 624 1626 602 434 602 502 15 1526 2343 41 1379 2343 2611 2617 382 822 2093 1641 2336 2620 1403 2620 1745 690 1203 1013 1969 1956 641 714 641 713 19 882 860 1389 1104 460 1532 2012 1534 2012 1056 694 1056 696 2612 2618 2607 177 676 1207 171 1667 1191 1667 164 1054 61 2621 2621 2608 2613 2619 1232 1359 1359 2622 1232 2622 1956 367 2623 2609 19 2623 836 2 2624 2610 19 2624 2540 641 641 1406 2540 1406 1266 2594 2185 2 526 352 814 526 2371 2077 2581 1038 2581 298 573 474 744 2407 2407 745 501 133 306 111 2625 2611 19 2625 119 41 119 2072 1769 1256 5 1769 1335 2070 1387 2070 1056 1091 1091 1057 857 286 61 2626 2626 2612 1962 1803 300 885 1771 2253 2614 2621 248 457 2627 2613 19 2627 2615 2623 2616 2624 467 1645 2628 436 2628 146 641 1654 641 1653 2392 2629 2629 2630 2630 2392 124 793 1950 822 822 1009 2476 684 249 128 1395 1004 2617 2625 2631 41 654 2631 4 1540 764 1291 2154 1177 1787 1177 2154 1787 998 508 631 508 15 2388 641 683 2618 2626 2270 514 2270 1771 2632 2614 19 2632 2619 2627 2276 2583 61 2633 2633 2615 61 2634 2634 2616 525 1759 2628 1011 41 2369 41 596 147 92 147 16 206 2402 206 1269 855 1350 1351 855 2371 556 925 556 602 145 2334 2064 1794 2334 61 2444 61 2069 436 818 1576 2503 2503 1902 126 487 61 2635 2635 2617 844 557 1204 1013 2565 2479 15 2565 15 2479 705 2499 634 528 1279 634 300 1615 300 221 641 2098 641 1713 2198 2426 2426 989 2214 1728 2214 2245 110 947 2636 2618 19 2636 1078 198 1139 1604 641 869 2621 2632 1513 1724 1513 1519 61 2637 2637 2619 448 1558 1921 1558 448 1921 1238 2465 179 1575 1048 2522 2623 2633 1693 1809 2624 2634 1989 718 1203 1473 1203 1280 41 1025 1025 2040 45 608 1950 61 2638 813 352 2638 2639 2225 1710 2639 2625 2635 1867 1784 2583 25 2583 1969 1969 25 1203 980 306 1504 25 681 25 682 19 383 298 589 2109 298 2640 1025 73 2640 1986 989 2626 2636 2481 739 2482 739 1521 2565 1082 1282 94 1282 61 2641 2641 2621 1513 1690 2627 2637 1433 69 1433 1754 2555 1773 1931 1773 1133 2015 248 1252 2642 2623 19 2642 518 279 2643 2624 19 2643 525 899 463 2644 462 2644 2628 352 2645 335 752 2645 1661 1266 1387 568 200 41 300 1300 2646 2625 19 2646 120 41 764 2411 1291 2411 638 1173 1173 526 964 1911 249 457 249 1969 1669 463 1669 2644 61 2647 2647 2626 2632 2641 2270 352 2277 1513 2648 2627 19 2648 2259 1806 1806 1310 1433 528 1133 361 1653 1887 1786 600 2236 510 2633 2642 148 547 2634 2643 2236 1381 1012 2454 1458 2051 1660 1827 1767 1660 1827 1767 2523 2310 2310 2282 1564 1402 2635 2646 1937 1322 15 1937 2098 33 2636 2647 1312 470 179 271 2649 2632 19 2649 468 2508 152 2508 2637 2648 1589 134 1589 133 61 2650 2650 2633 61 2651 2651 2634 261 279 467 1646 1056 758 352 528 300 374 374 1300 450 818 964 1849 15 1436 15 2140 1028 2158 2158 2516 174 485 61 2652 2652 2635 2114 1907 1403 557 1403 1539 2154 25 764 279 1516 2002 2653 2636 19 2653 165 2347 166 2347 2248 41 2249 41 2641 2649 61 2654 2654 2637 362 2337 2642 2650 2643 2651 1944 286 2035 286 960 538 1191 1928 1267 1739 1739 1914 1267 1914 641 1273 2514 1660 449 528 776 889 2655 481 2655 748 2646 2652 2365 177 1752 2351 15 2351 573 93 2062 86 2271 1842 5 1857 19 1139 609 1424 2647 2653 528 2655 1240 2655 528 1240 878 1136 1136 2296 206 1092 1610 1092 1538 1826 1538 678 2012 2584 61 2656 2656 2641 1403 678 1969 673 1969 776 1308 109 205 2487 2648 2654 2115 1699 2657 1527 2259 2657 1407 212 1700 493 2658 2642 19 2658 2659 2643 19 2659 2035 2090 2035 842 132 501 2478 1937 1936 2478 1928 1667 960 1044 2639 2030 173 917 449 818 481 2599 2599 731 1759 1691 2660 2646 19 2660 1403 101 1403 57 1203 935 2062 73 938 1200 15 938 15 1200 1271 2131 608 1424 61 2661 2661 2647 25 2072 2097 2555 1610 2402 424 1629 1733 1809 2649 2656 408 222 573 1275 1653 1817 2662 2648 19 2662 205 1343 2650 2658 2651 2659 132 1678 1300 2569 1300 1289 1511 1754 2652 2660 678 1539 1951 942 2653 2661 1969 1910 1532 841 841 1533 2663 2649 19 2663 1112 1053 1721 1053 319 1612 2654 2662 661 5 641 2183 61 2664 2664 2650 61 2665 2665 2651 331 1627 2543 909 407 222 2342 41 1353 1368 1243 1425 2666 41 2453 2666 1753 222 61 2667 2667 2652 1609 1092 2005 981 488 1928 158 355 158 378 2629 849 15 2629 15 849 2668 2653 19 2668 1009 1166 1009 253 608 73 994 481 2601 841 1316 2604 1198 2577 1238 2577 2669 2349 2669 2091 2656 2663 1508 466 300 295 300 293 61 2670 2670 2654 306 1684 132 1589 2658 2664 2659 2665 2222 1459 1287 709 2481 2026 12 2407 15 2407 1660 525 1661 525 1049 2579 2660 2667 2671 2672 15 2671 15 2672 618 981 2005 618 1969 1703 332 1314 19 1485 978 1357 1406 978 1406 1357 2082 485 483 2082 99 758 99 2197 2661 2668 1009 2013 1009 2156 300 1115 1061 2604 61 2673 2673 2656 1533 2584 2584 1534 2662 2670 1430 2323 1406 2115 2114 614 239 2674 2674 620 1898 761 2675 2658 19 2675 2676 2659 19 2676 2628 2271 1896 2271 1896 2628 1300 537 374 537 1077 2672 2672 1093 1077 1093 2222 1979 581 1979 332 642 1082 750 94 750 1717 751 1217 1662 1466 1625 343 1625 946 853 957 130 2677 2660 19 2677 61 944 248 2062 2520 2062 61 2678 2678 2661 882 954 462 1050 1440 196 300 464 1444 406 15 1444 15 406 2663 2673 2679 2662 19 2679 641 31 2664 2675 2665 2676 984 853 1177 1226 931 1226 1266 1551 18 2344 2581 2019 2061 248 127 248 2542 1940 1969 2536 325 1689 2667 2677 2238 1099 15 2238 2521 222 2521 82 2132 589 2668 2678 1298 900 901 1298 2680 2663 19 2680 1847 1533 1533 1184 964 1534 2090 945 2670 2679 1006 2681 2681 1291 715 2089 715 2088 1011 1211 1010 1211 1232 1311 2066 2163 2 2066 61 2682 2682 2664 374 2569 61 2683 2683 2665 1437 853 1690 875 176 875 468 2514 286 222 445 1853 1438 236 469 41 2052 108 1513 177 730 2381 2381 1965 2350 1734 260 41 2520 2476 61 2684 2684 2667 2 2592 99 756 2035 2399 82 2522 1560 2522 1009 255 15 1928 2685 2668 19 2685 1162 286 2521 286 2622 1945 2669 1971 1971 2091 2673 2680 61 2686 2686 2670 1115 2681 127 891 891 1403 98 978 2675 2682 2676 2683 763 1112 242 1112 228 1194 1098 2687 1097 2687 207 1924 1924 2302 139 2657 1969 2133 2 880 826 528 1428 1083 1428 257 2594 2038 26 2249 2677 2684 41 570 99 1057 99 757 2521 2522 1752 940 941 1752 19 505 15 187 300 1692 241 2639 15 2639 67 133 989 1188 2678 2685 1135 669 1139 1234 61 2688 2688 2673 2679 2686 15 1965 15 1966 1029 2088 2689 2675 19 2689 158 353 2690 2676 19 2690 984 1308 1437 1308 228 2280 1733 1572 1733 2461 527 1069 826 1754 1122 71 2691 2677 19 2691 1343 2159 1103 2577 1967 1026 61 2692 2692 2678 15 1397 2680 2688 2669 279 2160 281 932 2355 2693 2679 19 2693 2569 2411 261 2411 1282 2694 1082 2694 879 828 966 828 268 2695 2606 268 2695 2606 2682 2689 2683 2690 1022 61 594 1066 1969 2118 1299 2206 1629 1299 826 1650 2574 1649 699 2574 1817 1887 99 990 5 2631 5 654 1075 2043 1939 2043 2684 2691 15 1664 1940 2543 1896 1211 2685 2692 2696 2680 19 2696 2657 1806 2657 2290 330 1706 158 601 2686 2693 2439 2505 2505 782 782 2439 61 2329 2329 2682 61 2697 2697 2683 763 1111 1625 2 1827 2514 166 2674 1589 1511 1681 2489 1681 2202 1831 2254 61 2698 2698 2684 2244 2645 15 2645 1426 2195 1426 1746 2699 2685 19 2699 495 1050 15 2193 2688 2696 188 1347 621 60 61 2700 2700 2686 2701 41 2701 2227 1029 2158 2088 2158 1969 1353 2689 2329 2690 2697 1098 2674 2687 2674 34 1032 1406 1879 1819 2517 2517 1467 263 1507 15 1608 1151 2672 2006 775 2691 2698 15 2203 1011 1896 19 1266 2231 41 1412 41 1742 226 226 2511 1061 724 2692 2699 1582 471 164 245 164 246 61 2702 2702 2688 43 1424 1734 1512 2693 2700 534 1727 2330 2689 2703 2690 19 2703 1682 871 1682 2489 871 2489 84 1273 641 84 79 1546 2395 1927 150 2508 389 1623 1403 661 2704 2691 19 2704 1298 847 711 872 712 872 2182 1142 1426 2420 61 2705 2705 2692 838 2499 836 2499 2696 2702 1969 1354 2706 2693 19 2706 1532 2134 2697 2703 1920 1282 763 73 242 73 1335 1837 1334 1837 1051 2202 1618 2089 1421 2489 618 397 1023 878 1023 61 571 2707 41 2707 41 571 2698 2704 2393 2630 41 2630 41 2393 1774 187 2699 2705 2499 2089 52 2505 2708 2696 19 2708 2700 2706 2595 41 1439 211 61 2709 2709 2697 1920 2694 300 1815 300 1816 1229 552 94 2095 79 286 791 1942 1099 1223 1223 2238 1773 2149 15 1773 15 2149 2540 61 1994 2202 2202 1842 175 485 405 1607 1476 1905 61 2710 2710 2698 1705 1066 15 1705 2447 41 2448 41 2022 790 2711 2699 19 2711 1969 1196 2322 1401 1089 144 1089 2599 2702 2708 61 2712 2712 2700 99 2367 15 1614 2703 2709 1682 352 1681 352 1407 236 1468 2517 2272 1771 1550 1471 1011 2271 1957 2583 158 1933 15 1595 15 2172 175 1924 883 2141 2141 1392 2704 2710 2125 2713 2713 41 19 1661 1141 2493 512 2196 2705 2711 1406 1355 2479 957 61 2714 2714 2702 2715 2167 2715 863 300 495 1591 266 1627 1273 251 997 300 1152 2706 2712 1363 1691 2101 1691 737 703 2716 2703 19 2716 899 1691 2212 1382 2212 797 2272 2253 1266 1263 2008 430 2374 1998 2717 41 1889 2717 574 2202 1236 1361 1924 1092 15 1924 2718 2704 19 2718 1575 1735 1575 2503 419 190 419 188 726 416 726 417 41 1795 1221 1505 1220 1505 61 2719 2719 2705 249 1196 2055 1175 1175 1758 2708 2714 2142 2715 2142 2167 300 462 2720 2706 19 2720 440 685 438 685 41 127 2709 2716 229 886 1077 1704 1151 1704 1030 883 1886 2491 15 2491 1641 41 465 1160 833 916 2144 2721 41 2721 41 2144 2710 2718 2722 1522 1520 2722 449 1650 1589 1754 1243 113 1221 1580 1505 1580 233 2 2711 2719 1406 2375 1406 744 1075 2475 1075 539 753 28 41 28 41 753 1263 1739 2723 2708 19 2723 80 286 2712 2720 1503 539 539 2261 1503 2261 2290 1527 2290 2233 2296 564 2296 2350 61 2724 2724 2709 230 886 1010 870 1010 1682 1698 488 124 1720 1686 2254 1524 1003 61 2725 2725 2710 15 1817 1538 2138 421 2694 2694 513 421 513 2726 2711 19 2726 1939 2475 2445 1006 2714 2723 2715 498 664 2347 1158 1984 550 18 61 2727 2727 2712 2444 247 1262 1738 1262 1739 2716 2724 179 1174 2536 41 1900 2346 180 465 2718 2725 1252 1714 1252 772 179 496 15 304 15 738 1785 2088 2728 1661 19 2728 727 416 498 1984 2719 2726 72 1706 61 2729 2729 2714 67 1557 2720 2727 660 127 1503 2043 1030 2141 1091 265 2730 2716 19 2730 566 2070 1387 566 1750 1747 1750 792 796 1944 796 2035 179 2005 1761 546 1519 863 2731 2718 19 2731 1967 1152 5 2040 749 1056 1051 1842 1030 38 266 1590 525 2728 2351 941 2 1022 61 2732 2732 2719 1512 2503 1885 2492 2723 2729 2733 2720 19 2733 1778 131 2064 1778 2724 2730 290 2504 783 2504 612 1462 1091 2193 2496 2365 15 2507 15 321 2725 2731 2030 241 1331 2507 1090 2193 1269 483 2726 2732 2734 41 2314 41 2314 2734 964 1035 1123 71 127 249 2735 2723 19 2735 165 2687 166 2687 2727 2733 1775 1714 61 2736 2736 2724 2272 352 1701 286 1967 300 929 187 300 1026 73 2666 73 2453 61 2737 2737 2725 1051 352 2728 2293 1684 2454 2638 1173 2638 41 2738 2726 19 2738 1403 819 41 2179 964 1036 54 2121 54 2009 2713 1810 2729 2735 61 2739 2739 2727 55 680 2730 2736 2496 685 91 124 1236 1837 1702 286 1009 427 726 1695 726 1469 1863 221 998 222 2731 2737 1980 2395 41 2395 662 5 926 158 2740 2728 19 2740 727 1469 2732 2738 352 2713 352 2125 2028 964 54 2166 61 2741 2741 2729 525 1827 1218 503 503 1176 2325 2525 2733 2739 2640 41 893 2640 2742 2730 19 2742 978 1750 1411 660 1214 1695 998 444 1070 419 1417 1554 2743 2731 19 2743 2744 752 41 752 41 2744 2707 1331 1034 1848 41 2695 2070 1837 2293 2740 861 41 1856 41 61 2745 2745 2732 164 2009 164 2121 2735 2741 2251 2525 2746 2733 19 2746 2717 1899 2 2717 2736 2742 796 286 300 1818 300 1863 1003 1523 775 219 927 158 15 1521 2737 2743 15 708 883 2433 1297 22 867 2694 124 2038 1302 1289 1302 1290 2738 2745 2491 1885 263 192 263 203 505 107 2747 2735 19 2747 2350 685 2739 2746 207 1092 465 687 687 391 1334 1361 61 2748 2748 2736 1097 2241 2521 1163 716 2088 2295 65 2607 972 2295 2607 61 2749 2749 2737 2447 1856 1283 2144 2013 1606 1606 428 602 1470 2740 51 41 1872 194 989 989 1965 194 1965 2750 2738 19 2750 1850 2435 2435 2091 54 1666 1485 1855 2751 1608 1607 2751 2741 2747 1627 84 61 2752 2752 2739 2068 2433 798 286 2742 2748 302 2385 2385 2569 302 2569 229 961 1919 2140 223 2116 15 1887 1621 1459 2317 41 124 1268 2743 2749 15 2347 15 291 2014 1606 1553 2722 2408 1553 2722 2408 602 67 2753 2740 19 2753 2745 2750 2350 1512 61 2754 2754 2741 2746 2752 671 1691 15 695 2755 2742 19 2755 164 2199 164 1929 2326 481 830 158 15 2485 2251 1148 127 1010 1010 891 2024 1282 2756 2743 19 2756 124 1551 2014 2081 1183 1469 727 1183 2215 1179 51 2753 1474 2695 528 748 61 2757 2757 2745 180 1160 2747 2754 739 2112 2758 2746 19 2758 1054 797 1056 92 2748 2755 580 710 2241 2687 164 729 2159 1395 1343 1395 1160 686 5 2113 2749 2756 22 107 1269 2132 610 1707 409 222 1407 1423 2539 1259 15 522 2750 2757 522 2465 2759 41 2759 1857 2760 2747 19 2760 1113 2092 2752 2758 975 1435 2138 1748 1716 146 1716 2600 961 2186 61 2761 2761 2748 1062 1489 1049 826 1911 2134 15 1917 1575 2153 1160 466 15 1851 61 2762 2762 2749 505 24 15 1606 83 2504 83 783 1706 329 2753 2338 1390 61 2763 2750 19 2763 382 1009 2260 2436 1702 1944 2754 2760 2594 1213 229 79 1707 618 61 2764 2764 2752 2288 146 2755 2761 2734 2422 2 2734 54 2199 1301 1290 564 61 164 2555 164 2097 41 2215 2756 2762 409 2504 1423 212 212 1405 1529 41 2765 2753 19 2765 90 2671 15 90 2757 2763 2133 2537 2116 2537 61 2766 2766 2754 1023 1011 1409 79 2016 987 2758 2764 1049 2767 2767 2579 15 568 1716 751 2768 2607 630 2768 630 2607 2445 2644 495 2644 2769 2755 19 2769 128 670 15 1867 884 2433 1151 24 22 1151 1115 1265 1265 2681 1780 1381 2770 2756 19 2770 1718 285 15 285 2338 2765 703 2112 61 2771 2771 2757 2760 2766 164 887 2772 2758 19 2772 1367 2080 778 25 2761 2769 61 671 1091 2207 400 900 1330 2607 2607 2456 1330 2456 689 2347 2762 2770 1122 329 2312 698 698 2311 2763 2771 1967 219 1967 54 2773 2760 19 2773 1010 2271 54 829 658 247 332 643 2764 2772 707 2344 61 2774 2774 2761 124 2594 61 2775 2775 2762 15 1784 36 2338 2765 36 1540 2138 2115 1961 1961 1463 2482 703 2776 2763 19 2776 2222 580 1171 2582 975 1680 2766 2773 765 507 61 2777 2777 2764 2695 1476 41 1476 2769 2774 54 1929 1406 320 719 2669 719 1971 2778 1668 5 2778 1811 2638 302 538 2770 2775 949 2590 1273 1250 1110 1250 2779 2765 19 2779 628 972 2771 2776 1632 1157 2162 2224 128 2173 1217 503 1435 1680 61 2780 2780 2766 507 2033 2038 794 1722 2407 525 898 164 827 2772 2777 1717 2600 2600 2258 2781 2769 19 2781 1658 2461 1658 1756 1858 2352 2307 1833 2102 2246 2032 2246 1227 2674 2190 2253 2782 2770 19 2782 1177 1225 164 1823 2271 352 147 573 573 2288 36 2779 2783 2744 41 2783 61 2784 2784 2771 61 670 2773 2780 1423 11 1425 11 2785 2772 19 2785 2774 2781 707 2323 2445 1050 191 2669 442 796 41 197 2078 157 2039 522 2775 2782 1610 2073 665 481 15 2458 15 1730 2776 2784 419 1064 733 1562 1563 733 2786 2773 19 2786 113 1961 2222 1592 1403 1625 1544 16 16 775 2777 2785 41 2543 61 2787 2787 2774 2644 1265 2445 1265 1971 718 2179 1891 2788 2179 1891 2788 2707 2417 2507 2707 164 1045 2788 1600 2768 685 2768 438 812 158 602 451 659 467 61 2789 2789 2775 1431 701 2631 2113 1971 364 364 1970 2779 35 5 2227 5 2701 2790 2776 19 2790 281 1063 2274 1052 1722 1052 2780 2786 891 1625 1330 1690 61 2791 2791 2777 2781 2787 707 528 179 651 1737 651 179 1737 1636 854 1330 971 1288 222 2016 222 1503 1167 628 685 602 1557 128 2285 2173 2285 2782 2789 2792 2779 19 2792 2042 1342 1342 2440 2784 2790 41 2722 61 2793 2793 2780 2785 2791 2794 2781 19 2794 179 2715 2715 862 179 862 558 2604 1489 2604 318 2 2027 722 134 602 602 132 164 829 15 950 1960 2408 1549 1597 419 2581 419 2109 61 2173 2795 2782 19 2795 2487 1924 15 1184 35 2792 481 634 164 1931 61 2796 2796 2784 900 524 46 1840 481 1685 2533 1685 2786 2793 2274 12 2797 2785 19 2797 2787 2794 2601 2134 147 602 891 2620 2620 2798 891 2798 808 2286 466 773 1639 2418 2418 1638 1805 945 2789 2795 2574 698 1173 813 1243 1439 1243 1438 2 2303 2790 2796 1529 2317 2799 2786 19 2799 230 2280 1010 2798 2798 2767 1010 2767 2791 2797 1531 874 1061 1489 61 2800 2800 2787 1636 116 2267 2694 99 387 1348 837 1421 871 2244 2783 2744 2244 419 2364 378 459 1119 459 61 2801 2801 2789 2254 137 2095 1282 2580 35 2792 2580 2630 2058 2058 2629 2378 2132 2802 2790 19 2802 2793 2799 2555 81 61 2803 2803 2791 280 515 2794 2800 128 1995 1302 537 16 145 1386 116 164 1422 598 2286 2388 432 15 2590 2795 2801 41 368 2804 2792 19 2804 406 2751 15 2751 2796 2802 1907 1462 2114 1462 5 2228 61 2805 2805 2793 2797 2803 1538 5 2806 2794 19 2806 525 1387 1724 1676 1636 222 61 2285 1956 2583 15 1308 2277 177 2807 2795 19 2807 2580 2804 2391 2472 2472 2468 2533 1782 61 2808 2808 2796 464 1893 2799 2805 2809 2797 19 2809 630 685 1295 2465 1295 1148 2800 2806 99 1599 1082 422 731 1966 2129 539 2801 2807 468 1767 41 2310 971 2042 73 2520 1851 1113 2570 2701 2426 1056 2802 2808 2216 1406 242 1053 2810 2799 19 2810 1231 516 2803 2809 1295 2577 61 2811 2811 2800 164 324 99 1206 99 625 24 1704 689 2241 1096 2388 61 2812 2812 2801 41 2219 734 1563 1531 1662 1662 497 1531 497 1208 955 15 955 2804 2579 1096 633 432 1096 775 1158 2813 2802 19 2813 2805 2810 128 1766 61 2814 2814 2803 2476 1356 2806 2811 1156 2027 191 2580 2807 2812 468 151 1117 2622 2815 2804 19 2815 2230 41 1049 1136 280 193 1923 448 2808 2813 425 733 1562 425 61 2816 2816 2805 61 1995 2809 2814 164 1772 2817 2806 19 2817 2818 2371 54 2818 1690 2607 41 851 41 2058 1364 418 556 617 1939 2104 688 2347 2180 2788 2819 2807 19 2819 327 271 515 1598 1542 938 2579 2815 2177 1364 1722 12 896 2783 61 2820 2820 2808 1999 543 1156 722 2810 2816 320 2051 2051 2229 438 2607 2821 2809 19 2821 2811 2817 1621 203 1621 338 1597 1394 1597 1583 657 2452 1052 2452 24 2537 420 2588 778 1582 777 1582 777 25 2812 2819 426 1562 2783 1975 2751 405 2813 2820 2822 2810 19 2822 2814 2821 164 2818 2009 2818 175 2082 61 2823 2823 2811 2109 2019 1426 472 2420 472 34 842 325 271 2173 2286 525 597 1314 2337 1018 1170 61 2824 2824 2812 70 329 352 2376 1896 146 2815 2767 128 1791 2825 2813 19 2825 442 1780 1677 1175 2816 2822 61 2826 2826 2814 164 2166 2817 2823 625 1207 691 1231 278 1231 26 41 2819 2824 1170 591 2827 2815 19 2827 61 1766 1010 330 2820 2825 1063 590 5 2759 2228 2759 2 2067 61 2828 2828 2816 2821 2826 2829 2817 19 2829 158 86 86 2520 124 1369 990 266 990 1590 2075 1148 2830 2819 19 2830 41 1445 2097 81 1174 1662 2767 2827 2221 2468 2468 2220 61 2831 2831 2820 2645 2744 2822 2828 2832 2821 19 2832 2823 2829 112 1972 2091 364 24 2672 851 2833 41 2833 777 1580 54 445 54 443 2824 2830 1623 41 2280 886 2825 2831 2834 2822 19 2834 2826 2832 61 2835 2835 2823 891 1023 891 1022 1701 1359 1357 792 792 1356 581 710 2721 1755 61 2836 2836 2824 15 2180 470 41 2827 2798 164 615 2837 2825 19 2837 2828 2834 61 2838 2838 2826 2829 2835 179 644 278 193 363 1851 2214 1318 1318 1728 61 1791 2833 850 2830 2836 15 1533 1344 1395 2839 2827 19 2839 164 316 2831 2837 2778 41 232 103 232 1560 61 2840 2840 2828 2832 2838 2841 2829 19 2841 263 1459 263 1621 1010 1023 302 537 1808 1835 2001 41 1956 9 2842 2830 19 2842 2798 2839 1498 2833 61 2843 2843 2831 2342 2778 409 2263 2834 2840 2844 2832 19 2844 2835 2841 1550 1583 1690 685 631 286 998 286 1417 955 384 955 15 745 1910 675 272 675 1026 1633 1633 1595 2836 2842 2326 994 2 1890 2837 2843 15 39 1707 981 2139 1052 318 627 2845 2834 19 2845 2838 2844 775 651 128 2170 61 2846 2846 2835 1077 272 164 930 15 989 775 2005 588 2588 2768 177 61 2847 2847 2836 1243 2274 2839 2620 2848 2837 19 2848 2840 2845 61 2849 2849 2838 1791 2170 61 2170 2841 2846 73 1962 1870 1102 164 2236 164 1978 860 41 2842 2847 84 1250 2850 2839 19 2850 2843 2848 15 2160 61 2851 2851 2840 2844 2849 2852 2841 19 2852 1044 1291 1204 2352 2352 1202 25 2520 686 2296 992 1800 2853 2842 19 2853 2620 2850 775 653 61 2854 2854 2843 15 1972 2845 2851 2855 2844 19 2855 2846 2852 954 2081 2818 2077 932 1341 2075 310 9 367 2847 2853 2848 2854 2282 2312 15 2312 61 1107 2 1889 2856 2845 19 2856 178 685 2849 2855 61 2857 2857 2846 164 975 476 1843 61 2858 2858 2847 782 52 2850 2336 2859 2848 19 2859 1694 2534 2277 2534 2851 2856 61 2860 2860 2849 2852 2857 602 155 164 1588 1165 924 2818 2010 2010 556 2818 556 1762 546 2853 2858 2861 2850 19 2861 2854 2859 440 2607 1930 1773 61 2862 2862 2851 2855 2860 100 1351 2863 2852 19 2863 164 2212 1437 640 693 709 73 684 223 2537 2864 2853 19 2864 2 623 3 623 2721 2215 1179 2721 2476 792 2336 2861 162 998 162 286 788 1705 61 2865 2865 2854 2833 1500 308 2131 2131 1182 2856 2862 2866 2855 19 2866 2857 2863 164 1977 211 1463 565 278 1986 1055 1986 2547 184 1235 2858 2864 2418 2106 2859 2865 2867 2856 19 2867 2860 2866 262 338 2016 1277 61 2868 2868 2857 1205 725 245 2149 61 2869 2869 2858 2476 73 2361 73 2861 2305 2870 2859 19 2870 3 41 41 1 1514 2131 2862 2867 61 2871 2871 2860 1406 746 2863 2868 2248 682 2864 2869 2872 2861 19 2872 2110 2588 2865 2870 164 1428 61 2873 2873 2862 2866 2871 2874 2863 19 2874 312 2644 246 886 176 685 689 2687 2277 1494 2356 297 15 1667 2875 2864 19 2875 2595 1992 2305 2872 15 2788 6 1244 61 2876 2876 2865 2867 2873 2877 2866 19 2877 2868 2874 1506 1850 2039 1102 2291 2376 15 2478 2657 2232 2869 2875 745 1749 1722 1053 285 1664 773 180 2870 2876 2878 2867 19 2878 467 566 2871 2877 70 1706 1199 128 61 2879 2879 2868 23 2537 1217 1087 516 1598 972 396 1483 546 61 2880 2880 2869 2872 1875 2881 2870 19 2881 2873 2878 61 2882 2882 2871 2874 2879 1344 2161 1357 745 2875 2880 2883 2872 19 2883 555 2010 528 177 2876 2881 1397 380 61 2884 2884 2873 2877 2882 2885 2874 19 2885 1204 227 1204 1826 2039 521 2886 2875 19 2886 1243 746 1875 2883 61 2887 2887 2876 2878 2884 332 1133 2888 2877 19 2888 2879 2885 2472 2393 2880 2886 2768 503 2881 2887 1689 204 2889 2878 19 2889 2882 2888 61 2890 2890 2879 1204 1741 61 2891 2891 2880 2768 1176 2883 1874 57 936 145 751 2892 2881 19 2892 41 1522 2884 2889 61 2893 2893 2882 2885 2890 2666 2299 2886 2891 2894 2883 19 2894 273 1093 2887 2892 15 1482 2223 2592 61 2895 2895 2884 2888 2893 2896 2885 19 2896 1343 2161 2590 950 2897 2886 19 2897 1874 2894 496 2715 61 2898 2898 2887 383 1366 2889 2895 2899 2888 19 2899 2890 2896 2891 2897 630 1176 1969 888 2892 2898 1791 769 2900 2889 19 2900 2893 2899 61 2901 2901 2890 528 2296 887 2149 61 2902 2902 2891 1563 799 24 2671 23 2671 2894 1840 2903 2892 19 2903 2895 2900 61 2904 2904 2893 1204 1858 2896 2901 15 591 2897 2902 61 1293 1973 1182 812 184 48 2894 19 48 15 2392 2898 2903 61 76 76 2895 2899 2904 97 2896 19 97 223 2671 20 2897 2087 235 1840 48 15 1930 63 2898 2900 76 87 2899 2901 97 15 1060 2902 20 2903 63 77 2900 588 2110 573 421 2904 87 95 2901 573 867 1295 1103 123 2902 105 1093 149 2903 167 2904 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 60 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 20 133 134 135 136 137 138 139 140 141 142 143 144 145 37 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 61 164 165 65 166 167 168 169 170 171 172 70 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 92 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 146 236 237 238 239 240 241 46 152 242 243 244 245 163 246 247 248 249 250 251 252 253 254 255 256 257 258 173 259 260 261 262 182 81 263 264 265 266 267 82 268 96 269 270 271 272 273 274 275 100 196 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 132 229 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 252 166 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 177 367 368 369 370 371 372 373 374 375 376 190 271 377 378 379 380 5 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 44 405 406 407 408 409 410 138 411 412 413 414 415 416 417 418 419 420 10 421 422 423 424 425 426 427 21 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 333 242 446 447 448 449 450 451 340 452 453 454 455 456 457 458 459 460 461 64 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 262 369 477 478 479 480 481 482 483 93 484 485 486 487 488 277 489 490 491 18 492 493 379 276 494 382 273 495 496 497 498 499 500 501 502 503 504 505 506 283 507 508 399 509 510 511 512 513 514 515 516 517 518 121 519 520 521 323 522 523 524 525 526 527 428 322 528 529 530 531 532 533 534 535 536 537 538 539 540 541 151 542 543 544 545 546 547 548 395 549 550 551 552 553 554 555 344 461 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 183 575 576 577 578 579 580 484 377 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 195 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 228 630 631 632 633 336 634 531 635 636 637 638 639 539 640 641 642 643 243 445 541 644 645 646 647 648 649 650 253 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 575 477 577 666 667 668 669 270 670 671 672 673 384 674 584 675 676 677 678 679 501 680 440 493 597 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 514 614 704 617 705 706 707 708 709 710 711 712 713 714 625 715 716 527 629 717 718 719 720 721 722 723 724 725 185 351 726 727 334 728 729 730 731 732 733 734 548 735 736 737 738 651 556 739 740 741 742 743 744 745 746 368 747 748 749 580 669 750 751 752 753 380 754 755 756 684 757 758 759 663 760 761 762 763 764 765 766 767 768 769 552 770 771 772 773 774 709 775 776 777 778 779 780 781 429 782 783 784 785 786 787 453 788 789 790 791 792 793 217 794 728 644 795 796 797 798 799 460 762 800 801 802 803 804 805 806 807 808 670 809 742 810 811 812 813 814 815 816 817 665 746 818 819 820 821 822 440 823 824 825 826 827 828 829 485 830 831 832 833 834 835 526 836 837 754 681 838 839 289 840 841 842 843 844 845 425 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 569 872 873 874 875 876 877 782 717 878 879 828 880 881 882 883 884 885 886 887 888 889 890 891 892 893 540 894 895 231 896 897 898 738 799 899 900 901 902 903 904 905 841 906 907 576 908 909 910 911 912 913 830 750 914 915 916 917 918 919 920 921 596 922 923 924 925 839 926 927 928 929 930 931 932 933 934 935 641 828 936 414 937 938 939 940 941 942 863 943 944 868 945 292 946 947 948 949 382 950 951 628 827 952 953 954 955 956 957 31 958 959 960 961 962 963 964 965 966 967 968 969 635 338 970 971 972 973 974 794 893 975 976 977 978 979 808 980 981 982 983 652 984 985 986 987 988 989 990 991 992 993 994 995 996 810 997 998 999 1000 908 818 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 668 837 921 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 128 1031 1032 1033 1034 356 1035 1036 1037 659 1038 1039 877 951 1040 1041 1042 1043 1044 1045 312 1046 1047 1048 1049 883 800 1050 1051 1052 1053 1054 1055 1056 1057 890 729 1058 1059 1060 1061 1062 1063 1064 1065 1066 984 899 989 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 745 1077 1078 1079 1080 1081 1082 913 1011 1083 1084 1085 1086 755 1087 1088 1013 238 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 537 936 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 935 1119 1120 1121 1122 1123 1124 1034 866 1125 1126 1127 416 1128 954 1129 1130 1131 489 1132 1133 1134 362 783 1135 1136 1137 979 1138 1139 1140 1141 1142 1143 1144 961 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1058 975 1157 1158 1159 1160 1161 545 1162 1163 1164 1165 1166 798 1167 1168 1169 1170 1171 1172 1173 1174 1175 1000 1076 1176 831 1177 1178 997 1179 1180 1181 1087 1012 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1126 1198 1199 590 1200 1201 1202 1203 207 1204 1205 1206 1207 1208 1115 405 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 6 1230 1231 1232 1233 1234 1235 1236 1135 1040 1237 1238 1239 1240 1241 1242 1243 1244 105 1245 1246 1247 1248 1249 892 1250 1251 1252 1253 1254 1255 1256 1257 1258 1066 1166 1259 1260 1261 1262 605 1263 8 1264 1265 1266 1267 1268 1269 1006 1270 1271 1272 1273 1274 909 1275 1276 1277 1177 1083 1278 1279 693 1280 1281 1282 1283 1284 920 1285 1111 939 1286 1287 1288 1289 1131 1290 1291 1292 405 1293 579 1294 1295 1296 1297 1298 1299 1300 1301 1134 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1137 1313 189 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 950 1333 1334 278 1335 1336 431 1337 1338 1339 622 1340 1341 1342 1343 1344 682 404 912 1156 1249 1345 1346 1347 1348 519 1349 1350 1099 1351 1352 985 1353 1354 1355 306 1356 1357 1358 407 1359 1360 1361 1362 1275 1176 1363 1364 1365 1366 1367 1368 1369 1370 1010 1371 1372 1373 1374 1375 1376 1196 1377 1378 1181 1284 1379 1380 1381 1382 844 1383 1384 1385 1386 1387 1388 1203 1389 1184 1390 1391 1392 1132 279 1393 1394 1395 1396 821 1397 1398 994 1399 1400 1401 1402 1403 1404 1405 1406 1407 236 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1236 1332 1420 1421 410 1422 1423 1424 1425 1426 1337 412 1427 507 1428 1429 1430 1431 1432 1433 1434 1059 1435 1436 1437 1438 1439 1440 1441 1442 1443 1353 1259 1444 1445 604 1429 1446 1447 1448 1449 1075 1144 1450 1451 1452 480 1453 1277 1370 1454 1455 1456 1457 1458 1459 1460 1088 1461 1462 1463 1185 759 1464 1465 1466 1197 1467 1468 1469 1470 1343 1471 1312 1472 1473 1474 1475 1476 1477 1478 1479 1480 677 1481 1482 1483 1484 1485 1486 1403 1487 1244 1488 1489 1490 1491 1492 1493 1136 1494 1495 1496 1497 1498 1499 1500 1501 1240 1502 1503 510 1427 1504 558 1265 1505 1506 1154 1507 1508 1435 1345 1509 1510 1330 1080 1511 1512 1513 1514 1515 1193 1516 1517 1518 1519 1165 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1362 1449 1535 1536 1537 1538 1539 467 1540 1178 1541 1542 1543 1461 1379 1544 1545 1546 1547 1548 1549 1550 1551 1465 1552 1299 1553 1554 1555 1019 1556 1557 1558 1559 1560 737 1160 1328 586 1561 1484 1562 366 1563 1564 1565 1566 1487 1567 1568 1569 1570 1571 807 1572 1573 1574 1575 1576 76 1577 1494 1420 1578 424 1579 1580 1581 1582 1583 1584 1248 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1443 1519 1597 1598 1599 747 1600 1601 1602 1603 1523 306 1604 1605 1606 1607 1608 1609 1276 1610 1611 1612 1613 1614 766 1376 1615 1616 862 1144 1617 1377 1618 1619 1541 1454 1620 1621 1622 1623 1624 1283 1625 656 1626 1627 1628 372 1629 1630 331 1631 1632 1633 1634 1635 1467 1636 1637 1638 1556 1639 1640 1641 723 1642 1643 1644 1645 1646 199 155 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1490 1657 1658 1659 1660 1661 1662 1331 1509 586 1663 1664 1665 510 1508 1584 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1354 1676 1677 1678 1679 1680 1681 1682 1683 1684 1610 1535 1685 1686 1613 1687 1688 1689 1690 1691 1692 1693 1694 1369 1695 1696 1390 1697 1698 1699 1543 1624 1700 1701 1629 1702 1703 1704 1705 1706 1707 1708 1079 1709 1710 310 1711 1712 1713 1714 1715 1647 1247 1716 1717 698 1718 1719 1720 1721 1635 1722 1723 1724 1400 1725 1726 1727 1728 1729 1434 1730 1731 1732 1733 1577 1662 1734 1094 1278 692 1735 1736 1737 1738 1739 1740 1436 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 897 1754 1755 1756 1757 1676 1597 1758 1759 1760 1761 1762 1763 1764 1765 1476 1766 1767 1768 1769 1770 1448 1771 1772 1773 49 1774 1775 1776 1777 1778 1779 1780 1781 1619 1694 1782 1783 1784 1785 1786 810 1787 1788 1789 1790 1462 1791 1792 1547 362 1793 1794 1795 1796 1797 1798 1799 1800 312 860 1801 1802 1247 1803 1804 1805 446 1806 1807 1808 1027 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1495 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1741 1666 1834 1835 1171 1836 1837 1838 1839 604 1840 1841 1756 1842 1843 1844 1518 1845 1846 1477 1847 1848 1849 1684 1770 1850 1851 1627 1852 1542 1853 1854 1855 1701 1856 1857 1858 1859 1860 1861 1862 1863 1791 1700 1864 1865 1866 1867 1868 1100 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 440 1889 1668 1890 1891 1892 1893 1894 1895 1896 1897 1819 1734 1898 1899 1900 1901 1902 450 1903 1164 1904 1905 1906 1907 1396 1908 1909 1910 1911 1583 1912 1913 1914 1418 1274 1915 1916 1917 1918 1757 1844 1919 1920 385 1921 1922 1763 1923 1924 1925 1926 630 1927 1446 1611 1928 1929 1930 1931 1932 1933 1853 1782 1934 1935 1936 1937 1938 1623 1939 1940 1941 1942 1943 1944 1001 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 658 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1966 1809 1985 1986 1987 1661 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 1833 1911 2000 2001 2002 2003 2004 2005 2006 2007 1916 2008 2009 2010 2011 2012 1748 2013 1677 2014 2015 2016 992 2017 2018 1851 2019 1924 2020 2021 2022 2023 2024 1862 2025 2026 2027 1928 1850 2028 2029 2030 2031 1931 2032 2033 2034 1693 2035 2036 2037 1863 1938 2038 2039 1621 2040 2041 2042 2043 2044 2045 1950 2046 2047 145 2048 2049 1397 2050 2051 483 2052 1516 2053 1468 1723 1907 2054 2055 2056 2057 2058 2059 2060 2061 2062 1536 2063 1918 1978 2064 2065 2066 2067 2068 2069 2020 2070 2071 2072 2073 1897 1987 2074 2075 2076 2077 449 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 1742 2089 2090 2091 2092 2093 2094 2095 1418 2096 2097 2098 2099 2100 2101 2102 2103 2104 483 2105 2106 2107 2014 1919 2108 2109 2020 2110 2111 2112 2113 2114 2115 2116 2117 1769 2118 1771 2119 1933 2034 2120 2121 2122 2123 1945 2124 2125 1792 2126 2127 2128 2129 2130 2048 2131 2079 2132 2133 2134 2135 2136 2137 2064 2138 2139 2140 2141 1412 1759 770 2142 2143 2144 588 1820 2145 2146 2147 1845 2148 2149 719 1212 1143 1044 861 2150 1503 2151 2152 2148 2153 2154 2155 2156 1506 1043 2157 2158 2089 2000 2159 2160 1501 2161 1472 2162 2026 2163 2164 2165 2166 2167 2105 2168 2169 2170 2171 1843 2172 2173 2174 2027 2117 2175 1854 2176 2177 2178 2179 2180 675 1330 1653 2181 2126 2038 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 674 2192 2193 2194 2195 2196 2145 2074 1406 1015 2197 2198 2199 2200 2201 2202 1910 2203 2204 1867 2205 2206 601 2207 800 2208 2209 2210 443 2211 2212 2213 2107 2171 2214 2215 2216 2217 2218 2219 886 2220 2174 1308 1929 2221 2222 2223 2176 2120 2224 2225 2226 1517 2227 1803 2228 2077 200 2229 2230 2231 2232 2233 1960 2234 2235 1937 1690 2236 2237 2238 1029 2239 2240 2241 2242 1470 2243 264 2244 1428 2245 820 1901 2131 105 1566 504 2246 2247 2248 2249 2250 201 2251 861 312 2252 2253 2254 2255 1551 1290 2256 961 2257 2258 2259 1986 2260 2261 2262 2263 1313 2264 2265 2266 2267 2164 2268 2269 2270 2271 2272 307 2273 2274 2275 1152 2276 2158 2202 2277 2203 2278 2279 2039 1329 2280 2281 2282 1682 2015 2283 2284 2285 2286 2287 2288 2289 2290 2291 2221 2175 2028 2292 2293 2294 2295 2033 2296 2297 2298 2181 2235 2299 2300 327 2301 2302 2303 546 2304 2305 2306 2307 2308 2309 2310 475 2311 468 568 2312 2313 2314 2315 2316 1217 2317 97 2318 2319 2196 2259 2320 2321 2322 847 2264 1138 2323 2324 2325 2326 2327 2328 1651 2269 2329 2330 2331 2332 2315 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 297 1247 2090 2343 2344 2345 2346 2347 2348 2283 2214 374 2227 2349 2350 2351 473 2352 2353 154 2354 2355 2116 1805 146 2356 2357 2043 2358 2359 2360 2361 2223 2295 2362 2363 2364 476 1984 2365 2366 2367 2368 2369 2127 2370 2371 2372 1213 2373 2374 123 2375 2376 2377 2378 2084 1142 2379 2380 2381 2382 2209 2383 2384 2146 2385 2386 2387 1472 2263 2388 2389 1163 2390 1307 2391 87 777 2392 896 2393 2394 2395 2343 2277 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 1613 2409 2410 2411 2170 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2291 2355 2424 2425 2426 2427 2177 2428 2429 2430 2431 1194 2432 2433 2434 2435 2370 2299 1691 2436 2437 1550 2438 1289 2439 2374 2440 2009 2441 2442 2443 2444 2445 2446 2447 353 2331 2448 2449 2450 2451 2452 2453 2454 566 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 382 2466 2385 2320 2467 269 2468 2469 2470 2471 2390 809 2472 2198 2473 2129 2474 2335 2475 2476 2477 2478 2479 2480 2481 2482 2483 2201 2484 1568 2485 2486 2487 2488 2348 2411 2489 2490 353 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2222 2501 2502 2503 664 759 2123 2504 2505 2506 900 2507 2508 2428 2362 2509 2510 1028 500 2511 2512 2513 2514 2234 1251 2515 2516 2517 2518 2519 1606 2242 2520 300 2521 2522 2523 2524 2525 286 2526 834 2527 683 911 2528 2529 2530 2531 2532 2533 2534 2535 2183 1399 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2258 2328 2546 2547 2548 2549 1980 2550 2551 308 11 2552 2553 2554 2555 2556 2557 2558 2559 2395 2483 2560 2051 1093 2561 2562 2563 2564 2486 2565 2566 2284 2567 2568 2569 2570 2571 2572 1606 2573 2574 2575 2576 2577 2578 1807 2579 2501 2424 2580 2581 2582 2583 2584 2585 2586 2278 2587 2588 2589 2590 2591 2592 2294 2376 2593 2594 2595 2596 246 2597 2598 2599 2239 2510 1982 2600 2601 2602 2435 2514 2603 2604 1390 2605 2606 2353 2607 2608 2609 2610 1836 2611 2005 2612 2613 2614 2615 1837 2616 2617 2618 2619 2466 2545 2620 1162 2621 2622 2623 1641 1783 2624 2625 2626 2627 2628 2629 1939 2440 2630 2631 2632 2633 2344 2634 2635 2636 2637 2638 648 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2567 2489 2654 2655 2656 2657 2658 2659 2660 2661 2354 2662 2030 339 2588 672 2663 2664 1300 2665 2508 2592 2666 2667 2668 2669 2670 1378 1975 2671 2672 2673 2674 2675 2676 2371 2677 2678 2679 2680 1606 2681 2682 568 2683 834 2684 2685 2686 2687 2688 2445 2689 2690 2691 2692 2693 2694 2695 2696 2697 2087 2698 753 2699 2700 2701 2702 2386 2703 2704 2705 2561 1095 2706 2707 1927 1046 2708 2709 2710 2711 2712 2713 2478 2714 2715 2716 2717 2631 2718 2719 2720 2634 2560 2721 2722 2723 2724 2725 2645 2726 2727 2728 2729 2143 2730 2731 2732 2410 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 1158 2743 2744 2745 2746 2579 2661 2747 2748 2749 1102 2750 990 2751 2752 2753 2754 2755 2756 2757 2429 2758 2759 2760 2761 2762 2763 2764 2765 2766 1262 2767 2768 2769 2770 2771 2677 2603 2772 2773 2774 2775 2776 2777 2527 1246 757 565 2778 2441 2779 2722 1017 2780 2781 2782 2783 2784 2785 2556 1497 2352 2786 2787 2788 2789 2703 2620 2790 2791 1047 2792 2793 2063 2794 1545 2795 2796 2797 2798 2799 2800 2801 1230 1954 2802 2803 2804 2482 2805 2806 2807 2808 2809 2607 2810 2811 2812 2813 2814 2815 2304 2816 2817 2818 2819 2820 2821 2822 2823 2653 2732 2824 2825 2826 2827 2828 2576 2671 2744 2829 2830 2831 2832 2833 2502 2834 2835 2836 2837 400 2838 2839 600 2840 1553 2841 2842 2758 2666 2843 459 2844 2845 2846 2513 2334 2847 2848 2849 2516 2850 2851 2852 2853 2854 2855 2856 2857 1948 2858 2859 2860 2688 2698 2861 2862 2863 2864 2865 2866 2078 2867 2868 1564 2869 2870 2871 2872 1549 2154 1301 2873 2874 2544 2875 2876 2877 2878 2879 2644 2880 2881 2882 2883 2796 135 2884 2885 2667 2886 2200 2887 2888 2889 2890 2715 2891 802 2720 2804 2892 2893 2894 2097 2895 2896 2897 2898 2899 1171 2568 2900 2901 2902 2903 2904 2819 2905 2906 2907 2834 2747 2908 2909 2591 2910 2760 2593 2911 2612 2912 2913 555 2914 2771 2846 2915 2916 2853 2917 491 2918 2919 2857 2920 244 2921 1498 2555 1098 2231 2922 2923 1205 2924 2925 2460 2926 2927 2928 2929 2309 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2663 809 2942 2943 2944 2573 2945 1841 2946 2947 2948 2789 2874 2949 2950 2951 1829 2952 631 1431 2060 1883 2953 2954 2481 2955 2635 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2900 2824 2968 2969 2970 2971 2972 2973 2974 2975 2829 881 2976 2977 2978 2979 2660 2980 2981 594 2842 2909 2982 2983 2984 2985 2986 2987 1944 2678 2988 2989 2990 2848 1949 2991 2992 2849 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 839 3003 3004 3005 3006 3007 1097 1191 3008 3009 3010 3011 3012 3013 2461 3014 3015 3016 3017 3018 2710 2507 3019 2037 3020 3021 2704 3022 3023 1935 3024 3025 1437 3026 3027 3028 2070 3029 2583 3030 2822 3031 3032 2227 3033 3034 3035 1352 3036 2278 3037 3038 3039 3040 2956 2892 3041 3042 2382 3043 2135 2648 3044 3045 1998 3046 3047 2378 3048 3049 2731 2246 3050 3051 2971 3052 3053 2907 2979 3054 3055 3056 6 2759 3057 3058 3059 2988 2915 3060 3061 2694 3062 3063 753 3064 1952 698 2999 3065 3066 3067 96 2939 3068 3069 3070 3071 3072 1007 532 3073 1992 3074 3075 3076 3077 3078 3079 3080 1269 3081 3082 3022 2949 1348 3083 3084 3085 3086 3087 3088 3089 2973 3090 1659 3091 3092 311 3093 3094 3095 3096 3097 3098 2803 3099 3100 3101 2967 3049 3102 3103 3104 2602 3105 1138 3106 2835 3107 3108 3109 3110 2378 3111 3057 2982 2779 3112 3113 3114 3115 2845 3061 3116 3117 3118 1804 3119 3120 3121 3122 3123 3124 3065 3125 3126 3127 3068 3128 3129 3130 3131 3132 1758 3133 3134 2253 3135 3136 3137 3138 3139 2366 3133 2430 103 3140 3141 2417 1227 3142 3143 3144 2873 3145 3146 3147 1310 3148 2836 3149 3150 3151 3152 3153 3154 3040 3098 3155 3156 3157 2930 259 1957 3158 2901 3159 3160 3161 3162 205 3163 3164 3165 3166 3167 1463 3168 3107 3054 3169 3170 2908 2306 3171 3172 3173 3174 3175 3176 3177 678 3178 2413 55 3059 3115 3179 2636 3180 3181 3182 781 3183 1760 3184 2431 3185 1287 1557 3186 3187 3188 1787 3189 3190 3191 3192 3193 3194 3195 1996 3196 3197 3198 3199 3200 1576 1631 3201 3202 490 3203 2488 3204 3205 3206 3207 3208 1465 3209 3210 3211 3212 3213 3214 3082 3144 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 1097 2230 3226 1754 3227 2957 3228 3229 3230 3103 1763 3231 282 3232 3233 3234 3235 3236 3159 3102 3237 2621 3238 3239 3240 3241 3166 3242 3243 3244 3245 2978 3246 3247 3248 3111 3170 3249 2356 1595 3250 3251 678 3252 3253 3254 3255 2989 3256 3257 1049 761 3258 2741 3259 3260 3261 2572 2753 3262 3263 3264 3265 3266 3267 3268 3269 3270 125 3271 3272 3273 2379 1144 3274 105 3005 3275 3276 2417 1085 2708 3277 3023 3278 3279 3280 3281 3282 3283 3284 1869 3285 2322 3286 3287 3161 3288 3152 3289 3290 3291 2339 1434 3292 3228 3155 3293 3294 3295 2004 1320 2616 3296 3233 3297 422 3298 1074 3299 3300 3301 3302 3303 3048 3304 3239 1932 3168 3245 3305 3058 3306 3307 758 3308 3242 3309 3310 2375 3311 3312 2613 3313 3256 3179 3314 3315 3316 3317 3318 781 3319 2599 3192 587 3320 3321 3322 3323 3324 3325 3326 3327 3328 3208 2153 3329 3223 2384 3330 1633 3331 3332 3333 3334 2721 3335 3336 3337 3338 3339 3340 3341 1280 3342 3278 3215 3343 3344 3345 3346 68 3347 3348 3349 3097 3350 3351 3352 2212 3353 3354 3355 3356 3357 3236 3303 3358 3359 3360 3361 280 3362 924 3119 2227 2052 3108 3363 3364 357 56 2412 3365 3306 3249 3366 3367 2688 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3114 3379 3380 3381 3382 2940 3383 3316 856 2739 2738 3384 3385 1557 3386 3387 3388 3389 3390 2882 3391 3392 3393 3394 3395 3396 3397 2013 3398 3399 3400 3401 3402 505 442 3403 3404 3405 1715 3406 3407 3408 3409 3294 3410 3411 3412 3413 3414 3340 3415 3416 3417 3418 3143 3284 3419 3420 3421 3422 3423 2496 3424 3425 3292 3349 3426 3427 3428 3429 2869 3430 2082 3431 3432 3433 3434 3435 3296 3160 3436 3437 3438 3439 2628 3440 3441 3442 3443 3363 3305 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3169 3455 3324 3456 3313 3378 3457 3458 3459 3460 3461 3462 3093 593 3463 680 3464 2083 3465 3466 3467 3468 1935 3469 2895 1286 3470 3471 3472 3473 1485 3474 497 671 3391 110 3475 3476 3477 1913 3478 3479 3480 3481 3482 3483 3484 2930 3485 3486 3487 2722 3488 525 3489 1810 3490 3491 3342 3418 3492 3493 1324 3494 3229 3495 3496 2096 3497 3015 3498 3499 3500 3501 3502 3503 3504 3505 3506 3175 3507 1004 3508 3436 3358 3261 2416 3509 3440 3510 3511 3512 3513 3244 3514 3515 3320 3516 3517 3518 3365 3454 3519 3520 3521 3522 3257 3523 3524 3525 3526 3527 3528 2694 3529 2260 3530 743 3531 3532 3533 3534 2532 3535 502 3536 3537 2580 3538 3539 3540 1651 3541 3542 3411 3543 3544 3420 3545 3546 3547 3548 3549 3550 3551 3332 3552 112 3553 3554 3555 3556 3557 3558 1779 3559 3560 3279 3561 3562 3563 2092 3564 3565 1361 3566 3567 3495 3426 3568 3569 3570 3571 3572 3153 3573 3574 2627 3575 3576 3577 3578 3579 3580 3504 3030 3581 3582 3583 3584 3585 3172 3586 3587 907 1026 3588 1983 2509 3589 3590 3302 3591 3592 2827 3593 1932 2341 3594 2503 3242 3443 3513 3595 3307 3596 3597 3598 1857 2984 3599 3464 3600 3328 3601 2438 3407 3602 441 3603 3604 3605 3606 3607 3608 3609 3523 3457 3610 3611 3612 3613 2497 3614 3615 2262 3616 3617 1294 3618 3619 3620 3538 2557 3621 2480 3622 3623 3624 3625 3626 3482 3627 3628 3629 3630 3631 3632 3633 2930 3634 1672 1963 3635 3636 3561 3492 3637 3638 3348 3639 3640 3641 3642 1122 3643 3644 3645 3030 1267 3646 632 3647 3648 3649 3508 3590 3650 3651 3652 3653 3364 3654 3655 3656 3596 3519 3657 3658 3659 3660 3193 2598 3661 3662 2493 3663 3605 3520 3517 606 3664 1150 3665 3666 3667 3668 3377 3669 1795 3670 3671 3672 3673 3674 3212 2353 3675 3676 3677 3678 3507 3679 3680 3544 2507 3681 1434 3241 3682 3683 3684 3685 3686 418 3687 3253 1418 3688 3689 3690 3691 3692 3417 3693 1814 3694 513 2254 3695 3225 3696 3697 3567 3638 3698 3699 891 3700 3701 157 928 3702 3703 3704 3705 3706 3707 3437 3708 3709 3710 3654 3595 3711 3712 3453 1888 3713 3408 3714 3715 3296 3716 435 3717 3609 3668 3718 3719 3720 3721 3722 3723 2977 618 3724 3725 3726 3727 3728 3201 3729 3730 3731 2996 3732 3733 3734 3735 3392 725 3736 2658 3737 1214 3738 3739 3740 159 3741 3742 412 3743 3744 3745 42 1346 3636 3692 3746 3747 3748 3749 3750 3751 3752 3496 3753 3754 1232 3755 3756 3757 3758 3759 3760 3761 3762 3763 3708 3650 534 3764 3765 3766 3767 138 1793 2675 3768 3769 3770 3771 3772 3773 3594 3774 2085 3273 3775 3776 3512 3656 3712 3777 3717 2405 3180 3778 3779 3780 3781 2775 3782 3783 1444 3516 3524 3784 3785 949 3719 274 616 3786 168 3787 3788 3789 3618 3790 3791 821 2131 3792 3793 3794 3578 2897 3795 3796 3797 3798 3029 3799 3800 1603 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 2973 3811 3812 3503 2540 3813 3814 3815 2827 3446 3816 3817 3818 3552 3562 3819 3820 3821 2103 3822 1255 3823 3824 3825 3753 3698 1342 3826 3827 3828 2318 3829 3830 3831 3832 2950 3833 3834 3835 3836 1486 3837 3838 3839 3840 3841 3589 3842 3843 3844 3845 3846 3538 3847 2293 3848 3710 3776 3849 3597 3850 3851 3778 715 3852 3853 3188 3854 3855 3784 3718 3856 3857 3858 3859 3860 3861 1491 1262 3862 3863 3864 3865 3790 578 3866 3867 3616 3868 3869 3870 3871 3872 3873 3707 3799 3874 3875 2434 3250 3876 3877 3878 3879 3880 2115 3881 3882 2959 3883 2228 155 2606 3884 3885 3886 3887 3888 3889 3890 3819 3746 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3637 3902 3903 3904 3905 1713 1875 3906 3907 3908 3909 3910 3911 3912 3913 3914 3763 3841 3915 3916 3038 3917 3918 3919 3920 3655 3921 3922 3923 3781 3924 3925 3850 3777 3926 3927 3928 3929 3930 715 1245 296 2613 3931 3932 3188 3933 3934 3667 3935 3936 3937 3938 2219 3939 3940 3122 3941 3942 3943 3794 3944 3945 1061 3380 3946 722 3947 3674 155 3948 3949 2910 3950 3951 3691 3952 3953 3954 3955 3956 3010 3825 3901 3957 3958 2645 3959 2632 3960 2558 3961 3962 3963 3964 3965 1097 3709 3966 3967 3968 3969 3970 3971 3921 3849 3972 2935 3973 3974 3975 3711 3976 3977 3978 3979 3980 3927 3981 113 3818 3855 3934 3982 3983 188 3984 3985 3986 3987 3988 3989 3990 3406 1459 3991 3992 788 3993 2053 1192 1096 3994 3995 3996 3997 3998 3999 3069 4000 4001 2266 4002 4003 1355 4004 3874 4005 3808 1732 4006 4007 4008 4009 4010 4011 4012 2491 2537 4013 4014 4015 4016 4017 4018 4019 2853 4020 4021 4022 4023 3890 3951 4024 3754 4025 4026 386 4027 2645 4028 3961 4029 4030 4031 4032 4033 4034 418 4035 4036 4037 2876 4038 174 4039 3966 3915 4040 4041 4042 4043 4044 3775 3932 4045 4046 4047 202 4048 3716 2638 4049 3928 3980 4050 3925 3975 4051 4052 4053 2301 4054 4055 4056 3785 4057 4058 3859 1323 2042 3405 4059 1876 4060 4061 17 4062 4063 4064 4065 4066 1977 3998 3727 4067 4068 4000 781 4069 4070 4071 4072 2132 4073 4074 4075 4076 4077 2431 4078 4079 4080 4081 4082 4083 1493 4084 4085 3151 4086 4087 4088 3867 1829 4089 3820 4090 4091 4092 3081 4093 4094 4025 3957 4027 4095 4096 4097 4032 3327 4098 571 4099 419 4100 4101 4102 4103 4104 4105 4106 3840 16 4107 4108 4109 4110 4111 1976 3970 4112 4113 4114 4115 3971 4044 4116 4117 4118 4119 1458 3029 4120 4121 2063 4122 3851 4123 4124 4054 4125 4126 4127 4057 3982 4128 4129 4130 4131 4005 1731 4132 3992 3676 4133 4134 3126 4135 4136 3997 4137 4138 4139 1391 4140 4141 4142 4143 4144 2701 4145 4146 4147 1111 4079 4148 4149 1302 4150 32 4151 4152 4153 4154 4155 4090 4024 4156 261 2832 3759 3267 929 4157 4158 3900 4159 4160 4161 4162 4163 4164 3760 4165 524 3705 2934 4166 4039 4106 4167 3640 4168 4169 4029 4045 4170 3983 291 1314 4171 4172 4173 4174 1723 4175 3922 4176 4177 4120 2020 4178 1842 4179 4180 4181 4123 4051 4182 4183 3933 4184 3865 4185 4186 4187 4188 1696 4189 4140 4190 4191 4192 4193 2148 1476 4194 4195 4196 4197 4198 4199 4200 4201 4202 4150 3430 1105 4203 4204 4205 4206 4207 3950 4208 4209 4210 4211 3198 4174 4094 4158 4212 4213 1943 4214 4215 1069 4216 977 4217 4218 2863 4219 4220 4221 4222 4223 1959 4224 4225 757 4226 4227 4228 4229 4230 3967 4231 4232 4233 4234 4235 4236 4237 3533 4171 4238 4239 4240 2324 3402 4241 4242 2840 4243 4244 2456 4245 4176 4116 4246 4247 4248 4249 4250 3974 3131 2415 4251 4127 4183 4252 4253 2358 1323 4254 4255 4256 3795 4257 3905 4258 4259 4260 4261 4262 4263 3125 3385 3537 4264 2970 713 4086 2152 3207 1157 4265 4266 4267 4268 1321 2336 4269 3945 4270 4271 4272 4273 4274 4275 4276 4277 4148 4278 3782 2777 1563 2080 3430 4279 3012 4203 4155 4207 4280 4281 4282 2707 4026 4283 4284 1290 4214 4285 4286 4029 4287 4288 4215 2318 4289 4290 2912 4291 4292 4293 4294 4295 4296 3979 4238 3740 4297 4298 3087 4299 3762 4300 4301 4302 4303 4304 4231 4167 4305 4306 1221 4307 4308 4238 4309 4310 4311 4312 4313 4314 4315 4316 4043 4317 4318 4319 4181 4250 4320 4058 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 3845 4100 4034 4332 3373 4333 4334 4335 4336 4337 4338 4265 4339 4340 4341 4342 4343 3510 4344 4345 3284 4346 678 4347 4091 4348 4349 4350 4351 1691 4352 4353 4354 4355 4283 4212 4356 4029 4357 4358 4359 3729 1092 2342 910 4360 4361 4362 4363 733 4364 4137 4365 2875 4366 1625 3415 4367 2206 4368 4369 4370 4105 4371 4372 4373 4374 4375 4376 4377 4251 2417 4245 4316 4378 3958 2296 387 4124 4379 4380 4381 2312 4382 4383 4321 4252 4193 4384 3601 4385 4386 1204 3796 1877 3024 3604 4387 4388 4389 813 3035 4390 4391 4392 4393 4394 4324 3556 2497 1375 4395 3284 4396 4397 4398 4399 4400 1389 4401 1828 2688 4402 4403 4404 4405 4406 4018 4152 4407 4348 4280 4408 1725 3451 4409 4037 4410 882 4411 4412 4413 1718 2178 4070 4414 4415 295 4416 2614 4417 4418 4157 3955 2692 4419 4420 4421 4422 4423 4424 4425 4304 4370 4426 4427 4428 4429 4430 4431 3600 4177 4432 4433 4434 4379 4320 4435 4436 4182 4437 4438 602 3693 4439 4041 850 4440 4441 1612 4442 4443 2537 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4206 4460 4461 4462 4463 4464 4465 1776 1062 4466 4467 2659 4468 4355 4418 4469 4470 4471 4472 4473 4104 4221 4474 4475 1182 4216 4476 4477 1118 816 4478 109 924 3815 4479 3345 4480 4232 4481 4482 4483 4484 4138 4485 4486 4487 4488 4432 4378 2367 4489 4490 4491 2951 4492 4493 4494 4249 3039 4495 239 1540 4496 1780 4497 4498 4499 4383 4436 4500 4501 4502 4503 3912 4504 4505 4506 4507 4508 4509 1615 2497 4510 1955 1232 4511 4512 1467 4455 4513 3828 4514 4276 973 4515 4516 4517 4518 1365 4519 4407 4459 4520 4521 4522 4523 4460 2672 4524 4525 1866 4526 4527 4528 4529 4284 4530 4531 4532 3679 1005 528 4533 702 4534 4535 4536 4537 4538 4539 1388 4540 2456 1084 2783 2237 4409 1222 4541 4542 4481 4426 4543 3587 4544 4073 4545 4546 4547 769 4548 4549 4550 4315 4551 4552 2368 4434 4494 4553 4554 4555 2016 4556 4557 2829 4558 1879 4559 4322 4560 4561 3669 1377 4562 4563 4564 4565 4566 2262 4567 4568 4512 68 3008 4569 4570 4521 4288 4513 4571 4572 4573 3311 4574 4575 4576 1376 3613 4577 3639 4578 4349 4579 4580 4581 4582 4583 398 3089 4296 4584 4530 4469 1703 661 4585 4586 4587 4534 2605 1183 4588 4589 4590 2756 1812 4591 4592 4593 4594 4595 4596 4597 4369 4598 4599 1239 4547 1983 4600 4601 1480 3177 4488 4550 4602 4603 240 4604 4380 4605 4606 2289 4607 4608 4609 4555 3868 4610 4560 4500 4611 4612 2297 4613 4614 3397 4312 2522 2987 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 1951 4625 4626 4573 4627 2453 2184 2535 381 4628 949 4516 4629 4630 4631 4579 4520 4632 3566 4633 4634 3088 4635 4636 4637 141 4638 4639 4417 4640 4641 4642 637 4643 4644 4645 4646 2457 4647 4648 4649 4542 4597 4650 1825 2236 4651 3105 4652 4653 4654 4655 4656 4433 4657 4658 4335 4659 4660 4661 4662 4496 4663 4605 4553 4664 4665 4666 1975 4667 4562 4668 4669 4435 4451 4670 4671 4672 4575 4673 4674 4675 4676 4677 4678 4679 2226 4022 4680 4241 3876 1594 4681 4568 3346 4682 4683 4684 4685 1975 1617 4686 2613 4687 4571 4688 4616 4689 3647 4404 4690 4691 4692 4693 305 4694 4695 4696 4458 4092 4697 4698 4584 4639 4699 4700 4701 4702 4703 2049 4704 4705 4706 4707 4482 4708 4709 1139 4710 3673 3847 3920 4711 4712 4657 4602 4713 4714 4683 4715 3924 4278 2858 4716 4125 4717 4718 4719 4720 4721 4493 4610 4669 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 2267 4733 4734 4735 4736 4526 1023 4737 3704 438 4738 4117 4739 4740 4741 4742 4743 4631 4696 4744 4745 4746 2672 4747 4748 4325 4749 4750 4751 4531 4752 4753 4754 4755 4756 4757 1107 4758 4759 4760 4761 4762 4708 4650 3531 4763 4764 4765 2681 2184 4766 4767 3788 4768 4769 4770 4771 4772 4549 4663 4721 4773 4774 4775 1974 4561 4776 4777 4613 1478 853 3842 4778 4779 4780 4781 4782 4783 3315 4784 4681 4175 1467 1357 1632 4785 4289 4416 1091 4786 4787 4788 4789 4790 4791 2114 4792 4793 4794 4795 4010 4796 4797 2245 4798 4578 4799 4800 3583 4801 4515 1717 4802 4803 3736 4804 4805 3995 3786 4580 4806 4807 727 4808 4809 4810 4752 4699 4811 4812 4813 4457 4754 4522 4814 4815 4596 4816 1200 592 1424 4817 4818 4819 4820 4821 4822 4823 1996 4824 4825 4622 4826 2100 4827 4258 4496 4828 4712 4772 4829 4830 4831 1581 4606 4832 4833 4834 2922 4835 1021 4836 4837 4838 2861 4839 1123 1698 4559 4840 4776 4722 4841 4842 3042 4843 4844 4845 4846 4487 4847 4848 3172 4849 3331 407 4850 4851 4852 4853 4854 4855 3829 2838 3247 1339 4856 4857 2940 4858 4806 4744 4859 2570 4860 3880 4861 4862 4863 4864 4279 4865 4866 4867 4868 4869 4638 4870 4871 4872 4873 4537 1183 4762 4815 4874 4875 4876 4877 4878 3632 4879 2753 4180 1225 4880 4881 3959 2321 4882 1338 4658 4883 4884 148 4885 4886 4887 4832 4773 4888 4667 4775 3836 4595 3551 4889 4890 4668 1764 3397 4891 4787 3130 1503 4892 4893 4894 4895 2452 734 4896 4817 4897 4898 421 4009 4899 3153 4900 4901 4902 3370 4903 4904 4905 1218 4731 4906 4907 4908 516 4909 170 4910 4911 4404 4912 4913 4543 4022 4914 3607 4915 4916 4917 4918 4919 4920 4695 4299 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 365 4934 4737 1383 4810 4869 4935 4936 4937 4938 4939 4940 4941 4709 4942 4943 4142 4944 4945 4946 3804 4947 4948 4883 4829 3329 4949 4950 2768 1921 673 4951 4952 4763 4953 1973 1377 4954 4955 4720 4956 4957 4844 2816 4958 4959 4960 3551 4961 1018 2722 4962 4840 4890 4963 4735 3132 4377 4964 246 3314 4965 3599 4431 3350 4904 4966 4967 4968 4898 4969 2420 2286 4970 4971 4972 4050 4973 4974 1231 4975 4976 4977 4978 4979 4980 1990 4981 4982 4672 3607 4983 4471 4984 4442 2735 4985 4986 635 4987 4858 4920 4988 1761 2602 4989 4990 4938 4865 4753 4991 4992 4993 3651 4994 4995 847 4996 4997 4998 4999 5000 4942 4874 5001 5002 5003 3276 5004 2753 4917 2657 5005 5006 5007 4771 4951 5008 2566 4887 4955 5009 5010 5011 2451 4959 5012 3172 5013 2521 5014 4962 3576 5015 4777 5016 5017 5018 731 5019 5020 3352 5021 5022 747 5023 4692 5024 5025 4173 5026 3927 5027 5028 1218 5029 5030 3800 1202 5031 5032 5033 3375 4715 4807 5034 5035 5036 5037 5038 5039 5040 5041 5042 2781 5043 5044 4991 4935 5045 5046 5047 5048 5049 4423 221 764 5050 5051 5052 4814 3033 5053 5054 5055 5056 5057 5058 4202 4254 5059 5060 5061 4948 5007 5062 5063 5064 5065 5066 4867 5067 5068 2446 2537 5069 1304 5070 4833 5071 5072 5073 5016 4963 5074 5075 5076 1997 1349 5077 5078 5079 2917 5080 5081 3782 5082 1295 5083 2530 3510 5084 5085 5086 4608 5087 2880 4803 5088 5034 4988 5089 1564 2784 1895 5090 5091 5092 5093 4868 5045 626 5094 5000 5052 5095 2797 5096 2368 3149 5097 5098 5099 5100 5101 5102 1885 2778 5103 4880 2879 764 5104 4882 4884 5105 5106 3526 1335 5107 5108 4275 5109 5110 5111 3209 5112 3509 5113 5114 5071 5009 5115 5116 1592 5117 5118 5119 5120 933 5121 343 5122 5123 5124 5125 4889 4089 4402 2860 5126 222 2290 5127 4791 4465 5128 3375 5129 5130 4382 5131 2538 462 5132 1367 4607 870 5133 5134 4919 5135 763 5136 5137 5138 1789 5139 5140 4508 4267 2006 5141 5142 5143 5144 5044 5093 5145 5146 5147 5148 5149 5150 5151 4943 5152 5153 5154 1148 1923 52 5155 5156 1762 5157 5158 5159 5160 2525 3687 1644 5161 5162 5105 5062 657 5163 5164 5165 2268 5050 5166 5167 5168 5169 5170 4954 5171 5172 5173 5174 5121 4478 5175 2008 2249 4438 5176 2206 5073 5125 5177 5178 5179 5180 12 5181 4968 4264 2470 1039 5182 4415 5183 5184 4473 5185 4743 4947 5186 5187 5188 3835 5088 5134 5189 784 5190 5191 5192 5193 5194 4992 5195 5196 5197 1141 5198 5199 5152 5095 2204 5200 2549 5154 5158 5099 5201 5202 5203 5204 5205 5006 5206 5207 3689 2220 4007 5208 5114 5170 5209 5210 5211 4961 5017 5212 5213 5214 5215 5216 4261 4487 5217 5218 4071 5219 5128 3715 3923 5220 568 5130 5221 5222 5223 5224 34 2163 74 5225 3576 5226 4527 2216 5227 5228 3990 5229 5230 5231 4102 5232 5233 4274 3554 5234 5035 5235 5236 5237 1309 5238 5239 5240 4532 5241 5242 5243 5244 5195 5145 5245 17 5246 5247 5248 5249 5250 5251 5051 4826 5079 4901 5252 1942 4313 5253 5254 3465 5162 5205 5255 5256 5257 5258 5207 5259 5260 5261 5262 5263 5008 3533 5069 5072 5264 5265 5266 840 1381 5267 5212 5177 5268 5269 5270 3474 5271 5272 3382 5273 5274 5221 2559 5275 2407 5276 5277 5278 4835 5279 2872 5280 4871 5281 5282 5283 5284 5285 4337 1891 5286 2622 5252 4401 5032 2207 5287 761 5288 5289 5290 5291 5219 5182 5292 5235 5189 2902 5293 5294 5295 5296 5092 5297 3254 5161 5298 5299 626 5199 5251 5300 5301 4341 4453 5066 5274 4857 5302 2075 2809 5106 5303 5304 5305 5306 2547 5307 5264 5209 5308 5210 4594 5309 5310 5124 5311 5312 2867 5096 5313 5314 5315 5316 5317 5318 5319 2559 5320 5321 5322 5323 5324 5325 5326 5327 1138 718 5328 5329 3087 2751 5330 5331 3752 5332 5241 5333 1367 5334 2665 1552 4491 2443 4402 5335 5336 5133 5337 5338 5339 3518 623 5340 2954 5341 5342 5343 5344 5345 5244 5296 5346 5347 2656 5348 5023 5349 2200 3935 5350 260 5153 5351 5352 3948 2378 5353 5354 5355 5356 5357 5358 5359 5360 2050 5361 5362 5363 5364 5365 5303 5255 5366 4163 5367 2302 3362 5368 5369 5370 5169 1800 5371 5372 5267 5310 5373 4084 5374 5375 5376 1015 219 5377 5378 716 5379 5380 5381 5382 5383 3064 4501 5384 3826 2270 5385 773 4617 5331 4118 5386 2756 5387 5388 5389 5390 5115 5391 5392 5292 5336 5393 5394 5395 5396 1402 5397 3452 5398 5399 5400 5401 5402 5403 5404 4540 436 5108 5405 5406 5196 5407 5408 5409 806 5410 5254 5411 4430 5412 5413 1890 5414 5351 5300 4198 1774 5415 3543 3410 3853 5416 250 2552 5417 3220 5361 2007 2250 5418 5419 5420 5204 1053 5421 1669 2646 387 5422 5423 5424 5425 5426 3677 5427 5428 5429 5430 5307 5370 5431 2974 5432 5433 5213 5434 5435 5436 5141 5437 2161 941 3817 4837 5438 389 5439 4618 4318 5440 4068 780 5441 5442 4247 5443 5444 5445 5446 1706 5447 5448 5449 5450 5451 5452 5453 5454 5455 2524 5456 5388 3903 5236 5457 5458 5194 4375 5459 5460 5407 5346 5461 172 5462 5463 5464 5465 5466 5467 2627 5365 5420 5468 5469 5470 5471 5472 809 5473 5474 5277 5475 5265 5476 5477 5478 4427 5479 5480 5481 1017 5482 5434 5373 5483 5484 5485 3334 5486 1472 5487 5488 5489 5490 1735 1363 5491 4503 689 5492 5493 5494 5495 5496 5497 5498 3356 5499 2943 5500 3217 5501 5502 5262 3868 5503 3833 5504 5457 5393 5505 1063 5506 5507 5411 2200 5508 3480 4028 5509 5510 4925 478 2676 5511 5512 5513 5295 5514 4195 5515 390 483 2705 5463 5314 4552 5516 5338 5019 5517 5518 5519 5304 5520 5521 5522 4205 4265 5523 5476 5431 5524 5525 5309 5526 5527 3070 1319 5528 5529 1699 2934 3873 5530 5531 4691 5487 2125 5532 4895 396 5533 5399 5534 2800 3767 5535 5536 5537 5538 5539 5466 1228 5540 1650 1730 5541 5542 5049 5543 5544 5545 5335 5546 5547 2086 3401 1965 5548 5549 1579 5550 5460 5513 5551 1749 5552 5553 5554 5555 5556 41 5557 1347 5352 5558 5559 5560 5561 2936 5562 5563 3779 4970 2665 5564 4400 4313 5362 5565 5520 5468 5566 1995 1112 5301 5567 5568 5076 4876 5569 5570 49 1860 5571 1505 687 5572 5573 5369 5574 3866 5575 5482 5525 5576 5577 5578 1838 5579 4646 5580 5581 5582 5583 5448 5584 3037 5585 5586 5587 5588 5589 5590 5591 4666 5592 5593 5594 5595 5596 5597 2125 5598 2172 5599 5600 5601 3301 5354 5602 5603 5504 5545 5604 5605 2183 5271 5606 2073 5607 4356 3186 4046 5608 5609 5610 5611 5612 5613 5408 5614 5615 5382 4517 5616 5617 5136 1554 1273 5618 5619 5620 2373 5621 5622 2986 5623 5624 5625 5626 5627 5628 4204 5629 5630 5631 5632 5633 5419 5634 5635 5636 5637 3985 5638 5639 3120 1100 5640 3689 5641 5523 5573 5642 3585 1724 2816 5435 5643 5644 5645 194 5646 1567 5647 5493 5507 5648 4965 4055 5649 4701 5650 3355 5651 5593 3871 3584 495 5272 5652 1479 5653 5654 5655 4440 5656 5542 5657 5658 5458 5659 5660 5661 2113 5662 5663 5664 175 5665 5666 5667 5668 5614 5551 5669 5670 5116 3797 2109 4420 4892 5671 3686 5672 5673 5401 5565 5633 5674 1210 5329 5675 5323 5676 5229 5571 5677 3529 5477 5678 5679 5680 2032 5681 5682 1017 3487 5683 5643 5576 5684 5685 2948 4853 3607 5443 3148 5686 5687 3916 4604 4495 607 5688 5689 5690 5691 5692 653 5693 5694 5695 5696 3871 5697 5599 5208 5698 5699 5587 5700 4063 5631 5701 4067 5702 5703 3296 5129 5704 4717 4451 5705 5659 5604 4586 4376 5194 5706 4085 4164 5707 4922 5708 5709 3430 5089 5710 5711 5712 1296 5713 4209 5714 5715 5512 5716 5717 5718 5020 418 5671 5719 5173 5720 5067 2369 5314 5178 4676 865 5721 5722 5723 1652 5306 5653 5724 5725 4191 5726 5727 5728 2261 2642 5503 5521 5729 5730 5731 5732 5733 1832 5734 3801 5735 5736 4132 5281 5737 5075 5738 5739 2285 5740 218 1674 5741 5678 5642 216 5742 5743 967 5744 187 5590 5745 3372 5746 5747 5524 5025 958 5748 5749 5750 4271 5751 1695 5752 2852 4989 5753 5754 241 5755 5490 5756 5757 1368 869 5758 1729 1790 1930 5759 5760 2927 5761 5762 5763 5456 5764 5765 5766 5767 5768 5769 5770 5771 2884 3021 4984 5772 5773 5544 5774 4451 5775 5737 2515 5776 5668 5715 5777 1208 5340 5778 5779 5780 4637 5297 5781 5782 5559 5783 5784 5785 1071 5786 5787 5788 5789 5790 5729 5674 5735 5791 1859 5792 5005 5793 5794 5795 5796 5797 5798 5799 1529 3320 5800 5801 5802 5572 5481 5803 2723 5683 5747 5804 5805 4564 5806 5119 3085 5807 5808 5809 451 4566 1398 5810 5811 5812 4071 5813 5360 3220 5814 876 5815 5816 2694 5817 5818 5819 5820 2946 5821 5822 5617 2163 5823 5824 5825 5826 5187 3473 5289 5705 5773 5827 5828 5829 760 5830 1945 5597 5831 5832 2298 5833 5834 5835 5615 5836 5837 2926 5838 5839 5840 3602 5841 5842 5728 1057 5843 3903 193 5844 5845 5632 5846 421 5847 3675 2985 5791 5848 5849 5850 5797 2929 5851 5741 5802 5852 5853 5854 3320 5644 5855 5856 5501 5857 5858 4192 5859 2381 5808 488 5860 4156 5861 1958 5862 4827 5863 457 5864 5865 5866 2850 5867 5868 5869 4505 5870 5871 5872 5268 5552 5873 3208 5580 5874 5875 3488 3339 5876 5877 5049 5878 5879 5880 5660 5881 5882 5883 5884 4486 5622 5885 2521 5886 245 134 5471 5887 5888 5889 5836 5777 27 4336 5890 5891 5892 2017 5893 5894 5895 4385 4441 3338 1643 5896 5781 5790 5845 5897 5898 3445 5899 5900 4702 5901 5902 5903 5904 5905 5848 5228 5906 5907 4465 5679 5908 5909 5910 5911 5912 5080 5913 5914 5915 5650 5916 5917 5855 5804 186 3392 5918 5919 5920 5921 5922 3429 5923 5924 5925 1372 5926 5927 1314 5928 5929 619 5930 5931 5932 5933 5934 2766 5935 5881 5827 5936 4822 3769 5937 4812 5938 5939 2883 245 5940 5941 5714 3695 3136 5546 2017 5942 5943 5944 5945 5750 5588 5847 4968 1401 1657 5767 1201 2455 5946 5730 5947 5948 5949 3917 5584 5898 1486 5950 5951 5952 5953 5954 2505 5955 5956 5957 5958 5959 5908 5852 4218 5960 1067 5879 5961 5962 5963 3782 5964 5965 4916 5966 5967 5968 50 5969 5970 5746 1902 5971 488 5701 2936 5972 1395 4018 2450 5973 5974 5975 589 5824 5976 5111 5977 5978 4894 4768 4904 447 5979 542 5980 5981 1681 5982 5983 5984 5985 5986 3964 2991 5987 5988 5989 5990 5772 5991 5003 5992 5993 5994 5995 5889 5941 5996 5942 5997 5998 5999 6000 6001 5784 6002 6003 5846 5454 4794 544 6004 6005 2359 1674 793 6006 6007 6008 6009 5947 5897 6010 6011 3469 6012 6013 6014 6015 6016 6017 6018 6019 5801 6020 6021 6022 5165 6023 6024 6025 5110 5316 6026 6027 6028 6029 5627 3012 5917 5970 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 1905 3198 6043 6044 6045 1798 5905 6046 6047 6048 2733 6049 6050 2365 6051 1149 6052 6053 6054 3021 6055 6056 5983 5932 6057 4275 6058 1322 6059 2043 5102 6060 2550 5935 5990 6061 4956 6062 6063 6064 416 5203 6065 5217 5884 5585 256 6066 4391 4877 5776 5837 6067 6068 5465 6069 5274 6070 4742 6071 6072 4510 4976 6073 6074 6075 744 6076 3189 6077 6078 2724 693 6079 6080 6081 6082 5844 6083 6084 6085 4929 384 6086 1315 290 3002 5959 6019 6087 6088 3126 3713 6089 6090 6091 5856 6092 6093 3019 902 5702 6094 6038 6095 3514 5976 5826 4679 6096 5470 6048 6097 6098 6099 71 6100 6101 3413 6102 6103 6104 6105 836 5875 4440 6106 6107 6108 6109 4301 6058 6110 6111 6112 5882 6113 6114 6115 1421 6116 6117 6118 5201 6119 1488 6120 6121 6067 5996 6122 6123 6124 6125 6126 6127 6128 6129 2984 6130 4950 6131 2393 6007 3846 6132 5478 5167 6009 6082 6133 6134 6135 6136 6137 6029 4864 6138 6139 6140 5909 6141 6142 6143 5712 6144 6145 6146 6147 6148 6092 6030 2562 6149 6150 6151 6152 6153 6035 6154 1881 6155 5239 1270 6156 4873 1390 6157 6158 6159 3095 6160 4851 6161 6045 75 1578 29 6162 6163 6164 205 6165 6166 6052 5508 4046 6167 6168 6169 6170 6171 6172 6173 6174 5290 6175 5748 4770 4903 6056 6107 6176 6177 6113 6061 2655 6178 6179 4040 1211 1815 5541 6180 1574 4408 6181 4958 6182 6183 5940 3043 3499 1405 5143 6184 6185 6186 6187 5415 6188 5630 2665 898 1047 6189 5948 6190 6191 6192 3886 6015 6193 6141 6087 6096 6194 5887 6110 976 6146 6195 6196 5969 3953 2818 6197 6198 6036 2062 6094 6158 6199 6149 6200 6201 6202 6109 5406 5582 6203 6118 6204 824 4197 3648 4399 6205 6206 6207 515 4931 6208 2192 5984 6209 6210 6211 6212 5989 3016 6213 6214 5842 6215 5783 6216 4742 1539 6217 6218 3206 986 6219 6220 6221 6222 2205 6121 6183 6223 3029 6224 2021 6225 6226 6227 6003 6228 6229 6230 1511 6231 6232 6233 543 6234 4609 1829 6235 6137 6236 6237 6190 6133 6238 6239 6240 6241 6242 177 6243 6244 6245 6246 6247 6018 6148 6196 6248 254 5699 6249 6250 6251 1963 6039 6252 6253 1670 6254 2225 6255 2337 6256 6257 2180 2044 6258 5406 5234 6259 6260 6261 6262 5755 4603 6263 6264 5910 6265 6097 6266 6267 6209 6176 6177 6212 6268 5925 2165 6079 3044 6269 947 993 5068 2536 6270 6271 6272 6068 6273 6274 2940 6069 94 6050 6275 6276 6277 6278 5532 6279 5609 5703 6280 6281 6282 995 3189 6239 6283 2329 6144 6284 3995 5933 6285 3272 647 6286 6287 6081 6288 6240 6289 6290 6291 6292 6293 6294 6295 2243 6296 3123 6297 6044 1797 1128 5203 6298 3121 6299 6166 6193 6247 6300 6093 6301 6302 6303 6252 6199 6304 6036 5922 6305 6306 6307 6308 1179 6309 6310 6264 6097 5138 6311 6312 210 6313 3858 6314 4472 4983 6315 2364 6316 5831 4612 6317 5113 6318 5823 6319 6320 6321 6322 6323 6106 6114 6324 6325 6326 6327 122 4800 6328 6329 3455 6330 6331 6332 1057 3658 2066 3893 2691 6333 6273 6223 6334 6235 635 6335 5722 3844 4363 4153 2451 6336 6277 1945 6337 5485 5328 4305 6338 6339 6008 6189 6340 6341 1447 393 6342 6343 4470 6237 6287 6344 6345 2799 6346 6299 5139 6053 6142 6347 6348 6349 6350 69 2372 1270 4468 6351 6301 6248 6352 6353 6157 6354 6355 5469 6356 2648 3498 1417 416 1645 6357 5494 5625 427 6308 6358 1281 6359 6360 6361 6362 884 5760 5813 6363 6364 6365 6007 6366 6367 5442 6186 6368 5690 5333 6369 869 6267 6323 6370 5985 1192 6371 6372 3580 5057 6373 6324 6268 6374 1824 6219 5608 6375 3714 6376 6377 6378 3079 6379 998 5509 5183 6380 6381 6382 6182 6383 6384 919 6385 6386 6387 1336 6388 6389 6390 4429 6391 6392 6393 761 6394 6395 2519 3367 6234 4402 6191 6396 6397 6398 1235 6399 6400 2912 6401 6402 6403 1852 6404 6347 6300 4784 246 6405 6406 1068 6407 6408 6409 6195 6303 6353 6410 6164 1720 6411 6412 6413 6414 6415 6208 6098 6416 6417 149 6418 6419 1343 6420 5759 5799 6421 6422 2602 6423 5526 4001 6424 6425 6426 6427 6428 6429 6210 6430 6431 6432 6334 6433 6434 6435 6211 3359 6436 6437 4387 6438 6439 5291 4925 6440 6333 6382 6441 6442 753 917 6385 602 6443 6444 3444 6445 6446 509 4295 6229 6447 6448 6449 1745 6450 6451 1827 3868 6452 6244 6453 6364 6189 2791 6454 6396 6344 6455 6456 5430 4897 6457 5829 6458 6459 6246 6405 6460 6461 6257 6462 6463 6351 6409 6464 6465 6119 1205 6253 6466 6467 5498 6468 6469 6470 5323 6471 6472 2292 6473 6474 6475 724 5574 6476 6360 5081 6477 6478 6479 4632 6480 5397 6481 68 4198 6482 825 6483 6484 427 4366 1282 6485 3190 6240 5245 6421 1922 6486 6487 6488 4518 4109 2865 3892 6489 6490 6491 6492 6493 6494 5227 2244 6046 6319 6495 864 6496 6430 6370 6373 6435 6497 6498 6499 6222 6500 3356 6501 6502 5222 6503 6449 3843 6272 6274 6504 6505 4739 2121 2364 6506 6224 3798 6507 6508 5294 6509 1642 4398 6510 6511 6512 6243 1852 6513 6514 6515 6286 6516 3664 6517 4849 5012 5193 6404 6459 6518 6064 6519 5896 3629 6520 6521 6302 6522 6523 4403 6524 3293 6525 6466 6410 6526 4825 5389 6527 6528 5349 6263 2192 6415 6529 6530 6531 6532 5579 1465 6533 6432 3510 6534 6535 6536 6537 5799 6538 6539 3227 6540 6541 1595 235 4108 6542 6543 3645 1834 2585 6544 6545 3075 4330 6439 5636 6546 6547 6322 6325 6548 6549 6285 6153 3309 2206 6499 602 6550 1646 2353 6551 4522 1077 6552 3449 6255 6553 6504 6441 6554 6555 6556 5918 4803 85 224 6557 6558 6454 6515 6559 6560 6561 342 5422 5832 6354 6562 1725 6563 6348 6564 6565 6566 6567 2773 5537 6568 686 6569 6570 4088 826 6571 6572 6573 6522 6464 3813 546 6574 6575 5727 4318 5605 6576 4765 6577 1343 6578 6579 6580 6352 6527 2199 845 6581 3259 6582 6583 3672 2248 6584 6533 2529 2275 3456 6585 6586 2436 2783 6496 6547 6587 6588 6321 6589 6590 6548 6497 6591 2808 1497 6592 6593 6552 6594 6595 3812 6076 6596 6289 6597 6598 6381 6599 5107 430 6600 6601 6602 6603 6604 5048 6398 5344 6085 6397 6605 6606 5549 3360 30 6607 6608 6609 6610 6153 6611 6612 6613 4740 6614 6564 6518 6615 2919 6616 6617 2844 6618 6619 5539 6620 2025 36 6621 2945 1605 3227 6622 6623 6408 6624 6625 4682 6626 3072 6111 6525 6580 6627 6628 887 6629 6630 4985 6631 6541 6632 6633 5078 5753 6422 6634 3735 518 6635 1991 6636 572 664 1187 6583 6637 1140 6638 5829 5957 6501 4477 6639 5459 3586 5012 6431 6640 6037 6641 6642 6434 5018 6643 6644 45 6503 287 3726 6645 2711 6553 6598 6646 6647 6648 179 2866 6649 4704 6650 6651 6652 6448 3141 6653 6654 6655 6656 4546 6657 6658 6659 6476 6660 6661 6605 6559 6662 2252 512 6663 5680 5414 6664 6665 6458 6666 6419 2505 6573 6623 6667 6467 6668 6669 3918 6670 3124 2682 5423 4382 6671 6672 2517 6673 6674 6675 6676 3053 6677 4317 2265 5789 6678 2071 6679 5721 6680 4778 6681 6682 5599 3628 4740 4118 6683 6428 6124 6446 6321 6684 6685 6686 6687 6688 6689 4587 6690 6640 6587 6691 6692 6693 6590 6642 6694 1524 5030 6695 315 6696 6697 6505 6698 6699 5440 6700 4001 4118 6613 6520 6701 3548 5945 6702 6703 6514 6704 2440 6705 6706 6572 5085 6614 6665 6707 6708 2927 6363 6539 2679 1605 6523 6709 6710 6711 6712 3559 6713 6668 6627 6714 6715 6716 6717 5502 6718 6719 6720 6721 6014 1476 6570 6722 6723 6724 6725 6534 1659 4539 6726 4475 6585 6727 3665 1936 3796 6728 710 6729 1415 6730 6072 6731 6732 6733 6734 6159 6735 6546 6549 6736 6737 6738 5150 5938 2683 6739 45 4921 5710 1474 6740 6698 6646 6741 6742 6743 6744 6745 6746 2746 6650 5432 6747 6748 626 5396 6749 2498 6750 3624 6751 6661 6703 6752 811 2918 2643 6753 1751 2189 4934 6139 6754 6565 6755 6756 6757 6709 6667 6758 6759 2153 3941 6166 6760 4483 2877 258 6761 6762 6579 6763 6764 6765 6766 6767 3478 6768 4968 6769 6770 2458 6771 3472 6772 5290 6773 3277 1048 6774 6775 284 6776 973 6777 6778 6779 4082 6780 6781 6782 6688 5012 6783 6690 6735 6095 4052 6784 891 6785 6786 6787 6788 6736 6694 6789 4514 2994 6790 6791 6597 5955 2364 3627 2392 6792 6012 6793 3101 5269 6794 2451 4017 6795 6796 6797 6798 1282 6659 6799 4093 2477 6800 116 5828 6004 6233 6801 5438 6708 5417 6802 1808 1565 6606 6803 6804 67 6805 6806 6807 6808 6800 6809 6810 797 6811 3285 6812 6813 6755 6707 6814 6815 6622 6816 4572 2310 6817 6818 6819 752 6383 918 6820 4020 5753 6713 6762 6821 6822 6823 3028 6393 6824 800 99 6825 4513 6826 5250 458 6827 6828 6829 6203 6519 5202 557 6830 1266 3265 3565 6831 6832 1474 964 6833 6834 6641 6835 6836 1317 6837 6838 3995 6740 6791 6839 6840 2519 6841 6842 6843 6844 6845 6846 6609 6847 6848 6849 5462 6850 5347 1452 1545 5693 6851 3737 6852 6653 2059 6853 6854 6346 6567 6855 84 6856 6343 6857 6858 6859 3814 6860 6063 4022 6254 2647 6802 3499 6861 6803 6752 6862 6863 6864 6865 4687 757 6866 6867 6664 6868 6869 6366 6870 6871 450 6757 6815 6872 6873 5736 6874 926 3911 3702 6817 1798 6875 6876 6877 6878 6669 6879 6880 6881 6882 1748 4522 6825 1078 6714 6543 6883 3757 3742 6680 6884 6885 5673 815 1493 1261 78 6886 6887 6788 6834 6888 6889 6890 6891 6892 6893 1848 6894 6895 6896 6897 6898 6899 4896 116 6900 6901 6902 5961 6699 6903 6904 1366 2025 6905 6847 6194 6906 6907 6908 4474 3129 6909 6910 6911 6912 3745 6913 6706 6905 6914 6915 2528 266 6916 6917 6918 6919 6920 6859 185 3475 1421 6730 6889 6921 6922 6702 996 6862 2918 6813 6867 6923 1407 4996 6811 6924 1232 6925 6926 2815 6927 4780 6925 1954 6710 6928 6929 3280 499 1438 6930 2124 1003 6129 6931 5791 5225 6932 3486 6933 6879 6821 6934 6935 6657 4939 6936 6937 6938 6326 3735 6939 739 6940 6941 6942 6943 5973 5132 5168 6737 6944 6945 6946 6947 6948 6949 6950 6951 6952 6903 6839 1726 3701 6953 6954 3335 6955 474 2505 6956 3176 6957 2402 4987 6236 4863 6958 6959 6854 6960 6961 6962 6861 6922 6963 5188 6964 6965 6966 5057 6967 3208 6968 1466 6756 6969 6970 2983 6971 6972 3396 6882 4384 5445 5764 3902 6973 6928 6872 6974 6842 2928 6975 2936 6976 6977 4311 6554 6978 6979 6761 6980 4060 6543 4367 6981 6443 6982 4808 6983 6984 2136 6985 3852 4328 6986 6987 6988 6166 6989 6990 6991 5479 6992 5974 6993 6994 6995 3697 6996 1192 6997 6967 1817 6998 6626 6146 6999 6944 6888 4930 7000 2734 7001 6136 4472 5256 872 7002 7003 7004 6790 5242 5085 6571 2914 2716 7005 7006 7007 6194 7008 751 107 7009 7010 7011 7012 7013 7014 5084 6433 4986 7015 7016 7017 7018 7019 7020 6318 7021 7022 6804 7023 7024 7025 7026 7027 7028 6969 6923 7029 7030 2827 7031 7032 6814 7033 3209 7034 1898 7035 2811 6933 6979 7036 3231 1637 7037 7038 1979 4506 4269 6090 4466 7039 7040 3949 7041 2427 7042 420 4010 7043 3062 107 59 5937 7044 7045 7046 7047 6833 7048 5198 6169 7049 57 359 6952 7004 7050 7051 7052 2408 7053 7054 4381 7055 7056 7057 7058 3025 7059 6853 3096 7060 3222 7061 2210 7062 1702 7063 7018 912 1117 7064 7023 6963 118 63 7065 51 7066 6368 7067 7068 5322 7069 7070 6866 7071 2194 7072 6556 7073 7074 203 7075 7076 7077 388 5832 6973 7032 7078 7079 7080 7081 6880 7082 7083 7084 7085 3066 4056 7086 2920 7038 6053 6988 4796 285 7087 7088 5442 7089 7090 4290 6995 3870 5039 7091 7092 7093 7094 7055 7095 7096 7097 7098 7099 7100 7101 160 7102 4700 7103 7104 5967 1861 6775 6320 7105 6999 7047 7106 7107 4763 4237 6904 7108 7109 7110 217 1673 7111 5167 7112 7113 7114 7115 7116 7117 1223 7118 7119 7120 7121 7122 6921 6295 4578 6807 7123 5249 3183 7028 7070 7124 4309 7125 7126 7127 5602 6711 6929 7128 7129 7130 6100 7131 7132 7133 7134 7135 7082 7036 7136 7137 2924 7138 6609 7139 7140 6936 3581 7141 6047 4797 7092 7142 2551 7143 7144 6027 171 2654 6850 7102 245 7086 7145 7099 6764 7146 7147 342 7148 7149 7150 6945 7151 7152 7153 3643 7154 2706 3646 7155 7156 7108 7050 7157 7158 3802 7159 5270 2002 7160 7026 7161 7162 2801 7163 5618 5488 6278 7164 5792 3507 7165 1291 912 7064 7122 7166 712 7167 2471 6970 7168 7169 6384 7170 5467 7171 7128 7078 7172 7173 6111 7174 7175 7176 7177 7178 6978 7179 3181 7180 7090 7181 4622 7136 4386 7182 7183 6420 7184 7185 3689 3942 7186 2820 7187 6913 1861 7188 6101 7189 7190 5522 6896 6134 7191 7192 4200 6537 7193 2927 6731 4975 7194 7195 7196 7197 4467 1005 5793 7198 7148 7199 7200 7151 7106 6673 4761 7201 7202 7203 7025 1689 6266 6415 7204 6841 7205 7206 7207 7208 7209 7210 7003 7211 2142 7212 7213 7214 7215 7216 7217 1767 7218 7219 7220 7221 4296 7222 2101 5863 7223 7024 7224 7225 4641 5761 7226 7227 852 290 7228 7168 7124 7229 7230 7031 7231 7232 7233 7234 7235 7130 7236 7175 7237 7135 7178 7238 7140 2585 7239 3793 1008 7240 3962 3479 7241 7242 2184 5220 7243 4074 2250 7244 2157 7245 7246 7247 7046 7248 7249 4439 6026 7250 6930 7156 7210 7251 7252 5667 6293 7253 3522 7254 7255 7220 7256 7060 7257 7258 7217 7259 7260 7261 7262 599 7263 7224 7166 7264 4918 7265 7266 7267 7069 7171 7230 7268 7269 7270 7271 7272 206 3162 6363 6766 6974 7273 7274 7275 7276 7183 4573 7277 7278 7279 7083 7280 7281 3848 7084 6670 6671 7205 5527 7282 7283 4147 7284 7285 2571 7286 7287 5058 7288 7289 7290 7291 7292 7293 7294 7295 5272 4567 7296 2017 6357 7297 5191 7298 7299 1968 7200 7247 7300 7301 7302 7198 7303 7304 7305 5624 7306 7307 7109 7308 7309 7195 7310 56 7311 5502 7312 7313 2421 4292 7314 6117 7315 7316 5960 5298 5577 7317 53 7318 6848 7319 2674 974 1133 7320 1767 7321 598 7322 328 7323 7324 7121 7325 6810 7326 7228 7267 7327 6946 4925 5182 3162 6411 7328 7129 7329 7330 7269 1817 7331 7332 7333 7334 7335 978 7336 7337 7278 7237 7338 7280 7238 6763 3070 7205 6960 1831 4036 7339 7340 1954 7341 1704 7342 1271 2373 6487 7288 2823 3506 7343 1789 2213 7344 309 7142 6768 7019 7345 4354 7346 5394 6013 2012 3397 5816 3577 3113 7152 7347 7348 7349 3017 234 5762 7350 6530 3312 7351 4226 4310 6618 6555 7352 7353 1326 7354 7308 7251 5403 7355 1806 2604 4809 7356 7357 5581 7358 5247 7119 7098 7359 857 4750 972 5356 7360 7361 2833 7362 7263 7324 7363 7364 7365 756 4281 7366 4698 7169 7367 7368 6356 3635 7369 4976 4654 7370 7371 7329 7268 5924 6358 1548 7372 6011 2597 7373 7374 7302 922 546 7375 7376 1286 1640 7193 3221 6363 7377 4032 7282 7378 7379 7174 7380 7381 7177 7382 6773 6189 7339 3756 7383 2091 15 2618 7384 3644 2823 7153 2727 7385 5283 7386 5867 3575 6028 6161 7387 1432 1932 7388 7389 1887 7390 7347 7300 7391 6595 7392 1359 3758 5723 4229 7393 4306 7394 7395 7209 7396 56 7397 7398 7399 5037 7400 4831 7401 7402 7403 1489 7404 7405 7406 7407 7408 4396 7225 7409 7410 5999 4583 7411 7412 7413 7414 7415 2511 7416 7417 2463 2903 7418 7367 7327 7419 7420 7229 1915 6818 7421 3930 6939 4328 6483 1372 7422 7337 7379 7423 7338 7381 7424 7425 7426 7427 7428 6678 5024 7429 2802 4781 7430 7431 3980 7432 7433 7434 7435 7436 7437 6154 7438 906 1886 2441 6603 7250 6394 7439 1460 7440 3798 7311 603 5263 4139 3463 7441 7442 7443 7246 7444 5515 7445 7446 7447 7448 7354 7395 7449 5720 2638 3717 7258 5449 7450 7451 7452 7453 7275 1381 4957 7454 7455 4573 7456 4797 4726 7407 3419 7457 352 7458 4444 7459 7409 7363 6751 7460 4878 6731 7461 4655 7462 5358 7463 7464 7465 7266 1393 2533 5148 7466 269 95 6826 1622 2280 7371 7420 7467 1555 6874 7468 7469 7470 854 7471 6313 1607 7279 7472 7473 7281 7474 7475 7476 7477 7478 7479 7480 7157 7481 1866 2130 5330 4830 5807 7482 4480 3045 3110 2965 2593 3163 983 14 6887 5718 7483 5756 7484 5949 7390 7443 7485 7349 1804 3032 6444 1146 7486 7487 1190 7287 7309 7488 7489 7490 7491 7457 2102 7492 2743 7493 2383 3404 5556 2685 3388 6780 3936 3158 7494 7495 7496 7497 4786 7498 4345 7499 3419 7500 7501 7323 7502 7503 7377 5868 5992 7504 7505 5869 7506 7418 7465 7507 7330 7508 7509 1127 2094 1645 7471 3802 7510 7511 7512 2599 7513 7472 7423 7514 7474 7424 7515 7516 942 7479 1609 2668 7437 7517 6470 7518 4410 1831 6977 7074 6406 6907 5246 6543 897 6992 2790 7519 6453 6513 3067 7520 7521 7522 2273 4801 7523 1767 2300 7524 6261 5539 1318 7525 1575 5202 6955 7526 7348 7527 7528 795 7529 5257 959 6445 3592 5366 7530 7531 4184 4728 7532 7533 7488 7449 5260 6997 3943 7534 7535 7536 7537 7184 5799 7538 662 7539 3534 7540 5148 7541 804 7542 4734 4788 1503 7543 3232 7544 7459 7501 7545 7546 4633 5090 7547 2008 4121 7548 608 7549 7368 7550 7551 7552 353 7553 7554 7508 7467 7555 971 1555 7556 3036 7253 2887 5349 1599 7557 6477 7558 7559 7560 7378 6297 5015 75 7561 7562 7380 5131 5425 6914 263 6316 6418 869 7563 7476 3968 2065 4855 2862 6984 107 7564 4781 7340 2709 5975 897 7565 7566 7567 345 7568 6436 5311 5809 1796 7569 7570 7571 7164 3174 7265 7572 6036 7573 7574 7527 7485 7575 2067 7576 7577 7578 7394 7579 2750 2317 7580 3403 7326 7581 7582 7502 7446 7583 520 7584 4475 5872 6868 4248 6971 7585 7586 611 547 924 7587 7410 7588 7589 7372 7590 2586 7591 7550 7507 7592 7593 7594 7595 3300 7596 7597 7598 7419 7599 931 3031 957 5024 7600 7557 3980 7601 7513 7560 7602 7514 7562 7603 6315 4405 6612 7604 7358 5583 7605 7606 5425 6778 7607 3572 7608 5506 7609 7610 1851 6403 7611 7612 4291 5563 5046 7613 7614 7615 7616 7617 7618 2085 1645 7421 937 1199 2541 7130 7619 7620 7442 7621 6298 5202 7100 7539 574 6896 4338 7622 5979 2578 6232 7533 7578 7623 7624 7497 6854 7450 7625 7626 6242 7627 7628 3563 1055 7629 7630 1613 7631 2494 7632 7633 7634 7588 7545 2748 7635 6881 304 3874 4629 7636 7637 7464 7638 1505 2693 7554 7598 7639 2523 7640 7641 7473 7642 7643 7644 3438 1229 7475 7645 7646 3682 265 7647 7648 521 293 7649 7181 6994 7273 7573 1883 6165 5101 7650 7352 7651 7652 7653 6851 7654 7574 7620 7655 4548 3134 2365 1513 6000 7656 7657 4938 7581 3187 4397 7658 7659 3076 7660 7489 7661 7662 1440 7663 7664 6722 5817 1264 1638 3707 2933 7665 7666 7667 4977 7668 3477 5011 7669 734 7670 7671 4248 7672 7673 5349 7674 7675 7500 7676 7677 6447 3625 7678 7679 7591 7637 7680 7590 7512 2279 7681 4319 5727 7509 7682 7683 7684 4723 7685 7686 5810 7332 1290 7687 7688 6798 7689 3415 7690 4260 7691 7692 7642 7602 7693 7645 7603 7037 3706 454 7694 7695 4864 4581 7696 7679 7570 1151 2403 7063 331 7697 4122 7698 3633 1250 7699 4392 730 6170 7700 7243 2008 2793 7701 4643 2449 7528 7702 7703 3984 5744 7704 7705 1252 2992 7706 7707 692 7202 7708 2574 7286 7709 7710 7711 7661 7623 4624 7712 7713 6046 7496 4797 1188 2256 6602 7587 281 7714 7715 7716 5824 7717 7635 828 7634 7675 7718 5849 7719 7720 7721 7722 7723 1469 6666 2504 7551 7724 7725 7303 4558 2934 7726 321 3091 7727 7682 7639 7728 2327 1574 7729 3450 4511 7730 4746 7391 3988 1082 6677 7731 7732 7559 7733 7734 7561 7735 7736 7511 7572 7737 3427 7738 7537 4836 6423 4068 3318 5409 1413 7739 3226 7740 7741 6894 4265 5628 7742 7743 7657 953 5517 641 4196 7744 7745 7617 7746 4364 4368 6222 6312 7747 7702 7655 7706 6080 7748 7749 6811 847 7750 7751 7752 7753 7754 7755 7756 7757 7577 2774 7162 5502 6727 3323 4724 7758 2112 4716 7759 961 7760 7761 5669 1218 4412 5893 880 7762 7763 4133 2916 7764 7765 7589 7766 7767 7768 7769 1070 7770 655 611 7771 7712 7772 7773 7724 7680 1510 7774 2039 5377 4328 6909 7775 7776 7597 5709 3978 4450 7692 7732 7777 7693 7734 7778 7779 7780 7781 7782 1116 7783 7784 7211 4953 7785 7786 7787 7788 7276 7455 6917 2488 1334 7789 7313 7612 7790 2276 7569 4448 4186 7041 7791 2431 7792 7793 1302 2156 7794 7795 3375 7796 634 7797 7469 2740 7798 341 5555 7799 7176 7800 7619 7548 5824 7596 7801 7802 7803 7804 7805 2849 6871 7750 4115 4563 530 7249 7711 7757 7806 7807 7808 1951 1813 5675 6074 6572 6204 5086 7626 1688 7809 5600 1530 2640 7810 7811 7812 140 7013 7813 7814 6259 4066 1634 4568 6481 7118 4001 6765 7815 7766 7718 6507 7362 2894 7816 7817 7636 7727 7776 7818 7684 1574 3540 7819 7820 6993 7821 7822 7823 7643 7824 7825 7646 7826 7827 7828 7782 4010 7829 7830 1637 7784 1195 3184 7831 2335 7742 233 775 7832 7833 7834 7835 5279 2231 3007 7836 7519 1851 7837 7838 4313 560 2190 7839 7840 7841 2963 7842 7843 6327 7794 7844 7845 5278 7027 7846 3412 7149 7374 7847 2085 7848 7849 7850 2843 7747 7800 7851 7852 7853 7854 7662 7855 7856 7857 7858 7859 7053 5425 7860 7861 7862 6040 7863 7864 5064 7865 5695 7866 2122 6205 7867 7868 7869 3087 7870 5716 6886 7556 2599 7590 7871 7814 1978 7872 7873 7674 5713 7874 7875 6743 7876 7877 7773 7817 7878 2729 2585 2899 7879 3398 7089 2931 7698 7880 7683 7881 7882 6758 5874 4785 6908 6542 4475 7883 7884 4902 2576 7885 4524 7886 7824 7777 7887 7618 549 7888 7826 7778 7889 7890 7891 7892 308 1884 4788 7893 7894 7895 7896 7897 7898 1252 7899 4707 7134 5755 7900 7901 7902 4554 7296 2262 2144 6870 487 2506 3545 7499 7903 7904 1008 7905 5122 7147 7703 7906 7277 6822 3798 7811 7907 5685 968 7908 7855 7806 3891 7909 7910 6635 4864 7911 6330 7912 7913 7914 4421 650 7915 7411 7916 7762 3537 7917 3598 6972 7671 7815 7873 7918 3211 7919 5316 7920 7245 7583 7725 7921 7922 7923 1883 6304 7924 7881 7818 6968 2153 7925 7926 7927 7884 7928 2848 7831 7929 7930 7731 7644 7931 7932 7933 7934 7733 114 5829 7935 7936 5206 3809 7913 7291 4159 7937 7938 7939 7940 7941 7942 7943 7944 7945 6569 278 2492 6216 5904 4947 7946 364 1685 7904 7947 7948 7236 7906 7851 4293 2423 7949 7950 7951 4649 7952 6377 7953 7954 7955 7956 7957 7958 7756 6260 7357 5539 39 2349 1804 7959 4266 6896 564 7960 7961 2546 7962 7963 498 7964 7965 7966 2240 3509 7752 1691 4648 6526 7967 2912 7767 7968 7969 7970 7971 785 7972 7973 7590 4759 7974 7385 7975 7976 7977 7978 7921 7878 7979 7980 7775 7231 3428 7981 7982 6180 7685 7983 7984 6413 7886 7930 7985 7986 3357 6500 7888 7934 7987 6457 7988 3258 7264 7989 7990 7672 747 7899 6168 7991 7992 7993 2151 4788 7042 1810 6827 6456 3570 7994 2401 2702 7995 7996 7997 6797 7998 5733 7999 7950 7866 5595 8000 2980 2046 7908 7958 8001 6885 8002 5402 5670 8003 1592 8004 3405 8005 8006 2700 2400 7809 7708 8007 2754 1841 3227 8008 7274 7923 6088 8009 3537 1198 6349 4568 2847 2851 8010 8011 2891 8012 8013 1125 8014 8015 7968 7918 8016 8017 7816 8018 8019 8020 8021 8010 7928 7924 7980 8022 7179 3809 5640 7103 8023 135 4199 8024 8025 4350 2785 177 7653 6488 1215 7825 8026 8027 8028 7161 7203 7827 8029 8030 1386 2898 8031 4 1229 3574 3670 4078 1195 8032 5936 1387 4006 497 7295 8033 5355 4557 5991 4504 3899 6296 7867 8034 3803 1609 8035 6034 3429 8036 8037 6797 7861 4061 8038 6238 8039 1981 3422 8040 8041 7797 5751 8042 2737 7856 8043 8044 5514 2608 7744 8003 5171 5391 7120 7123 4068 1168 8045 7219 1153 4144 8046 8047 772 8048 8049 7788 4503 1947 8010 7765 8050 1132 7688 6958 8051 7912 5865 8052 1620 8053 8054 7872 8055 7723 894 7978 8017 8056 7396 354 359 8057 4063 8058 7882 8059 8060 7495 8061 4727 7632 5022 5253 8062 8026 7985 8063 8029 7987 8064 8065 4973 6057 3535 8066 8067 8068 8069 8070 3150 8048 8071 8072 7270 789 6777 2994 7599 1516 6996 8073 8074 8075 8076 8043 8001 4685 2512 4775 8077 8078 5215 4845 1381 8008 3685 4100 3620 8079 7789 8080 4395 3235 8081 7 7054 6517 4811 3139 8082 5118 6601 8083 2414 3886 8084 8015 8054 8085 8086 2853 8021 1521 706 3879 8087 833 8088 7425 7532 8089 4013 7095 2960 7922 8090 8091 8092 3194 5566 8093 8059 8022 7334 2543 8094 8095 8096 7929 8097 8098 2792 5392 8099 5687 8100 8101 7933 8102 8103 8104 8105 8106 5467 3938 8067 887 8107 1831 8108 5391 8071 8109 3343 8110 5367 136 2798 8111 8112 7812 7440 4914 8073 4852 8113 3242 8114 8115 3112 3528 13 8116 8117 8118 8119 7957 5758 8120 1526 1964 1671 2224 8121 8049 690 8122 8123 5122 6073 8124 3694 6480 337 8125 8126 8127 6750 8128 8129 8130 5284 4204 8131 2313 5144 8132 8013 8133 6350 7969 8134 8135 7515 3865 7532 7736 7256 5200 7883 6486 8136 8137 2311 6956 8138 8090 8056 8139 1206 3516 8140 8141 7979 914 8142 8143 8144 8036 3428 8145 8146 8147 8062 8096 8148 8149 5851 8150 8063 8101 8151 8102 1387 3771 8152 4821 803 8153 8154 8155 8156 7524 7604 5059 5122 8157 8158 7999 8159 3092 8160 861 8161 8162 664 8098 5953 8163 8164 8006 8165 8076 8119 8166 8167 7416 499 3147 8168 4749 5962 8169 8170 8171 6433 969 3550 8172 4594 8173 4254 4201 6130 7285 3224 8174 1005 8175 8007 2433 8176 7949 8177 1253 4077 5688 8178 8179 2815 8180 8181 978 8182 8183 8134 8085 8184 8014 944 3642 7974 6675 8185 8089 3865 8186 2440 8187 1573 8188 1651 8189 8190 8016 4834 7846 7160 1207 8092 1114 8093 8141 8191 8192 8193 8194 5697 8195 7192 8027 8196 8197 5027 1217 8198 8030 8199 8200 8201 8202 8203 8204 3368 7884 3006 506 3402 1591 8205 5391 8206 8207 1175 8208 6139 6624 7946 8209 8210 4680 6062 4843 8211 4326 715 8212 8213 1060 8214 5786 3838 8215 856 4783 8044 8216 8217 1496 2630 6550 7451 7114 1569 4659 8218 8219 2088 8220 8221 8222 8223 2419 8224 1660 8225 7673 8226 5648 8227 8228 8053 3631 4228 8229 8230 1302 6776 8115 8231 5480 5261 6498 1788 8138 8190 8232 8233 8139 604 8060 8234 8235 3659 6575 5789 8236 8196 8148 8149 3295 4911 8237 8199 8151 3493 7016 8238 8239 8240 7101 6684 6774 508 8241 3174 8242 8243 8244 8245 6760 6053 8246 8247 8248 4187 7760 8249 7820 5611 3505 4941 8250 6820 3104 7701 8251 2787 2712 7490 3545 8252 8216 8166 5681 1789 6221 6230 6725 1512 8253 903 8254 7029 8255 1229 8256 2168 2561 8257 8258 8259 8260 8261 8120 6270 4779 8262 8263 5024 5531 6615 3788 4590 8183 8228 8264 8265 8266 5677 8091 8267 8268 8269 8234 8191 8025 7058 1934 5598 8270 7802 3924 6478 7844 8271 8272 8095 8273 8274 8100 4900 7016 8275 8276 8239 3185 4113 7866 3871 6122 8277 8278 8279 8280 7125 8281 6376 8282 8283 8284 2325 8285 8286 6139 8287 8161 7539 5779 8288 8289 8290 6731 8291 8292 573 1186 8293 8294 5972 3681 7728 6180 642 135 8295 8296 8297 8118 3200 7870 77 7170 8298 2627 8172 1961 8299 8300 8301 8302 6145 8303 7172 8304 8305 4072 8306 3065 8307 8308 8309 4904 4461 6491 62 6471 8310 8311 5774 6586 3978 8312 7879 8313 8314 4818 6900 8135 8315 8316 8317 4585 3269 6746 8318 4983 8319 1270 8174 6427 714 8277 7358 8265 6568 3827 8137 6666 8320 8267 8232 8321 5033 8322 8323 8324 8140 8325 8326 8327 7808 8328 2045 8329 2937 6975 7304 3707 8330 8236 8272 8331 8332 4689 3295 8237 8274 8333 8334 1089 5439 8335 2648 8336 4528 8337 8338 8339 832 45 4447 8340 4059 4969 5739 6059 1174 8341 8342 8343 8110 8344 3462 5148 7835 2670 4775 7415 8181 7240 6998 8252 8297 8345 7015 8346 3571 8347 8348 8349 2057 8350 3473 8351 2740 8215 8352 956 8353 8176 7964 8354 8152 8355 8356 1586 8357 8358 4048 2250 7547 7832 711 1414 8311 6554 8359 3126 3536 3408 8314 6808 4798 8360 8315 8264 8361 7026 8362 119 6582 2740 8363 7663 5043 7314 4066 8156 8364 1709 8365 5428 829 1102 8366 8367 8189 8322 3287 8368 8269 8324 8369 8370 8371 7039 8372 7566 8373 7729 1723 1899 6132 1822 8374 8375 6241 2868 8197 8376 8377 8378 7422 693 8200 8379 8380 8275 3494 8381 8334 5789 4732 8175 3507 8241 610 8382 8383 3387 8384 8276 8385 1073 8386 3319 8387 7972 2807 8080 7611 7889 2419 8388 7722 8389 895 8390 2195 7071 8217 8391 8392 8393 7801 1031 8256 8394 8395 8257 5041 1909 8396 8397 4411 8108 4037 8398 8399 7709 8400 6401 2614 4686 6262 7076 7133 8401 8402 8382 115 4577 6808 8403 8404 8227 8320 8367 8405 6619 8406 7358 5610 8407 3728 8235 8408 8409 8410 8411 6718 7235 8412 2543 7738 4503 7454 8413 464 6693 8414 3939 7989 7091 5041 8415 679 8416 5405 8417 8376 8331 8418 736 2595 8419 8379 8333 8420 6957 8416 1559 7470 8421 6682 8173 7192 8422 4574 2614 7185 8224 3807 8423 8424 8425 8426 7306 8427 3662 2849 7898 2893 3014 8428 8429 8391 8345 5136 6126 7555 8430 8431 6637 7505 2098 3913 694 6123 814 8432 1104 4966 8360 8404 8433 621 8434 2215 3374 5964 3924 7676 6747 7316 8435 327 1766 8268 8436 8437 8438 617 8439 8321 8407 6279 8440 8408 8369 6099 2543 8370 3579 1817 5057 4236 1305 298 1433 1572 6180 8441 144 8442 8443 8444 8271 8445 8446 8273 7983 6172 1778 8378 692 8447 4674 943 3864 8448 7607 1492 1658 8449 1081 6672 741 1601 8206 8450 707 8390 8451 8452 7907 6236 7695 8453 1288 8292 8454 5734 8107 5923 3428 4224 7093 8455 8456 8457 8109 8458 8459 638 5418 8460 8461 8296 4021 8462 6062 8463 8464 6445 8465 819 5041 8466 2561 482 6981 8467 6386 2397 5082 3432 2687 8201 7436 8432 4770 33 3337 3489 7182 8316 8468 8469 2726 6721 4760 8470 188 8471 8472 8473 5452 6407 7316 5378 8474 8436 8405 4114 8415 3792 5850 6231 1082 8475 8476 8323 6691 8477 6629 7896 7819 1090 5166 8413 1822 1499 2962 4790 8417 8444 8478 8418 3315 855 8419 8446 8479 8480 8481 7913 8482 2623 1545 6152 8483 3310 8484 8485 8486 5530 2119 8487 533 7911 6236 7735 3193 8488 8489 3470 592 8490 1285 4652 1064 8491 8492 8429 8461 8493 4135 6494 8494 8495 3460 8496 6639 2318 8497 4824 8498 89 8336 7369 1962 7401 5562 8499 2500 3832 8500 8354 6823 8501 8502 2526 7640 8503 8468 8433 8504 8505 8506 8145 8507 8508 8509 8510 4495 6060 7961 8455 8511 3720 8512 4422 8513 7812 8514 8515 8366 8516 2464 949 8517 8518 1111 5287 8519 7935 8520 7075 4047 8440 8476 8521 4982 4852 8522 8523 8524 7163 8525 3621 5319 8526 649 5800 8377 8527 8528 8380 8529 8530 8531 4736 8532 8533 8214 143 7805 8226 1252 8534 4129 8535 8483 8536 8187 2018 1546 8537 4479 8538 8344 3896 5769 303 5620 8539 6488 8540 592 8453 3465 7887 7841 8541 1037 8542 3290 8543 7016 8392 8544 8545 8546 8547 106 8548 3499 8335 8549 4622 6400 8550 8551 8552 8553 4793 4928 833 8502 8554 8555 8556 8403 8557 8219 126 7567 8558 7107 8281 4495 8559 3099 8560 562 8332 3411 8561 8474 8515 8562 8563 1102 879 8564 7439 6840 5450 4519 5756 3678 8565 3174 8409 8566 8567 3634 2308 8568 8569 8527 8478 8570 8529 8479 3308 8533 8571 8572 7748 8573 7040 8574 2761 2173 1109 4080 7254 8424 3193 6897 5594 6329 2147 6759 3202 8575 8544 8493 6836 3199 7525 8464 8516 8576 6729 5724 8577 3991 8247 4447 8503 8556 8578 8579 8517 7283 8580 8581 2813 5906 4790 3887 8437 8582 8583 8279 5916 7942 7984 8584 8585 4556 5432 5902 400 8586 3052 8587 8566 8521 3573 5467 8588 2394 8589 5974 8590 8591 8443 5854 7384 3321 8592 8593 8445 8594 4905 5671 3822 7959 6135 8595 7447 1350 8399 303 8233 878 641 8596 7730 7203 2576 8597 8164 5994 8598 2474 4489 8599 2524 5341 178 5586 7011 7925 2148 1765 8600 6770 8601 8602 7848 3465 8603 8604 8460 8605 3038 8510 7915 2351 7656 8606 1656 4374 8607 2879 4096 8608 8609 488 8610 8611 8612 8469 8613 8614 8615 1885 8616 8617 2684 833 1522 3878 8618 8553 5911 3881 7365 7895 8339 8580 8154 8619 8620 7976 4023 8621 2045 8622 8623 8624 6020 8625 8582 8562 4767 7402 8626 8627 362 8628 8629 8630 8475 8069 8374 6692 8631 3259 8351 8632 145 8441 8569 8591 8633 8570 8593 8634 1306 4080 8490 6966 7903 3580 4162 5375 3344 6876 2625 8635 6309 8636 2155 8637 7885 7203 8638 2553 8639 8640 8641 3191 5176 2211 6222 5719 434 8099 8642 7779 2329 8575 8604 8643 8644 8645 8646 8647 8606 8648 8649 8579 4032 8650 7989 3173 8501 6745 8651 8652 8653 8654 639 8655 8656 8657 5228 8658 8659 8613 8578 8660 5049 8661 8662 1785 1544 4069 8326 4365 8620 2225 8663 8664 8665 8514 2814 8666 8667 8587 8630 8668 8669 4445 5871 3608 4852 8670 4913 6062 8671 7227 8672 8673 8674 2581 5704 8528 8675 8676 8530 8677 8678 3657 2267 6712 8679 8680 8681 8682 8683 8452 8684 8685 8686 8687 8688 6877 8689 2219 8650 8690 8691 1709 4476 8692 3356 8693 1988 3197 2921 6392 6638 3660 3725 8423 8694 8695 3717 4937 2333 7743 8696 6361 7988 8084 3570 965 8697 142 1441 8545 8698 8699 2134 6934 4545 8700 6889 8290 8701 8702 7627 6829 3388 7435 8703 8704 8555 4425 8019 8705 8706 6509 7585 8707 223 2564 4287 4170 8708 8709 8710 8711 8625 8665 8712 8567 8713 8714 8715 958 8263 7948 6112 3072 8674 3978 1086 8716 8675 8633 8717 8677 8634 8718 1242 6591 3243 8571 3468 6412 8212 6172 7966 7022 1858 8719 1908 8720 8721 5939 2920 6883 17 8722 8319 2686 5621 8430 2247 4130 5749 7666 3612 4443 8723 8209 5880 8724 8725 7920 8726 4945 8727 8649 7503 8728 3286 1426 7584 7458 4588 8729 8698 8643 8730 8731 1750 8658 6046 7456 4804 8732 8733 4932 8355 8734 8659 8704 8735 1325 8736 8737 4893 6391 2072 8583 8738 8739 8740 8741 6506 8112 8742 8667 8743 6345 7498 8744 8713 8668 8745 8746 2795 8747 4730 8748 1558 8749 8750 4484 7388 3463 5926 290 925 7343 8751 2032 5065 8752 8753 6938 3960 5223 8754 8755 8590 8572 8452 8756 8757 8758 8592 8718 2555 8759 8760 8761 3288 8438 7255 8762 8763 3509 2680 8764 585 5920 7544 281 923 8765 288 5275 6388 8766 5929 8767 116 6808 8768 3728 4136 8769 8770 4233 8771 7198 7374 4866 7743 8598 2479 5342 5455 2905 8772 314 7487 8773 8249 8774 8775 8603 4210 7875 8776 8777 1082 8657 8778 7498 8531 8779 8780 5087 8616 308 8781 5288 6593 3448 4095 1849 8782 4286 3854 4046 8614 8783 8784 8785 7299 8786 4160 8787 8193 8624 8788 8789 8790 8738 8712 7993 7498 6959 8791 8792 8629 8745 1785 8793 8356 8210 7786 8794 8795 5878 8621 7772 4625 8796 3500 1487 8716 8755 8797 8717 8758 8798 8799 1091 8800 8801 4213 1132 1748 8802 8803 8804 5755 8805 7312 8524 8806 8807 8727 7582 3433 5083 8808 8412 8809 2542 8810 8811 1712 5140 8204 8812 5453 8813 25 8242 7989 2218 8729 8775 8814 8070 8815 5374 8816 1659 8817 8779 8733 8818 1411 8819 8820 8651 6576 8821 215 8822 4714 8823 3295 3542 8824 294 8825 8826 3837 257 8827 8005 4446 8828 8783 8735 8829 1826 932 8830 8035 2669 8347 1032 7803 8680 7871 3970 8831 8832 8664 8744 8792 8833 2035 2669 1608 8466 8447 1095 851 3909 839 4234 8834 8835 8836 4729 5116 8676 8837 8838 8839 8608 450 8678 8840 8841 8842 8843 2555 8801 8844 5623 6493 6375 3997 8845 6844 8846 2282 3877 8847 2542 8848 8371 5771 6901 8724 5317 8313 5441 73 6044 8849 8198 2317 4298 8481 7624 8051 8781 7142 4062 8699 8850 8851 8568 8852 7905 8772 2396 6696 1755 7771 8853 8854 6128 6972 7659 4219 4111 8855 8856 8703 302 409 8250 2454 8857 8078 8790 8832 8858 6608 8859 8623 342 8860 8157 8861 3452 6806 8714 8862 8863 7707 8864 8865 7758 7764 5862 8364 8866 8867 8868 8869 1551 5754 7133 8520 8870 8871 8872 8873 8837 8797 8874 8840 8798 5117 8875 1189 8876 1678 2941 8760 3791 6359 8877 8807 4938 8150 8845 3411 6793 8878 8879 8848 8880 3467 8881 8882 3165 8565 8883 8414 563 6604 5877 8817 1512 8884 8885 8254 8886 8887 8888 4189 6647 7010 8535 8889 8850 8814 6217 8890 255 8891 8726 7448 8318 8830 3021 1896 8396 3723 8751 3304 2031 8892 3970 1978 7180 5474 4005 8828 8856 8893 1683 8847 708 8739 8894 8895 8896 8897 5666 8898 6954 5203 8899 8839 2131 8900 8862 8833 1095 8865 8394 7973 5639 2278 8901 8902 8903 8904 8905 8754 2764 3997 3728 8906 8907 8757 8799 1777 8908 2011 5543 6604 8909 3264 5118 2058 5290 6592 8361 6489 8637 8701 8724 4623 8778 8051 6854 8910 8488 8423 8350 3549 1486 4277 6227 3946 8672 1314 8911 8912 2965 2762 4273 8066 8810 8913 8914 7097 8823 6521 4404 1818 3943 3688 5483 3748 8915 1946 2125 8564 8628 1301 8230 7535 40 6912 8916 8917 8774 5698 180 6942 8918 5437 8919 8920 5214 8921 8784 8922 8923 8924 8706 654 3240 3354 7962 6535 7720 8925 8926 8894 8858 7058 5496 6010 8927 2314 792 164 8928 3315 8929 8930 8791 8349 7709 1445 5379 8931 8932 8836 8933 8934 8935 8877 7743 8873 8905 8936 8874 8907 8937 3617 3288 204 8802 8938 8939 8940 1604 5112 5646 3903 8941 5815 4360 6557 8942 8943 5641 6609 6022 8944 4389 8945 695 8684 1856 8946 8947 5194 6181 7956 4037 1830 8889 8917 8948 5259 8925 8949 8192 2031 3593 8950 8276 8681 8821 7520 8951 8952 8953 6749 8954 8955 7981 4544 8956 2225 8920 6915 7606 8957 8922 8893 5040 8899 821 5684 8958 1341 8959 8960 299 6558 6125 2288 8961 8962 8831 2232 4225 7737 8554 8963 8088 6560 8123 8927 8964 6102 6494 8900 8930 8965 8868 4285 5031 6337 8966 3749 8838 8967 5982 373 479 8451 8841 8968 8969 2274 2442 1885 1159 3013 4204 8970 8971 8972 8487 8973 8974 4131 3690 3809 8975 5987 1457 6799 6306 8976 8942 3943 7271 3994 7218 8977 3084 8978 511 6728 1875 8004 8607 6151 646 2465 8979 5540 8851 8980 8981 8982 7651 8737 8983 1003 8984 3127 3408 822 8985 5578 5156 5315 4694 3209 8986 7860 6915 5682 3060 3112 8740 7812 8666 8987 8988 8855 8989 8990 1217 8926 8962 8991 8992 8935 2335 5743 8860 6561 8863 8993 8994 8179 5612 8995 5930 8967 8936 2019 1852 371 1593 5116 5028 8996 8968 8937 350 8786 8733 1504 3989 8586 8325 7131 4038 8997 2138 4066 8307 264 6577 8998 8999 1091 9000 2286 9001 5161 9002 8914 1561 8299 2233 812 8278 5053 6927 8154 7954 8747 3072 9003 7145 2519 9004 9005 8648 4536 9006 8147 9007 8494 6102 7373 9008 9009 9010 6104 6852 3502 9011 8980 8948 8896 8410 8524 9012 9013 9014 5136 7468 7021 801 6824 2554 9015 4303 8822 7919 5442 8313 8796 3274 5230 8957 8988 9016 8989 4906 9017 7206 5155 9018 8895 9019 9020 5372 3555 1711 9021 8993 8965 9022 2942 7901 6108 5931 8904 9023 248 5318 9024 9025 8906 8997 9026 8866 9027 3676 9028 7234 8327 5218 9029 3530 7296 9030 1078 4756 6864 3732 2998 8975 9031 7804 9032 7746 2379 8730 9033 9034 9035 9036 9037 7436 9038 3389 9039 9040 6986 8459 202 9041 9042 5054 3764 645 3271 5103 9043 2651 7096 9044 9045 8916 9046 9047 1679 9048 9049 6742 8497 4513 6551 8763 6127 6318 4452 4710 9050 3140 1487 8548 8923 9051 9052 9053 8992 2848 213 3889 396 9054 3497 7506 9055 9056 7939 9057 9019 8991 6931 5427 3676 3810 1664 400 9058 9059 8929 7336 6146 9060 6932 1602 9061 6634 9023 3960 8996 9025 9062 9063 9064 3254 9065 8765 3621 9066 2637 8943 9067 8266 5583 1473 3762 4922 2641 2998 9068 2447 4923 7553 9032 1451 4154 9069 8679 8276 4254 8348 9070 4594 1562 3551 9071 3869 7866 6869 9072 9073 4076 9074 202 9075 9076 2841 8002 2577 7355 9011 9045 9077 9078 9079 4909 8951 8387 9080 6198 8954 3429 2719 121 3735 9081 7116 7518 904 4747 4394 4227 7842 9082 6147 978 991 8667 8513 8180 9083 9051 9016 9084 2337 8654 8300 9085 7664 9086 9087 8961 9088 5914 9089 9090 6733 8662 9091 320 4635 9092 2119 4690 9093 305 1525 9094 5791 9027 9021 9059 9095 9060 6111 3071 7564 9096 9097 9098 987 2229 8969 9099 9100 9101 9096 4253 9102 2404 9103 9067 9104 8231 3077 1180 6484 9105 2110 5863 6070 4496 467 9106 4382 567 7048 9107 5568 9108 3952 9109 9039 6910 9110 9111 2345 2041 9112 9113 1736 8981 9114 9115 9116 7190 9117 7998 8871 523 8617 8088 1292 3441 5216 3073 1570 7739 2389 9118 217 9119 9120 550 9121 9081 5734 7158 3610 9122 5780 1996 9123 9124 9125 9126 8987 9127 8010 4019 9128 7678 9129 2081 5775 4671 9057 9087 9130 9088 9131 9132 9133 654 9090 8994 9134 9135 7687 1551 1464 9136 9137 579 6890 7194 9138 9139 9099 9062 8971 3254 8913 9140 2487 5070 9029 5943 6596 3011 5821 7694 4351 9071 4648 9141 9142 1856 9143 2841 3876 9144 6782 9145 2609 9146 3146 9147 4908 614 1364 9148 6488 9149 9150 9151 9152 9114 9077 9153 9154 2782 9155 8880 1200 4128 3051 6648 1226 4611 4881 8912 8574 9156 9157 3733 121 9158 9159 9123 9160 6589 6774 9083 9126 9161 9162 6172 9163 9164 6983 9165 5533 3888 4789 9166 9167 9168 8484 5863 9169 8715 8308 4770 4664 1365 7654 9121 4600 2510 9020 9170 9171 3203 9172 6916 9093 6695 7034 9173 9134 9095 9174 9175 9176 9177 5534 9178 9179 9180 6023 9181 9182 9024 278 9140 9183 9184 3255 9185 8963 5160 1209 6636 8131 3012 3310 1941 9186 9187 3370 2099 9188 3270 5484 5731 522 5339 9189 1917 4644 9190 9191 9044 8178 6051 3133 5240 1737 9192 6380 5840 7763 8442 2594 2965 3976 2783 7751 8511 9193 5211 9194 9195 9196 5398 5667 9178 9052 9197 9198 9164 4189 9199 3330 3703 3729 6734 5694 9200 6940 3317 6910 9201 9170 9130 8486 4126 2112 9202 8064 9131 8155 2815 8742 8471 5927 9203 4308 9204 1870 9205 810 492 9206 9207 9058 9174 2737 9165 9049 4997 7876 8523 9177 8897 1422 9208 6889 9209 3421 9210 9139 9182 9211 9102 5654 4601 9066 8072 5173 3770 9124 7492 6660 7035 9212 5891 7296 3615 4031 9213 7503 9186 646 6153 6801 3986 9214 9215 614 208 4373 7536 6911 9152 9191 9216 9217 3351 9218 9219 1626 7689 5986 9220 9221 9127 8400 9053 9222 8934 5055 9080 9223 9224 1233 6084 7652 9120 1029 9225 9226 5164 7399 7610 8482 8537 9227 9197 9161 5812 591 8327 7113 9145 5647 6794 214 734 9200 1785 6732 9228 3576 3336 9229 9230 9086 8398 7955 8153 5978 1356 305 173 2877 9231 9173 9207 9232 9233 915 7821 9234 8887 2737 9235 3876 9076 7726 8225 9236 9100 9237 9238 9239 9240 8223 3325 7503 7412 9241 7486 9242 9243 7913 9244 8983 5619 6336 848 9245 8648 8389 774 232 5047 1068 7316 735 6105 9246 9247 5913 2777 9115 9248 9249 1823 5167 8589 2029 1589 452 9250 6972 2984 2217 4529 9251 9252 8182 1067 9002 9253 9040 9254 147 1595 8491 2054 8505 9091 2972 9255 9256 9223 8641 2140 9257 6033 5184 7386 5232 448 9258 1580 9259 9260 9125 6795 5708 3762 2823 3030 2730 771 9010 8815 9261 7189 6494 9208 3557 7461 9262 7453 5350 9201 9230 9263 9135 9264 9265 4636 9266 9267 6192 7397 2413 9268 9237 9211 6705 3310 6610 9269 1124 9270 9271 3439 1382 6174 9241 6593 6536 9272 8225 9273 6102 7374 7213 9274 3138 432 6389 5928 8291 4976 6924 7965 8705 1438 402 5607 9275 9276 9248 9216 8824 8538 9277 9278 2272 9274 633 7406 8125 7936 4005 9279 5890 4660 8557 9280 5142 2332 9227 9260 9281 8979 8546 6442 9282 9283 9284 9285 3802 8454 7144 1600 9286 9287 8250 137 7159 9033 5553 9171 9288 9289 8749 8950 8892 9290 9291 188 9292 9264 9232 9293 4718 3539 9294 9295 9181 5473 672 496 9210 9169 2100 9296 5583 8406 9297 8480 6331 1103 2082 9218 9250 9094 9298 4016 1394 9299 5830 7143 1003 538 2749 6792 9028 5427 9300 5700 6328 7344 9301 8601 9302 9303 9304 9190 700 131 2186 2377 8826 2981 9064 9305 5161 8829 3696 6220 5825 486 8609 9256 5691 9306 7012 8302 3547 5883 6786 9307 6962 7510 5734 9308 5091 9309 9198 9310 9311 8547 9312 6602 5149 9313 7044 6055 2669 9314 9315 9316 4877 4854 4477 6469 9317 3653 9079 9318 9288 9263 4805 3862 5934 9319 9320 9206 7310 5518 9321 9268 9295 9322 9273 9323 6492 2467 2896 9324 9325 9001 5739 9239 4656 1374 7893 1502 8696 8691 4523 1078 9326 9297 3324 1 4352 3262 1707 6103 1560 8661 6604 9327 9328 5601 9329 7542 2716 554 5971 7715 486 2617 5421 3564 9172 9031 82 9330 3065 6670 8120 871 9331 9166 3298 6162 9276 9304 9332 9333 9334 4282 9335 918 3063 3769 9336 1994 9224 9337 9338 8485 3423 5649 9329 9339 1029 8970 1272 3255 1033 4166 1698 9340 9310 9281 98 6724 1709 9341 9078 9342 9343 1714 7001 9315 5075 9344 9261 3999 8294 9345 9346 9229 8640 8423 9347 9348 9349 6043 3806 5433 5903 9350 7319 6906 9292 9320 9351 4615 4740 2363 9352 6835 9353 9238 9354 9355 817 3154 7607 9356 6593 6772 4645 1533 1358 9357 2713 4509 9217 4671 4719 9328 2510 9358 5921 9359 1527 9280 8656 4706 9360 4591 2191 7552 6948 7333 9361 2511 3282 9249 9362 9363 9364 9365 9366 9008 5385 9367 2520 5029 9368 8870 9369 324 3755 7370 9370 9371 9337 9306 3041 5859 5725 8725 303 9287 9372 9373 3823 9374 9375 9259 7759 5879 8463 9012 6291 8245 9376 9377 4877 7262 413 3247 9318 9346 9378 1596 146 3118 9350 5887 9379 9265 9380 9381 5638 9382 9383 9384 9354 9322 9385 9326 6585 7196 359 9269 768 8388 9240 2600 5753 8086 3582 7091 8259 8020 4424 8660 9357 3425 916 3237 3483 1892 9386 3920 9387 8728 3744 3699 9189 2786 9388 7850 9389 5864 9336 1387 9390 5843 401 5764 8363 9391 8301 9392 9362 9332 6863 9393 7403 9143 6633 9394 7242 4257 9395 363 5662 4862 9194 1266 9396 8246 4508 9397 9398 2167 9399 4075 8163 9113 9106 8077 7605 9340 9375 9400 9144 9401 3937 9402 9403 236 1630 9404 113 9289 9405 9406 9407 9323 7198 2633 8670 6160 9408 9380 9351 8804 9112 9409 9410 9411 703 9111 5739 9412 4049 5173 8205 5021 9293 4100 9413 9414 9294 9415 5429 2749 1880 9416 7299 8058 7142 7892 5404 4850 1533 7049 1034 1697 9222 3580 9417 7647 9330 3920 9418 8037 6805 5159 4795 7783 5353 2981 72 9419 5707 9420 3977 8375 4670 9421 9422 9303 9373 9048 9423 9424 9151 2141 9235 6280 9254 9425 9426 5876 9388 2788 1537 9427 2918 1786 9371 7066 9428 3897 3914 9429 9430 9431 9432 9311 9433 9434 5492 5190 2485 9435 9436 5186 4802 9437 3210 6744 4472 9438 8876 980 5327 9439 3034 9440 9441 9405 9378 3904 194 9442 9443 9444 9319 9445 7951 6899 9446 9385 1152 934 7429 6687 5536 3894 8250 9384 9414 9447 9448 9449 9450 3863 7532 8061 2111 8721 4125 9451 5987 3661 4678 4413 6463 9452 5564 5629 5696 8465 7091 268 9453 4856 8068 9454 4428 9455 2624 6379 2459 9456 5838 411 889 3744 9420 9418 8133 7223 2112 9457 6753 8878 5873 9392 9422 9458 6017 9459 9460 9425 4424 9461 9462 9463 9464 9465 2981 3047 9338 9466 9467 9333 4697 8976 9468 9433 9400 6024 9469 2763 9435 5903 6652 9430 5126 8827 9470 9471 9345 9408 9444 9472 3908 5372 583 9473 6687 9097 7947 8949 9474 9355 9475 9476 5056 8458 7331 7975 919 8106 9477 9478 5232 3461 8811 2532 9300 3683 9386 9479 2976 5895 9480 1208 1113 7067 1914 9481 9116 3973 7320 7007 9482 5887 9247 7328 1257 9483 9484 8794 5026 7845 7601 2139 9485 4456 9363 9486 9487 9457 4125 9488 5658 9489 4424 9490 9491 9339 1912 5321 9492 9205 6240 3189 9493 9466 9428 8158 9494 8872 9495 8492 8504 9496 9497 9374 9498 9147 9215 4339 9107 7992 9441 9471 9499 6739 6865 684 1052 9500 4835 9381 9501 9502 9410 9215 2923 9503 3666 3541 9252 6407 9504 3884 2413 9321 9505 9475 9447 2993 999 9506 9415 8803 9507 2932 1698 9508 9509 8852 9510 1538 3485 7698 2821 3321 3515 8184 7996 9420 4907 6207 9511 2380 4842 9512 9513 9486 9458 9514 3552 2387 9515 5661 4933 9516 3338 4440 1970 9517 777 9518 7641 9065 9519 7629 7433 9395 5652 2183 8221 3527 6599 5977 9073 9520 9468 9497 9521 9522 9520 6893 3831 9523 9524 582 9446 7569 6502 684 9082 9406 9525 9526 9527 4947 7127 9528 9501 9472 5305 9529 5654 613 6465 9215 4960 9530 5950 392 7068 7859 9531 7945 9532 1455 9533 5185 9534 9535 9413 9536 1963 4839 6566 7292 8051 9537 4816 7376 6855 2565 6916 5424 6584 6915 9538 4940 4035 4538 6991 9539 9540 7216 3973 7272 2777 5963 9541 615 4908 3805 9542 6226 9543 9544 9421 2023 9545 23 9426 9546 7960 9547 9270 9548 8898 415 9549 8901 7201 7207 1056 6654 7681 9493 5968 9550 3824 9423 6741 2427 3491 9551 9434 9552 9553 9554 8248 8167 6658 9555 7608 3856 6961 6937 9556 3324 6331 9557 9525 9499 9558 8039 7926 9559 1457 9451 9516 849 9560 9527 1781 6071 9561 9562 9443 9103 9503 5306 9531 5651 9563 5988 1457 267 5172 8694 2638 9505 9535 9564 7710 1839 7628 9343 4983 6054 6531 9565 9566 9344 5282 9567 9568 2194 9399 9179 9569 8146 9570 9571 8558 5320 394 9572 9513 9544 9573 9547 777 9574 9575 5342 9576 9577 8079 2806 9467 9578 9579 9580 9581 8645 9063 3255 2095 9582 9552 9521 1030 9491 2069 1956 8552 6781 9583 4990 9584 1120 6674 8903 9585 9586 9470 9587 7400 9069 9558 8812 4507 9588 6916 82 2159 9589 4431 4386 9560 4758 1581 9007 8875 9528 9562 9590 9591 9592 8642 767 2714 9593 9594 7940 5651 9595 9596 9597 9598 6734 9599 9476 9600 9601 6686 9602 935 9335 8588 919 3369 9105 2100 7293 8467 6311 3860 2347 9603 1752 5974 7111 9604 6898 6188 24 9605 9606 9607 9608 8793 8420 6258 9609 4307 3927 7431 9054 7504 2462 9487 9610 9611 9612 5550 9613 9490 2639 2108 9518 2481 5342 9614 9578 9550 129 4533 4565 7609 1065 9495 9098 4835 9615 9616 9617 9496 6021 9436 6651 9557 9586 9618 8959 1305 9619 408 1633 4359 3128 7205 6395 9502 9620 9621 1408 2904 8551 1840 3516 9480 9622 5900 4551 9623 3783 1208 9624 9600 9564 4782 6687 9625 9626 1732 5475 6077 2879 1940 6611 646 2878 9627 1327 529 9628 9629 9630 8470 9631 5744 9128 1904 4582 9632 9610 9573 7455 6816 5384 930 4651 3018 5334 4064 5629 9307 7798 3259 6544 7909 2068 9633 938 6875 9213 4936 7582 9634 9635 5820 5866 9533 5987 9582 9617 9636 7846 9500 8362 791 6877 8033 209 4908 1873 9637 9638 8052 3080 7366 7155 326 3414 7321 9526 9639 9640 9185 5782 9641 9629 9420 6797 4314 4401 9642 3558 9643 3425 9644 887 8689 9645 9620 9590 9646 5997 994 5197 5567 9050 6980 6908 6726 9647 9648 9534 1746 2749 8563 9397 8812 9649 963 6206 9411 6202 8416 3251 1605 9368 7740 9650 9651 9543 3546 9266 7813 6779 9652 8045 8450 3386 3471 5835 7445 4194 9614 9653 9654 9568 2166 3768 9655 9193 2826 9656 6160 9657 463 5965 8477 9658 9615 7846 9553 9659 9660 6877 790 9661 7796 9662 3722 9663 3252 1480 9664 9639 9618 888 6692 1821 7810 8667 6926 2426 9665 1811 319 2406 434 4358 3911 838 9666 9667 9561 9594 3357 8692 9668 9669 9369 6716 5870 6908 9624 9648 9670 7565 9671 4104 9672 5444 3606 9673 9674 8788 5958 8767 4578 9155 8540 3167 9469 8771 8964 3218 9675 9676 9309 3652 9677 8541 9056 1727 9678 6402 372 9632 9651 9679 7413 7582 9583 6341 7858 9680 9243 6585 9556 9681 2119 9682 9638 4248 9437 8886 905 4393 9579 9683 9684 9685 9419 8014 9686 9659 9636 9687 3122 1868 5359 9688 5063 9602 9689 5121 9690 9348 1988 9663 9529 9691 9692 9693 9585 9694 4487 2769 8136 9695 8812 9696 6414 3373 8539 7484 1365 8381 1323 9697 9698 1534 2456 9645 9667 9699 9700 9701 5499 9601 9702 9703 9567 5232 9671 153 6116 8700 9704 6843 9705 9606 1856 7062 9324 3383 96 9204 7398 4344 9706 6965 7438 9707 5798 3750 4926 9708 9709 9710 8938 2013 9711 9104 6118 9611 9712 9713 2673 6460 4964 7522 8258 9714 3003 3911 9715 1926 9225 9491 9305 9716 5781 9717 7942 9718 9719 9683 9654 7360 9661 2994 9720 9366 9721 9722 9723 9616 8343 8825 7530 9625 935 9724 9664 9693 9725 9726 9727 2524 9621 9728 9729 8881 7434 7754 8489 1200 8809 9180 5712 9407 9730 9702 9670 8669 9731 2536 9732 8924 6734 1500 4465 5794 28 6437 9167 7184 9707 4688 9733 9673 5376 9734 7569 1152 7341 9735 2969 9736 5664 7600 9737 699 4517 9738 9712 9679 9739 7953 8559 9740 6953 927 9253 5781 8499 5995 8165 2399 1311 510 508 7580 9741 9742 9686 9723 9743 9118 9744 1674 2888 9745 9746 7914 7289 5613 9732 6732 1784 220 236 7749 9640 9747 9748 9749 9657 2718 9750 6225 8687 9751 5118 9312 8941 5764 9672 9752 9753 7849 9754 9728 9699 2468 2024 22 9532 9700 3357 3872 1637 7543 8891 9755 4143 9756 9757 9647 6860 5919 6474 9598 9758 9759 7691 9760 4733 9761 9762 9763 9327 2441 8615 9764 9765 7215 9448 372 6245 9766 9715 3729 9767 3956 9763 9736 4691 1773 9137 9768 9769 1171 2584 9770 6156 4140 8888 823 3463 9771 914 3424 9772 8495 9257 8820 9773 9774 9650 6594 9775 988 4841 8253 9776 5491 4627 7455 9777 4259 9778 9719 35 9779 5238 6774 6321 9780 8932 9781 9660 9782 9783 9784 7625 7146 9785 5745 9786 2391 3106 980 9787 9747 9725 6617 7126 9752 7094 9452 4063 9751 8795 9788 2765 8368 9789 1920 2770 4846 9790 9791 9666 9730 9757 9792 4012 2536 9793 9794 9795 9796 2961 397 3888 3132 9797 1241 9630 6796 9798 9799 4431 9800 9801 6989 9234 3260 5884 9694 4626 6538 7184 9685 9802 1474 9803 9771 4138 6679 9682 4691 705 168 6284 9689 9804 9805 8358 9353 1316 9738 9774 9806 7877 4999 8126 9684 9807 9808 7648 6269 5077 9809 6689 9810 9811 9782 9743 824 7188 1775 9462 9812 2864 5645 8202 8974 1014 9760 9674 7575 4570 6545 9813 9814 9692 9361 5312 4888 9754 9791 9815 9626 5276 9236 7173 9017 9003 9703 9816 9817 9818 9819 9820 3182 5248 9110 9821 9822 2699 4178 9491 2238 6588 9823 4295 9824 5907 4713 9825 145 9826 9827 9698 1203 2952 9828 1268 2755 2444 3789 9829 9463 4220 6616 2997 9830 9831 7786 9832 4891 2013 1747 9724 5121 9833 8448 8238 3153 9713 9834 9835 7864 4640 8752 9836 8805 7133 1925 9837 551 9838 9807 9779 9404 1471 3552 8305 9839 2133 9570 7566 9840 9841 9842 9722 2185 8736 9843 6115 9844 3766 7404 9845 9846 9787 9814 9847 9848 5589 5181 9729 9849 9850 9272 9279 1732 9851 9816 9792 3811 4635 433 8995 9852 8154 4924 5811 5182 7977 9821 918 9853 9717 6228 9854 9855 9856 9478 9840 4104 9857 5934 6838 7595 5976 1531 8065 9226 7430 8626 9858 2756 3137 9859 9860 2855 9830 2996 7631 7052 6265 9861 1425 4799 2350 4272 1514 9862 9834 9806 981 8882 9863 4179 7318 7615 9000 9370 8222 2913 1675 8129 9642 1203 4244 4872 5280 9864 9865 9866 2559 9867 5763 6529 9811 9842 9868 8697 9085 7014 9456 9577 9869 8859 2197 9673 9748 9870 9871 9872 8844 279 9416 7305 8818 9873 9874 9875 9876 9849 9815 2812 9877 3415 9878 9822 8663 9879 9880 9756 9797 9881 5302 9882 9026 6261 104 9883 506 5686 7868 9884 7838 9827 4401 9885 8972 9004 9720 9886 9887 9209 3370 7927 7579 8990 8303 3987 9108 9382 5387 3788 2854 9360 6415 9888 9889 9890 5860 5665 6294 3641 9891 9892 9773 6416 9893 8915 9485 9894 4755 7891 9412 2286 9838 9895 9896 5671 8309 4033 9897 8244 9898 6184 9515 9899 9783 9900 9901 9902 9870 9847 5591 5584 5756 9903 4222 7566 7427 7141 4727 9554 1438 8018 9904 9905 9790 9906 6473 2030 9851 9880 9907 5616 4630 3874 167 5635 6837 9882 5538 9195 3004 5548 4675 9804 9908 6439 3381 9909 2194 8280 162 9910 3142 124 9911 9912 7837 2987 9857 9913 1260 9914 8262 570 7716 5853 5976 2539 6374 9775 9885 7439 5489 7857 9481 9915 9862 9892 9916 3333 1740 9047 471 7916 9917 9808 9918 9919 9920 8711 9921 7822 5692 8142 1072 9168 9365 9922 9900 9868 8462 9923 9924 9117 8293 2937 7586 4357 4170 9925 5380 9780 9877 6476 1282 9926 9927 9813 8605 5757 5584 9314 1609 9285 9876 9905 9928 6789 790 8688 9929 8512 4628 9817 9930 9931 9932 9240 4576 9933 7795 4172 2150 9934 3132 8401 6767 3220 9833 9805 9935 7204 3070 6700 8270 7192 9936 8960 9912 2521 9727 7043 4795 8519 9937 4168 9784 6561 7110 9439 9921 8945 3747 3395 6417 3434 5609 9938 9835 9939 9940 5592 9739 3038 9627 701 9843 7432 3164 8117 9941 9918 9896 6918 9942 9943 3734 9865 3960 6479 7405 9944 9945 9946 9841 4705 240 8282 9947 7241 612 9902 9927 9948 7139 8623 9733 9770 9390 8031 5511 2193 8452 9850 9949 9950 9951 9802 868 9952 6892 9953 9954 9930 9907 8984 6027 6819 9883 9955 3402 9704 3410 8846 8024 7059 6482 8317 226 7342 7199 5104 6023 9956 7768 8690 9957 7937 8542 9889 486 7549 9958 5510 9175 6787 9709 5447 9959 9939 9916 9960 3724 8425 5818 7755 9961 9962 3761 4535 7393 1130 1219 8549 9963 8702 1781 9964 4661 7938 8835 3741 9866 2955 3621 8931 7721 9965 2810 1626 7080 3774 2251 3907 8310 5231 9966 9922 9946 9967 9968 8653 5676 9969 8584 8800 9871 9970 9971 9972 6473 690 3195 1385 3769 9973 9949 9928 8622 2180 9974 9768 9951 9596 9975 9976 9879 1532 9977 407 9978 9979 4676 9980 9605 9142 9359 676 8260 6276 9358 1983 275 7232 8955 6023 4361 7301 6830 9956 6723 9829 7660 6425 2990 643 2475 6455 9981 966 1743 6271 9982 9983 9984 9891 6083 9985 7353 1041 9986 9746 1022 6625 1383 9987 9988 9989 9990 7212 9991 9941 7780 9992 9993 9994 873 7392 9658 7026 3094 9157 2718 3738 1870 9995 8842 1497 3214 4498 9734 9244 9901 9996 9997 2828 9665 8028 8506 2056 5980 9998 9970 9948 4980 667 9690 9908 9999 4388 10000 10001 9904 10002 6994 6091 2772 5263 6387 9597 868 8014 9954 9976 10003 4464 1864 10004 7799 9119 6561 9538 7955 9852 10005 9895 5224 7658 8561 3410 1527 9331 6475 1169 3996 5934 1481 7167 6429 764 4995 4362 9132 4973 7558 2484 786 7452 9649 7884 9187 9959 9984 10006 9960 4331 10007 9488 2920 5886 10008 8787 5137 4981 7035 5575 1051 9221 6490 9919 10009 10010 7517 5325 9038 10011 8952 5395 10012 6451 7686 9993 5258 1744 9906 10013 8121 10014 4071 8327 10015 9996 9967 9409 8509 240 10016 9745 10017 10018 10019 9926 9836 7075 9074 9935 6439 10020 9973 10001 10021 10022 9619 3533 9931 10023 10024 8764 6574 1161 6754 10025 10026 9789 10027 9628 4598 10028 10029 3731 4766 9830 4002 6656 9542 7165 911 1802 555 10030 2717 9519 8116 2093 1384 8286 10031 10032 6982 9199 10033 966 9631 2587 1100 3940 10034 9762 5151 9940 10035 10036 9612 346 3361 10037 599 3247 6472 10038 7085 9646 9731 6715 4112 8681 8384 2831 1409 10039 10040 10009 9992 6828 3390 3490 10041 6185 8012 10042 8638 9696 10043 9721 5528 2268 7781 10005 10044 10045 9945 9888 6097 7051 9622 2798 8023 10046 7991 732 10047 10004 9824 6461 2672 2575 9998 10019 10048 10049 10050 5765 10051 9769 9595 9950 10052 10053 9571 10022 4763 9286 8849 1798 10054 10023 10003 10055 10056 6811 4008 2472 672 9825 2966 8441 4994 9317 9341 10057 4492 10058 10059 10060 1716 9980 7414 10061 439 4414 7441 10062 8130 555 9897 10029 9013 2650 8159 7056 8330 7830 8780 1114 10063 10064 5566 4823 10065 1616 2379 7847 4003 9964 3559 10066 10035 10006 2188 8560 8879 10067 561 10017 688 6473 2662 3266 9845 9740 10043 4268 10068 9042 10069 9440 10015 10045 10070 6005 9214 5637 7481 5795 10004 9971 10071 10072 10049 5444 4673 10073 10052 10021 10074 9376 10075 10076 8655 9041 9089 1256 9819 10077 10078 9975 9798 1475 6143 3046 2593 2964 8000 8441 3109 10079 6630 4819 6365 6390 3619 9424 6032 4979 1618 1195 7791 10080 10081 8986 5805 6075 130 7020 10059 911 7079 4973 3739 4499 8532 10082 9396 6723 8867 3744 6784 10083 3204 6943 7568 10084 5174 9913 2767 1493 10085 10086 5966 7990 2388 5286 10087 10088 10089 9983 10090 9633 6044 5348 6179 10091 9793 994 5892 10092 8240 8681 10040 9592 10093 9999 10094 3605 9146 7359 8168 9997 10095 10096 7787 8209 7630 10097 3553 583 4847 5884 8631 1903 10098 3238 10099 10071 10048 403 4915 5444 10100 10101 10000 10102 9477 5282 10054 10078 10103 1663 1161 2303 4589 1108 9753 9540 2937 5561 10079 7786 8723 7187 2906 313 1147 4508 9695 2664 5629 8057 1967 10104 4676 5364 9037 437 10105 970 10106 1045 581 5372 8171 1340 4342 10083 10037 412 8128 7852 5740 2871 8207 8397 10107 4334 26 7690 3559 1781 2001 5413 9034 10066 10089 10108 8762 8910 3724 8595 1999 9755 10109 1571 10087 8372 4764 8558 2968 1038 1705 10010 10110 10111 10020 4388 10112 3623 3630 7460 2589 1680 8857 10113 1419 9184 10114 10095 10070 7005 804 10115 9925 10116 10117 9545 1855 9605 8753 4642 10118 10119 10120 10018 2518 5596 7439 10073 10101 10121 3773 9910 7539 10024 10122 10123 10124 10125 7628 3347 3452 6562 1344 264 3001 1874 9858 9541 9283 7444 5834 1687 2192 383 10057 9830 3787 376 6371 1516 9203 4738 9459 8009 9801 3384 8111 2368 10126 10127 9255 10128 9482 10129 5470 3442 636 6433 3458 8819 5410 7356 10032 4140 6438 5120 9805 10036 10130 10131 4859 3765 10132 4952 6856 10133 10134 9987 7035 5752 1183 4107 335 7546 8040 10135 10110 10093 9848 10042 5745 10136 10137 5345 1333 279 8050 10138 10139 10044 4490 8295 2798 9364 10140 8386 6846 9673 8623 9377 10102 5075 10099 10120 10141 10026 10075 9316 553 8129 9744 5807 9258 4297 10053 10142 10143 3772 8571 2047 10144 10122 10103 6581 10145 6065 4741 10146 465 391 318 7138 9511 2757 1874 9988 5768 5163 417 7257 8594 10127 1512 3090 10147 8946 9605 2361 10030 8129 10148 10149 10028 8411 4169 3353 5566 10150 9158 10151 586 10152 1170 3857 7239 3299 6275 609 10153 10130 10108 10154 6662 8978 7361 5293 1410 8770 6200 9432 9872 9183 10155 10114 10139 10156 3135 2696 5547 5839 9869 2805 10072 10157 10158 5956 6294 5857 10159 10142 10121 6173 6413 4332 10160 10161 10077 2182 470 7294 10162 1581 10163 6976 902 9794 3322 10164 2340 10063 5778 8958 7517 8203 9968 10165 10166 2338 4101 3538 6006 8105 2629 9923 10167 2626 6878 6305 9138 9334 9149 4978 10168 5634 9805 10084 10152 1330 2040 10169 10170 10088 6738 8082 10171 10172 5226 8434 2837 4635 2973 3055 8255 2826 6697 2398 3431 10135 9874 10173 7222 8083 8283 5343 6951 9985 10174 1023 1865 10096 10175 10176 8038 9539 9393 10177 10157 10141 10178 10179 10100 4188 4242 2425 10144 10161 10180 6215 891 10181 10182 10013 340 3545 9795 2507 10183 4946 4742 10184 10185 8312 7917 3384 9176 120 7843 9749 2316 3086 7761 10080 2529 4343 3929 627 5299 4998 3622 8127 10112 3605 10186 8682 2195 9909 9737 4630 4004 7299 8732 1969 10148 1238 10187 5888 6194 6462 10041 2360 8132 691 1371 316 10153 10170 10188 9914 9994 9982 8741 10189 9837 7982 4725 3291 3484 8251 10190 7030 8298 6445 9302 6771 2925 10111 10191 10192 7669 10193 396 5127 10004 4525 10194 10175 10156 5500 10195 9675 10196 2881 10197 10198 10199 10119 10159 10179 10200 4327 779 6910 10123 10201 10202 4053 6332 9389 4246 9298 5558 8525 9576 2481 10203 9455 10204 9641 7400 10205 9884 2317 1216 10007 169 617 1237 8612 6720 10206 721 9678 10207 3751 4912 10208 10011 7346 6167 3188 9705 4201 10209 4255 7493 9742 4949 9655 3816 9530 8719 2010 9714 10014 7130 6947 10131 10210 10211 4971 8456 6281 4217 9474 740 10212 10191 10173 9823 8909 4296 6719 10213 10187 2695 3112 1016 10214 10215 10138 10195 8597 10216 5519 10217 539 2476 9233 6307 10177 10199 10218 10143 10219 10220 10106 340 2030 9796 3419 3283 10221 10201 10180 10222 3834 9068 10223 9136 3618 7770 3931 6524 7829 3232 10197 10224 10225 8120 10226 10227 2511 2830 5355 8635 10207 6520 5332 9202 9819 1971 8213 8639 10228 10229 4097 10230 10231 10232 5426 7325 444 7529 10233 10210 10188 10118 7226 9867 4011 4795 8599 8618 9479 10234 3481 10098 9129 10235 6197 7186 10194 10215 10236 375 10237 9220 10238 5656 3338 8918 10140 9887 10239 10060 6769 7221 5179 10240 10158 10241 10242 10243 10219 10200 10244 9995 3680 6796 9962 7862 1114 10065 9623 10245 3230 5158 10246 10247 10160 9006 9587 1557 156 199 6704 6578 6666 5954 8422 7967 10050 4251 9911 9881 6340 1047 1753 6809 4099 9741 10248 3326 9141 6845 9402 1015 10249 5010 4018 9431 10250 8834 8947 10251 4376 10252 10062 2716 10253 945 9596 7350 9282 9565 10254 10255 10169 3591 2826 9929 9761 4419 9313 9903 8558 10133 4333 5745 10256 6031 8496 7668 10212 9855 10257 8685 8646 1739 10162 9484 10205 10176 10258 10259 355 9460 455 9438 6135 6895 9785 10239 5589 10260 10241 10218 10261 10262 10178 10186 10263 10264 10221 10247 10265 7633 3906 4497 4243 1533 406 10184 5316 7033 10203 8944 2745 8921 3511 2529 10266 4230 6339 10267 7741 3875 10055 9403 10204 10268 10269 5406 3649 4119 6520 4757 8648 10251 6949 10137 9943 5436 9886 10068 10150 10064 2947 1110 4030 7283 10270 9372 1254 10233 10255 10271 9681 10272 8973 2469 1483 660 9832 4821 7541 6163 8761 3341 8074 9275 249 10192 10273 10274 9484 9856 9873 10275 10258 10236 5060 10276 5952 10277 10278 10198 4239 1870 8081 10243 10262 10279 9875 9591 1639 7997 4300 6796 10202 10280 10281 778 1968 8785 10282 8395 7836 10283 10284 1960 8576 8512 2825 6338 10285 9963 5147 10249 1394 7745 2610 3145 3026 9991 9546 2689 10286 8508 10287 7696 6001 10211 10288 10289 9575 5416 9726 9512 9776 8885 10115 4821 7785 5285 1993 6857 10290 10273 10257 5135 5243 9569 10244 902 10291 10292 10293 10214 9188 9893 4886 9536 9878 1671 4647 6213 1692 10145 7065 10294 10260 10278 10295 10220 10296 10297 10092 3969 7943 10298 10280 10265 4541 8619 7955 10299 6649 3281 5400 9861 6294 10282 8537 2794 6607 10204 3078 948 3056 8512 2357 7383 9325 8208 10300 10025 8097 7698 3157 2817 1725 10301 10129 1847 10302 1722 5766 3196 8114 759 8162 9262 9401 7115 4262 10294 7000 940 7283 10229 8195 10303 10209 1588 5427 3993 8766 10172 620 10304 10288 10271 6602 3263 58 8342 9677 4993 8695 4634 434 10275 10293 10305 9387 6670 8306 10306 5626 10307 10308 1763 2601 9383 9109 10309 8750 7315 10113 10242 10310 10311 2776 10312 3162 9604 1299 9394 10313 10296 10279 8261 1655 7563 10314 10315 10246 503 3384 8042 10316 4347 1480 8693 10134 1990 2569 6131 8710 7628 10285 367 4406 7833 1394 8985 7208 2611 10317 7613 5094 7594 3700 1057 8573 9398 2195 10318 10319 10254 5337 325 6643 5464 5901 9581 1020 10105 9972 7260 7261 327 10320 54 1121 10290 8169 10321 6941 6218 6249 10259 10322 10323 8854 9637 3684 5944 3611 8289 10264 5158 10308 6621 9653 7104 10324 10325 5609 6452 8864 9449 9759 9607 6732 10326 10310 10295 10327 10328 10261 2437 7865 4648 10298 10315 10329 10330 173 9465 10331 3888 10193 8843 2208 6824 7382 6007 2582 7704 966 3569 10332 7932 2953 10165 3449 9242 198 2076 2439 5742 7854 10276 8702 10125 8498 10333 10334 10335 3501 10336 9246 1894 9662 8041 10304 10319 10337 10274 10338 10339 6150 9839 874 2149 4042 3394 10340 10322 10305 10341 579 10051 5123 8852 2307 9563 7942 161 3416 1626 1721 4103 10342 8373 10343 10344 10277 10313 10328 10345 10346 8284 1243 10281 10347 10348 10349 10316 5654 10350 6362 8759 9656 7351 8522 10058 10222 2996 2995 973 10351 5266 7274 1882 10217 7197 9574 1587 10352 960 10047 1024 1866 1728 9055 158 7540 9015 9299 10353 9584 9453 10289 10354 10355 10356 10357 2 1801 297 8999 10358 10359 9492 10002 10166 10360 9212 1989 4211 10361 10338 10321 5446 7952 4665 10362 10225 10363 7244 4944 1155 10364 9046 5326 2975 9750 5355 10365 10366 10292 2409 8209 9831 10227 1439 499 10367 7154 10149 10368 10369 1921 10326 10344 10370 7006 6463 9953 10297 10371 10372 595 9231 4138 10373 10347 10329 10269 10374 4275 8075 10375 6160 6342 6135 7622 4838 7369 2137 10376 970 1555 10232 8034 9072 10377 10378 7477 7902 2944 3216 1889 2003 1054 4201 9070 9936 10379 2036 212 10380 10354 10337 4141 4189 2736 10381 7045 6511 3268 4885 227 5192 4376 9245 7714 3232 1636 10340 10366 10382 10126 5314 5273 9687 2548 6987 2780 6426 9391 7880 2063 5175 2490 6440 7553 7150 7322 2839 10311 10383 10384 10385 10371 10345 10386 10056 3079 4972 9075 1299 5411 10387 2473 10388 10389 10314 3521 4388 4329 8908 6089 6995 10390 2649 7369 9781 9965 8055 10391 5014 299 7523 10291 3972 8385 8919 423 3780 10317 627 7248 8124 5806 10303 469 9 10392 10393 10318 10067 2890 3100 10394 10395 6994 8507 1286 3366 10361 6902 10396 4671 2082 4449 10323 10397 10398 10399 10400 3 6120 10238 4386 7553 9958 726 10401 2770 10369 10402 10383 10370 8743 7894 1423 10403 10404 10327 9417 1008 8748 8170 9854 8795 10387 9589 5796 10405 9163 1062 10373 10389 10406 10376 765 10182 10350 6824 885 6620 6261 4065 8998 6995 10395 4270 472 7667 10094 10245 10263 6369 6318 10224 9379 5470 7616 4974 9131 9818 9668 9494 2652 8218 8393 127 9710 4614 8673 955 8472 10407 4703 5657 8720 10380 10393 10408 10339 10409 10410 8011 9899 8734 10411 6631 7853 7677 1067 7335 1872 5386 6002 10412 10397 10382 3882 9429 4014 6516 10081 624 10248 1702 330 10413 8066 10374 10414 10415 10343 10385 10404 10416 9947 4170 3963 9933 3234 5129 2330 1639 9483 10348 10417 10418 10419 8402 5361 2718 10375 517 10299 8019 9489 10420 5885 10155 4295 10240 6495 9506 10167 790 10421 10223 3288 10016 7839 1042 9981 9507 10422 7995 4146 4371 6717 4437 5263 8806 8897 7252 10423 6645 8407 10424 4861 6310 8310 6556 5324 3213 10425 9937 8789 9777 10146 10355 10426 10427 9022 10428 4748 10429 10409 10396 10034 10171 10430 9977 9766 1633 6 10431 7931 10432 10433 10365 4621 7364 2911 9509 2448 8122 8883 9192 9454 10402 10415 10434 10372 10435 10436 10272 5606 192 6331 4161 10164 10437 10417 10406 10419 2106 9758 1380 10332 7274 5603 10438 2829 776 7717 640 6155 2373 9148 10439 10267 4630 10440 6178 6884 10312 10421 205 10367 10213 2728 7009 6066 10441 10442 5667 8897 6528 10031 748 6049 1614 7052 9716 1582 7400 1220 1129 8352 10443 10426 10408 5557 10154 3083 10444 10228 6964 10445 1648 9786 4390 10333 10075 2690 3009 7576 10446 9613 8890 1106 10447 1205 494 2061 10431 10412 10433 10448 10256 5589 4967 9957 1036 4235 43 834 8087 10384 10449 10450 8249 10352 10394 2495 1376 10451 10452 10435 10416 10453 9549 10090 10454 6685 4781 10455 10456 10388 10061 10457 23 1990 1900 10458 10438 5903 5432 7298 86 8733 6250 1671 8956 690 10459 10038 4922 10460 4165 5655 8647 849 4792 6378 9708 9966 9504 6977 9691 7963 4302 5912 10368 384 9764 6512 9009 2055 2281 5981 3246 10181 3743 10461 10336 4745 5001 3898 3883 10462 10463 10392 4875 10075 10300 2179 1951 2045 2697 3525 8220 10429 5770 10464 9043 4015 9669 8982 2187 1234 10447 1874 9498 10398 10465 10466 8652 3449 9356 8977 8439 168 6831 9944 9846 8596 539 9517 10467 10449 10434 9160 508 1665 9697 2043 5738 10468 10469 10403 10453 75 9228 9442 8973 9092 9711 7526 5803 10437 10456 10470 8632 9156 3466 10458 3198 1988 10027 3618 10341 6314 3020 3821 10460 6832 7137 835 849 9005 10471 5951 3156 5516 7700 5732 3944 10472 2337 88 194 5390 4879 8229 10266 4353 10400 10208 10423 10325 7491 10443 10463 10473 10309 3954 10235 7840 2160 3600 3248 599 8435 8550 5861 10039 10410 10474 10475 3393 8966 720 10476 749 10334 8304 10477 875 2742 9159 5822 7650 1101 3122 10478 10465 10448 5272 10479 2534 10480 10481 10414 10085 7607 4899 10452 10469 10482 9030 9894 8365 9599 654 8383 10364 1313 5486 10418 10483 10484 1528 6474 184 7621 6118 9296 6532 8869 5946 8094 2542 9537 3027 9461 8019 10485 3721 10486 7828 421 7345 7944 6468 9701 5109 8066 2531 10487 7713 10439 117 856 8928 10136 6399 6919 10472 10444 3447 9934 3275 4251 8534 10441 8431 7897 405 8088 9445 6632 6214 10427 10488 10489 10445 3373 8585 6256 3945 10490 10491 10474 10464 3476 10359 10168 4502 3000 10459 10492 10493 10432 8500 9524 10116 10467 10481 10494 3861 7017 3494 10495 6692 9644 10436 10496 10497 8457 8933 1592 9347 3724 704 360 1301 4149 10498 10483 10470 10183 467 4662 6025 8313 6367 6663 7387 2031 481 5361 3219 6748 8211 627 6335 6450 1360 10499 9014 6950 9290 5744 10422 7375 1161 10151 2169 8746 9608 8581 1224 10189 10353 2024 10457 4462 247 6460 9938 8407 8768 10091 10440 5672 10500 10488 10473 6891 139 1421 2422 10270 8177 10306 5819 8427 10501 666 9769 8602 3600 9799 10320 8902 9018 7482 946 9277 10478 10493 10502 6187 5497 8024 4619 10503 7593 6317 7614 6355 7259 5038 6655 9820 1972 9219 10450 10504 10505 8708 611 9133 7112 1822 10495 10506 10496 10482 2287 2419 9932 3919 10231 3683 3614 3425 8143 1050 2231 3965 10507 10508 10455 466 9778 4828 4346 10268 8416 8526 3321 7290 1719 1972 1258 10442 8524 5858 7592 5727 4620 10509 7233 10485 10379 8103 2104 2241 3399 10185 5899 6175 3473 1649 9969 297 8808 1297 4208 5013 5363 2987 3371 6413 9162 6785 1708 8421 10510 10511 10462 6828 4592 5554 7132 10076 7075 10501 10512 9349 5074 5233 5282 10491 3895 10513 8953 3830 2499 10514 1404 6600 8884 1511 8777 7417 6508 8428 10515 162 7941 10466 10516 10517 6283 8508 10012 8113 9826 8571 10324 3297 7408 9153 10518 9812 1871 4238 3926 10519 10504 10494 8328 9952 2180 10520 10521 10468 3376 5129 3435 3910 1846 3730 361 3379 2675 10498 10508 10522 8861 6042 10301 8285 10025 10335 1373 427 1180 5717 8600 10523 10346 506 2326 9767 10430 4569 9473 3289 1119 9566 9284 5833 10500 10511 10524 225 150 9735 8683 10206 479 7793 8636 10351 138 10454 1953 10475 10525 10526 8473 10107 8813 10476 7699 7899 1303 299 10420 1009 6372 1816 8686 10527 1702 5706 7531 5097 10528 10516 10502 4848 6563 2816 2885 6858 10529 9853 8287 162 7874 7463 10530 10531 10532 10480 10506 10521 10533 10413 5146 2532 8188 10349 5306 901 5036 5560 6628 10086 2219 10484 10534 10535 2725 5832 387 10097 7571 9609 7697 113 9514 1279 846 1372 7970 7297 7307 10471 2308 10536 10537 9915 9828 10461 6460 2596 185 10363 349 10489 10538 10539 4145 7534 4372 6812 10503 237 3671 4454 3050 10540 10525 10513 6701 8288 9267 1598 7899 7705 858 10399 10357 9101 3494 8543 7081 10541 9131 10542 10543 10492 10544 2365 3588 5061 10536 8852 10287 1515 3626 7462 7863 9688 10519 10532 10545 2886 9800 5411 10497 10546 10547 10548 10534 10522 4240 5548 5180 4677 6355 6078 10490 1062 6171 317 3079 10204 4225 10284 8144 9920 10069 536 6683 696 1482 8185 943 10104 7284 10132 7061 348 4803 3392 9548 1878 1968 10549 10538 10524 7428 958 4769 9596 10550 10512 7072 2675 8627 6041 9809 2305 10033 6016 3570 2958 7057 5002 4653 2162 1313 8329 1768 3973 10551 6681 2174 10528 10543 10552 9308 8341 9864 108 10196 281 4186 9551 8340 10331 4463 4790 10553 3663 1351 3074 4110 7910 7088 3400 7670 10505 10554 10555 9508 1034 358 4711 3683 1590 10082 2752 8940 10556 10546 10533 10557 10558 10507 8508 10559 2859 10405 3945 9084 7790 583 5371 5383 306 4693 1416 8577 4190 5495 7822 9772 8536 8782 10425 7494 5228 8449 842 8671 4844 4323 10428 7900 10560 3532 9035 10561 10562 10510 10563 8046 2889 9278 9765 9367 10564 23 10565 10550 867 1906 9342 4910 5461 1835 8032 8031 10540 5535 10566 8776 10530 5357 9989 6485 6476 10517 10567 10568 7389 3839 6990 10128 6676 1511 10358 9572 9150 4134 5841 3409 10569 10554 10545 5004 6540 1841 10570 10571 10520 10572 9706 10283 9271 4844 9924 10548 10558 10573 10477 10559 5711 426 10386 1180 2418 10451 9240 9788 5237 4294 2938 5274 5313 4774 9990 10226 805 10574 3459 5381 10117 9523 1733 8225 8816 6288 5998 8722 8047 5098 2271 7792 3133 10544 9803 2877 10330 10046 6644 4340 10549 10562 10575 8756 479 9450 9819 10541 1972 10576 5599 7191 1921 10577 6086 10578 211 1172 2615 5529 7317 10526 10579 10580 8243 10581 8611 10174 6140 1383 8357 8337 9352 10582 10567 10552 2255 1392 4087 5157 3603 10263 10583 10584 10531 6251 1025 10390 1167 1262 4083 10556 10571 10585 4593 10572 8299 10535 10586 10587 9291 8939 8911 3981 10230 329 6935 5505 9555 10588 10565 2024 10109 1893 10574 10190 9510 2308 1035 6201 8769 7753 9635 9863 9676 10216 5993 5712 10286 962 10539 10589 19 10499 9942 6292 6510 7214 9860 10590 7105 7516 10578 8031 8104 6424 9154 9464 10591 10579 10566 7483 10523 9301 7994 3885 952 10514 60 6985 5569 4684 10592 66 10593 10542 9559 2488 9588 843 2128 1023 7521 2022 269 2118 8973 90 10569 10584 10594 1456 4223 83 2319 4477 5915 10547 10595 91 10596 10586 10573 10515 5785 7538 9196 685 558 1453 1628 8537 7077 6355 10302 10163 5807 7869 10509 1960 4225 7426 1985 7719 697 9522 7807 8353 10407 5451 5412 10597 8731 10537 1430 9680 4098 796 7002 10391 1305 10560 6138 10074 10025 10598 10589 10575 8426 9961 7971 5042 1442 10518 10401 4927 4485 10564 8644 10147 10253 9769 1293 7890 9593 2346 10582 10593 10599 1794 9890 5689 5100 10263 10553 1585 9251 8338 10555 10600 181 10601 10411 10252 10602 558 7638 10603 10595 10585 197 10604 10557 5663 1564 4151 10605 1266 10602 787 6873 970 9718 5651 7986 8518 10551 4080 8346 9603 9652 8709 535 4860 8186 3947 199 9634 10307 982 10381 9859 4813 10606 8853 9974 230 10607 10561 10446 3205 347 10608 1738 111 5814 8707 2563 10591 9844 48 3116 9061 7769 2323 980 5472 38 6282 10237 10568 10609 251 7665 9917 9122 176 1772 10124 7823 6186 5570 7480 10529 7117 79 10600 10594 10008 2032 8194 10601 804 4820 1710 6723 10605 272 10610 10570 10596 10604 102 10362 6474 1527 9955 9978 5548 5787 4318 5726 10360 1145 8249 1667 2619 10597 10487 4517 698 10424 7052 1686 10563 9986 1507 2856 2998 9427 3117 559 1505 4751 859 10356 6849 10606 6463 10598 10607 133 10590 4727 7087 4263 10577 2770 10608 331 10527 6290 6920 10581 10580 47 332 2432 2841 1298 10342 10592 9036 3568 3886 3178 2590 10479 497 5894 1520 10234 165 10609 10599 5368 456 10250 8610 4599 9898 370 80 10583 5308 8299 10486 8773 8702 7649 10603 10610 191 7466 9580 10588 1450 8160 7834 1799 6027 1002 10587 101 378 4081 2174 10576 9979 4185 943 2257 7008 60 3560 2267 5788 3171 9810 6783 1173 2870 4870 gts-snapshot-121130/test/boolean/surfaces/t210000644000175100017510000000015112055775440015730 000000000000004 5 1 0 0.5 1 E 0 0.5 -1 F 0 -0.5 -1 G 0 -0.5 1 H 1 2 EF 2 3 FG 3 4 GH 4 1 HE 1 3 EG 1 2 5 EFG 3 4 5 GHE gts-snapshot-121130/test/boolean/surfaces/cube10000644000175100017510000000045212055775440016325 000000000000008 18 12 0 -1.63299 1.1547 -1.63299 0 1.1547 0 1.63299 1.1547 1.63299 0 1.1547 0 -1.63299 3.5 -1.63299 0 3.5 0 1.63299 3.5 1.63299 0 3.5 3 1 2 1 6 1 2 6 2 7 3 2 3 7 3 8 4 3 4 8 5 1 4 5 1 4 6 5 7 6 5 8 7 5 8 7 9 13 1 6 1 2 4 2 3 14 3 11 4 15 5 6 5 7 7 18 8 9 8 10 10 16 12 13 12 11 15 14 17 18 17 16 gts-snapshot-121130/test/boolean/surfaces/t60000644000175100017510000000010412055775440015651 000000000000003 3 1 0 0.4 0 D 0 0.6 -1 E 0 0.5 1 F 1 2 DE 2 3 EF 3 1 FD 1 2 3 DEF gts-snapshot-121130/test/boolean/surfaces/horse5.gts0000644000175100017510000017210212055775440017331 00000000000000669 2001 1334 GtsSurface GtsFace GtsEdge GtsVertex 0.02013525264 0.005521520773 -0.01645887924 0.02333620894 0.0097112427 -0.01259505902 0.02606830455 0.01511701064 -0.01880906215 -0.01399844229 0.08714155824 0.04634542729 -0.00711987842 0.08387148715 0.05079067138 -0.01484915813 0.08707045042 0.052732734 0.006631433813 0.05681551256 0.06800902765 0.008961319248 0.06379068286 0.06370982547 0.0008962294736 0.06568851865 0.07053914405 -0.007084975887 0.03564502823 -0.07638398126 -0.009172878857 0.0426602785 -0.07630253726 -0.00810029672 0.03778262601 -0.07154683697 -0.004494363814 0.02123015411 -0.01233401657 -0.003960858681 0.02707806625 -0.02147412545 -0.004658667059 0.02285017266 -0.01654065256 -0.004536715458 -0.09172039218 -0.059632203 -0.007296970267 -0.08559062083 -0.0568575243 -0.005904853747 -0.08527784461 -0.0646592393 -0.008881955779 -0.06046197822 -0.007183686667 -0.008292398598 -0.05433988926 -0.006032399448 -0.006699209669 -0.05844466781 -0.01313674117 0.02653152048 -0.05926800669 -0.007858035345 0.02491401896 -0.06004584644 -0.005078008904 0.02808881242 -0.05700977972 -0.0103748159 0.02617092473 0.01742742163 -0.04948925255 0.0287065213 0.01875291256 -0.04929715227 0.03053088148 0.01669467781 -0.06497438538 -0.004447444209 -0.03858960018 0.0002918748357 -0.002812829299 -0.04959414896 -0.005055102313 -0.01118923222 -0.04589732893 -0.0006047646092 -0.01647276144 0.08032673265 0.03979473132 -0.02491707499 0.08466822148 0.03876307887 0.03065041014 -0.02268958153 0.02819790612 0.03311963555 -0.03397986637 0.03337640349 0.02458857837 -0.0211553759 0.03120368181 3.11253916e-06 0.02298208248 -0.02714141419 -0.003436569527 0.02305241201 -0.02816495009 -0.001901268135 0.02151438626 -0.01957978321 -0.007202305565 0.02872295073 -0.04064789673 -0.005084001823 0.03298650586 -0.0393762965 -0.00526972853 0.03041893047 -0.05020452016 -0.0008855536692 0.04548663335 0.04725890381 -0.003648872987 0.05421244516 0.04604823812 0.001175076852 0.04001949318 0.0354116709 0.03684824176 -0.009360017287 -0.003452463635 0.03284843459 -0.00573587904 -0.008116460255 0.03449232873 -0.01447523884 -0.007084876245 0.02980485659 -0.03487625097 0.03569073712 0.02338492 -0.04382609693 0.03750896151 0.02257567404 -0.0356194706 0.03710108862 0.008245700987 0.03986539798 -0.008370410631 0.02063481043 0.0418213754 -0.007424038412 0.007372361265 0.04348170001 0.000976005425 0.03454064586 0.02451531618 0.01138119969 0.03578281178 0.02627464307 0.003598266601 0.03390077249 0.01962938431 -0.001280082309 -0.007811584756 0.003877097243 -0.001241609223 2.840412583e-05 0.01228274967 -0.007247409149 -0.004998371694 0.01270036211 0.001089300752 0.0121464787 -0.06892107607 0.004943298672 0.01100764784 -0.06564655 0.003296401762 0.01520667495 -0.06872824335 0.01030192437 0.03474758083 -0.0688897661 0.01430985135 0.03034737778 -0.07102256952 0.01163716872 0.03302710541 -0.06941605296 0.01982940739 0.005842172145 0.03256712548 -0.01503639799 -0.001854450108 0.0363080054 -0.01720728338 -0.003023179537 0.03689851239 -0.01428110042 -0.009376286633 0.08251530928 0.04162907527 0.02141389742 0.04032830872 0.03497685942 0.01997353967 0.03818065632 0.04077929212 0.01775912058 0.05097634457 0.04600341765 -1.133624465e-05 0.009628037481 0.02569442716 -0.00725237453 0.01814871364 0.01917561027 -0.003123197135 0.01808229195 0.02809276316 0.02748292046 -0.01004179714 0.02769915384 0.03160832077 -0.06026964828 -0.008433655781 0.03055712595 -0.06752777067 0.003519932692 0.02154114812 0.0321282552 0.03647471816 -0.004811635778 0.0306760496 -0.02964832067 -0.00464337141 0.02572433389 -0.03396805803 -0.01045468225 -0.0008386500385 0.007235840067 -0.01112577594 -0.005315965197 0.002302405937 0.0326015439 0.03338224889 -0.006524502723 0.03294319838 0.02428580733 -0.01060243943 0.03269792222 0.02774989759 -0.01366839704 0.02634806345 0.01449165035 -0.005438173991 0.02451895292 0.003543658217 -0.01258120218 0.02877373375 0.01379864406 -0.001824338814 -0.01189840845 0.06800316185 0.03881161131 -0.01700471567 0.06435747477 0.04119042082 -0.02369603052 0.07095822088 0.04107925642 0.03135893952 0.03945922576 0.0211675824 0.03219511639 0.02763813212 0.02156752155 0.03346637823 0.03911131024 0.01113470448 -0.0322105105 0.08044723121 0.05103451248 -0.04146608905 0.08773853503 0.0418181091 -0.03888015861 0.08243044851 0.04378008749 -0.008066673575 -0.07056706839 -0.01423360887 -0.002391250926 -0.07540763245 -0.01631556228 -0.005650160233 -0.0725733818 -0.02353782249 0.008946998866 -0.05390044486 -0.005403076493 0.004182731471 -0.0561687558 -0.008281162232 -0.005354712201 0.007333715298 0.0176978225 -0.01044048676 -0.01220771039 0.01559657304 -0.009958289474 -0.003240540696 0.0132272352 0.01754588752 0.05625845007 0.04012688329 0.02402767861 0.04461186713 0.02681588892 0.02238696773 0.04734445665 0.02228504444 0.0008411117095 -0.05729739477 0.03315041141 0.009489536535 -0.06099024937 0.03356346167 0.001386571668 -0.065167744 0.02915297053 0.001368982574 0.03568888191 0.03226578605 -0.003857633711 0.03529492392 0.02770085432 -0.002643215803 0.04094858484 0.02455153722 -0.009338984735 0.02820470028 -0.01160543829 -0.006193568167 0.02897164443 -0.0219964481 0.0008969939628 0.03530577174 -0.07179588296 0.0009715887473 0.03702926338 -0.06647196397 -0.0003805415216 0.03369734896 -0.06599021152 0.001368930329 -0.08394677569 -0.03381738735 -0.00374555464 -0.08396286572 -0.03135024014 -0.001462525141 -0.08315564023 -0.02223458256 0.04016153206 -0.01733716975 0.007964266416 0.03972065976 -0.02491509667 0.01076602273 0.03954613476 -0.02033348977 0.01689782248 0.01137796703 0.01941733257 0.0395698287 0.007768512673 0.02140764366 0.03914937102 0.007973494393 0.01351472969 0.03593813441 0.002249413556 -0.07553092507 -0.03267150461 -0.0002004769125 -0.06977751468 -0.0257171946 0.003118415553 -0.07216066065 -0.02278653853 0.009531422121 -0.01174763178 -0.01879270726 0.004642152863 -0.001390584841 -0.01845200774 0.002260254027 -0.01489936657 -0.0162405874 -0.006638416945 0.02789731502 0.02529742936 -0.007801900425 0.03558136321 0.02156038109 -0.002920941839 0.02952341828 0.03115640724 0.00386006762 0.03050293135 -0.03796592196 0.002670417794 0.03376751743 -0.03673941633 0.003715864776 0.02819359248 -0.02732089558 -0.002761246765 0.03563828626 -0.05333519383 0.001334173692 0.03635105193 -0.05916559877 -0.001456809346 0.03913147733 -0.06532529443 0.02842052878 -0.04709967892 -0.01318113309 0.02912742464 -0.04328902761 -0.009502788519 0.02822368311 -0.04933917537 -0.01920662046 -0.008099106674 0.06392051452 0.0411553607 -0.007803006315 0.06226298866 0.04773677273 -0.01401774003 0.06173498751 0.04790265734 0.02427892493 0.04126456708 0.02968454017 -0.01008564718 0.0306212666 0.01720870481 -0.01110471093 0.03471967459 0.009169866621 0.001232604591 -0.07343148591 -0.01375939733 0.000920072081 -0.0725204683 -0.008174017663 0.0315063146 0.01091557834 -0.06595768826 0.02993125635 0.006120185243 -0.05980834949 0.03388215701 0.008237893114 -0.0588829558 4.216061268e-05 -0.06239096809 -0.01755570335 -0.0001397346183 -0.06436644441 -0.01783531426 0.004803052334 -0.05657747344 -0.006239395585 0.01427776927 0.05723708964 0.0565766556 0.01209020141 0.04935675339 0.06303871036 0.001684769803 0.05917858204 0.07005227417 0.01628595239 -0.06223912157 0.001304912739 0.02063623406 -0.06844235604 0.009434368044 0.03059354444 -0.06355303207 -0.0652642166 0.02906012238 -0.0650694116 -0.06619492674 0.02809082836 -0.06822200057 -0.06005049424 0.02662045672 0.01283235843 -0.04325473514 0.02632033584 0.01369144364 -0.05461731154 0.02790821511 0.009447650631 -0.05445462793 0.002781203175 0.03142322415 0.03540666761 -0.01298597885 -0.01591953895 0.007914207622 -0.01022752129 -0.02782242993 0.01210091593 -0.01128431748 -0.02485025832 0.003081635188 0.03716989507 -0.03005062152 0.01924080141 -0.0110576949 -0.04249649855 0.004064996969 -0.007189824994 -0.03780978911 0.008069604044 0.002132921331 -0.08892912242 -0.05841814456 -0.001967876306 -0.09249719443 -0.05993431507 -0.0001478523326 -0.08700064728 -0.04689355518 0.02150238878 -0.003203442666 -0.01664761693 0.02860891328 -0.00794281963 -0.01241843167 0.02535101604 -0.01471005535 -0.01470732778 -0.01263718706 0.07311926828 0.07115058838 -0.01136077083 0.06864246139 0.07064307988 -0.00634763803 0.07076383691 0.07207555004 -0.004947600696 0.02947770814 -0.06376310136 -0.00653606251 0.03548727746 -0.06267927768 -0.004768313435 0.03301141807 -0.05682850472 -0.002559523239 -0.07696914055 -0.07503049445 0.001368792513 -0.08058704528 -0.0756365883 -0.007157226439 -0.07673899499 -0.07620027157 0.02962655239 -0.06641816023 -0.05375091131 0.03335175126 -0.06107789389 -0.04461387017 0.03016472427 -0.06494730026 -0.0564471706 -0.03784905283 0.09182356906 0.0354779574 -0.04282507852 0.08763088955 0.03843798247 -0.03780231307 0.091656083 0.04150096945 -0.004278987696 -0.07096315113 -0.02827644712 -0.005150102585 -0.06225913771 -0.02061674121 -0.008924081195 -0.0648333229 -0.01934112454 -0.004930167798 -0.06275903768 0.02547583765 0.001165097696 0.02523404795 -0.03957571933 -0.008852045606 0.02332088653 0.0171473632 -0.004459721071 0.03497725791 -0.06866035029 -0.03953646102 0.08780210501 0.03347779468 -0.04048996553 0.08225953131 0.03671018489 -0.03490373434 0.08345472823 0.03190892503 -0.009654232028 -0.02344999804 0.01726110988 -0.006927415054 -0.03178192302 0.01912757966 0.01605012073 0.003031310522 0.02936799277 0.008895604619 -0.002047950409 0.02823159445 0.008494244241 0.001799083616 0.02879528979 -0.003961821714 -0.07871961197 -0.0281961272 -0.007477737145 -0.07956910319 -0.03375142835 0.02477633515 0.00435515277 0.02561294995 0.03327869175 -0.01056420909 0.02397197402 0.004567323158 0.06995713598 0.06469146997 -0.00183702543 0.04442440161 0.01992806507 0.00165670685 0.04848824857 0.02429042206 -0.001669243162 0.04538749837 0.0272053198 0.03323516033 -0.0696968104 -0.07479897823 0.02830816126 -0.06727547745 -0.07485372705 0.03359441511 -0.06833744979 -0.06724944763 0.02898733887 0.02593823058 -0.03466161818 0.0246309752 0.02431943624 -0.03652165518 0.04030552522 -0.06054316911 0.01674424681 0.04164739073 -0.05139940822 0.0217050045 0.03911517512 -0.06043171631 0.02293000667 -0.01016921971 0.02477592438 -0.009559566753 -0.007410313098 0.01930565156 -0.006409125658 -0.009099460307 0.02070551701 0.003923295553 -0.006901567776 0.06061189508 0.06856950357 0.007695408381 0.04774322646 0.06466878455 0.02628487045 -0.05770978385 -0.02765797082 0.02786368037 -0.05500327435 -0.02916861836 0.02960128852 -0.0631862634 -0.04099157187 0.02693931829 0.0150378853 -0.06642529973 0.03082839672 0.02288107393 -0.07477957186 0.01673602462 0.05296176187 0.02799127872 0.01999274631 0.04838788616 0.01771232083 -0.002383392301 0.0584039807 0.03884915064 -0.005144924484 0.06159163841 0.04104793704 -0.003379529562 0.05727490581 0.0462431367 -0.002237697221 0.01601216358 -0.005054907819 0.02778627998 -0.05772247586 -0.02054760577 -0.02733044091 0.08787125685 0.04692096172 -0.03381940763 0.08842015408 0.04616950141 -0.0266954696 0.08488412478 0.05445010955 0.0002299200355 0.03008183833 -0.0526309113 -0.001578908545 0.02695998198 -0.04953028374 0.02885607787 -0.06561102264 -0.02705281966 0.0287422346 -0.06043955401 -0.01464466098 0.01670507196 0.05031094078 0.05116161752 0.01854079105 -0.002602673502 0.02863708186 0.02106386951 -0.01061903517 0.02950687991 0.02149631234 0.00350152551 0.02754017274 0.03595921609 -0.06440025829 -0.06383023776 0.03768470615 -0.06636455426 -0.05822902156 0.03632472658 -0.06500480385 -0.05143240344 -0.02300277796 0.07968365662 0.06135589776 -0.0183455243 0.08677332893 0.06096485036 0.02996228773 0.0431793068 0.01885056969 0.01189031623 0.06343583392 0.05467359339 0.0349177613 0.03295247043 0.005743035569 0.03209842921 0.04093256324 0.00616488062 0.03741995673 -0.01167617015 0.01925249319 0.03498720328 -0.02617293678 0.02506715326 0.004510045712 -0.04726412932 0.03617114895 0.007834213447 -0.03802712274 0.03648668217 0.001320006211 -0.03473731743 0.03429713572 0.004684082046 0.02528867908 0.03737786199 0.0009013665479 0.02189336462 0.03311220182 -0.000269046979 0.03518634678 -0.07654122663 -0.005465593469 0.0334314065 -0.07113323109 0.03794729885 -0.07030992224 -0.05881809189 -0.02369893798 0.08733940468 0.04185147774 0.03406462322 0.01411369258 -0.06575141393 0.03599477985 0.01623325042 -0.06930767862 -0.001654786277 0.04403194829 0.03136525892 0.02655670532 0.02996324089 -0.02032467924 0.02910560475 0.02795436388 -0.02108319158 0.03118268561 0.03516852465 -0.01003145645 0.03085956534 0.01771842101 -0.04856808053 0.03272381441 0.01249286986 -0.05317331614 0.03420853302 0.013833191 -0.06039523497 -0.002370331495 -0.08901111448 -0.04957451068 -0.005624307261 -0.08197370267 -0.04260908709 0.02514411334 0.01494908579 -0.04392440225 0.02230639765 0.01715601009 -0.03682721726 0.02063163886 -0.06160615252 0.0335902371 0.02893566101 -0.05840060783 0.0334684692 0.02204870418 -0.05208696926 0.03657381482 -0.008923380825 -0.04880887603 0.02527943796 -0.005284751963 -0.05559750383 0.02864053061 -0.009920769984 -0.05856095302 0.0207895361 0.003926573915 0.02956410991 -0.01833436713 0.02693418421 0.01067263783 -0.07605973612 0.03409201833 0.01012579517 -0.07298440008 -0.008371860285 -0.02901436397 -0.0009715576959 -0.007576344076 -0.03502228042 0.01157323203 0.02767465419 -0.06096876474 -0.07505858591 0.03863769628 -0.05899099525 -0.07447174678 0.03350950614 -0.05556284399 -0.07453207962 -0.005333174395 0.0690660383 0.04005469768 0.002235741842 0.06845919478 0.04597629264 -0.001399741117 0.07361001299 0.04738100056 0.03518948666 0.03211046788 -0.00197183499 0.03198401111 0.02261329315 -0.03630390816 0.03240181453 0.02010971195 -0.03448508613 0.02937417424 0.02528103863 -0.02472801015 0.001611540967 -0.08067383724 -0.07140604344 0.001953187201 -0.08707899486 -0.07110537245 -0.001232417508 -0.08211026541 -0.06523884548 0.03136665361 0.01638393806 -0.04241414392 0.02815923377 0.01329423952 -0.03581550346 0.02916886598 0.01231133623 -0.04517439549 0.03562536987 -0.05958327634 -0.03641685688 0.03786374846 -0.05828439284 -0.03027596892 0.03445573015 -0.05147392138 -0.02485193482 -0.005805630637 -0.003626265852 -0.00963021862 -0.002087063821 -0.007981644005 -0.01432247362 -0.008123697854 -0.01295953787 -0.008011985054 0.01057347949 -0.05438027627 0.0360043044 -0.0191484997 0.06984407921 0.07583152676 -0.01582507048 0.06802185785 0.0746396716 -0.009991545682 -0.04221273906 0.02285774271 -0.01129511985 -0.0511791196 0.0201472641 -0.03218714045 0.08911683858 0.03413977255 -0.002963456991 0.06460328827 0.03914478388 0.002775681161 0.0631757371 0.03893232187 0.006787630338 0.01432430154 -0.01761951969 0.003506700761 0.006572410528 -0.01632570557 -0.003312208303 0.02325685899 -0.03921277274 -0.00326808019 0.02807999441 -0.05530421046 -0.01978473007 0.07459091766 0.03922325566 -0.02635916519 0.07915376855 0.03807573823 0.03555798906 -0.06295653825 -0.03148452621 0.03550536749 -0.06289381135 -0.04451557082 -0.01365223107 0.06472234988 0.06687534299 -0.0001382817325 0.05077543876 0.06274224514 -0.019577947 0.06858345575 0.06484539093 -0.02085556168 0.06712083646 0.06118947298 -0.01894522016 0.06607629188 0.05789886839 0.002564033262 0.04219863759 -0.07594683424 0.01114569775 0.002452488546 -0.01896313365 0.01178099453 0.02162454311 -0.01766817181 -0.00354017736 -0.0874175003 -0.06611629017 0.027080073 0.01518590473 -0.02805848056 0.02296211985 0.01671259361 -0.02826914248 0.0235176257 0.0140533891 -0.03579376611 -0.005449679997 -0.07289582257 -0.02785291734 0.0281752516 0.01827919566 -0.01994736665 0.02875003798 0.02365186069 -0.02450317989 0.03004266102 0.02085349558 -0.0113473141 0.003804610071 0.0160560555 -0.01380773009 -0.0004818261599 0.01835395577 -0.01799694224 -0.004193119545 -0.05857021412 -0.008123197106 -0.002201113446 -0.06138315115 -0.01335911449 -0.005276675901 0.02217353896 0.02483485312 0.01775159824 -0.008968360528 -0.01788598327 0.0219733604 -0.01938347779 -0.01518461096 0.0398734842 -0.04569508536 0.02707997246 0.03734622762 -0.05298408149 0.03031482296 -0.004930474013 0.07717007493 0.06743742678 -0.001872942231 0.07648973376 0.06195418308 -0.006202547496 0.0847748346 0.07263600347 0.004849282814 -0.06654078831 0.001598486289 -0.02334935507 0.07296056774 0.06392326228 0.002176868143 -0.07981624797 -0.01992225748 0.003800816747 -0.06906648327 -0.01870599595 0.003231230811 -0.07112129716 -0.01418680473 -0.008025358077 0.07798059656 0.07007021426 0.00231006835 0.03222334759 -0.06183539386 -0.005546689215 0.01526847627 0.002527019816 -0.002148773376 0.04685978554 -0.07646237571 -0.01469709675 0.08448429655 0.06361546345 -0.009205145259 0.08364986486 0.06652824875 -0.01391437278 0.07857860048 0.07025393953 -0.008729891897 -0.08521930845 -0.07244919448 0.0008615721356 0.04513060711 0.002194219599 6.611089891e-05 0.04139438171 -0.007297840756 -0.02066662235 0.06616042811 0.07401673102 -0.003331529417 -0.02627143771 0.02464305433 0.003987723678 0.07210855672 0.05870447819 0.03078263484 -0.04619026605 -0.01805086649 -0.006808147712 0.0102530595 0.01012052355 -0.006865216013 0.01645753361 0.01255757241 0.03088907854 -0.05786733046 -0.03540469045 0.002987680217 -0.06667490534 -0.007353766141 0.004232971254 -0.06975681823 -0.009903585432 0.02887959996 0.03476373004 0.02733773936 0.00361427673 -0.05867833781 -0.003723108446 0.009116435743 -0.05832069126 -0.003807955405 -0.01258115659 -0.06036201103 0.005622889208 -0.0114024565 -0.05302184451 0.01325105043 -0.01285898929 -0.05447078597 0.00255479056 -0.007746443632 -0.03740216766 0.02691148295 -0.003819301373 -0.03366266213 0.0301720788 -0.01558061221 0.07237531331 0.07110804996 0.01694610166 -0.03267628957 -0.009547022118 0.02611753699 -0.0317371729 -0.006920390488 0.02614492902 -0.03555663226 -0.007779706299 -0.004615267993 -0.08135612334 -0.02321671994 0.03453322494 -0.06495686288 0.02344119201 0.03604964819 -0.06553705968 0.01514178387 -0.02688171056 0.07019769011 0.06127657806 -0.02836978054 0.07547062352 0.05724614332 -0.02857306018 0.07398569233 0.05112764747 0.002149115851 0.01640335688 -0.00939153187 0.03680343391 -0.05478277041 -0.02365749944 0.02581892801 0.01216562667 0.02653159388 0.03349197988 -0.05630694041 -0.03348361319 0.03431457445 -0.07333305333 -0.06052821753 0.03244789369 -0.07142986524 -0.05349659864 0.03376829326 -0.0680057351 -0.03993240149 0.02004838443 0.01736686842 -0.01887254326 -0.008158632395 -0.08143711256 -0.07113356096 -0.005642855918 -0.07825312176 -0.07223639623 0.02614749515 0.009599596908 -0.06096653466 -0.01177248692 -0.01407353336 -0.0002687046773 -0.009800132465 -0.01979108775 -0.003830321057 0.03854806382 -0.01826114917 -0.0007610163351 0.03931722386 -0.01024749357 0.003332200891 0.01482834943 -0.05037367321 -0.003617778294 0.02539828273 -0.05124035662 -0.004419107231 0.01679325978 -0.05562626944 -0.003708518059 -0.02247070523 0.06647621898 0.04844780787 -0.004868680275 0.03368435333 -0.02253317884 -0.006915406511 0.03611473008 -0.01205081465 0.02542776009 0.01909108763 0.03106312925 0.02871429086 0.01115973163 0.02218106763 0.03062899728 -0.04693951478 0.03575676012 -0.003540154017 -0.07196131107 -0.008331912231 -0.007670277131 -0.06822000914 -0.007884776398 0.03351038253 0.03148217844 0.01630943786 0.01040311744 -0.07209147319 0.005460248469 0.004701971932 -0.07433486589 0.004068455159 -0.03919251268 0.08479366736 0.03976328611 0.03471431254 -0.04207016414 -0.009057396467 0.03786718137 -0.04772732709 -0.007151207163 0.03990106634 -0.04474406031 -0.002161231288 0.03484466696 -0.07041469609 -0.05216657025 0.02637508427 0.0342719822 -0.0143612476 -0.004601073848 -0.0818465615 -0.06469160281 -0.003951655198 -0.080900582 -0.04879799115 0.001684747414 0.02228999589 -0.01852992968 0.01972090626 -0.01973865747 0.03149731012 0.009379632204 -0.009803279448 0.02879073652 0.03407514477 -0.06279654249 -0.06444526593 0.009732562967 0.03864777151 0.05758422655 -0.0275897363 0.07128743481 0.045091929 -0.02477656926 0.06909607727 0.05262891486 0.03412843848 -0.06376026874 -0.05431693996 0.02054447638 0.02928234328 -0.01665001172 0.007991961887 0.02684998692 -0.01690110255 0.02979788323 -0.05747483005 -0.0728332453 -0.009675962225 -0.007598915016 -0.004054289858 -0.001194270986 -0.006120763216 0.02382184038 0.00177787414 -0.02261065258 0.02817529957 0.003824037537 -0.007414918614 0.0266806906 0.01385897798 0.05949119073 0.04023236849 0.007075990948 0.06160589787 0.03797952168 0.02463453421 0.04688362255 0.008253351838 0.0177962488 0.04555271299 0.002714985075 0.02775607476 0.04445792255 0.003040916399 0.007628322582 0.03634256561 -0.01242806777 0.03417909793 -0.03125967083 0.002049789333 0.03841943537 -0.02335505819 0.003086974088 0.0400737564 -0.06016149505 0.00885820756 0.03607440466 -0.06211043687 0.004535989099 0.04031262255 -0.0566076406 0.002408966104 -0.0007704298113 0.07453069992 0.05641528612 0.009730320368 0.06428147005 0.04998676121 0.04221054477 -0.04585273175 0.00865360927 0.04103402798 -0.03840864648 0.005149700638 0.02237652387 0.02528242372 -0.02853163549 -0.009082787121 0.04093551222 0.007618916617 -0.009230909487 0.03646217442 -4.063057443e-05 0.03265862055 0.0207476215 -0.008216724456 0.03484858607 0.02539398898 -0.006000790047 0.0007249321567 -0.08553314372 -0.06623554195 0.02531794235 0.01492099103 -0.07298685061 0.02169570611 0.02095246201 -0.02990159364 0.0185515761 0.02510568524 -0.01789235543 -0.02523934203 0.06717179512 0.05758260487 0.02841332794 0.02811910259 0.02765045637 0.02887051775 0.02348062667 0.02777677531 0.01959300146 0.02002558061 0.03629598928 0.03715346203 -0.05644440349 -0.009046994397 0.03928833829 -0.05042577034 -0.01658214102 0.01478680897 0.05822757747 0.0486685627 0.03211054658 0.01217809689 0.01599337028 0.03364187548 0.006670920846 0.01264749662 0.03203009338 0.01227204933 0.007437079355 -0.02423261385 0.08643013843 0.05259741083 0.004332733015 0.05150435678 0.02030094017 0.01208254161 0.05201439155 0.02247814755 0.003427659183 0.04802000834 0.01398963721 0.02276338391 0.02125320131 -0.0387861643 0.01491885407 0.02108116194 0.04064544898 0.01666291404 0.02726485016 0.04306745286 -0.001018808053 -0.0816290291 -0.05049897682 -0.03217163688 0.0914800111 0.03789393191 -0.009625967766 -0.04059750481 0.01360883545 0.0362850179 -0.06643744318 -0.06571373017 0.0377877708 -0.06681060887 -0.07045588148 0.03405713172 -0.0393960876 -0.006694255561 -0.03230861881 0.07814008053 0.03994364243 -0.003326044529 -0.05337583948 -0.008162075272 0.03383924432 0.01813990517 0.01100532233 0.00854138322 -0.07081447164 0.0009923519691 0.002632627199 -0.08255290043 -0.0241261269 0.02300547731 0.03936665629 -0.01065454794 -0.01477734009 0.08898867496 0.0597609461 -0.00984042259 -0.06724991191 -0.01545101335 0.0001923265552 -0.08373358181 -0.04743993057 2.513262563e-06 -0.07848538849 -0.03904623652 0.01088755043 -0.07350076626 0.01540502391 0.01511915673 -0.07131425889 0.01896553282 -0.004157373086 -0.07691653792 -0.0372788596 -0.004037231423 0.03791358167 -0.007085547926 0.02535144973 0.0383309043 -0.004951972256 0.0225406976 0.04149474164 -0.002957108147 0.0106529801 -0.02928021621 -0.0126164263 0.01009676021 -0.0200015286 -0.01669189333 0.01351343662 0.03795680192 0.05575444382 -0.01218404463 0.07373458055 0.03843900307 0.01893746489 0.008940651537 0.03115681528 0.02893786116 0.04571985057 0.01298922794 -0.001406748829 0.002753994988 0.02238331562 0.005407932207 0.06523526016 0.04700172911 0.001253452763 -0.02335770137 -0.01301516756 0.02934068445 -0.06684118077 0.02767743708 0.01595828459 -0.06792264145 0.02903357539 0.02466972698 -0.07091009028 0.02289838491 -0.01177937781 0.03170546778 -0.002757062391 -0.01111654612 0.03096107962 0.005494974883 0.004528858958 0.02622993727 -0.01780596166 -0.00325110376 -0.04475472172 0.03259457136 0.03060548362 -0.06659840014 -0.04295046113 0.02814862415 0.0120546648 -0.06713734158 -0.006957264812 -0.0704541734 -0.003726317713 0.02840158747 -0.04003698958 -0.005090230725 0.03939802052 -0.00984027028 0.01233394599 0.001021304353 -0.08584516795 -0.07578358644 -0.004956968977 -0.08915771768 -0.07544225422 0.03633277305 -0.05791146313 0.02922742537 0.01048760814 -0.0206307606 0.03129861391 -0.01083069387 0.06358168532 0.05593104713 -0.005587849738 -0.08426589174 -0.05186009449 0.007066967839 -0.02104443296 0.03027300186 0.0312582213 0.003380912391 0.01998650609 0.001008045559 0.03349864569 -0.02825704011 3.661520848e-05 0.03454218566 -0.05378659143 -0.0064328794 0.06141651478 0.05043143056 -0.002574920744 0.03420021241 -0.02964764453 0.00726023862 0.03220416149 0.04897879227 0.03228022562 0.03663473383 0.001770487161 0.02942847951 0.0381523442 -0.003044309621 -0.004492712345 -0.01632682256 -0.01144269021 0.04090796853 -0.05048764789 0.002478422307 0.0417337194 -0.05045283922 0.01690368707 0.003720276611 -0.04180075383 -0.002429966509 0.01574727942 -0.04389713385 -0.002366399407 0.01004292325 -0.03952650712 -0.003465637748 -0.006972657113 -0.02228912544 -0.007252393419 0.03708495665 -0.003474163452 0.001054834314 0.01053156023 -0.03198153987 0.03529987402 -0.001478319938 -0.07066753655 0.01717184206 -0.009088118904 -0.06659307566 -0.0025364611 -0.006715411706 -0.06804090152 0.01295472813 0.003520664036 -0.07698190391 -0.03005720669 0.01281741749 -0.06966746615 0.02623765768 -0.002804053005 0.04978383461 0.05599226721 -0.01395709718 0.06493507252 0.0619430284 0.03670793132 -0.0575529164 -0.02221021923 0.03358852325 -0.06056481407 -0.02261843006 -0.00552876951 0.08038754691 0.06084138607 -0.007373440855 0.08594156316 0.07094686569 0.03832707255 -0.0380213827 -0.0008488705719 0.01484949465 0.04125355278 0.05596568125 0.03040736766 -0.03015246206 -0.003727252623 0.04217725998 -0.05544716276 0.01150225049 -0.009581352486 0.03444424727 -0.005699797726 0.03728354991 -0.002519393758 0.006673224089 0.03693619057 -0.03240324339 0.01255925407 -0.009399446838 0.08513021803 0.07767486427 -0.0002230001794 0.02975037493 -0.06316179432 -0.008106727935 0.03959931043 0.0181454912 -0.006747571421 0.04340989941 0.01183529112 -0.009868135427 0.08008693763 0.07192459661 -0.004554678204 0.04261888195 -0.00202813239 0.02542501201 -0.07004327163 0.01061972446 0.02633920546 -0.07175781884 0.01595731936 0.002048301014 0.03844650545 0.04646234884 0.03219097988 0.01710942098 0.003970731497 0.03061901225 0.01334672101 0.002002129752 0.03582180127 0.01517716782 -0.07519256422 0.03432969703 0.02061370706 -0.07509313011 0.03298334235 0.0006368355536 -0.005490227895 -0.007364367764 -0.06559003803 0.01843905517 0.03012666842 -0.07243359184 -0.06048618727 0.02528701122 0.02055819288 -0.07560641379 0.03980713969 -0.03592090634 0.02018381706 0.04129951578 -0.04417419611 0.01656568437 -0.00791172242 0.07417977575 0.04069010875 -0.003826944369 0.0789092005 0.04285381288 0.03144704734 -0.06693406635 -0.03619997637 0.03632585179 -0.0434862492 0.03222635813 0.03734668241 -0.05743027839 -0.01645191669 -0.004915767055 0.04488387161 0.006994735342 -0.004604314256 0.05293489041 0.05217844972 0.004422426172 0.04442174762 0.06024242343 -0.02022883791 0.06525760891 0.06903949268 0.03852784586 -0.03472705683 0.02776445481 -0.01337951199 -0.04918758512 0.003440111313 0.03714695465 -0.06008615314 -0.005949443772 -0.006363901332 -0.01268806292 0.02091961482 0.001928426726 -0.08385648026 -0.05860244766 0.01529011036 0.005998854826 -0.01844092634 0.0004055329701 0.06048980803 0.03581080895 -0.01151244643 -0.04770375519 0.01170635032 0.03062465914 0.01701389411 -0.03471886339 -0.004903712608 -0.08437278291 -0.03488322902 -0.009088887017 0.03245015141 -0.01435685853 0.02710870968 -0.04428714411 -0.003944894994 0.0290734332 -0.02405020739 -0.008689193401 0.01926026339 0.05211161831 0.04170040517 0.0308906377 -0.06050144665 -0.01307546946 0.01246963011 0.04730235435 0.0122802104 0.01764929753 -0.04035024092 -0.002802932332 0.007365151452 -0.06724242445 0.0293734764 0.03852854102 -0.06468575227 -0.07476054166 0.00189818729 -0.06241064441 -0.003906940507 -0.01176245213 0.0272913191 0.001812605098 -0.003094447591 -0.06889170009 0.004888867191 -0.0004866945918 -0.07383535978 0.003278961381 0.0300305614 -0.05644658877 -0.01822453283 0.003196336193 -0.0711485919 0.02474581909 0.002887556068 -0.03095199626 -0.008724627583 -0.01127770596 -0.06361515573 -0.003448711297 0.004212269933 -0.07475184697 0.01191939452 -0.006909876038 0.04279313544 -0.07134292673 -0.005202348202 0.0390509625 -0.06659169161 0.03985959728 -0.05288672269 -0.003212918687 -0.004147585125 -0.02945833986 -0.005629237818 0.01337845903 -0.04478248831 0.03739311574 -0.00450044646 -0.03541216421 -0.0001090139374 -0.0004868297542 0.0353548159 -0.03992408516 -0.03736807997 0.08124875032 0.04326537752 -0.004207044997 0.01318205175 0.02035661421 0.03395718719 -0.06758867602 0.005172508996 0.002336525491 -0.03664099157 -0.003563410629 -0.03338266552 0.09117715709 0.04225830173 0.03287485075 -0.06627468814 -0.02506122897 0.006379793022 -0.07366487381 0.02021869667 -0.01058619571 -0.06438440647 0.009245721948 -0.008558872929 -0.08429199527 -0.07612810025 -0.03332078802 0.0845351043 0.05015094394 -0.03564272671 0.08936385183 0.0394080329 0.0006759096634 -0.07365013568 0.01331403022 0.03942777986 -0.03667271975 0.01137931053 -0.0103508598 0.08472449689 0.06104104239 -0.002121405726 -0.05986981045 -0.004786758587 -0.002313980885 -0.0750421817 -0.02257371498 0.03624358562 -0.0465668457 -0.01755012638 1 2 3 1 2 3 4 5 4 6 6 5 7 8 9 8 9 7 10 11 10 12 12 11 13 14 14 15 13 15 16 17 17 18 16 18 19 20 20 21 19 21 22 23 24 23 22 24 25 26 27 26 25 27 28 29 29 30 30 28 4 31 32 31 32 4 33 34 35 33 34 35 36 37 36 38 37 38 39 40 41 40 39 41 42 43 44 43 44 42 45 46 45 47 46 47 48 49 50 48 50 49 51 52 51 53 53 52 54 55 54 56 55 56 57 58 57 59 58 59 60 61 61 62 62 60 63 64 65 63 64 65 66 67 68 67 66 68 4 69 69 5 70 71 72 70 72 71 73 74 73 75 75 74 33 76 76 35 77 78 78 23 23 77 71 79 70 79 14 80 81 80 81 14 82 83 57 82 83 57 84 85 85 86 84 86 87 88 87 89 89 88 90 91 91 92 90 92 93 94 94 95 93 95 96 97 98 97 96 98 99 100 99 101 101 100 102 29 102 103 29 103 104 105 104 106 105 106 107 108 109 108 107 109 110 111 110 112 111 112 113 114 113 115 114 115 116 14 117 116 117 14 118 119 119 120 120 118 121 122 121 123 123 122 124 125 126 124 126 125 127 128 128 129 127 129 130 131 131 132 132 130 133 134 135 133 135 134 136 137 136 138 138 137 139 140 140 141 139 141 142 143 144 143 142 144 145 146 146 147 147 145 148 149 150 149 148 150 151 70 151 72 152 153 152 137 137 153 154 100 154 155 100 155 156 157 156 158 158 157 159 160 159 161 161 160 8 162 8 163 163 162 164 9 164 7 23 165 166 23 166 165 167 168 168 169 169 167 170 171 172 171 172 170 173 44 113 44 173 113 174 175 176 174 176 175 177 125 177 126 178 28 178 179 28 179 180 181 180 182 182 181 151 79 183 184 185 184 185 183 186 187 188 187 186 188 189 190 191 189 191 190 192 193 194 193 194 192 195 196 197 196 195 197 198 199 200 199 198 200 201 202 203 201 203 202 204 112 204 110 36 141 36 205 141 205 206 152 206 136 152 136 120 189 189 207 207 120 208 209 208 210 210 209 211 212 175 211 212 175 213 214 215 213 214 215 216 217 122 217 122 216 218 219 218 76 76 219 220 8 220 9 221 222 221 223 223 222 224 225 224 226 226 225 26 227 26 228 228 227 229 230 230 231 231 229 144 119 119 143 232 233 234 233 232 234 24 147 24 145 215 129 129 75 75 215 164 235 236 235 236 164 237 238 239 238 239 237 240 241 240 27 27 241 242 243 242 109 243 109 244 245 246 244 245 246 247 233 233 13 247 13 248 24 248 22 249 250 250 251 249 251 252 253 252 205 253 205 254 237 254 255 255 237 256 162 256 163 257 258 258 259 259 257 260 261 260 262 262 261 263 264 251 264 263 251 108 93 265 93 265 108 266 162 266 8 95 267 267 268 95 268 126 269 269 270 270 126 271 272 273 272 273 271 274 173 173 138 138 274 128 274 274 275 275 128 276 10 277 276 277 10 261 278 262 278 279 249 4 249 4 279 280 281 281 27 280 27 43 282 44 282 283 284 285 283 284 285 286 287 288 287 286 288 289 290 289 217 217 290 291 292 25 292 291 25 293 294 294 295 295 293 296 297 298 296 297 298 299 66 67 299 156 300 301 300 156 301 302 303 176 303 176 302 304 305 304 306 306 305 307 308 307 309 309 308 267 55 55 310 310 267 311 312 313 311 313 312 40 191 191 41 138 113 314 315 314 316 316 315 317 318 319 318 317 319 320 321 320 322 322 321 323 324 325 324 323 325 295 326 326 293 186 327 328 327 186 328 329 330 330 296 329 296 208 331 208 198 198 331 227 311 311 286 227 286 332 333 332 307 307 333 134 334 335 134 335 334 336 337 39 336 337 39 129 275 275 75 338 339 338 92 92 339 340 341 320 341 320 340 235 342 343 342 235 343 344 345 346 345 344 346 158 319 319 157 323 58 335 58 323 335 347 118 347 119 259 218 259 76 348 349 348 334 334 349 181 16 350 16 181 350 351 352 353 352 351 353 101 354 217 354 217 101 355 356 357 356 355 357 334 358 358 359 359 334 161 360 360 361 161 361 136 275 136 362 275 362 363 133 363 364 364 133 365 230 365 366 366 230 367 368 369 368 369 367 60 370 370 61 344 371 345 371 372 373 374 373 372 374 375 9 375 188 188 9 119 376 120 376 247 59 377 59 377 247 118 276 347 276 378 347 378 144 144 347 259 213 257 213 131 159 159 373 131 373 379 380 379 381 381 380 350 382 350 18 382 18 383 51 51 384 384 383 328 385 327 385 329 212 329 386 386 212 367 387 368 387 147 388 388 146 389 390 377 390 389 377 391 238 239 391 163 236 7 163 7 236 361 392 392 393 361 393 79 394 394 151 395 396 396 370 395 370 30 178 397 398 399 398 397 399 336 36 205 336 400 386 400 401 401 386 402 327 385 402 403 404 405 404 405 403 122 406 406 216 65 407 65 408 407 408 409 410 411 410 411 409 335 358 335 412 358 412 413 322 413 321 192 316 192 314 218 414 259 414 322 388 415 322 388 415 155 393 393 154 416 417 416 418 418 417 3 419 352 419 3 352 420 421 382 421 420 382 422 240 171 422 240 171 423 176 423 424 176 424 425 45 426 45 425 426 427 428 429 428 429 427 150 430 91 430 150 91 67 431 431 432 432 67 433 414 434 414 434 433 69 31 366 294 435 366 435 294 436 99 436 437 99 437 95 438 267 438 155 439 439 440 155 440 199 98 199 441 441 98 442 443 442 444 444 443 445 416 445 418 446 285 283 446 357 3 3 355 447 316 448 447 316 448 449 38 449 36 258 450 451 258 450 451 197 452 167 452 167 197 127 453 453 128 430 454 430 455 454 455 456 262 456 260 186 375 66 457 458 457 458 66 459 167 459 168 147 237 147 238 456 196 196 262 423 83 460 83 460 423 143 376 143 252 252 376 457 349 458 349 461 462 462 463 463 461 242 464 242 465 464 465 466 467 466 468 467 468 446 66 469 66 469 446 470 471 125 471 125 470 472 473 474 473 474 472 475 387 387 476 475 476 477 478 477 444 444 478 228 479 457 479 228 457 480 481 153 481 153 480 482 483 56 483 56 482 90 148 245 90 148 245 316 484 315 484 240 485 485 300 240 300 298 397 298 330 397 330 486 479 487 486 479 487 345 409 488 409 345 488 371 263 410 263 371 410 489 490 489 491 491 490 462 401 462 386 284 313 284 86 86 313 443 492 493 492 493 443 476 494 494 107 476 107 495 496 496 497 495 497 251 498 249 498 499 500 501 500 499 501 502 228 502 479 491 503 491 504 503 504 388 391 388 238 448 505 316 505 506 279 279 331 506 331 507 178 507 179 305 508 508 509 305 509 510 146 442 510 146 442 156 280 301 280 511 210 511 209 512 103 512 29 495 54 513 495 54 513 340 321 249 6 498 6 155 514 514 393 132 372 372 515 132 515 516 52 51 516 517 264 264 379 517 379 101 518 354 518 505 519 505 520 520 519 521 439 522 439 522 521 225 305 305 224 217 523 217 201 523 201 32 339 339 331 331 32 524 432 524 68 68 432 525 446 446 526 526 525 527 364 528 527 364 528 39 81 80 39 409 371 529 453 503 453 503 529 307 530 332 530 531 259 531 213 243 532 532 466 466 243 454 91 100 372 123 100 372 123 447 192 215 73 533 73 533 215 534 308 475 308 534 475 528 135 528 535 535 135 110 271 326 110 271 326 536 537 538 537 536 538 93 394 151 93 62 439 62 522 539 481 539 540 481 540 278 416 445 278 541 449 449 141 541 141 110 542 542 297 110 297 201 520 131 201 131 520 254 239 543 239 543 254 544 240 544 300 157 544 156 544 545 436 437 545 72 256 72 162 194 421 421 192 146 546 546 510 496 547 269 496 547 269 461 215 461 533 498 517 264 498 548 549 548 315 315 549 550 536 407 536 550 407 426 124 547 426 547 124 15 38 15 37 551 450 451 551 552 150 552 346 150 346 104 73 104 533 236 529 453 236 55 483 196 341 262 341 460 325 323 460 16 553 16 289 289 553 554 551 554 451 555 434 495 555 434 495 556 299 141 299 556 141 174 83 174 82 252 557 557 143 42 558 558 43 559 67 559 431 184 47 184 46 324 134 324 335 329 400 539 232 116 539 116 232 23 428 23 429 128 560 560 274 268 561 561 562 268 562 506 198 503 127 127 213 503 213 334 541 334 449 135 324 135 563 563 324 477 564 565 477 564 565 566 567 566 568 567 568 424 302 569 424 302 569 570 45 570 426 273 571 554 571 273 554 81 336 29 20 21 29 175 303 303 212 398 330 572 573 572 574 573 574 130 575 519 575 130 519 522 576 538 522 538 576 577 342 342 578 577 578 579 580 580 340 579 340 277 12 277 207 207 12 559 142 40 142 40 559 368 581 581 582 582 368 375 220 308 333 308 465 465 333 391 195 195 239 287 319 317 287 444 583 583 478 231 407 231 408 260 278 531 503 491 531 129 213 71 504 71 584 504 584 518 99 439 60 297 204 585 583 470 585 470 583 472 586 586 474 265 95 532 95 532 265 361 160 351 3 462 554 273 462 209 441 98 209 587 539 116 587 588 426 588 570 211 174 134 348 406 100 123 406 125 589 177 589 590 582 590 369 582 369 566 29 566 28 252 591 253 591 474 564 564 586 496 588 497 588 592 221 221 593 593 592 594 590 375 594 590 375 451 214 463 214 451 463 287 158 375 367 590 367 339 210 339 511 595 480 481 595 532 109 596 522 597 596 522 597 331 210 253 336 79 489 489 394 598 577 42 577 42 598 423 325 89 599 599 600 89 600 310 84 85 310 601 602 602 281 281 601 359 15 38 359 46 88 603 88 46 603 558 149 245 149 245 558 104 390 104 389 381 375 381 186 593 501 221 501 384 595 595 383 398 329 437 518 401 542 400 542 391 196 415 320 516 469 446 516 97 199 118 207 604 298 604 204 298 204 262 445 118 277 416 605 417 605 208 199 311 317 286 317 606 241 240 606 427 567 566 427 607 565 565 608 608 607 358 15 412 15 485 606 309 609 610 609 309 610 78 596 23 596 169 197 195 169 611 543 417 543 611 417 34 612 48 34 48 612 2 88 87 2 575 121 515 575 515 121 599 56 599 54 596 166 79 504 504 489 579 493 613 493 613 579 337 41 464 107 476 464 614 480 595 614 42 615 615 558 563 325 84 562 84 561 535 569 569 563 535 563 442 583 154 374 393 374 413 579 579 321 280 288 288 158 280 158 560 616 616 598 560 598 153 540 540 152 501 614 614 593 344 617 617 402 402 344 126 547 393 160 374 160 240 25 230 618 365 618 619 398 619 399 62 166 165 62 536 293 536 294 172 422 419 486 419 487 404 364 364 403 313 227 284 227 58 247 412 247 58 412 553 290 580 613 88 184 88 183 148 91 313 85 52 467 526 467 52 526 620 473 620 474 300 601 606 300 606 601 541 458 334 458 605 226 416 226 550 231 256 584 584 163 203 21 202 21 211 621 105 621 211 105 558 246 415 341 449 359 180 484 622 484 622 180 442 388 414 531 480 593 480 592 419 623 623 487 499 333 624 499 624 333 279 32 31 338 31 530 530 338 550 294 366 550 625 619 625 398 154 372 317 626 626 318 182 289 181 289 627 217 122 627 282 223 282 246 223 246 432 628 628 587 587 432 115 282 113 282 629 428 567 428 567 629 391 415 174 106 106 82 57 460 57 323 425 585 630 585 630 425 423 174 483 310 483 85 241 281 492 77 492 620 620 77 494 631 631 107 384 524 384 68 613 632 492 613 492 632 355 626 356 626 564 444 633 466 633 467 507 303 179 303 541 66 541 299 403 634 568 634 568 403 75 362 212 507 116 13 13 232 72 494 631 72 74 362 69 530 177 270 285 86 285 84 353 292 352 292 102 427 429 102 451 257 370 392 393 370 111 635 112 635 636 509 305 636 476 534 592 115 592 114 637 360 392 637 392 360 94 267 438 94 592 137 592 153 30 619 399 30 542 271 82 59 422 544 203 19 293 111 111 537 293 537 501 222 222 499 429 165 165 396 429 396 571 450 551 571 524 595 232 638 638 539 639 640 572 640 639 572 464 109 641 24 641 147 216 101 621 104 542 273 265 109 604 572 572 642 642 604 470 425 283 227 616 236 343 236 616 343 304 225 517 6 439 514 618 612 618 34 421 447 523 520 527 535 527 643 643 535 537 635 336 37 37 81 244 624 244 499 139 252 140 252 292 502 292 486 502 486 196 415 603 45 603 570 644 399 644 397 381 594 594 380 67 556 170 291 170 353 291 353 244 222 222 246 552 149 509 226 509 224 623 1 3 623 425 471 425 125 640 645 640 440 440 645 512 21 202 512 173 42 173 598 588 547 405 510 546 405 313 356 312 356 484 181 484 350 442 493 117 431 431 80 80 117 12 646 12 647 646 647 519 182 575 182 648 444 444 474 474 648 203 518 354 203 139 205 585 404 630 404 488 411 649 643 649 535 301 281 601 301 570 600 603 600 543 195 605 195 605 543 61 396 193 314 193 315 20 30 644 20 644 30 49 295 49 650 295 650 85 482 191 142 482 357 87 482 87 357 326 650 634 567 629 634 186 402 402 381 520 130 241 602 155 640 94 54 94 495 226 278 170 318 318 353 188 164 622 316 505 622 285 562 302 651 649 302 649 651 559 652 652 142 190 207 653 98 209 653 162 494 266 494 68 51 381 264 343 577 616 577 578 344 617 578 383 614 383 501 641 248 229 408 133 528 389 106 219 555 218 555 468 532 585 510 404 510 390 74 390 654 74 654 11 276 356 85 303 651 655 78 64 655 64 78 50 571 450 50 244 332 332 245 500 242 465 500 82 389 102 396 25 228 187 342 235 187 511 455 511 454 532 268 269 555 219 269 607 618 618 565 556 559 49 435 48 435 608 478 477 608 54 267 18 420 513 497 53 467 387 220 367 220 185 630 364 630 185 364 643 568 568 656 643 656 657 279 657 249 157 422 381 371 402 371 35 48 620 655 77 655 370 637 296 400 542 296 527 568 197 456 452 456 650 50 206 540 658 254 611 254 611 658 329 625 481 524 432 481 522 659 659 576 333 500 349 623 349 487 574 660 604 574 660 604 90 332 140 652 140 142 428 24 642 204 112 642 411 653 511 653 511 411 220 266 387 266 549 661 548 661 621 386 211 386 310 561 452 260 662 96 97 662 346 578 351 318 90 338 526 468 562 468 562 526 573 639 640 573 658 255 246 43 352 486 124 425 558 552 171 25 305 260 452 305 64 596 218 434 275 138 395 637 226 168 168 605 545 640 436 640 5 610 69 610 424 325 502 25 506 663 663 657 506 657 594 582 380 582 47 630 425 47 202 159 202 131 659 664 664 645 659 645 573 19 437 19 437 573 549 382 661 382 610 530 478 665 665 608 64 597 65 597 285 525 382 194 306 459 304 459 523 505 523 448 390 638 234 638 390 234 17 553 453 560 145 428 428 146 140 557 142 557 251 662 662 250 446 457 303 28 633 243 500 633 243 500 631 151 629 146 546 629 540 638 575 132 332 624 68 469 470 478 566 656 656 28 198 663 200 663 642 635 537 642 342 385 342 328 501 633 633 53 53 501 632 580 396 161 102 161 403 527 325 569 100 436 155 436 626 351 94 490 490 495 235 188 529 504 137 114 168 304 168 225 283 457 228 283 581 475 5 475 5 581 376 591 490 433 434 490 591 120 405 634 138 114 573 644 19 644 586 229 230 586 489 94 656 651 28 651 664 572 640 664 92 454 340 658 418 658 340 418 298 660 648 492 648 620 401 273 342 617 617 385 89 603 435 295 80 40 80 559 666 380 379 666 166 522 350 549 621 533 621 461 470 665 589 470 665 589 121 182 289 121 368 475 274 598 611 418 580 658 632 658 461 214 255 22 255 248 521 440 562 525 508 278 508 260 621 462 350 315 142 190 573 545 346 430 346 455 219 270 171 291 576 537 634 546 219 33 565 586 97 200 662 200 452 306 632 255 133 348 513 599 51 469 88 1 329 507 649 656 163 529 647 144 647 142 615 552 578 615 578 552 607 270 270 618 653 96 510 583 606 602 74 638 526 516 518 19 636 224 17 447 17 448 1 183 165 61 363 348 377 233 632 77 561 267 185 47 147 248 92 511 183 623 183 363 623 363 609 530 307 609 76 258 258 35 161 103 660 573 644 660 587 481 664 642 151 108 472 229 411 96 410 96 554 463 465 476 534 465 348 623 571 272 362 206 319 170 319 172 60 514 476 266 397 660 102 566 117 628 628 431 185 363 453 616 263 381 395 161 666 581 380 581 257 214 443 648 615 577 169 605 286 280 286 27 104 654 73 654 85 357 200 250 290 523 290 448 105 174 637 667 667 360 647 190 207 647 610 475 15 81 450 35 262 418 652 556 159 103 491 433 341 418 584 529 383 53 223 115 115 221 406 668 216 668 388 669 669 322 646 378 646 144 256 71 597 538 289 122 365 612 612 366 496 555 412 13 618 33 576 642 619 178 59 389 157 172 312 626 312 317 455 411 455 488 199 209 459 452 627 289 366 231 569 649 56 89 482 89 667 395 132 373 600 497 497 570 514 370 193 548 193 661 515 123 103 202 662 263 410 662 408 63 531 433 206 74 638 206 487 457 642 659 628 116 408 472 346 488 355 351 187 328 101 668 591 189 5 666 655 63 655 408 377 234 33 270 508 226 111 326 394 94 373 160 661 194 248 237 309 475 18 447 337 191 337 189 408 473 497 599 22 77 77 255 253 337 591 337 108 631 26 286 473 655 619 507 468 268 87 3 556 140 650 271 272 50 519 180 669 493 442 669 646 11 530 90 625 507 447 420 666 517 230 565 65 536 250 657 100 668 650 272 665 177 177 607 607 665 11 378 161 667 200 657 612 435 32 338 347 11 521 645 65 538 354 201 519 622 448 553 521 659 493 322 6 666 450 48 493 413 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 4 71 72 73 74 75 76 77 78 79 35 80 81 82 72 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 73 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 9 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 135 195 196 197 198 199 200 201 202 160 84 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 119 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 8 252 253 254 255 256 257 258 259 260 261 262 263 264 152 265 266 267 268 156 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 24 292 293 294 295 296 297 298 299 300 301 302 303 176 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 174 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 310 338 339 340 341 342 343 344 44 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 67 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 41 385 386 329 190 387 388 389 390 391 392 393 394 395 396 397 398 399 361 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 272 425 426 427 428 429 430 431 432 433 434 435 436 170 437 438 439 440 441 442 443 127 248 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 61 479 480 434 481 482 483 484 485 486 487 488 128 489 490 491 492 493 442 494 495 496 497 498 499 500 307 501 502 503 504 505 506 507 508 509 510 511 512 513 403 514 515 516 517 476 518 519 520 155 521 522 523 524 525 526 278 527 528 529 530 531 532 202 533 534 535 536 537 196 30 538 539 540 541 542 543 227 544 545 546 514 547 548 549 550 551 246 552 553 554 555 556 557 558 559 560 561 562 563 564 396 565 389 566 444 567 568 569 570 571 572 166 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 31 70 605 606 607 608 609 610 319 611 612 613 614 615 616 617 618 619 620 621 622 623 575 624 348 625 626 627 460 628 629 630 631 38 632 633 634 635 636 637 638 639 640 136 641 642 643 644 309 645 208 487 646 647 648 649 650 651 182 652 653 277 654 655 644 656 657 658 659 660 661 662 663 648 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 390 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 546 722 723 724 725 726 727 728 729 730 731 732 733 296 734 735 736 737 738 688 739 740 741 742 743 744 525 745 746 747 630 748 749 750 197 751 752 753 754 755 756 757 758 759 369 760 761 762 237 111 763 764 765 766 767 768 430 394 769 735 770 771 572 772 773 774 775 52 776 777 778 779 780 781 782 455 783 784 785 786 787 788 255 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 86 807 711 482 808 809 810 811 812 415 813 499 814 815 816 817 818 641 819 596 820 821 822 628 565 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 534 839 840 787 841 842 843 844 845 622 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 704 861 862 863 168 609 864 865 303 866 867 214 868 869 870 871 756 872 873 874 875 826 876 778 877 878 879 880 881 882 883 884 885 886 887 888 889 39 745 653 520 890 635 891 892 893 894 825 895 896 5 340 769 809 897 898 899 57 695 900 901 655 399 902 903 904 905 906 907 891 908 909 910 911 912 913 914 915 916 88 917 660 918 43 919 920 598 921 922 923 924 48 418 925 926 516 927 544 928 929 930 931 932 593 331 933 934 935 936 937 938 750 410 939 940 941 942 943 848 944 945 946 947 948 949 950 951 952 264 443 498 953 954 955 956 957 590 958 959 960 806 421 961 962 963 20 964 965 240 539 707 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 486 251 991 992 993 994 526 995 996 393 997 998 999 1000 687 1001 556 1002 337 1003 308 1004 1005 741 940 138 1006 1007 1008 1009 107 1010 781 1011 63 841 1012 225 853 1013 1014 1015 1016 681 1017 1018 1019 1020 466 1021 173 579 452 1022 960 1023 1024 1025 1026 618 1027 1028 929 1029 957 1030 191 239 1031 1032 417 447 821 1033 1034 1035 194 1036 1037 1038 1039 1040 28 1041 1042 297 1043 1044 1045 1017 1046 1047 732 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 997 437 1053 1058 1059 761 1060 1061 691 1062 1063 285 1064 816 1065 1066 1067 1060 1068 795 1069 299 543 1070 1071 533 1072 1073 1074 902 1075 658 1076 1077 1078 1079 1080 91 1081 1082 1083 1084 888 1085 1086 1087 1088 1089 1090 1091 1092 522 1093 646 1094 1095 1096 1049 1097 1098 1099 512 1100 966 405 1101 1010 610 1102 545 1103 215 995 1104 1105 570 395 675 1106 1107 104 1108 616 234 1109 129 1110 1111 1112 847 338 1113 1114 1109 983 1115 574 1116 218 409 1117 1118 1119 412 1120 1121 280 950 1122 1123 1124 1125 1126 1127 562 1128 1121 1129 702 1130 1131 1132 81 1133 1134 1135 1136 217 1137 1138 1139 1140 1141 1142 1143 1144 94 1145 1146 1147 1148 56 1149 1150 180 1134 1151 1152 1070 1153 1154 1155 422 42 1156 1157 1158 730 1159 1160 1062 1161 1162 919 946 1163 398 1164 936 1165 1166 1167 1168 1169 999 620 1170 1171 573 1172 1173 564 1174 1175 1176 1177 1178 1179 1180 1181 162 1096 1182 1183 1175 351 1057 1184 1185 1186 887 1187 134 1188 1171 1189 1190 27 281 1191 1192 473 540 1193 1194 1195 1196 181 359 1197 1198 186 584 1199 1176 169 759 1200 1201 709 1202 549 1203 722 1204 1205 1206 1207 1208 906 353 1209 1210 979 1155 1211 203 1212 97 697 1213 1214 724 92 1215 1216 1217 680 1218 1219 1220 1221 1222 1223 1224 942 1115 1225 1226 1227 884 1001 1228 304 1229 964 193 371 223 1230 1231 1232 1233 1234 1091 288 1235 1236 1105 429 1085 631 1237 1238 1239 1240 1241 521 758 557 808 716 568 1242 814 1050 1243 1244 1245 1246 1201 1247 1248 1249 1211 1086 924 1250 796 749 1251 1252 1253 1254 1255 605 1256 1193 1257 165 820 1258 391 1259 1260 1261 1262 201 245 1263 1264 1265 1266 1267 1268 1269 1270 1271 122 1272 1273 1274 1275 571 1276 744 1277 1278 916 903 1279 1280 1281 1282 1283 915 656 1284 1285 1286 1080 282 343 1287 1288 1289 1290 729 1291 1292 1293 1294 798 1295 1296 1297 458 1298 1299 1300 686 947 1301 670 1302 1303 1304 752 1305 1306 365 1307 1308 1309 424 469 1310 1303 1311 965 930 1312 1313 1291 1314 1315 1310 1316 77 1317 1252 604 586 192 1284 1318 195 324 93 1319 1320 1321 453 1322 1323 594 1324 305 1325 634 1326 1327 531 1328 120 1329 1330 1331 755 1332 829 684 1333 1334 123 1335 1336 1337 276 529 178 1338 612 1339 1340 1341 164 1194 1342 1343 1344 851 833 1345 59 89 583 860 1346 1230 1347 21 1348 1349 1350 738 1351 1352 1353 1354 1355 1356 890 1357 1293 1358 1098 928 1359 1360 1361 1362 1363 117 1364 1157 810 639 939 597 1213 159 1365 269 1366 244 1367 457 1368 112 1233 327 1369 1344 1370 1020 1064 1371 1372 1373 1374 1014 1281 1375 347 1205 1376 1377 1378 789 1379 373 877 1380 770 1180 692 845 613 771 1381 1140 1382 1383 290 266 1313 869 1384 823 1385 793 854 1386 1387 1388 1349 1328 1389 961 1390 1391 1392 1248 1393 1394 1395 148 1396 1397 1398 900 1399 1236 1400 1401 956 541 1402 1403 1404 1405 506 366 912 1406 1407 1408 1409 419 560 461 287 1410 1411 892 158 1412 312 878 734 1413 256 1414 2 1415 1416 1417 1418 677 1419 1420 1421 1422 1423 1231 1424 1425 1074 1029 1426 886 1427 871 1428 1429 1430 384 1312 124 13 1431 451 1432 619 727 1433 1434 1435 1436 1437 1438 1439 1440 971 1441 1442 1443 1444 1445 1446 782 298 1394 1447 1282 1448 1449 559 1450 712 1451 1452 1388 1453 1454 1083 1455 1401 1456 1457 1458 1459 1460 480 536 1461 388 1462 1463 1464 1465 1466 1467 1468 29 962 1463 694 1469 1286 1457 858 996 986 1470 385 1471 1472 1473 1021 532 1188 400 1468 1474 1275 1475 1476 1477 1095 1478 785 1479 972 1287 1082 1480 1420 1481 615 765 1482 1483 1114 335 494 846 1226 1484 1408 1485 1486 177 488 1487 1488 747 1489 1320 1490 1164 1491 1492 1493 1494 1495 985 209 1496 233 1497 1026 1498 317 1499 1500 1501 1294 511 1319 723 349 779 1502 505 1499 867 1314 1378 1503 1504 1184 1505 1506 1507 1182 1508 1365 1509 292 1510 263 1002 143 1511 830 1512 113 1093 1513 1514 247 671 817 1515 1448 1516 1517 11 336 982 1518 1519 1520 1447 150 228 334 10 1521 1429 1214 1522 370 1491 1523 1524 1525 1526 1527 1528 1356 1529 286 1530 836 1197 1350 668 1531 1532 882 1254 1198 1533 1278 1512 1355 1534 1324 1535 259 25 1536 431 1537 643 1538 1539 1019 321 1540 1541 1513 1542 1124 1543 1544 1545 921 1406 1477 547 402 1546 1547 49 685 1548 1549 1338 1482 1550 582 509 1551 1552 766 733 1553 1215 54 1554 518 1555 144 944 925 1556 1557 1558 1559 1560 1561 1465 1402 1343 1562 1563 339 862 1564 1346 356 1409 1321 1478 1565 1566 36 1567 1141 1290 1568 1569 1570 1326 1336 1571 1572 1103 1387 1573 1559 1574 1575 636 51 1576 1467 229 1181 1577 1566 481 1186 1578 1579 1580 1257 1100 1581 1582 797 1583 1479 856 139 1584 973 1585 1586 994 1532 1246 1587 1588 1589 1590 1591 1592 1530 698 1593 1594 1495 815 1004 941 23 931 1595 1596 1597 224 1598 1599 1600 1554 1601 1602 879 1603 1604 1605 1232 1606 1607 1079 1165 1608 1575 645 103 1609 1610 1505 436 1611 1486 1612 454 1613 99 426 1614 1615 1616 1361 1617 1618 1619 301 1578 1620 920 1235 1621 1397 1322 465 1337 530 133 1418 1622 1412 1089 1623 585 1624 1190 1608 1625 1626 1627 1133 1526 1208 561 440 567 1628 602 1629 146 467 1630 537 1570 1631 1225 1632 33 1250 341 1633 864 1634 71 1635 1636 1637 587 1075 1638 739 1535 1639 1640 1641 1642 1643 1405 1644 1645 1283 1247 1586 736 1646 501 1647 1648 1649 1650 1645 47 589 1651 1652 1653 1603 1654 1655 1656 1317 1636 1657 1658 1548 1659 66 1660 624 800 1661 1662 581 868 1663 374 1664 1665 746 1666 1667 1668 1669 904 1670 16 1671 933 640 154 1672 1673 1594 1674 1675 1676 295 1677 448 1224 663 1678 647 673 1304 1679 198 1680 1681 1682 1315 161 1683 1684 1685 870 844 1360 1686 1146 1687 775 250 318 1601 414 1249 1688 674 69 1689 577 1416 1245 1690 1000 1015 1691 1041 1692 1693 220 1694 1389 1695 1696 1697 1698 513 1699 1700 1701 1210 1295 1702 300 279 857 1534 1703 1704 1705 1309 1573 831 804 1386 954 1637 1706 1707 167 1708 1260 1709 1612 1710 1711 1483 274 1487 1712 363 406 706 743 1713 811 1714 1334 1340 1715 1379 1716 372 588 953 1717 1718 690 1719 1720 1721 1722 661 1042 1723 603 1724 1722 1725 490 207 1537 1712 551 1726 1307 932 179 1353 1392 1529 1688 1424 45 188 387 121 1727 1504 1072 1178 1728 1729 1651 667 1364 284 261 1730 1731 1006 271 242 717 1710 1732 1733 1692 1734 1574 216 654 1138 1459 1116 1735 1362 1736 199 1431 1238 649 1223 1305 1737 98 819 1738 1739 1740 1110 1741 1591 1289 1742 1743 1102 1369 1744 1745 1697 1746 591 885 1622 1747 1087 96 1466 1748 1546 1749 1750 987 504 1751 1752 1195 1753 842 478 1038 1059 1754 507 1654 1755 1756 876 1757 1758 1759 1760 1761 1261 1762 519 682 872 1426 1046 328 1763 1425 1739 1580 1764 1765 1702 1766 1055 1767 666 1768 293 1769 614 786 1770 1661 1771 1490 1772 1773 1003 721 1774 1605 1432 1775 701 1470 1776 211 1037 1642 1051 1618 1777 1633 642 1778 1779 1780 323 1542 1407 1781 185 1782 975 837 1481 1634 1708 1099 1160 1507 19 1729 1464 1783 1685 1476 249 78 1784 1045 949 1785 1786 1610 1787 1788 1626 375 1789 1619 1766 1790 142 1032 767 1791 1149 1689 1501 1792 1143 1793 1 1794 515 1311 1306 850 913 1795 1451 1561 1620 1266 345 527 897 1796 1797 1798 153 1799 1800 1801 1802 1803 1543 1129 1221 703 1497 1804 105 757 1805 1169 226 849 632 1806 1120 1480 472 805 1511 1595 1672 270 592 1122 1274 517 1606 238 1518 1807 1667 776 1217 1808 1652 1809 1101 1792 777 1106 1058 991 1555 1331 1810 790 629 1811 1812 1793 1212 1813 1774 664 1756 1814 1196 62 1815 470 1790 1765 1738 980 1816 289 493 1288 1817 1297 83 1007 1151 423 137 333 1449 1202 1557 1818 381 1607 1644 1556 1819 1734 1679 1523 1366 1820 1509 1061 427 1821 1822 1823 1824 812 1825 1826 79 1827 1828 1035 1758 678 1704 1829 110 1728 1830 1831 1832 1583 1270 1372 1735 1833 314 1834 840 1016 1730 1835 1836 558 1837 908 1056 1838 1839 1840 1332 1097 252 1351 852 1572 362 1841 446 1587 1842 958 326 1843 468 230 1081 1222 1806 1844 187 1845 1011 1381 1846 1500 728 1847 893 1801 1611 1517 1427 550 1848 1741 705 1123 1323 1849 1836 1804 1598 1434 1850 1851 368 1220 1454 1374 1417 676 205 1852 1823 1853 898 1376 439 1280 58 311 1854 1502 1855 1703 535 1856 1751 1857 18 508 450 500 241 1858 827 1840 993 1743 1444 1219 1859 621 1442 1161 1073 1860 1127 1084 462 1861 1458 1136 1718 1375 260 725 1859 1742 1862 344 1863 1624 1781 358 1864 895 1865 1522 1866 459 1677 1867 1787 1868 1666 1869 1277 1870 114 1203 1705 803 243 875 1767 1137 1579 859 1339 611 101 1871 1335 1872 1873 1874 1496 1635 1720 1875 14 87 1876 1828 633 1877 1113 1878 623 1879 1494 1545 126 1436 85 172 1880 1829 1881 1723 719 1560 951 1691 1813 1822 1415 1740 1882 428 1796 1883 1229 1884 53 510 1885 253 1886 1887 1888 553 1889 1890 569 1891 1892 497 791 1868 355 1228 1008 1893 106 1707 608 1067 1894 974 1761 130 1895 474 1896 1897 910 1898 731 1899 15 1128 1441 1145 1760 1370 116 316 1892 1439 1797 1488 1239 700 576 1764 1139 1359 268 1668 1900 34 1383 1726 1428 1783 1696 1901 1782 651 1664 1715 978 1800 1860 1342 1902 538 492 1903 524 1904 1199 1564 46 1088 1400 1905 1259 1906 1907 1908 1450 379 1550 55 1847 683 1602 342 760 1453 1025 617 1909 1910 1788 1663 1565 1854 714 1263 354 1911 1027 843 1832 380 899 1285 1443 1300 1044 1905 1430 1299 1750 1435 922 262 475 1912 748 1641 1562 1179 1763 934 1882 1878 901 1913 1492 955 1866 1469 1471 1899 1207 291 1747 1078 1456 1009 1883 1713 1914 1915 696 969 1589 1830 1048 1333 1886 1871 1916 1630 483 773 1917 1649 1736 1419 1455 1918 1919 1920 479 1846 1549 1125 948 80 1569 1524 1404 1094 1052 1921 1604 1922 1923 774 822 763 1924 1423 693 1341 1244 1357 907 959 715 1925 1926 1927 555 65 637 1910 650 1242 601 1928 1617 1363 967 1174 1862 352 1150 1065 1753 1929 1930 1807 1632 1861 183 889 1876 1391 710 1931 689 1385 784 1665 1031 1234 1870 1932 1833 1648 1329 1597 1695 1269 1933 1028 1699 737 1681 669 1839 1158 1778 595 894 926 397 441 740 1398 708 1777 1653 865 1510 1934 1835 1779 1935 1908 1936 627 1022 404 1937 206 799 68 600 1265 1885 1271 1938 1367 1888 408 1068 236 1276 1399 1104 1939 232 1725 1308 1475 952 1721 1940 1856 1927 1941 1942 1330 1414 1810 768 1173 981 1943 267 1816 320 1818 935 1646 1924 1880 1784 1944 1780 163 231 145 1945 1413 754 401 1946 1348 100 839 1947 315 102 1018 376 992 416 1948 502 171 76 824 273 1506 977 1745 1809 1347 1445 1727 1714 147 1541 873 1898 1798 1873 1776 1373 1596 1111 1629 332 330 1949 213 1922 652 1950 1820 718 1152 742 1875 1951 1132 1166 1452 1913 1154 726 1296 1811 1952 17 1795 1733 1493 1531 283 1682 1553 1700 1302 40 807 1749 1844 392 1485 1690 1757 1657 1953 210 1954 1934 1955 679 1678 625 1717 863 861 367 1552 1956 1791 1957 1768 1958 254 1267 1411 1959 1960 1043 484 1948 1189 963 764 1422 1292 1961 115 477 990 1039 1472 1915 95 1935 435 713 1960 1954 1939 1863 26 1962 1963 1955 1942 855 221 1647 1902 1964 751 1850 125 1933 1615 1965 937 3 1966 1144 1962 258 413 1687 970 141 914 149 1967 866 1893 74 1474 1968 835 82 22 1957 1969 1527 1842 1884 1508 1701 1786 219 1108 1558 471 1852 1539 1821 1737 578 1200 1621 1525 1941 64 1440 200 1970 1724 911 1711 1639 938 1693 1971 1972 1433 672 1614 1216 1437 1973 12 943 463 1237 1030 1919 1047 1920 772 1327 1754 881 1775 7 528 175 1928 1881 1005 445 306 1827 1613 1253 1974 1092 1864 1519 1473 1966 626 1975 1964 1256 638 184 1135 1241 1972 1889 1551 1952 1976 1752 1977 780 1953 1156 386 322 1187 874 1170 1258 485 1273 1684 1673 132 1034 552 1789 1817 1958 1956 1918 1077 1191 1978 1544 548 1185 1746 1255 1227 1912 554 883 1979 1377 275 433 1563 1980 294 1887 1033 1981 1358 1582 1063 542 37 1390 1040 1849 109 108 1938 1981 1982 325 1968 1857 1643 989 1656 1131 1825 257 1631 1716 1503 432 976 1983 1984 1985 1709 1298 1936 90 1279 657 1066 1627 1659 1973 1891 1986 1769 1950 302 1593 1879 1967 464 1987 1872 1272 189 346 1951 828 378 1694 1988 1640 75 1520 1865 1911 1895 1264 1814 1460 1354 801 1107 1808 1675 918 151 1989 1142 1547 1930 1577 1686 1931 1588 662 1841 1824 1815 1251 1990 32 495 1521 1991 1514 909 1628 1992 1421 1770 1867 1980 1988 1874 1438 984 1794 1975 1581 1674 1395 917 1268 599 1851 1538 1907 1600 1755 896 1368 1671 1853 1177 383 411 1204 1371 1590 968 1118 382 1906 1993 1894 1660 1926 1609 1837 1384 580 1976 1845 1904 438 1929 1316 1843 699 1090 157 1706 1163 1167 1916 1987 1855 350 1119 998 792 456 1994 1848 1403 1831 945 832 1168 753 1625 1773 1995 1970 1240 420 1959 1069 496 1991 1986 1540 1965 1515 204 923 1819 1568 1218 1963 1013 1805 1516 1945 1772 1484 1812 1670 1996 523 1669 1943 1352 1410 1393 1130 377 1826 1662 1949 1655 1076 1914 1148 838 1993 1979 659 489 265 607 1748 360 1147 1923 131 1638 357 1396 1834 1961 1683 566 1461 212 1650 1992 1997 1325 1858 1054 1971 1998 1890 1999 1380 1977 1983 1759 1036 1984 1318 1802 425 794 1990 140 503 1917 1592 1974 813 1937 1698 1536 1676 1925 313 1382 1896 1192 1585 1901 1932 1900 1803 1944 1999 1940 6 1658 1985 1126 50 2000 1528 1995 1489 783 1117 235 1909 1162 1799 1623 1762 1719 988 1462 880 1921 1498 762 1599 1946 834 118 1172 2001 1153 563 1998 2001 1206 60 491 1576 1969 1982 1262 905 449 1996 1209 1869 1994 1446 222 1571 927 407 1616 1771 802 1024 720 1744 1567 1877 2000 1012 364 1112 1071 1732 1947 1680 818 1301 606 1897 1989 1023 1838 665 1533 1903 1345 1584 1997 788 1731 1785 1978 1159 1243 1183 gts-snapshot-121130/test/boolean/surfaces/p10000644000175100017510000000037712055775440015654 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex 0 1 2 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 0 1 1 2 1 2 3 2 1 3 4 5 6 5 6 4 7 2 4 2 7 4 7 6 8 5 4 8 7 5 3 5 7 3 8 2 3 8 1 8 1 2 3 4 5 6 7 8 9 9 6 10 11 4 12 5 13 10 13 14 15 8 16 12 2 7 15 17 18 3 14 11 17 16 1 18 gts-snapshot-121130/test/boolean/surfaces/a23.gts0000644000175100017510000000016312055775440016506 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 2 0 0 0 0 2 0 2 0 0 0 0 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/b25.gts0000644000175100017510000000016312055775440016511 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 0 3 1 0 0 2 0 0 1 1 0 1 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/t120000644000175100017510000000014212055775440015730 000000000000004 5 2 0 -1 0 D 0 0 -1 E 0 0 1 F 1 0.5 0 G 1 2 DE 2 3 EF 3 1 FD 4 2 GE 4 3 GF 1 2 3 DEF 5 2 4 GEF gts-snapshot-121130/test/boolean/surfaces/t320000644000175100017510000000010412055775440015730 000000000000003 3 1 -0.5 0 -1 E 0.5 0 -1 F 0 0 1 G 1 2 EF 2 3 FG 3 1 GE 1 2 3 EFG gts-snapshot-121130/test/boolean/surfaces/t150000644000175100017510000000024212055775440015734 000000000000004 6 2 -1.63299 -0.942809 -0.666667 J 0 1.88562 -0.666667 I 1.63299 -0.942809 -0.666667 H 0 0 2 G 2 1 IJ 3 2 HI 2 4 IG 1 3 JH 4 1 GJ 3 4 HG 5 3 1 IGJ 6 5 4 HGJ gts-snapshot-121130/test/boolean/surfaces/cube20000644000175100017510000000033612055775440016327 000000000000008 18 12 8 0 0 0 0 0 0 1 0 8 1 0 8 0 10 0 0 10 0 1 10 8 1 10 3 1 2 1 6 1 2 6 2 7 3 2 3 7 3 8 4 3 4 8 5 1 4 5 1 4 6 5 7 6 5 8 7 5 8 7 9 13 1 6 1 2 4 2 3 14 3 11 4 15 5 6 5 7 7 18 8 9 8 10 10 16 12 13 12 11 15 14 17 18 17 16 gts-snapshot-121130/test/boolean/surfaces/t160000644000175100017510000000014212055775440015734 000000000000004 5 2 1 0 0 A 0 1 0 B -1 0 0 C 0 -2 -0.5 D 1 2 AB 2 3 BC 3 1 CA 1 4 AD 3 4 CD 1 2 3 ABC 3 5 4 ACD gts-snapshot-121130/test/boolean/surfaces/cube70000644000175100017510000000063712055775440016340 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex 1.55052 1.09747 0.625643 -0.289349 0.538054 1.90441 2.96196 0.549843 2.41684 -0.160693 -1.63671 1.13814 1.12209 -0.00957019 3.6956 1.25074 -2.18433 2.92933 3.09062 -1.62492 1.65057 1.67918 -1.07729 -0.140628 1 2 2 3 1 3 2 4 4 5 2 5 4 6 5 6 6 7 6 8 7 8 3 5 4 8 2 8 5 7 7 3 8 1 1 7 1 2 3 4 5 6 7 8 5 9 10 11 6 12 2 7 13 10 4 14 13 12 15 16 1 17 14 8 9 15 17 18 11 3 16 18 gts-snapshot-121130/test/boolean/surfaces/loc20000644000175100017510000000012612055775440016163 000000000000004 6 4 0.5 0 1 0.5 1 0 0.5 0 0 1.5 0 0 1 2 3 2 3 1 4 2 4 1 3 4 1 2 3 4 1 5 5 3 6 2 4 6 gts-snapshot-121130/test/boolean/surfaces/a25.gts0000644000175100017510000000016312055775440016510 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 2 0 0 0 0 2 0 2 0 0 0 0 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/t40000644000175100017510000000014512055775440015654 000000000000004 5 2 0 -1 0 D 0 0.5 -1 E 0 0.5 1 F 0 1.5 0 G 1 2 DE 2 3 EF 3 1 FD 4 2 GE 4 3 GF 1 2 3 DEF 5 2 4 GEF gts-snapshot-121130/test/boolean/surfaces/t260000644000175100017510000000021112055775440015732 000000000000003 3 1 -0.361845 2.06769e-16 -0.932238 D -0.417408 2.38519e-16 -0.908719 E -0.386478 -0.050289 -0.920926 F 1 2 DE 2 3 EF 3 1 FD 1 2 3 DEF gts-snapshot-121130/test/boolean/surfaces/t90000644000175100017510000000014312055775440015657 000000000000004 5 2 0 -1 0 D 0 0.5 -1 E 0 0.5 1 F 0 1 0 G 1 2 DE 2 3 EF 3 1 FD 4 2 GE 4 3 GF 1 2 3 DEF 5 2 4 EGF gts-snapshot-121130/test/boolean/surfaces/horse4.gts0000644000175100017510000007237012055775440017336 00000000000000336 1002 668 GtsSurface GtsFace GtsEdge GtsVertex -0.01399844229 0.08714155824 0.04634542729 -0.00711987842 0.08387148715 0.05079067138 -0.01484915813 0.08707045042 0.052732734 0.003890404108 0.05849699409 0.0700365001 0.007959841128 0.0666420409 0.06391255605 -0.002364211965 0.06814407815 0.07196998721 -0.007084975887 0.03564502823 -0.07638398126 -0.008566254969 0.04348836336 -0.07621774345 -0.006334225035 0.03421663608 -0.06865274325 -0.003481999579 -0.09338589657 -0.05987325718 -0.007296970267 -0.08559062083 -0.0568575243 -0.005112701734 -0.08775951431 -0.0659067124 0.02617092473 0.01742742163 -0.04948925255 0.03007688392 0.0186819136 -0.04969921347 0.03053088148 0.01669467781 -0.06497438538 -0.003699615366 -0.03773206439 0.0004140635974 -0.003694311514 -0.05121500318 -0.005660436663 -0.01152666534 -0.04427419908 0.0003703522132 -0.01647276144 0.08032673265 0.03979473132 -0.0241074271 0.08716328735 0.04002151959 0.02993896861 -0.0225902079 0.0289264007 0.03125122341 -0.03424555946 0.03512951938 0.02121353734 -0.01616180915 0.03032162282 -0.002283742907 0.04949695201 0.05002630732 -0.004647247523 0.05793580599 0.0501508864 0.001175076852 0.04001949318 0.0354116709 0.02361780271 -0.04800396124 0.0374424056 0.02257567404 -0.0356194706 0.03710108862 0.03475685296 0.02434326422 0.01044828414 0.03647359373 0.02970877778 -0.0006738765686 0.03366540667 0.0189834095 -0.003421256544 -0.004896505228 0.08032285322 0.04168668366 0.02435973 0.04343254026 0.02842791296 0.02143822007 0.03524024138 0.03607030603 0.0168151967 0.05487253241 0.04848803692 -1.133624465e-05 0.009628037481 0.02569442716 -0.008062334012 0.01985455819 0.01843265214 -0.002059480584 0.01754622311 0.02880224592 0.03074110932 -0.05976714313 -0.009365613364 0.03160611111 -0.07136520853 0.01071152464 0.0256840097 -0.05993459004 -0.005392309077 0.03150927455 0.03558833219 -0.00863184788 0.03185995615 0.0238672504 -0.01331491144 0.03269792222 0.02774989759 -0.01366839704 0.02634806345 0.01449165035 -0.005438173991 0.02083515746 0.005365255409 -0.01568136967 0.0299563286 0.01319879957 -0.0006074106943 0.03115116512 0.04058153783 0.02212312693 0.03169056601 0.02951051593 0.02358878886 0.03391921826 0.03830840546 0.008442848484 -0.009675364884 -0.06915111957 -0.01504997193 -0.002391250926 -0.07540763245 -0.01631556228 -0.00638884051 -0.07202659066 -0.02443576241 0.01679960964 0.05761169639 0.03944815553 0.02172982051 0.04819570618 0.02187952003 0.009722401526 -0.05851502173 0.03502163022 0.0008411117095 -0.05729739477 0.03315041141 0.003084006513 -0.0698168516 0.02704991922 0.002492545743 0.03294985798 0.0349215895 -0.002755758754 0.03087046002 0.03143322861 -0.003440614802 0.04280093238 0.02219813192 0.0001767138343 -0.08591771321 -0.04352559771 -0.004388945417 -0.08430576183 -0.03283925489 -0.004839743341 -0.08332962169 -0.02309175696 0.003538493068 -0.07621110012 -0.03155393353 -0.000459732138 -0.06443761353 -0.0187098365 0.003473270756 -0.06942969634 -0.01897812851 0.009655517167 -0.01493999087 -0.01853352857 0.004565238638 0.005566691215 -0.01827593749 -0.0004664557674 -0.009668824751 -0.0159499761 -0.009284226198 0.02826320978 0.02061215237 -0.007961751305 0.03875842768 0.01987714668 -0.002761246765 0.03563828626 -0.05333519383 0.0004863460419 0.03481585426 -0.05326379319 -0.001456809346 0.03913147733 -0.06532529443 -0.006670700868 0.06448930681 0.03902538105 -0.006651319782 0.06227275219 0.04997750063 -0.01401774003 0.06173498751 0.04790265734 -0.01113198258 0.03374382941 0.008188171626 0.003900548106 -0.06923060902 -0.01040347769 -0.0007965837085 -0.07317907688 -0.007817129971 0.02993125635 0.006120185243 -0.05980834949 0.03001190085 0.01043597942 -0.06707322577 0.03388215701 0.008237893114 -0.0588829558 0.0151653196 0.0554461067 0.05546856372 0.01209020141 0.04935675339 0.06303871036 0.01628595239 -0.06223912157 0.001304912739 -0.01298597885 -0.01591953895 0.007914207622 -0.00787816591 -0.03578858385 0.01502928543 -0.01128431748 -0.02485025832 0.003081635188 0.04041140904 -0.02226371263 0.00921738033 0.0376869552 -0.03255417095 0.01573857871 0.03954613476 -0.02033348977 0.01689782248 0.002132921331 -0.08892912242 -0.05841814456 0.02065671057 -0.006045458414 -0.01747898914 0.03475144348 -0.01077434682 -0.007992116082 0.02379096772 -0.01785136934 -0.01529725114 -0.01491740549 0.07304073986 0.07161063817 -0.01072489496 0.0686214311 0.07095112683 -0.004947600696 0.02947770814 -0.06376310136 -0.004525341745 0.03261305389 -0.0555263871 0.0304225224 -0.06386113973 -0.0447780668 0.03531077582 -0.05945582314 -0.03898966153 0.02803420224 -0.06598871682 -0.05982690806 -0.03566672209 0.09282838825 0.03718569086 -0.04392893303 0.08677706777 0.03926546961 -0.03831287376 0.09116868231 0.04139312977 -0.004278987696 -0.07096315113 -0.02827644712 -0.005150102585 -0.06225913771 -0.02061674121 -0.008924081195 -0.0648333229 -0.01934112454 -0.006212345181 -0.06029389058 0.02626956442 0.0008625990786 0.02239651008 -0.0188979477 0.003917435521 0.02926893163 -0.03318223099 0.001165097696 0.02523404795 -0.03957571933 0.001501002207 0.0346311759 -0.06648697818 -0.0362262157 0.08879320386 0.03129639998 -0.04048996553 0.08225953131 0.03671018489 -0.03490373434 0.08345472823 0.03190892503 -0.009654232028 -0.02344999804 0.01726110988 -0.004843662898 -0.02796858005 0.02334474771 -0.002828992141 -0.07521371765 -0.02355240768 -0.007477737145 -0.07956910319 -0.03375142835 0.02232944421 0.006181420528 0.02706577046 0.03584123283 -0.01069953232 0.02182213768 0.00165670685 0.04848824857 0.02429042206 -0.002278817897 0.04512691368 0.02920987406 0.03323516033 -0.0696968104 -0.07479897823 0.02613215487 -0.06537345703 -0.07512262717 0.03359441511 -0.06833744979 -0.06724944763 0.02898733887 0.02593823058 -0.03466161818 0.02265986124 0.02344448673 -0.03668562958 0.0420629489 -0.05851416958 0.01116026513 0.04168033704 -0.05204777665 0.0209339508 0.03865003768 -0.06053974898 0.02329996396 0.008366410486 0.001238644366 0.02839127225 0.007973494393 0.01351472969 0.03593813441 -0.01366402841 0.0656018167 0.06920549629 0.008841105512 0.04466351021 0.06289649136 0.02693931829 0.0150378853 -0.06642529973 0.03082839672 0.02288107393 -0.07477957186 -0.002383392301 0.0584039807 0.03884915064 -0.004575304029 0.01398540841 0.0007998749037 -0.009981563476 0.02340079672 -0.00952749589 -0.0044611792 0.02240905956 -0.01404341893 -0.02733044091 0.08787125685 0.04692096172 -0.02776993131 0.08576265958 0.05271007172 0.0002299200355 0.03008183833 -0.0526309113 -0.003026203328 0.02746950392 -0.05451251374 0.02885607787 -0.06561102264 -0.02705281966 0.02607043067 -0.05659493813 -0.02903571987 0.0290514753 -0.06030830567 -0.01344532212 0.016535263 0.001520034093 0.02846598072 -0.0142127531 0.07844232256 0.07013878158 -0.01687207412 0.08904900377 0.06004457934 0.009893776487 0.0665557599 0.05597267721 0.03498720328 -0.02617293678 0.02506715326 0.004684082046 0.02528867908 0.03737786199 0.009992052885 0.02219208401 0.04155572752 0.000920447746 0.03538649523 -0.07646800483 0.03116264779 0.01487256179 -0.04662811365 0.03463515774 0.01417484338 -0.06446167085 -0.002370331495 -0.08901111448 -0.04957451068 -0.004922251404 -0.08076710476 -0.04445656116 0.0261407683 0.01358268674 -0.04746464093 0.02284284179 0.01411253532 -0.03686133085 0.005553172136 0.03385605141 -0.01447130927 -0.002341662409 0.03672008729 -0.01536039013 0.005619778363 0.0273488094 -0.01693030154 0.02693418421 0.01067263783 -0.07605973612 0.03409201833 0.01012579517 -0.07298440008 -0.006915371086 -0.03078296843 -0.002586910331 0.03863769628 -0.05899099525 -0.07447174678 0.03143473302 -0.05482375544 -0.07441868477 -0.01054150325 0.0722570871 0.03858308538 0.004061066873 0.06586230475 0.04510892203 -0.001399741117 0.07361001299 0.04738100056 0.002319455815 -0.07963608615 -0.07542054604 0.002796762896 -0.08724112263 -0.07508023968 -0.001232417508 -0.08211026541 -0.06523884548 0.0368712505 -0.05917104606 -0.03000689245 0.03495924117 -0.04944465016 -0.02216753008 -0.005805630637 -0.003626265852 -0.00963021862 -0.008109981364 -0.01801818376 -0.008342221735 0.0261096969 -0.060831167 0.0336130382 -0.02085413804 0.06744624753 0.07715163492 0.03284800892 0.01983050268 -0.03898553991 -0.0005804874632 0.062495903 0.03890953818 0.004094656528 0.06367572088 0.03985060416 -0.004070312166 0.0228175281 -0.03633004507 -0.007496283742 0.02974386012 -0.0410566637 0.02914021095 0.01193216523 -0.04539427666 0.002564033262 0.04219863759 -0.07594683424 0.01412950153 0.005814326728 -0.01873187022 0.01848125362 0.02479111458 -0.01782380559 0.006787630338 0.01432430154 -0.01761951969 0.02728853829 0.01662958381 -0.01924999477 0.02296211985 0.01671259361 -0.02826914248 0.0292752626 0.02485046982 -0.0252506365 0.002980496664 0.01689075277 -0.01145058778 -0.00359722522 0.02141793406 -0.01841095986 0.007270895278 -0.05564184244 -0.006051714029 -0.004169409686 -0.05856353576 -0.007981391539 0.03839088979 -0.04442700391 0.03046808042 0.03715237448 -0.05635639292 0.02967782004 0.002310374186 -0.08240991916 -0.02230365523 -0.002148773376 0.04685978554 -0.07646237571 -0.006808147712 0.0102530595 0.01012052355 -0.006884330461 0.01634939733 0.01539412606 -0.005672235067 -0.07565346701 -0.07601496864 0.02884883839 -0.04543220221 -0.01595892418 0.02004838443 0.01736686842 -0.01887254326 -0.008158632395 -0.08143711256 -0.07113356096 -0.008542527791 -0.08918752358 -0.07601509842 0.02614749515 0.009599596908 -0.06096653466 -0.01132478153 -0.01218609307 -0.002186100825 0.03888982709 -0.01987246085 0.0004670087456 0.03885387738 -0.00695122816 0.002724188887 -0.02502880127 0.06799393415 0.04745503692 -0.01646520289 0.06427402463 0.0414589967 -0.0009174014299 0.03548220296 -0.02699873271 -0.009027940764 0.03649718065 -0.002926517474 0.03062899728 -0.04693951478 0.03575676012 -0.007282507511 -0.06987221325 -0.006670021251 0.009496035115 -0.07158672631 0.002141757922 0.006924606536 -0.07479078747 0.009704521799 0.03503738856 -0.04087719266 -0.00653666502 0.03786718137 -0.04772732709 -0.007151207163 0.0406871343 -0.03832193275 0.002257106259 0.0373963642 -0.07025166925 -0.05982143387 0.03342689113 -0.07374168377 -0.06043882614 0.03376829326 -0.0680057351 -0.03993240149 -0.004601073848 -0.0818465615 -0.06469160281 0.03407514477 -0.06279654249 -0.06444526593 0.02890063801 -0.06474771453 -0.06585526225 -0.008025358077 0.07798059656 0.07007021426 0.02054447638 0.02928234328 -0.01665001172 0.002137134592 0.03091677162 -0.06300335728 0.03417909793 -0.03125967083 0.002049789333 0.03313810301 -0.06996520102 0.01776579211 0.04056274745 -0.05487161782 -0.000528401153 -0.002297345317 0.07681965117 0.05878376191 0.009730320368 0.06428147005 0.04998676121 -0.007654379709 0.04387344493 0.007914241542 0.002122977355 -0.08487991217 -0.06486130611 0.02408960861 0.01974478703 -0.07571295453 0.0272104653 0.01993601863 0.02976172699 0.01959300146 0.02002558061 0.03629598928 0.00177787414 -0.02261065258 0.02817529957 -0.006375590952 -0.03524177171 0.02860184258 0.0285790395 0.03201295799 -0.01605371484 0.0372807478 -0.05656115517 -0.00933112696 0.03928833829 -0.05042577034 -0.01658214102 0.01491885407 0.02108116194 0.04064544898 0.01666291404 0.02726485016 0.04306745286 5.161503843e-05 -0.08188556331 -0.0451450487 0.03664623741 -0.06517041717 -0.06518961357 0.03877333899 -0.06645632773 -0.07434102214 -0.03230861881 0.07814008053 0.03994364243 0.01511915673 -0.07131425889 0.01896553282 -0.02466016904 0.07791674071 0.03910843026 0.0106529801 -0.02928021621 -0.0126164263 -0.004392010676 0.03047932815 -0.02700661165 0.01419289621 0.04113946652 0.05760338076 0.02893786116 0.04571985057 0.01298922794 0.0269241056 0.04613001236 0.005057242502 -8.936638223e-06 0.001792401634 0.0236408831 0.001253452763 -0.02335770137 -0.01301516756 0.00656419785 -0.04534550755 0.03696259889 0.02934068445 -0.06684118077 0.02767743708 0.01340685411 -0.06886061027 0.02828482447 0.02466972698 -0.07091009028 0.02289838491 0.01520667495 -0.06872824335 0.01030192437 -0.01253586797 0.02923703745 -0.001276685102 -0.00325110376 -0.04475472172 0.03259457136 0.03099281876 -0.06757293423 -0.04303978316 0.03240255314 0.009406626921 0.01386685972 0.03939802052 -0.00984027028 0.01233394599 0.009616490074 -0.02111062615 0.03126912781 0.009379632204 -0.009803279448 0.02879073652 -0.01401066421 0.06516064955 0.06065412507 -0.02537865571 0.06972701194 0.0620825513 -0.005354712201 0.007333715298 0.0176978225 -0.009991545682 -0.04221273906 0.02285774271 -0.009338984735 0.02820470028 -0.01160543829 0.02539828273 -0.05124035662 -0.004419107231 0.01708338267 -0.05452455959 -0.004220712182 0.04227321942 -0.04627008297 0.01045006902 -0.001478319938 -0.07066753655 0.01717184206 -0.01057849769 -0.06556629942 -0.004675531915 -0.008507195898 -0.06675308621 0.01457695108 0.0004350155671 0.04483442686 0.05185413571 -0.001555241965 0.0762408942 0.06239571547 -0.007109682667 0.08707795585 0.07453126048 0.03642061186 -0.0635795551 -0.05102307018 0.01233133511 -0.06726494699 0.005261355338 0.02850758762 -0.03057174847 -0.006304851448 0.003857393423 -0.03461488405 0.03564360642 0.002212078263 -0.03921027502 -0.001852739236 0.03203009338 0.01227204933 0.007437079355 -0.008898983178 0.081208568 0.07430731458 -0.001641562141 0.04310732308 -0.004222516263 0.03298334235 0.0006368355536 -0.005490227895 0.004906402343 0.04862710208 0.01579711003 -0.01257525031 -0.06035378877 0.005883008384 -0.01121943914 -0.05358239428 0.02156663285 0.02144798984 0.04116418781 -0.009018964492 0.01279789151 -0.04137035725 -0.002019514067 0.03873481409 -0.03341328307 0.02676452889 0.003041942912 0.04735702725 0.06188822852 -0.01974764252 0.06860381172 0.06408669745 -0.02022883791 0.06525760891 0.06903949268 0.01892151042 -0.03339884181 -0.008679177829 0.03714695465 -0.06008615314 -0.005949443772 0.03668912226 0.01706806481 -0.07522448594 0.03012666842 -0.07243359184 -0.06048618727 -0.008583038398 -0.05594815058 -0.006610375457 -0.006363901332 -0.01268806292 0.02091961482 -0.01076210902 -0.007639524678 0.01423515672 0.02834053546 -0.04107717478 -0.004366795612 -0.01131460587 -0.003756188948 0.005049758604 -0.007811584756 0.003877097243 -0.001241609223 0.01375425889 0.04887377348 0.01723621068 0.01885037706 0.04529570703 0.00183968582 -0.003094447591 -0.06889170009 0.004888867191 -0.0004866945918 -0.07383535978 0.003278961381 0.002670417794 0.03376751743 -0.03673941633 -0.01300874897 -0.0501702459 0.003431561165 -0.009637715747 0.08377917013 0.06480688005 0.00459014768 -0.07475441232 0.01767730275 0.008422114131 0.04062022127 -0.00733508274 0.02969725442 0.00744103775 0.02020554316 0.03287485075 -0.06627468814 -0.02506122897 -0.02857306018 0.07398569233 0.05112764747 0.02995439492 0.03830247904 -0.002353862053 -0.0340305291 0.08361439294 0.05006689511 -0.009088887017 0.03245015141 -0.01435685853 1 2 1 3 3 2 4 5 6 5 6 4 7 8 7 9 9 8 10 11 11 12 10 12 13 14 14 15 13 15 16 17 17 18 18 16 1 19 20 19 20 1 21 22 21 23 22 23 24 25 26 25 26 24 22 27 28 22 28 27 29 30 29 31 31 30 1 32 2 32 33 34 35 33 35 34 36 37 36 38 37 38 39 40 40 41 41 39 42 43 43 44 42 44 45 46 45 47 47 46 48 49 49 50 48 50 51 52 51 53 53 52 54 33 55 33 54 55 56 57 57 58 56 58 59 60 59 61 60 61 62 63 62 64 63 64 65 66 67 66 65 67 68 69 68 70 70 69 71 72 71 60 72 60 73 74 75 74 73 75 76 77 78 77 76 78 79 71 72 79 80 52 80 81 52 81 82 83 83 84 84 82 5 85 5 86 86 85 41 87 40 87 88 89 90 88 90 89 91 92 93 91 92 93 18 89 89 16 94 10 94 62 62 10 95 96 97 96 95 97 98 99 6 99 98 6 100 8 101 100 101 8 102 103 104 103 102 104 105 106 107 106 107 105 108 109 110 108 110 109 111 58 111 57 112 113 112 114 113 114 115 100 100 9 9 115 116 117 116 118 118 117 119 120 89 119 89 120 121 122 63 122 63 121 123 124 123 21 21 124 61 125 61 126 126 125 127 128 127 129 129 128 130 14 14 131 131 130 132 133 133 134 134 132 75 115 115 74 135 136 136 38 38 135 4 137 138 137 4 138 139 140 139 15 15 140 141 76 25 141 76 25 142 143 143 144 142 144 145 107 107 146 145 146 147 148 147 114 148 114 149 150 149 151 151 150 152 23 23 123 123 152 153 154 154 146 153 146 155 85 155 5 93 124 124 156 156 93 157 59 60 157 158 157 157 38 38 158 159 7 9 159 20 145 1 145 25 126 26 126 14 160 161 160 14 161 162 163 162 122 122 163 164 165 13 165 164 13 166 167 168 166 167 168 83 169 170 169 83 170 171 89 90 171 128 172 128 173 173 172 174 175 176 174 176 175 177 178 177 179 179 178 103 180 103 181 181 180 182 70 183 70 182 183 184 27 27 56 56 184 185 98 99 185 130 186 186 14 187 188 187 174 174 188 189 148 190 189 148 190 84 191 191 82 182 142 69 142 182 69 192 159 192 115 115 159 193 194 193 195 195 194 196 197 197 165 196 165 196 198 43 198 43 196 195 199 199 200 200 195 201 202 202 66 201 66 95 68 97 68 203 133 203 204 204 133 205 67 80 67 205 80 206 192 206 75 75 192 207 208 142 208 142 207 86 138 4 86 34 48 48 33 189 112 114 189 64 121 209 179 209 177 181 210 210 103 196 211 197 211 212 209 213 209 212 213 214 139 164 214 139 164 215 90 215 183 90 183 216 96 217 96 216 217 78 218 219 218 78 219 167 220 220 221 221 167 32 19 204 184 222 204 222 184 81 51 223 81 51 223 81 224 224 225 81 225 226 227 226 228 228 227 229 230 229 231 231 230 232 179 163 232 179 163 104 233 234 233 234 104 235 6 98 235 166 236 168 236 74 237 74 147 147 237 194 236 168 194 55 188 54 188 238 216 91 216 91 238 132 239 240 239 240 132 241 155 242 155 241 242 243 221 221 79 79 243 179 244 178 244 139 245 245 169 139 169 49 246 49 247 247 246 248 249 248 120 249 120 250 198 250 44 44 198 227 251 251 252 252 227 242 35 35 54 242 54 247 253 247 254 253 254 210 102 102 150 210 150 163 255 179 255 105 20 116 20 105 116 172 256 256 257 172 257 83 161 170 161 258 118 258 117 145 3 146 3 224 80 259 224 259 225 172 127 122 108 163 108 20 260 260 116 261 97 68 261 189 262 262 190 138 263 253 138 253 263 264 55 265 264 265 55 52 205 64 52 205 64 232 209 135 36 266 36 266 135 68 267 267 70 57 268 268 56 269 270 271 270 269 271 272 224 272 259 221 273 273 79 168 112 113 168 57 274 274 111 108 255 66 108 66 255 149 102 275 102 275 149 83 139 276 277 124 276 277 124 204 269 134 269 204 134 217 91 277 217 277 91 278 23 23 279 279 278 280 78 280 281 78 281 282 36 282 266 182 215 10 163 10 162 220 168 220 113 24 77 77 25 283 120 283 249 273 143 284 273 284 143 41 285 41 286 286 285 253 158 158 152 253 152 195 168 195 112 287 240 133 287 240 133 288 289 290 288 289 290 259 270 271 259 291 137 137 280 291 280 220 73 190 73 190 220 292 241 241 293 293 292 235 5 294 229 256 229 256 294 123 253 247 123 158 136 136 152 34 254 34 263 263 254 295 224 295 272 296 228 238 296 238 228 264 50 264 48 278 297 248 278 297 248 284 221 119 88 69 193 69 195 298 17 298 16 237 148 276 217 299 217 276 299 72 61 61 243 243 72 279 135 279 266 160 84 160 191 300 235 235 292 300 292 260 118 260 258 301 243 221 301 34 49 30 42 43 30 96 46 302 46 302 96 282 208 282 207 153 235 98 153 243 303 61 303 304 283 304 305 283 305 250 166 306 166 250 306 290 305 290 111 305 111 116 106 160 186 245 140 307 298 286 307 298 286 308 133 287 308 32 174 176 32 65 62 205 65 205 62 31 47 29 47 254 49 180 252 251 180 101 190 148 101 158 309 309 291 158 291 161 84 310 311 311 98 98 310 93 277 139 13 308 203 272 40 87 272 211 131 211 194 131 194 296 97 312 296 97 312 198 130 250 130 46 95 313 239 240 313 169 314 245 314 230 315 315 129 230 129 85 263 86 263 110 316 109 316 119 317 318 317 119 318 226 210 210 319 226 319 211 193 303 188 187 303 19 260 19 174 174 260 186 191 62 162 59 126 285 319 307 285 307 319 88 318 318 320 88 320 321 215 321 182 215 320 215 88 161 15 140 161 251 39 251 313 313 39 301 167 186 196 198 186 240 228 287 228 322 265 323 265 322 323 284 144 92 156 279 152 242 175 241 175 274 268 320 142 321 142 320 321 214 83 56 270 184 270 286 87 87 201 286 201 297 23 324 325 288 325 324 288 138 158 76 219 53 121 122 53 317 282 282 318 268 297 274 297 48 55 288 58 58 290 216 296 154 3 22 203 308 22 261 267 261 298 298 267 270 58 141 187 141 303 113 147 326 147 326 113 302 217 327 304 289 327 289 304 153 300 300 328 153 328 69 199 141 125 125 25 280 77 257 129 257 127 46 196 193 46 196 193 325 329 325 225 225 329 316 17 109 17 59 24 59 291 24 291 312 226 319 312 284 262 262 144 244 10 244 12 226 252 255 62 255 65 110 51 53 110 171 298 171 267 314 170 314 161 217 47 302 47 315 102 315 275 295 201 202 295 316 18 289 316 289 18 31 43 101 73 45 31 45 43 27 268 140 314 81 325 29 276 49 29 49 276 129 229 164 191 191 165 255 244 35 85 155 35 167 330 301 330 250 42 154 328 280 310 311 280 301 303 239 134 207 318 124 331 123 331 8 159 171 16 297 28 23 28 76 187 269 184 322 55 188 322 320 207 131 13 218 281 258 281 258 218 222 27 22 222 29 50 213 12 12 212 29 299 330 323 306 323 330 306 292 155 292 5 327 18 105 145 82 214 281 153 98 281 313 40 305 249 274 305 249 274 261 307 104 294 233 294 268 28 37 71 37 79 310 281 332 149 275 332 283 327 259 329 329 270 220 326 326 73 151 41 285 151 333 106 258 106 258 333 317 120 30 334 42 334 233 256 196 191 76 260 219 260 334 265 334 323 289 324 325 289 332 151 197 131 165 131 80 202 80 66 233 172 142 199 38 60 71 38 129 234 234 315 223 325 300 293 328 293 96 296 303 322 223 316 289 223 228 92 92 287 323 250 42 323 208 273 208 143 11 163 210 285 326 74 146 335 335 107 250 236 137 185 137 99 322 330 330 303 39 180 312 261 307 312 246 276 137 6 183 171 131 250 236 131 59 26 135 152 294 103 230 275 329 288 94 244 180 332 231 332 180 231 240 251 249 297 137 311 311 185 262 220 40 259 157 291 275 231 39 332 317 248 12 178 73 8 335 106 173 233 39 151 68 193 330 166 283 89 8 75 151 210 37 208 37 273 51 316 11 232 266 248 317 266 87 295 193 95 50 334 30 50 219 258 92 238 329 58 333 335 333 281 281 335 278 266 188 242 175 188 303 125 296 226 304 290 201 298 262 336 336 220 227 240 199 144 200 144 104 315 36 208 2 241 32 241 144 189 294 231 103 231 8 206 85 34 40 271 63 162 308 21 173 234 234 128 24 280 82 164 47 299 224 202 178 213 177 213 17 201 201 109 335 153 246 331 123 246 189 200 221 336 336 284 237 100 237 115 2 328 328 241 109 66 21 156 256 129 276 331 176 241 267 183 12 232 148 100 327 89 265 50 45 196 255 94 252 181 226 181 112 200 174 76 232 212 239 269 309 138 309 137 52 121 203 222 192 8 239 271 40 239 53 108 3 328 92 308 156 308 106 117 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 75 85 86 87 88 89 90 91 92 93 94 95 43 96 97 98 99 100 101 102 18 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 61 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 79 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 92 192 193 194 195 63 196 197 198 199 200 201 8 202 203 21 26 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 99 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 111 243 244 152 245 246 247 248 249 250 91 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 110 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 165 36 290 291 292 293 129 142 68 294 295 230 296 297 233 298 299 300 262 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 19 34 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 113 341 342 343 344 216 345 346 347 348 349 344 59 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 231 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 337 392 393 394 395 396 397 398 220 399 400 401 136 402 177 403 326 87 404 327 405 406 149 223 407 211 408 409 410 411 393 412 413 275 249 414 415 416 417 418 419 420 421 422 423 424 335 295 425 426 427 428 73 429 430 431 60 432 433 434 435 405 436 437 438 439 362 440 128 441 442 443 127 444 445 446 447 448 449 450 368 218 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 427 466 467 2 203 402 237 308 468 469 470 209 471 441 472 25 473 474 475 476 374 477 478 479 480 481 482 483 484 485 486 487 440 488 489 490 158 257 284 491 492 493 494 495 434 496 497 498 499 500 501 502 503 504 341 5 505 506 507 508 509 510 384 484 511 512 513 514 515 516 517 436 518 519 520 53 521 522 523 524 525 438 526 478 97 138 527 528 529 260 530 16 531 347 178 532 533 534 535 536 537 538 539 428 540 541 542 251 543 544 545 400 546 547 361 548 549 546 135 411 248 180 293 550 51 290 551 552 45 553 554 555 556 285 557 342 558 559 560 537 561 562 563 564 565 566 567 133 201 258 568 569 570 120 394 571 572 206 244 573 366 166 574 575 576 577 489 578 227 579 580 581 582 583 584 32 585 513 586 550 587 379 588 250 589 590 591 592 593 594 207 541 595 596 597 459 598 101 599 15 167 577 600 276 601 602 96 594 90 398 603 604 605 606 607 608 375 609 610 553 108 611 266 377 46 356 612 613 614 367 615 616 617 618 619 94 620 125 621 622 623 624 625 81 171 474 626 627 628 629 259 604 630 631 245 632 633 634 86 422 281 542 572 635 636 470 107 147 64 637 638 639 640 298 117 387 641 642 643 468 644 645 643 646 647 168 648 649 650 651 652 549 653 318 265 654 655 656 657 488 658 659 660 479 661 173 579 633 319 307 98 647 662 102 194 184 663 461 664 665 360 536 77 65 666 442 431 667 668 669 304 450 670 240 671 672 673 674 675 676 460 523 677 678 679 417 680 483 315 681 83 140 682 683 684 685 624 686 687 666 688 522 419 492 689 690 352 519 691 188 692 403 693 600 694 390 409 444 695 696 697 671 62 698 699 631 700 701 702 703 555 704 311 705 706 707 708 709 710 217 471 316 529 711 268 170 712 713 463 82 714 715 150 716 717 718 719 720 721 722 723 724 622 725 726 727 728 628 729 661 730 731 732 12 733 329 380 734 735 736 581 737 738 55 179 701 130 739 740 697 399 741 742 743 704 744 448 745 746 747 748 271 749 750 751 17 723 749 33 752 552 500 753 589 752 754 755 239 756 432 649 742 757 721 758 328 759 760 761 332 618 762 212 763 764 364 391 765 114 9 132 190 766 767 768 653 769 47 376 770 771 187 710 595 772 773 548 560 774 355 157 775 776 685 557 777 778 143 200 7 779 221 780 104 781 782 676 699 169 783 433 784 672 350 785 786 454 320 784 787 642 776 788 153 13 789 790 791 792 793 28 52 760 794 303 795 796 797 759 535 798 799 800 191 801 802 751 706 803 392 804 202 89 805 670 559 806 807 652 808 42 809 810 811 696 812 574 813 814 338 30 815 756 816 84 817 807 818 597 819 449 820 705 562 821 736 446 69 822 494 823 824 825 499 186 509 485 826 480 827 828 829 830 831 623 137 832 551 833 834 814 508 772 818 464 764 835 264 836 681 837 659 838 839 677 840 841 842 182 819 843 844 263 272 845 846 306 214 599 834 395 847 848 711 254 849 76 850 851 617 852 853 324 758 854 855 709 856 310 691 630 786 857 750 858 859 860 861 657 770 862 863 864 477 865 469 866 10 627 867 638 825 868 78 869 176 870 261 486 349 871 343 565 582 71 279 299 719 629 872 873 242 857 874 875 588 650 876 181 388 447 877 878 812 429 413 695 635 654 835 369 879 761 163 6 880 386 515 418 222 309 881 871 882 883 112 873 880 481 95 673 725 27 884 512 160 885 813 118 886 887 746 616 888 678 720 105 732 889 890 891 892 651 893 613 811 687 894 895 872 896 312 457 353 744 554 50 415 897 501 601 898 437 504 854 545 502 801 358 451 458 533 195 899 726 891 820 900 890 876 901 863 839 833 373 902 831 733 903 365 753 904 116 841 859 853 357 490 155 121 905 870 906 847 225 907 842 901 908 72 528 215 768 909 910 475 139 288 416 620 911 904 80 615 573 757 827 867 912 482 575 639 913 914 864 858 915 325 909 800 566 544 505 802 397 716 407 336 916 866 902 917 918 919 602 517 920 274 908 161 511 199 921 922 832 856 606 109 547 837 923 100 924 354 689 888 925 926 927 928 462 540 929 930 931 664 561 146 932 443 810 570 41 850 816 767 381 359 933 728 607 934 568 563 576 675 935 926 905 828 897 936 937 219 614 741 253 645 668 938 331 656 939 940 269 941 745 119 882 610 154 378 938 893 208 648 14 556 466 942 608 877 412 35 943 944 731 414 945 506 946 333 611 920 718 892 947 232 948 911 283 619 514 949 54 88 323 898 950 495 636 66 951 688 58 291 334 900 887 952 22 694 878 729 640 953 224 954 498 955 727 956 305 805 922 794 31 141 210 951 156 278 456 593 899 197 947 946 886 939 848 174 743 957 534 958 748 516 708 558 543 229 959 960 961 962 724 363 85 538 806 963 928 339 906 953 778 964 965 840 679 491 852 941 340 940 945 966 605 348 883 527 625 641 967 968 526 351 930 383 789 313 465 74 235 255 969 131 970 943 971 972 973 962 273 145 974 193 975 715 396 226 931 247 40 426 162 773 497 895 915 621 737 777 452 976 690 126 569 849 198 196 302 296 960 389 183 912 370 586 385 944 977 580 978 740 881 916 979 11 739 531 780 798 874 660 520 924 860 590 115 980 797 957 585 44 826 907 148 204 713 280 70 846 382 37 57 754 584 49 532 980 969 445 123 973 803 981 103 936 730 968 838 982 921 717 983 48 472 703 824 766 949 38 769 774 875 791 923 314 300 603 843 735 106 984 964 976 879 985 986 734 487 270 987 958 404 845 795 959 903 4 289 93 965 371 510 144 185 23 836 634 988 755 983 267 626 986 297 796 979 989 192 598 453 241 596 896 775 455 990 991 164 992 804 122 175 294 423 993 292 987 966 530 935 961 56 682 993 972 855 503 151 851 954 592 992 496 669 644 646 637 884 205 977 665 228 39 913 942 919 747 674 862 567 799 994 693 793 914 817 439 632 410 20 256 779 995 910 981 821 868 702 346 967 317 937 790 927 830 918 467 684 680 991 591 655 243 609 996 950 997 425 301 989 763 956 252 408 683 998 934 707 493 236 430 978 765 984 889 282 995 948 521 982 420 808 612 997 518 330 933 975 507 762 286 865 172 932 712 700 435 996 990 345 970 159 322 792 238 583 424 67 788 213 844 663 885 539 999 692 771 1000 662 1001 783 988 246 869 963 189 823 698 925 952 1001 974 999 971 3 861 1000 578 29 24 782 571 134 1002 473 955 714 1002 401 829 234 985 587 815 781 686 998 738 124 809 476 564 525 372 894 785 421 658 321 277 994 524 929 917 787 287 667 822 722 406 gts-snapshot-121130/test/boolean/surfaces/t270000644000175100017510000000033712055775440015744 000000000000008 18 2 0 -1.63299 -1.5 -1.63299 0 -1.5 0 1.63299 -1.5 1.63299 0 -1.5 0 -1.63299 1.1547 -1.63299 0 1.1547 0 1.63299 1.1547 1.63299 0 1.1547 3 1 2 1 6 1 2 6 2 7 3 2 3 7 3 8 4 3 4 8 5 1 4 5 1 4 6 5 7 6 5 8 7 5 8 7 6 1 2 4 2 3 gts-snapshot-121130/test/boolean/surfaces/cube80000644000175100017510000000103112055775440016326 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex 2.876285154e-07 -1.632989974 -1.500000029 1.632990003 3.111904603e-07 -1.499999997 2.829951898e-07 -1.63299002 1.154699971 1.632989998 2.648572046e-07 1.154700003 -2.823925276e-07 1.632990026 -1.499999971 -2.870258532e-07 1.63298998 1.154700029 -1.632989997 -2.588305827e-07 -1.500000003 -1.632990002 -3.051638383e-07 1.154699997 1 2 2 3 3 1 2 4 3 4 2 5 5 4 5 6 4 6 5 7 7 6 7 8 6 8 8 3 8 1 7 1 5 1 6 3 1 2 3 4 5 2 6 7 4 8 9 7 10 11 8 12 13 11 14 15 3 12 16 15 10 17 16 6 1 17 9 18 5 13 14 18 gts-snapshot-121130/test/boolean/surfaces/b10.gts0000644000175100017510000000016512055775440016505 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex -1 1 1 0 0 2 3 -3 1 3 1 1 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/b8.gts0000644000175100017510000000016712055775440016436 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 3 -3 1 3 1 1 -1 1 1 -1 -1 4 1 2 3 1 2 3 3 4 1 4 2 4 1 2 3 4 2 5 6 3 4 5 1 6 gts-snapshot-121130/test/boolean/surfaces/t110000644000175100017510000000010112055775440015722 000000000000003 3 1 0 -1 0 G -1 0 -1 E -1 0 1 F 1 2 GE 2 3 EF 3 1 GF 1 2 3 GEF gts-snapshot-121130/test/boolean/surfaces/b24.gts0000644000175100017510000000016312055775440016510 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 0 3 1 0 0 4 0 0 1 1 0 1 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/t290000644000175100017510000000013712055775440015744 000000000000004 5 2 -1 0 0 A 0 0 0 B 0 -1 0 C 0 0 1 D 1 2 AB 2 4 BD 4 1 DA 2 3 BC 3 4 CD 1 2 3 ABD 4 5 2 BCD gts-snapshot-121130/test/boolean/surfaces/t200000644000175100017510000000015112055775440015727 000000000000004 5 2 0 1 0.5 E 0 -1 0.5 F 0 -1 -0.5 G 0 1 -0.5 H 1 2 EF 2 3 FG 3 4 GH 4 1 HE 1 3 EG 1 2 5 EFG 3 4 5 GHE gts-snapshot-121130/test/boolean/surfaces/sphere.gts0000644000175100017510000002236412055775440017416 00000000000000146 432 288 0.05111 1.11177 1.5 0.14496 1.02165 1.06982 0 1.5 1.5 0.20096 0.75 1.5 0.05111 1.5 1.11177 0.14496 1.02165 1.93018 0.05111 1.5 1.88823 0.37939 0.60236 1.06585 0.05111 1.88823 1.5 0.20096 1.5 0.75 0.43934 0.43934 1.5 0.36046 0.97447 0.67825 0.37939 0.60236 1.93415 0.14496 1.97835 1.06982 0.20096 1.5 2.25 0.36046 0.97447 2.32175 0.14496 1.97835 1.93018 0.43934 1.5 0.43934 0.71275 0.29386 1.08111 0.20096 2.25 1.5 0.67842 0.55132 0.67842 0.75 0.20096 1.5 0.71275 0.29386 1.91889 0.36046 2.02553 0.67825 0.67825 0.97447 0.36046 0.67842 0.55132 2.32158 0.43934 1.5 2.56066 0.36046 2.02553 2.32175 0.37939 2.39764 1.06585 0.67825 0.97447 2.63954 0.37939 2.39764 1.93415 0.75 1.5 0.20096 0.43934 2.56066 1.5 1.09911 0.11127 1.09911 1.08111 0.29386 0.71275 0.67825 2.02553 0.36046 1.11177 0.05111 1.5 1.06585 0.60236 0.37939 1.09911 0.11127 1.90089 1.08111 0.29386 2.28725 0.75 1.5 2.79904 0.67842 2.44868 0.67842 1.06982 1.02165 0.14496 0.67825 2.02553 2.63954 1.06585 0.60236 2.6206 0.67842 2.44868 2.32158 0.71275 2.70614 1.08111 1.11177 1.5 0.05111 1.06982 1.02165 2.85504 0.71275 2.70614 1.91889 0.75 2.79904 1.5 1.06982 1.97835 0.14496 1.5 0.05111 1.11177 1.5 0 1.5 1.5 0.20096 0.75 1.5 0.05111 1.88823 1.5 0.43934 0.43934 1.11177 1.5 2.94889 1.06585 2.39764 0.37939 1.5 0.20096 2.25 1.5 0.75 0.20096 1.06982 1.97835 2.85504 1.5 0.43934 2.56066 1.5 1.11177 0.05111 1.08111 2.70614 0.71275 1.06585 2.39764 2.6206 1.5 0.75 2.79904 1.5 1.5 0 1.09911 2.88873 1.09911 1.08111 2.70614 2.28725 1.09911 2.88873 1.90089 1.11177 2.94889 1.5 1.5 1.11177 2.94889 1.5 1.88823 0.05111 1.88823 0.05111 1.5 1.90089 0.11127 1.09911 1.91889 0.29386 0.71275 1.90089 0.11127 1.90089 1.5 1.5 3 1.5 2.25 0.20096 1.93415 0.60236 0.37939 1.91889 0.29386 2.28725 1.5 1.88823 2.94889 1.5 2.56066 0.43934 1.93018 1.02165 0.14496 1.5 2.25 2.79904 1.5 2.79904 0.75 1.93415 0.60236 2.6206 1.88823 1.5 0.05111 1.5 2.56066 2.56066 1.5 2.94889 1.11177 1.5 2.79904 2.25 1.5 3 1.5 1.5 2.94889 1.88823 1.93018 1.02165 2.85504 2.25 0.20096 1.5 2.28725 0.29386 1.08111 1.93018 1.97835 0.14496 1.88823 1.5 2.94889 2.28725 0.29386 1.91889 2.32158 0.55132 0.67842 1.93415 2.39764 0.37939 2.32175 0.97447 0.36046 1.93018 1.97835 2.85504 2.32158 0.55132 2.32158 2.25 1.5 0.20096 1.91889 2.70614 0.71275 1.90089 2.88873 1.09911 1.93415 2.39764 2.6206 1.88823 2.94889 1.5 2.32175 0.97447 2.63954 1.91889 2.70614 2.28725 1.90089 2.88873 1.90089 2.56066 0.43934 1.5 2.25 1.5 2.79904 2.6206 0.60236 1.06585 2.32175 2.02553 0.36046 2.6206 0.60236 1.93415 2.63954 0.97447 0.67825 2.56066 1.5 0.43934 2.32158 2.44868 0.67842 2.32175 2.02553 2.63954 2.63954 0.97447 2.32175 2.28725 2.70614 1.08111 2.25 2.79904 1.5 2.32158 2.44868 2.32158 2.79904 0.75 1.5 2.28725 2.70614 1.91889 2.56066 1.5 2.56066 2.85504 1.02165 1.06982 2.63954 2.02553 0.67825 2.79904 1.5 0.75 2.85504 1.02165 1.93018 2.6206 2.39764 1.06585 2.63954 2.02553 2.32175 2.56066 2.56066 1.5 2.79904 1.5 2.25 2.94889 1.11177 1.5 2.6206 2.39764 1.93415 2.94889 1.5 1.11177 2.85504 1.97835 1.06982 2.94889 1.5 1.88823 2.79904 2.25 1.5 3 1.5 1.5 2.85504 1.97835 1.93018 2.94889 1.88823 1.5 68 64 64 48 48 68 68 74 74 89 89 68 48 74 89 64 48 43 43 32 32 48 61 43 43 64 64 61 74 52 52 80 80 74 85 64 89 85 48 52 32 52 106 85 89 106 74 98 98 89 85 61 80 98 98 106 38 25 25 43 43 38 61 38 117 106 98 117 102 117 98 102 25 32 80 102 59 80 52 59 106 103 103 85 81 61 85 81 52 36 36 59 103 81 32 36 120 103 106 120 59 84 84 80 84 102 117 120 81 57 57 61 57 38 25 18 18 32 18 36 18 24 24 36 21 12 12 25 25 21 131 120 117 131 121 131 117 121 12 18 101 81 103 101 103 119 119 101 24 42 42 36 120 119 102 121 42 59 38 21 57 35 35 38 35 21 107 121 102 107 84 107 77 57 81 77 101 77 65 84 59 65 42 65 10 24 18 10 87 107 84 87 77 55 55 57 65 87 132 119 120 132 12 10 131 132 55 35 116 101 119 116 29 42 24 29 130 116 119 130 132 130 14 29 24 14 10 14 131 134 134 141 141 131 121 134 2 10 12 2 12 8 8 2 141 132 21 8 124 134 121 124 35 19 19 21 19 8 107 124 47 65 42 47 29 47 97 77 101 97 116 97 76 55 77 76 87 108 108 107 97 76 55 34 34 35 108 124 69 87 65 69 47 69 34 19 140 130 132 140 76 53 53 55 91 108 87 91 141 140 69 91 53 34 5 14 10 5 2 5 14 20 20 29 4 2 8 4 130 127 127 116 19 11 11 8 11 4 134 136 136 143 143 134 33 47 29 33 124 136 143 141 114 97 116 114 127 114 20 33 4 1 1 2 9 20 14 9 5 9 140 138 138 130 138 127 1 5 143 146 146 141 146 140 19 22 22 11 96 76 97 96 51 69 47 51 124 125 125 136 33 51 34 22 108 125 114 96 75 53 76 75 72 91 69 72 34 37 37 22 53 37 91 110 110 108 110 125 51 72 96 75 53 54 54 37 91 93 93 110 146 144 144 140 72 93 1 3 3 5 144 138 75 54 3 9 145 146 143 145 139 145 143 139 39 22 37 39 142 144 146 142 145 142 23 11 22 23 138 142 142 133 133 138 39 23 56 37 54 56 23 13 13 11 127 133 133 118 118 127 72 94 94 93 51 71 71 72 118 100 100 114 114 118 136 139 136 128 128 139 71 94 56 39 33 50 50 51 50 71 125 128 125 113 113 128 9 17 17 20 17 31 31 20 100 78 78 96 96 100 110 113 110 94 94 113 13 4 13 6 6 4 78 56 56 75 75 78 31 50 33 31 3 7 7 9 1 7 6 7 1 6 7 17 71 92 92 94 145 137 137 142 15 17 7 15 78 60 60 56 92 113 6 15 137 133 60 39 60 40 40 39 40 23 92 112 112 113 112 128 82 60 78 82 100 82 50 70 70 71 70 92 112 126 126 128 26 13 23 26 40 26 126 139 46 70 50 46 105 82 100 105 118 105 31 46 15 28 28 17 137 123 123 133 28 31 123 118 135 137 145 135 16 15 6 16 139 135 13 16 26 16 123 105 28 46 126 135 129 123 137 129 90 112 92 90 16 27 27 15 135 129 63 40 60 63 70 90 27 28 82 63 46 66 66 70 45 26 40 45 88 63 82 88 90 109 109 112 63 45 66 90 109 126 105 88 44 66 46 44 45 30 30 26 122 135 126 122 109 122 111 88 105 111 123 111 30 16 28 44 122 129 30 27 129 111 27 44 30 41 41 27 41 44 66 86 86 90 67 45 63 67 115 111 129 115 122 115 86 109 88 67 44 62 62 66 104 122 109 104 86 104 49 30 45 49 111 95 95 88 62 86 95 67 67 49 104 115 115 95 41 62 49 41 104 99 99 115 99 95 62 83 83 86 95 73 73 67 49 58 58 41 83 104 58 62 73 49 83 99 99 73 58 83 73 58 58 79 79 83 99 79 79 73 1 2 3 4 5 6 7 4 3 8 1 6 9 10 11 12 13 14 15 16 17 18 8 19 15 7 20 21 20 11 22 19 23 5 24 25 18 26 14 27 24 17 25 28 23 2 13 9 29 30 31 12 32 31 33 28 34 35 34 36 37 10 30 27 38 36 39 16 40 22 41 42 43 26 44 45 46 40 42 47 44 21 48 45 49 41 50 39 51 52 53 38 52 33 54 50 43 55 56 57 32 56 37 58 59 60 48 59 60 61 62 63 64 65 66 54 67 68 67 69 70 58 64 71 47 72 73 74 72 62 75 76 49 77 73 35 78 69 79 46 76 29 80 65 57 81 82 83 80 82 84 78 85 53 86 85 87 55 88 71 89 88 90 51 91 79 92 91 93 61 94 95 86 96 87 97 98 90 99 96 100 77 101 70 102 94 66 103 101 104 81 98 105 74 106 107 75 108 109 106 110 100 111 110 112 108 113 93 114 113 115 116 117 68 118 115 119 102 120 121 122 120 123 103 117 63 124 121 125 118 126 83 127 128 129 124 128 84 130 126 131 92 132 107 133 132 134 89 135 105 136 135 137 97 138 95 139 140 134 141 138 104 142 143 144 130 140 145 99 146 131 147 146 148 127 143 149 111 150 137 151 152 153 139 154 123 155 150 145 156 154 157 142 152 158 114 159 119 160 159 112 161 162 163 122 164 109 165 166 129 167 168 168 169 164 170 171 172 173 133 174 125 175 170 176 116 172 177 136 178 179 178 166 180 174 162 163 181 182 183 161 184 158 185 184 149 186 187 188 165 187 189 160 182 176 190 191 192 155 191 193 194 167 195 141 196 197 147 198 199 200 175 201 198 173 148 202 193 144 203 199 204 196 177 205 151 206 207 156 208 209 210 202 157 211 209 153 212 213 213 214 203 215 208 197 216 206 195 217 218 211 219 220 212 192 221 222 223 219 207 189 224 225 226 186 222 227 217 205 228 185 225 229 190 230 231 230 232 233 210 234 235 221 236 237 236 229 238 194 239 240 241 242 226 235 240 233 243 239 244 218 245 238 246 247 248 249 250 188 242 248 223 251 252 215 253 254 255 256 257 232 171 258 259 260 258 261 251 254 244 262 234 179 250 257 201 263 264 265 253 264 259 200 266 267 268 266 183 269 270 270 271 272 273 274 275 267 214 276 277 278 276 279 169 247 277 220 252 204 256 275 280 281 279 282 283 284 285 263 286 228 287 288 216 274 284 227 283 245 287 224 289 290 289 291 180 272 286 291 181 281 288 292 269 261 293 294 237 295 296 297 292 298 282 299 300 301 278 294 290 302 298 303 241 296 304 262 300 304 305 306 307 243 306 301 308 309 310 268 309 311 299 312 273 313 312 265 314 315 316 293 315 310 317 318 319 246 320 307 321 320 322 260 318 323 314 324 325 313 326 255 327 326 285 328 324 297 329 330 303 331 332 333 271 330 334 249 332 335 295 336 337 302 338 231 339 336 280 340 338 319 341 340 342 327 334 343 328 333 322 344 339 345 331 346 347 308 348 337 349 350 335 351 346 352 305 353 316 354 348 355 329 350 311 356 353 323 357 358 359 321 360 361 356 362 347 363 364 352 365 360 366 354 358 367 317 364 325 368 362 369 357 370 359 371 372 373 344 374 367 375 374 376 368 377 342 378 377 379 341 372 343 380 370 381 351 373 382 349 379 345 383 378 355 384 380 382 385 386 387 384 386 366 388 389 390 365 391 392 383 393 381 394 393 395 363 389 361 396 391 369 397 398 399 375 400 395 401 400 402 371 403 376 404 405 406 388 398 407 396 405 390 408 403 409 394 399 392 410 404 387 411 397 412 385 402 409 413 414 415 410 414 406 416 417 407 418 419 412 420 421 422 401 417 423 411 421 424 408 419 425 413 422 415 426 418 423 427 416 428 420 424 427 429 430 426 431 432 429 428 432 431 425 430 gts-snapshot-121130/test/boolean/surfaces/t190000644000175100017510000000013712055775440015743 000000000000004 5 1 1 0 0 A 0 1 0 B -1 0 0 C 0 -1 0 D 1 2 AB 2 3 BC 3 4 CD 4 1 DA 2 4 BD 1 5 4 ABD 2 3 5 BCD gts-snapshot-121130/test/boolean/surfaces/t140000644000175100017510000000046412055775440015741 000000000000008 18 4 0 -1.63299 -1.1547 A -1.63299 0 -1.1547 D 0 1.63299 -1.1547 C 1.63299 0 -1.1547 B 0 -1.63299 1.1547 F -1.63299 0 1.1547 E 0 1.63299 1.1547 1.63299 0 1.1547 3 1 CA 2 1 DA 6 1 EA 2 6 DE 2 7 3 2 CD 3 7 3 8 4 3 BC 4 8 5 1 FA 4 5 BF 1 4 AB 6 5 EF 7 6 5 8 7 5 8 7 9 13 1 ABC 6 1 2 ACD 4 2 3 ADE 14 3 11 EAF gts-snapshot-121130/test/boolean/surfaces/t130000644000175100017510000000014112055775440015730 000000000000004 5 2 0 -1 0 D 0 0 -1 E 0 0 1 F 0 1.5 0 G 1 2 DE 2 3 EF 3 1 FD 4 2 GE 4 3 GF 1 2 3 DEF 5 2 4 GEF gts-snapshot-121130/test/boolean/surfaces/1.gts0000644000175100017510000027556012055775440016300 000000000000001207 3615 2410 0.000139 3.702301 -4.076366 0.000191 6.453524 0.000648 0.000189 6.403917 0.000653 -9.998696 -0.157139 -2.855559 -9.998923 -0.143823 -2.870679 0.000060 1.559853 -1.778870 0.200214 9.997995 -100.000000 0.374673 9.992979 -100.000000 4.324851 4.721829 -99.999001 9.880870 1.538961 0.000000 9.906224 1.366281 0.000000 9.906224 1.366281 -100.000000 8.001794 5.997609 -100.000000 8.105246 5.857047 -100.000000 8.001794 5.997609 0.000000 0.000161 5.452029 0.000729 3.182867 5.556020 0.001000 0.000160 5.412415 0.000731 5.172388 8.558410 -100.000000 5.320966 8.466838 -100.000000 5.172388 8.558410 0.000000 -3.231376 9.463520 -10.387163 -3.231376 9.463520 -100.000000 -3.226210 9.465235 -10.387268 0.000144 4.840078 0.000752 0.000143 4.826258 0.000752 -9.262182 3.769877 -100.000000 -9.194978 3.930951 -100.000000 -3.396046 9.405683 -10.381069 -3.396046 9.405683 -100.000000 -3.391016 9.407450 -10.381255 -9.122947 4.095245 -7.058693 -9.124973 4.090826 -100.000000 -9.119832 4.102033 -7.064491 -6.825686 7.307889 -9.454682 -6.916147 7.222486 -9.400959 -6.801169 7.331037 -100.000000 0.000062 2.049540 0.000707 0.000060 1.973274 0.000704 -7.857990 6.184685 -8.705426 -7.864263 6.176841 -100.000000 -7.854770 6.188712 -8.708243 4.825609 -8.758624 0.000000 4.672013 -8.841509 0.000000 4.672013 -8.841509 -100.000000 -9.906549 -1.363775 -1.448151 -9.906224 -1.366281 -100.000000 -9.928559 -1.193185 -100.000000 0.000263 7.063034 -7.378944 -7.406743 6.718509 -9.072204 -7.403501 6.722028 -9.074549 0.000103 3.445934 0.000750 0.000101 3.395541 0.000749 0.000221 7.494859 0.000504 0.000219 7.418353 0.000516 -6.838752 -7.295989 -100.000000 -6.965043 -7.175524 -100.000000 -6.838752 -7.295989 0.000000 -3.499120 -0.916010 0.000418 -8.206232 -5.714698 0.000000 -3.305774 -0.865176 0.000430 -9.555504 2.948279 -100.000000 -9.502595 3.114597 -100.000000 -7.755264 6.313152 -8.795284 1.538961 -9.880870 0.000000 1.366281 -9.906224 0.000000 1.366281 -9.906224 -100.000000 -1.244192 -9.922297 0.000000 -1.417172 -9.899072 0.000000 -1.417172 -9.899072 -100.000000 -0.200214 -9.997995 -100.000000 -0.374673 -9.992979 -100.000000 9.984918 -0.549018 -100.000000 9.973815 -0.723194 -100.000000 9.665876 2.563363 -100.000000 9.709141 2.394278 -100.000000 9.665876 2.563363 0.000000 9.928559 1.193185 0.000000 0.000306 8.221130 -8.440147 -6.531766 7.571923 -9.609806 -6.528392 7.574790 -9.611441 9.652575 -2.613003 0.000000 9.605503 -2.781064 0.000000 8.558410 -5.172388 0.000000 8.466838 -5.320966 0.000000 -7.643902 6.447538 -8.888225 -7.745461 6.324982 -8.803466 -0.828235 9.965502 -10.183933 -0.671932 9.977401 -100.000000 -0.671932 9.977401 -10.152991 5.714698 -8.206232 -100.000000 5.570608 -8.304716 -100.000000 9.872832 -1.589719 0.000000 9.843583 -1.761781 0.000000 9.555504 -2.948279 0.000000 9.502595 -3.114597 0.000000 9.502595 -3.114597 -100.000000 9.928559 1.193185 -100.000000 9.947871 1.019728 -100.000000 9.145875 4.043881 0.000000 9.215057 3.883647 0.000000 0.000026 0.778664 0.000650 0.000022 0.666653 0.000644 -7.523026 6.588042 -8.984190 -7.519790 6.591680 -8.986646 -3.559680 9.344980 -100.000000 2.053977 -9.786785 0.000000 1.882860 -9.821142 0.000000 1.882860 -9.821142 -100.000000 7.448616 6.672190 0.000000 7.563929 6.541175 0.000000 7.563929 6.541175 -100.000000 -1.001975 9.949535 -10.215985 -0.845957 9.964154 -100.000000 -0.845957 9.964154 -10.187443 -9.984918 0.549018 -100.000000 -9.973815 0.723194 -100.000000 -8.168208 5.768711 -8.402502 -8.176756 5.756795 -100.000000 -8.075040 5.898622 -100.000000 6.838752 7.295989 0.000000 6.965043 7.175524 0.000000 6.965043 7.175524 -100.000000 -7.563929 -6.541175 -100.000000 -7.676936 -6.408171 -100.000000 -9.073906 -4.202882 -100.000000 -9.145875 -4.043881 -100.000000 -6.447538 -7.643902 0.000000 -6.579959 -7.530214 0.000000 -6.579959 -7.530214 -100.000000 -7.864263 6.176841 -8.699941 -8.459240 5.332824 -8.069088 -8.466838 5.320966 -100.000000 -8.372684 5.467923 -100.000000 9.388106 -3.444336 0.000000 9.326566 -3.607656 0.000000 -5.320966 -8.466838 -100.000000 -5.467923 -8.372684 -100.000000 -5.320966 -8.466838 0.000000 0.000012 0.307478 0.000626 0.000008 0.179256 0.000619 -4.512758 8.923800 -10.263165 -4.516995 8.921700 -100.000000 -4.360604 8.999174 -100.000000 9.405683 3.396046 -100.000000 9.463520 3.231376 -100.000000 7.295989 -6.838752 0.000000 7.175524 -6.965043 0.000000 0.000168 5.693738 0.000715 0.000169 5.711062 0.000713 -9.842004 1.770184 -4.899440 -9.843583 1.761781 -100.000000 -9.843583 1.761781 -4.891043 -6.710379 -7.414231 -100.000000 -9.999907 0.031050 -3.068635 -9.999967 0.025694 -100.000000 -9.997995 0.200214 -100.000000 6.541175 -7.563929 -100.000000 6.408171 -7.676936 -100.000000 1.193185 -9.928559 -100.000000 1.019728 -9.947871 -100.000000 -4.186486 9.081328 -10.311906 -4.043881 9.145875 -100.000000 -4.198445 9.075914 -10.310428 -7.288203 6.846914 -9.157717 -7.295989 6.838752 -100.000000 -7.284955 6.850320 -9.159956 -9.049885 4.254254 -7.194469 -9.052189 4.249455 -100.000000 -9.046749 4.260784 -7.200007 9.696710 -2.444142 0.000000 9.652575 -2.613003 -100.000000 9.326566 -3.607656 -100.000000 9.262182 -3.769877 -100.000000 7.052875 -7.089214 0.000000 6.928077 -7.211223 0.000000 6.928077 -7.211223 -100.000000 -2.781064 -9.605503 0.000000 -2.948279 -9.555504 0.000000 -2.948279 -9.555504 -100.000000 -0.122871 -0.028322 0.000604 -5.022235 -8.647378 0.000000 -0.028847 -0.003600 0.000609 0.000022 0.519028 -0.602425 0.025694 9.999967 -5.378673 0.000362 9.999811 -8.784371 0.000343 9.999811 -6.449280 -5.987275 8.009399 -9.851478 -6.122756 7.906274 -9.796412 8.841509 4.672013 -100.000000 8.921700 4.516995 -100.000000 -9.958985 0.904118 -4.010990 -9.942501 1.070836 -100.000000 -9.956397 0.930292 -4.038787 0.000100 2.621056 -2.936966 0.000110 3.688524 0.000755 0.000109 3.641173 0.000754 0.000310 9.999810 -2.024125 0.000291 8.968504 -3.570602 0.000221 5.923634 -6.297699 0.000156 5.255214 0.000738 0.000155 5.216143 0.000740 -9.555104 2.949534 -6.036401 -9.555504 2.948279 -6.035238 8.176756 -5.756795 -100.000000 8.075040 -5.898622 -100.000000 8.176756 -5.756795 0.000000 0.140517 9.207457 -3.874863 0.200214 9.997995 -5.210624 0.209289 9.997735 -5.201606 -9.605283 2.781799 -5.880026 -9.605503 2.781064 -100.000000 -9.605503 2.781064 -5.879342 0.000038 1.196312 0.000670 0.000040 1.289713 0.000674 0.000100 3.344461 0.000748 2.563363 -9.665876 0.000000 2.394278 -9.709141 0.000000 -9.897878 1.425026 -4.551945 -9.899072 1.417172 -100.000000 -9.899072 1.417172 -4.544015 2.899136 -9.570528 0.000000 2.731665 -9.619668 0.000000 2.731665 -9.619668 -100.000000 -9.999967 0.025694 -3.062600 0.549018 9.984918 -4.858659 0.383440 9.992573 -5.028286 -9.811336 1.933306 -100.000000 -9.776102 2.104243 -100.000000 3.065722 -9.518474 -100.000000 2.899136 -9.570528 -100.000000 -2.274539 -9.737887 -100.000000 -2.444142 -9.696710 -100.000000 6.273214 -7.787604 0.000000 6.136346 -7.895901 0.000000 6.136346 -7.895901 -100.000000 -7.211223 -6.928077 -100.000000 -7.331037 -6.801169 -100.000000 -7.643902 6.447538 -100.000000 0.000349 9.397575 -9.480972 -8.565605 -2.232899 0.000079 -9.518474 -3.065722 0.000000 -9.570528 -2.899136 0.000000 2.274539 9.737887 0.000000 2.444142 9.696710 0.000000 2.444142 9.696710 -100.000000 9.999967 -0.025694 -100.000000 9.997995 -0.200214 -100.000000 -5.114643 8.592898 -10.134728 -5.113075 8.593816 -10.135122 8.304716 5.570608 0.000000 8.400671 5.424824 0.000000 8.400671 5.424824 -100.000000 -0.374673 -9.992979 0.000000 -0.549018 -9.984918 0.000000 0.000180 4.803276 -5.196724 -9.262182 3.769877 -6.777987 -9.322288 3.618437 -6.646017 0.000298 9.999810 -0.490231 0.000299 9.999810 -0.627502 0.025694 9.999967 0.000000 0.000142 4.787031 0.000753 -8.584878 -5.128340 -100.000000 -8.673072 -4.977731 -100.000000 -8.584878 -5.128340 0.000000 -4.717387 -8.817384 0.000000 -4.870554 -8.733710 0.000000 0.000019 0.550932 0.000638 0.000015 0.431286 0.000632 -2.224467 9.749449 -100.000000 -2.053977 9.786785 -100.000000 -9.984514 0.555354 -3.637934 -7.295989 6.838752 -9.152349 4.717387 8.817384 0.000000 4.870554 8.733710 0.000000 4.870554 8.733710 -100.000000 2.613003 9.652575 -100.000000 -4.602296 -1.206051 0.000348 -9.852798 -1.709403 -1.026920 -9.852507 -1.711171 -1.024760 0.000192 6.504005 0.000642 0.000115 3.872789 0.000757 0.000114 3.827451 0.000756 -7.530214 6.579959 -100.000000 -9.921281 1.251762 -4.376159 1.589719 9.872832 0.000000 1.761781 9.843583 0.000000 -4.027326 9.153023 -10.331285 -4.039337 9.147837 -10.330014 7.864263 -6.176841 -100.000000 7.755264 -6.313152 -100.000000 7.864263 -6.176841 0.000000 9.446789 -3.279965 0.000000 9.388106 -3.444336 -100.000000 -8.066176 5.910535 -8.508962 -7.970867 6.038652 -100.000000 -8.022676 5.969009 -8.552460 -6.273214 7.787604 -9.731593 -6.395114 7.687644 -9.675702 -6.273214 7.787604 -100.000000 9.709141 2.394278 0.000000 0.000223 7.574248 0.000490 5.467923 8.372684 -100.000000 5.613212 8.275980 -100.000000 9.852507 1.711171 -100.000000 9.880870 1.538961 -100.000000 -3.722230 9.281434 -10.360727 -3.722230 9.281434 -100.000000 -3.717455 9.283301 -10.361066 -9.463520 -3.231376 -100.000000 -9.518474 -3.065722 -100.000000 -9.463520 -3.231376 0.000000 -3.279965 -9.446789 -100.000000 -3.444336 -9.388106 -100.000000 -9.619668 -2.731665 -100.000000 -9.665876 -2.563363 -100.000000 -9.931086 1.168788 -4.291569 6.579959 7.530214 0.000000 6.710379 7.414231 0.000000 6.710379 7.414231 -100.000000 -1.175414 9.930538 -10.245371 -1.019728 9.947871 -100.000000 -1.019728 9.947871 -10.219234 -9.749592 -2.223814 -0.383152 -9.749449 -2.224467 -100.000000 -9.786785 -2.053977 -100.000000 7.089214 7.052875 -100.000000 7.211223 6.928077 -100.000000 7.089214 7.052875 0.000000 -9.984918 0.549018 -3.631138 6.838752 7.295989 -100.000000 -8.653363 5.011720 -7.817884 -8.647378 5.022235 -100.000000 -8.647378 5.022235 -7.826213 -0.218945 -0.053583 0.000600 -5.172388 -8.558410 0.000000 -8.951217 4.457471 -7.366511 -8.970907 4.418232 -7.333470 8.999174 4.360604 -100.000000 9.073906 4.202882 -100.000000 8.999174 4.360604 0.000000 0.000124 4.178580 0.000759 0.000123 4.136007 0.000758 -6.965043 -7.175524 0.000000 9.124973 -4.090826 -100.000000 9.052189 -4.249455 -100.000000 -7.167445 6.973223 -9.240705 -7.164188 6.976521 -9.242845 -0.897152 -9.959674 0.000000 -1.070836 -9.942501 0.000000 -2.563363 9.665876 -10.384322 -2.394278 9.709141 -100.000000 -2.563363 9.665876 -100.000000 -9.959674 0.897152 -100.000000 -9.977401 -0.671932 -2.267256 -9.977633 -0.667973 -2.271800 -8.921700 -4.516995 -100.000000 -8.999174 -4.360604 -100.000000 3.930951 9.194978 0.000000 4.090826 9.124973 0.000000 4.090826 9.124973 -100.000000 0.000188 6.355132 0.000659 0.000186 6.307115 0.000663 -9.326566 3.607656 -100.000000 1.933306 9.811336 0.000000 2.104243 9.776102 0.000000 2.104243 9.776102 -100.000000 -9.852507 -1.711171 -100.000000 -9.880870 -1.538961 -100.000000 3.883647 -9.215057 0.000000 3.722230 -9.281434 0.000000 0.000053 1.733217 0.000694 0.000051 1.649139 0.000690 9.994773 0.323315 -100.000000 9.998893 0.148833 -100.000000 0.200214 9.997995 0.000000 0.374673 9.992979 0.000000 -8.673072 -4.977731 0.000000 -8.758624 -4.825609 0.000000 -8.758624 -4.825609 -100.000000 -1.693404 9.855433 -10.317444 -1.538961 9.880870 -100.000000 -1.704574 9.853594 -10.318810 -9.749449 -2.224467 -0.382315 -9.696710 2.444142 -100.000000 -9.652575 2.613003 -100.000000 9.997995 -0.200214 0.000000 9.992979 -0.374673 0.000000 0.000197 6.661287 0.000624 0.000195 6.607822 0.000630 -2.053977 9.786785 -10.353634 -2.047726 9.788041 -10.353062 9.811336 -1.933306 0.000000 9.776102 -2.104243 0.000000 -7.706069 -2.010205 0.000139 -9.405683 -3.396046 0.000000 -9.821399 -1.881460 -0.815798 -9.821142 -1.882860 -100.000000 -9.821142 -1.882860 -0.814079 0.000305 9.448096 -3.570565 -8.122426 -2.118077 0.000110 7.787604 6.273214 0.000000 7.895901 6.136346 0.000000 7.895901 6.136346 -100.000000 0.000048 1.562863 0.000686 0.000046 1.474280 0.000682 -7.125653 7.015534 -9.268142 4.562784 8.898371 -100.000000 4.717387 8.817384 -100.000000 -0.305741 9.995187 -10.071882 -0.148833 9.998893 -100.000000 -0.315214 9.994964 -10.074184 -0.131329 9.999000 -10.029273 0.025694 9.999967 -100.000000 -0.140535 9.998943 -10.031647 0.000107 3.593262 0.000753 7.676936 6.408171 -100.000000 7.787604 6.273214 -100.000000 0.000300 9.185430 -3.968307 0.000300 9.183615 -3.965111 -3.542706 9.351277 -10.373169 -3.503781 9.365717 -10.375267 0.000309 9.590956 -3.570555 -1.012399 9.948558 -10.217893 0.000335 9.999811 -5.402313 6.313152 7.755264 0.000000 6.447538 7.643902 0.000000 6.447538 7.643902 -100.000000 -0.025694 -9.999967 -100.000000 -0.025694 -9.999967 0.000000 -4.127337 -1.081178 0.000379 -8.494069 -5.277384 0.000000 -3.909357 -1.023868 0.000393 -4.249455 -9.052189 0.000000 -4.406791 -8.976648 0.000000 -9.080162 4.188488 -7.138330 -3.065722 9.518474 -100.000000 -0.417625 -0.105821 0.000591 -5.467923 -8.372684 0.000000 -0.317164 -0.079407 0.000595 8.206232 5.714698 -100.000000 8.105246 5.857047 0.000000 9.998893 0.148833 0.000000 -9.602557 2.790910 -5.888521 3.559680 -9.344980 0.000000 3.396046 -9.405683 0.000000 3.396046 -9.405683 -100.000000 8.841509 4.672013 0.000000 8.921700 4.516995 0.000000 -7.748685 6.321090 -8.800774 9.899072 -1.417172 -100.000000 9.872832 -1.589719 -100.000000 7.530214 -6.579959 0.000000 7.414231 -6.710379 0.000000 0.000182 6.167233 0.000677 0.000181 6.121855 0.000681 6.801169 -7.331037 0.000000 6.672190 -7.448616 0.000000 0.000271 9.206396 0.000174 0.000266 9.038260 0.000210 7.211223 6.928077 0.000000 9.922297 -1.244192 -100.000000 9.922297 -1.244192 0.000000 9.843583 -1.761781 -100.000000 9.811336 -1.933306 -100.000000 -8.811030 4.729017 -7.593073 -8.817384 4.717387 -100.000000 -8.733710 4.870554 -100.000000 -9.942501 1.070836 -4.188052 -4.825609 8.758624 -100.000000 -4.672013 8.841509 -100.000000 0.000301 9.192965 -3.981575 0.000301 9.191033 -3.978174 9.959674 -0.897152 -100.000000 9.942501 -1.070836 -100.000000 -7.044604 7.097299 -9.321085 -3.930951 -9.194978 0.000000 -4.090826 -9.124973 0.000000 -9.906224 -1.366281 -1.445116 -9.881185 -1.536824 -1.237725 0.000194 6.555418 0.000636 7.970867 -6.038652 -100.000000 8.898371 -4.562784 0.000000 8.817384 -4.717387 0.000000 8.817384 -4.717387 -100.000000 -8.462449 5.327815 -8.065219 5.714698 -8.206232 0.000000 5.570608 -8.304716 0.000000 6.313152 7.755264 -100.000000 5.128340 -8.584878 0.000000 4.977731 -8.673072 0.000000 4.977731 -8.673072 -100.000000 -9.752307 -2.211413 -0.399049 -7.314071 -1.908643 0.000166 -1.761781 -9.843583 0.000000 -1.933306 -9.811336 0.000000 -8.372684 5.467923 -8.173430 -1.186044 9.929355 -10.247154 -1.193185 9.928559 -10.248354 -7.755264 6.313152 -100.000000 9.749449 2.224467 0.000000 9.786785 2.053977 0.000000 9.786785 2.053977 -100.000000 0.000226 7.656765 0.000477 -0.838438 9.964726 -10.185954 0.000162 5.466427 0.000728 0.000162 5.487802 0.000727 8.673072 4.977731 0.000000 8.758624 4.825609 0.000000 8.758624 4.825609 -100.000000 0.000121 4.049820 0.000758 0.000119 4.006173 0.000758 -9.947871 -1.019728 -1.863703 -9.948175 -1.016482 -1.867597 0.000140 4.708262 0.000754 0.000139 4.668693 0.000755 -8.400671 -5.424824 -100.000000 -8.494069 -5.277384 -100.000000 -9.872832 1.589719 -4.718222 -9.871449 1.597851 -4.726390 -9.570528 -2.899136 -100.000000 5.022235 8.647378 -100.000000 9.737887 -2.274539 -100.000000 9.696710 -2.444142 -100.000000 4.516995 -8.921700 -100.000000 4.360604 -8.999174 -100.000000 4.516995 -8.921700 0.000000 -7.637017 6.455557 -8.893705 -6.541175 7.563929 -100.000000 -6.408171 7.676936 -100.000000 5.424824 -8.400671 -100.000000 5.277384 -8.494069 -100.000000 0.000170 5.734880 0.000712 9.964154 0.845957 0.000000 9.977401 0.671932 0.000000 -1.359324 9.907122 -10.273735 -1.348501 9.908518 -10.272080 0.557342 9.984386 -4.779279 0.549018 9.984918 0.000000 0.549018 9.984918 -4.761214 -0.625698 -0.160529 0.000581 -5.756795 -8.176756 0.000000 -0.520434 -0.132852 0.000586 -1.193185 9.928559 -100.000000 -6.919445 7.219372 -9.399000 -6.928077 7.211223 -9.393873 -7.041240 7.100588 -9.323186 -6.038652 -7.970867 -100.000000 -6.176841 -7.864263 -100.000000 3.722230 -9.281434 -100.000000 3.559680 -9.344980 -100.000000 0.000289 9.800036 0.000045 0.000293 9.924306 0.000017 -1.589719 -9.872832 0.000000 -1.761781 -9.843583 -100.000000 -7.414231 6.710379 -100.000000 -2.131427 -0.556420 0.000500 -7.331037 -6.801169 0.000000 -1.985055 -0.517936 0.000508 4.360604 -8.999174 0.000000 4.202882 -9.073906 0.000000 -9.786992 -2.052947 -0.602189 0.000262 8.881948 0.000243 0.000258 8.736074 0.000273 9.281434 3.722230 -100.000000 9.344980 3.559680 -100.000000 9.073906 4.202882 0.000000 9.145875 4.043881 -100.000000 8.976648 -4.406791 -100.000000 8.898371 -4.562784 -100.000000 8.976648 -4.406791 0.000000 -5.898622 -8.075040 0.000000 -5.898622 -8.075040 -100.000000 -9.446789 3.279965 -100.000000 -9.388106 3.444336 -100.000000 2.563363 -9.665876 -100.000000 0.000147 4.943479 0.000749 0.000145 4.904468 0.000750 -4.354710 -1.140957 0.000364 -8.976648 4.406791 -100.000000 -0.897152 -9.959674 -100.000000 -1.070836 -9.942501 -100.000000 0.845957 -9.964154 -100.000000 0.671932 -9.977401 -100.000000 -8.730247 4.876637 -7.710889 -8.727049 4.882256 -7.715340 1.193185 -9.928559 0.000000 1.019728 -9.947871 0.000000 -4.562784 -8.898371 -100.000000 -4.717387 -8.817384 -100.000000 -5.983760 8.011987 -9.852828 -5.857047 8.105246 -100.000000 -5.905177 8.069822 -9.883016 -4.249455 -9.052189 -100.000000 -9.281434 -3.722230 0.000000 -9.344980 -3.559680 0.000000 -9.344980 -3.559680 -100.000000 -7.175524 6.965043 -100.000000 -7.175524 6.965043 -9.235402 -0.733535 -0.188882 0.000575 -6.038652 -7.970867 0.000000 -6.263323 7.795430 -9.735876 0.000106 3.544768 0.000752 4.043881 -9.145875 -100.000000 3.883647 -9.215057 -100.000000 4.043881 -9.145875 0.000000 -2.893681 9.572128 -10.391119 -2.899136 9.570528 -10.391186 -3.048414 9.523884 -10.390604 -9.811336 1.933306 -5.062429 2.781064 9.605503 -100.000000 2.948279 9.555504 -100.000000 2.781064 9.605503 0.000000 0.000254 8.599451 0.000300 0.000250 8.471066 0.000326 -9.215057 -3.883647 -100.000000 -9.281434 -3.722230 -100.000000 9.992979 -0.374673 -100.000000 4.249455 9.052189 0.000000 4.406791 8.976648 0.000000 9.518474 3.065722 0.000000 9.570528 2.899136 0.000000 -8.895501 4.568261 -7.459764 -8.898371 4.562784 -100.000000 -8.892324 4.574324 -7.464832 9.605503 -2.781064 -100.000000 9.555504 -2.948279 -100.000000 3.231376 -9.463520 -100.000000 3.231376 -9.463520 0.000000 -1.843166 -0.480630 0.000516 -7.089214 -7.052875 0.000000 -1.705526 -0.444442 0.000524 -9.194978 3.930951 -6.917435 -9.193217 3.934973 -6.920894 -2.714180 9.624469 -10.388618 -2.224467 9.749449 -10.366580 -2.218383 9.750782 -10.366117 0.000277 9.388021 0.000135 0.000283 9.585105 0.000092 -6.659685 7.459622 -9.544603 -6.541175 7.563929 -9.605245 2.948279 9.555504 0.000000 3.114597 9.502595 0.000000 1.070836 9.942501 -100.000000 1.244192 9.922297 -100.000000 1.070836 9.942501 0.000000 -1.876438 9.822315 -10.337291 -1.865114 9.824383 -10.336079 -5.613212 -8.275980 -100.000000 5.467923 8.372684 0.000000 5.613212 8.275980 0.000000 5.997609 -8.001794 0.000000 5.857047 -8.105246 0.000000 5.857047 -8.105246 -100.000000 0.000043 1.383272 0.000678 0.000133 4.468420 0.000758 0.000132 4.427780 0.000758 -7.290828 6.844163 -9.155908 0.000301 9.196949 -3.988591 0.000301 9.194935 -3.985045 7.331037 6.801169 0.000000 7.448616 6.672190 -100.000000 -9.927155 -1.204070 -1.641486 -3.700139 -0.968861 0.000406 9.619668 2.731665 -100.000000 9.619668 2.731665 0.000000 -3.866943 9.221926 -10.347958 8.647378 -5.022235 0.000000 8.558410 -5.172388 -100.000000 9.977401 0.671932 -100.000000 9.987607 0.497698 -100.000000 3.279965 9.446789 0.000000 3.444336 9.388106 0.000000 7.643902 -6.447538 -100.000000 7.530214 -6.579959 -100.000000 8.206232 5.714698 0.000000 -1.933306 -9.811336 -100.000000 -2.104243 -9.776102 -100.000000 0.000194 6.576080 0.000634 -9.445985 3.282218 -6.343815 -9.446789 3.279965 -6.341752 9.821142 1.882860 -100.000000 9.821142 1.882860 0.000000 -9.462327 3.233923 -6.299331 -9.443063 3.290405 -6.351312 9.776102 -2.104243 -100.000000 0.000151 5.099229 0.000744 0.000151 5.084531 0.000745 -8.643608 5.028598 -7.831212 0.000311 9.651976 -3.570550 0.000310 9.598662 -3.570554 0.000228 7.742690 0.000462 5.756795 8.176756 -100.000000 5.898622 8.075040 -100.000000 -2.731665 9.619668 -10.389116 -2.726059 9.621207 -10.388956 0.000231 7.832326 0.000446 -8.206232 -5.714698 -100.000000 -8.304716 -5.570608 -100.000000 -2.899136 9.570528 -100.000000 1.244192 9.922297 0.000000 -5.997609 8.001794 -100.000000 -9.325302 3.610841 -6.639398 -7.052875 7.089214 -100.000000 -6.928077 7.211223 -100.000000 0.000056 1.815202 0.000697 0.323315 -9.994773 -100.000000 0.148833 -9.998893 -100.000000 -9.797267 -2.001771 -0.667501 -0.148833 9.998893 -10.033785 -1.589719 -9.872832 -100.000000 4.825609 -8.758624 -100.000000 2.613003 9.652575 0.000000 -6.313152 -7.755264 -100.000000 -6.447538 -7.643902 -100.000000 -8.921700 -4.516995 0.000000 -8.999174 -4.360604 0.000000 7.175524 -6.965043 -100.000000 7.052875 -7.089214 -100.000000 -2.206795 9.753318 -10.365237 -4.656144 8.849721 -10.237601 -4.516995 8.921700 -10.262486 0.000173 5.860217 0.000703 0.000172 5.818095 0.000706 -8.275980 5.613212 -100.000000 -6.126230 7.903622 -9.794993 -6.136346 7.895901 -100.000000 -6.136346 7.895901 -9.790863 2.274539 9.737887 -100.000000 -7.787604 -6.273214 0.000000 -7.895901 -6.136346 0.000000 -7.895901 -6.136346 -100.000000 8.466838 -5.320966 -100.000000 8.372684 -5.467923 -100.000000 -1.366281 9.906224 -10.274797 2.053977 -9.786785 -100.000000 -8.898371 4.562784 -7.455186 0.000321 9.999811 -3.570524 -1.571909 -0.409311 0.000531 -5.570608 8.304716 -100.000000 -5.424824 8.400671 -100.000000 -1.442112 -0.375185 0.000538 -6.710379 -7.414231 0.000000 -5.556021 8.314319 -10.006105 -5.424824 8.400671 -10.047477 8.733710 -4.870554 0.000000 0.382343 9.992623 -4.399525 0.374673 9.992979 -4.382880 0.000073 2.406308 0.000721 0.000071 2.337992 0.000718 0.000118 3.962130 0.000758 0.000117 3.917675 0.000757 1.417172 9.899072 -100.000000 0.000317 9.576268 -4.656517 0.000301 9.206537 -4.005475 0.000104 3.493946 0.000751 3.607656 9.326566 -100.000000 3.769877 9.262182 -100.000000 3.607656 9.326566 0.000000 0.000203 6.887244 0.000595 0.000202 6.828773 0.000603 -8.171428 5.764221 -8.399129 0.000152 5.138165 0.000743 -6.259887 7.798149 -9.737365 -4.202882 9.073906 -100.000000 0.032046 9.999896 -3.639367 0.025694 9.999967 -3.625584 -4.562784 -8.898371 0.000000 0.000166 5.612272 0.000720 0.000165 5.571905 0.000722 -8.814221 4.723176 -7.588409 0.000065 2.124069 0.000710 -9.405683 -3.396046 -100.000000 -4.500942 8.929653 -10.265057 -4.344374 9.006865 -10.289828 -4.356269 9.001228 -10.288143 -8.640408 5.034001 -7.835457 6.579959 7.530214 -100.000000 -2.781064 -9.605503 -100.000000 0.000150 5.060307 0.000745 -6.944255 -1.812828 0.000192 -6.594698 -1.722262 0.000216 9.987607 0.497698 0.000000 0.497698 -9.987607 0.000000 0.323315 -9.994773 0.000000 0.000067 2.196940 0.000713 -3.607656 -9.326566 -100.000000 -3.769877 -9.262182 -100.000000 6.038652 7.970867 -100.000000 6.176841 7.864263 -100.000000 6.038652 7.970867 0.000000 5.997609 -8.001794 -100.000000 8.584878 5.128340 0.000000 -6.792271 7.339149 -9.473416 -6.801169 7.331037 -9.468616 8.275980 -5.613212 -100.000000 8.275980 -5.613212 0.000000 -0.323315 9.994773 -10.076151 0.000295 9.999810 0.000000 3.114597 9.502595 -100.000000 3.279965 9.446789 -100.000000 0.549018 9.984918 -100.000000 1.417172 9.899072 0.000000 1.589719 9.872832 -100.000000 0.000167 5.652875 0.000718 8.494069 5.277384 0.000000 8.584878 5.128340 -100.000000 0.000175 5.902716 0.000699 -3.554781 9.346798 -10.372519 9.984918 -0.549018 0.000000 -2.104243 -9.776102 0.000000 -3.930951 -9.194978 -100.000000 -4.090826 -9.124973 -100.000000 -9.973274 0.729848 -3.825035 -9.959674 0.897152 -4.003591 -0.654248 9.978436 -10.149226 -0.497698 9.987607 -100.000000 -0.664221 9.977853 -10.151350 -7.211223 -6.928077 0.000000 0.000332 9.919160 -5.260298 -5.822892 -1.522295 0.000268 -0.090930 9.999249 -10.018862 -6.408171 7.676936 -9.669714 6.672190 -7.448616 -100.000000 6.408171 -7.676936 0.000000 6.273214 -7.787604 -100.000000 9.947871 1.019728 0.000000 5.320966 8.466838 0.000000 1.711171 -9.852507 -100.000000 8.075040 -5.898622 0.000000 0.000164 5.531755 0.000725 0.000029 0.887170 0.000655 -7.961688 6.050550 -8.610638 -7.964904 6.046381 -8.607690 7.331037 6.801169 -100.000000 0.000092 3.077720 0.000742 0.000091 3.021878 0.000740 -9.375534 3.477702 -6.522643 -9.352166 3.539714 -6.577032 -1.711171 9.852507 -100.000000 0.723194 9.973815 -100.000000 -9.709207 -2.394000 -0.164003 -9.709141 -2.394278 -100.000000 0.207227 9.997794 -4.019516 0.000232 7.852854 0.000443 -9.038429 -2.355401 0.000045 -8.001794 -5.997609 -100.000000 -8.105246 -5.857047 -100.000000 -8.001794 -5.997609 0.000000 -9.992700 0.380687 -3.449740 -9.992979 0.374673 -100.000000 -5.128340 8.584878 -100.000000 -4.977731 8.673072 -100.000000 0.000300 9.189136 -3.974833 0.000300 9.187269 -3.971546 0.000069 2.268225 0.000715 0.000128 4.304421 0.000758 0.000127 4.262771 0.000759 -9.619668 -2.731665 0.000000 -8.078895 5.893245 -8.496060 -6.663031 7.456677 -9.542892 -6.788948 7.342177 -9.475209 1.538961 -9.880870 -100.000000 9.262182 -3.769877 0.000000 9.446789 -3.279965 -100.000000 -3.279965 -9.446789 0.000000 -3.444336 -9.388106 0.000000 -9.124973 4.090826 -7.054919 -3.114597 -9.502595 -100.000000 -0.549018 -9.984918 -100.000000 -0.723194 -9.973815 -100.000000 0.000205 6.947190 0.000587 0.000003 0.003986 0.000610 -9.633163 2.682307 -5.786737 0.000082 2.728183 0.000732 0.000080 2.666253 0.000730 9.999967 -0.025694 0.000000 9.964154 0.845957 -100.000000 0.000150 5.058632 0.000746 -8.367987 5.474979 -8.178833 -8.364771 5.479810 -8.182531 -3.607656 -9.326566 0.000000 -3.769877 -9.262182 0.000000 8.494069 5.277384 -100.000000 -4.870554 -8.733710 -100.000000 -9.709141 -2.394278 -0.163644 0.557465 9.984378 -4.849744 0.897152 9.959674 -100.000000 0.723194 9.973815 0.000000 0.000163 5.491803 0.000727 -8.069396 5.906208 -8.505742 -8.075040 5.898622 -8.500099 1.761781 9.843583 -100.000000 1.933306 9.811336 -100.000000 7.755264 -6.313152 0.000000 0.000077 2.538831 0.000725 0.000075 2.473235 0.000723 -9.785274 2.059743 -5.188097 -9.809549 1.941975 -5.071044 6.541175 -7.563929 0.000000 6.176841 7.864263 0.000000 4.406791 8.976648 -100.000000 -9.731060 2.302659 -5.428330 -9.735660 2.283715 -5.409703 6.801169 -7.331037 -100.000000 -8.841509 -4.672013 -100.000000 -1.711171 9.852507 -10.319616 -9.997995 0.200214 -3.254354 -9.999421 0.074016 -3.117055 0.000178 6.032749 0.000689 0.000179 6.042590 0.000688 9.194978 -3.930951 -100.000000 9.194978 -3.930951 0.000000 -9.665876 -2.563363 0.000000 -2.881733 9.575633 -10.390970 0.000094 3.132685 0.000743 0.000086 2.848720 0.000735 0.000084 2.788990 0.000733 0.000122 4.093093 0.000758 -0.200214 -9.997995 0.000000 -4.406791 -8.976648 -100.000000 3.769877 9.262182 0.000000 -8.304716 -5.570608 0.000000 -9.649878 2.622633 -5.730781 0.897152 9.959674 0.000000 0.000113 3.781642 0.000756 0.000111 3.735340 0.000755 -8.558410 5.172388 -100.000000 -8.563922 5.163087 -7.936871 -9.652575 2.613003 -5.721750 -9.652526 2.613179 -5.721915 9.405683 3.396046 0.000000 9.463520 3.231376 0.000000 -7.414231 6.710379 -9.066785 9.124973 -4.090826 0.000000 9.052189 -4.249455 0.000000 -5.703971 8.213563 -9.956467 -5.842944 8.115252 -9.906592 -5.714698 8.206232 -9.952844 -2.731665 9.619668 -100.000000 -9.786785 -2.053977 -0.600874 -2.274539 -9.737887 0.000000 -2.444142 -9.696710 0.000000 -7.448616 -6.672190 -100.000000 -9.872832 1.589719 -100.000000 0.000237 8.024174 0.000411 0.000234 7.926025 0.000429 0.000130 4.386910 0.000758 -7.970867 6.038652 -8.602224 5.277384 -8.494069 0.000000 5.128340 -8.584878 -100.000000 -7.448616 -6.672190 0.000000 -7.563929 -6.541175 0.000000 -2.557602 9.667351 -10.384067 0.000240 8.127215 0.000392 0.000177 5.988952 0.000693 -5.022235 -8.647378 -100.000000 -5.172388 -8.558410 -100.000000 9.899072 -1.417172 0.000000 0.000148 4.982446 0.000748 0.000097 3.240125 0.000746 0.000095 3.186810 0.000745 0.000004 0.046343 0.000612 9.518474 3.065722 -100.000000 9.570528 2.899136 -100.000000 2.394278 -9.709141 -100.000000 2.224467 -9.749449 -100.000000 -3.378950 9.411687 -10.381701 0.000098 3.292665 0.000747 7.643902 -6.447538 0.000000 0.000207 7.008718 0.000578 9.215057 3.883647 -100.000000 9.281434 3.722230 0.000000 9.344980 3.559680 0.000000 -4.838886 -1.267349 0.000333 5.424824 -8.400671 0.000000 -9.544109 -2.486416 0.000009 0.000104 3.495668 0.000751 2.224467 -9.749449 0.000000 -7.089214 -7.052875 -100.000000 -2.394278 9.709141 -10.376809 -2.545806 9.670369 -10.383543 -7.787604 -6.273214 -100.000000 -5.997609 8.001794 -9.847507 -1.244192 -9.922297 -100.000000 -2.940228 -0.769068 0.000453 -2.767181 -0.723571 0.000463 0.579230 9.982992 -4.826776 0.000149 5.021384 0.000747 -0.013538 9.999726 -9.998918 5.022235 8.647378 0.000000 -9.774098 2.113168 -5.241149 -9.737887 2.274539 -100.000000 9.737887 -2.274539 0.000000 8.733710 -4.870554 -100.000000 -8.733710 4.870554 -7.706071 8.372684 -5.467923 0.000000 0.000125 4.220829 0.000759 -9.694250 2.453550 -5.571378 -0.497698 9.987607 -10.115890 -0.489793 9.987932 -10.114088 1.711171 -9.852507 0.000000 -9.941652 1.078110 -4.195739 -5.651395 -1.477862 0.000279 -5.367535 -1.404317 0.000298 4.562784 8.898371 0.000000 -9.977401 -0.671932 -100.000000 -9.987607 -0.497698 -100.000000 7.295989 -6.838752 -100.000000 -5.413754 8.407684 -10.050725 -5.410003 8.410060 -10.051826 0.000157 5.294359 0.000737 9.852507 1.711171 0.000000 0.845957 -9.964154 0.000000 -0.480065 9.988333 -10.111872 -0.723194 -9.973815 0.000000 -3.705387 9.288018 -10.361921 -5.756795 -8.176756 -100.000000 -4.043881 9.145875 -10.329534 7.414231 -6.710379 -100.000000 3.065722 -9.518474 0.000000 4.249455 9.052189 -100.000000 0.671932 -9.977401 0.000000 -9.676770 -2.520787 0.000000 -5.613212 -8.275980 0.000000 0.000176 5.945618 0.000696 0.000141 4.747704 0.000754 -9.928879 -1.190309 -1.658129 -9.928559 -1.193185 -1.654663 7.970867 -6.038652 0.000000 -9.257621 3.780810 -6.787452 -9.987607 -0.497698 -2.467274 5.756795 8.176756 0.000000 -3.114597 -9.502595 0.000000 0.000217 7.344504 0.000528 0.000215 7.273113 0.000539 -8.841509 -4.672013 0.000000 9.973815 -0.723194 0.000000 9.959674 -0.897152 0.000000 0.000198 6.715881 0.000617 -2.613003 -9.652575 0.000000 0.000144 4.865399 0.000751 0.000144 4.864045 0.000751 -6.176841 -7.864263 0.000000 -6.313152 -7.755264 0.000000 -9.992979 0.374673 -3.443259 -8.105246 -5.857047 0.000000 0.000246 8.350050 0.000350 -3.119622 -0.816234 0.000442 -5.714698 8.206232 -100.000000 -8.275980 5.613212 -8.284648 -8.270968 5.620463 -8.290147 -4.813993 8.764894 -10.206625 -4.825609 8.758624 -10.204181 -4.962256 8.681776 -10.172674 -9.073906 -4.202882 0.000000 9.749449 2.224467 -100.000000 -9.400101 3.410740 -6.461510 7.676936 6.408171 0.000000 5.898622 8.075040 0.000000 -5.277384 8.494069 -100.000000 0.000185 6.259822 0.000668 0.000184 6.213209 0.000672 0.000180 6.077038 0.000685 -7.052875 7.089214 -9.315919 -2.613003 -9.652575 -100.000000 0.000158 5.333597 0.000735 -5.846508 8.112723 -9.905307 -3.961238 9.181557 -10.338276 -3.878989 9.216972 -10.346895 3.444336 9.388106 -100.000000 -8.466838 5.320966 -8.059929 -1.882860 9.821142 -10.337978 -9.696710 2.444142 -5.562506 -8.558410 5.172388 -7.944178 -2.376659 9.713324 -10.375748 -6.672190 7.448616 -100.000000 0.374673 9.992979 -5.037267 -5.949706 -1.555151 0.000259 -4.592153 -1.203384 0.000349 -0.323315 9.994773 -100.000000 -4.667868 8.843654 -10.235502 -7.044515 7.097386 -9.321140 0.148833 -9.998893 0.000000 8.673072 4.977731 -100.000000 8.304716 5.570608 -100.000000 0.200214 9.997995 -4.004298 -9.388106 3.444336 -6.492276 0.000134 4.508845 0.000757 0.000300 9.181055 -3.960604 0.000300 9.178287 -3.955523 0.000200 6.771683 0.000610 -4.202882 9.073906 -10.309879 -9.994883 -0.318653 -2.671847 -9.994773 -0.323315 -100.000000 -9.994773 -0.323315 -2.666544 0.035065 9.999862 -5.369649 -9.600060 2.799265 -5.896311 -9.947871 -1.019728 -100.000000 -4.672013 8.841509 -10.234761 0.000153 5.177132 0.000741 0.000038 1.193473 0.000670 -9.964429 -0.842354 -2.070711 -9.964154 -0.845957 -2.066555 -0.844070 -0.217945 0.000570 -9.776102 2.104243 -5.232326 0.000087 2.907418 0.000737 0.000135 4.549071 0.000757 -8.400671 -5.424824 0.000000 0.497698 -9.987607 -100.000000 -5.266159 8.500908 -10.093796 -5.277384 8.494069 -10.090742 0.000129 4.345796 0.000758 0.000371 9.999811 -9.995333 4.202882 -9.073906 -100.000000 -1.882860 9.821142 -100.000000 -9.552306 2.958332 -6.044556 -9.502595 3.114597 -6.189391 -9.880870 -1.538961 -1.235126 -4.811144 8.766431 -10.207225 0.000032 0.992358 0.000660 -9.922297 1.244192 -100.000000 -5.097028 -1.334231 0.000316 -8.189076 5.738966 -8.380028 -8.176756 5.756795 -8.393551 -9.987784 -0.493387 -2.472200 -2.388358 9.710546 -10.376452 3.930951 9.194978 -100.000000 -0.957434 -0.247751 0.000564 -9.190129 3.942025 -6.926958 -9.384106 3.454954 -6.501940 -6.136720 7.895606 -9.790702 8.647378 -5.022235 -100.000000 -2.282542 -0.596151 0.000491 -9.998893 -0.148833 -2.865006 -9.014022 4.328950 -7.257820 -9.260675 3.773488 -6.781114 -9.973815 0.723194 -3.817934 -8.551126 5.184206 -7.953385 -9.499136 3.124848 -6.198836 0.000078 2.603153 0.000727 -5.700349 8.216038 -9.957689 0.000137 4.628980 0.000756 -8.554329 5.179010 -7.949337 -1.366281 9.906224 -100.000000 -9.737887 2.274539 -5.400681 -4.809930 8.767086 -10.207465 -9.387077 3.447067 -6.494762 -1.073767 -0.278338 0.000558 -6.398518 7.684853 -9.674141 -1.538961 9.880870 -10.298554 -9.922297 1.244192 -4.368477 0.000058 1.895190 0.000701 -3.883647 9.215057 -100.000000 -4.966233 8.679540 -10.171758 0.000035 1.094404 0.000665 -9.145875 -4.043881 0.000000 -9.326566 3.607656 -6.636622 0.000171 5.776324 0.000709 -7.955727 6.058277 -8.616102 -1.193215 -0.309744 0.000552 -2.438670 -0.637200 0.000482 -4.977731 8.673072 -10.169106 -9.502002 3.116358 -6.191014 -9.215057 -3.883647 0.000000 -6.263687 -1.636501 0.000238 -2.036263 9.790342 -10.352013 0.000136 4.589111 0.000756 0.000213 7.203997 0.000550 0.000211 7.136990 0.000560 9.942501 -1.070836 0.000000 -3.883647 9.215057 -10.346484 -7.530214 6.579959 -8.978733 9.994773 0.323315 0.000000 -2.600110 -0.679645 0.000473 -7.676936 -6.408171 0.000000 -5.570608 8.304716 -10.001505 -1.315942 -0.342011 0.000545 0.000243 8.235651 0.000372 -5.262338 8.503236 -10.094835 -1.521182 9.883481 -10.296108 -1.532185 9.881866 -10.297622 -8.267751 5.625120 -8.293679 -9.964154 -0.845957 -100.000000 -9.052189 4.249455 -7.190400 0.000089 2.965123 0.000739 -9.998893 -0.148833 -100.000000 -5.116971 8.591535 -10.134144 -4.360604 8.999174 -10.287528 -5.128340 8.584878 -10.131289 -3.060414 9.520132 -10.390556 -5.559704 8.311894 -10.004944 -5.857047 8.105246 -9.901505 -7.633788 6.459319 -8.896276 -8.974063 4.411943 -7.328175 -8.976648 4.406791 -7.323837 -6.672190 7.448616 -9.538204 0.000209 7.071943 0.000569 -3.214169 9.469229 -10.387513 -9.951344 -0.982676 -1.908155 -3.559680 9.344980 -10.372255 -3.065722 9.518474 -10.390535 -8.827816 4.697472 -7.567764 -8.817384 4.717387 -7.583787 0.000300 9.178152 -3.955278 -9.997832 0.205902 -3.260514 0.000159 5.372943 0.000733 1 2 3 2 1 3 4 5 6 5 4 6 7 8 9 7 9 8 10 11 12 10 11 12 13 14 14 15 15 13 16 17 18 17 18 16 19 20 20 21 21 19 22 23 24 23 24 22 25 17 26 17 26 25 27 28 9 27 9 28 29 30 31 30 31 29 32 33 34 33 34 32 35 36 36 37 37 35 38 17 39 17 39 38 40 41 42 41 42 40 43 44 45 43 44 45 46 47 47 48 46 48 49 50 51 50 49 51 52 17 53 17 53 52 1 54 55 54 1 55 56 57 57 58 58 56 59 60 59 61 61 60 62 63 9 62 9 63 49 64 49 42 64 42 65 66 67 65 66 67 68 69 70 68 69 70 71 72 9 71 9 72 73 74 9 73 9 74 75 76 76 77 77 75 11 78 17 78 17 11 79 80 81 80 79 81 82 83 17 83 17 82 84 85 17 85 17 84 49 86 49 87 86 87 88 89 90 89 90 88 91 92 9 91 9 92 93 94 17 94 17 93 95 96 97 95 96 97 98 99 9 98 9 99 100 101 17 101 17 100 102 17 103 17 103 102 49 104 105 104 49 105 106 30 9 106 9 30 107 108 109 107 108 109 110 111 112 110 111 112 113 114 115 114 115 113 116 117 9 116 9 117 118 119 119 120 118 120 121 122 123 121 122 123 124 125 9 124 9 125 126 127 9 126 9 127 128 129 130 128 129 130 40 131 131 41 132 133 133 134 132 134 135 136 17 136 17 135 137 138 138 139 139 137 140 17 141 17 141 140 142 143 143 144 142 144 145 146 9 145 9 146 147 148 17 148 17 147 149 150 17 150 149 17 151 152 151 153 153 152 130 154 9 130 9 154 155 156 156 157 155 157 158 159 9 158 9 159 160 161 9 160 9 161 162 163 162 164 164 163 165 166 167 166 167 165 168 169 170 169 170 168 171 82 172 171 82 172 173 174 9 173 9 174 175 176 177 175 176 177 178 179 180 178 179 180 181 182 181 183 183 182 184 140 184 141 185 186 185 187 187 186 79 188 79 189 188 189 190 191 9 190 9 191 192 193 193 194 194 192 195 196 197 196 195 197 198 199 198 200 200 199 201 17 202 17 202 201 203 62 203 204 204 62 205 206 206 207 207 205 208 209 210 209 208 210 211 212 211 213 213 212 214 215 214 184 184 215 6 53 216 53 6 216 217 218 17 218 17 217 219 220 219 221 221 220 222 223 224 222 223 224 155 225 225 156 208 226 208 227 226 227 228 229 9 228 9 229 230 231 9 230 9 231 232 233 9 232 9 233 234 235 236 234 235 236 237 238 9 237 9 238 87 239 86 239 240 115 240 113 241 242 242 243 241 243 244 245 246 244 245 246 247 248 9 247 9 248 249 240 250 249 240 250 251 252 253 251 252 253 254 255 17 255 17 254 256 257 256 258 257 258 259 260 260 261 259 261 262 17 262 26 263 264 264 265 265 263 266 267 17 267 17 266 268 17 269 17 269 268 270 271 9 270 9 271 272 116 272 117 49 273 273 51 274 275 276 274 275 276 246 277 9 246 9 277 278 279 278 280 279 280 1 281 2 281 282 17 283 17 283 282 239 284 9 239 9 284 285 220 221 285 286 287 17 287 17 286 162 288 162 289 288 289 290 291 291 292 292 290 293 135 294 293 135 294 295 296 296 297 297 295 298 299 299 300 298 300 77 301 301 76 1 302 54 302 303 304 9 303 9 304 305 306 9 305 9 306 307 308 309 308 309 307 310 311 311 312 312 310 313 314 9 313 9 314 315 316 9 315 9 316 317 285 195 285 317 195 318 319 320 318 319 320 321 322 323 322 323 321 256 32 256 34 324 325 325 326 324 326 327 328 328 329 329 327 272 330 330 116 320 331 9 320 9 331 332 333 334 333 334 332 335 336 335 181 181 336 337 256 256 338 337 338 339 340 340 341 341 339 342 17 343 17 343 342 58 344 344 57 345 346 9 345 9 346 49 347 348 347 49 348 349 350 17 350 17 349 351 352 351 353 353 352 354 193 9 354 9 193 184 355 356 355 184 356 357 358 9 357 9 358 308 106 309 106 359 360 361 359 360 361 362 17 363 17 363 362 258 364 364 27 258 27 365 366 367 365 366 367 279 368 368 369 279 369 370 371 17 371 17 370 6 372 373 372 6 373 374 375 9 374 9 375 376 377 17 377 17 376 378 379 380 378 379 380 381 382 381 383 383 382 324 384 384 325 385 386 9 385 9 386 33 169 9 33 9 169 387 388 17 388 17 387 389 17 390 17 390 389 240 391 392 391 240 392 393 394 17 394 17 393 395 396 396 312 395 312 397 398 397 399 399 398 198 400 400 199 241 401 401 242 402 403 404 402 403 404 405 17 406 17 406 405 407 348 49 407 408 409 9 408 9 409 410 411 410 412 412 411 413 414 413 415 415 414 416 197 195 416 417 418 9 417 9 418 200 419 420 419 200 420 184 269 140 269 421 30 422 30 422 421 423 400 400 208 423 208 113 424 424 114 425 187 425 185 426 427 428 426 427 428 429 71 71 430 430 429 431 432 431 433 433 432 434 435 17 435 17 434 436 34 256 436 23 437 9 23 9 437 438 439 438 440 440 439 280 397 397 368 280 368 14 441 441 442 442 14 375 247 247 443 443 375 1 211 444 211 1 444 445 446 447 445 446 447 448 449 17 449 17 448 450 64 49 450 451 452 9 451 9 452 453 454 17 454 17 453 455 17 456 17 456 455 457 458 17 458 17 457 256 459 460 459 256 460 329 461 461 328 462 451 451 463 463 462 464 465 465 94 94 464 466 467 467 468 466 468 469 194 469 193 470 471 9 470 9 471 200 472 473 472 200 473 474 475 9 474 9 475 476 49 476 79 49 79 477 478 17 478 17 477 278 479 278 480 479 480 1 481 281 481 482 290 9 482 9 290 483 484 485 483 484 485 486 133 132 486 487 488 17 488 17 487 489 428 426 489 490 491 492 490 491 492 493 395 493 494 395 494 34 169 495 496 17 496 17 495 200 497 200 132 497 132 498 322 498 499 499 322 41 500 42 500 501 502 503 501 502 503 1 504 302 504 88 505 505 89 195 506 195 507 506 507 508 509 510 508 509 510 511 17 512 17 512 511 184 513 514 513 184 514 192 354 515 17 516 17 516 515 517 518 9 517 9 518 195 519 520 519 195 520 521 315 9 521 276 522 522 275 523 524 9 523 9 524 525 526 526 527 527 525 528 239 528 86 81 529 529 530 81 530 531 532 9 531 9 532 533 17 150 533 534 535 17 535 17 534 240 536 537 536 240 537 210 8 209 8 538 539 540 539 540 538 541 542 541 543 543 542 499 544 544 322 545 546 547 545 546 547 436 169 548 549 9 548 9 549 550 551 9 550 9 551 552 261 552 553 261 553 468 333 9 468 9 333 554 495 555 554 495 555 105 284 284 556 105 556 557 558 557 559 559 558 560 561 17 561 17 560 411 414 9 411 9 414 562 326 326 398 562 398 563 17 564 17 564 563 565 566 9 565 9 566 567 100 568 567 100 568 278 46 46 479 569 570 570 571 571 569 542 572 573 542 572 573 574 575 9 574 9 575 224 576 576 223 577 17 578 17 578 577 579 265 265 378 579 378 169 580 9 580 581 582 582 349 349 581 583 584 9 583 9 584 200 585 586 585 200 586 587 588 17 588 17 587 198 423 9 364 589 590 9 589 9 590 591 592 593 592 593 591 478 434 594 478 434 594 595 596 597 595 596 597 167 598 599 598 599 167 600 572 572 601 600 601 299 602 602 298 603 416 195 603 184 335 184 181 604 605 605 606 606 604 607 608 609 607 608 609 195 610 195 151 610 151 611 612 612 613 613 611 614 17 615 17 615 614 616 617 9 616 9 617 104 284 618 73 9 618 619 620 17 620 17 619 621 622 17 622 17 621 623 624 625 624 625 623 626 627 627 83 83 626 628 230 230 629 629 628 630 631 630 632 632 631 341 567 567 340 256 633 634 633 256 634 635 353 351 635 636 271 637 271 637 636 638 639 639 17 638 17 640 529 641 529 641 640 642 643 17 643 17 642 644 645 645 646 646 644 240 647 648 647 240 648 138 649 649 439 439 138 650 651 17 651 17 650 652 653 654 652 653 654 9 308 209 7 184 655 215 655 195 656 657 656 195 657 9 47 9 48 49 658 165 658 49 165 200 659 660 659 200 660 661 110 662 661 110 662 663 433 663 664 433 664 665 75 75 666 666 665 195 219 519 219 309 667 307 667 405 373 6 405 668 84 669 668 84 669 670 671 9 670 9 671 672 673 17 673 17 672 674 675 9 674 9 675 442 676 676 441 677 678 9 677 9 678 624 467 625 467 17 301 17 77 1 679 481 679 9 156 9 157 680 574 680 681 681 574 682 305 305 683 683 682 684 685 684 680 685 680 686 523 9 686 634 28 633 28 687 17 688 17 688 687 580 624 9 624 332 689 689 334 198 690 198 691 690 691 296 41 9 296 9 41 1 692 504 692 693 694 9 693 9 694 277 611 9 611 240 695 696 695 240 696 697 17 692 17 692 697 698 699 9 698 9 699 184 6 6 655 609 700 608 700 646 701 17 701 17 646 702 592 9 702 9 592 187 79 186 79 703 364 258 703 704 705 9 704 9 705 240 424 6 706 372 706 707 708 9 707 9 708 399 709 278 399 709 278 710 411 710 414 70 711 711 69 492 712 712 491 245 713 17 713 17 245 714 715 9 714 9 715 716 717 358 716 717 358 718 719 719 148 148 718 720 271 720 637 721 142 722 721 142 722 723 17 724 17 724 723 725 119 9 725 9 119 726 727 726 728 728 727 729 246 244 729 730 731 732 730 731 732 733 734 9 733 9 734 240 735 536 735 736 109 9 736 9 109 623 737 737 624 198 738 738 690 632 344 632 739 739 344 740 741 9 740 9 741 742 743 743 58 742 58 437 700 9 700 744 741 745 741 745 744 746 668 17 668 17 746 182 336 747 377 748 377 748 747 6 749 750 749 6 750 195 751 752 751 195 752 645 753 9 645 9 753 754 200 755 754 200 755 756 6 52 756 6 52 757 758 758 759 759 757 760 17 761 17 761 760 762 119 118 762 74 474 763 17 687 763 195 221 573 548 548 572 602 300 764 300 764 602 494 596 596 396 494 396 144 765 9 144 9 765 352 270 9 352 654 91 91 653 766 261 767 261 767 766 768 266 17 768 769 17 770 17 770 769 771 467 466 771 17 461 17 329 772 17 38 772 597 773 773 596 17 223 17 222 774 775 774 776 775 776 332 777 777 689 778 320 318 778 685 574 184 268 9 492 9 712 779 180 9 779 9 180 780 17 780 688 781 595 781 782 782 595 535 783 17 783 784 785 707 784 785 707 12 98 98 11 282 752 195 282 6 786 772 786 6 772 787 788 9 787 9 788 789 790 790 791 791 789 236 792 792 235 49 599 347 599 722 143 793 508 17 508 17 793 29 422 35 794 795 35 794 795 796 205 205 797 797 796 240 798 412 798 240 412 553 799 799 261 200 623 200 625 800 801 9 800 9 801 123 327 327 122 8 802 9 802 803 286 804 803 286 804 805 17 769 805 401 312 401 395 806 793 807 806 793 807 808 17 723 808 372 17 373 17 421 809 809 30 388 810 73 388 810 73 319 121 17 121 17 319 496 811 17 811 112 417 417 111 447 628 628 446 812 813 9 812 9 813 273 166 658 166 658 273 814 354 815 354 815 814 816 817 816 818 818 817 238 819 819 237 820 208 208 754 754 820 821 709 821 562 709 562 240 413 822 413 240 822 823 530 823 81 824 158 9 824 825 234 826 825 234 826 78 827 17 827 21 828 828 20 109 829 829 108 207 830 830 206 831 17 831 770 832 17 102 832 45 525 525 44 297 833 297 834 833 834 1 390 679 390 328 835 9 328 9 835 6 836 837 836 6 837 838 256 839 838 256 839 28 33 840 382 9 840 9 382 17 676 17 442 226 841 226 802 802 841 842 843 843 325 842 325 844 377 844 748 845 256 845 1 1 256 1 697 846 842 384 842 846 384 503 682 682 502 847 848 848 849 849 847 850 851 851 116 850 116 250 852 852 853 250 853 854 208 855 208 855 854 192 815 856 750 6 856 195 857 858 857 195 858 316 859 859 315 49 860 860 295 49 295 756 195 6 195 294 173 173 135 701 803 17 803 79 861 79 862 861 862 829 863 9 829 9 863 136 864 17 864 97 865 865 96 866 867 17 867 17 866 32 868 868 33 180 869 869 179 870 871 9 870 9 871 872 17 760 872 267 873 17 873 183 873 184 183 873 184 739 58 874 212 213 874 6 875 876 875 6 876 877 387 17 877 878 670 670 534 534 878 879 17 879 780 880 134 881 134 881 880 72 870 870 254 254 72 882 883 17 883 17 882 253 884 884 252 30 23 590 885 885 266 266 590 443 877 877 247 842 886 886 843 17 403 17 402 887 226 887 841 841 888 888 889 889 841 890 17 890 831 479 47 891 120 891 892 892 120 591 188 79 591 893 894 9 893 9 894 292 895 895 291 653 487 487 91 6 896 897 896 6 897 898 195 195 899 898 899 900 825 17 825 17 900 240 818 240 816 791 901 901 790 902 408 9 902 3 17 362 3 869 313 9 869 903 1 1 904 903 904 177 905 905 176 553 259 799 259 494 781 781 596 256 639 256 638 380 906 906 379 907 382 383 907 493 241 493 401 337 200 256 200 240 323 240 321 908 909 157 909 908 157 256 614 256 615 223 217 217 576 256 563 256 564 910 17 910 911 911 17 912 345 345 913 913 912 886 914 843 914 240 915 695 915 916 17 836 17 836 916 134 725 881 725 6 917 918 917 6 918 184 103 268 103 195 919 511 919 195 511 430 920 920 71 594 921 921 434 759 922 922 758 699 517 517 923 923 699 579 431 431 265 924 386 386 212 924 212 925 646 644 925 926 17 927 17 927 926 777 928 929 928 929 777 1 930 931 930 1 931 195 283 932 933 17 933 17 932 934 105 934 556 6 38 935 936 17 936 17 935 937 938 939 938 937 939 700 940 608 940 208 887 941 493 326 493 941 326 99 878 9 878 942 943 17 943 17 942 35 862 35 79 238 944 9 944 520 945 519 945 896 17 897 17 256 946 947 946 256 947 556 166 9 556 9 166 907 840 600 541 541 572 657 17 948 17 948 657 367 729 729 366 834 296 834 949 949 296 950 490 951 950 490 951 952 953 124 952 953 124 240 351 954 351 240 954 304 693 67 160 160 66 235 652 652 792 257 27 955 17 946 17 946 955 956 17 956 910 957 958 9 957 9 958 695 353 696 353 1 808 1 723 959 93 452 959 93 452 960 17 577 960 961 17 962 17 962 961 240 710 240 410 710 410 963 17 963 141 964 965 9 964 9 965 338 624 624 337 966 967 9 966 9 967 968 23 968 31 31 23 216 17 969 17 969 216 606 370 370 605 788 812 659 208 660 208 174 912 9 912 1 389 970 453 17 970 971 17 872 971 972 565 9 972 973 974 17 974 17 973 212 62 9 212 428 778 778 427 709 975 975 278 921 589 9 921 459 17 460 17 306 12 10 306 488 976 531 488 976 531 977 886 977 842 518 263 9 263 978 603 195 978 206 482 482 830 790 489 9 790 9 489 184 440 440 335 17 509 9 134 979 107 17 107 17 979 57 980 980 344 240 981 240 982 981 982 125 983 9 983 663 184 184 664 340 568 9 340 9 568 189 702 984 702 984 189 582 985 9 582 9 985 66 587 587 160 986 731 986 987 987 731 988 208 988 887 989 17 960 989 69 554 554 711 822 414 990 414 990 822 172 626 626 82 275 991 991 522 992 229 229 993 992 993 83 95 95 627 994 171 17 171 17 994 485 995 995 484 200 996 200 466 996 466 5 156 225 5 571 483 483 570 476 407 85 997 17 997 591 702 998 17 342 998 197 17 416 17 154 56 9 56 848 698 9 848 154 129 458 900 1 999 930 999 982 352 981 352 860 120 892 860 314 787 240 1000 1001 1000 240 1001 108 1002 1002 829 184 438 183 267 267 182 631 819 237 631 862 794 117 354 295 120 120 296 195 469 1003 469 195 1003 60 923 59 923 524 994 994 523 1004 717 1004 1005 1005 717 1006 274 17 274 17 1006 656 17 356 1007 1007 1008 356 1008 1009 718 718 147 147 1009 312 242 242 311 148 175 175 719 976 950 17 950 17 976 568 972 972 100 1010 741 1011 741 1011 1010 184 102 491 43 17 43 17 491 195 1012 201 1012 195 201 1013 10 17 10 17 1013 926 283 195 926 860 891 295 891 588 1014 583 588 1014 583 20 303 303 828 981 270 240 1015 798 1015 255 1016 17 1016 184 543 543 438 9 665 9 75 662 112 1017 667 1017 309 80 529 191 339 9 339 415 710 9 326 9 398 663 431 446 629 17 629 17 446 649 1018 9 649 9 1018 1019 162 289 1019 828 650 650 303 200 486 1020 1009 9 1020 9 1009 355 1007 1021 222 17 1021 361 1022 1022 360 678 232 629 1021 1021 230 1014 1023 17 1023 17 1014 1024 977 977 914 1024 914 200 880 200 881 543 1025 438 1025 732 847 847 731 998 858 195 998 1 1026 808 1026 195 262 1027 262 195 1027 663 1028 1029 663 1028 1029 1030 292 17 292 17 1030 1031 28 633 1031 96 293 293 865 1032 1008 1032 356 651 1033 693 651 1033 693 991 21 19 991 179 1034 1034 869 17 652 17 235 1035 17 1036 17 1036 1035 379 1037 1037 906 906 357 357 1037 1038 1039 17 1039 17 1038 1 1040 389 1040 1041 178 17 178 17 1041 737 337 49 167 371 445 17 445 377 539 17 539 545 705 546 705 1042 17 1043 17 1043 1042 1044 1045 714 1044 1045 714 613 642 642 612 79 36 555 677 677 495 166 598 9 598 300 727 764 727 850 1046 1046 851 94 393 393 465 585 468 586 468 773 310 310 396 396 773 683 1013 1013 305 195 805 195 769 849 1047 1047 848 473 208 854 473 195 512 9 1007 9 1008 493 781 493 782 291 674 674 895 240 499 499 537 350 582 184 541 176 457 457 905 671 374 566 145 867 882 787 867 882 787 1048 17 1048 615 664 923 664 59 797 207 1049 849 1049 1047 663 579 17 567 17 341 601 548 938 592 592 1050 938 1050 200 1051 1052 1051 200 1052 502 683 17 683 17 502 1053 1054 1055 1053 1054 1055 905 824 824 457 717 1056 1004 1056 635 696 240 635 471 143 9 143 200 332 200 777 127 616 76 1057 9 76 9 1057 685 575 1058 575 1058 685 1059 402 17 1059 404 13 9 404 9 13 1033 1060 17 1060 17 1033 741 1061 1011 1061 1062 17 1063 17 1063 1062 889 925 925 888 1064 17 911 1064 407 704 1065 704 1065 407 287 365 17 365 826 236 188 702 605 550 550 370 977 859 977 846 846 859 794 37 862 37 873 963 439 1025 1025 649 48 663 663 46 749 897 9 12 233 1066 9 1066 480 47 627 97 316 843 9 843 9 467 249 79 79 240 44 527 6 356 1067 17 1012 17 1012 1067 394 994 523 394 49 934 50 934 1068 592 938 1068 1051 881 61 1047 61 1049 974 932 145 974 932 145 681 684 574 684 667 1069 1070 1069 667 1070 669 733 733 84 943 1041 184 832 909 6 6 155 909 155 195 960 195 577 522 19 1071 757 9 1071 9 757 195 342 200 1072 486 1072 643 672 947 17 358 126 126 717 1073 840 647 840 647 1073 195 948 195 927 1 1074 999 1074 865 294 493 846 846 324 493 324 886 1024 79 726 189 726 1000 816 1075 928 1075 929 184 600 240 636 240 1076 636 1076 1002 65 17 65 17 1002 350 68 17 68 37 1077 862 1077 208 1078 227 1078 1079 1056 1079 821 1056 821 620 1006 159 900 900 158 311 521 521 242 92 487 719 177 54 17 55 17 663 1080 1080 579 17 21 17 991 1078 8 1078 210 1000 1081 1001 1081 189 727 1082 471 1082 143 461 661 17 661 79 547 79 1083 547 1083 260 198 261 198 576 966 966 217 17 111 17 110 785 1084 17 1084 17 785 931 386 924 931 805 149 243 521 414 7 807 1085 1085 793 1 956 1026 956 463 959 959 451 441 1086 9 441 9 1086 766 376 766 1087 1087 376 1088 575 1088 1058 195 26 510 190 9 510 78 98 195 1089 656 1089 111 1059 1059 417 1090 208 1091 208 1091 1090 6 406 146 964 188 984 1 1092 1040 1092 496 677 1093 775 775 765 1093 765 713 613 17 613 1094 1095 1094 1096 1096 1095 675 1020 208 1097 209 1097 161 587 524 172 9 172 484 746 746 995 9 627 9 97 162 775 164 775 1 204 1 1098 204 1098 1028 1099 513 1099 513 1028 6 225 734 796 9 796 1100 471 1082 1100 1101 17 1101 202 79 545 36 545 804 893 893 286 184 1028 1022 902 902 619 619 1022 1102 17 1102 214 17 214 715 130 252 806 806 884 74 810 9 120 452 464 464 93 240 774 240 721 721 774 184 1103 184 1104 1103 1104 845 947 136 173 809 106 184 1105 1105 600 218 979 346 569 9 569 919 17 919 343 1034 866 17 1034 992 1106 1106 229 1107 17 917 17 917 1107 663 278 278 1080 9 865 9 294 1108 17 1089 17 1089 1108 200 929 883 477 811 942 923 1109 664 1109 584 1110 9 1110 9 719 9 177 101 972 164 1093 1111 1061 1111 1112 1112 1061 366 244 9 447 9 628 712 45 9 45 195 1113 857 1113 1080 379 379 278 535 670 1114 240 240 990 1114 990 64 500 895 970 970 674 255 870 267 885 1115 604 9 1115 9 604 299 530 530 300 9 1050 666 77 17 666 1073 1116 1116 840 159 826 9 826 1117 63 1118 63 1118 1117 562 941 344 631 631 980 1049 986 986 849 1029 48 278 1119 1119 279 617 597 9 597 1120 1055 1120 1053 711 555 360 619 603 17 231 1021 233 942 942 232 698 1047 184 1121 832 1121 1027 17 549 714 1044 549 1053 470 470 1120 9 500 1025 542 913 935 935 345 196 927 200 1090 200 1091 1003 1122 1122 317 317 1003 709 1123 1123 975 1057 503 9 503 1124 762 1125 1124 762 1125 240 90 240 88 6 1126 1096 1126 6 1096 1127 981 240 1127 922 359 1128 922 359 1128 264 380 9 264 9 380 72 920 184 1129 1129 1105 965 665 758 1128 1037 716 716 357 475 462 9 462 1130 28 1130 33 6 962 916 962 6 916 101 973 333 928 9 928 1098 444 838 1058 1131 1058 838 1131 614 564 1132 764 1132 727 1133 669 9 1133 9 669 465 686 686 393 195 149 818 90 6 969 1134 952 1134 557 557 952 427 318 9 682 1 910 208 1087 208 844 1087 844 1135 4 5 1135 195 25 256 1136 1136 338 195 1108 9 1061 1137 27 1137 257 1138 117 1138 272 1139 929 200 1139 1140 574 684 1140 480 369 369 47 684 1 1 1140 290 1030 1030 482 1141 876 6 1141 1142 1050 1050 740 1142 740 198 256 90 817 830 1030 1109 517 1143 17 1143 516 9 851 1144 928 1144 1075 526 1115 1115 560 560 526 1097 7 1 761 1092 761 128 715 9 529 9 530 256 1058 708 785 673 759 17 759 382 1145 9 1145 9 852 9 853 1035 55 1026 17 306 1013 240 607 915 607 240 421 240 422 256 685 1 1146 904 1146 709 1005 1005 1123 240 1147 721 1147 6 1032 1148 575 1148 1088 918 17 863 67 9 67 184 1149 1149 1129 347 598 127 1056 1056 126 871 581 9 581 901 426 17 426 17 901 704 476 476 1065 552 17 639 552 193 1122 9 1122 449 341 1150 530 1150 823 1151 382 1151 381 6 815 6 814 508 1085 753 804 9 804 801 1071 409 1006 1006 408 1152 317 285 1152 1128 361 705 37 9 37 1076 1127 694 789 9 789 1145 544 9 544 114 89 9 114 9 89 1153 17 706 17 706 1153 9 662 9 112 1120 240 1147 1120 894 367 9 367 655 406 79 938 79 593 938 593 256 1137 288 1154 1069 1154 1069 288 975 379 975 1037 227 802 1028 48 48 1099 1016 349 1147 470 1147 471 570 485 9 570 9 485 640 1077 1077 529 9 940 398 368 331 123 9 123 122 329 17 122 250 1055 250 1155 1055 1155 837 17 394 686 9 758 9 1128 765 163 9 163 506 17 507 17 231 224 9 224 184 1156 1121 1156 612 800 800 642 444 62 1098 62 150 1 1 533 904 385 385 903 1056 1157 1157 127 9 205 9 206 703 1158 1158 364 195 343 559 819 559 630 630 819 489 901 1020 453 454 1020 1159 17 1159 724 433 1109 1109 432 184 963 403 15 17 15 304 650 1092 17 1040 17 332 586 9 361 1005 716 1123 716 49 131 49 1160 131 1160 709 1004 558 952 731 849 475 1039 1039 474 735 544 536 544 184 1161 1161 1149 9 428 1010 744 1010 745 195 879 195 780 125 953 860 118 1086 253 9 253 751 17 751 512 532 976 1162 953 1162 1134 1134 953 248 877 792 654 9 792 9 654 961 969 409 276 9 276 277 245 1155 1163 1163 250 593 1068 982 954 551 447 684 256 9 841 1164 63 1140 63 1140 1164 782 1165 782 1166 1166 1165 9 300 827 534 871 255 1 911 884 807 301 501 17 501 195 578 1042 578 195 1042 240 1073 240 1167 1073 1167 195 1168 1108 1168 820 185 820 425 99 78 418 1059 1169 17 1170 17 1170 1169 1152 1122 1 203 1117 203 1 1117 17 207 17 797 936 571 17 571 1039 1171 1171 475 1070 1154 1070 1172 1172 1154 191 448 448 190 240 498 321 498 1 760 945 152 9 945 9 152 584 1014 104 1173 1173 284 1052 725 1051 725 783 1174 17 1174 937 1050 1142 937 435 921 299 1150 788 882 655 17 940 353 9 353 6 1138 6 272 899 229 229 898 17 830 549 601 194 195 195 192 1175 1176 1175 1162 1162 1176 418 404 607 940 1161 128 1161 129 1153 39 954 352 458 824 1148 1058 1 1118 1164 1118 1 1164 1171 463 17 463 17 1171 174 136 1177 740 1177 1142 184 1178 1178 1161 857 17 858 17 258 839 703 839 256 1179 955 1179 256 955 888 644 17 527 17 44 79 937 721 143 721 1082 9 525 9 526 371 550 695 940 1084 430 17 430 9 1077 586 333 9 19 9 20 9 1099 240 968 422 968 618 387 388 618 49 40 331 319 953 1176 915 940 195 770 1131 364 364 838 1113 948 547 704 547 705 146 932 240 609 864 913 17 913 920 254 9 711 9 555 676 251 17 251 1131 1148 315 243 240 383 240 381 151 228 610 228 561 1115 819 558 558 238 1076 270 636 270 1031 1137 256 1031 281 17 2 17 958 137 137 336 336 958 983 732 9 732 1168 17 985 70 9 70 876 17 1141 17 694 1033 611 713 713 277 79 1111 1180 1111 79 1180 951 492 9 951 184 1102 1156 1102 767 198 1174 443 17 443 422 31 195 831 195 890 1083 476 581 1016 835 662 898 1 195 1 1074 903 1074 385 240 1181 735 1181 480 1119 1119 369 218 966 1082 1147 85 733 1085 510 9 1085 1003 193 184 742 742 1178 617 1165 1165 616 240 1151 1182 1151 240 1182 9 137 9 138 933 621 9 368 1183 725 1183 1052 419 208 420 208 208 748 208 747 432 265 957 267 182 957 6 1046 6 850 488 92 863 1002 17 96 17 95 9 14 875 17 590 768 768 589 1 1064 139 439 195 1143 1168 1143 514 1099 1099 1184 514 1184 6 39 6 1153 9 57 774 142 168 436 1185 436 168 1185 561 606 17 606 51 166 215 17 944 124 810 1038 1038 74 538 988 208 538 1000 817 620 902 844 376 49 1173 1 872 6 1186 1107 1186 6 1107 63 574 691 208 691 423 967 736 1095 1187 9 1095 9 1187 1018 573 9 573 518 1109 432 518 15 442 585 996 996 468 313 1034 17 176 17 175 728 1132 699 60 60 698 1117 62 240 1017 1017 421 752 17 474 1038 51 556 79 1188 249 1188 184 739 739 742 622 666 640 861 79 640 563 460 17 252 92 531 22 968 187 820 9 327 1113 17 17 275 1127 270 980 237 17 244 17 366 643 800 1189 774 774 144 1189 144 1185 169 1106 898 17 293 1133 746 668 1133 195 815 440 139 588 161 995 1133 943 233 49 118 813 594 9 594 355 1103 1183 119 997 797 9 995 50 556 1083 704 846 243 846 241 1188 852 1188 1190 1190 852 708 429 9 429 157 851 80 640 80 641 1017 809 17 484 17 483 161 583 1071 672 673 1071 885 957 675 970 833 41 1160 41 1160 833 999 386 930 386 1066 779 240 1191 609 1191 539 889 17 889 1139 133 1072 133 1072 1139 1192 1142 1192 1177 786 856 671 535 783 671 825 159 240 907 907 648 1110 707 889 988 841 988 1193 592 1193 593 1023 784 17 784 150 195 738 767 1126 1032 978 17 184 632 784 1110 1 724 929 1144 1139 1144 1165 595 1079 1157 958 182 950 532 261 376 17 261 9 884 9 807 17 69 121 331 1151 1145 1182 1145 1163 853 1178 129 129 743 1178 743 1 456 1064 456 49 528 1194 528 49 1194 743 154 195 516 949 297 651 304 565 101 753 701 701 645 17 234 821 941 493 821 1130 634 256 1130 79 1112 1080 378 1181 1182 1 971 398 709 1047 60 287 893 330 850 263 432 1023 584 240 415 17 318 17 427 734 85 164 765 9 291 697 845 17 845 184 630 1060 791 17 791 9 310 9 311 314 866 867 314 256 170 170 436 348 598 598 704 348 704 79 1010 79 1011 1195 580 1195 1196 1196 580 859 914 337 623 391 1116 392 1116 1019 163 387 248 9 847 419 855 17 920 1186 17 1186 837 1197 862 1197 1077 17 490 678 496 1198 17 971 1198 79 764 764 726 933 146 812 883 883 788 454 147 827 99 1146 993 1146 992 9 325 17 108 79 602 391 271 271 1116 219 945 1008 1095 449 191 1131 575 575 364 532 951 1192 740 744 740 744 1192 346 935 989 879 195 989 240 1199 1199 1191 6 908 813 477 477 812 967 218 497 134 9 605 184 559 1124 200 200 1183 1124 1183 821 1004 803 753 1191 437 1191 700 158 458 222 231 864 174 17 179 1126 1095 9 729 455 1063 750 17 856 17 551 371 196 17 589 435 1176 125 648 840 1136 170 1060 694 1156 17 1121 17 163 1154 9 1154 378 264 256 1048 1179 1048 715 1045 1 455 520 152 79 299 195 1043 25 1043 195 515 894 287 985 350 1 1159 274 409 1 1198 153 520 335 139 17 360 17 359 115 89 505 115 754 49 49 820 914 316 795 37 9 778 195 1101 763 1101 195 763 868 1130 6 961 444 212 9 993 1184 1007 9 1184 119 1124 1104 1200 1184 1200 1104 1184 87 450 184 557 1009 454 9 464 9 465 944 558 1055 470 1054 470 36 705 566 973 974 566 171 524 375 1174 1174 374 899 228 240 24 1199 24 338 580 1129 1044 1129 1045 1172 1069 17 653 9 236 1201 1017 1017 106 1201 106 861 1077 9 888 9 644 79 1150 538 889 1179 17 1149 128 1018 1025 878 827 17 554 798 411 1167 1116 1167 392 243 859 1136 580 1196 1136 402 418 1122 220 9 220 9 626 896 1141 478 813 1202 437 1191 1202 809 1201 1136 1195 338 1195 1124 118 1124 49 374 783 24 968 256 260 898 992 553 256 256 552 184 1134 256 868 1203 771 1204 1203 771 1204 601 1044 1150 81 965 621 621 964 777 333 1205 208 199 208 199 1205 936 346 187 49 1066 943 1041 1066 912 864 240 637 1057 301 9 522 504 17 302 17 9 718 414 1114 1206 157 1206 851 6 330 9 369 690 208 6 1094 4 1094 928 133 9 133 1 1063 515 1027 1103 1007 880 497 735 1145 1 874 211 874 1154 308 833 296 1200 184 1200 514 459 638 736 979 107 736 1 1170 1198 1170 500 239 79 1190 983 1176 776 144 776 765 904 993 240 1055 9 612 595 617 1061 852 195 18 1207 18 195 1207 604 561 493 1079 17 925 1105 601 814 117 240 775 801 643 195 687 9 576 472 208 993 385 553 260 184 1162 1105 1044 1103 1184 17 66 537 544 9 980 152 228 776 1189 240 720 798 1081 1081 411 952 944 727 702 9 727 408 620 811 678 232 811 1090 420 659 755 755 208 1126 1008 622 965 814 1138 1125 119 1 924 874 924 56 743 839 364 1158 839 17 828 1181 1145 79 744 278 397 779 1041 178 779 297 1160 297 49 1100 1147 195 688 757 673 6 1206 1046 1206 1045 128 9 1116 322 114 9 322 493 1166 1166 1079 424 323 323 114 184 1175 65 863 16 506 1203 466 1203 200 1062 363 339 449 208 185 1097 185 1139 928 1084 708 747 539 1 1062 665 622 9 773 13 403 472 660 240 667 1203 625 1 1169 1068 1193 1180 1061 200 854 445 551 195 202 1078 802 501 1057 1190 1180 1180 852 453 675 852 249 835 461 17 922 17 756 756 978 190 509 184 987 987 1175 964 933 997 734 17 895 866 313 987 730 1175 730 899 610 1132 726 1016 871 5 1187 1135 1187 450 500 285 1122 87 500 17 810 208 540 747 540 17 959 462 1171 1031 27 200 49 43 712 689 333 9 905 391 720 9 906 1173 1194 667 308 1070 308 1166 1157 616 1157 240 505 1206 908 184 986 1086 676 527 560 817 1081 979 967 1199 437 24 437 786 17 185 414 185 7 195 153 200 855 853 470 220 945 195 16 1 363 661 835 509 448 1207 17 17 806 672 801 9 885 336 139 240 288 240 162 1 1036 1169 1036 1194 239 1194 284 68 985 973 565 939 1050 248 618 533 1159 184 1049 1187 156 1202 1199 9 1081 1123 1037 365 894 195 1067 289 1154 796 997 170 580 251 1086 79 1142 1205 1091 542 1018 89 817 9 817 184 61 1094 1187 1187 4 435 768 289 163 569 936 1 362 1157 1165 9 1022 1176 730 1 1035 1055 853 749 17 999 385 730 983 1112 1011 690 767 184 59 1015 1001 240 1069 429 1084 1110 1023 481 17 679 17 79 1192 1067 1207 467 1203 200 1205 186 240 185 1114 507 890 1149 1045 861 1197 208 766 1155 853 1204 467 875 918 1 992 1015 1081 186 1114 208 767 789 1060 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 43 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 170 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 189 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 102 292 293 294 295 138 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 26 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 139 335 336 54 337 338 339 340 341 342 343 344 345 346 347 348 1 349 350 351 352 353 354 355 268 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 86 376 377 378 58 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 36 407 408 409 410 411 412 413 334 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 62 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 386 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 408 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 239 519 296 520 521 522 523 524 525 526 527 441 528 529 530 531 532 533 534 535 536 537 538 238 539 540 541 542 543 544 545 546 547 548 222 549 550 551 552 553 554 136 555 556 557 225 558 559 560 561 562 563 564 565 566 567 568 569 570 407 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 70 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 412 615 616 617 618 619 620 621 622 623 624 625 234 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 347 647 648 649 650 651 652 653 159 654 655 656 657 658 560 659 660 661 662 663 664 665 35 497 666 667 668 669 670 671 672 673 674 675 44 676 677 678 679 680 681 682 377 103 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 448 233 698 699 700 701 702 703 704 705 706 707 708 395 709 710 340 711 712 713 714 715 716 717 718 293 719 720 721 722 723 724 725 181 726 727 728 729 730 731 732 733 252 734 735 736 737 738 739 740 741 742 675 743 744 745 666 746 571 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 642 787 788 789 790 791 792 793 794 795 796 797 798 271 799 800 801 802 803 804 805 499 806 807 808 809 810 811 812 813 814 815 816 817 818 819 518 552 466 820 29 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 372 840 540 841 842 843 844 423 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 762 125 864 865 83 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 429 885 886 887 888 889 446 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 457 918 128 919 7 734 920 921 259 922 923 924 50 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 704 942 943 944 945 387 479 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 583 961 962 963 964 873 965 966 375 967 968 969 970 645 190 971 972 973 974 975 976 977 978 979 980 981 982 983 712 984 887 985 986 987 988 989 806 990 991 421 992 993 994 995 996 997 998 999 1000 681 1001 1002 1003 1004 343 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 920 1015 1016 850 1017 1018 1019 1020 1021 1022 1023 1024 226 1025 1026 1027 465 1028 1029 1030 1031 1032 555 295 1033 1034 477 1035 1036 1037 1038 1039 1040 1041 771 1042 1043 1044 78 1045 1046 662 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 892 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 300 1074 1075 1076 1077 1078 1079 1080 1081 1082 730 1083 1084 1085 872 1086 1087 1088 993 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 575 1100 1101 1102 1103 1104 1105 1106 219 1107 424 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 471 346 581 1126 1127 1128 1129 1130 1131 1132 142 1133 1134 84 634 1135 986 1136 1137 398 356 1138 1139 793 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 332 1151 1152 917 1153 1154 1155 1156 327 1157 1158 1159 1160 1161 622 1162 614 1163 1164 1165 40 1166 1167 1168 832 269 1169 1170 1171 1172 1173 1174 991 1175 1176 401 1177 973 1178 981 1179 330 547 1045 1180 1181 1182 1183 1184 1185 1186 987 1187 1188 1189 1190 1191 728 1192 1193 1194 1195 1196 12 1116 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 288 1210 1211 439 1212 171 1063 1213 1214 1215 550 31 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 755 1228 874 1229 1230 1231 1232 1233 1234 147 1235 9 1236 1237 1238 1239 1240 1158 1241 1242 1243 514 1244 1245 1246 1247 1064 1248 1249 1250 478 549 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 668 1261 1262 135 1263 1264 593 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 289 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 721 1288 1289 512 665 1145 1290 1291 193 1292 1293 1294 1295 1296 89 1297 20 1298 1299 1300 132 1301 249 1302 1159 1303 1304 1305 121 1306 1307 1308 48 1309 1310 1311 1312 1313 969 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 30 498 1324 1325 1326 960 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1109 1337 1338 1339 1340 1011 999 1341 1342 1343 1344 1345 680 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 697 1358 1272 1113 1359 1360 1361 1362 1363 394 1364 1365 1366 1367 1368 1369 1123 1370 1371 1372 368 1373 1374 1020 1375 1376 1377 1378 1379 1380 1381 1382 163 1383 1384 114 1385 1386 1387 34 1388 1389 1390 1391 218 1392 1393 1394 1395 1129 1396 326 1397 1398 1399 1400 1401 1402 434 1092 1403 256 1404 1405 1406 1407 1408 502 1409 1410 1411 1412 1185 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 310 1426 129 574 1427 1428 1429 1430 586 1431 1332 1432 1433 522 1434 1435 1436 1329 1437 1438 1439 1440 1303 1441 1442 49 787 1443 1444 1445 1446 227 1447 1448 1449 1450 1451 1452 364 1453 1454 1152 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1275 1466 1467 1206 1468 1469 1470 531 1471 462 1472 1473 1474 392 1475 1476 1477 1478 1479 215 1480 1481 1226 1143 1482 1483 1484 894 1485 1486 1487 488 1488 491 1489 1490 1491 520 425 1492 1493 1494 1495 405 1496 1497 1498 1499 859 1500 1501 798 1502 1503 779 1504 1505 1506 1507 1508 1509 1510 1511 1512 1433 1006 1513 1514 1515 1516 1517 1416 1518 1519 1520 1521 1522 1523 1524 1179 1525 1526 1527 1528 563 1529 1530 1531 829 1532 1127 1533 1534 1535 1536 802 1537 1538 1539 1540 1541 1542 1543 905 1544 1545 1546 1547 1548 1549 844 1400 220 1550 1551 1552 1198 351 1553 1554 1555 1556 1557 764 1558 1201 1166 1559 1560 1561 1562 1563 1564 1565 1018 1566 1567 274 1436 1568 1569 1570 1571 1572 117 1573 1574 1575 1576 1577 1376 1578 1579 291 1580 1581 705 1582 1583 1584 1457 1585 1586 1587 1588 1589 1590 1488 1591 1324 836 1592 1593 1594 1595 1596 1597 1598 470 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 381 1002 1612 1613 75 1614 1209 1615 467 1616 316 1617 1618 1619 1505 1620 1621 1622 1623 1624 1625 1626 1007 1627 1248 1628 1629 1630 1631 1632 799 1633 1634 1635 1636 1637 1638 1639 169 1640 1641 1642 1643 1644 1645 1646 427 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 846 1657 1658 1204 1266 1659 1660 931 1661 212 1662 1663 505 1312 1664 604 1665 1666 1395 1667 1668 1669 781 1670 1671 1672 1673 1674 68 1675 1676 561 1677 1040 1678 1679 1680 822 612 1681 1682 1683 11 1684 1685 1686 1687 1688 1432 1689 1690 703 1691 842 1692 1693 1694 1695 1302 1696 1697 1698 1699 843 1700 688 1701 1214 1518 1702 1068 1703 1704 1705 1225 534 1638 1706 1707 435 1708 1709 1710 1711 150 1712 937 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1613 1725 1726 1727 1728 1729 1568 1730 1731 1632 1732 1733 1044 1734 1735 1736 1737 1738 1739 209 1740 710 1741 1742 1743 1744 1745 876 1746 1747 1748 1749 1750 1751 652 1752 1753 1754 1755 273 1756 1757 789 1758 1759 636 529 1760 1761 98 1762 1022 824 1763 431 1764 1765 1766 539 1767 188 1768 1769 1770 1013 186 1771 156 1772 1464 609 1550 1773 1774 1775 1776 1710 1777 1446 1778 1779 393 1203 1780 1781 1782 1783 1300 1784 1785 1699 577 1786 1787 221 1788 1789 1278 1577 1217 1790 1791 141 449 1792 1793 369 1794 1795 1796 64 1797 1798 711 1799 1800 1801 1802 1803 1804 1805 1806 1807 1594 923 1808 1809 1810 1811 1812 1813 1814 389 1815 1816 1057 1817 1818 1819 1820 1821 1822 785 1823 1824 1825 1826 123 1523 1827 1828 1829 1830 1831 1832 1833 1834 1835 1553 1836 1837 1367 1838 1839 1840 1841 1842 1843 1844 1298 1776 1149 1845 1223 1846 1847 1848 1849 312 1850 1785 1851 939 1852 1853 1854 134 935 350 1544 1836 1855 944 1856 1857 719 92 1858 232 1859 538 1860 1042 775 1861 1862 1863 936 566 1864 1865 1866 1867 1868 1869 361 1870 1871 1872 1844 1873 1874 654 671 1875 1876 1877 1808 452 1878 1879 1170 1880 1881 1882 461 1883 964 284 1884 879 1885 1886 1887 1888 1889 1890 1891 1892 1417 1893 1894 1851 1895 1896 1897 1077 1363 1898 1899 1900 1901 1627 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 985 1912 1445 1838 1778 1913 1384 1914 1810 1915 1916 1917 1918 1919 1920 1921 21 1922 1391 1923 1614 1924 1925 1926 1927 1928 1929 1487 1930 1931 1932 1930 1933 1934 1935 1936 1937 1663 533 1041 1639 1938 1939 1940 336 1270 927 1941 1646 1087 1210 1942 835 1943 1944 475 1945 1946 484 1947 743 1948 1949 1950 1951 1952 1953 1954 1955 855 1956 1578 1957 37 1958 1959 761 1960 1590 1961 1141 1962 1963 1349 1964 1965 1966 620 1967 1968 1969 814 1970 1971 1972 1973 977 1974 1975 1241 1976 1977 1347 1978 1979 1355 1980 1527 693 1981 1809 1982 1983 1984 1985 1188 1986 1987 1453 1988 732 1989 442 808 1990 1991 1850 739 1992 1479 1993 1994 953 481 1995 782 175 1996 1997 1998 858 1999 2000 2001 2002 1798 2003 1221 250 2004 1977 2005 2006 1863 1537 884 2007 2008 837 1139 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 1993 1801 2024 2025 1008 2026 2027 2028 629 2029 2030 1174 2031 2032 153 861 2033 2034 2035 2036 2037 2038 2039 1435 2040 2041 2042 2043 2044 2045 2046 1824 2047 2048 2049 2050 2051 2052 1439 2053 2054 1507 2055 2056 2057 2058 2059 2060 358 2061 287 1294 2062 1762 1447 2063 2064 1657 2065 2066 2067 2068 2069 1790 1640 1398 2070 2071 910 2072 51 2073 2074 1458 2075 1111 1683 384 2076 2077 285 2078 644 2079 1443 2080 113 1746 2081 396 2082 965 990 2083 2084 305 2085 2086 1308 716 2087 1015 453 2088 2089 2090 2091 2092 1800 2093 2094 52 2095 2010 2096 2013 1893 2097 2098 2099 2005 2100 2101 2102 2103 2104 975 2105 2106 2107 2108 2109 950 2110 1940 1575 2111 1306 1826 2112 2113 2114 2115 1633 2116 2117 1921 1741 2118 2119 2120 1899 1764 2121 2122 2123 1874 2124 956 901 1618 2125 1586 2126 2127 1055 1144 1168 1972 2128 2129 2130 924 1596 2131 2089 242 1831 1837 1546 2132 1773 2133 2134 2135 367 1914 2136 2137 2138 1688 1889 2139 2140 2141 228 1780 1466 2142 1548 2143 2144 2145 1991 1592 2146 2147 2148 2149 2150 2151 2152 2153 443 1140 840 374 2069 2154 2155 2156 2157 275 2158 2159 2160 2161 1806 867 192 2162 2163 2164 2165 1815 106 2166 1455 2167 214 1817 2168 2169 59 2170 2006 2171 1920 2172 2173 733 2174 2175 2176 2177 1781 1070 2178 2141 2179 2028 2180 2181 2182 1163 2183 2184 2185 318 2186 2187 2188 2189 1502 133 2190 2191 2192 2193 2194 2195 1539 2196 182 1240 2197 297 2165 2198 2199 773 8 2200 2201 1246 2202 2203 1900 2204 617 2205 2206 2207 2208 2209 2210 2211 2037 2212 2213 2214 321 1902 2215 2216 231 88 1196 2217 2218 2219 922 2220 1262 2221 2222 2223 2224 947 527 2225 2226 176 1643 229 1720 2227 2228 2229 1936 667 1959 2230 2231 2232 2233 2234 2235 1048 2236 2237 2238 2239 959 1876 251 2240 2241 195 2242 1725 2243 713 2244 2245 1751 2246 2080 2247 2248 199 2249 2250 2251 2252 2253 2254 2255 2256 2257 272 2113 2258 1080 2259 2260 2179 2261 243 2262 2263 2264 2265 1957 2266 2267 1239 694 2268 2256 2269 2270 2271 2272 2273 2274 2275 1052 187 2276 1425 2277 82 2278 1255 143 1069 2279 2280 2281 1631 2282 2283 2284 2285 2286 2287 1337 1587 2288 162 1372 2289 2290 127 1252 2291 2145 2292 2293 1705 264 2294 438 2295 432 2296 2297 2298 1387 2299 1742 2300 2301 2302 2303 2304 2305 2170 2306 2135 2307 2308 2309 2310 2311 2312 2031 1549 2313 641 1422 2314 1576 1260 2001 2315 2316 2317 812 2318 2167 2319 2320 118 1822 2321 2250 2231 2322 2323 2324 2325 2326 1598 1074 1263 2327 2328 2329 1181 2330 1250 525 946 2264 2183 744 2331 2332 1361 2333 2334 2306 727 1411 2335 2336 2337 2338 72 677 2339 2340 1987 2341 311 1419 2342 325 1428 2343 2344 2345 2346 2347 2348 373 2011 1024 2349 2350 968 2351 2128 2352 2353 2354 194 2355 2356 2357 2358 774 2359 1571 2360 1707 2361 2004 2362 2363 1906 2073 2364 2365 344 2366 2367 862 2368 2369 2020 2370 2371 760 1734 2305 786 2074 2372 1882 2271 1766 2373 841 280 2374 1885 283 2375 2376 1769 2377 1978 2378 2379 2111 320 2380 1903 2381 1953 2382 1090 2360 883 2257 5 1756 2383 2384 2370 676 998 2385 1894 2386 740 2387 1509 2388 2132 2389 236 2390 2224 2391 2392 2393 2394 2395 1677 2396 2397 2035 2398 2399 2400 2401 2402 2403 105 2404 2405 2406 1708 2407 2408 2409 2410 2411 2412 2413 2414 79 2415 1529 2416 2291 2417 2418 1644 1852 2419 2410 1533 2420 1932 2421 2422 635 2423 2424 1323 2425 2426 2427 2428 2429 1672 119 2430 758 2431 590 2432 2252 2433 2434 2435 778 857 2436 2437 1963 2438 2439 2440 2441 2442 2443 1967 2444 2197 1975 2402 2445 1465 513 1971 390 2428 1517 1317 262 1655 2446 2447 2448 2449 980 2103 974 2450 1676 1177 1344 2398 2451 2452 1621 2202 2453 2454 2455 4 2456 2457 2458 27 2214 2459 2460 426 2461 2311 2218 2047 1095 2462 2463 2464 1616 335 2465 2466 2312 2467 2468 2469 2104 2470 2471 2472 2079 2473 2474 2470 647 2475 2476 1407 2477 2478 2479 2480 2481 2482 1493 240 2483 1276 2445 2484 1695 2476 2315 1535 2485 699 2486 2487 1350 2488 140 2489 2490 2143 2491 2492 2493 2241 2494 919 2495 2496 2228 2275 155 2497 94 1739 877 720 2498 2499 2433 1320 2500 1035 2501 1194 2502 2503 955 2504 1326 2505 1353 2506 2507 2169 1926 2508 2509 1247 1901 382 2510 1974 2511 2512 1513 2513 551 2514 2500 2515 2038 2516 2517 1476 2518 2395 2519 2283 2520 2521 2087 1916 2522 2523 2524 2212 2303 2525 1521 2526 1380 2527 2528 2416 2529 2530 1211 834 151 2531 2532 2533 1394 2534 2535 2536 2537 2057 2538 2539 2540 895 2541 2542 450 2543 2544 2008 595 177 1812 1058 2545 2546 1288 489 2547 2548 2549 2550 1273 1213 2201 2551 2552 1119 2553 2554 1232 2119 530 2555 2556 397 2557 2558 2559 460 2411 2560 1031 2561 2408 2562 2147 2563 1003 2564 2565 2505 2566 2567 2568 2569 410 1570 2138 1905 2268 1713 2570 2571 2572 1854 2573 2574 2575 2576 2520 2577 1451 2578 2225 2579 1016 2580 2581 2582 314 2464 2583 2584 2585 2586 2587 1929 2588 276 2589 1330 2590 2591 2254 2592 444 1849 2593 627 2594 2595 2596 2597 2598 2599 897 1566 1100 2600 515 2601 580 2602 418 2603 2604 1164 2605 2606 2607 2608 1516 2609 1318 509 2443 2610 2419 2611 2612 2613 1148 2614 2615 687 2616 2617 282 2618 2619 2620 2378 2621 2622 1956 2623 2624 2432 2625 2626 726 2627 2628 1477 2629 2531 2630 248 2631 2632 1027 2633 2634 2121 433 2635 2636 2637 2638 1696 2639 1468 602 2640 2641 1065 2642 2643 2644 2645 567 223 1641 2646 2647 2648 1434 379 2649 1873 2650 2651 2229 2030 815 2652 2559 2612 2653 2654 2519 2655 2656 2657 2658 2659 2518 1802 765 2660 2449 2661 1897 1348 633 2662 2663 2664 2665 1082 2666 2528 2667 658 1698 2668 2093 126 1557 2669 1103 2670 2671 2672 1414 148 2673 1607 2674 144 1777 2675 2208 2676 692 2677 2678 722 2679 1687 2680 2681 2682 2590 1907 2364 302 2683 1431 2684 2685 2686 2296 691 1526 1654 1634 2687 2688 532 2689 341 2690 301 2691 2607 2692 2582 2693 2096 1610 2694 1709 2695 752 2327 979 2515 2696 1331 1236 2697 2698 2699 2700 2701 2702 2703 2348 2499 2704 2705 729 1296 1392 2706 2342 2310 1807 2219 2707 1506 2452 2708 1245 2277 2709 2710 967 2711 2712 2713 2714 2715 2716 2717 2718 2461 109 2281 621 2719 2720 558 115 2721 2217 541 2722 2221 2723 2724 2725 2557 2393 2726 2727 2728 2729 2003 2730 2731 2732 2733 1561 2734 2662 2735 2736 2737 2738 230 2739 2740 2741 2742 1495 2743 1131 2495 2587 1678 2334 2744 2745 2746 810 2747 1842 863 2748 2749 2750 2014 2751 623 2083 757 2752 2753 1191 2754 2479 2755 568 1531 2756 2545 2347 2757 1202 2758 1998 526 2759 2579 2760 2600 2761 2762 2763 2466 2764 2765 1461 2484 1910 2766 747 2767 2009 2768 2769 235 1341 2066 1689 2770 2771 2772 2773 543 2042 2774 848 1567 929 203 1942 2775 154 2776 41 2570 2777 1775 2694 2778 2024 2127 2532 608 2023 2779 85 1853 2034 2780 2213 2524 2781 2782 2783 2784 2785 2786 210 2787 2289 2481 2788 2789 2790 2666 2791 2792 2793 1362 2794 2795 1028 2796 2797 2798 2799 1543 2053 2086 2800 2801 2802 2580 1563 2803 2804 2180 714 2805 2806 474 2064 2807 1625 2808 2760 2809 2810 2193 1491 663 1243 2599 2811 2498 1969 756 2812 19 2813 2814 2591 926 2815 2816 2514 2817 500 2818 2819 2820 45 71 416 2821 402 2680 2822 2772 1514 2823 2808 1976 1160 2824 2825 2826 2435 1504 2436 1499 2131 2827 2331 2828 1029 2829 174 2830 2102 2511 2831 849 599 1630 2205 2832 2833 1382 2834 2415 1420 2371 2835 2836 2837 2838 1327 2780 2839 2434 454 1054 2421 707 2840 2198 2841 490 2842 1786 1399 1397 2843 2844 853 2251 246 2727 768 2492 2845 2846 1277 2847 2148 2848 2849 2583 2850 2851 2852 2853 348 2854 2855 2856 2857 1712 2858 2859 2309 2718 2860 1723 2861 2862 2863 2477 1001 2864 1919 1004 2865 2866 329 168 548 2867 2868 2869 2870 2871 1180 2872 2873 2619 1154 2187 2874 2875 2876 2753 33 2877 1216 2878 1442 2879 637 2880 2184 2592 2881 809 2882 1316 2573 1459 2883 2884 2885 2628 2886 1081 2887 2888 2471 2889 2890 263 2189 2891 2521 2892 2804 97 2109 2893 2894 2895 2216 2896 2542 2392 2897 2790 2898 860 2899 2900 399 1796 2394 2901 2902 2903 165 2904 2905 2906 871 1555 2601 1862 2907 2750 2908 2909 2910 2911 545 2912 2913 1110 565 2914 1538 1787 2915 2916 10 90 1834 2917 1964 2918 2139 1891 1511 655 2166 2919 1378 2920 1784 112 2921 2922 13 2043 2923 2924 2862 1406 821 2925 2926 2644 938 2316 2927 2055 2707 2116 801 2711 2928 166 911 2929 2930 2717 2931 2932 2933 2934 2777 2935 61 1768 2936 2284 1061 2937 2938 2939 2940 2941 2942 769 2943 1268 337 2944 2274 257 2945 1580 149 322 1691 2413 2946 2278 2947 2948 2949 1729 1274 2950 2142 866 2270 2951 1335 483 2952 2953 2748 124 2954 1396 2743 2955 2956 2957 2958 69 795 554 2959 2960 2961 1649 1084 2962 2963 2964 2965 1869 2966 2645 2967 2968 2969 1328 2648 1968 2970 2971 1473 2972 1923 213 2973 2974 2438 1072 2975 1012 2976 2977 2978 67 2356 2513 2979 2980 2677 2981 1115 1134 2982 2947 2983 1588 2943 2969 14 584 2084 2984 2985 2986 2897 2987 2988 2351 870 1375 2989 2990 613 2991 1503 308 2992 2838 2993 1686 2919 2994 1650 22 2995 557 2720 411 2996 1315 2997 2792 2332 338 2998 1805 2848 2562 2999 3000 1789 2361 2326 3001 3002 900 2622 3003 3004 3005 3006 204 2940 3007 3008 2765 2301 2593 2576 2384 2901 2842 2548 366 164 3009 1104 3010 3011 3012 1370 2549 3013 2928 578 816 2242 3014 3015 3010 2246 1574 2375 3016 1366 3017 2674 3018 1267 3019 451 2285 3020 2908 1067 3021 3022 2731 1761 1981 2678 1114 3015 3023 2440 3024 2983 53 3025 2828 2185 3026 3027 298 3028 3029 3030 3031 1037 3032 3033 972 2488 3034 899 3035 562 3032 80 2980 3036 1251 650 3037 3038 3039 1841 3014 954 3040 3041 3042 2915 2343 957 3043 2341 1047 2690 2866 3044 3045 3046 3047 3048 1774 3049 2078 1183 3050 3051 2831 3052 3053 1946 3054 3055 3056 2635 2297 1525 3057 2789 3058 1360 3059 1199 1190 3060 3061 1462 2162 3062 3063 908 3064 3065 2318 1036 1440 3066 3067 825 3068 3069 3070 3071 1887 3072 180 2444 3073 2874 1088 2522 3074 2404 2373 3075 1692 3076 2986 1091 46 2801 1828 3065 1193 3077 1628 1066 3078 2467 3079 3080 2701 3081 1189 2158 2629 3082 1622 3083 2916 1818 2679 3084 3085 485 3086 2708 3087 3088 701 2967 2485 76 3089 2153 864 1254 2819 1256 2821 3090 2798 1619 1585 3091 3092 2902 2692 1354 3093 428 1859 1716 3094 3095 3096 2699 2958 2469 2651 503 1937 3005 2937 173 3097 3098 2927 3099 3100 3101 3095 1771 3102 3103 2487 2929 3104 370 1601 1608 2027 890 912 2649 3105 1668 3106 2321 1117 3107 3108 286 1925 3109 1569 3110 3111 888 3112 3113 1019 904 3108 3114 2324 2867 3115 486 2333 2903 3116 2887 3117 1667 2954 1178 794 2036 1038 3118 517 56 1653 261 2098 3119 66 145 2605 1257 357 2267 3120 1351 415 3121 1690 3122 2968 1886 2747 3123 582 2923 2207 3124 537 1285 982 2092 2610 2450 3125 3126 2759 2944 921 1078 3127 2893 2233 3128 2322 363 649 3129 2698 2782 2357 3130 3131 1009 1151 2686 107 3132 3076 882 207 96 1748 3133 3134 2045 388 3135 3136 1385 3137 3138 1283 3110 2359 3139 572 3140 2952 2211 2455 3141 3142 3143 3144 1825 3145 2486 2859 2930 3146 3147 3148 2065 3149 1890 3150 1941 1086 3151 3152 507 1870 198 3153 1408 2683 3154 1346 3155 1770 1356 2910 3156 2156 253 2175 2834 313 3157 2609 3158 3159 3160 2155 3161 660 1829 3162 962 3163 2230 3164 1666 3165 1287 1737 2337 2140 3166 3167 1554 2830 3168 1595 2997 2827 1658 3169 3170 3143 2056 528 3171 179 603 1295 2721 3172 1744 3173 3174 409 3175 1861 130 3176 1704 3177 1142 3166 3151 3178 3179 3180 1582 943 3181 1983 2963 1319 3159 2955 594 2739 3182 3183 3184 2825 3185 724 2871 3186 3187 3188 436 3189 2388 3140 2938 206 2671 3190 3191 2154 2561 2811 1156 2925 1429 585 482 303 591 1866 1944 3050 3192 3193 2112 1496 3194 1265 3195 3196 245 2978 2728 1647 3197 2891 1125 57 260 161 3198 672 845 2346 3199 3200 3132 2637 1612 2527 196 3201 3202 3203 2025 2160 3204 1373 3107 3205 3206 1099 3207 1290 3208 2779 2062 2227 1719 1879 2374 3209 1381 2787 3210 216 3211 1939 3212 2238 2405 201 928 1269 1242 1814 521 1073 3213 342 468 3002 2060 2050 605 3214 3215 3216 1359 750 3217 2807 3218 1765 237 1679 3219 2756 2822 2673 3220 3221 1591 3064 3139 3222 2459 2044 2864 3223 3224 3225 2620 3226 2614 3227 258 2273 2872 951 3060 2335 803 323 3228 1797 2976 1536 3229 3230 2796 1050 3231 1954 3232 607 3097 1581 2744 3233 3177 3234 839 3235 3236 2458 678 2018 2710 3237 700 3103 1449 3238 3120 1721 3239 1990 3078 2643 3240 886 2851 1912 1205 2564 1697 1804 2555 3241 3242 3165 3117 3233 185 3243 1833 2510 1684 3013 1700 3244 459 3245 3246 3247 684 3248 1281 3249 3250 2768 625 1794 3149 1364 3251 2068 1219 3252 1176 3253 417 559 3126 2536 3254 3255 3256 2425 1389 3257 2446 2687 3258 1793 2279 997 3259 1673 2623 1611 1918 3105 2209 3085 1153 1743 279 3260 3261 3262 1982 3021 3263 3203 827 570 640 3264 3265 3266 598 3267 101 3268 3200 766 3024 2094 1558 319 1227 1481 1843 2814 380 1875 3269 2641 1282 2659 3204 619 3270 3271 1579 3272 2847 2021 3273 3274 1947 3275 2265 1670 3276 3277 3025 2880 2538 1747 1799 3278 480 3279 3280 3281 277 2764 1338 3130 1340 3012 1358 2769 776 3118 1284 3282 3283 3192 2480 2349 1094 3284 989 1645 3285 1952 3286 2106 3287 2737 2993 108 723 915 3288 1924 1208 3289 2685 3290 3291 3292 3293 2598 2989 2799 3294 3295 2262 1135 3255 3296 2757 3234 3297 3052 735 3298 1617 2797 2775 2667 3299 1867 3300 2072 1992 610 2973 1572 3301 3172 759 669 3302 3303 535 1224 3304 3305 3152 3306 2840 1365 3307 3148 3308 2039 2722 3309 3310 2543 3311 875 3312 2247 1726 2661 2363 783 120 2007 2478 3313 1456 624 2971 1754 639 3195 3314 3315 3206 3316 2290 3317 3292 788 2295 2596 1475 2885 2133 2460 3318 3319 3320 3017 3321 1994 3322 3061 3282 2816 3323 1908 2475 365 1195 2076 116 2482 2186 3324 3094 2791 2776 3325 3008 2300 3326 754 3327 1779 1997 3138 2781 2729 2358 3184 796 820 3328 3268 2448 3329 3113 3257 3330 3331 3332 3333 2767 2382 3334 1289 2546 2823 2512 2774 1642 3335 3336 1545 3218 2389 3337 2430 1547 3338 3339 3340 1560 3189 3341 1448 826 2581 3342 638 1025 3091 2547 2504 2110 3343 3344 1661 3345 3210 2146 893 3346 2033 3347 376 616 2423 600 709 2689 3348 3349 3350 682 984 2424 3112 1056 3351 2319 1736 3352 2338 2625 3072 2884 3353 3033 3354 878 2328 281 3355 414 2763 2472 3356 925 2959 3357 995 6 3358 3359 3360 2431 3361 3362 3214 3232 2817 2877 1651 191 1497 2114 3320 2399 1133 1904 3363 3237 3364 1878 3020 670 3365 1892 1772 3208 2163 3221 907 2129 3039 197 811 1421 2758 3170 2664 3366 2565 588 3367 3368 3369 3227 918 1599 3370 1311 315 1322 2794 3371 696 3372 933 2191 2182 1485 3373 611 1703 3374 3375 3376 3377 3242 606 2054 3098 3378 2385 353 891 2849 331 2195 1551 3048 3379 3029 2984 2999 2407 1845 1711 3380 3220 3381 1146 3382 3383 2517 3173 3384 307 2606 854 1005 3385 2164 3136 708 3081 2899 3386 3387 2462 2506 3388 3389 3390 2344 3391 2845 1017 3051 3207 3230 1999 3298 3392 3111 2159 976 2451 383 3318 3308 3147 1542 1021 3393 3394 2292 838 3395 1791 1271 3396 2282 1171 1230 3397 3003 3256 1136 3398 797 2618 3399 3400 1979 631 3401 3260 495 807 2534 1722 1371 2308 211 3402 317 1480 3403 3328 2681 3285 2417 3404 3405 3261 3364 73 3406 2150 2933 3265 3372 3407 741 1989 1126 2120 2611 3000 3408 290 536 1735 1286 1730 1437 3067 3409 2746 278 3381 3410 3006 3346 1060 3411 3370 996 3044 3247 137 2567 3303 3412 3413 2660 3272 3414 3415 3416 1023 1469 3417 2951 1259 3163 3418 3275 2560 38 1883 3419 3418 2911 2222 3420 3421 3422 1659 3423 3181 3212 869 3335 3424 3395 3425 2465 2400 3263 3426 3026 3306 2067 3427 3428 3367 1620 2509 2203 1292 3109 1463 1767 3429 3102 1454 657 3288 2957 2304 1520 2354 1293 3062 909 2905 1868 3405 2287 3266 1444 1792 1839 3297 2948 3066 3430 2634 3431 1297 3432 2172 1299 1085 1379 3433 3116 3092 2571 1249 1034 3144 3434 2669 3435 1039 516 1938 3436 3437 3339 553 519 3438 2657 3439 3440 2594 2260 1122 3421 930 948 99 1105 3398 988 3441 2372 868 3245 122 328 1524 2118 3442 3041 2656 157 2820 2917 3443 3444 3186 3058 2788 3445 3231 2497 3179 333 3446 3447 3448 2568 3449 3392 3450 3128 2613 200 1682 777 2991 1083 131 3375 3423 3074 1915 1130 2650 2496 556 3451 3452 3453 3403 2771 3383 3401 2627 3368 1404 255 2149 2920 3454 16 3455 2615 2313 3169 3196 3456 1753 3457 3290 3317 3036 1995 2101 3277 1390 1184 1474 2636 2846 767 463 2049 3458 2995 3250 3342 1933 2982 2663 2762 3425 2550 508 3305 2715 3438 1309 3046 889 2026 1626 1858 3459 3182 3460 3461 2240 3462 3360 3054 2192 2501 3463 2442 3271 983 1740 2173 2998 3464 1945 1108 3465 2051 3362 2418 3466 3424 1167 2368 3467 2041 3468 524 1261 2574 542 3158 2302 2956 1182 217 3437 1438 2697 3294 1660 3400 3469 2490 3079 2144 3456 3330 1162 3470 1855 2979 3457 1229 3471 3472 2725 3376 3473 2693 3069 2234 2865 856 2161 3417 2556 1383 2248 2307 1745 2922 95 1301 2766 2730 2081 1512 3251 2323 3474 2868 632 1980 3475 1220 2259 2631 1943 3217 3476 1501 265 1169 2863 1583 3313 1832 244 3477 2489 3462 3080 2174 1235 3478 2397 679 3479 3480 3481 3030 1664 3043 3482 3329 1388 406 3028 3483 2985 3146 3284 3319 1314 3484 615 1532 3485 2503 3075 3486 3487 2215 3488 690 2654 1053 1803 2232 1173 3382 3489 3453 3490 2226 3491 3168 2896 1795 626 1760 3127 3492 1452 3493 1909 2298 2972 3494 3495 3490 3496 1724 818 3406 3281 3497 2844 3498 2975 1071 1816 2974 178 1848 2706 3499 2369 2575 3384 932 3469 630 1307 2330 2805 3355 2918 3121 1000 1010 3349 1138 2966 748 1233 2603 2996 1097 3429 63 3500 2457 3501 3502 597 2339 3503 3310 355 2795 3431 2633 1043 2861 2835 1352 306 3483 3504 3378 292 1253 3505 501 3506 3507 2913 1629 111 3508 2422 3509 2735 1552 2196 3427 202 1960 833 1913 3009 2921 3510 28 1911 3201 3321 3511 3150 1228 1492 1827 1046 3512 1635 1515 2427 1656 476 2942 3513 3337 1175 851 3497 1460 2239 2640 3482 1478 2320 3514 2935 2572 1033 2314 3419 2376 506 3411 3515 1132 2401 3426 1486 2414 3516 3477 2263 3254 2953 3101 3517 2624 247 2253 183 3409 2843 3518 2107 3519 3520 3450 3082 2095 3473 3068 32 1426 1652 1343 492 2137 2032 3521 2630 3291 1856 458 294 3248 3522 1694 2632 648 2015 2909 3202 2585 2738 3287 3443 3194 3523 3524 3489 1727 2206 3525 961 447 2761 1150 2350 940 87 800 1949 2712 3526 770 2800 2176 2950 3527 3513 992 420 763 354 1589 2293 3197 3528 2136 1490 3027 753 3086 2540 3529 3283 3530 3216 3531 3059 1333 2082 3175 3532 2199 3533 3534 184 852 3535 3156 544 3536 2507 628 2383 2019 3274 2077 3343 3016 3475 1357 3535 2243 208 3278 266 3537 3180 746 3007 2939 3264 2286 3371 1597 2578 3213 3538 18 3388 1310 3104 1600 1121 1280 3422 3539 3458 3465 2181 3484 3540 3541 596 1701 3464 3507 736 17 3542 3389 2803 1212 1062 1237 359 1374 1244 1215 3543 2124 3397 3544 2533 2881 3499 1427 823 3545 2602 146 3090 2494 3461 3533 403 2742 673 3546 2855 167 3547 3548 360 3549 3550 3472 3518 385 945 3551 352 3552 2152 3239 3553 3327 2541 1484 2429 3106 3554 1872 914 3432 2439 949 3011 2688 339 3241 1823 2670 1102 1970 3467 3135 2012 3555 1564 1821 1717 1669 1675 2668 3253 1120 3511 3249 1857 3035 898 3433 3366 2888 3556 2818 3154 1986 3129 958 2642 725 3557 1410 1573 952 3558 3524 2362 1124 3486 55 2353 3446 1325 1418 81 1393 1534 1014 702 994 819 2960 1931 3516 455 1494 3451 1032 3559 2964 971 3560 3529 3315 3413 3561 772 1706 2936 3408 1402 2987 1098 3562 2420 2655 2059 3238 3563 3564 2090 1830 1738 2244 3312 1733 3302 3089 1884 1880 1865 2584 362 3565 2258 3566 3492 1602 3162 1819 2063 3199 751 1415 3365 3198 3567 3307 3222 1508 1662 437 2675 309 3568 2802 2755 3569 1424 2676 3087 1430 1409 2876 3548 3396 2249 299 1049 3001 2223 3338 3570 3562 2396 2588 1811 1877 3351 2386 3300 3571 1192 2194 3071 3171 3269 1813 254 3259 589 3531 1165 1200 3572 2569 3573 3522 683 2403 664 1984 1482 2530 3141 440 2783 2700 2474 3574 3558 2099 3575 3576 3359 2329 47 3512 2178 3415 1718 3577 3219 2926 2860 77 3553 3115 2171 804 2097 1519 2751 2853 1471 2 2412 487 3228 1528 3157 2810 1530 3019 1680 2535 2639 659 3578 3226 3565 400 1258 3125 205 805 3567 1715 784 885 2294 3579 3341 1500 2000 3229 2617 270 3209 1955 902 2235 881 1788 2638 2022 3514 1291 2552 1238 3205 3495 1075 1728 3580 464 3539 3581 3521 2900 1881 2653 3582 3191 1732 2115 3452 404 3447 1973 1835 2017 1541 1403 3428 3240 3557 2626 3394 3333 3404 1757 3038 2733 2770 3583 3496 25 3236 1950 2793 1763 1898 3119 2377 2977 3584 1928 3549 3585 3536 3273 3586 3215 1112 2812 419 2652 3587 494 3047 1107 3083 2856 3474 3387 3481 2245 1106 3037 3153 3578 1871 2604 1234 413 2091 1749 510 3063 1489 2841 2736 3369 3519 2544 3459 430 3583 3380 3588 2048 2325 3589 3503 2558 2726 742 2566 3448 1467 2537 3134 2912 1336 2454 1962 2704 3416 1966 511 110 1089 3590 3073 2272 3224 2873 1750 2597 3023 2236 2962 3575 3591 3574 65 2577 469 3563 1059 3178 3515 1782 3592 1846 2965 792 3571 3470 3593 2105 2526 74 3454 2809 3594 564 1218 39 3252 3587 2134 2886 2914 3122 324 3534 706 3243 3070 3595 3077 3556 304 865 3596 970 3597 2875 3279 587 3547 2586 3593 3517 3552 2749 3598 3188 3434 2695 592 3476 3542 2088 3599 2892 3440 2261 2473 2696 1339 1559 42 2934 2108 2441 1079 2773 523 3309 3049 3436 3344 3390 3599 3564 2705 3301 1412 1958 2836 963 2483 104 3572 3304 2352 2716 1334 493 1342 2409 3246 3485 3185 1603 3084 1988 674 2741 966 3600 3471 3225 1305 2379 1896 2858 3155 2732 3579 790 1321 2826 3430 3520 3581 2703 91 2990 3034 2621 3385 1231 2932 2815 3262 3323 2994 24 1401 2646 2070 3042 3545 1623 3601 3340 241 1540 496 1674 1026 2085 3602 1137 267 942 717 3551 3100 2589 2157 3478 2870 661 1604 1752 2970 813 2931 695 2255 2523 3183 2839 3502 3504 3267 2204 3508 2785 2832 3345 1510 3373 896 1681 2367 831 3386 1714 3591 2002 2122 2468 3056 2554 3040 3544 3532 3603 3352 2709 3347 3479 1441 2616 3604 3605 3445 3299 2647 3468 15 1377 3160 3606 2317 3595 3123 2453 2210 3607 3608 2691 3093 1161 3332 3609 1096 2898 3096 3598 3569 3057 2061 2355 3289 3506 2949 737 2525 2924 3610 3045 158 2658 685 3455 3538 3608 3585 2608 3354 1965 3444 546 3420 2390 2595 651 1758 3577 1157 569 3018 828 3314 1864 1264 880 3 1472 3580 3325 3611 2883 1522 3610 1405 160 3361 1702 2380 698 3363 3031 3594 3463 2894 689 2551 3527 3573 3561 2945 1606 3414 2126 456 152 60 2508 3584 3498 3167 2437 3612 3592 2177 2220 2040 2190 1759 2058 2539 3407 731 2665 422 3546 3244 472 2907 3356 3296 93 3334 391 3137 3494 100 718 3099 2879 3604 686 3142 1961 1030 1685 1820 656 504 3597 1313 3596 2852 646 2684 916 1615 1783 2151 3176 3293 3606 3161 2463 3510 2850 1369 1693 3487 2381 749 1051 2882 934 3540 3258 1636 2426 2100 1556 1671 2734 2786 1934 1187 830 1483 2941 3391 847 2266 2553 1450 2269 3582 1470 445 2778 1609 2502 3442 1128 3537 3311 2745 2456 3576 3501 3541 3488 2740 3402 3326 3324 2366 473 2890 2052 3393 3053 3114 3145 3589 2857 1076 3588 3379 2869 3480 2391 3570 3601 2714 2130 906 172 2029 1147 1840 1888 817 3353 3523 1498 1985 3449 2702 1996 1423 1386 1922 2299 3211 3602 2336 3613 1637 1860 3124 1584 3586 2075 2824 1304 2878 2125 3131 2288 345 3435 579 738 791 1593 2946 1935 3505 2724 3164 3377 3590 3357 3614 2188 3399 1648 2981 349 1197 3526 715 2493 2988 3466 941 3607 1155 3614 3500 3559 1755 3605 2529 3286 2784 3509 618 378 3350 2168 2406 2237 3358 2906 3491 3336 3612 3412 1847 2516 3611 3174 3235 2713 1951 653 2123 3055 1917 2046 913 2752 3322 3280 3133 3615 1207 1172 3004 3410 23 573 3530 3316 3193 3560 903 3295 1118 1731 3190 1413 2829 1948 745 3187 1093 1101 2016 1345 978 3022 3566 1222 3603 224 3613 3331 3600 3609 2854 1624 2904 2387 1562 2833 2447 1605 2682 2340 1665 3493 2200 3088 2895 2117 3348 2813 2276 3543 2992 2837 3525 3568 2280 601 3270 576 2071 1895 2491 2806 2345 2563 3615 3223 3441 1186 2672 2754 1565 3555 643 2365 2889 2961 3374 3528 3439 1368 371 2719 3460 1279 1927 2723 3550 780 3276 3554 gts-snapshot-121130/test/boolean/surfaces/t30000644000175100017510000000010612055775440015650 000000000000004 5 2 0 -1 0 0 0.5 -1 0 0.5 1 1 0.5 0 1 2 2 3 3 1 4 2 4 3 1 2 3 5 2 4 gts-snapshot-121130/test/boolean/surfaces/t280000644000175100017510000000030012055775440015733 000000000000008 18 1 0 -1.63299 -2 -1.63299 0 -2 0 1.63299 -2 1.63299 0 -2 0 -1.63299 2 -1.63299 0 2 0 1.63299 2 1.63299 0 2 3 1 2 1 6 1 2 6 2 7 3 2 3 7 3 8 4 3 4 8 5 1 4 5 1 4 6 5 7 6 5 8 7 5 8 7 4 2 3 gts-snapshot-121130/test/boolean/surfaces/t70000644000175100017510000000010412055775440015652 000000000000003 3 1 0 0.4 0 D 0 0.6 -1 E 0 0.5 0 F 1 2 DE 2 3 EF 3 1 FD 1 2 3 EFD gts-snapshot-121130/test/boolean/surfaces/cube60000644000175100017510000000065112055775440016333 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex -0.0471141 1.71734 -1.40185 -1.88699 1.15792 -0.123091 1.55052 1.09747 0.625643 -1.75833 -1.01684 -0.889362 -0.289349 0.538054 1.90441 -0.160693 -1.63671 1.13814 1.67918 -1.07729 -0.140628 0.0815424 -0.457427 -2.16813 1 2 2 3 1 3 2 4 4 5 2 5 4 6 5 6 6 7 6 8 7 8 3 5 4 8 2 8 5 7 7 3 8 1 1 7 1 2 3 4 5 6 7 8 5 9 10 11 6 12 2 7 13 10 4 14 13 12 15 16 1 17 14 8 9 15 17 18 11 3 16 18 gts-snapshot-121130/test/boolean/surfaces/sponge0000644000175100017510000000041312055775440016616 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 2 3 2 1 3 4 3 1 4 5 4 5 3 6 1 6 4 3 7 7 5 6 5 6 8 8 5 7 8 2 8 6 2 2 7 1 2 3 3 4 5 6 4 7 8 5 9 7 10 11 9 6 12 13 12 14 14 11 15 13 16 17 16 15 18 17 1 8 18 10 2 gts-snapshot-121130/test/boolean/surfaces/t180000644000175100017510000000022312055775440015736 000000000000003 3 1 GtsSurface GtsNFace GtsNEdge GtsNVertex 0 0 1 D 0.197173 6.16548e-16 0.980369 E 0.0609297 0.187522 0.980369 F 1 2 DE 2 3 EF 1 3 FD 1 2 3 DEF gts-snapshot-121130/test/boolean/surfaces/b9.gts0000644000175100017510000000016512055775440016435 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex -1 1 1 0 0 4 3 -3 1 3 1 1 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/cube40000644000175100017510000000042212055775440016325 000000000000008 18 12 0 -1.63299 -2 -1.63299 0 -2 0 1.63299 -2 1.63299 0 -2 0 -1.63299 2 -1.63299 0 2 0 1.63299 2 1.63299 0 2 3 1 2 1 6 1 2 6 2 7 3 2 3 7 3 8 4 3 4 8 5 1 4 5 1 4 6 5 7 6 5 8 7 5 8 7 9 13 1 6 1 2 4 2 3 14 3 11 4 15 5 6 5 7 7 18 8 9 8 10 10 16 12 13 12 11 15 14 17 18 17 16 gts-snapshot-121130/test/boolean/surfaces/cutter0000644000175100017510000000403712055775440016637 0000000000000032 90 60 GtsSurface GtsFace GtsEdge GtsVertex -0.3333333333 0.3333333333 -0.3333333333 -1 0.3333333333 0.3333333333 -0.3333333333 0.3333333333 0.3333333333 -0.3333333333 -0.3333333333 -1 0.3333333333 -0.3333333333 -0.3333333333 -0.3333333333 -0.3333333333 -0.3333333333 -0.3333333333 -1 -0.3333333333 0.3333333333 -1 0.3333333333 -0.3333333333 -1 0.3333333333 0.3333333333 1 -0.3333333333 -0.3333333333 1 -0.3333333333 -0.3333333333 1 0.3333333333 0.3333333333 -0.3333333333 0.3333333333 1 0.3333333333 0.3333333333 0.3333333333 0.3333333333 0.3333333333 -0.3333333333 0.3333333333 -1 -1 -0.3333333333 -0.3333333333 -1 0.3333333333 -0.3333333333 -0.3333333333 -0.3333333333 0.3333333333 -0.3333333333 0.3333333333 1 0.3333333333 0.3333333333 1 0.3333333333 1 0.3333333333 1 0.3333333333 -0.3333333333 0.3333333333 0.3333333333 -0.3333333333 -1 -0.3333333333 0.3333333333 0.3333333333 0.3333333333 -1 -0.3333333333 -0.3333333333 1 0.3333333333 -0.3333333333 1 1 -0.3333333333 -0.3333333333 1 -0.3333333333 0.3333333333 0.3333333333 -0.3333333333 -1 0.3333333333 -1 -0.3333333333 1 2 3 2 1 3 4 5 6 5 4 6 7 8 9 8 7 9 10 11 12 11 10 12 13 14 14 15 13 15 4 16 16 6 17 18 1 18 17 1 8 13 9 13 17 6 6 19 17 19 15 20 21 20 21 15 22 12 22 10 23 24 24 15 23 15 6 1 1 16 19 13 19 9 1 11 1 10 25 19 17 25 13 21 24 10 24 22 14 23 26 16 26 1 19 3 25 3 7 6 6 9 24 1 27 28 28 21 27 21 13 28 15 22 29 23 29 14 24 26 2 25 15 3 3 22 20 27 5 24 5 23 19 28 30 14 29 30 31 26 31 24 18 25 32 5 5 13 32 13 12 3 19 27 3 27 5 29 5 30 31 5 2 18 32 8 4 26 11 3 20 3 7 5 13 30 4 31 7 32 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 17 18 19 20 8 21 22 23 24 25 26 27 28 12 29 30 31 32 33 17 34 35 20 34 23 22 36 37 38 10 39 25 40 41 15 28 42 43 30 44 33 14 45 46 35 47 40 48 49 50 9 51 39 43 52 53 54 55 42 54 56 44 57 32 58 45 59 47 52 60 49 2 61 51 37 24 62 57 63 55 27 64 65 31 66 36 56 67 59 68 69 70 60 71 18 41 72 73 74 75 63 29 76 48 77 78 66 58 79 67 53 77 79 69 80 71 65 81 72 61 82 75 21 83 16 46 84 38 3 85 78 64 86 50 5 87 88 68 13 80 88 74 89 81 4 19 82 1 90 83 7 84 70 89 85 76 11 62 86 26 87 73 90 gts-snapshot-121130/test/boolean/surfaces/t230000644000175100017510000000010012055775440015724 000000000000003 3 1 1.5 0 0 D 0 0 1 E -1 0 0 F 1 2 DE 2 3 EF 3 1 FD 1 2 3 DEF gts-snapshot-121130/test/boolean/surfaces/a24.gts0000644000175100017510000000016312055775440016507 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 2 0 0 0 0 2 0 2 0 0 0 0 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/gts-crash.gts0000644000175100017510000000456612055775440020027 00000000000000# object: Sphere Tessellation 1 # num points [42] num edges [120] num triangles [80] 42 120 80 # points 2.6 4.25325 2.62866 2.6 5 0 5.1 4.04508 1.54508 -0.0286556 -0 -4.25325 1.05492 -2.5 -4.04508 -1.44508 -1.54508 -2.5 -2.4 -0 0 -1.44508 -1.54508 2.5 -1.44508 1.54508 2.5 0.1 4.04508 -1.54508 2.6 4.25325 -2.62866 6.64508 1.54508 -2.5 4.14508 2.5 -4.04508 5.1 4.04508 -1.54508 5.22866 -0 4.25325 6.64508 1.54508 2.5 6.64508 -1.54508 2.5 2.6 -4.25325 2.62866 0.1 -4.04508 1.54508 1.05492 -2.5 4.04508 -1.65325 -2.62866 0 6.85325 2.62866 0 7.6 -0 0 4.14508 -2.5 4.04508 5.1 -4.04508 1.54508 0.1 -4.04508 -1.54508 2.6 -0 -5 1.05492 2.5 4.04508 2.6 -0 5 -0.0286556 -0 4.25325 0.1 4.04508 1.54508 -1.65325 2.62866 0 1.05492 2.5 -4.04508 -1.44508 1.54508 -2.5 5.22866 -0 -4.25325 2.6 -4.25325 -2.62866 4.14508 -2.5 -4.04508 4.14508 2.5 4.04508 6.64508 -1.54508 -2.5 5.1 -4.04508 -1.54508 2.6 -5 0 6.85325 -2.62866 0 # edges 13 14 13 27 13 33 13 35 13 11 13 12 14 22 14 11 14 12 14 2 14 3 15 16 15 17 15 24 15 29 15 38 16 17 16 22 16 23 16 38 16 3 17 23 17 24 17 25 17 42 18 19 18 20 18 24 18 25 18 41 19 20 19 21 19 26 19 8 19 41 20 24 20 29 20 30 20 8 21 26 21 6 21 7 21 8 22 23 22 12 22 3 23 39 23 12 23 42 24 25 24 29 25 40 25 41 25 42 26 36 26 6 26 5 26 41 27 33 27 35 27 37 27 4 27 5 28 29 28 30 28 31 28 38 28 9 28 1 29 30 29 38 30 8 30 9 31 32 31 9 31 10 31 1 31 2 32 34 32 7 32 9 32 10 33 34 33 10 33 11 33 4 34 6 34 7 34 10 34 4 35 37 35 39 35 12 36 37 36 5 36 40 36 41 37 39 37 5 37 40 38 1 38 3 39 12 39 40 39 42 6 7 6 4 6 5 7 8 7 9 8 9 10 11 10 2 11 2 1 2 1 3 2 3 4 5 40 41 40 42 # triangles 117 116 115 107 108 118 110 111 109 112 114 113 9 1 6 17 13 12 31 27 26 42 109 43 44 19 18 50 29 28 56 57 108 62 118 63 8 10 114 70 65 64 24 50 23 78 115 77 43 34 32 81 74 75 13 23 14 90 86 83 113 78 76 60 4 2 99 95 94 15 14 51 67 69 101 106 87 88 82 76 74 66 77 69 92 91 98 84 85 112 63 99 61 40 32 33 3 5 85 60 61 91 36 28 27 12 16 20 42 41 106 51 36 37 15 71 16 73 68 65 100 94 96 2 3 59 79 89 82 75 66 68 35 26 30 62 59 86 70 37 38 45 7 9 102 101 116 87 107 90 39 31 34 105 104 120 83 84 89 44 45 48 98 100 104 55 58 97 1 8 5 18 21 46 20 102 21 80 88 79 96 97 119 41 40 56 48 103 47 103 93 92 64 67 71 80 81 110 93 6 4 33 35 58 53 30 29 7 46 11 57 55 95 119 53 52 49 47 105 22 17 19 49 25 22 72 38 39 111 73 72 25 54 24 11 117 10 120 52 54 gts-snapshot-121130/test/boolean/surfaces/t240000644000175100017510000000010212055775440015727 000000000000003 3 1 1.5 0 0 D 0 0 1 E -1.5 0 0 F 1 2 DE 2 3 EF 3 1 FD 1 2 3 DEF gts-snapshot-121130/test/boolean/surfaces/loc10000644000175100017510000000011612055775440016161 000000000000004 6 4 1 0 0 0 0 1 0 0 0 0 1 0 1 2 3 2 3 1 3 4 1 4 4 2 1 2 3 4 5 3 2 6 4 6 1 5 gts-snapshot-121130/test/boolean/surfaces/cube90000644000175100017510000000070712055775440016340 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex 1.154698303 -1.154698303 -1.5 1.154698303 1.154698303 -1.5 1.154698303 -1.154698303 1.1547 1.154698303 1.154698303 1.1547 -1.154698303 1.154698303 -1.5 -1.154698303 1.154698303 1.1547 -1.154698303 -1.154698303 -1.5 -1.154698303 -1.154698303 1.1547 1 2 2 3 3 1 2 4 3 4 2 5 5 4 5 6 4 6 5 7 7 6 7 8 6 8 8 3 8 1 7 1 5 1 6 3 1 2 3 4 5 2 6 7 4 8 9 7 10 11 8 12 13 11 14 15 3 12 16 15 10 17 16 6 1 17 9 18 5 13 14 18 gts-snapshot-121130/test/boolean/surfaces/cube100000644000175100017510000000067712055775440016416 000000000000008 18 12 GtsSurface GtsFace GtsEdge GtsVertex 3.464094909 3.464094909 -1.5 1.154698303 3.464094909 -1.5 3.464094909 1.154698303 -1.5 1.154698303 1.154698303 -1.5 1.154698303 1.154698303 1.1547 3.464094909 1.154698303 1.1547 1.154698303 3.464094909 1.1547 3.464094909 3.464094909 1.1547 1 2 3 1 2 3 2 4 4 3 4 5 5 3 5 6 6 3 7 5 4 7 2 7 8 7 2 8 1 8 6 8 1 6 7 6 1 2 3 4 3 5 6 5 7 8 7 9 6 10 11 4 11 12 12 13 14 1 14 15 15 16 17 2 17 9 10 8 18 13 18 16 gts-snapshot-121130/test/boolean/surfaces/cube50000644000175100017510000000034212055775440016327 000000000000008 18 12 0 -1 -1 -1 0 -1 0 1 -1 1 0 -1 0 -1 2 -1 0 2 0 1 2 1 0 2 3 1 2 1 6 1 2 6 2 7 3 2 3 7 3 8 4 3 4 8 5 1 4 5 1 4 6 5 7 6 5 8 7 5 8 7 9 13 1 6 1 2 4 2 3 14 3 11 4 15 5 6 5 7 7 18 8 9 8 10 10 16 12 13 12 11 15 14 17 18 17 16 gts-snapshot-121130/test/boolean/surfaces/t20000644000175100017510000000010312055775440015644 000000000000003 3 1 0 -1 0 E 0 0.5 -1 F 0 0.5 1 G 1 2 EF 2 3 FG 3 1 GE 1 2 3 EFG gts-snapshot-121130/test/boolean/surfaces/t250000644000175100017510000000020712055775440015736 000000000000003 3 1 -0.198159 1.13233e-16 -0.985271 A -0.28322 0.205771 -0.942056 B -0.419495 2.39712e-16 -0.913263 C 1 2 AB 2 3 BC 3 1 CA 1 2 3 ABC gts-snapshot-121130/test/boolean/surfaces/b23.gts0000644000175100017510000000016312055775440016507 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 0 3 1 0 0 4 0 0 1 1 0 1 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/t50000644000175100017510000000010712055775440015653 000000000000004 5 2 0 -1 0 0 0.5 -1 0 0.5 1 1 -0.5 0 1 2 2 3 3 1 4 2 4 3 1 2 3 5 2 4 gts-snapshot-121130/test/boolean/surfaces/a9.gts0000644000175100017510000000016312055775440016432 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 2 0 0 0 0 2 0 2 0 0 0 0 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/gts-crash1.gts0000644000175100017510000000455612055775440020107 00000000000000# object: Sphere Tessellation 2 # num points [42] num edges [120] num triangles [80] 42 120 80 # points -0 4.25325 2.62866 -1.54508 2.5 4.04508 -2.5 4.04508 1.54508 5 -0 0 4.04508 -1.54508 -2.5 4.04508 1.54508 -2.5 4.04508 1.54508 2.5 4.04508 -1.54508 2.5 -4.04508 1.54508 2.5 -5 -0 0 -4.25325 2.62866 0 1.54508 -2.5 4.04508 -0 -0 5 2.62866 -0 4.25325 4.25325 2.62866 0 2.5 4.04508 1.54508 1.54508 2.5 -4.04508 -0 -0 -5 2.62866 -0 -4.25325 -0 4.25325 -2.62866 -2.5 4.04508 -1.54508 -1.54508 2.5 -4.04508 4.25325 -2.62866 0 2.5 -4.04508 1.54508 -2.62866 -0 4.25325 2.5 -4.04508 -1.54508 -0 -5 0 2.5 4.04508 -1.54508 -1.54508 -2.5 -4.04508 -2.62866 -0 -4.25325 -4.04508 -1.54508 2.5 -4.04508 -1.54508 -2.5 -2.5 -4.04508 -1.54508 -0 -4.25325 2.62866 -1.54508 -2.5 4.04508 -4.04508 1.54508 -2.5 -0 5 0 -0 -4.25325 -2.62866 1.54508 -2.5 -4.04508 -4.25325 -2.62866 0 -2.5 -4.04508 1.54508 1.54508 2.5 4.04508 # edges 1 2 1 3 1 16 1 37 1 42 2 3 2 9 2 13 2 25 2 42 3 9 3 11 3 21 3 37 4 5 4 6 4 7 4 8 4 15 4 23 5 6 5 19 5 23 5 26 5 39 6 15 6 17 6 19 6 28 7 8 7 14 7 15 7 16 7 42 8 12 8 14 8 23 8 24 9 10 9 11 9 25 9 31 10 11 10 31 10 32 10 36 10 40 11 21 11 36 12 13 12 14 12 24 12 34 12 35 13 14 13 25 13 35 13 42 14 42 15 16 15 28 16 28 16 37 16 42 17 18 17 19 17 20 17 22 17 28 18 19 18 22 18 29 18 30 18 39 19 39 20 21 20 22 20 28 20 37 21 22 21 36 21 37 22 30 22 36 23 24 23 26 24 26 24 27 24 34 25 31 25 35 26 27 26 38 26 39 27 33 27 34 27 38 27 41 28 37 29 30 29 32 29 33 29 38 29 39 30 32 30 36 31 35 31 40 31 41 32 33 32 36 32 40 33 38 33 40 33 41 34 35 34 41 35 41 38 39 40 41 # triangles 6 2 1 16 21 15 18 30 17 43 40 39 55 51 50 32 33 60 70 66 65 80 77 76 20 15 23 37 85 38 41 7 9 92 88 87 29 69 27 73 100 72 42 41 90 110 102 101 54 53 116 68 67 77 49 81 48 52 89 53 39 42 44 76 79 82 104 103 119 47 44 108 82 14 13 56 57 91 73 71 83 93 97 92 36 35 51 38 52 35 26 61 29 112 114 110 14 4 2 61 60 62 72 104 74 88 96 89 47 112 45 90 91 107 115 98 95 45 111 46 70 74 75 69 78 67 102 113 103 48 13 12 63 3 4 11 6 7 28 27 66 86 87 85 22 75 25 111 105 106 118 116 117 114 120 115 56 9 8 62 63 99 20 37 18 50 54 57 31 59 34 105 101 100 78 99 79 25 94 24 65 68 71 94 119 93 43 46 49 108 109 120 19 26 16 98 117 96 10 1 5 30 36 31 107 118 109 64 5 3 40 12 11 84 80 81 8 10 58 23 24 86 106 83 84 21 28 22 113 95 97 19 17 32 34 64 33 55 58 59 gts-snapshot-121130/test/boolean/surfaces/p20000644000175100017510000000200712055775440015645 0000000000000020 54 36 GtsSurface GtsFace GtsEdge GtsVertex 0.889865686 1.806185912 0.7958760584 1.369642857 1.108928571 1.260714286 0 1.494230769 1.003846154 0 0 2 0 0.8320502943 2.445299804 0 0.3705118328 1.752992111 1.10594603 2.418820147 1.387453235 1.5125 1.5375 1.975 2 3 1 1.267261242 0.8017837257 2.465477516 0 1.955769231 1.696153846 0 2.629488167 1.247007889 0 3 1 0 2.167949706 0.5547001962 1 0 3 0 0 3 1 0 2 1.732738758 2.198216274 0.5345224838 0 3 0 2 3 0 1 2 3 2 3 1 4 5 6 5 6 4 7 8 9 8 7 9 10 2 8 2 8 10 7 11 8 11 12 13 14 13 12 14 6 2 3 6 15 16 4 16 4 15 16 5 14 3 11 3 14 11 10 17 2 17 15 5 18 1 19 1 18 19 6 17 19 13 9 13 9 19 4 17 10 5 10 15 12 11 15 17 7 12 14 19 7 13 14 1 18 20 9 20 9 18 11 5 8 5 19 20 3 5 18 2 18 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 15 16 17 2 18 19 20 21 22 23 4 21 24 25 26 27 28 10 29 23 20 30 31 32 28 33 18 34 35 36 33 37 6 38 29 39 26 40 17 41 27 39 40 13 42 16 34 43 35 44 9 37 41 22 31 45 43 46 47 48 49 50 14 45 3 24 51 46 32 52 49 25 47 51 36 11 53 54 44 15 42 50 38 12 8 54 48 53 1 30 5 52 19 gts-snapshot-121130/test/boolean/surfaces/a10.gts0000644000175100017510000000016312055775440016502 000000000000004 6 4 GtsSurface GtsFace GtsEdge GtsVertex 2 0 0 0 0 2 0 2 0 0 0 0 1 2 1 3 3 2 4 2 4 1 3 4 1 2 3 4 5 1 3 6 4 6 2 5 gts-snapshot-121130/test/boolean/surfaces/t100000644000175100017510000000005412055775440015730 000000000000003 3 1 0 -1 0 0 0 -1 0 0 1 1 2 2 3 3 1 1 2 3 gts-snapshot-121130/test/boolean/surfaces/t300000644000175100017510000000013512055775440015732 000000000000004 5 2 1 0 0 F 0 0 0 G 0 1 0 E 0 0 1 H 1 2 FG 2 4 GH 4 1 HF 2 3 GE 3 4 EH 1 2 3 FGH 4 5 2 GEH gts-snapshot-121130/test/boolean/surfaces/cube0000644000175100017510000000064412055775440016247 000000000000008 18 12 0 -1.63299 -1.5 A -1.63299 0 -1.5 B 0 1.63299 -1.5 C 1.63299 0 -1.5 D 0 -1.63299 1.1547 E -1.63299 0 1.1547 F 0 1.63299 1.1547 G 1.63299 0 1.1547 H 3 1 CA 2 1 BA 6 1 FA 2 6 BF 2 7 BG 3 2 CB 3 7 CG 3 8 CH 4 3 DC 4 8 DH 5 1 EA 4 5 DE 1 4 AD 6 5 FE 7 6 GF 5 8 EH 7 5 GE 8 7 HG 9 13 1 ACD 6 1 2 CBA 4 2 3 ABE 14 3 11 FAE 4 15 5 BFG 6 5 7 BCG 7 18 8 CGH 9 8 10 CHD 10 16 12 DHE 13 12 11 EAD 15 14 17 GFE 18 17 16 HGE gts-snapshot-121130/test/boolean/surfaces/t170000644000175100017510000000022412055775440015736 000000000000003 3 1 GtsSurface GtsNFace GtsNEdge GtsNVertex 0 0 1 A 0.045944 1.43664e-16 0.998944 B 0.0141975 0.0436953 0.998944 C 1 2 AB 2 3 BC 1 3 AC 1 2 3 ABC gts-snapshot-121130/test/boolean/surfaces/t220000644000175100017510000000007612055775440015737 000000000000003 3 1 1 0 0 D 0 0 1 E -1 0 0 F 1 2 DE 2 3 EF 3 1 FD 1 2 3 DEF gts-snapshot-121130/test/boolean/Makefile.in0000644000175100017510000004372712055775446015657 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ check_PROGRAMS = set$(EXEEXT) boole$(EXEEXT) cubes$(EXEEXT) subdir = test/boolean DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = boole_SOURCES = boole.c boole_OBJECTS = boole.$(OBJEXT) boole_LDADD = $(LDADD) boole_DEPENDENCIES = $(top_builddir)/src/libgts.la cubes_SOURCES = cubes.c cubes_OBJECTS = cubes.$(OBJEXT) cubes_LDADD = $(LDADD) cubes_DEPENDENCIES = $(top_builddir)/src/libgts.la set_SOURCES = set.c set_OBJECTS = set.$(OBJEXT) set_LDADD = $(LDADD) set_DEPENDENCIES = $(top_builddir)/src/libgts.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --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 = boole.c cubes.c set.c DIST_SOURCES = boole.c cubes.c set.c ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-test\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la TESTS = test.sh EXTRA_DIST = $(TESTS) tests surfaces all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 test/boolean/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/boolean/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_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 boole$(EXEEXT): $(boole_OBJECTS) $(boole_DEPENDENCIES) @rm -f boole$(EXEEXT) $(LINK) $(boole_OBJECTS) $(boole_LDADD) $(LIBS) cubes$(EXEEXT): $(cubes_OBJECTS) $(cubes_DEPENDENCIES) @rm -f cubes$(EXEEXT) $(LINK) $(cubes_OBJECTS) $(cubes_LDADD) $(LIBS) set$(EXEEXT): $(set_OBJECTS) $(set_DEPENDENCIES) @rm -f set$(EXEEXT) $(LINK) $(set_OBJECTS) $(set_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boole.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cubes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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) set x; \ 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; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi 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 "$(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 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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) -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-checkPROGRAMS 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-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: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS 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-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: gts-snapshot-121130/test/boolean/tests0000644000175100017510000000326612055775440014663 00000000000000# simple degenerate cases t1 t2 t1 t3 t1 t4 t1 t5 t1 t6 t1 t7 t1 t9 t1 t10 t1 t11 t1 t12 t1 t13 t14 t15 t11 t16 t17 t18 t19 t20 t19 t21 t31 t32 # Various cubes t1 t22 t1 t23 t1 t24 t27 t28 cube cube1 cube cube2 cube cube5 # touching corner t29 t30 # cube and sligthly rotated cube cube cube8 # cubes just touching through one edge (like t29 t30) cube9 cube10 # Floating point problems t25 t26 # Coincident faces cube cube4 # Rotated cube cube1 (touching faces) cube6 cube7 # Coincident faces (tetrahedra by T. Binder) loc1 loc2 # Coincident faces (again by T. Binder) p1 p2 # Menger sponge (by B. Petit) sponge cutter # cylinders (by Darie Aron) 1.gts 2.gts # horse and sligthly rotated horse horse5.gts horse6.gts # simplified horse horse4.gts horse5.gts XFAIL # identical surfaces horse5.gts horse5.gts XFAIL sphere.gts sphere.gts # tetrahedra by Wayne Gramlich # looks like it works but visual inspection shows it doesn't # (now it should work: Sept 2003) a8.gts b8.gts a9.gts b9.gts a10.gts b10.gts a23.gts b23.gts a24.gts b24.gts a25.gts b25.gts # Spheres by Romain Behar gts-crash.gts gts-crash1.gts # Big tests # DTM and buildings # illustrates problems with interior loops buildings wcc3 buildings wcc2 buildings wcc1 buildings wcc # gerris failed test cases gerris.gts gerris.1 gerris.gts gerris.2 gerris.gts gerris.3 gerris.gts gerris.4 gerris.gts gerris.5 gerris.gts gerris.6 gerris.gts gerris.7 gerris.gts gerris.8 gerris.gts gerris.9 gerris.gts gerris.10 gerris.gts gerris.11 gerris.gts gerris.12 gerris.gts gerris.13 gerris.gts gerris.14 gerris.gts gerris.15 gerris.gts gerris.16 gerris.gts gerris.17 gerris.gts gerris.18 gerris.gts gerris.19 gerris.gts gerris.20 gerris.gts gerris.21 gts-snapshot-121130/test/boolean/test.sh0000644000175100017510000000454212055775440015107 00000000000000#! /bin/sh rm -f errors if awk '{ if (NF >= 2 && NF <= 3 && substr ($1, 1, 1) != "#") { summary = $1 " " $2; command = "./set surfaces/" $1 " surfaces/" $2; if (NF == 3 && $3 == "XFAIL") xfailed = 1; else xfailed = 0; setfailed = 0; if (system (command " > /dev/null 2> log")) { system ("echo \"======== set " summary " ========\" >> errors; cat log >> errors"); if (xfailed) print "XFAIL: set " summary; else { print "FAIL: set " summary; failed++; } setfailed = 1; } else { if (system ("grep CRITICAL log > /dev/null") && !system ("grep \"duplicate edges: 0\" log > /dev/null")) { if (xfailed) print "XPASS: set " summary; else print "PASS: set " summary; } else { system ("echo \"======== set " summary " ========\" >> errors; cat log >> errors"); if (xfailed) print "XFAIL: set " summary; else { print "FAIL: set " summary; failed++; } setfailed = 1; } } total++; if (!setfailed && !system ("../../tools/gtscheck -v 2> log < surfaces/" $1) && !system ("grep \"boundary edges: 0\" log > /dev/null") && !system ("../../tools/gtscheck -v 2> log < surfaces/" $2) && !system ("grep \"boundary edges: 0\" log > /dev/null")) { command = "./boole surfaces/" $1 " surfaces/" $2; if (system (command " > /dev/null 2> log")) { system ("echo \"======== boole " summary " ========\" >> errors; cat log >> errors"); if (xfailed) print "XFAIL: boole " summary; else { print "FAIL: boole " summary; failed++; } } else { if (system ("grep CRITICAL log > /dev/null") && !system ("grep \"duplicate edges: 0\" log > /dev/null")) { if (xfailed) print "XPASS: boole " summary; else print "PASS: boole " summary; } else { system ("echo \"======== boole " summary " ========\" >> errors; cat log >> errors"); if (xfailed) print "XFAIL: boole " summary; else { print "FAIL: boole " summary; failed++; } } } total++; } } } END { if (failed > 0) msg = failed " of " total " tests failed"; else msg = "All " total " tests passed"; line = msg; gsub (".", "=", line); print line; print msg; print line; if (failed > 0) exit (1); else exit (0); }' < tests; then ret=0; else ret=1; fi rm -f log exit $ret; gts-snapshot-121130/test/boolean/Makefile.am0000644000175100017510000000050112055775440015617 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-test\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la check_PROGRAMS = set boole cubes TESTS = test.sh EXTRA_DIST = $(TESTS) tests surfaces gts-snapshot-121130/test/boolean/cubes.c0000644000175100017510000001725412055775440015045 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void surface_add_box (GtsSurface * s, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2) { GtsVertex * v0 = gts_vertex_new (s->vertex_class, x1, y1, z1); GtsVertex * v1 = gts_vertex_new (s->vertex_class, x1, y1, z2); GtsVertex * v2 = gts_vertex_new (s->vertex_class, x1, y2, z2); GtsVertex * v3 = gts_vertex_new (s->vertex_class, x1, y2, z1); GtsVertex * v4 = gts_vertex_new (s->vertex_class, x2, y1, z1); GtsVertex * v5 = gts_vertex_new (s->vertex_class, x2, y1, z2); GtsVertex * v6 = gts_vertex_new (s->vertex_class, x2, y2, z2); GtsVertex * v7 = gts_vertex_new (s->vertex_class, x2, y2, z1); GtsEdge * e1 = gts_edge_new (s->edge_class, v0, v1); GtsEdge * e2 = gts_edge_new (s->edge_class, v1, v2); GtsEdge * e3 = gts_edge_new (s->edge_class, v2, v3); GtsEdge * e4 = gts_edge_new (s->edge_class, v3, v0); GtsEdge * e5 = gts_edge_new (s->edge_class, v0, v2); GtsEdge * e6 = gts_edge_new (s->edge_class, v4, v5); GtsEdge * e7 = gts_edge_new (s->edge_class, v5, v6); GtsEdge * e8 = gts_edge_new (s->edge_class, v6, v7); GtsEdge * e9 = gts_edge_new (s->edge_class, v7, v4); GtsEdge * e10 = gts_edge_new (s->edge_class, v4, v6); GtsEdge * e11 = gts_edge_new (s->edge_class, v3, v7); GtsEdge * e12 = gts_edge_new (s->edge_class, v2, v6); GtsEdge * e13 = gts_edge_new (s->edge_class, v1, v5); GtsEdge * e14 = gts_edge_new (s->edge_class, v0, v4); GtsEdge * e15 = gts_edge_new (s->edge_class, v1, v6); GtsEdge * e16 = gts_edge_new (s->edge_class, v2, v7); GtsEdge * e17 = gts_edge_new (s->edge_class, v3, v4); GtsEdge * e18 = gts_edge_new (s->edge_class, v0, v5); GtsFaceClass * klass = gts_face_class (); gts_surface_add_face (s, gts_face_new (klass, e1, e2, e5)); gts_surface_add_face (s, gts_face_new (klass, e5, e3, e4)); gts_surface_add_face (s, gts_face_new (klass, e6, e10, e7)); gts_surface_add_face (s, gts_face_new (klass, e10, e9, e8)); gts_surface_add_face (s, gts_face_new (klass, e2, e15, e12)); gts_surface_add_face (s, gts_face_new (klass, e15, e13, e7)); gts_surface_add_face (s, gts_face_new (klass, e3, e16, e11)); gts_surface_add_face (s, gts_face_new (klass, e16, e12, e8)); gts_surface_add_face (s, gts_face_new (klass, e17, e14, e4)); gts_surface_add_face (s, gts_face_new (klass, e17, e11, e9)); gts_surface_add_face (s, gts_face_new (klass, e18, e13, e1)); gts_surface_add_face (s, gts_face_new (klass, e18, e14, e6)); } static void failed (GtsSurface * s, GtsSurface * cs, guint n) { gchar name[80]; FILE * fp; sprintf (name, "cs.%u.gts", n); fp = fopen (name, "wt"); gts_surface_write (cs, fp); fclose (fp); sprintf (name, "s.%u.gts", n); fp = fopen (name, "wt"); gts_surface_write (s, fp); fclose (fp); } static void surface_inter (GtsSurface * s, GNode * stree, gboolean is_open, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2, guint depth, guint maxdepth) { GtsSurface * cs; GNode * ctree; GtsSurfaceInter * si; gdouble size = (x2 - x1)/2.; gboolean closed = TRUE; static guint ncalls = 0, ninter = 0, nfailed = 0; if (depth > maxdepth) return; cs = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); surface_add_box (cs, x1, y1, z1, x2, y2, z2); ctree = gts_bb_tree_surface (cs); si = gts_surface_inter_new (gts_surface_inter_class (), cs, s, ctree, stree, FALSE, is_open); ncalls++; if (!gts_surface_inter_check (si, &closed) || (si->edges && !closed)) { failed (s, cs, nfailed++); gts_object_destroy (GTS_OBJECT (si)); gts_object_destroy (GTS_OBJECT (cs)); gts_bb_tree_destroy (ctree, TRUE); return; } else if (si->edges || depth < 4) { if (si->edges) { GtsSurface * sb; gdouble a = gts_surface_volume (cs), a1; g_assert (closed); sb = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_inter_boolean (si, sb, GTS_1_OUT_2); gts_object_destroy (GTS_OBJECT (sb)); sb = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_inter_boolean (si, sb, GTS_1_IN_2); gts_surface_inter_boolean (si, sb, GTS_2_IN_1); a1 = gts_surface_volume (sb)/a; gts_object_destroy (GTS_OBJECT (sb)); if (a1 > 1.001) failed (s, cs, nfailed++); } gts_object_destroy (GTS_OBJECT (cs)); gts_bb_tree_destroy (ctree, TRUE); gts_object_destroy (GTS_OBJECT (si)); ninter++; surface_inter (s, stree, is_open, x1, y1, z1, x1 + size, y1 + size, z1 + size, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1 + size, y1, z1, x2, y1 + size, z1 + size, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1, y1 + size, z1, x1 + size, y2, z1 + size, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1 + size, y1 + size, z1, x2, y2, z1 + size, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1, y1, z1 + size, x1 + size, y1 + size, z2, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1 + size, y1, z1 + size, x2, y1 + size, z2, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1, y1 + size, z1 + size, x1 + size, y2, z2, depth + 1, maxdepth); surface_inter (s, stree, is_open, x1 + size, y1 + size, z1 + size, x2, y2, z2, depth + 1, maxdepth); } else { gts_object_destroy (GTS_OBJECT (cs)); gts_bb_tree_destroy (ctree, TRUE); gts_object_destroy (GTS_OBJECT (si)); } printf ("\rncalls: %6u ninter: %6u nfailed: %6u", ncalls, ninter, nfailed); fflush (stdout); } int main (int argc, char * argv[]) { GtsSurface * s; GtsFile * fp; GNode * stree; gboolean is_open; s = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (gts_face_class ()), GTS_EDGE_CLASS (gts_edge_class ()), GTS_VERTEX_CLASS (gts_vertex_class ())); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fprintf (stderr, "cubes: file on standard input is not a valid GTS surface file\n"); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); if (!gts_surface_is_orientable (s)) { fprintf (stderr, "surface is not orientable\n"); return 1; } else if (!gts_surface_is_closed (s)) { fprintf (stderr, "surface is not closed\n"); return 1; } else if (gts_surface_is_self_intersecting (s)) { fprintf (stderr, "surface is self-intersecting\n"); return 1; } stree = gts_bb_tree_surface (s); is_open = gts_surface_volume (s) < 0. ? TRUE : FALSE; surface_inter (s, stree, is_open, -0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0, 9); printf ("\n"); return 0; } gts-snapshot-121130/test/boolean/set.c0000644000175100017510000002007712055775440014534 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes) { *bboxes = g_slist_prepend (*bboxes, gts_bbox_triangle (gts_bbox_class (), t)); } static gboolean segment_is_ok (GtsSegment * s) { g_return_val_if_fail (s != NULL, FALSE); g_return_val_if_fail (s->v1 != s->v2, FALSE); g_assert (GTS_OBJECT (s)->reserved == NULL); return TRUE; } static gboolean vertex_is_ok (GtsVertex * v) { g_return_val_if_fail (v != NULL, FALSE); g_return_val_if_fail (GTS_OBJECT (v)->reserved == NULL, FALSE); g_assert (GTS_OBJECT (v)->reserved == NULL); return TRUE; } static gboolean triangle_is_ok (GtsTriangle * t) { g_return_val_if_fail (t != NULL, FALSE); g_return_val_if_fail (t->e1 != NULL, FALSE); g_return_val_if_fail (t->e2 != NULL, FALSE); g_return_val_if_fail (t->e3 != NULL, FALSE); g_return_val_if_fail (t->e1 != t->e2 && t->e1 != t->e3 && t->e2 != t->e3, FALSE); g_assert (gts_segments_touch (GTS_SEGMENT (t->e1), GTS_SEGMENT (t->e2))); g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), GTS_SEGMENT (t->e3)), FALSE); g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e2), GTS_SEGMENT (t->e3)), FALSE); g_return_val_if_fail (GTS_SEGMENT (t->e1)->v1 != GTS_SEGMENT (t->e1)->v2, FALSE); g_return_val_if_fail (GTS_SEGMENT (t->e2)->v1 != GTS_SEGMENT (t->e2)->v2, FALSE); g_return_val_if_fail (GTS_SEGMENT (t->e3)->v1 != GTS_SEGMENT (t->e3)->v2, FALSE); g_return_val_if_fail (GTS_OBJECT (t)->reserved == NULL, FALSE); return TRUE; } static void write_segment (GtsSegment * s, FILE * fp) { fprintf (fp, "# %p %p:%s->%p:%s\n" "VECT 1 2 0 2 0 %g %g %g %g %g %g\n", s, s->v1, GTS_NVERTEX (s->v1)->name, s->v2, GTS_NVERTEX (s->v2)->name, GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z); } int main (int argc, char * argv[]) { GtsSurface * s1, * s2; GtsSurfaceInter * si; GNode * tree1, * tree2; gboolean is_open1, is_open2; GSList * bboxes; FILE * fptr; GtsFile * fp; if (argc != 3) { fprintf (stderr, "%s: check set operations between surfaces\n" "usage: %s FILE1 FILE2\n", argv[0], argv[0]); return 1; } /* open first file */ if ((fptr = fopen (argv[1], "rt")) == NULL) { fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[1]); return 1; } /* reads in first surface file */ s1 = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (gts_nface_class ()), GTS_EDGE_CLASS (gts_nedge_class ()), GTS_VERTEX_CLASS (gts_nvertex_class ())); fp = gts_file_new (fptr); if (gts_surface_read (s1, fp)) { fprintf (stderr, "set: `%s' is not a valid GTS surface file\n", argv[1]); fprintf (stderr, "%s:%d:%d: %s\n", argv[1], fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); fclose (fptr); /* open second file */ if ((fptr = fopen (argv[2], "rt")) == NULL) { fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[2]); return 1; } /* reads in second surface file */ s2 = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (gts_nface_class ()), GTS_EDGE_CLASS (gts_nedge_class ()), GTS_VERTEX_CLASS (gts_nvertex_class ())); fp = gts_file_new (fptr); if (gts_surface_read (s2, fp)) { fprintf (stderr, "set: `%s' is not a valid GTS surface file\n", argv[2]); fprintf (stderr, "%s:%d:%d: %s\n", argv[2], fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); fclose (fptr); /* display summary information about both surfaces */ #if 0 gts_surface_print_stats (s1, stderr); gts_surface_print_stats (s2, stderr); #endif /* check surfaces */ g_assert (gts_surface_is_orientable (s1)); g_assert (gts_surface_is_orientable (s2)); g_assert (!gts_surface_is_self_intersecting (s1)); g_assert (!gts_surface_is_self_intersecting (s2)); /* build bounding boxes for first surface */ bboxes = NULL; gts_surface_foreach_face (s1, (GtsFunc) prepend_triangle_bbox, &bboxes); /* build bounding box tree for first surface */ tree1 = gts_bb_tree_new (bboxes); /* free list of bboxes */ g_slist_free (bboxes); is_open1 = gts_surface_volume (s1) < 0. ? TRUE : FALSE; /* build bounding boxes for second surface */ bboxes = NULL; gts_surface_foreach_face (s2, (GtsFunc) prepend_triangle_bbox, &bboxes); /* build bounding box tree for second surface */ tree2 = gts_bb_tree_new (bboxes); /* free list of bboxes */ g_slist_free (bboxes); is_open2 = gts_surface_volume (s2) < 0. ? TRUE : FALSE; #if 1 { GtsSurface * s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gboolean closed = TRUE; si = gts_surface_inter_new (gts_surface_inter_class (), s1, s2, tree1, tree2, is_open1, is_open2); gts_surface_merge (s, si->s1); gts_surface_merge (s, si->s2); gts_surface_print_stats (s, stderr); #if 1 printf ("(geometry \"inter\" { = LIST {\n"); g_slist_foreach (si->edges, (GFunc) write_segment, stdout); printf ("}})\n" "(normalization \"inter\" none)\n"); printf ("(geometry \"s1\" { =\n"); gts_surface_write_oogl (si->s1, stdout); printf ("})\n" "(normalization \"s1\" none)\n"); printf ("(geometry \"s2\" { =\n"); gts_surface_write_oogl (si->s2, stdout); printf ("})\n" "(normalization \"s2\" none)\n"); #else #if 1 { GtsGraph * g; g = gts_segments_graph_new (gts_graph_class (), si->edges); gts_graph_write_dot (g, stdout); gts_object_destroy (GTS_OBJECT (g)); } #else { GtsGraph * g = gts_surface_graph_new (gts_graph_class (), s); gts_graph_write_dot (g, stdout); gts_object_destroy (GTS_OBJECT (g)); } #endif #endif gts_object_destroy (GTS_OBJECT (s)); #if 1 gts_surface_foreach_face (s1, (GtsFunc) triangle_is_ok, NULL); gts_surface_foreach_edge (s1, (GtsFunc) segment_is_ok, NULL); gts_surface_foreach_edge (s1, (GtsFunc) vertex_is_ok, NULL); gts_surface_foreach_face (s2, (GtsFunc) triangle_is_ok, NULL); gts_surface_foreach_edge (s2, (GtsFunc) segment_is_ok, NULL); gts_surface_foreach_edge (s2, (GtsFunc) vertex_is_ok, NULL); gts_surface_foreach_face (si->s1, (GtsFunc) triangle_is_ok, NULL); gts_surface_foreach_edge (si->s1, (GtsFunc) segment_is_ok, NULL); gts_surface_foreach_edge (si->s1, (GtsFunc) vertex_is_ok, NULL); gts_surface_foreach_face (si->s2, (GtsFunc) triangle_is_ok, NULL); gts_surface_foreach_edge (si->s2, (GtsFunc) segment_is_ok, NULL); gts_surface_foreach_edge (si->s2, (GtsFunc) vertex_is_ok, NULL); #endif g_assert (gts_surface_inter_check (si, &closed)); } #else si = gts_surface_inter_new (gts_surface_inter_class (), s1, s2, tree1, tree2); #endif /* destroy surfaces and intersection */ gts_object_destroy (GTS_OBJECT (s1)); gts_object_destroy (GTS_OBJECT (s2)); gts_object_destroy (GTS_OBJECT (si)); /* destroy bounding box trees (including bounding boxes) */ gts_bb_tree_destroy (tree1, TRUE); gts_bb_tree_destroy (tree2, TRUE); /* free GTS memory (for memory profiling) */ gts_finalize (); return 0; } gts-snapshot-121130/test/boolean/boole.c0000644000175100017510000002112312055775440015032 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "gts.h" static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes) { *bboxes = g_slist_prepend (*bboxes, gts_bbox_triangle (gts_bbox_class (), t)); } static void check_edge (GtsEdge * e, gpointer * data) { GtsSurface * s1 = data[0]; GtsSurface * s2 = data[1]; guint * nf = data[2]; if (gts_edge_is_boundary (e, s1) && !gts_edge_is_boundary (e, s2)) { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (e)->v1); GtsPoint * p2 = GTS_POINT (GTS_SEGMENT (e)->v2); printf ("VECT 1 2 0 2 0 %g %g %g %g %g %g\n", p1->x, p1->y, p1->z, p2->x, p2->y, p2->z); (*nf)++; } } int main (int argc, char * argv[]) { GtsSurface * s1, * s2; GtsSurface * s1out2, * s1in2, * s2out1, * s2in1; GtsSurfaceInter * si; GNode * tree1, * tree2; gboolean is_open1, is_open2; GSList * bboxes; FILE * fptr; GtsFile * fp; guint n; gboolean closed = TRUE; if (argc != 3) { fprintf (stderr, "%s: test boolean operations between surfaces\n" "usage: %s FILE1 FILE2\n", argv[0], argv[0]); return 1; } /* open first file */ if ((fptr = fopen (argv[1], "rt")) == NULL) { fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[2]); return 1; } /* reads in first surface file */ s1 = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (gts_nface_class ()), GTS_EDGE_CLASS (gts_nedge_class ()), GTS_VERTEX_CLASS (gts_nvertex_class ())); fp = gts_file_new (fptr); if (gts_surface_read (s1, fp)) { fprintf (stderr, "boole: `%s' is not a valid GTS surface file\n", argv[1]); fprintf (stderr, "%s:%d:%d: %s\n", argv[1], fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); fclose (fptr); /* open second file */ if ((fptr = fopen (argv[2], "rt")) == NULL) { fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[3]); return 1; } /* reads in second surface file */ s2 = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (gts_nface_class ()), GTS_EDGE_CLASS (gts_nedge_class ()), GTS_VERTEX_CLASS (gts_nvertex_class ())); fp = gts_file_new (fptr); if (gts_surface_read (s2, fp)) { fprintf (stderr, "boole: `%s' is not a valid GTS surface file\n", argv[2]); fprintf (stderr, "%s:%d:%d: %s\n", argv[2], fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); fclose (fptr); /* display summary information about both surfaces */ #if 0 gts_surface_print_stats (s1, stderr); gts_surface_print_stats (s2, stderr); #endif /* check surfaces */ g_assert (gts_surface_is_orientable (s1)); g_assert (gts_surface_is_orientable (s2)); g_assert (!gts_surface_is_self_intersecting (s1)); g_assert (!gts_surface_is_self_intersecting (s2)); /* build bounding boxes for first surface */ bboxes = NULL; gts_surface_foreach_face (s1, (GtsFunc) prepend_triangle_bbox, &bboxes); /* build bounding box tree for first surface */ tree1 = gts_bb_tree_new (bboxes); /* free list of bboxes */ g_slist_free (bboxes); is_open1 = gts_surface_volume (s1) < 0. ? TRUE : FALSE; /* build bounding boxes for second surface */ bboxes = NULL; gts_surface_foreach_face (s2, (GtsFunc) prepend_triangle_bbox, &bboxes); /* build bounding box tree for second surface */ tree2 = gts_bb_tree_new (bboxes); /* free list of bboxes */ g_slist_free (bboxes); is_open2 = gts_surface_volume (s2) < 0. ? TRUE : FALSE; si = gts_surface_inter_new (gts_surface_inter_class (), s1, s2, tree1, tree2, is_open1, is_open2); g_assert (gts_surface_inter_check (si, &closed)); s1out2 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); s1in2 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); s2out1 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); s2in1 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); if (closed) { GtsSurfaceStats st1out2, st1in2, st2out1, st2in1; gpointer data[3]; guint nf = 0; gdouble a, ain, aout; gts_surface_inter_boolean (si, s1out2, GTS_1_OUT_2); gts_surface_inter_boolean (si, s1in2, GTS_1_IN_2); gts_surface_inter_boolean (si, s2out1, GTS_2_OUT_1); gts_surface_inter_boolean (si, s2in1, GTS_2_IN_1); gts_surface_stats (s1out2, &st1out2); fprintf (stderr, "----------- 1 out 2 -----------\n"); gts_surface_print_stats (s1out2, stderr); g_assert (st1out2.n_incompatible_faces == 0 && st1out2.n_non_manifold_edges == 0); gts_surface_stats (s1in2, &st1in2); fprintf (stderr, "----------- 1 in 2 -----------\n"); gts_surface_print_stats (s1in2, stderr); g_assert (st1in2.n_incompatible_faces == 0 && st1in2.n_non_manifold_edges == 0 && st1in2.n_boundary_edges == st1out2.n_boundary_edges); a = gts_surface_area (s1); aout = gts_surface_area (s1out2); ain = gts_surface_area (s1in2); if (a > 0.) { a = fabs (a - aout - ain)/a; g_assert (a < 1e-9); } gts_surface_stats (s2out1, &st2out1); fprintf (stderr, "----------- 2 out 1 -----------\n"); gts_surface_print_stats (s2out1, stderr); g_assert (st2out1.n_incompatible_faces == 0 && st2out1.n_non_manifold_edges == 0); gts_surface_stats (s2in1, &st2in1); fprintf (stderr, "----------- 2 in 1 -----------\n"); gts_surface_print_stats (s2in1, stderr); g_assert (st2in1.n_incompatible_faces == 0 && st2in1.n_non_manifold_edges == 0 && st2in1.n_boundary_edges == st2out1.n_boundary_edges); a = gts_surface_area (s2); aout = gts_surface_area (s2out1); ain = gts_surface_area (s2in1); if (a > 0.) { a = fabs (a - aout - ain)/a; g_assert (a < 1e-9); } n = g_slist_length (si->edges); g_assert (n == st1in2.n_boundary_edges && n == st2in1.n_boundary_edges); data[0] = s1out2; data[1] = s1in2; data[2] = &nf; printf ("(geometry \"s1 failed\" = LIST {\n"); gts_surface_foreach_edge (s1out2, (GtsFunc) check_edge, data); printf ("})\n"); data[0] = s2out1; data[1] = s2in1; data[2] = &nf; printf ("(geometry \"s2 failed\" = LIST {\n"); gts_surface_foreach_edge (s2out1, (GtsFunc) check_edge, data); printf ("})\n"); g_assert (nf == 0); } else { fprintf (stderr, "----------- 1 out 2 -----------\n"); gts_surface_print_stats (s1out2, stderr); fprintf (stderr, "----------- 1 in 2 -----------\n"); gts_surface_print_stats (s1in2, stderr); fprintf (stderr, "----------- 2 out 1 -----------\n"); gts_surface_print_stats (s2out1, stderr); fprintf (stderr, "----------- 2 in 1 -----------\n"); gts_surface_print_stats (s2in1, stderr); } printf ("(geometry \"1out2\" { =\n"); gts_surface_write_oogl (s1out2, stdout); printf ("})\n" "(normalization \"1out2\" none)\n"); printf ("(geometry \"1in2\" { =\n"); gts_surface_write_oogl (s1in2, stdout); printf ("})\n" "(normalization \"1in2\" none)\n"); printf ("(geometry \"2out1\" { =\n"); gts_surface_write_oogl (s2out1, stdout); printf ("})\n" "(normalization \"2out1\" none)\n"); printf ("(geometry \"2in1\" { =\n"); gts_surface_write_oogl (s2in1, stdout); printf ("})\n" "(normalization \"2in1\" none)\n"); /* destroy surfaces and intersection */ gts_object_destroy (GTS_OBJECT (s1)); gts_object_destroy (GTS_OBJECT (s2)); gts_object_destroy (GTS_OBJECT (si)); /* destroy bounding box trees (including bounding boxes) */ gts_bb_tree_destroy (tree1, TRUE); gts_bb_tree_destroy (tree2, TRUE); return 0; } gts-snapshot-121130/test/Makefile.in0000644000175100017510000004176312055775445014235 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = 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 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ SUBDIRS = boolean delaunay coarsen all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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; \ ($(am__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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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 "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: 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: 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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: 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 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: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean 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 installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ 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: gts-snapshot-121130/test/coarsen/0000755000175100017510000000000012055775530013662 500000000000000gts-snapshot-121130/test/coarsen/c2.c0000644000175100017510000001454312055775440014261 00000000000000#include "gts.h" static void triangle_normal (GtsTriangle * t, gdouble * nx, gdouble * ny, gdouble * nz, gdouble * nt) { GtsPoint * p1, * p2 = NULL, * p3 = NULL; gdouble x1, y1, z1, x2, y2, z2; g_return_if_fail (t != NULL); p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v1); } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v1); p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v2); } else g_assert_not_reached (); x1 = p2->x - p1->x; y1 = p2->y - p1->y; z1 = p2->z - p1->z; x2 = p3->x - p1->x; y2 = p3->y - p1->y; z2 = p3->z - p1->z; *nt = ((p1->y*p2->z - p1->z*p2->y)*p3->x + (p1->z*p2->x - p1->x*p2->z)*p3->y + (p1->x*p2->y - p1->y*p2->x)*p3->z); *nx = y1*z2 - z1*y2; *ny = z1*x2 - x1*z2; *nz = x1*y2 - y1*x2; } static gdouble edge_volume_cost (GtsEdge * e, GtsVertex * v) { GSList * i, * triangles; gdouble n1, n2, n3, nt; gdouble cost = 0.0, a; triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL); triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles); i = triangles; while (i) { if (GTS_IS_FACE (i->data)) { triangle_normal (i->data, &n1, &n2, &n3, &nt); a = GTS_POINT (v)->x*n1 + GTS_POINT (v)->y*n2 + GTS_POINT (v)->z*n3 - nt; cost += a*a; } i = i->next; } g_slist_free (triangles); return cost/36.; } static GtsVertex * edge_collapse (GtsSurface * s, GtsEdge * e, GtsVertex * (*midvertex) (GtsEdge *, GtsVertexClass *)) { GtsVertex * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid; GtsSplit * vs; GtsObject * o1, * o2; /* if the edge is degenerate (i.e. v1 == v2), destroy and return */ if (v1 == v2) { gts_object_destroy (GTS_OBJECT (e)); return NULL; } mid = (*midvertex) (e, s->vertex_class); o1 = GTS_OBJECT (v1); o2 = GTS_OBJECT (v2); vs = gts_split_new (gts_split_class (), mid, o1, o2); gts_split_collapse (vs, s->edge_class, NULL); return mid; } int main (int argc, char * argv[]) { GtsSurface * surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); GtsVertex * v1 = gts_vertex_new (gts_vertex_class (), 0.48, 1.068, 0.116); GtsVertex * v2 = gts_vertex_new (gts_vertex_class (), 0.492, 1.068, 0.118); GtsVertex * v3 = gts_vertex_new (gts_vertex_class (), 0.492, 1.056, 0.118); GtsVertex * v4 = gts_vertex_new (gts_vertex_class (), 0.516, 1.044, 0.118); GtsVertex * v5 = gts_vertex_new (gts_vertex_class (), 0.492, 1.04057, 0.118); GtsVertex * v6 = gts_vertex_new (gts_vertex_class (), 0.492, 1.02, 0.118); GtsVertex * v7 = gts_vertex_new (gts_vertex_class (), 0.504, 1.044, 0.118); GtsVertex * v8 = gts_vertex_new (gts_vertex_class (), 0.504, 1.056, 0.117); GtsVertex * v9 = gts_vertex_new (gts_vertex_class (), 0.48, 1.056, 0.117); GtsVertex * v10 = gts_vertex_new (gts_vertex_class (), 0.48, 1.032, 0.117); GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2); GtsEdge * e2 = gts_edge_new (gts_edge_class (), v1, v3); GtsEdge * e3 = gts_edge_new (gts_edge_class (), v3, v2); GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v5); GtsEdge * e5 = gts_edge_new (gts_edge_class (), v5, v6); GtsEdge * e6 = gts_edge_new (gts_edge_class (), v6, v4); GtsEdge * e7 = gts_edge_new (gts_edge_class (), v5, v3); GtsEdge * e8 = gts_edge_new (gts_edge_class (), v7, v5); GtsEdge * e9 = gts_edge_new (gts_edge_class (), v7, v3); GtsEdge * e10 = gts_edge_new (gts_edge_class (), v3, v8); GtsEdge * e11 = gts_edge_new (gts_edge_class (), v2, v8); GtsEdge * e12 = gts_edge_new (gts_edge_class (), v7, v8); GtsEdge * e13 = gts_edge_new (gts_edge_class (), v7, v4); GtsEdge * e14 = gts_edge_new (gts_edge_class (), v9, v3); GtsEdge * e15 = gts_edge_new (gts_edge_class (), v9, v1); GtsEdge * e16 = gts_edge_new (gts_edge_class (), v10, v5); GtsEdge * e17 = gts_edge_new (gts_edge_class (), v9, v5); GtsEdge * e18 = gts_edge_new (gts_edge_class (), v10, v9); GtsEdge * e19 = gts_edge_new (gts_edge_class (), v10, v6); GtsFace * f1 = gts_face_new (gts_face_class (), e1, e2, e3); GtsFace * f2 = gts_face_new (gts_face_class (), e4, e5, e6); GtsFace * f3 = gts_face_new (gts_face_class (), e7, e8, e9); GtsFace * f4 = gts_face_new (gts_face_class (), e10, e11, e3); GtsFace * f5 = gts_face_new (gts_face_class (), e10, e9, e12); GtsFace * f6 = gts_face_new (gts_face_class (), e8, e4, e13); GtsFace * f7 = gts_face_new (gts_face_class (), e14, e2, e15); GtsFace * f8 = gts_face_new (gts_face_class (), e16, e17, e18); GtsFace * f9 = gts_face_new (gts_face_class (), e7, e14, e17); GtsFace * f10 = gts_face_new (gts_face_class (), e16, e19, e5); GtsVertex * v; gts_surface_add_face (surface, f1); gts_surface_add_face (surface, f2); gts_surface_add_face (surface, f3); gts_surface_add_face (surface, f4); gts_surface_add_face (surface, f5); gts_surface_add_face (surface, f6); gts_surface_add_face (surface, f7); gts_surface_add_face (surface, f8); gts_surface_add_face (surface, f9); gts_surface_add_face (surface, f10); gts_surface_print_stats (surface, stderr); fprintf (stderr, "volume: %g\n", gts_surface_volume (surface)); #if 1 v = edge_collapse (surface, e7, gts_volume_optimized_vertex); #else v = gts_volume_optimized_vertex (e7, gts_vertex_class ()); fprintf (stderr, "(%g, %g, %g) edge cost: %g cost: %g\n", GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z, edge_volume_cost (e7, v), gts_volume_optimized_cost (e7)); #endif gts_surface_print_stats (surface, stderr); fprintf (stderr, "volume: %g\n", gts_surface_volume (surface)); gts_surface_write (surface, stdout); return 0; } gts-snapshot-121130/test/coarsen/Makefile.in0000644000175100017510000004535012055775446015664 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ check_PROGRAMS = cartesian$(EXEEXT) c1$(EXEEXT) c2$(EXEEXT) \ c3$(EXEEXT) double_prism$(EXEEXT) subdir = test/coarsen DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = c1_SOURCES = c1.c c1_OBJECTS = c1.$(OBJEXT) c1_LDADD = $(LDADD) c1_DEPENDENCIES = $(top_builddir)/src/libgts.la c2_SOURCES = c2.c c2_OBJECTS = c2.$(OBJEXT) c2_LDADD = $(LDADD) c2_DEPENDENCIES = $(top_builddir)/src/libgts.la c3_SOURCES = c3.c c3_OBJECTS = c3.$(OBJEXT) c3_LDADD = $(LDADD) c3_DEPENDENCIES = $(top_builddir)/src/libgts.la cartesian_SOURCES = cartesian.c cartesian_OBJECTS = cartesian.$(OBJEXT) cartesian_LDADD = $(LDADD) cartesian_DEPENDENCIES = $(top_builddir)/src/libgts.la double_prism_SOURCES = double_prism.c double_prism_OBJECTS = double_prism.$(OBJEXT) double_prism_LDADD = $(LDADD) double_prism_DEPENDENCIES = $(top_builddir)/src/libgts.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --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 = c1.c c2.c c3.c cartesian.c double_prism.c DIST_SOURCES = c1.c c2.c c3.c cartesian.c double_prism.c ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-test\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la TESTS = flat.sh flat1.sh EXTRA_DIST = flat.sh flat1.sh all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 test/coarsen/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/coarsen/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_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 c1$(EXEEXT): $(c1_OBJECTS) $(c1_DEPENDENCIES) @rm -f c1$(EXEEXT) $(LINK) $(c1_OBJECTS) $(c1_LDADD) $(LIBS) c2$(EXEEXT): $(c2_OBJECTS) $(c2_DEPENDENCIES) @rm -f c2$(EXEEXT) $(LINK) $(c2_OBJECTS) $(c2_LDADD) $(LIBS) c3$(EXEEXT): $(c3_OBJECTS) $(c3_DEPENDENCIES) @rm -f c3$(EXEEXT) $(LINK) $(c3_OBJECTS) $(c3_LDADD) $(LIBS) cartesian$(EXEEXT): $(cartesian_OBJECTS) $(cartesian_DEPENDENCIES) @rm -f cartesian$(EXEEXT) $(LINK) $(cartesian_OBJECTS) $(cartesian_LDADD) $(LIBS) double_prism$(EXEEXT): $(double_prism_OBJECTS) $(double_prism_DEPENDENCIES) @rm -f double_prism$(EXEEXT) $(LINK) $(double_prism_OBJECTS) $(double_prism_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cartesian.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/double_prism.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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) set x; \ 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; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi 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 "$(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 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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) -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-checkPROGRAMS 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-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: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS 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-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: gts-snapshot-121130/test/coarsen/cartesian.c0000644000175100017510000000474412055775440015730 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" int main (int argc, char * argv[]) { guint i, j, nx, ny; gdouble cosa, sina, noise; GtsSurface * surface; GSList * l, * vertices = NULL; GtsTriangle * t; GtsVertex * v1, * v2, * v3; if (argc != 5) { fprintf (stderr, "usage: cartesian nx ny angle noise\n"); return 1; } nx = atoi (argv[1]); ny = atoi (argv[2]); cosa = cos (atof (argv[3])); sina = sin (atof (argv[3])); noise = atof (argv[4]); for (i = 0; i < nx; i++) { gdouble x = (gdouble) i/(gdouble) (nx - 1); for (j = 0; j < ny; j++) { gdouble y = (gdouble) j/(gdouble) (nx - 1); vertices = g_slist_prepend (vertices, gts_vertex_new (gts_vertex_class (), cosa*x - sina*y, sina*x + cosa*y, noise*rand()/(gdouble) RAND_MAX)); } } t = gts_triangle_enclosing (gts_triangle_class (), vertices, 100.); gts_triangle_vertices (t, &v1, &v2, &v3); surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_add_face (surface, gts_face_new (gts_face_class (), t->e1, t->e2, t->e3)); l = vertices; while (l) { g_assert (gts_delaunay_add_vertex (surface, l->data, NULL) == NULL); l = l->next; } gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (v1)); gts_object_destroy (GTS_OBJECT (v2)); gts_object_destroy (GTS_OBJECT (v3)); gts_allow_floating_vertices = FALSE; gts_surface_write (surface, stdout); if (gts_delaunay_check (surface)) { fprintf (stderr, "WARNING: surface is not Delaunay\n"); return 1; } return 0; } gts-snapshot-121130/test/coarsen/double_prism.c0000644000175100017510000001033312055775440016432 00000000000000#include "gts.h" int main (int argc, char * argv[]) { GtsSurface * surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); GtsVertex * v1 = gts_vertex_new (gts_vertex_class (), 0, 0, 0); GtsVertex * v2 = gts_vertex_new (gts_vertex_class (), 0, -0.5, 1); GtsVertex * v3 = gts_vertex_new (gts_vertex_class (), 0, 0.5, 1); GtsVertex * v4 = gts_vertex_new (gts_vertex_class (), 1, 0, 0); GtsVertex * v5 = gts_vertex_new (gts_vertex_class (), 0, -0.5, -1); GtsVertex * v6 = gts_vertex_new (gts_vertex_class (), 1, -0.5, -1); GtsVertex * v7 = gts_vertex_new (gts_vertex_class (), 1, 0.5, -1); GtsVertex * v8 = gts_vertex_new (gts_vertex_class (), 1, -0.5, 1); GtsVertex * v9 = gts_vertex_new (gts_vertex_class (), 1, 0.5, 1); GtsVertex * v10 = gts_vertex_new (gts_vertex_class (), 0, 0.5, -1); GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2); GtsEdge * e2 = gts_edge_new (gts_edge_class (), v1, v3); GtsEdge * e3 = gts_edge_new (gts_edge_class (), v2, v3); GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v5); GtsEdge * e5 = gts_edge_new (gts_edge_class (), v4, v6); GtsEdge * e6 = gts_edge_new (gts_edge_class (), v5, v6); GtsEdge * e7 = gts_edge_new (gts_edge_class (), v1, v4); GtsEdge * e8 = gts_edge_new (gts_edge_class (), v1, v5); GtsEdge * e9 = gts_edge_new (gts_edge_class (), v6, v7); GtsEdge * e10 = gts_edge_new (gts_edge_class (), v4, v7); GtsEdge * e11 = gts_edge_new (gts_edge_class (), v1, v7); GtsEdge * e12 = gts_edge_new (gts_edge_class (), v8, v9); GtsEdge * e13 = gts_edge_new (gts_edge_class (), v4, v9); GtsEdge * e14 = gts_edge_new (gts_edge_class (), v4, v8); GtsEdge * e15 = gts_edge_new (gts_edge_class (), v5, v10); GtsEdge * e16 = gts_edge_new (gts_edge_class (), v1, v10); GtsEdge * e17 = gts_edge_new (gts_edge_class (), v10, v7); GtsEdge * e18 = gts_edge_new (gts_edge_class (), v1, v8); GtsEdge * e19 = gts_edge_new (gts_edge_class (), v2, v8); GtsEdge * e20 = gts_edge_new (gts_edge_class (), v4, v3); GtsEdge * e21 = gts_edge_new (gts_edge_class (), v3, v9); GtsFace * f1 = gts_face_new (gts_face_class (), e1, e2, e3); GtsFace * f2 = gts_face_new (gts_face_class (), e4, e5, e6); GtsFace * f3 = gts_face_new (gts_face_class (), e7, e4, e8); GtsFace * f4 = gts_face_new (gts_face_class (), e9, e5, e10); GtsFace * f5 = gts_face_new (gts_face_class (), e11, e10, e7); GtsFace * f6 = gts_face_new (gts_face_class (), e12, e13, e14); GtsFace * f7 = gts_face_new (gts_face_class (), e15, e16, e8); GtsFace * f8 = gts_face_new (gts_face_class (), e17, e11, e16); GtsFace * f9 = gts_face_new (gts_face_class (), e18, e14, e7); GtsFace * f10 = gts_face_new (gts_face_class (), e19, e18, e1); GtsFace * f11 = gts_face_new (gts_face_class (), e20, e13, e21); GtsFace * f12 = gts_face_new (gts_face_class (), e7, e20, e2); GtsVertex * v; GtsVolumeOptimizedParams params = { 0.5, 0.5, 0.0 }; GtsSplit * vs; gts_surface_add_face (surface, f1); gts_surface_add_face (surface, f2); gts_surface_add_face (surface, f3); gts_surface_add_face (surface, f4); gts_surface_add_face (surface, f5); gts_surface_add_face (surface, f6); gts_surface_add_face (surface, f7); gts_surface_add_face (surface, f8); gts_surface_add_face (surface, f9); gts_surface_add_face (surface, f10); gts_surface_add_face (surface, f11); gts_surface_add_face (surface, f12); g_assert (gts_edge_collapse_is_valid (e7)); v = gts_volume_optimized_vertex (e7, gts_vertex_class (), ¶ms); vs = gts_split_new (gts_split_class (), v, GTS_OBJECT (GTS_SEGMENT (e7)->v1), GTS_OBJECT (GTS_SEGMENT (e7)->v2)); gts_split_collapse (vs, gts_edge_class (), NULL); gts_surface_write (surface, stdout); return 0; } gts-snapshot-121130/test/coarsen/Makefile.am0000644000175100017510000000052312055775440015636 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-test\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la check_PROGRAMS = cartesian c1 c2 c3 double_prism TESTS = flat.sh flat1.sh EXTRA_DIST = flat.sh flat1.sh gts-snapshot-121130/test/coarsen/flat.sh0000644000175100017510000000037512055775440015071 00000000000000#! /bin/bash ./cartesian 10 10 0 0 | ../../examples/coarsen -n 116 -v 2> /tmp/tutu > /dev/null if awk 'BEGIN {area = 0.} { if ($4 == "area:") { if (area) { if (area == $5) exit 1; else exit 0;} else area = $5;}}' < /tmp/tutu; then exit 1 fi exit 0 gts-snapshot-121130/test/coarsen/flat1.sh0000644000175100017510000000037512055775440015152 00000000000000#! /bin/bash ./cartesian 15 15 0 0 | ../../examples/coarsen -n 100 -v 2> /tmp/tutu > /dev/null if awk 'BEGIN {area = 0.} { if ($4 == "area:") { if (area) { if (area == $5) exit 1; else exit 0;} else area = $5;}}' < /tmp/tutu; then exit 1 fi exit 0 gts-snapshot-121130/test/coarsen/c3.c0000644000175100017510000001263612055775440014263 00000000000000#include "gts.h" static GtsVertex * edge_collapse (GtsSurface * s, GtsEdge * e, GtsCoarsenFunc coarsen_func, gpointer coarsen_data) { GtsVertex * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid; GtsSplit * vs; GtsObject * o1, * o2; /* if the edge is degenerate (i.e. v1 == v2), destroy and return */ if (v1 == v2) { gts_object_destroy (GTS_OBJECT (e)); return NULL; } mid = (*coarsen_func) (e, s->vertex_class, coarsen_data); o1 = GTS_OBJECT (v1); o2 = GTS_OBJECT (v2); vs = gts_split_new (gts_split_class (), mid, o1, o2); gts_split_collapse (vs, s->edge_class, NULL); return mid; } int main (int argc, char * argv[]) { GtsSurface * surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); GtsVertex * v1 = gts_vertex_new (gts_vertex_class (), 11640, 15867.5, 1080); GtsVertex * v2 = gts_vertex_new (gts_vertex_class (), 11700, 15720, 1070); GtsVertex * v3 = gts_vertex_new (gts_vertex_class (), 11616, 15728.8, 1084); GtsVertex * v4 = gts_vertex_new (gts_vertex_class (), 11580, 15840, 1090); GtsVertex * v5 = gts_vertex_new (gts_vertex_class (), 11460, 15840, 1100); GtsVertex * v6 = gts_vertex_new (gts_vertex_class (), 11520, 15840, 1100); GtsVertex * v7 = gts_vertex_new (gts_vertex_class (), 11520, 15780, 1100); GtsVertex * v8 = gts_vertex_new (gts_vertex_class (), 11700, 15660, 1070); GtsVertex * v9 = gts_vertex_new (gts_vertex_class (), 11672.4, 15600.1, 1074.6); GtsVertex * v10 = gts_vertex_new (gts_vertex_class (), 11520, 15751.7, 1100); GtsVertex * v11 = gts_vertex_new (gts_vertex_class (), 11569.5, 15646.1, 1091.75); GtsVertex * v; GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2); GtsEdge * e2 = gts_edge_new (gts_edge_class (), v1, v3); GtsEdge * e3 = gts_edge_new (gts_edge_class (), v3, v2); GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v1); GtsEdge * e5 = gts_edge_new (gts_edge_class (), v3, v4); GtsEdge * e6 = gts_edge_new (gts_edge_class (), v5, v6); GtsEdge * e7 = gts_edge_new (gts_edge_class (), v5, v7); GtsEdge * e8 = gts_edge_new (gts_edge_class (), v6, v7); GtsEdge * e9 = gts_edge_new (gts_edge_class (), v8, v2); GtsEdge * e10 = gts_edge_new (gts_edge_class (), v8, v3); GtsEdge * e11 = gts_edge_new (gts_edge_class (), v6, v4); GtsEdge * e12 = gts_edge_new (gts_edge_class (), v6, v3); GtsEdge * e13 = gts_edge_new (gts_edge_class (), v8, v9); GtsEdge * e14 = gts_edge_new (gts_edge_class (), v3, v9); GtsEdge * e15 = gts_edge_new (gts_edge_class (), v7, v10); GtsEdge * e16 = gts_edge_new (gts_edge_class (), v10, v5); GtsEdge * e17 = gts_edge_new (gts_edge_class (), v11, v3); GtsEdge * e18 = gts_edge_new (gts_edge_class (), v9, v11); GtsEdge * e19 = gts_edge_new (gts_edge_class (), v10, v11); GtsEdge * e20 = gts_edge_new (gts_edge_class (), v11, v7); GtsEdge * e21 = gts_edge_new (gts_edge_class (), v7, v3); GtsFace * f1 = gts_face_new (gts_face_class (), e1, e2, e3); GtsFace * f2 = gts_face_new (gts_face_class (), e4, e5, e2); GtsFace * f3 = gts_face_new (gts_face_class (), e6, e7, e8); GtsFace * f4 = gts_face_new (gts_face_class (), e9, e3, e10); GtsFace * f5 = gts_face_new (gts_face_class (), e11, e12, e5); GtsFace * f6 = gts_face_new (gts_face_class (), e13, e10, e14); GtsFace * f7 = gts_face_new (gts_face_class (), e15, e7, e16); GtsFace * f8 = gts_face_new (gts_face_class (), e17, e18, e14); GtsFace * f9 = gts_face_new (gts_face_class (), e19, e20, e15); GtsFace * f10 = gts_face_new (gts_face_class (), e21, e12, e8); GtsFace * f11 = gts_face_new (gts_face_class (), e21, e20, e17); GtsVolumeOptimizedParams params = { 0.5, 0.5, 0. }; gts_surface_add_face (surface, f1); gts_surface_add_face (surface, f2); gts_surface_add_face (surface, f3); gts_surface_add_face (surface, f4); gts_surface_add_face (surface, f5); gts_surface_add_face (surface, f6); gts_surface_add_face (surface, f7); gts_surface_add_face (surface, f8); gts_surface_add_face (surface, f9); gts_surface_add_face (surface, f10); gts_surface_add_face (surface, f11); gts_surface_print_stats (surface, stderr); fprintf (stderr, "volume: %g\n", gts_surface_volume (surface)); #if 0 v = edge_collapse (surface, e21, (GtsCoarsenFunc) gts_volume_optimized_vertex, ¶ms); #else v = gts_volume_optimized_vertex (e21, gts_vertex_class (), ¶ms); fprintf (stderr, "v: %.10g %.10g %.10g\n", GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z); fprintf (stderr, "before: check for folds...\n"); gts_edge_collapse_creates_fold (e21, v, 0.999695413509); v = edge_collapse (surface, e21, (GtsCoarsenFunc) gts_volume_optimized_vertex, ¶ms); fprintf (stderr, "after: check for folds...\n"); { GSList * i = v->segments; while (i) { GtsEdge * e = i->data; gts_triangles_are_folded (e->triangles, GTS_SEGMENT (e)->v1, GTS_SEGMENT (e)->v2, 0.999695413509); i = i->next; } } #endif gts_surface_print_stats (surface, stderr); fprintf (stderr, "volume: %g\n", gts_surface_volume (surface)); gts_surface_write (surface, stdout); return 0; } gts-snapshot-121130/test/coarsen/c1.c0000644000175100017510000001351412055775440014255 00000000000000#include "gts.h" static void triangle_normal (GtsTriangle * t, gdouble * nx, gdouble * ny, gdouble * nz, gdouble * nt) { GtsPoint * p1, * p2 = NULL, * p3 = NULL; gdouble x1, y1, z1, x2, y2, z2; g_return_if_fail (t != NULL); p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v1); } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v1); p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v2); } else g_assert_not_reached (); x1 = p2->x - p1->x; y1 = p2->y - p1->y; z1 = p2->z - p1->z; x2 = p3->x - p1->x; y2 = p3->y - p1->y; z2 = p3->z - p1->z; *nt = ((p1->y*p2->z - p1->z*p2->y)*p3->x + (p1->z*p2->x - p1->x*p2->z)*p3->y + (p1->x*p2->y - p1->y*p2->x)*p3->z); *nx = y1*z2 - z1*y2; *ny = z1*x2 - x1*z2; *nz = x1*y2 - y1*x2; } static gdouble edge_volume_cost (GtsEdge * e, GtsVertex * v) { GSList * i, * triangles; gdouble n1, n2, n3, nt; gdouble cost = 0.0, a; triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL); triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles); i = triangles; while (i) { if (GTS_IS_FACE (i->data)) { triangle_normal (i->data, &n1, &n2, &n3, &nt); a = GTS_POINT (v)->x*n1 + GTS_POINT (v)->y*n2 + GTS_POINT (v)->z*n3 - nt; cost += a*a; } i = i->next; } g_slist_free (triangles); return cost/36.; } static GtsVertex * edge_collapse (GtsSurface * s, GtsEdge * e, GtsCoarsenFunc midvertex) { GtsVertex * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid; GtsSplit * vs; GtsObject * o1, * o2; /* if the edge is degenerate (i.e. v1 == v2), destroy and return */ if (v1 == v2) { gts_object_destroy (GTS_OBJECT (e)); return NULL; } mid = (*midvertex) (e, s->vertex_class, NULL); o1 = GTS_OBJECT (v1); o2 = GTS_OBJECT (v2); vs = gts_split_new (gts_split_class (), mid, o1, o2); gts_split_collapse (vs, s->edge_class, NULL); return mid; } int main (int argc, char * argv[]) { GtsSurface * surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); GtsVertex * v1 = gts_vertex_new (gts_vertex_class (), 0.684, 0.024, 0.12); GtsVertex * v2 = gts_vertex_new (gts_vertex_class (), 0.696, 0.024, 0.12); GtsVertex * v3 = gts_vertex_new (gts_vertex_class (), 0.696, 0, 0.12); GtsVertex * v4 = gts_vertex_new (gts_vertex_class (), 0.66, 0.024, 0.12); GtsVertex * v5 = gts_vertex_new (gts_vertex_class (), 0.684, 0.012, 0.12); GtsVertex * v6 = gts_vertex_new (gts_vertex_class (), 0.672, 0.024, 0.12); GtsVertex * v7 = gts_vertex_new (gts_vertex_class (), 0.672, 0.036, 0.1); #if 1 GtsVertex * v8 = gts_vertex_new (gts_vertex_class (), 0.684, 0.036, 0.1); #else GtsVertex * v8 = gts_vertex_new (gts_vertex_class (), 0.684, 0.036, 0.101); #endif GtsVertex * v9 = gts_vertex_new (gts_vertex_class (), 0.6744, 0, 0.12); GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2); GtsEdge * e2 = gts_edge_new (gts_edge_class (), v3, v1); GtsEdge * e3 = gts_edge_new (gts_edge_class (), v3, v2); GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v5); GtsEdge * e5 = gts_edge_new (gts_edge_class (), v6, v5); GtsEdge * e6 = gts_edge_new (gts_edge_class (), v6, v4); GtsEdge * e7 = gts_edge_new (gts_edge_class (), v7, v8); GtsEdge * e8 = gts_edge_new (gts_edge_class (), v7, v1); GtsEdge * e9 = gts_edge_new (gts_edge_class (), v1, v8); GtsEdge * e10 = gts_edge_new (gts_edge_class (), v9, v3); GtsEdge * e11 = gts_edge_new (gts_edge_class (), v3, v5); GtsEdge * e12 = gts_edge_new (gts_edge_class (), v9, v5); GtsEdge * e13 = gts_edge_new (gts_edge_class (), v6, v1); GtsEdge * e14 = gts_edge_new (gts_edge_class (), v6, v7); GtsEdge * e15 = gts_edge_new (gts_edge_class (), v5, v1); GtsEdge * e16 = gts_edge_new (gts_edge_class (), v8, v2); GtsEdge * e17 = gts_edge_new (gts_edge_class (), v9, v4); GtsFace * f1 = gts_face_new (gts_face_class (), e1, e2, e3); GtsFace * f2 = gts_face_new (gts_face_class (), e4, e5, e6); GtsFace * f3 = gts_face_new (gts_face_class (), e7, e8, e9); GtsFace * f4 = gts_face_new (gts_face_class (), e10, e11, e12); GtsFace * f5 = gts_face_new (gts_face_class (), e13, e8, e14); GtsFace * f6 = gts_face_new (gts_face_class (), e15, e13, e5); GtsFace * f7 = gts_face_new (gts_face_class (), e1, e16, e9); GtsFace * f8 = gts_face_new (gts_face_class (), e4, e17, e12); GtsFace * f9 = gts_face_new (gts_face_class (), e15, e11, e2); GtsVertex * v; gts_surface_add_face (surface, f1); gts_surface_add_face (surface, f2); gts_surface_add_face (surface, f3); gts_surface_add_face (surface, f4); gts_surface_add_face (surface, f5); gts_surface_add_face (surface, f6); gts_surface_add_face (surface, f7); gts_surface_add_face (surface, f8); gts_surface_add_face (surface, f9); #if 1 v = edge_collapse (surface, e15, (GtsCoarsenFunc) gts_volume_optimized_vertex); #else v = gts_volume_optimized_vertex (e15, gts_vertex_class ()); fprintf (stderr, "(%g, %g, %g) cost: %g\n", GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z, edge_volume_cost (e15, v)); #endif gts_surface_print_stats (surface, stderr); gts_surface_write (surface, stdout); return 0; } gts-snapshot-121130/test/Makefile.am0000644000175100017510000000013612055775440014204 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = boolean delaunay coarsen gts-snapshot-121130/tools/0000755000175100017510000000000012055775530012411 500000000000000gts-snapshot-121130/tools/gts2dxf.c0000644000175100017510000000512012055775440014054 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void write_vertex (GtsVertex * v, guint * nv) { printf (" 0\nVERTEX\n 8\n0\n 10\n%g\n 20\n%g\n 30\n%g\n 70\n192\n", GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z); GTS_OBJECT (v)->reserved = GUINT_TO_POINTER ((*nv)++); } static void write_face (GtsTriangle * t) { GtsVertex * v1, * v2, * v3; gts_triangle_vertices (t, &v1, &v2, &v3); printf (" 0\nVERTEX\n 8\n0\n 10\n0.0\n 20\n0.0\n 30\n0.0\n 70\n128\n" " 71\n%u\n 72\n%u\n 73\n%u\n", GPOINTER_TO_UINT (GTS_OBJECT (v1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (v2)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (v3)->reserved)); } int main (int argc, char * argv[]) { GtsSurface * s; GtsFile * fp; guint nv = 1; GtsSurfaceStats st; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("gts2dxf: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } gts_surface_stats (s, &st); printf (" 0\nSECTION\n 2\nHEADER\n 9\n$ACADVER\n 1\n" "AC1009\n 0\nENDSEC\n 0\n" "SECTION\n" " 2\n" "ENTITIES\n" " 0\n" "POLYLINE\n" " 8\n0\n" " 66\n1\n" " 10\n0.0\n" " 20\n0.0\n" " 30\n0.0\n" " 70\n64\n" " 71\n%u\n" " 72\n%u\n", st.edges_per_vertex.n, st.n_faces); gts_surface_foreach_vertex (s, (GtsFunc) write_vertex, &nv); gts_surface_foreach_face (s, (GtsFunc) write_face, NULL); printf (" 0\nSEQEND\n 0\nENDSEC\n 0\nEOF\n"); return 0; } gts-snapshot-121130/tools/gtscheck.c0000644000175100017510000000773012055775440014277 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" int main (int argc, char * argv[]) { GtsSurface * s, * self_intersects; gboolean verbose = FALSE; int c = 0; GtsFile * fp; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hv", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hv"))) { #endif /* not HAVE_GETOPT_LONG */ case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: gtscheck [OPTION] < FILE\n" "Checks that a surface defines a closed, orientable\n" "non self-intersecting manifold.\n" "\n" "If the surface is self-intersecting, the set of intersected faces\n" "is written on standard output as a GTS surface file.\n" "\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "The return status reflects the error encountered:\n" " 0: none\n" " 1: the input file is not a valid GTS file\n" " 2: the surface is not an orientable manifold\n" " 3: the surface is an orientable manifold but is self-intersecting\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `gtscheck --help' for more information.\n"); return 1; /* failure */ } } /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("gtscheck: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } /* if verbose on print stats */ if (verbose) gts_surface_print_stats (s, stderr); if (!gts_surface_is_orientable (s)) { if (verbose) fprintf (stderr, "gtscheck: the surface on standard input is not an orientable manifold\n"); return 2; /* failure */ } self_intersects = gts_surface_is_self_intersecting (s); if (self_intersects != NULL) { if (verbose) { fprintf (stderr, "gtscheck: the surface on standard input is self-intersecting\n"); gts_surface_print_stats (self_intersects, stderr); } gts_surface_write (self_intersects, stdout); return 3; /* failure */ } return 0; /* success */ } gts-snapshot-121130/tools/gtstemplate0000644000175100017510000001373612055775440014617 00000000000000#! /bin/sh usage() { cat <&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --no-extra-data) no_extra_data=yes ;; --no-extra-method) no_extra_method=yes ;; --overload=*) methods="$methods $optarg" ;; --*) usage 1 1>&2 ;; *) if test -z "$Object"; then Object=$1 elif test -z "$ParentObject"; then ParentObject=$1 else usage 1 1>&2 fi ;; esac shift done if test -z "$Object" -o -z "$ParentObject"; then usage 1 1>&2 fi object=`form_name $Object` ObjectName=$Object if test "$no_extra_data" = "yes"; then Object=$ParentObject fi OBJECT=`echo $object | awk '{print toupper ($1)}'` if test "$no_extra_method" = "yes"; then ObjectClass=$ParentObject"Class" else ObjectClass=$ObjectName"Class" OBJECT_CLASS=$OBJECT"_CLASS" fi parent_object=`form_name $ParentObject` parent_object_class=$parent_object"_class" ParentObjectClass=$ParentObject"Class" object_class=$object"_class" cat <*/ $ParentObject parent; /*< public >*/ /* add extra data here (if public) */ }; EOF fi if test "$no_extra_method" != "yes"; then cat <*/ $ParentObjectClass parent_class; /*< public >*/ /* add extra methods here */ }; EOF fi if test "$no_extra_data" != "yes"; then cat <parent_class->destroy) (object); } EOF ;; read) object_read=$object"_read" cat <parent_class->read) (* GTS_OBJECT_CLASS ($object_class ())->parent_class->read) (o, fp); if (fp->type == GTS_ERROR) return; /* do object-specific read here */ /* do not forget to prepare for next read */ gts_file_next_token (fp); } EOF ;; write) object_write=$object"_write" cat <parent_class->write) (* GTS_OBJECT_CLASS ($object_class ())->parent_class->write) (o, fp); /* do object specific write here */ } EOF ;; color) object_color=$object"_color" cat <parent_class)->event) (event, sim)) { /* do object-specific event here */ return TRUE; } return FALSE; } EOF ;; *) echo "gtstemplate: unknown method '$method'" exit 1; ;; esac done if test -n "$methods" -o "$no_extra_method" != "yes"; then object_class_init=$object_class"_init" cat <event = $object_event; EOF fi if test -n "$object_read"; then cat <read = $object_read; EOF fi if test -n "$object_write"; then cat <write = $object_write; EOF fi if test -n "$object_color"; then cat <color = $object_color; EOF fi if test -n "$object_destroy"; then cat <destroy = $object_destroy; EOF fi cat < #include typedef struct { GtsVector min, max; } Range; static void range (GtsPoint * p, Range * r) { int c; for (c = 0; c < 3; c++) { if ((&p->x)[c] > r->max[c]) r->max[c] = (&p->x)[c]; if ((&p->x)[c] < r->min[c]) r->min[c] = (&p->x)[c]; } } int main (int argc, char * argv[]) { if (argc != 2) { fprintf (stderr, "Usage: gts2xyz DX < input.gts > output.xyz\n" "Samples a GTS file on a regular grid at intervals DX\n"); return 1; } GtsSurface * s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); GtsFile * fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("gts2xyz: the file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } Range r = {{G_MAXDOUBLE,G_MAXDOUBLE,G_MAXDOUBLE}, {-G_MAXDOUBLE,-G_MAXDOUBLE,-G_MAXDOUBLE}}; gts_surface_foreach_vertex (s, (GtsFunc) range, &r); double dx = atof (argv[1]); GtsFace * f = NULL; GtsPoint p; for (p.x = r.min[0]; p.x <= r.max[0]; p.x += dx) for (p.y = r.min[1]; p.y <= r.max[1]; p.y += dx) { f = gts_point_locate (&p, s, f); if (f != NULL) { gts_triangle_interpolate_height (GTS_TRIANGLE (f), &p); if (p.z > r.min[2] && p.z < r.max[2]) printf ("%f %f %f\n", p.x, p.y, p.z); } } return 0; } gts-snapshot-121130/tools/Makefile.in0000644000175100017510000005220412055775446014407 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ bin_PROGRAMS = gts2oogl$(EXEEXT) gtscompare$(EXEEXT) gtscheck$(EXEEXT) \ stl2gts$(EXEEXT) gts2dxf$(EXEEXT) gts2stl$(EXEEXT) \ gts2xyz$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) gts2dxf_SOURCES = gts2dxf.c gts2dxf_OBJECTS = gts2dxf.$(OBJEXT) gts2dxf_LDADD = $(LDADD) gts2dxf_DEPENDENCIES = $(top_builddir)/src/libgts.la gts2oogl_SOURCES = gts2oogl.c gts2oogl_OBJECTS = gts2oogl.$(OBJEXT) gts2oogl_LDADD = $(LDADD) gts2oogl_DEPENDENCIES = $(top_builddir)/src/libgts.la gts2stl_SOURCES = gts2stl.c gts2stl_OBJECTS = gts2stl.$(OBJEXT) gts2stl_LDADD = $(LDADD) gts2stl_DEPENDENCIES = $(top_builddir)/src/libgts.la gts2xyz_SOURCES = gts2xyz.c gts2xyz_OBJECTS = gts2xyz.$(OBJEXT) gts2xyz_LDADD = $(LDADD) gts2xyz_DEPENDENCIES = $(top_builddir)/src/libgts.la gtscheck_SOURCES = gtscheck.c gtscheck_OBJECTS = gtscheck.$(OBJEXT) gtscheck_LDADD = $(LDADD) gtscheck_DEPENDENCIES = $(top_builddir)/src/libgts.la gtscompare_SOURCES = gtscompare.c gtscompare_OBJECTS = gtscompare.$(OBJEXT) gtscompare_LDADD = $(LDADD) gtscompare_DEPENDENCIES = $(top_builddir)/src/libgts.la stl2gts_SOURCES = stl2gts.c stl2gts_OBJECTS = stl2gts.$(OBJEXT) stl2gts_LDADD = $(LDADD) stl2gts_DEPENDENCIES = $(top_builddir)/src/libgts.la 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' SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --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 = gts2dxf.c gts2oogl.c gts2stl.c gts2xyz.c gtscheck.c \ gtscompare.c stl2gts.c DIST_SOURCES = gts2dxf.c gts2oogl.c gts2stl.c gts2xyz.c gtscheck.c \ gtscompare.c stl2gts.c 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-tools\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la bin_SCRIPTS = gtstemplate EXTRA_DIST = gtstemplate all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 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 gts2dxf$(EXEEXT): $(gts2dxf_OBJECTS) $(gts2dxf_DEPENDENCIES) @rm -f gts2dxf$(EXEEXT) $(LINK) $(gts2dxf_OBJECTS) $(gts2dxf_LDADD) $(LIBS) gts2oogl$(EXEEXT): $(gts2oogl_OBJECTS) $(gts2oogl_DEPENDENCIES) @rm -f gts2oogl$(EXEEXT) $(LINK) $(gts2oogl_OBJECTS) $(gts2oogl_LDADD) $(LIBS) gts2stl$(EXEEXT): $(gts2stl_OBJECTS) $(gts2stl_DEPENDENCIES) @rm -f gts2stl$(EXEEXT) $(LINK) $(gts2stl_OBJECTS) $(gts2stl_LDADD) $(LIBS) gts2xyz$(EXEEXT): $(gts2xyz_OBJECTS) $(gts2xyz_DEPENDENCIES) @rm -f gts2xyz$(EXEEXT) $(LINK) $(gts2xyz_OBJECTS) $(gts2xyz_LDADD) $(LIBS) gtscheck$(EXEEXT): $(gtscheck_OBJECTS) $(gtscheck_DEPENDENCIES) @rm -f gtscheck$(EXEEXT) $(LINK) $(gtscheck_OBJECTS) $(gtscheck_LDADD) $(LIBS) gtscompare$(EXEEXT): $(gtscompare_OBJECTS) $(gtscompare_DEPENDENCIES) @rm -f gtscompare$(EXEEXT) $(LINK) $(gtscompare_OBJECTS) $(gtscompare_LDADD) $(LIBS) stl2gts$(EXEEXT): $(stl2gts_OBJECTS) $(stl2gts_DEPENDENCIES) @rm -f stl2gts$(EXEEXT) $(LINK) $(stl2gts_OBJECTS) $(stl2gts_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | 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; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gts2dxf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gts2oogl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gts2stl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gts2xyz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtscheck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtscompare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stl2gts.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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) set x; \ 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; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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 "$(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 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(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) -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-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-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 -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 uninstall-binSCRIPTS .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-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-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-binSCRIPTS # 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: gts-snapshot-121130/tools/stl2gts.c0000644000175100017510000002172012055775440014101 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #ifdef NATIVE_WIN32 # include # include #endif static GPtrArray * stl_read (FILE * fp) { GPtrArray * a = g_ptr_array_new (); char tag[6]; fgets (tag, 6, fp); rewind (fp); if (!strcmp (tag, "solid")) { /* ASCII file */ GtsFile * f = gts_file_new (fp); while (f->type == GTS_STRING) { if (!strcmp (f->token->str, "vertex")) { gdouble x, y, z; gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin:%d:%d: expecting a number (x-coordinate)\n", f->line, f->pos); exit (1); } x = atof (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin:%d:%d: expecting a number (y-coordinate)\n", f->line, f->pos); exit (1); } y = atof (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin:%d:%d: expecting a number (z-coordinate)\n", f->line, f->pos); exit (1); } z = atof (f->token->str); g_ptr_array_add (a, gts_vertex_new (gts_vertex_class (), x, y, z)); } else if (!strcmp (f->token->str, "endsolid")) break; gts_file_first_token_after (f, '\n'); } gts_file_destroy (f); } else { /* binary file */ guint32 nf; gchar header[80]; guint i; #ifdef NATIVE_WIN32 _setmode ( _fileno (fp), _O_BINARY); #endif if (fread (header, sizeof (gchar), 80, fp) != 80) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: incomplete header\n"); exit (1); } if (fread (&nf, sizeof (guint32), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing number of facets\n"); exit (1); } i = nf; while (i > 0) { gfloat x, y, z; guint j; guint16 attbytecount; if (fread (&x, sizeof (gfloat), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing normal x-coordinate\n"); exit (1); } if (fread (&y, sizeof (gfloat), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing normal y-coordinate\n"); exit (1); } if (fread (&z, sizeof (gfloat), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing normal z-coordinate\n"); exit (1); } for (j = 0; j < 3; j++) { if (fread (&x, sizeof (gfloat), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing vertex x-coordinate\n"); exit (1); } if (fread (&y, sizeof (gfloat), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing vertex y-coordinate\n"); exit (1); } if (fread (&z, sizeof (gfloat), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing vertex z-coordinate\n"); exit (1); } g_ptr_array_add (a, gts_vertex_new (gts_vertex_class (), x, y, z)); } if (fread (&attbytecount, sizeof (guint16), 1, fp) != 1) { fprintf (stderr, "Input file is not a valid STL file\n" "stdin: missing attribute byte count\n"); exit (1); } i--; } } return a; } static void vertices_merge (GPtrArray * stl, gdouble epsilon) { GPtrArray * array; GNode * kdtree; guint i; array = g_ptr_array_new (); for (i = 0; i < stl->len; i++) g_ptr_array_add (array, stl->pdata[i]); kdtree = gts_kdtree_new (array, NULL); g_ptr_array_free (array, TRUE); for (i = 0; i < stl->len; i++) { GtsVertex * v = stl->pdata[i]; if (!GTS_OBJECT (v)->reserved) { /* Do something only if v is active */ GtsBBox * bbox; GSList * selected, * j; /* build bounding box */ bbox = gts_bbox_new (gts_bbox_class (), v, GTS_POINT (v)->x - epsilon, GTS_POINT (v)->y - epsilon, GTS_POINT (v)->z - epsilon, GTS_POINT (v)->x + epsilon, GTS_POINT (v)->y + epsilon, GTS_POINT (v)->z + epsilon); /* select vertices which are inside bbox using kdtree */ j = selected = gts_kdtree_range (kdtree, bbox, NULL); while (j) { GtsVertex * sv = j->data; if (sv != v && !GTS_OBJECT (sv)->reserved) GTS_OBJECT (sv)->reserved = v; /* mark sv as inactive */ j = j->next; } g_slist_free (selected); gts_object_destroy (GTS_OBJECT (bbox)); } } gts_kdtree_destroy (kdtree); /* destroy inactive vertices */ /* we want to control vertex destruction */ gts_allow_floating_vertices = TRUE; for (i = 0; i < stl->len; i++) { GtsVertex * v = stl->pdata[i]; if (GTS_OBJECT (v)->reserved) { /* v is inactive */ stl->pdata[i] = GTS_OBJECT (v)->reserved; gts_object_destroy (GTS_OBJECT (v)); } } gts_allow_floating_vertices = FALSE; } static void add_stl (GtsSurface * s, GPtrArray * stl) { guint i; for (i = 0; i < stl->len/3; i++) { GtsEdge * e1 = GTS_EDGE (gts_vertices_are_connected (stl->pdata[3*i], stl->pdata[3*i + 1])); GtsEdge * e2 = GTS_EDGE (gts_vertices_are_connected (stl->pdata[3*i + 1], stl->pdata[3*i + 2])); GtsEdge * e3 = GTS_EDGE (gts_vertices_are_connected (stl->pdata[3*i + 2], stl->pdata[3*i])); if (e1 == NULL && stl->pdata[3*i] != stl->pdata[3*i + 1]) e1 = gts_edge_new (s->edge_class, stl->pdata[3*i], stl->pdata[3*i + 1]); if (e2 == NULL && stl->pdata[3*i + 1] != stl->pdata[3*i + 2]) e2 = gts_edge_new (s->edge_class, stl->pdata[3*i + 1], stl->pdata[3*i + 2]); if (e3 == NULL && stl->pdata[3*i + 2] != stl->pdata[3*i]) e3 = gts_edge_new (s->edge_class, stl->pdata[3*i + 2], stl->pdata[3*i]); if (e1 != NULL && e2 != NULL && e3 != NULL) gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3)); else fprintf (stderr, "stl2gts: warning: ignoring degenerate facet!"); } } int main (int argc, char * argv[]) { int c = 0; gboolean verbose = FALSE; gboolean nomerge = FALSE; gboolean revert = FALSE; GPtrArray * stl; GtsSurface * s; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"revert", no_argument, NULL, 'r'}, {"nomerge", no_argument, NULL, 'n'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvnr", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvnr"))) { #endif /* not HAVE_GETOPT_LONG */ case 'r': /* revert */ revert = TRUE; break; case 'n': /* nomerge */ nomerge = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: stl2gts [OPTION]... < input.stl > output.gts\n" "Convert an STL file to GTS format.\n" "\n" " -r, --revert revert face normals\n" " -n, --nomerge do not merge vertices\n" " -v, --verbose display surface statistics\n" " -h, --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; break; case 'v': verbose = TRUE; break; case '?': /* wrong options */ fprintf (stderr, "Try `stl2gts --help' for more information.\n"); return 1; } } stl = stl_read (stdin); if (!nomerge) vertices_merge (stl, 0.); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); add_stl (s, stl); if (revert) gts_surface_foreach_face (s, (GtsFunc) gts_triangle_revert, NULL); if (verbose) gts_surface_print_stats (s, stderr); gts_surface_write (s, stdout); return 0; } gts-snapshot-121130/tools/gts2stl.c0000644000175100017510000000720712055775440014105 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" static void write_face (GtsTriangle * t) { GtsVertex * v1, * v2, * v3; GtsVector n; gts_triangle_vertices (t, &v1, &v2, &v3); gts_triangle_normal (t, &n[0], &n[1], &n[2]); gts_vector_normalize (n); printf ("facet normal %g %g %g\nouter loop\n", n[0], n[1], n[2]); printf ("vertex %g %g %g\n", GTS_POINT (v1)->x, GTS_POINT (v1)->y, GTS_POINT (v1)->z); printf ("vertex %g %g %g\n", GTS_POINT (v2)->x, GTS_POINT (v2)->y, GTS_POINT (v2)->z); printf ("vertex %g %g %g\n", GTS_POINT (v3)->x, GTS_POINT (v3)->y, GTS_POINT (v3)->z); puts ("endloop\nendfacet"); } int main (int argc, char * argv[]) { int c = 0; gboolean verbose = FALSE; gboolean revert = FALSE; GtsSurface * s; GtsFile * fp; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"revert", no_argument, NULL, 'r'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvr", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvr"))) { #endif /* not HAVE_GETOPT_LONG */ case 'r': /* revert */ revert = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: gts2stl [OPTION]... < input.gts > output.stl\n" "Convert a GTS file to STL format.\n" "\n" " -r, --revert revert face normals\n" " -v, --verbose display surface statistics\n" " -h, --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; break; case 'v': verbose = TRUE; break; case '?': /* wrong options */ fprintf (stderr, "Try `gts2stl --help' for more information.\n"); return 1; } } s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("gts2stl: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } if (revert) gts_surface_foreach_face (s, (GtsFunc) gts_triangle_revert, NULL); if (verbose) gts_surface_print_stats (s, stderr); puts ("solid"); gts_surface_foreach_face (s, (GtsFunc) write_face, NULL); puts ("endsolid"); return 0; } gts-snapshot-121130/tools/Makefile.am0000644000175100017510000000055212055775440014367 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-tools\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la bin_PROGRAMS = gts2oogl gtscompare gtscheck stl2gts gts2dxf gts2stl gts2xyz bin_SCRIPTS = gtstemplate EXTRA_DIST = gtstemplate gts-snapshot-121130/tools/gtscompare.c0000644000175100017510000004035212055775440014645 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" gdouble min = G_MAXDOUBLE, max = - G_MAXDOUBLE; gboolean logscale = FALSE; typedef struct { gdouble r, g, b; } Color; typedef struct { GPtrArray * colors; gboolean reversed; } Colormap; Colormap * colormap = NULL; static void build_list (GtsTriangle * t, GSList ** list) { *list = g_slist_prepend (*list, gts_bbox_triangle (gts_bbox_class (), t)); } static Color * color_new (gdouble r, gdouble g, gdouble b) { Color * c = g_malloc (sizeof (Color)); c->r = r; c->g = g; c->b = b; return c; } static Colormap * colormap_read (FILE * fptr) { Colormap * cmap = g_malloc (sizeof (Colormap)); Color c; cmap->reversed = FALSE; cmap->colors = g_ptr_array_new (); while (fscanf (fptr, "%lf %lf %lf", &c.r, &c.g, &c.b) == 3) g_ptr_array_add (cmap->colors, color_new (c.r/255., c.g/255., c.b/255.)); return cmap; } static Colormap * colormap_red_blue (void) { Colormap * cmap = g_malloc (sizeof (Colormap)); cmap->reversed = FALSE; cmap->colors = g_ptr_array_new (); g_ptr_array_add (cmap->colors, color_new (1.0, 0.0, 0.0)); g_ptr_array_add (cmap->colors, color_new (0.0, 0.0, 1.0)); return cmap; } static Color colormap_color (Colormap * cmap, gdouble val) { Color c = {1., 1., 1.}, * c1, * c2; guint i, n; gdouble coef; g_return_val_if_fail (cmap != NULL, c); if (val > 1.0) val = 1.0; else if (val < 0.0) val = 0.0; if (cmap->reversed) val = 1.0 - val; n = cmap->colors->len; if (n == 0) return c; if (n == 1) return *((Color *)cmap->colors->pdata[0]); i = floor((gdouble)val*(gdouble)(n - 1)); if (i == n - 1) return *((Color *)cmap->colors->pdata[cmap->colors->len - 1]); coef = val*(gdouble)(n - 1) - (gdouble)i; c1 = cmap->colors->pdata[i]; c2 = cmap->colors->pdata[i+1]; c.r = c1->r + coef*(c2->r - c1->r); c.g = c1->g + coef*(c2->g - c1->g); c.b = c1->b + coef*(c2->b - c1->b); return c; } static void foreach_vertex (GtsVertex * v, gpointer * info) { FILE * fp = info[0]; GHashTable * hash = info[1]; guint * nv = info[2]; GNode * tree = info[3]; gdouble d = sqrt (gts_bb_tree_point_distance (tree, GTS_POINT (v), (GtsBBoxDistFunc) gts_point_triangle_distance2, NULL)); Color c; if (logscale) { c = d > 0.0 ? colormap_color (colormap, (log10 (d) - min)/(max - min)) : colormap_color (colormap, 0.0); } else c = colormap_color (colormap, (d - min)/(max - min)); fprintf (fp, "%g %g %g %g %g %g 1.0\n", GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z, c.r, c.g, c.b); g_hash_table_insert (hash, v, GUINT_TO_POINTER (++(*nv))); } static void foreach_triangle (GtsTriangle * t, gpointer * info) { FILE * fp = info[0]; GHashTable * hash = info[1]; guint p1 = 0, p2 = 0, p3 = 0; p1 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v1)); if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v2)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v1)); } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v1)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v2)); } else g_assert_not_reached (); g_return_if_fail (p1 && p2 && p3); fprintf (fp, "3 %u %u %u\n", p1 - 1, p2 - 1, p3 - 1); } static void oogl_surface (GtsSurface * s, FILE * fptr, GNode * tree) { gpointer info[4]; GtsSurfaceStats stats; guint np = 0; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); info[0] = fptr; info[1] = g_hash_table_new (NULL, NULL); info[2] = &np; info[3] = tree; gts_surface_stats (s, &stats); fprintf (fptr, "COFF %u %u %u\n", stats.edges_per_vertex.n, stats.n_faces, stats.faces_per_edge.n); gts_surface_foreach_vertex (s, (GtsFunc)foreach_vertex, info); gts_surface_foreach_face (s, (GtsFunc)foreach_triangle, info); g_hash_table_destroy (info[1]); } static void build_bbox (GtsPoint * p, GtsBBox * bbox) { if (p->x > bbox->x2) bbox->x2 = p->x; if (p->x < bbox->x1) bbox->x1 = p->x; if (p->y > bbox->y2) bbox->y2 = p->y; if (p->y < bbox->y1) bbox->y1 = p->y; if (p->z > bbox->z2) bbox->z2 = p->z; if (p->z < bbox->z1) bbox->z1 = p->z; } int main (int argc, char * argv[]) { GtsSurface * s1, * s2; GtsSurfaceStats ss1, ss2; GtsSurfaceQualityStats sq1, sq2; gboolean image = FALSE; gboolean symmetric = FALSE; int c = 0; FILE * fptr; GtsFile * fp; GtsRange fd1, fd2, bd1, bd2; gdouble delta, v1, v2, l1, l2; GtsBBox * bbox; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); colormap = colormap_red_blue (); /* default */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"log", no_argument, NULL, 'l'}, {"symmetric", no_argument, NULL, 's'}, {"image", no_argument, NULL, 'i'}, {"cmap", required_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"min", required_argument, NULL, 'm'}, {"max", required_argument, NULL, 'M'}, {"reverse", no_argument, NULL, 'r'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "c:hm:M:risl", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "c:hm:M:risl"))) { #endif /* not HAVE_GETOPT_LONG */ case 'l': logscale = TRUE; break; case 's': symmetric = TRUE; break; case 'i': image = TRUE; break; case 'c': { /* colormap file */ FILE * fptr = fopen (optarg, "rt"); if (!fptr) { fprintf (stderr, "%s: cannot open colormap file `%s'.\n", argv[0], optarg); return 1; } colormap = colormap_read (fptr); fclose (fptr); break; } case 'm': /* minimum value */ min = atof (optarg); break; case 'M': /* maximum value */ max = atof (optarg); break; case 'r': /* reverse colormap */ colormap->reversed = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: gtscompare [OPTION]... FILE1 FILE2 DELTA\n" "Compare two GTS files. DELTA is the sampling length expressed as\n" "a fraction of the bounding box diagonal of the second surface.\n" "\n" " -s, --symmetric symmetric statistics\n" " -i, --image output visualisation mesh\n" " -c FILE --cmap=FILE load FILE as colormap\n" " -m VAL, --min=VAL use VAL as minimum scaling value\n" " -M VAL, --max=VAL use VAL as maximum scaling value\n" " -r, --reverse reverse colormap\n" " -l, --log use log scale\n" " -h, --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; break; case '?': /* wrong options */ fprintf (stderr, "Try `gtscompare --help' for more information.\n"); return 1; } } if (optind + 2 >= argc) { fprintf (stderr, "gtscompare: missing FILE1, FILE2 or DELTA argument\n"); fprintf (stderr, "Try `gtscompare --help' for more information.\n"); return 1; } delta = atof (argv[optind + 2]); if (delta <= 0. || delta >= 1.0) { fprintf (stderr, "gtscompare: DELTA must be in ]0,1[\n"); fprintf (stderr, "Try `gtscompare --help' for more information.\n"); return 1; } if ((fptr = fopen (argv[optind], "rt")) == NULL) { fprintf (stderr, "gtscompare: %s: No such file or directory\n", argv[optind]); return 1; } s1 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (fptr); if (gts_surface_read (s1, fp)) { fprintf (stderr, "gtscompare: file `%s' is not a valid GTS file\n", argv[optind]); fprintf (stderr, "%s:%d:%d: %s\n", argv[optind], fp->line, fp->pos, fp->error); gts_file_destroy (fp); return 1; } gts_file_destroy (fp); fclose (fptr); if ((fptr = fopen (argv[optind + 1], "rt")) == NULL) { fprintf (stderr, "gtscompare: %s: No such file or directory\n", argv[optind + 1]); return 1; } s2 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (fptr); if (gts_surface_read (s2, fp)) { fprintf (stderr, "gtscompare: file `%s' is not a valid GTS file\n", argv[optind + 1]); fprintf (stderr, "%s:%d:%d: %s\n", argv[optind + 1], fp->line, fp->pos, fp->error); gts_file_destroy (fp); return 1; } gts_file_destroy (fp); fclose (fptr); gts_surface_stats (s1, &ss1); gts_surface_stats (s2, &ss2); gts_surface_quality_stats (s1, &sq1); gts_surface_quality_stats (s2, &sq2); gts_surface_distance (s1, s2, delta, &fd1, &bd1); v1 = gts_surface_volume (s1); v2 = gts_surface_volume (s2); bbox = gts_bbox_new (GTS_BBOX_CLASS (gts_bbox_class()), GTS_OBJECT (s1), 0., 0., 0., 0., 0., 0.); bbox->x1 = bbox->y1 = bbox->z1 = G_MAXDOUBLE; bbox->x2 = bbox->y2 = bbox->z2 = - G_MAXDOUBLE; gts_surface_foreach_vertex (s1, (GtsFunc) build_bbox, bbox); l1 = bbox->x1 == G_MAXDOUBLE ? 0.0 : sqrt (gts_bbox_diagonal2 (bbox)); bbox->x1 = bbox->y1 = bbox->z1 = G_MAXDOUBLE; bbox->x2 = bbox->y2 = bbox->z2 = - G_MAXDOUBLE; gts_surface_foreach_vertex (s2, (GtsFunc) build_bbox, bbox); l2 = bbox->x1 == G_MAXDOUBLE ? 1.0 : sqrt (gts_bbox_diagonal2 (bbox)); gts_object_destroy (GTS_OBJECT (bbox)); fprintf (stderr, "-------------------------------------------------------------\n" " surface 1 surface 2\n" "-------------------------------------------------------------\n" "Vertices: %16u %20u\n" "Edges: %16u %20u\n" "Faces: %16u %20u\n" "------------------------ Topology ---------------------------\n" "Incompatible faces: %16u %20u\n" "Duplicate faces: %16u %20u\n" "Duplicate edges: %16u %20u\n" "Boundary edges: %16u %20u\n" "Non-manifold edges: %16u %20u\n" "Edge per vertex avg.: %16.2g %20.2g\n" "Edge per vertex max: %16g %20g\n" "Faces per edge avg.: %16.2g %20.2g\n" "Faces per edge max: %16g %20g\n" "------------------------ Geometry ---------------------------\n" "Volume: %16.4g %20.4g\n" "Area: %16.4g %20.4g\n" "BBox diagonal: %16.4g %20.4g\n" "Face quality min: %16.4g %20.4g\n" "Face quality avg.: %16.4g %20.4g\n" "Face quality max: %16.4g %20.4g\n" "Face area min: %16.4g %20.4g\n" "Face area avg.: %16.4g %20.4g\n" "Face area max: %16.4g %20.4g\n" "Edge length min: %16.4g %20.4g\n" "Edge length avg.: %16.4g %20.4g\n" "Edge length max: %16.4g %20.4g\n", ss1.edges_per_vertex.n, ss2.edges_per_vertex.n, ss1.faces_per_edge.n, ss2.faces_per_edge.n, ss1.n_faces, ss2.n_faces, ss1.n_incompatible_faces, ss2.n_incompatible_faces, ss1.n_duplicate_faces, ss2.n_duplicate_faces, ss1.n_duplicate_edges, ss2.n_duplicate_edges, ss1.n_boundary_edges, ss2.n_boundary_edges, ss1.n_non_manifold_edges, ss2.n_non_manifold_edges, ss1.edges_per_vertex.mean, ss2.edges_per_vertex.mean, ss1.edges_per_vertex.max, ss2.edges_per_vertex.max, ss1.faces_per_edge.mean, ss2.faces_per_edge.mean, ss1.faces_per_edge.max, ss2.faces_per_edge.max, v1, v2, gts_surface_area (s1), gts_surface_area (s2), l1, l2, sq1.face_quality.min, sq2.face_quality.min, sq1.face_quality.mean, sq2.face_quality.mean, sq1.face_quality.max, sq2.face_quality.max, sq1.face_area.min, sq2.face_area.min, sq1.face_area.mean, sq2.face_area.mean, sq1.face_area.max, sq2.face_area.max, sq1.edge_length.min, sq2.edge_length.min, sq1.edge_length.mean, sq2.edge_length.mean, sq1.edge_length.max, sq2.edge_length.max); if (l2 == 0.0) l2 = 1.0; if (l1 == 0.0) l1 = 1.0; if (symmetric) { gts_surface_distance (s2, s1, delta, &fd2, &bd2); fprintf (stderr, "------------------ Distance between faces -------------------\n" "Minimum: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n" "Average: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n" "Deviation: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n" "Maximum: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n", fd1.min, 100.*fd1.min/l1, fd2.min, 100.*fd2.min/l2, fd1.mean, 100.*fd1.mean/l1, fd2.mean, 100.*fd2.mean/l2, fd1.stddev, 100.*fd1.stddev/l1, fd2.stddev, 100.*fd2.stddev/l2, fd1.max, 100.*fd1.max/l1, fd2.max, 100.*fd2.max/l2); if (ss1.n_boundary_edges > 0) fprintf (stderr, "---------------- Distance between boundaries ----------------\n" "Minimum: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n" "Average: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n" "Deviation: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n" "Maximum: %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n", bd1.min, 100.*bd1.min/l1, bd2.min, 100.*bd2.min/l2, bd1.mean, 100.*bd1.mean/l1, bd2.mean, 100.*bd2.mean/l2, bd1.stddev, 100.*bd1.stddev/l1, bd2.stddev, 100.*bd2.stddev/l2, bd1.max, 100.*bd1.max/l1, bd2.max, 100.*bd2.max/l2); } else { fprintf (stderr, "------------------ Distance between faces -------------------\n" "Minimum: %16.4g (%5.2f%%)\n" "Average: %16.4g (%5.2f%%)\n" "Deviation: %16.4g (%5.2f%%)\n" "Maximum: %16.4g (%5.2f%%)\n", fd1.min, 100.*fd1.min/l1, fd1.mean, 100.*fd1.mean/l1, fd1.stddev, 100.*fd1.stddev/l1, fd1.max, 100.*fd1.max/l1); if (ss1.n_boundary_edges > 0) fprintf (stderr, "---------------- Distance between boundaries ----------------\n" "Minimum: %16.4g (%5.2f%%)\n" "Average: %16.4g (%5.2f%%)\n" "Deviation: %16.4g (%5.2f%%)\n" "Maximum: %16.4g (%5.2f%%)\n", bd1.min, 100.*bd1.min/l1, bd1.mean, 100.*bd1.mean/l1, bd1.stddev, 100.*bd1.stddev/l1, bd1.max, 100.*bd1.max/l1); } if (image) { GSList * bboxes = NULL; GNode * tree; gts_surface_foreach_face (s2, (GtsFunc) build_list, &bboxes); tree = gts_bb_tree_new (bboxes); g_slist_free (bboxes); if (min == G_MAXDOUBLE) { if (logscale) min = fd1.min > 0.0 ? log10 (fd1.min) : -10.; else min = fd1.min; } if (max == - G_MAXDOUBLE) { if (logscale) max = fd1.max > 0.0 ? log10 (fd1.max) : 1.; else max = fd1.max; } oogl_surface (s1, stdout, tree); gts_bb_tree_destroy (tree, TRUE); } return 0; } gts-snapshot-121130/tools/gts2oogl.c0000644000175100017510000006440612055775440014247 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #ifndef PI # define PI 3.14159265359 #endif typedef enum { NONE, QUALITY, AREA, EPV, INCOMP, FOLD, HEIGHT, CURVATURE, GAUSSIAN, COMPONENT } ColorOptions; ColorOptions color = NONE; gboolean autoscale = TRUE; gboolean boundary = FALSE; gboolean non_manifold = FALSE; gboolean duplicate = FALSE; gint flatten = -1; guint height = 0; gdouble avg = 0.; gdouble min = 0.0, max = 1.0; gdouble maxcosine2 = 1.0; gboolean verbose = FALSE; gboolean faces = FALSE; typedef struct { gdouble r, g, b; } Color; typedef struct { GPtrArray * colors; gboolean reversed; } Colormap; Colormap * colormap = NULL; static Color * color_new (gdouble r, gdouble g, gdouble b) { Color * c = g_malloc (sizeof (Color)); c->r = r; c->g = g; c->b = b; return c; } static Colormap * colormap_read (FILE * fptr) { Colormap * cmap = g_malloc (sizeof (Colormap)); Color c; cmap->reversed = FALSE; cmap->colors = g_ptr_array_new (); while (fscanf (fptr, "%lf %lf %lf", &c.r, &c.g, &c.b) == 3) g_ptr_array_add (cmap->colors, color_new (c.r/255., c.g/255., c.b/255.)); return cmap; } static Colormap * colormap_jet (void) { Colormap * cmap = g_malloc (sizeof (Colormap)); gint i; cmap->reversed = FALSE; cmap->colors = g_ptr_array_new (); for (i = 0; i < 127; i++) { gdouble r = i <= 46 ? 0. : i >= 111 ? -0.03125*(i - 111) + 1. : i >= 78 ? 1. : 0.03125*(i - 46); gdouble g = i <= 14 || i >= 111 ? 0. : i >= 79 ? -0.03125*(i - 111) : i <= 46 ? 0.03125*(i - 14) : 1.; gdouble b = i >= 79 ? 0. : i >= 47 ? -0.03125*(i - 79) : i <= 14 ? 0.03125*(i - 14) + 1.: 1.; g_ptr_array_add (cmap->colors, color_new (r, g, b)); } return cmap; } static Color colormap_color (Colormap * cmap, gdouble val) { Color c = {1., 1., 1.}, * c1, * c2; guint i, n; gdouble coef; g_return_val_if_fail (cmap != NULL, c); if (val > 1.0) val = 1.0; else if (val < 0.0) val = 0.0; if (cmap->reversed) val = 1.0 - val; n = cmap->colors->len; if (n == 0) return c; if (n == 1) return *((Color *)cmap->colors->pdata[0]); i = floor((gdouble)val*(gdouble)(n - 1)); if (i == n - 1) return *((Color *)cmap->colors->pdata[cmap->colors->len - 1]); coef = val*(gdouble)(n - 1) - (gdouble)i; c1 = cmap->colors->pdata[i]; c2 = cmap->colors->pdata[i+1]; c.r = c1->r + coef*(c2->r - c1->r); c.g = c1->g + coef*(c2->g - c1->g); c.b = c1->b + coef*(c2->b - c1->b); return c; } static void write_point (GtsPoint * p, FILE * fp) { fprintf (fp, "%f %f %f", flatten == 0 ? avg : p->x, flatten == 1 ? avg : p->y, flatten == 2 ? avg : p->z); } static void foreach_vertex (GtsVertex * v, gpointer * info) { FILE * fp = info[0]; GHashTable * hash = info[1]; guint * nv = info[2]; GtsSurface * s = info[4]; write_point (GTS_POINT (v), fp); switch (color) { case EPV: { Color c = colormap_color (colormap, ((gdouble)g_slist_length (v->segments) - min)/(max - min)); fprintf (fp, " %g %g %g 1.0\n", c.r, c.g, c.b); break; } case HEIGHT: { Color c = colormap_color (colormap, ((>S_POINT (v)->x)[height] - avg - min)/(max - min)); fprintf (fp, " %g %g %g 1.0\n", c.r, c.g, c.b); break; } case CURVATURE: { gdouble c = 0.; Color color; GtsVector n; if (!gts_vertex_is_boundary (v, s) && gts_vertex_mean_curvature_normal (v, s, n)) c = gts_vector_norm (n)/2.; color = colormap_color (colormap, (c - min)/(max - min)); fprintf (fp, " %g %g %g 1.0\n", color.r, color.g, color.b); break; } case GAUSSIAN: { gdouble gc = 0.; Color color; if (!gts_vertex_is_boundary (v, s)) gts_vertex_gaussian_curvature (v, s, &gc); color = colormap_color (colormap, (gc - min)/(max - min)); fprintf (fp, " %g %g %g 1.0\n", color.r, color.g, color.b); break; } default: fprintf (fp, "\n"); } g_hash_table_insert (hash, v, GUINT_TO_POINTER (++(*nv))); } static void foreach_boundary_edge (GtsEdge * e, gpointer info) { FILE * fp = info; if (gts_edge_is_boundary (e, NULL)) { fputs ("VECT 1 2 0 2 0 ", fp); write_point (GTS_POINT (GTS_SEGMENT (e)->v1), fp); fputc (' ', fp); write_point (GTS_POINT (GTS_SEGMENT (e)->v2), fp); fputc ('\n', fp); } } static void foreach_feature_edge (GtsEdge * e, gdouble * angle) { if (g_slist_length (e->triangles) == 2 && fabs (gts_triangles_angle (e->triangles->data, e->triangles->next->data)) < *angle) { fputs ("VECT 1 2 0 2 0 ", stdout); write_point (GTS_POINT (GTS_SEGMENT (e)->v1), stdout); fputc (' ', stdout); write_point (GTS_POINT (GTS_SEGMENT (e)->v2), stdout); fputc ('\n', stdout); } } static void foreach_non_manifold_edge (GtsEdge * e, gpointer info) { FILE * fp = info; if (g_slist_length (e->triangles) > 2) { fputs ("VECT 1 2 0 2 0 ", fp); write_point (GTS_POINT (GTS_SEGMENT (e)->v1), fp); fputc (' ', fp); write_point (GTS_POINT (GTS_SEGMENT (e)->v2), fp); fputc ('\n', fp); } } static void foreach_duplicate_edge (GtsSegment * s, gpointer info) { FILE * fp = info; if (gts_segment_is_duplicate (s)) { fputs ("VECT 1 2 0 2 0 ", fp); write_point (GTS_POINT (s->v1), fp); fputc (' ', fp); write_point (GTS_POINT (s->v2), fp); fputc ('\n', fp); } } static void foreach_triangle (GtsTriangle * t, gpointer * info) { FILE * fp = info[0]; GHashTable * hash = info[1]; guint * nfold = info[3]; guint p1 = 0, p2 = 0, p3 = 0; p1 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v1)); if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v2)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v1)); } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v1)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v2)); p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e2)->v2)); } else g_assert_not_reached (); g_return_if_fail (p1 && p2 && p3); fprintf (fp, "3 %u %u %u", p1 - 1, p2 - 1, p3 - 1); switch (color) { case QUALITY: { Color c = colormap_color (colormap, (gts_triangle_quality (t) - min)/(max - min)); fprintf (fp, " %g %g %g\n", c.r, c.g, c.b); break; } case AREA: { Color c = colormap_color (colormap, (gts_triangle_area (t) - min)/(max - min)); fprintf (fp, " %g %g %g\n", c.r, c.g, c.b); break; } case INCOMP: { gboolean compatible = TRUE; GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3; GSList * i = e1->triangles; while (compatible && i) { GtsTriangle * t1 = i->data; if (t1 != t && !gts_triangles_are_compatible (t, t1, e1)) compatible = FALSE; i = i->next; } i = e2->triangles; while (compatible && i) { GtsTriangle * t1 = i->data; if (t1 != t && !gts_triangles_are_compatible (t, t1, e2)) compatible = FALSE; i = i->next; } i = e3->triangles; while (compatible && i) { GtsTriangle * t1 = i->data; if (t1 != t && !gts_triangles_are_compatible (t, t1, e3)) compatible = FALSE; i = i->next; } if (!compatible) fputs (" 1. 0. 0.", fp); fputc ('\n', fp); break; } case FOLD: { gboolean fold = FALSE; GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3; fold = gts_triangles_are_folded (e1->triangles, GTS_SEGMENT (e1)->v1, GTS_SEGMENT (e1)->v2, maxcosine2); if (!fold) fold = gts_triangles_are_folded (e2->triangles, GTS_SEGMENT (e2)->v1, GTS_SEGMENT (e2)->v2, maxcosine2); if (!fold) fold = gts_triangles_are_folded (e3->triangles, GTS_SEGMENT (e3)->v1, GTS_SEGMENT (e3)->v2, maxcosine2); if (fold) { (*nfold)++; fputs (" 1. 0. 0.", fp); } fputc ('\n', fp); } default: fputc ('\n', fp); } } static void min_max_curvature (GtsVertex * v, gpointer * data) { gdouble * min = data[0]; gdouble * max = data[1]; GtsSurface * s = data[2]; GtsVector n; gdouble c = 0.; if (!gts_vertex_is_boundary (v, s) && gts_vertex_mean_curvature_normal (v, s, n)) c = gts_vector_norm (n)/2.; if (c < *min) *min = c; if (c > *max) *max = c; } static void min_max_gaussian (GtsVertex * v, gpointer * data) { gdouble * min = data[0]; gdouble * max = data[1]; GtsSurface * s = data[2]; gdouble gc = 0.; if (!gts_vertex_is_boundary (v, s)) gts_vertex_gaussian_curvature (v, s, &gc); if (gc < *min) *min = gc; if (gc > *max) *max = gc; } static void oogl_surface (GtsSurface * s, FILE * fptr) { gpointer info[5]; GtsSurfaceStats stats; GtsSurfaceQualityStats qstats; guint np = 0, nfold = 0; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); info[0] = fptr; info[1] = g_hash_table_new (NULL, NULL); info[2] = &np; info[3] = &nfold; info[4] = s; gts_surface_stats (s, &stats); switch (color) { case AREA: if (autoscale) { gts_surface_quality_stats (s, &qstats); min = qstats.face_area.min; max = qstats.face_area.max; } break; case QUALITY: if (autoscale) { gts_surface_quality_stats (s, &qstats); min = qstats.face_quality.min; max = qstats.face_quality.max; } break; case EPV: if (autoscale) { min = stats.edges_per_vertex.min; max = stats.edges_per_vertex.max; } break; case HEIGHT: if (autoscale) { GtsBBox * bbox = gts_bbox_surface (gts_bbox_class (), s); min = (&bbox->x1)[height] - avg; max = (&bbox->x2)[height] - avg; gts_object_destroy (GTS_OBJECT (bbox)); } break; case CURVATURE: if (autoscale) { gpointer data[3]; min = G_MAXDOUBLE; max = - G_MAXDOUBLE; data[0] = &min; data[1] = &max; data[2] = s; gts_surface_foreach_vertex (s, (GtsFunc) min_max_curvature, data); } break; case GAUSSIAN: if (autoscale) { gpointer data[3]; min = G_MAXDOUBLE; max = - G_MAXDOUBLE; data[0] = &min; data[1] = &max; data[2] = s; gts_surface_foreach_vertex (s, (GtsFunc) min_max_gaussian, data); } break; default: ; } if (verbose) fprintf (stderr, "scalar min: %f max: %f\n", min, max); if (max == min) max = min + 1.; if (color == EPV || color == HEIGHT || color == CURVATURE || color == GAUSSIAN) fputs ("COFF ", fptr); else fputs ("OFF ", fptr); fprintf (fptr, "%u %u %u\n", stats.edges_per_vertex.n, stats.n_faces, stats.faces_per_edge.n); gts_surface_foreach_vertex (s, (GtsFunc) foreach_vertex, info); gts_surface_foreach_face (s, (GtsFunc) foreach_triangle, info); if (verbose && color == FOLD) fprintf (stderr, "# Number of folds: %u\n", nfold); g_hash_table_destroy (info[1]); } static GtsVertex * next_vertex (GtsVertex * v) { GSList * j = v->segments; while (j) { GtsSegment * s = j->data; if (GTS_OBJECT (s)->reserved == s) { GTS_OBJECT (s)->reserved = NULL; return s->v1 != v ? s->v1 : s->v2; } j = j->next; } return NULL; } static GSList * chain_segments (GSList * segments) { GSList * chains = NULL, * i; i = segments; while (i) { GTS_OBJECT (i->data)->reserved = i->data; i = i->next; } i = segments; while (i) { GtsSegment * s = i->data; if (GTS_OBJECT (s)->reserved == s) { GSList * chain = g_slist_prepend (NULL, s->v1); GtsVertex * v = s->v2; GTS_OBJECT (s)->reserved = NULL; while (v) { chain = g_slist_prepend (chain, v); v = next_vertex (v); } chains = g_slist_prepend (chains, chain); } i = i->next; } return chains; } static void write_isolines (GtsSurface * surface, GNode * stree, gdouble level, FILE * fp, gboolean gnuplot) { GNode * ptree; GtsSurface * plane; GtsVertex * v1, * v2, * v3; GSList * inter, * chains, * i; guint nvertices = 0; g_return_if_fail (surface != NULL); g_return_if_fail (stree != NULL); g_return_if_fail (fp != NULL); plane = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); v1 = gts_vertex_new (gts_vertex_class (), -1e10, -1e10, level); v2 = gts_vertex_new (gts_vertex_class (), 1e10, -1e10, level); v3 = gts_vertex_new (gts_vertex_class (), 0., 1e10, level); gts_surface_add_face (plane, gts_face_new (gts_face_class(), gts_edge_new (gts_edge_class (), v1, v2), gts_edge_new (gts_edge_class (), v2, v3), gts_edge_new (gts_edge_class (), v3, v1))); ptree = gts_bb_tree_surface (plane); inter = gts_surface_intersection (surface, plane, stree, ptree); chains = chain_segments (inter); i = chains; while (i) { GSList * chain = i->data; nvertices += g_slist_length (chain); i = i->next; } if (!gnuplot) { fprintf (fp, "VECT %d %d 0\n", g_slist_length (chains), nvertices); i = chains; while (i) { GSList * chain = i->data; fprintf (fp, "%d ", g_slist_length (chain)); i = i->next; } i = chains; while (i) { fprintf (fp, "0 "); i = i->next; } fprintf (fp, "\n"); } i = chains; while (i) { GSList * chain = i->data; GSList * j = chain; while (j) { GtsPoint * p = j->data; write_point (p, fp); fputc ('\n', fp); j = j->next; } if (gnuplot) fputc ('\n', fp); g_slist_free (chain); i = i->next; } g_slist_free (chains); g_slist_free (inter); gts_bb_tree_destroy (ptree, TRUE); gts_object_destroy (GTS_OBJECT (plane)); } static void sum_flatten (GtsPoint * p) { avg += (&p->x)[flatten]; } static void write_edge (GtsSegment * s) { printf ("%f %f %f\n%f %f %f\n\n", GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z); } static void write_face (GtsTriangle * t) { GtsVertex * v1, * v2, * v3; GtsPoint o; gts_triangle_vertices (t, &v1, &v2, &v3); o.x = (GTS_POINT (v1)->x + GTS_POINT (v2)->x + GTS_POINT (v3)->x)/3.; o.y = (GTS_POINT (v1)->y + GTS_POINT (v2)->y + GTS_POINT (v3)->y)/3.; o.z = (GTS_POINT (v1)->z + GTS_POINT (v2)->z + GTS_POINT (v3)->z)/3.; printf ("OFF 3 1 3\n" "%f %f %f\n" "%f %f %f\n" "%f %f %f\n" "3 0 1 2\n", o.x + 0.9*(GTS_POINT (v1)->x - o.x), o.y + 0.9*(GTS_POINT (v1)->y - o.y), o.z + 0.9*(GTS_POINT (v1)->z - o.z), o.x + 0.9*(GTS_POINT (v2)->x - o.x), o.y + 0.9*(GTS_POINT (v2)->y - o.y), o.z + 0.9*(GTS_POINT (v2)->z - o.z), o.x + 0.9*(GTS_POINT (v3)->x - o.x), o.y + 0.9*(GTS_POINT (v3)->y - o.y), o.z + 0.9*(GTS_POINT (v3)->z - o.z)); } int main (int argc, char * argv[]) { GtsSurface * surface; gboolean nosurface = FALSE; int c = 0; guint isolines = 0; GtsFile * fp; gdouble feature = 0.; gdouble isoline[256]; guint niso = 0; gboolean gnuplot = FALSE; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); colormap = colormap_jet (); /* default */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"gnuplot", no_argument, NULL, 'G'}, {"faces", no_argument, NULL, 't'}, {"isoline", required_argument, NULL, 'I'}, {"gaussian", no_argument, NULL, 'g'}, {"curvature", no_argument, NULL, 'C'}, {"feature", required_argument, NULL, 'e'}, {"flatten", required_argument, NULL, 'F'}, {"component", no_argument, (int *)&color, COMPONENT}, {"quality", no_argument, (int *)&color, QUALITY}, {"area", no_argument, (int *)&color, AREA}, {"incomp", no_argument, (int *)&color, INCOMP}, {"fold", required_argument, NULL, 'f'}, {"epv", no_argument, (int *)&color, EPV}, {"height", required_argument, NULL, 'H'}, {"boundary", no_argument, &boundary, TRUE}, {"non-manifold", no_argument, &non_manifold, TRUE}, {"duplicate", no_argument, &duplicate, TRUE}, {"isolines", required_argument, NULL, 'i'}, {"cmap", required_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"min", required_argument, NULL, 'm'}, {"max", required_argument, NULL, 'M'}, {"nosurface", no_argument, NULL, 'n'}, {"reverse", no_argument, NULL, 'r'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "c:hm:M:rvf:i:nF:e:H:CgI:tG", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "c:hm:M:rvf:i:nF:e:H:CgI:tG"))) { #endif /* not HAVE_GETOPT_LONG */ case 'G': /* gnuplot */ gnuplot = TRUE; break; case 't': /* faces */ faces = TRUE; break; case 'I': /* isoline */ isoline[niso++] = atof (optarg); break; case 'g': /* gaussian */ color = GAUSSIAN; break; case 'C': /* curvature */ color = CURVATURE; break; case 'H': /* height */ color = HEIGHT; height = atoi (optarg); if (height > 2) height = 2; break; case 'e': /* feature */ feature = atof (optarg)*PI/180.; break; case 'F': /* flatten */ flatten = atoi (optarg); if (flatten < 0.) flatten = 0; else if (flatten > 2) flatten = 2; break; case 'c': { /* colormap file */ FILE * fptr = fopen (optarg, "rt"); if (!fptr) { fprintf (stderr, "%s: cannot open colormap file `%s'.\n", argv[0], optarg); return 1; } colormap = colormap_read (fptr); fclose (fptr); break; } case 'i': /* isolines */ isolines = atoi (optarg); break; case 'f': /* fold */ color = FOLD; maxcosine2 = cos (atof (optarg)*PI/180.); maxcosine2 *= maxcosine2; break; case 'm': /* minimum value */ autoscale = FALSE; min = atof (optarg); break; case 'M': /* maximum value */ autoscale = FALSE; max = atof (optarg); break; case 'n': /* nosurface */ nosurface = TRUE; break; case 'r': /* reverse colormap */ colormap->reversed = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: gts2oogl [OPTION]... < input.srf > output.oogl\n" "Convert a GTS file (surface file format generated by the Gts Library)\n" "to OOGL file format (Geomview).\n" "\n" " -G --gnuplot writes isolines in gnuplot format\n" " --component color faces according to the component\n" " they belong too\n" " --quality color faces according to their quality\n" " --area color faces according to their area\n" " --incomp color incompatible faces\n" " -f VAL --fold=VAL color faces which make an angle smaller\n" " than VAL degrees with any of their neighbors\n" " -t --faces output individual faces\n" " --epv color vertices according to number of edges per vertex\n" " -H C --height=C color vertices according to their C coordinate\n" " -g --gaussian color vertices according to Gaussian curvature\n" " -C --curvature color vertices according to mean curvature\n" " --boundary output boundary edges\n" " -e A --feature=A output `feature' edges defined by angle A\n" " --non-manifold output non-manifold edges\n" " --duplicate output duplicate edges\n" " -i N --isolines=N draw N isolines (levels of constant altitude)\n" " -I L --isolines=L draw isoline at level L\n" " --cmap=FILE load FILE as colormap\n" " -m VAL, --min=VAL use VAL as minimum scaling value\n" " -M VAL, --max=VAL use VAL as maximum scaling value\n" " -r, --reverse reverse colormap\n" " -n --nosurface do not output surface\n" " -F C --flatten=C set C coordinate to average value\n" " -v, --verbose display surface statistics\n" " -h, --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; break; case 'v': verbose = TRUE; break; case '?': /* wrong options */ fprintf (stderr, "Try `gts2oogl --help' for more information.\n"); return 1; } } surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (surface, fp)) { fputs ("gts2oogl: the file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; } if (verbose) gts_surface_print_stats (surface, stderr); if (flatten >= 0) { gts_surface_foreach_vertex (surface, (GtsFunc) sum_flatten, NULL); if (avg != 0.) avg /= gts_surface_vertex_number (surface); } if (boundary || non_manifold || duplicate || isolines || feature > 0. || niso > 0) { if (!nosurface) { puts ("(geometry \"surface\" { = "); oogl_surface (surface, stdout); puts ("})"); } if (boundary) { if (!nosurface || isolines || niso > 0 || non_manifold || duplicate) puts ("(geometry \"boundary\" { = "); puts ("LIST {"); gts_surface_foreach_edge (surface, (GtsFunc) foreach_boundary_edge, stdout); puts ("}"); if (!nosurface || isolines || niso > 0 || non_manifold || duplicate) puts ("})"); } if (feature > 0.) { if (!nosurface || isolines || niso > 0 || non_manifold || duplicate) puts ("(geometry \"feature\" { = "); puts ("LIST {"); gts_surface_foreach_edge (surface, (GtsFunc) foreach_feature_edge, &feature); puts ("}"); if (!nosurface || isolines || niso > 0 || non_manifold || duplicate) puts ("})"); } if (non_manifold) { if (!nosurface || isolines || niso > 0 || boundary || duplicate) puts ("(geometry \"non-manifold\" { = "); puts ("LIST {"); gts_surface_foreach_edge (surface, (GtsFunc) foreach_non_manifold_edge, stdout); puts ("}"); if (!nosurface || isolines || niso > 0 || boundary || duplicate) puts ("})"); } if (duplicate) { if (!nosurface || isolines || niso > 0 || boundary || non_manifold) puts ("(geometry \"duplicate\" { = "); puts ("LIST {"); gts_surface_foreach_edge (surface, (GtsFunc) foreach_duplicate_edge, stdout); puts ("}"); if (!nosurface || isolines || niso > 0 || boundary || non_manifold) puts ("})"); } if (isolines > 0) { GNode * stree; gdouble z, dz; GtsBBox * bbox; guint i; stree = gts_bb_tree_surface (surface); bbox = stree->data; dz = (bbox->z2 - bbox->z1)/(isolines + 1); z = bbox->z1 + dz; if (!nosurface || boundary) puts ("(geometry \"isolines\" { = "); if (!gnuplot) puts ("LIST {"); for (i = 0; i < isolines; i++, z += dz) write_isolines (surface, stree, z, stdout, gnuplot); if (!gnuplot) puts ("}"); if (!nosurface || boundary) puts ("})\n"); gts_bb_tree_destroy (stree, TRUE); } else if (niso > 0) { GNode * stree; GtsBBox * bbox; guint i; stree = gts_bb_tree_surface (surface); bbox = stree->data; if (!nosurface || boundary) puts ("(geometry \"isolines\" { = "); if (!gnuplot) puts ("LIST {"); for (i = 0; i < niso; i++) write_isolines (surface, stree, isoline[i], stdout, gnuplot); if (!gnuplot) puts ("}"); if (!nosurface || boundary) puts ("})\n"); gts_bb_tree_destroy (stree, TRUE); } } else if (color == COMPONENT) { GSList * i = gts_surface_split (surface); if (verbose) fprintf (stderr, "%u components\n", g_slist_length (i)); printf ("LIST {\n"); while (i) { gdouble r = rand()/(gdouble)RAND_MAX, g = rand()/(gdouble)RAND_MAX, b = rand()/(gdouble)RAND_MAX; printf ("geom { appearance { material {\n" " ambient %g %g %g\n" " diffuse %g %g %g\n" "}}\n", r, g, b, r, g, b); gts_surface_write_oogl (i->data, stdout); printf ("}\n"); i = i->next; } printf ("}\n"); } else if (!nosurface) { if (min == max) max = min + 1.; if (faces) { printf ("LIST {\n"); gts_surface_foreach_face (surface, (GtsFunc) write_face, NULL); printf ("}\n"); } else if (gnuplot) gts_surface_foreach_edge (surface, (GtsFunc) write_edge, NULL); else oogl_surface (surface, stdout); } return 0; } gts-snapshot-121130/configure.ac0000644000175100017510000001565712055775440013475 00000000000000AC_INIT AC_CONFIG_SRCDIR([src/gts.h]) dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they dnl are available for $ac_help expansion (don't we all *love* autoconf?) #AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl # Making releases: # GTS_MICRO_VERSION += 1; # GTS_INTERFACE_AGE += 1; # GTS_BINARY_AGE += 1; # if any functions have been added, set GTS_INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set GTS_BINARY_AGE and GTS_INTERFACE_AGE to 0. # GTS_MAJOR_VERSION=0 GTS_MINOR_VERSION=7 GTS_MICRO_VERSION=6 GTS_INTERFACE_AGE=1 GTS_BINARY_AGE=1 GTS_VERSION=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION.$GTS_MICRO_VERSION dnl #AC_DIVERT_POP()dnl AC_SUBST(GTS_MAJOR_VERSION) AC_SUBST(GTS_MINOR_VERSION) AC_SUBST(GTS_MICRO_VERSION) AC_SUBST(GTS_VERSION) # libtool versioning LT_RELEASE=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION LT_CURRENT=`expr $GTS_MICRO_VERSION - $GTS_INTERFACE_AGE` LT_REVISION=$GTS_INTERFACE_AGE LT_AGE=`expr $GTS_BINARY_AGE - $GTS_INTERFACE_AGE` AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) # For automake. VERSION=$GTS_VERSION PACKAGE=gts AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) # Specify a configuration file AM_CONFIG_HEADER(config.h) AC_DEFINE_UNQUOTED(GTS_MAJOR_VERSION, $GTS_MAJOR_VERSION, [Major version]) AC_DEFINE_UNQUOTED(GTS_MINOR_VERSION, $GTS_MINOR_VERSION, [Minor version]) AC_DEFINE_UNQUOTED(GTS_MICRO_VERSION, $GTS_MICRO_VERSION, [Micro version]) AC_DEFINE_UNQUOTED(GTS_INTERFACE_AGE, $GTS_INTERFACE_AGE, [Interface age]) AC_DEFINE_UNQUOTED(GTS_BINARY_AGE, $GTS_BINARY_AGE, [Binary age]) dnl Initialize libtool AM_PROG_LIBTOOL dnl Initialize maintainer mode AM_MAINTAINER_MODE AC_PROG_CC if test x$GCC = xyes ; then CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" fi AC_PROG_AWK AC_ISC_POSIX AC_HEADER_STDC AC_CHECK_HEADER(pgm.h, netpbm="true", netpbm="false") if test x$netpbm = xfalse ; then AC_CHECK_HEADER(netpbm/pgm.h, [netpbm="true" AC_DEFINE(NETPBM_INCLUDE, 1, [Define if netpbm include files are in netpbm/.])], netpbm="false") fi if test x$netpbm = xtrue ; then AC_CHECK_LIB(netpbm, pgm_init, netpbm="true", netpbm="false", [-lm]) fi if test x$netpbm = xfalse ; then AC_MSG_WARN([libnetpbm not found. Some programs will not be available.]) fi AM_CONDITIONAL(HAS_NETPBM, test x$netpbm = xtrue) AM_PATH_GLIB_2_0(2.4.0, has_glib2=yes, has_glib2=no, gthread gmodule) if test x$has_glib2 = xyes; then glib_cflags=`$PKG_CONFIG glib-2.0 --cflags` glib_thread_cflags=`$PKG_CONFIG glib-2.0 --cflags gthread-2.0` glib_module_cflags=`$PKG_CONFIG glib-2.0 --cflags gmodule-2.0` glib_libs=`$PKG_CONFIG glib-2.0 --libs` glib_thread_libs=`$PKG_CONFIG glib-2.0 --libs gthread-2.0` glib_module_libs=`$PKG_CONFIG glib-2.0 --libs gmodule-2.0` GLIB_LIBS="$glib_libs" GLIB_DEPLIBS="$glib_libs" else if test x$with_glib = xyes ; then AC_MSG_ERROR([ *** Directory must be specified for --with-glib]) fi if test x$with_glib = x ; then # Look for separately installed glib GLIB_REQUIRED_VERSION=1.2.8 AM_PATH_GLIB($GLIB_REQUIRED_VERSION,, AC_MSG_ERROR([ *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of GLIB *** is always available from ftp://ftp.gtk.org/.]), gmodule gthread) glib_cflags=`$GLIB_CONFIG --cflags` glib_thread_cflags=`$GLIB_CONFIG --cflags gthread` glib_module_cflags=`$GLIB_CONFIG --cflags gmodule` glib_libs=`$GLIB_CONFIG --libs` glib_thread_libs=`$GLIB_CONFIG --libs gthread` glib_module_libs=`$GLIB_CONFIG --libs gmodule` GLIB_LIBS="$glib_libs" GLIB_DEPLIBS="$glib_libs" else # Use uninstalled glib (assume they got the version right) GLIB_CONFIG=$with_glib/glib-config if test -x $GLIB_CONFIG ; then : else AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured]) fi # For use in gts-config glib_cflags=`$GLIB_CONFIG --cflags` glib_thread_cflags=`$GLIB_CONFIG --cflags gthread` glib_module_cflags=`$GLIB_CONFIG --cflags gmodule` glib_libs=`$GLIB_CONFIG --libs` glib_thread_libs=`$GLIB_CONFIG --libs gthread` glib_module_libs=`$GLIB_CONFIG --libs gmodule` glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'` # canonicalize relative paths case $with_glib in /*) glib_dir=$with_glib ;; *) glib_dir="\$(top_builddir)/$with_glib" ;; esac GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule" GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule.la" GLIB_DEPLIBS= AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) fi fi AC_SUBST(glib_cflags) AC_SUBST(glib_libs) AC_SUBST(glib_thread_cflags) AC_SUBST(glib_thread_libs) AC_SUBST(glib_module_cflags) AC_SUBST(glib_module_libs) AC_SUBST(GLIB_DEPLIBS) CFLAGS="$CFLAGS $glib_cflags" LDFLAGS="$LDFLAGS $glib_libs" AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) dnl generate `src/gtsconfig.h' AC_CONFIG_COMMANDS([default-1],[[ echo creating src/gtsconfig.h cat >src/gtsconfig.h <<\__EOF /* gtsconfig.h * * This is a generated file. Please modify `configure.ac' */ #ifndef GTSCONFIG_H #define GTSCONFIG_H __EOF case "$build" in *-cray-unicos*) echo "/* CRAY inlining directives */" >> src/gtsconfig.h awk ' BEGIN { nc = 10; nf = 0; } { if ($1 == "G_INLINE_FUNC") { nc = 0; start = 2; } else start = 1; for (i = start; i <= NF; i++) { if (nc == 1) { if (substr ($i, 1, 1) != "*") { in_list = 0; for (j = 0; j < nf && !inlist; j++) if ($i == f[j]) inlist = 1; if (!inlist) f[nf++] = $i; nc = 10; } } else nc++; } } END { if (nf > 0) { printf ("#pragma _CRI inline %s", f[0]); for (i = 1; i < nf; i++) printf (", %s", f[i]); printf ("\n"); } } ' < src/gts.h >> src/gtsconfig.h ;; esac cat >>src/gtsconfig.h <<__EOF $gts_defines #endif /* GTSCONFIG_H */ __EOF ]],[[ gts_defines=" #define GTS_MAJOR_VERSION $GTS_MAJOR_VERSION #define GTS_MINOR_VERSION $GTS_MINOR_VERSION #define GTS_MICRO_VERSION $GTS_MICRO_VERSION" build="$build" ]]) dnl checking for #warning cpp directive AC_TRY_COMPILE(, "{ #warning test }", AC_DEFINE(CPP_HAS_WARNING, 1, [Define if C preprocessor supports warning directive.]), AC_MSG_WARN(["C preprocessor does not support warning directive."])) dnl header file checks AC_CHECK_HEADERS(fpu_control.h, AC_DEFINE(HAVE_FPU_CONTROL_H)) AC_CHECK_HEADERS(floatingpoint.h, AC_DEFINE(HAVE_FLOATINGPOINT_H)) AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H)) AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H)) dnl functions checks AC_CHECK_FUNCS(getopt_long) AC_CONFIG_FILES([ Makefile gts.pc src/Makefile src/gts-config tools/Makefile doc/Makefile doc/manpages/Makefile examples/Makefile test/Makefile test/boolean/Makefile test/delaunay/Makefile test/coarsen/Makefile debian/Makefile ]) AC_OUTPUT gts-snapshot-121130/Makefile.am0000644000175100017510000000264412055775440013233 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = src tools examples doc test debian OSC_DIR=$(HOME)/local/src/osc/home:popinet/$(PACKAGE)-snapshot pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gts.pc ChangeLog: darcs changes > ChangeLog debian-snapshot: config.h darcs changes > ChangeLog sh debian/changelog.sh dpkg-buildpackage -rfakeroot -b rm -f debian/repo/* mv -f ../*.changes ../*.deb debian/repo cd debian/repo && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz launchpad-snapshot: config.h dist tar xzf $(PACKAGE)-?.?.?.tar.gz cd $(PACKAGE)-?.?.? && ./configure && darcs changes > ChangeLog && sh debian/changelog.sh && dpkg-buildpackage -rfakeroot -k07AB22DC -S -sa rm -f $(PACKAGE)-?.?.?.tar.gz rm -r -f $(PACKAGE)-?.?.? buildservice-snapshot: config.h dist tar xzf $(PACKAGE)-?.?.?.tar.gz rm -f $(PACKAGE)-?.?.?.tar.gz mv -f $(PACKAGE)-?.?.? $(PACKAGE)-snapshot cd $(PACKAGE)-snapshot && ./configure && darcs changes > ChangeLog && sh debian/changelog.sh && chmod +x debian/rules && make distclean tar czvf $(PACKAGE)-snapshot.tar.gz $(PACKAGE)-snapshot dpkg-source -b $(PACKAGE)-snapshot rm -r -f $(PACKAGE)-snapshot cd $(OSC_DIR) && osc update && rm -f $(OSC_DIR)/* cp -f rpm/$(PACKAGE).spec $(OSC_DIR) mv -f $(PACKAGE)-snapshot.tar.gz $(PACKAGE)-snapshot_*.tar.gz $(PACKAGE)-snapshot_*.dsc $(OSC_DIR) cd $(OSC_DIR) && osc addremove && osc commit -m "snapshot release" gts-snapshot-121130/missing0000755000175100017510000002623312055775445012603 00000000000000#! /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, 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 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: gts-snapshot-121130/examples/0000755000175100017510000000000012055775530013067 500000000000000gts-snapshot-121130/examples/gtstoc.c0000644000175100017510000000571312055775440014464 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void write_vertex (GtsVertex * v, guint * nv) { printf (" GtsVertex * v%u = gts_vertex_new (gts_vertex_class (), %g, %g, %g);\n", *nv, GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z); GTS_OBJECT (v)->reserved = GUINT_TO_POINTER ((*nv)++); } static void write_edge (GtsSegment * s, guint * ne) { printf (" GtsEdge * e%u = gts_edge_new (gts_edge_class (), v%u, v%u);\n", *ne, GPOINTER_TO_UINT (GTS_OBJECT (s->v1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (s->v2)->reserved)); GTS_OBJECT (s)->reserved = GUINT_TO_POINTER ((*ne)++); } static void write_face (GtsTriangle * t, guint * nf) { printf (" GtsFace * f%u = gts_face_new (gts_face_class (),\n" " e%u, e%u, e%u);\n", (*nf)++, GPOINTER_TO_UINT (GTS_OBJECT (t->e1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (t->e2)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (t->e3)->reserved)); } int main (int argc, char * argv[]) { GtsSurface * s; guint i; GtsFile * fp; guint nv = 1, ne = 1, nf = 1; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("gtstoc: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } printf (" GtsSurface * surface = gts_surface_new (gts_surface_class (),\n" " gts_face_class (),\n" " gts_edge_class (),\n" " gts_vertex_class ());\n\n"); gts_surface_foreach_vertex (s, (GtsFunc) write_vertex, &nv); printf ("\n"); gts_surface_foreach_edge (s, (GtsFunc) write_edge, &ne); printf ("\n"); gts_surface_foreach_face (s, (GtsFunc) write_face, &nf); printf (" \n"); for (i = 1; i < nf; i++) printf (" gts_surface_add_face (surface, f%u);\n", i); return 0; } gts-snapshot-121130/examples/sphere.c0000644000175100017510000000646512055775440014454 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" /* sphere - generate a triangulated unit sphere by recursive subdivision. First approximation is an isocahedron; each level of refinement increases the number of triangles by a factor of 4. */ int main (int argc, char * argv[]) { GtsSurface * s; gboolean verbose = FALSE; guint level=4; int c = 0; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hv", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hv"))) { #endif /* not HAVE_GETOPT_LONG */ case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: sphere [OPTION] [level]\n" "Generate a triangulated unit sphere by recursive subdivision.\n" "First approximation is an isocahedron; each level of refinement\n" "increases the number of triangles by a factor of 4.\n" "level must be a positive integer setting the recursion level\n" "(geodesation order), default is 4.\n" "\n" "Documentation: http://mathworld.wolfram.com/GeodesicDome.html\n" "\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `sphere --help' for more information.\n"); return 1; /* failure */ } } /* read level */ if (optind < argc) level = atoi(argv[optind]); /* generate triangulated sphere */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_generate_sphere (s, level); /* if verbose on print stats */ if (verbose) gts_surface_print_stats (s, stderr); /* write generating surface to standard output */ gts_surface_write (s, stdout); return 0; /* success */ } gts-snapshot-121130/examples/transform.c0000644000175100017510000002005712055775440015172 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #ifndef PI #define PI 3.14159265359 #endif int main (int argc, char * argv[]) { GtsSurface * s; GtsFile * fp; GtsMatrix * m; int c = 0; gboolean verbose = FALSE; gboolean revert = FALSE; gboolean normalize = FALSE; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); m = gts_matrix_identity (NULL); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"rx", required_argument, NULL, 'r'}, {"ry", required_argument, NULL, 'm'}, {"rz", required_argument, NULL, 'n'}, {"scale", required_argument, NULL, 's'}, {"sx", required_argument, NULL, 'R'}, {"sy", required_argument, NULL, 'M'}, {"sz", required_argument, NULL, 'N'}, {"tx", required_argument, NULL, 't'}, {"ty", required_argument, NULL, 'u'}, {"tz", required_argument, NULL, 'w'}, {"revert", no_argument, NULL, 'i'}, {"normalize", no_argument, NULL, 'o'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvr:m:n:s:R:M:N:it:u:w:o", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvr:m:n:s:R:M:N:it:u:w:o"))) { #endif /* not HAVE_GETOPT_LONG */ case 'o': /* normalize */ normalize = TRUE; break; case 'r': { /* rotate around x-axis */ gdouble angle, cosa, sina; GtsMatrix * rot, * p; rot = gts_matrix_identity (NULL); angle = atof (optarg)*PI/180.; cosa = cos (angle); sina = sin (angle); rot[1][1] = cosa; rot[1][2] = -sina; rot[2][1] = sina; rot[2][2] = cosa; p = gts_matrix_product (m, rot); gts_matrix_destroy (rot); gts_matrix_destroy (m); m = p; break; } case 'm': { /* rotate around y-axis */ gdouble angle, cosa, sina; GtsMatrix * rot, * p; rot = gts_matrix_identity (NULL); angle = atof (optarg)*PI/180.; cosa = cos (angle); sina = sin (angle); rot[0][0] = cosa; rot[0][2] = sina; rot[2][0] = -sina; rot[2][2] = cosa; p = gts_matrix_product (m, rot); gts_matrix_destroy (rot); gts_matrix_destroy (m); m = p; break; } case 'n': { /* rotate around z-axis */ gdouble angle, cosa, sina; GtsMatrix * rot, * p; rot = gts_matrix_identity (NULL); angle = atof (optarg)*PI/180.; cosa = cos (angle); sina = sin (angle); rot[0][0] = cosa; rot[0][1] = -sina; rot[1][0] = sina; rot[1][1] = cosa; p = gts_matrix_product (m, rot); gts_matrix_destroy (rot); gts_matrix_destroy (m); m = p; break; } case 's': { /* scale */ GtsMatrix * scale, * p; gdouble s = atof (optarg); scale = gts_matrix_identity (NULL); scale[0][0] = scale[1][1] = scale[2][2] = s; p = gts_matrix_product (m, scale); gts_matrix_destroy (scale); gts_matrix_destroy (m); m = p; break; } case 'R': { /* sx */ GtsMatrix * scale, * p; gdouble s = atof (optarg); scale = gts_matrix_identity (NULL); scale[0][0] = s; p = gts_matrix_product (m, scale); gts_matrix_destroy (scale); gts_matrix_destroy (m); m = p; break; } case 'M': { /* sy */ GtsMatrix * scale, * p; gdouble s = atof (optarg); scale = gts_matrix_identity (NULL); scale[1][1] = s; p = gts_matrix_product (m, scale); gts_matrix_destroy (scale); gts_matrix_destroy (m); m = p; break; } case 'N': { /* sz */ GtsMatrix * scale, * p; gdouble s = atof (optarg); scale = gts_matrix_identity (NULL); scale[2][2] = s; p = gts_matrix_product (m, scale); gts_matrix_destroy (scale); gts_matrix_destroy (m); m = p; break; } case 't': /* tx */ m[0][3] += atof (optarg); break; case 'u': /* ty */ m[1][3] += atof (optarg); break; case 'w': /* tz */ m[2][3] += atof (optarg); break; case 'i': /* revert */ revert = TRUE; break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: transform [OPTION] < file.gts\n" "Apply geometric transformations to the input.\n" "\n" " -r ANGLE --rx=ANGLE rotate around x-axis (angle in degrees)\n" " -m ANGLE --ry=ANGLE rotate around y-axis\n" " -n ANGLE --rz=ANGLE rotate around z-axis\n" " -s FACTOR --scale=FACTOR scale by FACTOR\n" " -R FACTOR --sx=FACTOR scale x-axis by FACTOR\n" " -M FACTOR --sy=FACTOR scale y-axis by FACTOR\n" " -N FACTOR --sz=FACTOR scale z-axis by FACTOR\n" " -t V --tx=V translate of V along x-axis\n" " -u V --ty=V translate of V along y-axis\n" " -w V --tz=V translate of V along z-axis\n" " -i --revert turn surface inside out\n" " -o --normalize fit the resulting surface in a cube of\n" " size 1 centered at the origin\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `transform --help' for more information.\n"); return 1; /* failure */ } } s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("transform: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } if (verbose) gts_surface_print_stats (s, stderr); if (revert) gts_surface_foreach_face (s, (GtsFunc) gts_triangle_revert, NULL); gts_surface_foreach_vertex (s, (GtsFunc) gts_point_transform, m); if (normalize) { GtsBBox * bb = gts_bbox_surface (gts_bbox_class (), s); gdouble scale = bb->x2 - bb->x1; GtsMatrix * sc; if (bb->y2 - bb->y1 > scale) scale = bb->y2 - bb->y1; if (bb->z2 - bb->z1 > scale) scale = bb->z2 - bb->z1; if (scale > 0.) scale = 1./scale; else scale = 1.; sc = gts_matrix_identity (NULL); sc[0][3] = - (bb->x1 + bb->x2)/2.; sc[1][3] = - (bb->y1 + bb->y2)/2.; sc[2][3] = - (bb->z1 + bb->z2)/2.; gts_surface_foreach_vertex (s, (GtsFunc) gts_point_transform, sc); sc[0][0] = sc[1][1] = sc[2][2] = scale; sc[0][3] = sc[1][3] = sc[2][3] = 0.; gts_surface_foreach_vertex (s, (GtsFunc) gts_point_transform, sc); gts_matrix_destroy (sc); } gts_surface_write (s, stdout); return 0; } gts-snapshot-121130/examples/coarsen.c0000644000175100017510000002410312055775440014605 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #ifndef PI #define PI 3.14159265359 #endif typedef enum { NUMBER, COST } StopOptions; typedef enum { COST_LENGTH, COST_OPTIMIZED, COST_ANGLE } CostOptions; typedef enum { MIDVERTEX, OPTIMIZED } MidvertexOptions; static gboolean stop_number_verbose (gdouble cost, guint number, guint * min) { static guint nmax = 0, nold = 0; static GTimer * timer = NULL, * total_timer = NULL; g_return_val_if_fail (min != NULL, TRUE); if (timer == NULL) { nmax = nold = number; timer = g_timer_new (); total_timer = g_timer_new (); g_timer_start (total_timer); } if (number != nold && number % 121 == 0 && number < nmax && nmax > *min) { gdouble total_elapsed = g_timer_elapsed (total_timer, NULL); gdouble remaining; gdouble hours, mins, secs; gdouble hours1, mins1, secs1; g_timer_stop (timer); hours = floor (total_elapsed/3600.); mins = floor ((total_elapsed - 3600.*hours)/60.); secs = floor (total_elapsed - 3600.*hours - 60.*mins); remaining = total_elapsed*((nmax - *min)/(gdouble) (nmax - number) - 1.); hours1 = floor (remaining/3600.); mins1 = floor ((remaining - 3600.*hours1)/60.); secs1 = floor (remaining - 3600.*hours1 - 60.*mins1); fprintf (stderr, "\rEdges: %10u %3.0f%% %6.0f edges/s " "Elapsed: %02.0f:%02.0f:%02.0f " "Remaining: %02.0f:%02.0f:%02.0f ", number, 100.*(nmax - number)/(nmax - *min), (nold - number)/g_timer_elapsed (timer, NULL), hours, mins, secs, hours1, mins1, secs1); fflush (stderr); nold = number; g_timer_start (timer); } if (number < *min) { g_timer_destroy (timer); g_timer_destroy (total_timer); return TRUE; } return FALSE; } static gboolean stop_cost_verbose (gdouble cost, guint number, gdouble * max) { g_return_val_if_fail (max != NULL, TRUE); if (number % 121 == 0) { fprintf (stderr, "\rEdges: %10u Cost: %10g ", number, cost); fflush (stderr); } if (cost > *max) return TRUE; return FALSE; } static gboolean stop_log_cost (gdouble cost, guint number) { fprintf (stderr, "%d %g\n", number, cost); return FALSE; } static gdouble cost_angle (GtsEdge * e) { if (e->triangles && e->triangles->next) return fabs (gts_triangles_angle (e->triangles->data, e->triangles->next->data)); return G_MAXDOUBLE; } /* coarsen - produce a coarsened version of the input */ int main (int argc, char * argv[]) { GtsSurface * s; GtsPSurface * ps = NULL; gboolean verbose = FALSE; gboolean progressive = FALSE; gboolean log_cost = FALSE; guint number = 0; gdouble cmax = 0.0; StopOptions stop = NUMBER; CostOptions cost = COST_OPTIMIZED; MidvertexOptions mid = OPTIMIZED; GtsKeyFunc cost_func = NULL; GtsCoarsenFunc coarsen_func = NULL; GtsStopFunc stop_func = NULL; gpointer stop_data = NULL; int c = 0; GtsFile * fp; gdouble fold = PI/180.; GtsVolumeOptimizedParams params = { 0.5, 0.5, 0. }; gpointer coarsen_data = NULL, cost_data = NULL; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"angle", no_argument, NULL, 'a'}, {"progressive", no_argument, NULL, 'p'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, {"number", required_argument, NULL, 'n'}, {"length", no_argument, NULL, 'l'}, {"midvertex", no_argument, NULL, 'm'}, {"cost", required_argument, NULL, 'c'}, {"fold", required_argument, NULL, 'f'}, {"vweight", required_argument, NULL, 'w'}, {"bweight", required_argument, NULL, 'b'}, {"sweight", required_argument, NULL, 's'}, {"log", no_argument, NULL, 'L'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvmc:n:lpf:w:b:s:La", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvmc:n:lpf:w:b:s:La"))) { #endif /* not HAVE_GETOPT_LONG */ case 'a': /* angle */ cost = COST_ANGLE; break; case 'L': /* log */ log_cost = TRUE; break; case 'p': /* write progressive surface */ progressive = TRUE; break; case 'n': /* stop by number */ stop = NUMBER; number = atoi (optarg); break; case 'c': /* stop by cost */ stop = COST; cmax = atof (optarg); break; case 'v': /* verbose */ verbose = TRUE; break; case 'm': /* midvertex */ mid = MIDVERTEX; break; case 'l': /* cost is length */ cost = COST_LENGTH; break; case 'f': /* fold angle */ fold = atof (optarg)*PI/180.; break; case 'w': /* volume optimized weight */ params.volume_weight = atof (optarg); break; case 'b': /* boundary optimized weight */ params.boundary_weight = atof (optarg); break; case 's': /* shape optimized weight */ params.shape_weight = atof (optarg); break; case 'h': /* help */ fprintf (stderr, "Usage: coarsen [OPTION] < file.gts\n" "Construct a coarsened version of the input.\n" "\n" " -n N, --number=N stop the coarsening process if the number of\n" " edges was to fall below N\n" " -c C, --cost=C stop the coarsening process if the cost of collapsing\n" " an edge is larger than C\n" " -m --midvertex use midvertex as replacement vertex\n" " default is volume optimized point\n" " -l --length use length^2 as cost function\n" " default is optimized point cost\n" " -f F, --fold=F set maximum fold angle to F degrees\n" " default is one degree\n" " -w W, --vweight=W set weight used for volume optimization\n" " default is 0.5\n" " -b W, --bweight=W set weight used for boundary optimization\n" " default is 0.5\n" " -s W, --sweight=W set weight used for shape optimization\n" " default is 0.0\n" " -p --progressive write progressive surface file\n" " -L --log logs the evolution of the cost\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `coarsen --help' for more information.\n"); return 1; /* failure */ } } /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("coarsen: the file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } /* if verbose on print stats */ if (verbose) { gts_surface_print_stats (s, stderr); fprintf (stderr, "# volume: %g area: %g\n", gts_surface_volume (s), gts_surface_area (s)); } /* select the right coarsening process */ switch (cost) { case COST_OPTIMIZED: cost_func = (GtsKeyFunc) gts_volume_optimized_cost; cost_data = ¶ms; break; case COST_LENGTH: cost_func = NULL; break; case COST_ANGLE: cost_func = (GtsKeyFunc) cost_angle; break; default: g_assert_not_reached (); } switch (mid) { case MIDVERTEX: coarsen_func = NULL; break; case OPTIMIZED: coarsen_func = (GtsCoarsenFunc) gts_volume_optimized_vertex; coarsen_data = ¶ms; break; default: g_assert_not_reached (); } if (log_cost) stop_func = (GtsStopFunc) stop_log_cost; else { switch (stop) { case NUMBER: if (verbose) stop_func = (GtsStopFunc) stop_number_verbose; else stop_func = (GtsStopFunc) gts_coarsen_stop_number; stop_data = &number; break; case COST: if (verbose) stop_func = (GtsStopFunc) stop_cost_verbose; else stop_func = (GtsStopFunc) gts_coarsen_stop_cost; stop_data = &cmax; break; default: g_assert_not_reached (); } } if (progressive) ps = gts_psurface_new (gts_psurface_class (), s, gts_split_class (), cost_func, cost_data, coarsen_func, coarsen_data, stop_func, stop_data, fold); else gts_surface_coarsen (s, cost_func, cost_data, coarsen_func, coarsen_data, stop_func, stop_data, fold); /* if verbose on print stats */ if (verbose) { fputc ('\n', stderr); gts_surface_print_stats (s, stderr); fprintf (stderr, "# volume: %g area: %g\n", gts_surface_volume (s), gts_surface_area (s)); } /* write resulting surface to standard output */ if (progressive) gts_psurface_write (ps, stdout); else gts_surface_write (s, stdout); return 0; /* success */ } gts-snapshot-121130/examples/volume.c0000644000175100017510000000740212055775440014465 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" /* volume - compute the volume of a given surface if it is a closed and orientable manifold */ int main (int argc, char * argv[]) { GtsSurface * s; gboolean verbose = FALSE; gboolean cm = FALSE; int c = 0; GtsFile * fp; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"cm", no_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvc", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvc"))) { #endif /* not HAVE_GETOPT_LONG */ case 'c': /* cm */ cm = TRUE; break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: volume [OPTION] < file.gts\n" "Compute the volume of the domain bounded by the surface defined by file.gts.\n" "Print the volume and exit successfully if the surface is a closed orientable\n" "manifold. Exit unsuccessfully otherwise.\n" "\n" " -v --verbose print statistics about the surface\n" " -c --cm output center of mass and volume\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `volume --help' for more information.\n"); return 1; /* failure */ } } /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("volume: the file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } /* if verbose on print stats */ if (verbose) { gts_surface_print_stats (s, stdout); printf ("# Total area: %g\n", gts_surface_area (s)); } /* test if surface is a closed and orientable manifold. we don't need to test if s is a manifold since both tests below implies that. */ if (!gts_surface_is_closed (s) || !gts_surface_is_orientable (s)) return 1; /* failure */ /* print volume */ printf ("%g\n", gts_surface_volume (s)); if (cm) { GtsVector cm; /* print center of mass */ gts_surface_center_of_mass (s, cm); printf ("(%g,%g,%g)\n", cm[0], cm[1], cm[2]); } return 0; /* success */ } gts-snapshot-121130/examples/delaunay.c0000644000175100017510000004264112055775440014764 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" /* the file format is the classic GTS file format but only the vertex and * edge sections are read. */ static guint read_list (GPtrArray * vertices, GtsFifo * constraints, GtsEdgeClass * edge_class, FILE * fptr) { guint nv, ne, nt, i; guint line = 1; g_return_val_if_fail (vertices != NULL, 1); g_return_val_if_fail (constraints != NULL, 1); g_return_val_if_fail (edge_class != NULL, 1); g_return_val_if_fail (fptr != NULL, 1); if (fscanf (fptr, "%u %u %u", &nv, &ne, &nt) != 3) return line; line++; g_ptr_array_set_size (vertices, nv); i = 1; while (i <= nv) { gdouble x, y, z; if (fscanf (fptr, "%lf %lf %lf", &x, &y, &z) != 3) return line; line++; g_ptr_array_index (vertices, i++ - 1) = gts_vertex_new (gts_vertex_class (), x, y, z); } i = 1; while (i <= ne) { guint iv1, iv2; if (fscanf (fptr, "%u %u", &iv1, &iv2) != 2 || iv1 <= 0 || iv1 > nv || iv2 <= 0 || iv2 > nv) return line; line++; gts_fifo_push (constraints, gts_edge_new (edge_class, g_ptr_array_index (vertices, iv1 - 1), g_ptr_array_index (vertices, iv2 - 1))); i++; } return 0; } static gdouble triangle_cost (GtsTriangle * t, gpointer * data) { gdouble * min_quality = data[0]; gdouble * max_area = data[1]; gdouble quality = gts_triangle_quality (t); gdouble area = gts_triangle_area (t); if (quality < *min_quality || area > *max_area) return quality; return 0.; } static gboolean triangle_is_hole (GtsTriangle * t) { GtsEdge * e1, * e2, * e3; GtsVertex * v1, * v2, * v3; gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3); if ((GTS_IS_CONSTRAINT (e1) && GTS_SEGMENT (e1)->v1 != v1) || (GTS_IS_CONSTRAINT (e2) && GTS_SEGMENT (e2)->v1 != v2) || (GTS_IS_CONSTRAINT (e3) && GTS_SEGMENT (e3)->v1 != v3)) return TRUE; return FALSE; } static guint delaunay_remove_holes (GtsSurface * surface) { g_return_val_if_fail (surface != NULL, 0); return gts_surface_foreach_face_remove (surface, (GtsFunc) triangle_is_hole, NULL); } static void gts_constraint_split (GtsConstraint * c, GtsSurface * s, GtsFifo * fifo) { GSList * i; GtsVertex * v1, * v2; GtsEdge * e; g_return_if_fail (c != NULL); g_return_if_fail (s != NULL); v1 = GTS_SEGMENT (c)->v1; v2 = GTS_SEGMENT (c)->v2; e = GTS_EDGE (c); i = e->triangles; while (i) { GtsFace * f = i->data; if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s)) { GtsVertex * v = gts_triangle_vertex_opposite (GTS_TRIANGLE (f), e); if (gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v)) == 0.) { GSList * j = e->triangles; GtsFace * f1 = NULL; GtsEdge * e1, * e2; /* replaces edges with constraints */ gts_triangle_vertices_edges (GTS_TRIANGLE (f), e, &v1, &v2, &v, &e, &e1, &e2); if (!GTS_IS_CONSTRAINT (e1)) { GtsEdge * ne1 = gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (c)->klass), v2, v); gts_edge_replace (e1, ne1); gts_object_destroy (GTS_OBJECT (e1)); e1 = ne1; if (fifo) gts_fifo_push (fifo, e1); } if (!GTS_IS_CONSTRAINT (e2)) { GtsEdge * ne2 = gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (c)->klass), v, v1); gts_edge_replace (e2, ne2); gts_object_destroy (GTS_OBJECT (e2)); e2 = ne2; if (fifo) gts_fifo_push (fifo, e2); } /* look for face opposite */ while (j && !f1) { if (GTS_IS_FACE (j->data) && gts_face_has_parent_surface (j->data, s)) f1 = j->data; j = j->next; } if (f1) { /* c is not a boundary of s */ GtsEdge * e3, * e4, * e5; GtsVertex * v3; gts_triangle_vertices_edges (GTS_TRIANGLE (f1), e, &v1, &v2, &v3, &e, &e3, &e4); e5 = gts_edge_new (s->edge_class, v, v3); gts_surface_add_face (s, gts_face_new (s->face_class, e5, e2, e3)); gts_surface_add_face (s, gts_face_new (s->face_class, e5, e4, e1)); gts_object_destroy (GTS_OBJECT (f1)); } gts_object_destroy (GTS_OBJECT (f)); return; } } i = i->next; } } static void add_constraint (GtsConstraint * c, GtsSurface * s) { GSList * list = gts_delaunay_add_constraint (s, c); if (list) { g_warning ("constraint conflicted with %d other constraints", g_slist_length (list)); g_slist_free (list); } } static void split_constraint (GtsConstraint * c, gpointer * data) { GtsSurface * s = data[0]; GtsFifo * fifo = data[1]; gts_constraint_split (c, s, fifo); } static void shuffle_array (GPtrArray * a) { guint i; for (i = 0; i < a->len; i++) { guint j = (gdouble) rand ()*(a->len - 1)/(gdouble) RAND_MAX; guint k = (gdouble) rand ()*(a->len - 1)/(gdouble) RAND_MAX; gpointer tmp; if (j >= a->len) j = a->len - 1; if (k >= a->len) k = a->len - 1; tmp = g_ptr_array_index (a, j); g_ptr_array_index (a, j) = g_ptr_array_index (a, k); g_ptr_array_index (a, k) = tmp; } } static double slope (GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { GtsPoint * p1 = GTS_POINT (v1); GtsPoint * p2 = GTS_POINT (v2); GtsPoint * p3 = GTS_POINT (v3); double x1 = p2->x - p1->x; double y1 = p2->y - p1->y; double z1 = p2->z - p1->z; double x2 = p3->x - p1->x; double y2 = p3->y - p1->y; double z2 = p3->z - p1->z; double nx = y1*z2 - z1*y2; double ny = z1*x2 - x1*z2; double nz = x1*y2 - y1*x2; return 1. - nz*nz/(nx*nx + ny*ny + nz*nz); } /* swap edge if it maximises the minimum slope */ static gboolean edge_slope_swap (GtsEdge * e, GtsSurface * s) { if (!GTS_IS_CONSTRAINT (e)) { GtsTriangle * t1 = NULL, * t2 = NULL; GSList * i = e->triangles; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, s)) { if (!t1) t1 = i->data; else if (!t2) t2 = i->data; else g_return_val_if_fail (gts_edge_face_number (e, s) == 2, FALSE); } i = i->next; } if (!t1 || !t2) return FALSE; GtsVertex * v1, * v2, * v3, * v4, * v5, * v6; GtsEdge * e1, * e2, * e3, * e4; gts_triangle_vertices_edges (t1, e, &v1, &v2, &v3, &e, &e1, &e2); gts_triangle_vertices_edges (t2, e, &v4, &v5, &v6, &e, &e3, &e4); g_assert (v2 == v4 && v1 == v5); if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v6), GTS_POINT (v2)) > 0. && gts_point_orientation (GTS_POINT (v6), GTS_POINT (v3), GTS_POINT (v1)) > 0.) { /* edge swap is possible */ double slope1 = slope (v1, v2, v3), slope2 = slope (v4, v5, v6); double slopemin1 = MIN (slope1, slope2); slope1 = slope (v3, v6, v2); slope2 = slope (v6, v3, v1); double slopemin2 = MIN (slope1, slope2); if (slopemin2 > slopemin1) { /* edge swap */ GtsSegment * v3v6 = gts_vertices_are_connected (v3, v6); if (!GTS_IS_EDGE (v3v6)) v3v6 = GTS_SEGMENT (gts_edge_new (s->edge_class, v3, v6)); GtsFace * f = gts_face_new (s->face_class, e1, GTS_EDGE (v3v6), e4); GtsTriangle * t; if ((t = gts_triangle_is_duplicate (GTS_TRIANGLE (f))) && GTS_IS_FACE (t)) { gts_object_destroy (GTS_OBJECT (f)); f = GTS_FACE (t); } gts_surface_add_face (s, f); f = gts_face_new (s->face_class, GTS_EDGE (v3v6), e2, e3); if ((t = gts_triangle_is_duplicate (GTS_TRIANGLE (f))) && GTS_IS_FACE (t)) { gts_object_destroy (GTS_OBJECT (f)); f = GTS_FACE (t); } gts_surface_add_face (s, f); gts_surface_remove_face (s, GTS_FACE (t1)); gts_surface_remove_face (s, GTS_FACE (t2)); return TRUE; } } } return FALSE; } static void add_edge (GtsEdge * e, GtsFifo * fifo) { gts_fifo_push (fifo, e); } int main (int argc, char * argv[]) { GPtrArray * vertices; GtsFifo * edges; guint i, line; GtsTriangle * t; GtsVertex * v1, * v2, * v3; GtsSurface * surface; gboolean keep_hull = TRUE; gboolean verbose = FALSE; gboolean add_constraints = TRUE; gboolean remove_holes = FALSE; gboolean check_delaunay = FALSE; gboolean conform = FALSE; gboolean refine = FALSE; gboolean split_constraints = FALSE; gboolean randomize = FALSE; gboolean remove_duplicates = FALSE; gboolean slope = FALSE; gint steiner_max = -1; gdouble quality = 0., area = G_MAXDOUBLE; int c = 0, status = 0; const char * fname = NULL; GTimer * timer; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"duplicates", no_argument, NULL, 'd'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, {"randomize", no_argument, NULL, 'r'}, {"hull", no_argument, NULL, 'b'}, {"noconst", no_argument, NULL, 'e'}, {"holes", no_argument, NULL, 'H'}, {"split", no_argument, NULL, 'S'}, {"check", no_argument, NULL, 'c'}, {"slope", no_argument, NULL, 't'}, {"files", required_argument, NULL, 'f'}, {"conform", no_argument, NULL, 'o'}, {"steiner", required_argument, NULL, 's'}, {"quality", required_argument, NULL, 'q'}, {"area", required_argument, NULL, 'a'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvbecf:os:q:a:HSrdt", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvbecf:os:q:a:HSrdt"))) { #endif /* not HAVE_GETOPT_LONG */ case 'd': /* duplicates */ remove_duplicates = TRUE; break; case 'b': /* do not keep convex hull */ keep_hull = FALSE; break; case 'e': /* do not add constrained edges */ add_constraints = FALSE; break; case 'H': /* remove holes */ remove_holes = TRUE; break; case 'S': /* split constraints */ split_constraints = TRUE; break; case 'r': /* randomize */ randomize = TRUE; break; case 't': /* slope optimisation */ slope = TRUE; break; case 'c': /* check Delaunay property */ check_delaunay = TRUE; break; case 'f': /* generates files */ fname = optarg; break; case 'v': /* verbose */ verbose = TRUE; break; case 'o': /* conform */ conform = TRUE; break; case 's': /* steiner */ steiner_max = atoi (optarg); break; case 'q': /* quality */ conform = TRUE; refine = TRUE; quality = atof (optarg); break; case 'a': /* area */ conform = TRUE; refine = TRUE; area = atof (optarg); break; case 'h': /* help */ fprintf (stderr, "Usage: delaunay [OPTION] < file.gts\n" "Construct the constrained Delaunay triangulation of the input\n" "\n" " -b --hull do not keep convex hull\n" " -e --noconst do not add constrained edges\n" " -S --split split constraints (experimental)\n" " -H --holes remove holes from the triangulation\n" " -d --duplicates remove duplicate vertices\n" " -r --randomize shuffle input vertex list\n" " -c --check check Delaunay property\n" " -f FNAME --files=FNAME generate evolution files\n" " -o --conform generate conforming triangulation\n" " -s N --steiner=N maximum number of Steiner points for\n" " conforming triangulation (default is no limit)\n" " -t --slope maximisation of minimum slope\n" " -q Q --quality=Q Set the minimum acceptable face quality\n" " -a A --area=A Set the maximum acceptable face area\n" " -v --verbose print statistics about the triangulation\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `delaunay --help' for more information.\n"); return 1; /* failure */ } } /* read file => two lists: vertices and constraints */ edges = gts_fifo_new (); vertices = g_ptr_array_new (); if (add_constraints) /* the edge class is a GtsConstraintClass */ line = read_list (vertices, edges, GTS_EDGE_CLASS (gts_constraint_class ()), stdin); else /* the edge class is a "normal" edge: GtsEdgeClass */ line = read_list (vertices, edges, gts_edge_class (), stdin); if (line > 0) { fprintf (stderr, "delaunay: error in input file at line %u\n", line); return 1; } timer = g_timer_new (); g_timer_start (timer); if (randomize) shuffle_array (vertices); /* create triangle enclosing all the vertices */ { GSList * list = NULL; for (i = 0; i < vertices->len; i++) list = g_slist_prepend (list, g_ptr_array_index (vertices, i)); t = gts_triangle_enclosing (gts_triangle_class (), list, 100.); g_slist_free (list); } gts_triangle_vertices (t, &v1, &v2, &v3); /* create surface with one face: the enclosing triangle */ surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_add_face (surface, gts_face_new (gts_face_class (), t->e1, t->e2, t->e3)); /* add vertices */ for (i = 0; i < vertices->len; i++) { GtsVertex * v1 = g_ptr_array_index (vertices, i); GtsVertex * v = gts_delaunay_add_vertex (surface, v1, NULL); g_assert (v != v1); if (v != NULL) { if (!remove_duplicates) { fprintf (stderr, "delaunay: duplicate vertex (%g,%g) in input file\n", GTS_POINT (v)->x, GTS_POINT (v)->y); return 1; /* Failure */ } else gts_vertex_replace (v1, v); } if (fname) { static guint nf = 1; char s[80]; FILE * fp; g_snprintf (s, 80, "%s.%u", fname, nf++); fp = fopen (s, "wt"); gts_surface_write_oogl (surface, fp); fclose (fp); if (check_delaunay && gts_delaunay_check (surface)) { fprintf (stderr, "delaunay: triangulation is not Delaunay\n"); return 1; } } } g_ptr_array_free (vertices, TRUE); /* add remaining constraints */ if (add_constraints) gts_fifo_foreach (edges, (GtsFunc) add_constraint, surface); /* destroy enclosing triangle */ gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (v1)); gts_object_destroy (GTS_OBJECT (v2)); gts_object_destroy (GTS_OBJECT (v3)); gts_allow_floating_vertices = FALSE; if (!keep_hull) gts_delaunay_remove_hull (surface); if (remove_holes) delaunay_remove_holes (surface); if (split_constraints) { gpointer data[2]; data[0] = surface; data[1] = edges; gts_fifo_foreach (edges, (GtsFunc) split_constraint, data); } if (conform) { guint encroached_number = gts_delaunay_conform (surface, steiner_max, (GtsEncroachFunc) gts_vertex_encroaches_edge, NULL); if (encroached_number == 0 && refine) { guint unrefined_number; gpointer data[2]; data[0] = &quality; data[1] = &area; unrefined_number = gts_delaunay_refine (surface, steiner_max, (GtsEncroachFunc) gts_vertex_encroaches_edge, NULL, (GtsKeyFunc) triangle_cost, data); if (verbose && unrefined_number > 0) fprintf (stderr, "delaunay: ran out of Steiner points (max: %d) during refinement\n" "%d unrefined faces left\n", steiner_max, unrefined_number); } else if (verbose && encroached_number > 0) fprintf (stderr, "delaunay: ran out of Steiner points (max: %d) during conforming\n" "Delaunay triangulation: %d encroached constraints left\n", steiner_max, encroached_number); } if (slope) { guint swapped; do { swapped = 0; GtsFifo * fifo = gts_fifo_new (); gts_surface_foreach_edge (surface, (GtsFunc) add_edge, fifo); GtsEdge * e; while ((e = gts_fifo_pop (fifo))) if (edge_slope_swap (e, surface)) swapped++; gts_fifo_destroy (fifo); if (verbose) fprintf (stderr, "swapped %d\n", swapped); } while (swapped > 0); } g_timer_stop (timer); if (verbose) { gts_surface_print_stats (surface, stderr); fprintf (stderr, "# Triangulation time: %g s speed: %.0f vertex/s\n", g_timer_elapsed (timer, NULL), gts_surface_vertex_number (surface)/g_timer_elapsed (timer, NULL)); } if (check_delaunay && gts_delaunay_check (surface)) { fprintf (stderr, "delaunay: triangulation is not Delaunay\n"); status = 1; /* failure */ } /* write triangulation */ gts_surface_write (surface, stdout); return status; } gts-snapshot-121130/examples/cleanup.c0000644000175100017510000002112512055775440014603 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" static void build_list (gpointer data, GSList ** list) { /* always use O(1) g_slist_prepend instead of O(n) g_slist_append */ *list = g_slist_prepend (*list, data); } static void build_list1 (gpointer data, GList ** list) { /* always use O(1) g_list_prepend instead of O(n) g_list_append */ *list = g_list_prepend (*list, data); } static void build_list2 (GtsVertex * v, GList ** list) { if (gts_vertex_is_boundary (v, NULL)) *list = g_list_prepend (*list, v); } static void vertex_cleanup (GtsVertex * v) { gts_vertex_is_contact (v, TRUE); } static void edge_cleanup (GtsSurface * surface) { GSList * edges = NULL; GSList * i; g_return_if_fail (surface != NULL); /* build list of edges */ gts_surface_foreach_edge (surface, (GtsFunc) build_list, &edges); /* remove degenerate and duplicate edges. Note: we could use gts_edges_merge() to remove the duplicates and then remove the degenerate edges but it is more efficient to do everything at once (and it's more pedagogical too ...) */ /* We want to control manually the destruction of edges */ gts_allow_floating_edges = TRUE; i = edges; while (i) { GtsEdge * e = i->data; GtsEdge * duplicate; if (GTS_SEGMENT (e)->v1 == GTS_SEGMENT (e)->v2) /* edge is degenerate */ /* destroy e */ gts_object_destroy (GTS_OBJECT (e)); else if ((duplicate = gts_edge_is_duplicate (e))) { /* replace e with its duplicate */ gts_edge_replace (e, duplicate); /* destroy e */ gts_object_destroy (GTS_OBJECT (e)); } i = i->next; } /* don't forget to reset to default */ gts_allow_floating_edges = FALSE; /* free list of edges */ g_slist_free (edges); } static void triangle_cleanup (GtsSurface * s) { GSList * triangles = NULL; GSList * i; g_return_if_fail (s != NULL); /* build list of triangles */ gts_surface_foreach_face (s, (GtsFunc) build_list, &triangles); /* remove duplicate triangles */ i = triangles; while (i) { GtsTriangle * t = i->data; if (gts_triangle_is_duplicate (t)) /* destroy t, its edges (if not used by any other triangle) and its corners (if not used by any other edge) */ gts_object_destroy (GTS_OBJECT (t)); i = i->next; } /* free list of triangles */ g_slist_free (triangles); } static gboolean check_boundaries (GtsVertex * v1, GtsVertex * v2) { return (g_slist_length (v1->segments) < 4 && g_slist_length (v2->segments) < 4); } /* cleanup - using a given threshold merge vertices which are too close. Eliminate degenerate and duplicate edges. Eliminate duplicate triangles . */ int main (int argc, char * argv[]) { GtsSurface * s, * m; GList * vertices = NULL; gboolean verbose = FALSE, sever = FALSE, boundary = FALSE; gdouble threshold; int c = 0; GtsFile * fp; gboolean (* check) (GtsVertex *, GtsVertex *) = NULL; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"2D", no_argument, NULL, 'c'}, {"boundary", no_argument, NULL, 'b'}, {"merge", required_argument, NULL, 'm'}, {"sever", no_argument, NULL, 's'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvsm:bc", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvsm:bc"))) { #endif /* not HAVE_GETOPT_LONG */ case 'c': /* 2D */ check = check_boundaries; break; case 'b': /* boundary */ boundary = TRUE; break; case 's': /* sever */ sever = TRUE; break; case 'm': { /* merge */ FILE * fptr = fopen (optarg, "rt"); GtsFile * fp; if (fptr == NULL) { fprintf (stderr, "cleanup: cannot open file `%s' for merging\n", optarg); return 1; /* failure */ } m = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), s->vertex_class); fp = gts_file_new (fptr); if (gts_surface_read (m, fp)) { fprintf (stderr, "cleanup: file `%s' is not a valid GTS file\n", optarg); fprintf (stderr, "%s:%d:%d: %s\n", optarg, fp->line, fp->pos, fp->error); return 1; /* failure */ } gts_file_destroy (fp); fclose (fptr); gts_surface_merge (s, m); gts_object_destroy (GTS_OBJECT (m)); break; } case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: cleanup [OPTION] THRESHOLD < FILE\n" "Merge vertices of the GTS surface FILE if they are closer than THRESHOLD,\n" "eliminate degenerate, duplicate edges and duplicate triangles.\n" "\n" " -c --2D 2D boundary merging\n" " -b --boundary only consider boundary vertices for merging\n" " -s --sever sever \"contact\" vertices\n" " -m FILE --merge merge surface FILE\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `cleanup --help' for more information.\n"); return 1; /* failure */ } } if (optind >= argc) { /* missing threshold */ fprintf (stderr, "cleanup: missing THRESHOLD\n" "Try `cleanup --help' for more information.\n"); return 1; /* failure */ } threshold = atof (argv[optind]); if (threshold < 0.0) { /* threshold must be positive */ fprintf (stderr, "cleanup: THRESHOLD must be >= 0.0\n" "Try `cleanup --help' for more information.\n"); return 1; /* failure */ } /* read surface in */ m = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), s->vertex_class); fp = gts_file_new (stdin); if (gts_surface_read (m, fp)) { fputs ("cleanup: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } gts_surface_merge (s, m); gts_object_destroy (GTS_OBJECT (m)); /* if verbose on print stats */ if (verbose) gts_surface_print_stats (s, stderr); /* merge vertices which are close enough */ /* build list of vertices */ gts_surface_foreach_vertex (s, boundary ? (GtsFunc) build_list2 : (GtsFunc) build_list1, &vertices); /* merge vertices: we MUST update the variable vertices because this function modifies the list (i.e. removes the merged vertices). */ vertices = gts_vertices_merge (vertices, threshold, check); /* free the list */ g_list_free (vertices); /* eliminate degenerate and duplicate edges */ edge_cleanup (s); /* eliminate duplicate triangles */ triangle_cleanup (s); if (sever) gts_surface_foreach_vertex (s, (GtsFunc) vertex_cleanup, NULL); /* if verbose on print stats */ if (verbose) { GtsBBox * bb = gts_bbox_surface (gts_bbox_class (), s); gts_surface_print_stats (s, stderr); fprintf (stderr, "# Bounding box: [%g,%g,%g] [%g,%g,%g]\n", bb->x1, bb->y1, bb->z1, bb->x2, bb->y2, bb->z2); } /* write surface */ gts_surface_write (s, stdout); return 0; /* success */ } gts-snapshot-121130/examples/merge.c0000644000175100017510000000626712055775440014265 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" int main (int argc, char * argv[]) { GtsSurface * s; gboolean verbose = FALSE; int c = 0; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hv", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hv"))) { #endif /* not HAVE_GETOPT_LONG */ case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: merge [OPTION] file1.gts file2.gts ...\n" "Merges files and outputs the resulting GTS surface.\n" "\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `merge --help' for more information.\n"); return 1; /* failure */ } } s = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (gts_surface_class ()))); while (optind < argc) { FILE * f = fopen (argv[optind], "r"); GtsFile * fp; GtsSurface * s1; if (f == NULL) { fprintf (stderr, "merge: can not open file `%s'\n", argv[optind]); return 1; } fp = gts_file_new (f); s1 = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (gts_surface_class ()))); if (gts_surface_read (s1, fp)) { fprintf (stderr, "merge: `%s' is not a valid GTS surface file\n", argv[optind]); fprintf (stderr, "%s:%d:%d: %s\n", argv[optind], fp->line, fp->pos, fp->error); return 1; } gts_surface_merge (s, s1); gts_object_destroy (GTS_OBJECT (s1)); gts_file_destroy (fp); fclose (f); optind++; } if (verbose) gts_surface_print_stats (s, stderr); gts_surface_write (s, stdout); return 0; } gts-snapshot-121130/examples/Makefile.in0000644000175100017510000005752612055775445015100 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ EXTRA_PROGRAMS = happrox$(EXEEXT) bin_PROGRAMS = transform$(EXEEXT) delaunay$(EXEEXT) $(am__EXEEXT_1) noinst_PROGRAMS = set$(EXEEXT) volume$(EXEEXT) cleanup$(EXEEXT) \ coarsen$(EXEEXT) refine$(EXEEXT) iso$(EXEEXT) gtstoc$(EXEEXT) \ oocs$(EXEEXT) partition$(EXEEXT) traverse$(EXEEXT) \ cartesian$(EXEEXT) split$(EXEEXT) smooth$(EXEEXT) \ sphere$(EXEEXT) stripe$(EXEEXT) optimize$(EXEEXT) \ merge$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = @HAS_NETPBM_TRUE@am__EXEEXT_1 = happrox$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) cartesian_SOURCES = cartesian.c cartesian_OBJECTS = cartesian.$(OBJEXT) cartesian_LDADD = $(LDADD) cartesian_DEPENDENCIES = $(top_builddir)/src/libgts.la cleanup_SOURCES = cleanup.c cleanup_OBJECTS = cleanup.$(OBJEXT) cleanup_LDADD = $(LDADD) cleanup_DEPENDENCIES = $(top_builddir)/src/libgts.la coarsen_SOURCES = coarsen.c coarsen_OBJECTS = coarsen.$(OBJEXT) coarsen_LDADD = $(LDADD) coarsen_DEPENDENCIES = $(top_builddir)/src/libgts.la delaunay_SOURCES = delaunay.c delaunay_OBJECTS = delaunay.$(OBJEXT) delaunay_LDADD = $(LDADD) delaunay_DEPENDENCIES = $(top_builddir)/src/libgts.la gtstoc_SOURCES = gtstoc.c gtstoc_OBJECTS = gtstoc.$(OBJEXT) gtstoc_LDADD = $(LDADD) gtstoc_DEPENDENCIES = $(top_builddir)/src/libgts.la happrox_SOURCES = happrox.c happrox_OBJECTS = happrox.$(OBJEXT) am__DEPENDENCIES_1 = $(top_builddir)/src/libgts.la happrox_DEPENDENCIES = $(am__DEPENDENCIES_1) iso_SOURCES = iso.c iso_OBJECTS = iso.$(OBJEXT) iso_LDADD = $(LDADD) iso_DEPENDENCIES = $(top_builddir)/src/libgts.la merge_SOURCES = merge.c merge_OBJECTS = merge.$(OBJEXT) merge_LDADD = $(LDADD) merge_DEPENDENCIES = $(top_builddir)/src/libgts.la oocs_SOURCES = oocs.c oocs_OBJECTS = oocs.$(OBJEXT) oocs_LDADD = $(LDADD) oocs_DEPENDENCIES = $(top_builddir)/src/libgts.la optimize_SOURCES = optimize.c optimize_OBJECTS = optimize.$(OBJEXT) optimize_LDADD = $(LDADD) optimize_DEPENDENCIES = $(top_builddir)/src/libgts.la partition_SOURCES = partition.c partition_OBJECTS = partition.$(OBJEXT) partition_LDADD = $(LDADD) partition_DEPENDENCIES = $(top_builddir)/src/libgts.la refine_SOURCES = refine.c refine_OBJECTS = refine.$(OBJEXT) refine_LDADD = $(LDADD) refine_DEPENDENCIES = $(top_builddir)/src/libgts.la set_SOURCES = set.c set_OBJECTS = set.$(OBJEXT) set_LDADD = $(LDADD) set_DEPENDENCIES = $(top_builddir)/src/libgts.la smooth_SOURCES = smooth.c smooth_OBJECTS = smooth.$(OBJEXT) smooth_LDADD = $(LDADD) smooth_DEPENDENCIES = $(top_builddir)/src/libgts.la sphere_SOURCES = sphere.c sphere_OBJECTS = sphere.$(OBJEXT) sphere_LDADD = $(LDADD) sphere_DEPENDENCIES = $(top_builddir)/src/libgts.la split_SOURCES = split.c split_OBJECTS = split.$(OBJEXT) split_LDADD = $(LDADD) split_DEPENDENCIES = $(top_builddir)/src/libgts.la stripe_SOURCES = stripe.c stripe_OBJECTS = stripe.$(OBJEXT) stripe_LDADD = $(LDADD) stripe_DEPENDENCIES = $(top_builddir)/src/libgts.la transform_SOURCES = transform.c transform_OBJECTS = transform.$(OBJEXT) transform_LDADD = $(LDADD) transform_DEPENDENCIES = $(top_builddir)/src/libgts.la traverse_SOURCES = traverse.c traverse_OBJECTS = traverse.$(OBJEXT) traverse_LDADD = $(LDADD) traverse_DEPENDENCIES = $(top_builddir)/src/libgts.la volume_SOURCES = volume.c volume_OBJECTS = volume.$(OBJEXT) volume_LDADD = $(LDADD) volume_DEPENDENCIES = $(top_builddir)/src/libgts.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --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 = cartesian.c cleanup.c coarsen.c delaunay.c gtstoc.c \ happrox.c iso.c merge.c oocs.c optimize.c partition.c refine.c \ set.c smooth.c sphere.c split.c stripe.c transform.c \ traverse.c volume.c DIST_SOURCES = cartesian.c cleanup.c coarsen.c delaunay.c gtstoc.c \ happrox.c iso.c merge.c oocs.c optimize.c partition.c refine.c \ set.c smooth.c sphere.c split.c stripe.c transform.c \ traverse.c volume.c 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-examples\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la happrox_LDADD = $(LDADD) -lnetpbm @HAS_NETPBM_TRUE@NETPBM_EXTRA = happrox all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 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 clean-noinstPROGRAMS: @list='$(noinst_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 cartesian$(EXEEXT): $(cartesian_OBJECTS) $(cartesian_DEPENDENCIES) @rm -f cartesian$(EXEEXT) $(LINK) $(cartesian_OBJECTS) $(cartesian_LDADD) $(LIBS) cleanup$(EXEEXT): $(cleanup_OBJECTS) $(cleanup_DEPENDENCIES) @rm -f cleanup$(EXEEXT) $(LINK) $(cleanup_OBJECTS) $(cleanup_LDADD) $(LIBS) coarsen$(EXEEXT): $(coarsen_OBJECTS) $(coarsen_DEPENDENCIES) @rm -f coarsen$(EXEEXT) $(LINK) $(coarsen_OBJECTS) $(coarsen_LDADD) $(LIBS) delaunay$(EXEEXT): $(delaunay_OBJECTS) $(delaunay_DEPENDENCIES) @rm -f delaunay$(EXEEXT) $(LINK) $(delaunay_OBJECTS) $(delaunay_LDADD) $(LIBS) gtstoc$(EXEEXT): $(gtstoc_OBJECTS) $(gtstoc_DEPENDENCIES) @rm -f gtstoc$(EXEEXT) $(LINK) $(gtstoc_OBJECTS) $(gtstoc_LDADD) $(LIBS) happrox$(EXEEXT): $(happrox_OBJECTS) $(happrox_DEPENDENCIES) @rm -f happrox$(EXEEXT) $(LINK) $(happrox_OBJECTS) $(happrox_LDADD) $(LIBS) iso$(EXEEXT): $(iso_OBJECTS) $(iso_DEPENDENCIES) @rm -f iso$(EXEEXT) $(LINK) $(iso_OBJECTS) $(iso_LDADD) $(LIBS) merge$(EXEEXT): $(merge_OBJECTS) $(merge_DEPENDENCIES) @rm -f merge$(EXEEXT) $(LINK) $(merge_OBJECTS) $(merge_LDADD) $(LIBS) oocs$(EXEEXT): $(oocs_OBJECTS) $(oocs_DEPENDENCIES) @rm -f oocs$(EXEEXT) $(LINK) $(oocs_OBJECTS) $(oocs_LDADD) $(LIBS) optimize$(EXEEXT): $(optimize_OBJECTS) $(optimize_DEPENDENCIES) @rm -f optimize$(EXEEXT) $(LINK) $(optimize_OBJECTS) $(optimize_LDADD) $(LIBS) partition$(EXEEXT): $(partition_OBJECTS) $(partition_DEPENDENCIES) @rm -f partition$(EXEEXT) $(LINK) $(partition_OBJECTS) $(partition_LDADD) $(LIBS) refine$(EXEEXT): $(refine_OBJECTS) $(refine_DEPENDENCIES) @rm -f refine$(EXEEXT) $(LINK) $(refine_OBJECTS) $(refine_LDADD) $(LIBS) set$(EXEEXT): $(set_OBJECTS) $(set_DEPENDENCIES) @rm -f set$(EXEEXT) $(LINK) $(set_OBJECTS) $(set_LDADD) $(LIBS) smooth$(EXEEXT): $(smooth_OBJECTS) $(smooth_DEPENDENCIES) @rm -f smooth$(EXEEXT) $(LINK) $(smooth_OBJECTS) $(smooth_LDADD) $(LIBS) sphere$(EXEEXT): $(sphere_OBJECTS) $(sphere_DEPENDENCIES) @rm -f sphere$(EXEEXT) $(LINK) $(sphere_OBJECTS) $(sphere_LDADD) $(LIBS) split$(EXEEXT): $(split_OBJECTS) $(split_DEPENDENCIES) @rm -f split$(EXEEXT) $(LINK) $(split_OBJECTS) $(split_LDADD) $(LIBS) stripe$(EXEEXT): $(stripe_OBJECTS) $(stripe_DEPENDENCIES) @rm -f stripe$(EXEEXT) $(LINK) $(stripe_OBJECTS) $(stripe_LDADD) $(LIBS) transform$(EXEEXT): $(transform_OBJECTS) $(transform_DEPENDENCIES) @rm -f transform$(EXEEXT) $(LINK) $(transform_OBJECTS) $(transform_LDADD) $(LIBS) traverse$(EXEEXT): $(traverse_OBJECTS) $(traverse_DEPENDENCIES) @rm -f traverse$(EXEEXT) $(LINK) $(traverse_OBJECTS) $(traverse_LDADD) $(LIBS) volume$(EXEEXT): $(volume_OBJECTS) $(volume_DEPENDENCIES) @rm -f volume$(EXEEXT) $(LINK) $(volume_OBJECTS) $(volume_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cartesian.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coarsen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delaunay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtstoc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/happrox.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oocs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optimize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partition.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smooth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sphere.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/volume.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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) set x; \ 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; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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 "$(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 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) -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-binPROGRAMS 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-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 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-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: gts-snapshot-121130/examples/cartesian.c0000644000175100017510000003051212055775440015125 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" typedef struct _CartesianGrid CartesianGrid; struct _CartesianGrid { GtsVertex *** vertices; guint nx, ny; gdouble xmin, xmax, ymin, ymax; }; static void ** malloc2D (guint nx, guint ny, gulong size) { void ** m = g_malloc (nx*sizeof (void *)); guint i; for (i = 0; i < nx; i++) m[i] = g_malloc0 (ny*size); return m; } static void free2D (void ** m, guint nx) { guint i; g_return_if_fail (m != NULL); for (i = 0; i < nx; i++) g_free (m[i]); g_free (m); } static CartesianGrid * cartesian_grid_new (guint nx, guint ny) { CartesianGrid * grid; grid = g_malloc (sizeof (CartesianGrid)); grid->vertices = (GtsVertex ***) malloc2D (nx, ny, sizeof (GtsVertex *)); grid->nx = nx; grid->ny = ny; grid->xmin = G_MAXDOUBLE; grid->xmax = - G_MAXDOUBLE; grid->ymin = G_MAXDOUBLE; grid->ymax = - G_MAXDOUBLE; return grid; } static void cartesian_grid_destroy (CartesianGrid * g, gboolean destroy_vertices) { g_return_if_fail (g != NULL); if (destroy_vertices) { guint i, j; gts_allow_floating_vertices = TRUE; for (i = 0; i < g->nx; i++) for (j = 0; j < g->ny; j++) if (g->vertices[i][j]) gts_object_destroy (GTS_OBJECT (g->vertices[i][j])); gts_allow_floating_vertices = FALSE; } free2D ((void **) g->vertices, g->nx); g_free (g); } static CartesianGrid * cartesian_grid_read (GtsVertexClass * klass, guint * line) { CartesianGrid * grid; guint nx, ny, line_number = 1, i, j; g_return_val_if_fail (klass != NULL, NULL); if (scanf ("%u %u", &nx, &ny) != 2) { if (line) *line = line_number; return NULL; } line_number++; grid = cartesian_grid_new (nx, ny); for (i = 0; i < nx; i++) for (j = 0; j < ny; j++) { gdouble x, y, z; if (scanf ("%lf %lf %lf", &x, &y, &z) != 3) { cartesian_grid_destroy (grid, TRUE); if (line) *line = line_number; return NULL; } if (z != 0.) grid->vertices[i][j] = gts_vertex_new (klass, x, y, z); if (x > grid->xmax) grid->xmax = x; if (x < grid->xmin) grid->xmin = x; if (y > grid->ymax) grid->ymax = y; if (y < grid->ymin) grid->ymin = y; line_number++; } return grid; } static GtsEdge * new_edge (GtsVertex * v1, GtsVertex * v2) { GtsSegment * s = gts_vertices_are_connected (v1, v2); return s == NULL ? gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), v1, v2) : GTS_EDGE (s); } static void cartesian_grid_triangulate (CartesianGrid * g, GtsSurface * s) { gint i, j; GtsVertex *** v; g_return_if_fail (g != NULL); g_return_if_fail (s != NULL); v = g->vertices; for (i = 0; i < g->nx - 1; i++) for (j = 0; j < g->ny - 1; j++) if (v[i][j]) { if (v[i][j+1]) { if (v[i+1][j+1]) { GtsEdge * e1 = new_edge (v[i][j+1], v[i][j]); GtsEdge * e2 = gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), v[i][j], v[i+1][j+1]); GtsEdge * e3 = new_edge (v[i+1][j+1], v[i][j+1]); gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3)); if (v[i+1][j]) { e1 = new_edge (v[i+1][j], v[i+1][j+1]); e3 = new_edge (v[i][j], v[i+1][j]); gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3)); } } else if (v[i+1][j]) { GtsEdge * e1 = new_edge (v[i][j+1], v[i][j]); GtsEdge * e2 = new_edge (v[i][j], v[i+1][j]); GtsEdge * e3 = gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), v[i+1][j], v[i][j+1]); gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3)); } } else if (v[i+1][j] && v[i+1][j+1]) { GtsEdge * e1 = new_edge (v[i][j], v[i+1][j]); GtsEdge * e2 = new_edge (v[i+1][j], v[i+1][j+1]); GtsEdge * e3 = gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), v[i+1][j+1], v[i][j]); gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3)); } } else if (v[i][j+1] && v[i+1][j+1] && v[i+1][j]) { GtsEdge * e1 = new_edge (v[i+1][j], v[i+1][j+1]); GtsEdge * e2 = new_edge (v[i+1][j+1], v[i][j+1]); GtsEdge * e3 = gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), v[i][j+1], v[i+1][j]); gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3)); } } static gboolean triangle_is_hole (GtsTriangle * t) { GtsEdge * e1, * e2, * e3; GtsVertex * v1, * v2, * v3; gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3); if ((GTS_IS_CONSTRAINT (e1) && GTS_SEGMENT (e1)->v2 != v1) || (GTS_IS_CONSTRAINT (e2) && GTS_SEGMENT (e2)->v2 != v2) || (GTS_IS_CONSTRAINT (e3) && GTS_SEGMENT (e3)->v2 != v3)) return TRUE; return FALSE; } static void mark_as_hole (GtsFace * f, GtsSurface * s) { GtsEdge * e1, * e2, * e3; if (GTS_OBJECT (f)->reserved == f) return; GTS_OBJECT (f)->reserved = f; e1 = GTS_TRIANGLE (f)->e1; e2 = GTS_TRIANGLE (f)->e2; e3 = GTS_TRIANGLE (f)->e3; if (!GTS_IS_CONSTRAINT (e1)) { GSList * i = e1->triangles; while (i) { GtsFace * f1 = i->data; if (f1 != f && GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s)) mark_as_hole (f1, s); i = i->next; } } if (!GTS_IS_CONSTRAINT (e2)) { GSList * i = e2->triangles; while (i) { GtsFace * f1 = i->data; if (f1 != f && GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s)) mark_as_hole (f1, s); i = i->next; } } if (!GTS_IS_CONSTRAINT (e3)) { GSList * i = e3->triangles; while (i) { GtsFace * f1 = i->data; if (f1 != f && GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s)) mark_as_hole (f1, s); i = i->next; } } } static void edge_mark_as_hole (GtsEdge * e, GtsSurface * s) { GSList * i = e->triangles; while (i) { GtsFace * f = i->data; if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s) && triangle_is_hole (GTS_TRIANGLE (f))) mark_as_hole (f, s); i = i->next; } } static gboolean face_is_marked (GtsObject * o) { if (o->reserved == o || gts_triangle_is_duplicate (GTS_TRIANGLE (o))) return TRUE; return FALSE; } static void build_constraint_list (GtsEdge * e, gpointer * data) { GtsSurface * s = data[0]; GSList ** constraints = data[1]; if (gts_edge_is_boundary (e, s)) *constraints = g_slist_prepend (*constraints, e); } static GtsSurface * cartesian_grid_triangulate_holes (CartesianGrid * grid, GtsSurface * s) { GtsVertex * v1, * v2, * v3, * v4; GtsEdge * e1, * e2, * e3, * e4, * e5; gdouble w, h; GtsSurface * box; GSList * constraints = NULL, * vertices = NULL, * i; gpointer data[2]; g_return_val_if_fail (grid != NULL, NULL); g_return_val_if_fail (s != NULL, NULL); /* build enclosing box */ w = grid->xmax - grid->xmin; h = grid->ymax - grid->ymin; v1 = gts_vertex_new (s->vertex_class, grid->xmin - w, grid->ymin - h, 0.); v2 = gts_vertex_new (s->vertex_class, grid->xmax + w, grid->ymin - h, 0.); v3 = gts_vertex_new (s->vertex_class, grid->xmax + w, grid->ymax + h, 0.); v4 = gts_vertex_new (s->vertex_class, grid->xmin - w, grid->ymax + h, 0.); e1 = gts_edge_new (s->edge_class, v1, v2); e2 = gts_edge_new (s->edge_class, v2, v3); e3 = gts_edge_new (s->edge_class, v3, v4); e4 = gts_edge_new (s->edge_class, v4, v1); e5 = gts_edge_new (s->edge_class, v1, v3); box = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass), s->face_class, s->edge_class, s->vertex_class); gts_surface_add_face (box, gts_face_new (s->face_class, e1, e2, e5)); gts_surface_add_face (box, gts_face_new (s->face_class, e3, e4, e5)); /* build vertex and constraint list from the boundaries of the input surface s */ data[0] = s; data[1] = &constraints; gts_surface_foreach_edge (s, (GtsFunc) build_constraint_list, data); vertices = gts_vertices_from_segments (constraints); /* triangulate holes */ i = vertices; while (i) { g_assert (!gts_delaunay_add_vertex (box, i->data, NULL)); i = i->next; } g_slist_free (vertices); i = constraints; while (i) { g_assert (!gts_delaunay_add_constraint (box, i->data)); i = i->next; } /* destroy corners of the enclosing box */ gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (v1)); gts_object_destroy (GTS_OBJECT (v2)); gts_object_destroy (GTS_OBJECT (v3)); gts_object_destroy (GTS_OBJECT (v4)); gts_allow_floating_vertices = FALSE; /* remove parts of the mesh which are not holes */ i = constraints; while (i) { edge_mark_as_hole (i->data, box); i = i->next; } g_slist_free (constraints); /* remove marked and duplicate faces */ gts_surface_foreach_face_remove (box, (GtsFunc) face_is_marked, NULL); /* box now contains only the triangulated holes. */ return box; } int main (int argc, char * argv[]) { gboolean verbose = FALSE; gboolean triangulate_holes = TRUE; gboolean write_holes = FALSE; int c = 0; CartesianGrid * grid; guint line = 0; GtsSurface * s; GTimer * timer; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"holes", no_argument, NULL, 'H'}, {"keep", no_argument, NULL, 'k'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvHk", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvHk"))) { #endif /* not HAVE_GETOPT_LONG */ case 'H': /* holes */ write_holes = TRUE; break; case 'k': /* keep */ triangulate_holes = FALSE; break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: cartesian [OPTION] < FILE\n" "Triangulates vertices of a regular cartesian mesh\n" "(possibly containing holes)\n" "\n" " -k --keep keep holes\n" " -H --holes write holes only\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `cartesian --help' for more information.\n"); return 1; /* failure */ } } grid = cartesian_grid_read (gts_vertex_class (), &line); if (grid == NULL) { fprintf (stderr, "cartesian: file on standard input is not a valid cartesian grid\n" "error at line %u\n", line); return 1; } timer = g_timer_new (); g_timer_start (timer); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); cartesian_grid_triangulate (grid, s); if (triangulate_holes) { GtsSurface * holes = cartesian_grid_triangulate_holes (grid, s); if (write_holes) { gts_object_destroy (GTS_OBJECT (s)); s = holes; } else gts_surface_merge (s, holes); } g_timer_stop (timer); if (verbose) { gts_surface_print_stats (s, stderr); fprintf (stderr, "# Triangulation time: %g s speed: %.0f vertex/s\n", g_timer_elapsed (timer, NULL), gts_surface_vertex_number (s)/g_timer_elapsed (timer, NULL)); } gts_surface_write (s, stdout); return 0; /* success */ } gts-snapshot-121130/examples/happrox.c0000644000175100017510000004241612055775440014643 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include "config.h" #ifdef NETPBM_INCLUDE # include #else # include #endif #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" typedef enum { NUMBER, COST } StopOptions; static gboolean stop_number (gdouble cost, guint number, guint * max) { if (number >= *max) return TRUE; return FALSE; } static gboolean stop_number_log_cost (gdouble cost, guint number, guint * max) { if (number >= *max) return TRUE; fprintf (stderr, "%d %g\n", number, cost); return FALSE; } static gboolean stop_number_verbose (gdouble cost, guint number, guint * max) { static guint nmax = 0, nold = 0; static GTimer * timer = NULL, * total_timer = NULL; if (timer == NULL) { nmax = nold = number; timer = g_timer_new (); total_timer = g_timer_new (); g_timer_start (total_timer); } if (number != nold && number % 121 == 0 && number > nmax && nmax <= *max) { gdouble total_elapsed = g_timer_elapsed (total_timer, NULL); gdouble remaining; gdouble hours, mins, secs; gdouble hours1, mins1, secs1; g_timer_stop (timer); hours = floor (total_elapsed/3600.); mins = floor ((total_elapsed - 3600.*hours)/60.); secs = floor (total_elapsed - 3600.*hours - 60.*mins); remaining = total_elapsed*((*max - nmax)/(gdouble) (number - nmax) - 1.); hours1 = floor (remaining/3600.); mins1 = floor ((remaining - 3600.*hours1)/60.); secs1 = floor (remaining - 3600.*hours1 - 60.*mins1); fprintf (stderr, "\rVertices: %8u %3.0f%% %6.0f vertices/s " "Elapsed: %02.0f:%02.0f:%02.0f " "Remaining: %02.0f:%02.0f:%02.0f ", number, 100.*(number - nmax)/(*max - nmax), (number - nold)/g_timer_elapsed (timer, NULL), hours, mins, secs, hours1, mins1, secs1); fflush (stderr); nold = number; g_timer_start (timer); } if (number >= *max) { g_timer_destroy (timer); g_timer_destroy (total_timer); return TRUE; } return FALSE; } static gboolean stop_cost (gdouble cost, guint number, gdouble * min) { if (cost < *min) return TRUE; return FALSE; } static gboolean stop_cost_verbose (gdouble cost, guint number, gdouble * min) { if (number % 121 == 0) { fprintf (stderr, "\rVertices: %10u Cost: %10.2f ", number, cost); fflush (stderr); } if (cost < *min) return TRUE; return FALSE; } /* ListFace: Header */ typedef struct _ListFace ListFace; struct _ListFace { /*< private >*/ GtsListFace parent; /*< public >*/ GtsEHeap * heap; GtsEHeapPair * pair; GtsVertex * best; GtsVector p; }; typedef struct _ListFaceClass ListFaceClass; struct _ListFaceClass { /*< private >*/ GtsFaceClass parent_class; /*< public >*/ void (* cost_init) (ListFace *); }; #define LIST_FACE(obj) GTS_OBJECT_CAST (obj,\ ListFace,\ list_face_class ()) #define LIST_FACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ ListFaceClass,\ list_face_class()) #define IS_LIST_FACE(obj) (gts_object_is_from_class (obj,\ list_face_class ())) static ListFaceClass * list_face_class (void); /* ListFace: Object */ static void list_face_destroy (GtsObject * object) { ListFace * f = LIST_FACE (object); if (f->heap) { gts_eheap_remove (f->heap, f->pair); f->heap = NULL; } (* GTS_OBJECT_CLASS (list_face_class ())->parent_class->destroy) (object); } static void triangle_plane (GtsTriangle * f, GtsVector p) { GtsPoint * v1, * v2, * v3; gdouble x1, x2, y1, y2, det; v1 = GTS_POINT (GTS_SEGMENT (f->e1)->v1); v2 = GTS_POINT (GTS_SEGMENT (f->e1)->v2); v3 = GTS_POINT (gts_triangle_vertex (f)); x1 = v2->x - v1->x; y1 = v2->y - v1->y; x2 = v3->x - v1->x; y2 = v3->y - v1->y; det = x1*y2 - x2*y1; g_assert (det != 0.); p[0] = (y2*(v2->z - v1->z) - y1*(v3->z - v1->z))/det; p[1] = (-x2*(v2->z - v1->z) + x1*(v3->z - v1->z))/det; p[2] = ((- v1->x*y2 + v1->y*x2)*(v2->z - v1->z) + (- v1->y*x1 + v1->x*y1)*(v3->z - v1->z))/det + v1->z; } static void list_face_cost_init (ListFace * f) { triangle_plane (GTS_TRIANGLE (f), f->p); } static void list_face_class_init (ListFaceClass * klass) { GTS_OBJECT_CLASS (klass)->destroy = list_face_destroy; klass->cost_init = list_face_cost_init; } static ListFaceClass * list_face_class (void) { static ListFaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo list_face_info = { "ListFace", sizeof (ListFace), sizeof (ListFaceClass), (GtsObjectClassInitFunc) list_face_class_init, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_list_face_class ()), &list_face_info); } return klass; } typedef gdouble (*CostFunc) (ListFace *, GtsPoint *, gpointer); static void list_face_update (ListFace * f, gpointer * data) { if (IS_LIST_FACE (f)) { GSList * i = GTS_LIST_FACE (f)->points; GtsEHeap * heap = data[0]; CostFunc cost = data[1]; gpointer cost_data = data[2]; if (i) { gdouble maxerr = 0.; ListFaceClass * klass = LIST_FACE_CLASS (GTS_OBJECT (f)->klass); (* klass->cost_init) (f); f->best = NULL; while (i) { GtsPoint * v = i->data; gdouble e = (* cost) (f, v, cost_data); if (e > maxerr) { maxerr = e; f->best = GTS_VERTEX (v); } i = i->next; } if (f->heap) { gts_eheap_remove (f->heap, f->pair); f->heap = NULL; } if (maxerr > 0.) { f->pair = gts_eheap_insert_with_key (heap, f, - maxerr); f->heap = heap; } } } } static void list_face_clear_heap (ListFace * f) { f->heap = NULL; } static void surface_hf_refine (GtsSurface * s, CostFunc cost_func, gpointer cost_data, GtsStopFunc stop_func, gpointer stop_data) { GtsEHeap * heap; gdouble top_cost; guint nv = 4; GtsListFace * f; gpointer data[3]; g_return_if_fail (s != NULL); g_return_if_fail (cost_func != NULL); g_return_if_fail (stop_func != NULL); data[0] = heap = gts_eheap_new (NULL, NULL); data[1] = cost_func; data[2] = cost_data; gts_surface_foreach_face (s, (GtsFunc) list_face_update, data); while ((f = gts_eheap_remove_top (heap, &top_cost)) && !(*stop_func) (- top_cost, nv, stop_data)) { GtsVertex * v = LIST_FACE (f)->best; GSList * t, * i; LIST_FACE (f)->heap = NULL; gts_delaunay_add_vertex_to_face (s, v, GTS_FACE (f)); i = t = gts_vertex_triangles (v, NULL); while (i) { list_face_update (i->data, data); i = i->next; } g_slist_free (t); nv++; } if (f) LIST_FACE (f)->heap = NULL; gts_eheap_foreach (heap, (GFunc) list_face_clear_heap, NULL); gts_eheap_destroy (heap); } static void prepend (GtsListFace * f, gray ** g, guint i, guint j) { f->points = g_slist_prepend (f->points, gts_vertex_new (gts_vertex_class (), i, j, g[j][i])); } static void destroy_unused (GtsListFace * f) { g_slist_foreach (f->points, (GFunc) gts_object_destroy, NULL); g_slist_free (f->points); f->points = NULL; } static GtsSurface * happrox (gray ** g, gint width, gint height, CostFunc cost_func, gpointer cost_data, GtsStopFunc stop_func, gpointer stop_data) { GtsSurface * s = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (list_face_class ()), gts_edge_class (), gts_vertex_class ()); GtsVertex * v1 = gts_vertex_new (s->vertex_class, 0., 0., g[0][0]); GtsVertex * v2 = gts_vertex_new (s->vertex_class, 0., height - 1, g[height - 1][0]); GtsVertex * v3 = gts_vertex_new (s->vertex_class, width - 1, 0., g[0][width - 1]); GtsVertex * v4 = gts_vertex_new (s->vertex_class, width - 1, height - 1, g[height - 1][width - 1]); guint i, j; GSList * corners = NULL; GtsTriangle * t; GtsVertex * w1, * w2, * w3; GtsListFace * f; /* creates enclosing triangle */ corners = g_slist_prepend (corners, v1); corners = g_slist_prepend (corners, v2); corners = g_slist_prepend (corners, v3); corners = g_slist_prepend (corners, v4); t = gts_triangle_enclosing (gts_triangle_class (), corners, 100.); g_slist_free (corners); gts_triangle_vertices (t, &w1, &w2, &w3); f = GTS_LIST_FACE (gts_face_new (s->face_class, t->e1, t->e2, t->e3)); gts_surface_add_face (s, GTS_FACE (f)); /* add PGM vertices (corners excepted) to point list of f */ for (i = 1; i < width - 1; i++) { for (j = 1; j < height - 1; j++) prepend (f, g, i, j); prepend (f, g, i, 0); prepend (f, g, i, height - 1); } for (j = 1; j < height - 1; j++) { prepend (f, g, 0, j); prepend (f, g, width - 1, j); } pgm_freearray (g, height); /* add four corners to initial triangulation */ g_assert (gts_delaunay_add_vertex_to_face (s, v1, GTS_FACE (f)) == NULL); f = GTS_LIST_FACE (gts_point_locate (GTS_POINT (v2), s, NULL)); g_assert (gts_delaunay_add_vertex_to_face (s, v2, GTS_FACE (f)) == NULL); f = GTS_LIST_FACE (gts_point_locate (GTS_POINT (v3), s, NULL)); g_assert (gts_delaunay_add_vertex_to_face (s, v3, GTS_FACE (f)) == NULL); f = GTS_LIST_FACE (gts_point_locate (GTS_POINT (v4), s, NULL)); g_assert (gts_delaunay_add_vertex_to_face (s, v4, GTS_FACE (f)) == NULL); /* refine surface */ surface_hf_refine (s, cost_func, cost_data, stop_func, stop_data); /* destroy unused vertices */ gts_surface_foreach_face (s, (GtsFunc) destroy_unused, NULL); /* destroy enclosing triangle */ gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (w1)); gts_object_destroy (GTS_OBJECT (w2)); gts_object_destroy (GTS_OBJECT (w3)); gts_allow_floating_vertices = FALSE; return s; } static GtsSurface * happrox_list (GSList * points, gboolean keep_enclosing, gboolean closed, CostFunc cost_func, gpointer cost_data, GtsStopFunc stop_func, gpointer stop_data) { GtsSurface * s = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (list_face_class ()), gts_edge_class (), gts_vertex_class ()); GtsTriangle * t; GtsVertex * w1, * w2, * w3; GtsListFace * f; /* creates enclosing triangle */ t = gts_triangle_enclosing (gts_triangle_class (), points, 10.); gts_triangle_vertices (t, &w1, &w2, &w3); GTS_POINT (w1)->z = GTS_POINT (w2)->z = GTS_POINT (w3)->z = keep_enclosing ? -10. : -1e30; f = GTS_LIST_FACE (gts_face_new (s->face_class, t->e1, t->e2, t->e3)); gts_surface_add_face (s, GTS_FACE (f)); f->points = points; /* refine surface */ surface_hf_refine (s, cost_func, cost_data, stop_func, stop_data); /* destroy unused vertices */ gts_surface_foreach_face (s, (GtsFunc) destroy_unused, NULL); /* destroy enclosing triangle */ if (!keep_enclosing) { gts_allow_floating_vertices = TRUE; gts_object_destroy (GTS_OBJECT (w1)); gts_object_destroy (GTS_OBJECT (w2)); gts_object_destroy (GTS_OBJECT (w3)); gts_allow_floating_vertices = FALSE; } else if (closed) { GSList * l = gts_surface_boundary (s); GtsFace * f; g_assert (g_slist_length (l) == 3); f = gts_face_new (s->face_class, l->data, l->next->data, l->next->next->data); gts_surface_add_face (s, f); if (!gts_face_is_compatible (f, s)) gts_triangle_revert (GTS_TRIANGLE (f)); g_slist_free (l); gts_object_destroy (GTS_OBJECT (t)); } else gts_object_destroy (GTS_OBJECT (t)); return s; } static gdouble height_cost (ListFace * f, GtsPoint * p) { return fabs (p->x*f->p[0] + p->y*f->p[1] + f->p[2] - p->z); } static gdouble relative_height_cost (ListFace * f, GtsPoint * p, gdouble * z) { gdouble dz = p->x*f->p[0] + p->y*f->p[1] + f->p[2] - p->z; return fabs (p->z) < *z ? fabs (dz/(*z)) : fabs (dz/p->z); } int main (int argc, char * argv[]) { int c = 0; gboolean verbose = FALSE; GtsSurface * s; CostFunc cost_func = (CostFunc) height_cost; gpointer cost_data = NULL; GtsStopFunc stop_func = NULL; gpointer stop_data = NULL; StopOptions stop = NUMBER; guint number = 0; gdouble cmin = 0.0; gboolean logcost = FALSE; gboolean flat = FALSE; gdouble relative = 0.; gboolean keep_enclosing = FALSE; gboolean closed = FALSE; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"closed", no_argument, NULL, 'C'}, {"keep", no_argument, NULL, 'k'}, {"relative", required_argument, NULL, 'r'}, {"flat", no_argument, NULL, 'f'}, {"log", no_argument, NULL, 'l'}, {"number", required_argument, NULL, 'n'}, {"cost", required_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvn:c:lfr:kC", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvn:c:lfr:kC"))) { #endif /* not HAVE_GETOPT_LONG */ case 'C': /* closed */ closed = TRUE; keep_enclosing = TRUE; break; case 'k': /* keep */ keep_enclosing = TRUE; break; case 'r': /* relative */ cost_func = (CostFunc) relative_height_cost; relative = atof (optarg); cost_data = &relative; if (relative <= 0.) { fprintf (stderr, "happrox: argument for -r option must be strictly positive\n"); return 1; } break; case 'f': /* flat file */ flat = TRUE; break; case 'l': /* log cost */ logcost = TRUE; break; case 'n': /* stop by number */ stop = NUMBER; number = atoi (optarg); break; case 'c': /* stop by cost */ stop = COST; cmin = atof (optarg); break; case 'h': /* help */ fprintf (stderr, "Usage: happrox [OPTION]... < [input.pgm|input] > output.gts\n" "Returns a simplified triangulation of a set of points using\n" "algorithm III of Garland and Heckbert (1995).\n" "\n" " -n N, --number=N stop the refinement process if the number of\n" " vertices is larger than N\n" " -c C, --cost=C stop the refinement process if the cost of insertion\n" " of a vertex is smaller than C\n" " -f --flat input is a flat file with three x,y,z columns\n" " (default is PGM file)\n" " -r Z --relative=Z use relative height cost for all heights larger than Z\n" " -k --keep keep enclosing triangle\n" " -C --closed close the surface\n" " -l --log log evolution of cost\n" " -v, --verbose display surface statistics\n" " -h, --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; break; case 'v': verbose = TRUE; break; case '?': /* wrong options */ fprintf (stderr, "Try `happrox --help' for more information.\n"); return 1; } } switch (stop) { case NUMBER: if (verbose) stop_func = (GtsStopFunc) stop_number_verbose; else stop_func = (GtsStopFunc) stop_number; if (logcost) stop_func = (GtsStopFunc) stop_number_log_cost; stop_data = &number; break; case COST: if (verbose) stop_func = (GtsStopFunc) stop_cost_verbose; else stop_func = (GtsStopFunc) stop_cost; stop_data = &cmin; break; default: g_assert_not_reached (); } if (flat) { GSList * points = NULL; guint n = 0; gdouble x, y, z; while (scanf ("%lf %lf %lf", &x, &y, &z) == 3) { points = g_slist_prepend (points, gts_vertex_new (gts_vertex_class (), x, y, z)); n++; } if (verbose) fprintf (stderr, "happrox: %d vertices\n", n); s = happrox_list (points, keep_enclosing, closed, cost_func, cost_data, stop_func, stop_data); } else { gint width, height; gray ** g, maxgray; g = pgm_readpgm (stdin, &width, &height, &maxgray); if (verbose) fprintf (stderr, "happrox: width: %d height: %d maxgray: %d\n", width, height, maxgray); s = happrox (g, width, height, cost_func, cost_data, stop_func, stop_data); } if (verbose) { fputc ('\n', stderr); gts_surface_print_stats (s, stderr); } gts_surface_write (s, stdout); return 0; } gts-snapshot-121130/examples/refine.c0000644000175100017510000001605112055775440014426 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #ifndef PI #define PI 3.14159265359 #endif typedef enum { NUMBER, COST } StopOptions; static gboolean stop_number_verbose (gdouble cost, guint number, guint * max) { static guint nmax = 0, nold = 0; static GTimer * timer = NULL, * total_timer = NULL; g_return_val_if_fail (max != NULL, TRUE); if (timer == NULL) { nmax = nold = number; timer = g_timer_new (); total_timer = g_timer_new (); g_timer_start (total_timer); } if (number != nold && number % 1211 == 0 && number > nmax && nmax < *max) { gdouble total_elapsed = g_timer_elapsed (total_timer, NULL); gdouble remaining; gdouble hours, mins, secs; gdouble hours1, mins1, secs1; g_timer_stop (timer); hours = floor (total_elapsed/3600.); mins = floor ((total_elapsed - 3600.*hours)/60.); secs = floor (total_elapsed - 3600.*hours - 60.*mins); remaining = total_elapsed*((*max - nmax)/(gdouble) (number - nmax) - 1.); hours1 = floor (remaining/3600.); mins1 = floor ((remaining - 3600.*hours1)/60.); secs1 = floor (remaining - 3600.*hours1 - 60.*mins1); fprintf (stderr, "\rEdges: %10u %3.0f%% %6.0f edges/s " "Elapsed: %02.0f:%02.0f:%02.0f " "Remaining: %02.0f:%02.0f:%02.0f ", number, 100.*(number - nmax)/(*max - nmax), (number - nold)/g_timer_elapsed (timer, NULL), hours, mins, secs, hours1, mins1, secs1); fflush (stderr); nold = number; g_timer_start (timer); } if (number > *max) { g_timer_destroy (timer); g_timer_destroy (total_timer); return TRUE; } return FALSE; } static gboolean stop_number (gdouble cost, guint number, guint * max) { if (number > *max) return TRUE; return FALSE; } static gboolean stop_cost_verbose (gdouble cost, guint number, gdouble * min) { g_return_val_if_fail (min != NULL, TRUE); if (number % 511 == 0) { fprintf (stderr, "\rEdges: %10u Cost: %10g ", number, cost); fflush (stderr); } if (cost < *min) return TRUE; return FALSE; } static gboolean stop_cost (gdouble cost, guint number, gdouble * min) { if (cost < *min) return TRUE; return FALSE; } static gboolean stop_log_cost (gdouble cost, guint number) { fprintf (stderr, "%d %g\n", number, cost); return FALSE; } /* refine - produce a refined version of the input */ int main (int argc, char * argv[]) { GtsSurface * s; gboolean verbose = FALSE; gboolean log_cost = FALSE; guint number = 0; gdouble cmin = 0.0; StopOptions stop = NUMBER; GtsKeyFunc refine_func = NULL; GtsStopFunc stop_func = NULL; gpointer stop_data = NULL; int c = 0; GtsFile * fp; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, {"number", required_argument, NULL, 'n'}, {"cost", required_argument, NULL, 'c'}, {"log", no_argument, NULL, 'L'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvc:n:L", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvc:n:L"))) { #endif /* not HAVE_GETOPT_LONG */ case 'L': /* log */ log_cost = TRUE; break; case 'n': /* stop by number */ stop = NUMBER; number = atoi (optarg); break; case 'c': /* stop by cost */ stop = COST; cmin = atof (optarg); break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: refine [OPTION] < file.gts\n" "Construct a refineed version of the input.\n" "\n" " -n N, --number=N stop the refining process if the number of\n" " edges was to be greater than N\n" " -c C, --cost=C stop the refining process if the cost of refining\n" " an edge is smaller than C\n" " -L --log logs the evolution of the cost\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `refine --help' for more information.\n"); return 1; /* failure */ } } /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("refine: the file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } /* if verbose on print stats */ if (verbose) { gts_surface_print_stats (s, stderr); fprintf (stderr, "# volume: %g area: %g\n", gts_surface_volume (s), gts_surface_area (s)); } /* select the right refining process */ if (log_cost) stop_func = (GtsStopFunc) stop_log_cost; else { switch (stop) { case NUMBER: if (verbose) stop_func = (GtsStopFunc) stop_number_verbose; else stop_func = (GtsStopFunc) stop_number; stop_data = &number; break; case COST: if (verbose) stop_func = (GtsStopFunc) stop_cost_verbose; else stop_func = (GtsStopFunc) stop_cost; stop_data = &cmin; break; default: g_assert_not_reached (); } } gts_surface_refine (s, refine_func, NULL, NULL, NULL, stop_func, stop_data); /* if verbose on print stats */ if (verbose) { fputc ('\n', stderr); gts_surface_print_stats (s, stderr); fprintf (stderr, "# volume: %g area: %g\n", gts_surface_volume (s), gts_surface_area (s)); } /* write resulting surface to standard output */ gts_surface_write (s, stdout); return 0; /* success */ } gts-snapshot-121130/examples/smooth.c0000644000175100017510000001257712055775440014500 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" static void smooth_vertex (GtsVertex * v, gpointer * data) { GtsSurface * s = data[0]; if (!gts_vertex_is_boundary (v, s)) { gdouble * lambda = data[1]; GSList * vertices = gts_vertex_neighbors (v, NULL, s); GSList * i; GtsVector U0 = { 0., 0., 0.}; guint n = 0; i = vertices; while (i) { GtsPoint * p = i->data; U0[0] += p->x; U0[1] += p->y; U0[2] += p->z; n++; i = i->next; } g_slist_free (vertices); if (n > 0) { GTS_POINT (v)->x += (*lambda)*(U0[0]/n - GTS_POINT (v)->x); GTS_POINT (v)->y += (*lambda)*(U0[1]/n - GTS_POINT (v)->y); GTS_POINT (v)->z += (*lambda)*(U0[2]/n - GTS_POINT (v)->z); } } } static void smooth_fold (GtsVertex * v, gpointer * data) { gdouble * maxcosine2 = data[2]; GSList * i = v->segments; gboolean folded = FALSE; guint * nfold = data[3]; while (i && !folded) { if (GTS_IS_EDGE (i->data)) { GtsEdge * e = i->data; if (gts_triangles_are_folded (e->triangles, GTS_SEGMENT (e)->v1, GTS_SEGMENT (e)->v2, *maxcosine2)) folded = TRUE; } i = i->next; } if (folded) { (*nfold)++; smooth_vertex (v, data); } } int main (int argc, char * argv[]) { GtsSurface * s; GtsFile * fp; int c = 0; gboolean verbose = FALSE; guint n, niter; gdouble lambda; gpointer data[4]; gboolean fold = FALSE; gdouble maxcosine2 = 0.; guint nfold = 1; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"fold", required_argument, NULL, 'f'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvf:", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvf:"))) { #endif /* not HAVE_GETOPT_LONG */ case 'f': /* fold */ fold = TRUE; maxcosine2 = cos (atof (optarg)*3.14159265359/180.); maxcosine2 *= maxcosine2; break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: smooth [OPTION] LAMBDA NITER < file.gts > smooth.gts\n" "Smooth a GTS file by applying NITER iterations of a Laplacian filter\n" "of parameter LAMBDA.\n" "\n" " -f VAL --fold=VAL smooth only folds\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `smooth --help' for more information.\n"); return 1; /* failure */ } } if (optind >= argc) { /* missing lambda */ fprintf (stderr, "smooth: missing LAMBDA\n" "Try `smooth --help' for more information.\n"); return 1; /* failure */ } lambda = atof (argv[optind++]); if (optind >= argc) { /* missing niter */ fprintf (stderr, "smooth: missing NITER\n" "Try `smooth --help' for more information.\n"); return 1; /* failure */ } niter = atoi (argv[optind++]); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("smooth: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } if (verbose) gts_surface_print_stats (s, stderr); data[0] = s; data[1] = λ data[2] = &maxcosine2; data[3] = &nfold; for (n = 1; n <= niter && (!fold || nfold > 0); n++) { if (fold) { nfold = 0; gts_surface_foreach_vertex (s, (GtsFunc) smooth_fold, data); } else gts_surface_foreach_vertex (s, (GtsFunc) smooth_vertex, data); if (verbose) fprintf (stderr, "\rIteration: %10u %3.0f%% ", n, 100.*n/niter); } if (verbose) { fputc ('\n', stderr); gts_surface_print_stats (s, stderr); } gts_surface_write (s, stdout); return 0; } gts-snapshot-121130/examples/oocs.c0000644000175100017510000000537412055775440014127 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "gts.h" int main (int argc, char * argv[]) { GtsSurface * s; GtsBBox * bbox; gdouble delta; GtsPoint * p1, * p2, * p3; guint nt; GtsRange cluster_stats; GtsClusterGrid * cluster_grid; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); if (argc != 2) { fprintf (stderr, "usage: oocs DELTA < infile > outfile\n"); return 1; } s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); bbox = gts_bbox_new (gts_bbox_class (), s, 0., 0., 0., 0., 0., 0.); scanf ("%u", &nt); scanf ("%lf %lf %lf", &bbox->x1, &bbox->y1, &bbox->z1); scanf ("%lf %lf %lf", &bbox->x2, &bbox->y2, &bbox->z2); delta = atof (argv[1])*sqrt (gts_bbox_diagonal2 (bbox)); cluster_grid = gts_cluster_grid_new (gts_cluster_grid_class (), gts_cluster_class (), s, bbox, delta); p1 = gts_point_new (gts_point_class (), 0., 0., 0.); p2 = gts_point_new (gts_point_class (), 0., 0., 0.); p3 = gts_point_new (gts_point_class (), 0., 0., 0.); while (scanf ("%lf %lf %lf", &p1->x, &p1->y, &p1->z) == 3 && scanf ("%lf %lf %lf", &p2->x, &p2->y, &p2->z) == 3 && scanf ("%lf %lf %lf", &p3->x, &p3->y, &p3->z) == 3) gts_cluster_grid_add_triangle (cluster_grid, p1, p2, p3, NULL); cluster_stats = gts_cluster_grid_update (cluster_grid); gts_object_destroy (GTS_OBJECT (p1)); gts_object_destroy (GTS_OBJECT (p2)); gts_object_destroy (GTS_OBJECT (p3)); gts_object_destroy (GTS_OBJECT (cluster_grid)); fprintf (stderr, "Initial number of triangles: %u\n", nt); fprintf (stderr, "%d clusters of size: min: %g avg: %.1f|%.1f max: %g\n", cluster_stats.n, cluster_stats.min, cluster_stats.mean, cluster_stats.stddev, cluster_stats.max); gts_surface_print_stats (s, stderr); gts_surface_write (s, stdout); return 0; } gts-snapshot-121130/examples/Makefile.am0000644000175100017510000000112012055775440015035 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\ -DG_LOG_DOMAIN=\"Gts-examples\" LDADD = $(top_builddir)/src/libgts.la -lm DEPS = $(top_builddir)/src/libgts.la EXTRA_PROGRAMS = happrox happrox_LDADD = $(LDADD) -lnetpbm if HAS_NETPBM NETPBM_EXTRA = happrox endif bin_PROGRAMS = \ transform \ delaunay \ $(NETPBM_EXTRA) noinst_PROGRAMS = \ set \ volume \ cleanup \ coarsen \ refine \ iso \ gtstoc \ oocs \ partition \ traverse \ cartesian \ split \ smooth \ sphere \ stripe \ optimize \ merge gts-snapshot-121130/examples/split.c0000644000175100017510000000710112055775440014305 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" /* split - splits a surface into connected and manifold components */ int main (int argc, char * argv[]) { GtsSurface * s = NULL; int c = 0; GtsFile * fp; gboolean verbose = FALSE; gchar fname[] = "component"; guint ncomp = 0; GSList * i; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hv", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hv"))) { #endif /* not HAVE_GETOPT_LONG */ case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: split [OPTION] [FNAME] < FILE\n" "Splits the GTS surface into connected and manifold components.\n" "FNAME is the base name of the components created (default is `component').\n" "\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `split --help' for more information.\n"); return 1; /* failure */ } } if (optind < argc) strcpy (fname, argv[optind]); /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("split: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } /* if verbose on print stats */ if (verbose) gts_surface_print_stats (s, stderr); i = gts_surface_split (s); while (i) { gchar name[80]; FILE * fp; sprintf (name, "%s.%d.gts", fname, ncomp++); fp = fopen (name, "wt"); if (fp == NULL) { fprintf (stderr, "split: cannot open file `%s'.\n", name); exit (1); } gts_surface_write (i->data, fp); fclose (fp); if (verbose) { fprintf (stderr, "# Component %d\n", ncomp - 1); gts_surface_print_stats (i->data, stderr); } i = i->next; } return 0; /* success */ } gts-snapshot-121130/examples/traverse.c0000644000175100017510000001634212055775440015014 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" GtsRange depth_range; /* Colormap definition */ typedef struct { GPtrArray * colors; gboolean reversed; } Colormap; Colormap * colormap = NULL; static GtsColor * color_new (gdouble r, gdouble g, gdouble b) { GtsColor * c = g_malloc (sizeof (GtsColor)); c->r = r; c->g = g; c->b = b; return c; } static Colormap * colormap_read (FILE * fptr) { Colormap * cmap = g_malloc (sizeof (Colormap)); GtsColor c; cmap->reversed = FALSE; cmap->colors = g_ptr_array_new (); while (fscanf (fptr, "%f %f %f", &c.r, &c.g, &c.b) == 3) g_ptr_array_add (cmap->colors, color_new (c.r/255., c.g/255., c.b/255.)); return cmap; } static Colormap * colormap_red_blue (void) { Colormap * cmap = g_malloc (sizeof (Colormap)); cmap->reversed = FALSE; cmap->colors = g_ptr_array_new (); g_ptr_array_add (cmap->colors, color_new (1.0, 0.0, 0.0)); g_ptr_array_add (cmap->colors, color_new (0.0, 0.0, 1.0)); return cmap; } static GtsColor colormap_color (Colormap * cmap, gdouble val) { GtsColor c = {1., 1., 1.}, * c1, * c2; guint i, n; gdouble coef; g_return_val_if_fail (cmap != NULL, c); if (val > 1.0) val = 1.0; else if (val < 0.0) val = 0.0; if (cmap->reversed) val = 1.0 - val; n = cmap->colors->len; if (n == 0) return c; if (n == 1) return *((GtsColor *)cmap->colors->pdata[0]); i = floor((gdouble)val*(gdouble)(n - 1)); if (i == n - 1) return *((GtsColor *)cmap->colors->pdata[cmap->colors->len - 1]); coef = val*(gdouble)(n - 1) - (gdouble)i; c1 = cmap->colors->pdata[i]; c2 = cmap->colors->pdata[i+1]; c.r = c1->r + coef*(c2->r - c1->r); c.g = c1->g + coef*(c2->g - c1->g); c.b = c1->b + coef*(c2->b - c1->b); return c; } /* New Face class definition */ typedef struct _DepthFace DepthFace; typedef struct _DepthFaceClass DepthFaceClass; struct _DepthFace { GtsFaceClass face; guint depth; }; struct _DepthFaceClass { GtsFaceClass parent_class; }; #define DEPTH_FACE(obj) GTS_OBJECT_CAST (obj,\ DepthFace,\ depth_face_class ()) #define DEPTH_FACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ DepthFaceClass,\ depth_face_class()) #define IS_DEPTH_FACE(obj) (gts_object_is_from_class (obj,\ depth_face_class ())) DepthFaceClass * depth_face_class (void); static GtsColor depth_face_color (GtsObject * object) { guint depth = DEPTH_FACE (object)->depth; return colormap_color (colormap, (gdouble) depth/depth_range.max); } static void depth_face_class_init (DepthFaceClass * klass) { /* overload color definition */ GTS_OBJECT_CLASS (klass)->color = depth_face_color; } static void depth_face_init (DepthFace * dface) { dface->depth = 0; } DepthFaceClass * depth_face_class (void) { static DepthFaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo depth_face_info = { "DepthFace", sizeof (DepthFace), sizeof (DepthFaceClass), (GtsObjectClassInitFunc) depth_face_class_init, (GtsObjectInitFunc) depth_face_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_face_class ()), &depth_face_info); } return klass; } /* main functions */ static void pick_first_face (GtsFace * f, GtsFace ** first) { if (*first == NULL) *first = f; } int main (int argc, char * argv[]) { GtsSurface * s; GtsFile * fp; GtsFace * first = NULL; int c = 0; gboolean verbose = FALSE; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); colormap = colormap_red_blue (); /* default */ /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"cmap", required_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvc:", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvc:"))) { #endif /* not HAVE_GETOPT_LONG */ case 'c': { /* cmap */ FILE * fptr = fopen (optarg, "rt"); if (!fptr) { fprintf (stderr, "traverse: cannot open colormap file `%s'.\n", optarg); return 1; } colormap = colormap_read (fptr); fclose (fptr); break; } case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: traverse [OPTION] < file.gts > file.oogl\n" "Output an OOGL (geomview) surface colored according to the (graph) distance\n" "from a random face to the others\n" "\n" " -c FILE --cmap=FILE load FILE as colormap\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `traverse --help' for more information.\n"); return 1; /* failure */ } } s = gts_surface_new (gts_surface_class (), GTS_FACE_CLASS (depth_face_class ()), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("traverse: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } if (verbose) gts_surface_print_stats (s, stderr); gts_surface_foreach_face (s, (GtsFunc) pick_first_face, &first); gts_range_init (&depth_range); if (first) { GtsSurfaceTraverse * t = gts_surface_traverse_new (s, first); GtsFace * f; guint level; while ((f = gts_surface_traverse_next (t, &level))) { DEPTH_FACE (f)->depth = level; gts_range_add_value (&depth_range, level); } gts_surface_traverse_destroy (t); } gts_range_update (&depth_range); if (verbose) { fputs ("distance: ", stderr); gts_range_print (&depth_range, stderr); fputc ('\n', stderr); } gts_surface_write_oogl (s, stdout); return 0; } gts-snapshot-121130/examples/iso.c0000644000175100017510000001501312055775440013745 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #ifndef PI # define PI 3.14159265359 #endif static void sphere (gdouble ** f, GtsCartesianGrid g, guint k, gpointer data) { gdouble x, y, z = g.z; guint i, j; for (i = 0, x = g.x; i < g.nx; i++, x += g.dx) for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) f[i][j] = x*x + y*y + z*z; } /* The Clebsch diagonal surface: a smooth cubic surface admitting the * symmetry of the tetrahedron (courtesy Johannes Beigel). */ static void clebsch (gdouble ** f, GtsCartesianGrid g, guint k, gpointer data) { gdouble x, y, z = g.z; guint i, j; gdouble w2 = sqrt (2.0); for (i = 0, x = g.x; i < g.nx; i++, x += g.dx) for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) { /* tetrahedral coordinates */ gdouble p = 1. - z - w2*x; gdouble q = 1. - z + w2*x; gdouble r = 1. + z + w2*y; gdouble s = 1. + z - w2*y; /* symmetric polynomials */ gdouble c1 = p + q + r - s; gdouble c2 = p*p*p + q*q*q + r*r*r - s*s*s; f[i][j] = c2 - c1*c1*c1; } } /* The Barth decic: a degree 10 surface with 345 ordinary double points. * (courtesy Johannes Beigel again). */ static void barth (gdouble ** f, GtsCartesianGrid g, guint k, gpointer data) { gdouble x, y, z = g.z; guint i, j; gdouble t = (1. + sqrt(5.))/2.; for (i = 0, x = g.x; i < g.nx; i++, x += g.dx) for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) { gdouble t4 = t*t*t*t; gdouble p1 = x*x - t4*y*y; gdouble p2 = y*y - t4*z*z; gdouble p3 = z*z - t4*x*x; gdouble p4 = x*x*x*x + y*y*y*y + z*z*z*z - 2.*x*x*y*y - 2.*y*y*z*z - 2.*x*x*z*z; gdouble tmp = x*x + y*y + z*z - 1.; gdouble q1 = tmp*tmp; gdouble tmp1 = x*x + y*y + z*z - (2. - t); gdouble q2 = tmp1*tmp1; f[i][j] = 8.*p1*p2*p3*p4 + (3. + 5.*t)*q1*q2; } } /* Returns isosurface f(x, y, z) = iso with f(x, y, z) = x*x + y*y + z*z. */ int main (int argc, char * argv[]) { int c = 0; GtsCartesianGrid g; GtsSurface * surface; gdouble iso; gboolean verbose = FALSE, tetra = FALSE, dual = FALSE; GtsIsoCartesianFunc func = sphere; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"dual", no_argument, NULL, 'd'}, {"tetra", no_argument, NULL, 't'}, {"barth", no_argument, NULL, 'b'}, {"clebsch", no_argument, NULL, 'c'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvbctd", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvbctd"))) { #endif /* not HAVE_GETOPT_LONG */ case 'd': /* dual */ dual = TRUE; break; case 't': /* tetra */ tetra = TRUE; break; case 'b': /* Barth function */ func = barth; break; case 'c': /* Clebsch function */ func = clebsch; break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: iso [OPTION] NX NY NZ VAL > file.gts\n" "Compute the isosurface of various functions (default is a sphere).\n" "The size of the cartesian mesh is given by NX, NY and NZ and the isosurface value by VAL.\n" "\n" " -b --barth use the Barth decic function\n" " -c --clebsch use the Clebsch function\n" " -t --tetra use marching tetrahedra (default is marching cubes)\n" " -d --dual use \"dual\" marching tetrahedra\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `iso --help' for more information.\n"); return 1; /* failure */ } } if (optind >= argc) { /* missing NX */ fprintf (stderr, "iso: missing NX\n" "Try `iso --help' for more information.\n"); return 1; /* failure */ } g.nx = atoi (argv[optind]); if (optind + 1 >= argc) { /* missing NY */ fprintf (stderr, "iso: missing NY\n" "Try `iso --help' for more information.\n"); return 1; /* failure */ } g.ny = atoi (argv[optind + 1]); if (optind + 2 >= argc) { /* missing NZ */ fprintf (stderr, "iso: missing NZ\n" "Try `iso --help' for more information.\n"); return 1; /* failure */ } g.nz = atoi (argv[optind + 2]); if (optind + 3 >= argc) { /* missing VAL */ fprintf (stderr, "iso: missing VAL\n" "Try `iso --help' for more information.\n"); return 1; /* failure */ } iso = atof (argv[optind + 3]); /* interval is [-10:10][-10:10][-10:10] */ g.x = -10.0; g.dx = 20./(gdouble) (g.nx - 1); g.y = -10.0; g.dy = 20./(gdouble) (g.ny - 1); g.z = -10.0; g.dz = 20./(gdouble) (g.nz - 1); surface = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); if (tetra) gts_isosurface_tetra (surface, g, func, NULL, iso); else if (dual) gts_isosurface_tetra_bcl (surface, g, func, NULL, iso); else gts_isosurface_cartesian (surface, g, func, NULL, iso); if (verbose) gts_surface_print_stats (surface, stderr); gts_surface_write (surface, stdout); return 0; } gts-snapshot-121130/examples/set.c0000644000175100017510000002521012055775440013746 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" static void write_edge (GtsSegment * s, FILE * fp) { fprintf (fp, "VECT 1 2 0 2 0 %g %g %g %g %g %g\n", GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z); } /* set - compute set operations between surfaces */ int main (int argc, char * argv[]) { GtsSurface * s1, * s2, * s3; GtsSurfaceInter * si; GNode * tree1, * tree2; FILE * fptr; GtsFile * fp; int c = 0; gboolean verbose = TRUE; gboolean inter = FALSE; gboolean check_self_intersection = FALSE; gchar * operation, * file1, * file2; gboolean closed = TRUE, is_open1, is_open2; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"inter", no_argument, NULL, 'i'}, {"self", no_argument, NULL, 's'}, {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvis", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvis"))) { #endif /* not HAVE_GETOPT_LONG */ case 's': /* self */ check_self_intersection = TRUE; break; case 'i': /* inter */ inter = TRUE; break; case 'v': /* verbose */ verbose = FALSE; break; case 'h': /* help */ fprintf (stderr, "Usage: set [OPTION] OPERATION FILE1 FILE2\n" "Compute set operations between surfaces, where OPERATION is either.\n" "union, inter, diff, all.\n" "\n" " -i --inter output an OOGL (Geomview) representation of the curve\n" " intersection of the surfaces\n" " -s --self checks that the surfaces are not self-intersecting\n" " if one of them is, the set of self-intersecting faces\n" " is written (as a GtsSurface) on standard output\n" " -v --verbose do not print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `set --help' for more information.\n"); return 1; /* failure */ } } if (optind >= argc) { /* missing OPERATION */ fprintf (stderr, "set: missing OPERATION\n" "Try `set --help' for more information.\n"); return 1; /* failure */ } operation = argv[optind++]; if (optind >= argc) { /* missing FILE1 */ fprintf (stderr, "set: missing FILE1\n" "Try `set --help' for more information.\n"); return 1; /* failure */ } file1 = argv[optind++]; if (optind >= argc) { /* missing FILE2 */ fprintf (stderr, "set: missing FILE2\n" "Try `set --help' for more information.\n"); return 1; /* failure */ } file2 = argv[optind++]; /* open first file */ if ((fptr = fopen (file1, "rt")) == NULL) { fprintf (stderr, "set: can not open file `%s'\n", file1); return 1; } /* reads in first surface file */ s1 = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (gts_surface_class ()))); fp = gts_file_new (fptr); if (gts_surface_read (s1, fp)) { fprintf (stderr, "set: `%s' is not a valid GTS surface file\n", file1); fprintf (stderr, "%s:%d:%d: %s\n", file1, fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); fclose (fptr); /* open second file */ if ((fptr = fopen (file2, "rt")) == NULL) { fprintf (stderr, "set: can not open file `%s'\n", file2); return 1; } /* reads in second surface file */ s2 = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (gts_surface_class ()))); fp = gts_file_new (fptr); if (gts_surface_read (s2, fp)) { fprintf (stderr, "set: `%s' is not a valid GTS surface file\n", file2); fprintf (stderr, "%s:%d:%d: %s\n", file2, fp->line, fp->pos, fp->error); return 1; } gts_file_destroy (fp); fclose (fptr); /* display summary information about both surfaces */ if (verbose) { gts_surface_print_stats (s1, stderr); gts_surface_print_stats (s2, stderr); } /* check that the surfaces are orientable manifolds */ if (!gts_surface_is_orientable (s1)) { fprintf (stderr, "set: surface `%s' is not an orientable manifold\n", file1); return 1; } if (!gts_surface_is_orientable (s2)) { fprintf (stderr, "set: surface `%s' is not an orientable manifold\n", file2); return 1; } /* check that the surfaces are not self-intersecting */ if (check_self_intersection) { GtsSurface * self_intersects; self_intersects = gts_surface_is_self_intersecting (s1); if (self_intersects != NULL) { fprintf (stderr, "set: surface `%s' is self-intersecting\n", file1); if (verbose) gts_surface_print_stats (self_intersects, stderr); gts_surface_write (self_intersects, stdout); gts_object_destroy (GTS_OBJECT (self_intersects)); return 1; } self_intersects = gts_surface_is_self_intersecting (s2); if (self_intersects != NULL) { fprintf (stderr, "set: surface `%s' is self-intersecting\n", file2); if (verbose) gts_surface_print_stats (self_intersects, stderr); gts_surface_write (self_intersects, stdout); gts_object_destroy (GTS_OBJECT (self_intersects)); return 1; } } /* build bounding box tree for first surface */ tree1 = gts_bb_tree_surface (s1); is_open1 = gts_surface_volume (s1) < 0. ? TRUE : FALSE; /* build bounding box tree for second surface */ tree2 = gts_bb_tree_surface (s2); is_open2 = gts_surface_volume (s2) < 0. ? TRUE : FALSE; si = gts_surface_inter_new (gts_surface_inter_class (), s1, s2, tree1, tree2, is_open1, is_open2); g_assert (gts_surface_inter_check (si, &closed)); if (!closed) { fprintf (stderr, "set: the intersection of `%s' and `%s' is not a closed curve\n", file1, file2); return 1; } s3 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); if (!strcmp (operation, "union")) { gts_surface_inter_boolean (si, s3, GTS_1_OUT_2); gts_surface_inter_boolean (si, s3, GTS_2_OUT_1); } else if (!strcmp (operation, "inter")) { gts_surface_inter_boolean (si, s3, GTS_1_IN_2); gts_surface_inter_boolean (si, s3, GTS_2_IN_1); } else if (!strcmp (operation, "diff")) { gts_surface_inter_boolean (si, s3, GTS_1_OUT_2); gts_surface_inter_boolean (si, s3, GTS_2_IN_1); gts_surface_foreach_face (si->s2, (GtsFunc) gts_triangle_revert, NULL); gts_surface_foreach_face (s2, (GtsFunc) gts_triangle_revert, NULL); } else if (!strcmp (operation, "all")) { GtsSurface * s1out2, * s1in2, * s2out1, * s2in1; FILE * fp; s1out2 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); s1in2 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); s2out1 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); s2in1 = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); gts_surface_inter_boolean (si, s1out2, GTS_1_OUT_2); gts_surface_inter_boolean (si, s1in2, GTS_1_IN_2); gts_surface_inter_boolean (si, s2out1, GTS_2_OUT_1); gts_surface_inter_boolean (si, s2in1, GTS_2_IN_1); fp = fopen ("s1out2.gts", "w"); gts_surface_write (s1out2, fp); fclose (fp); fp = fopen ("s1in2.gts", "w"); gts_surface_write (s1in2, fp); fclose (fp); fp = fopen ("s2out1.gts", "w"); gts_surface_write (s2out1, fp); fclose (fp); fp = fopen ("s2in1.gts", "w"); gts_surface_write (s2in1, fp); fclose (fp); gts_object_destroy (GTS_OBJECT (s1out2)); gts_object_destroy (GTS_OBJECT (s1in2)); gts_object_destroy (GTS_OBJECT (s2out1)); gts_object_destroy (GTS_OBJECT (s2in1)); } else { fprintf (stderr, "set: operation `%s' unknown\n" "Try `set --help' for more information.\n", operation); return 1; } /* check that the resulting surface is not self-intersecting */ if (check_self_intersection) { GtsSurface * self_intersects; self_intersects = gts_surface_is_self_intersecting (s3); if (self_intersects != NULL) { fprintf (stderr, "set: the resulting surface is self-intersecting\n"); if (verbose) gts_surface_print_stats (self_intersects, stderr); gts_surface_write (self_intersects, stdout); gts_object_destroy (GTS_OBJECT (self_intersects)); return 1; } } /* display summary information about the resulting surface */ if (verbose) gts_surface_print_stats (s3, stderr); /* write resulting surface to standard output */ if (inter) { printf ("LIST {\n"); g_slist_foreach (si->edges, (GFunc) write_edge, stdout); printf ("}\n"); } else { GTS_POINT_CLASS (gts_vertex_class ())->binary = TRUE; gts_surface_write (s3, stdout); } /* destroy surfaces */ gts_object_destroy (GTS_OBJECT (s1)); gts_object_destroy (GTS_OBJECT (s2)); gts_object_destroy (GTS_OBJECT (s3)); gts_object_destroy (GTS_OBJECT (si)); /* destroy bounding box trees (including bounding boxes) */ gts_bb_tree_destroy (tree1, TRUE); gts_bb_tree_destroy (tree2, TRUE); return 0; } gts-snapshot-121130/examples/stripe.c0000644000175100017510000001163112055775440014463 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" /* stripe - Turns the input surface into triangle strips and outputs a Geomview representation of the result. */ int main (int argc, char * argv[]) { GtsSurface * s; GSList * strips = NULL, * i; gboolean verbose = FALSE; int c = 0; GtsFile * fp; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hv", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hv"))) { #endif /* not HAVE_GETOPT_LONG */ case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: stripe [OPTION] < FILE\n" "Turns the input surface into triangle strips and outputs a\n" "Geomview representation of the result.\n" "\n" " -v --verbose print statistics about the surface and strips\n" " -h --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `stripe --help' for more information.\n"); return 1; /* failure */ } } /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("stripe: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } gts_file_destroy (fp); if (verbose) gts_surface_print_stats (s, stderr); strips = gts_surface_strip (s); /* if verbose on print stats */ if (verbose) { GtsRange l; gts_range_init (&l); i = strips; while (i) { gts_range_add_value (&l, g_slist_length (i->data)); i = i->next; } gts_range_update (&l); fprintf (stderr, "# Strips: %d\n# length : ", l.n); gts_range_print (&l, stderr); fputc ('\n', stderr); } puts ("LIST {\n"); i = strips; while (i) { GList * j = i->data; GtsTriangle * oldt = NULL; GtsColor c; c.r = rand ()/(gdouble) RAND_MAX; c.g = rand ()/(gdouble) RAND_MAX; c.b = rand ()/(gdouble) RAND_MAX; while (j) { GtsTriangle * t = j->data; GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1), * p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2), * p3 = GTS_POINT (gts_triangle_vertex (t)); printf ("OFF 3 1 3\n%g %g %g\n%g %g %g\n%g %g %g\n3 0 1 2 %g %g %g\n", p1->x, p1->y, p1->z, p2->x, p2->y, p2->z, p3->x, p3->y, p3->z, c.r, c.g, c.b); if (oldt) { GtsSegment * cs = GTS_SEGMENT (gts_triangles_common_edge (t, oldt)); GtsPoint * op1 = GTS_POINT (GTS_SEGMENT (oldt->e1)->v1), * op2 = GTS_POINT (GTS_SEGMENT (oldt->e1)->v2), * op3 = GTS_POINT (gts_triangle_vertex (oldt)); printf ("VECT 1 3 0 3 0 %g %g %g %g %g %g %g %g %g\n", (op1->x + op2->x + op3->x)/3., (op1->y + op2->y + op3->y)/3., (op1->z + op2->z + op3->z)/3., (GTS_POINT (cs->v1)->x + GTS_POINT (cs->v2)->x)/2., (GTS_POINT (cs->v1)->y + GTS_POINT (cs->v2)->y)/2., (GTS_POINT (cs->v1)->z + GTS_POINT (cs->v2)->z)/2., (p1->x + p2->x + p3->x)/3., (p1->y + p2->y + p3->y)/3., (p1->z + p2->z + p3->z)/3.); } oldt = t; j = j->next; } i = i->next; } puts ("}\n"); return 0; /* success */ } gts-snapshot-121130/examples/partition.c0000644000175100017510000001530312055775440015166 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" static GtsColor default_face_color = { 1., 1., 1.}; static GtsColor random_color (void) { GtsColor c; c.r = rand ()/(gfloat) RAND_MAX; c.g = rand ()/(gfloat) RAND_MAX; c.b = rand ()/(gfloat) RAND_MAX; return c; } static GtsColor face_color (GtsObject * o) { return default_face_color; } static gint compare_line (GtsNGNode * n1, GtsNGNode * n2) { if (n1->id < n2->id) return -1; return 1; } static void create_heap (GtsGNode * n, GtsHeap * heap) { gts_heap_insert (heap, n); } int main (int argc, char * argv[]) { GtsSurface * s; GtsGraph * g; GtsFile * fp; guint np; guint nmin = 100; guint mmax = 50; guint ntry = 10; GSList * partition; int c = 0; gboolean verbose = FALSE; gfloat imbalance = 0.1; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, {"try", required_argument, NULL, 't'}, {"mmax", required_argument, NULL, 'm'}, {"nmin", required_argument, NULL, 'n'}, {"imbalance", required_argument, NULL, 'i'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hvt:m:n:i:", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hvt:m:n:i:"))) { #endif /* not HAVE_GETOPT_LONG */ case 'i': /* imbalance */ imbalance = atof (optarg); break; case 't': /* try */ ntry = atoi (optarg); break; case 'm': /* mmax */ mmax = atoi (optarg); break; case 'n': /* nmin */ nmin = atoi (optarg); break; case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: partition [OPTION] N < FILE\n" "Partition the graph defined by FILE into 2^N parts using recursive multilevel\n" "bisection.\n" "FILE can be either a GTS file or a GRAPH file (Jostle graph format).\n" "For GTS input the output is a OOGL (Geomview) description of the partitions.\n" "For GRAPH input the output is a graph partition (.ptn format) as defined in\n" "\"The Graph Partitioning Archive\" (http://www.gre.ac.uk/~c.walshaw/partition/).\n" "\n" " -t N --try=N number of tries for graph growing (default 10)\n" " -m N --mmax=N number of unsuccessful moves for Kernighan-Lin (default 50)\n" " -n N --nmin=N minimum number of nodes on coarsest graph (default 100)\n" " -i I --imbalance=I relative imbalance (default is 0.1)\n" " -v --verbose print statistics about the graph and partition\n" " -h --help display this help and exit\n" "\n" "Reports bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `partition --help' for more information.\n"); return 1; /* failure */ } } if (optind >= argc) { /* missing N */ fprintf (stderr, "partition: missing N\n" "Try `partition --help' for more information.\n"); return 1; /* failure */ } np = atoi (argv[optind]); s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { GtsFile * fp1; gts_object_destroy (GTS_OBJECT (s)); s = NULL; rewind (stdin); fp1 = gts_file_new (stdin); g = gts_graph_new (GTS_GRAPH_CLASS (gts_wgraph_class ()), gts_gnode_class (), gts_gedge_class ()); if (gts_graph_read_jostle (g, fp1)) { fputs ("partition: file on standard input is neither a valid GTS file nor a valid GRAPH file\n", stderr); fprintf (stderr, "GTS stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); fprintf (stderr, "GRAPH stdin:%d:%d: %s\n", fp1->line, fp1->pos, fp1->error); return 1; /* failure */ } } else { g = gts_surface_graph_new (GTS_GRAPH_CLASS (gts_wgraph_class ()), s); if (verbose) gts_surface_print_stats (s, stderr); } if (verbose) gts_graph_print_stats (g, stderr); partition = gts_graph_recursive_bisection (GTS_WGRAPH (g), np, ntry, mmax, nmin, imbalance); if (verbose) gts_graph_partition_print_stats (partition, stderr); if (s) { GSList * i; printf ("LIST {\n"); GTS_OBJECT_CLASS (gts_face_class ())->color = face_color; i = partition; while (i) { GtsSurface * s1 = gts_surface_graph_surface (i->data, s); gts_surface_write_oogl_boundary (s1, stdout); default_face_color = random_color (); gts_surface_write_oogl (s1, stdout); gts_object_destroy (GTS_OBJECT (s1)); i = i->next; } printf ("}\n"); } else { GSList * i = partition; guint np = 0; GtsHeap * heap; GtsGNode * n; while (i) { GTS_OBJECT (i->data)->reserved = GUINT_TO_POINTER (np++); i = i->next; } heap = gts_heap_new ((GCompareFunc) compare_line); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) create_heap, heap); while ((n = gts_heap_remove_top (heap))) { GSList * j = partition; GtsGraph * own = NULL; while (j && !own) { if (gts_containee_is_contained (GTS_CONTAINEE (n), j->data)) own = j->data; j = j->next; } g_assert (own); printf ("%d\n", GPOINTER_TO_UINT (GTS_OBJECT (own)->reserved)); } gts_heap_destroy (heap); } return 0; } gts-snapshot-121130/examples/optimize.c0000644000175100017510000001753712055775440015030 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "config.h" #ifdef HAVE_GETOPT_H # include #endif /* HAVE_GETOPT_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "gts.h" #define HEAP_INSERT_EDGE(h, e) (GTS_OBJECT (e)->reserved = gts_eheap_insert (h, e)) #define HEAP_REMOVE_EDGE(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\ GTS_OBJECT (e)->reserved = NULL) static gdouble triangles_angle (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4) { gdouble x1, y1, z1, x2, y2, z2; gdouble nx1, ny1, nz1, nx2, ny2, nz2; gdouble pvx, pvy, pvz; gdouble theta; x1 = p2->x - p1->x; y1 = p2->y - p1->y; z1 = p2->z - p1->z; x2 = p3->x - p1->x; y2 = p3->y - p1->y; z2 = p3->z - p1->z; nx1 = y1*z2 - z1*y2; ny1 = z1*x2 - x1*z2; nz1 = x1*y2 - y1*x2; x1 = p1->x - p2->x; y1 = p1->y - p2->y; z1 = p1->z - p2->z; x2 = p4->x - p2->x; y2 = p4->y - p2->y; z2 = p4->z - p2->z; nx2 = y1*z2 - z1*y2; ny2 = z1*x2 - x1*z2; nz2 = x1*y2 - y1*x2; pvx = ny1*nz2 - nz1*ny2; pvy = nz1*nx2 - nx1*nz2; pvz = nx1*ny2 - ny1*nx2; theta = atan2 (sqrt (pvx*pvx + pvy*pvy + pvz*pvz), nx1*nx2 + ny1*ny2 + nz1*nz2) - M_PI; return theta < - M_PI ? theta + 2.*M_PI : theta; } static gdouble edge_swap_cost (GtsEdge * e) { GSList * i; GtsTriangle * t1 = NULL, * t2 = NULL; GtsVertex * v1, * v2, * v3, * v4; GtsEdge * e1, * e2, * e3, * e4; gdouble ab, aa; i = e->triangles; while (i) { if (GTS_IS_FACE (i->data)) { if (!t1) t1 = i->data; else if (!t2) t2 = i->data; else return G_MAXDOUBLE; } i = i->next; } if (!t1 || !t2) return G_MAXDOUBLE; gts_triangle_vertices_edges (t1, e, &v1, &v2, &v3, &e, &e3, &e4); gts_triangle_vertices_edges (t2, e, &v2, &v1, &v4, &e, &e1, &e2); ab = triangles_angle (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3), GTS_POINT (v4)); aa = triangles_angle (GTS_POINT (v3), GTS_POINT (v4), GTS_POINT (v2), GTS_POINT (v1)); return fabs (ab) - fabs (aa); } static void edge_swap (GtsEdge * e, GtsSurface * s, GtsEHeap * heap) { GSList * i; GtsTriangle * t1 = NULL, * t2 = NULL; GtsVertex * v1, * v2, * v3, * v4; GtsEdge * e1, * e2, * e3, * e4; i = e->triangles; while (i) { if (GTS_IS_FACE (i->data)) { if (!t1) t1 = i->data; else if (!t2) t2 = i->data; else g_assert_not_reached (); } i = i->next; } g_assert (t1 && t2); gts_triangle_vertices_edges (t1, e, &v1, &v2, &v3, &e, &e3, &e4); gts_triangle_vertices_edges (t2, e, &v2, &v1, &v4, &e, &e1, &e2); gts_object_destroy (GTS_OBJECT (e)); e = gts_edge_new (s->edge_class, v3, v4); gts_surface_add_face (s, gts_face_new (s->face_class, e, e4, e1)); gts_surface_add_face (s, gts_face_new (s->face_class, e, e2, e3)); HEAP_INSERT_EDGE (heap, e); HEAP_REMOVE_EDGE (heap, e1); HEAP_INSERT_EDGE (heap, e1); HEAP_REMOVE_EDGE (heap, e2); HEAP_INSERT_EDGE (heap, e2); HEAP_REMOVE_EDGE (heap, e3); HEAP_INSERT_EDGE (heap, e3); HEAP_REMOVE_EDGE (heap, e4); HEAP_INSERT_EDGE (heap, e4); } static void create_heap_optimize (GtsEdge * e, GtsEHeap * heap) { HEAP_INSERT_EDGE (heap, e); } static void surface_optimize (GtsSurface * surface, gdouble max_cost) { GtsEHeap * heap; GtsEdge * e; gdouble top_cost; heap = gts_eheap_new ((GtsKeyFunc) edge_swap_cost, NULL); gts_eheap_freeze (heap); gts_surface_foreach_edge (surface, (GtsFunc) create_heap_optimize, heap); gts_eheap_thaw (heap); gts_allow_floating_edges = TRUE; while ((e = gts_eheap_remove_top (heap, &top_cost)) && top_cost < max_cost) edge_swap (e, surface, heap); gts_allow_floating_edges = FALSE; if (e) GTS_OBJECT (e)->reserved = NULL; gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL); gts_eheap_destroy (heap); } static void angle_stats (GtsEdge * e, GtsRange * angle) { GSList * i; GtsTriangle * t1 = NULL, * t2 = NULL; i = e->triangles; while (i) { if (GTS_IS_FACE (i->data)) { if (!t1) t1 = i->data; else if (!t2) t2 = i->data; else return; } i = i->next; } if (!t1 || !t2) return; gts_range_add_value (angle, fabs (gts_triangles_angle (t1, t2))); } int main (int argc, char * argv[]) { GtsSurface * s; gboolean verbose = FALSE; gdouble threshold; int c = 0; GtsFile * fp; GtsRange angle; if (!setlocale (LC_ALL, "POSIX")) g_warning ("cannot set locale to POSIX"); /* parse options using getopt */ while (c != EOF) { #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, { NULL } }; int option_index = 0; switch ((c = getopt_long (argc, argv, "hv", long_options, &option_index))) { #else /* not HAVE_GETOPT_LONG */ switch ((c = getopt (argc, argv, "hv"))) { #endif /* not HAVE_GETOPT_LONG */ case 'v': /* verbose */ verbose = TRUE; break; case 'h': /* help */ fprintf (stderr, "Usage: optimize [OPTION] THRESHOLD < FILE\n" "\n" " -v --verbose print statistics about the surface\n" " -h --help display this help and exit\n" "\n" "Report bugs to %s\n", GTS_MAINTAINER); return 0; /* success */ break; case '?': /* wrong options */ fprintf (stderr, "Try `optimize --help' for more information.\n"); return 1; /* failure */ } } if (optind >= argc) { /* missing threshold */ fprintf (stderr, "optimize: missing THRESHOLD\n" "Try `optimize --help' for more information.\n"); return 1; /* failure */ } threshold = atof (argv[optind]); if (threshold < 0.0) { /* threshold must be positive */ fprintf (stderr, "optimize: THRESHOLD must be >= 0.0\n" "Try `optimize --help' for more information.\n"); return 1; /* failure */ } /* read surface in */ s = gts_surface_new (gts_surface_class (), gts_face_class (), gts_edge_class (), gts_vertex_class ()); fp = gts_file_new (stdin); if (gts_surface_read (s, fp)) { fputs ("optimize: file on standard input is not a valid GTS file\n", stderr); fprintf (stderr, "stdin:%d:%d: %s\n", fp->line, fp->pos, fp->error); return 1; /* failure */ } /* if verbose on print stats */ if (verbose) { gts_surface_print_stats (s, stderr); gts_range_init (&angle); gts_surface_foreach_edge (s, (GtsFunc) angle_stats, &angle); gts_range_update (&angle); fputs ("# angle : ", stderr); gts_range_print (&angle, stderr); fputc ('\n', stderr); } surface_optimize (s, -threshold); /* if verbose on print stats */ if (verbose) { gts_surface_print_stats (s, stderr); gts_range_init (&angle); gts_surface_foreach_edge (s, (GtsFunc) angle_stats, &angle); gts_range_update (&angle); fputs ("# angle : ", stderr); gts_range_print (&angle, stderr); fputc ('\n', stderr); } /* write surface */ gts_surface_write (s, stdout); return 0; /* success */ } gts-snapshot-121130/install-sh0000755000175100017510000003253712055775445013214 00000000000000#!/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: gts-snapshot-121130/acinclude.m40000644000175100017510000002037312055775440013367 00000000000000# Configure paths for GLIB # Owen Taylor 97-11-3 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or dnl gthread is specified in MODULES, pass to glib-config dnl AC_DEFUN(AM_PATH_GLIB, [dnl dnl Get the cflags and libraries from the glib-config script dnl AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], glib_config_prefix="$withval", glib_config_prefix="") AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], glib_config_exec_prefix="$withval", glib_config_exec_prefix="") AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], , enable_glibtest=yes) if test x$glib_config_exec_prefix != x ; then glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config fi fi if test x$glib_config_prefix != x ; then glib_config_args="$glib_config_args --prefix=$glib_config_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_prefix/bin/glib-config fi fi for module in . $4 do case "$module" in gmodule) glib_config_args="$glib_config_args gmodule" ;; gthread) glib_config_args="$glib_config_args gthread" ;; esac done AC_PATH_PROG(GLIB_CONFIG, glib-config, no) min_glib_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes else GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" dnl dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of glib-config to some extent dnl rm -f conf.glibtest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If glib-config was correct, then it is best\n"); printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the glib-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); printf("*** correct copy of glib-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GLIB_CONFIG" = "no" ; then echo "*** The glib-config script installed by GLIB could not be found" echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GLIB_CONFIG environment variable to the" echo "*** full path to glib-config." else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_TRY_LINK([ #include #include ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB was incorrectly installed" echo "*** or that you have moved GLIB since it was installed. In the latter case, you" echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) rm -f conf.glibtest ]) gts-snapshot-121130/src/0000755000175100017510000000000012055775530012040 500000000000000gts-snapshot-121130/src/gts.m40000644000175100017510000001760012055775440013023 00000000000000# Configure paths for GTS # Stéphane Popinet 2001-10-4 # adapted from # Configure paths for GLIB # Owen Taylor 97-11-3 dnl AM_PATH_GTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for GTS, and define GTS_CFLAGS and GTS_LIBS dnl AC_DEFUN([AM_PATH_GTS], [dnl dnl Get the cflags and libraries from the gts-config script dnl AC_ARG_WITH(gts-prefix,[ --with-gts-prefix=PFX Prefix where GTS is installed (optional)], gts_config_prefix="$withval", gts_config_prefix="") AC_ARG_WITH(gts-exec-prefix,[ --with-gts-exec-prefix=PFX Exec prefix where GTS is installed (optional)], gts_config_exec_prefix="$withval", gts_config_exec_prefix="") AC_ARG_ENABLE(gtstest, [ --disable-gtstest Do not try to compile and run a test GTS program], , enable_gtstest=yes) if test x$gts_config_exec_prefix != x ; then gts_config_args="$gts_config_args --exec-prefix=$gts_config_exec_prefix" if test x${GTS_CONFIG+set} != xset ; then GTS_CONFIG=$gts_config_exec_prefix/bin/gts-config fi fi if test x$gts_config_prefix != x ; then gts_config_args="$gts_config_args --prefix=$gts_config_prefix" if test x${GTS_CONFIG+set} != xset ; then GTS_CONFIG=$gts_config_prefix/bin/gts-config fi fi for module in . $4 do case "$module" in gmodule) gts_config_args="$gts_config_args gmodule" ;; gthread) gts_config_args="$gts_config_args gthread" ;; esac done AC_PATH_PROG(GTS_CONFIG, gts-config, no) min_gts_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTS - version >= $min_gts_version) no_gts="" if test "$GTS_CONFIG" = "no" ; then no_gts=yes else GTS_CFLAGS=`$GTS_CONFIG $gts_config_args --cflags` GTS_LIBS=`$GTS_CONFIG $gts_config_args --libs` gts_config_major_version=`$GTS_CONFIG $gts_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gts_config_minor_version=`$GTS_CONFIG $gts_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gts_config_micro_version=`$GTS_CONFIG $gts_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtstest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTS_CFLAGS" LIBS="$GTS_LIBS $LIBS" dnl dnl Now check if the installed GTS is sufficiently new. (Also sanity dnl checks the results of gts-config to some extent dnl rm -f conf.gtstest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtstest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gts_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gts_version"); exit(1); } if ((gts_major_version != $gts_config_major_version) || (gts_minor_version != $gts_config_minor_version) || (gts_micro_version != $gts_config_micro_version)) { printf("\n*** 'gts-config --version' returned %d.%d.%d, but GTS (%d.%d.%d)\n", $gts_config_major_version, $gts_config_minor_version, $gts_config_micro_version, gts_major_version, gts_minor_version, gts_micro_version); printf ("*** was found! If gts-config was correct, then it is best\n"); printf ("*** to remove the old version of GTS. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gts-config was wrong, set the environment variable GTS_CONFIG\n"); printf("*** to point to the correct copy of gts-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((gts_major_version != GTS_MAJOR_VERSION) || (gts_minor_version != GTS_MINOR_VERSION) || (gts_micro_version != GTS_MICRO_VERSION)) { printf("*** GTS header files (version %d.%d.%d) do not match\n", GTS_MAJOR_VERSION, GTS_MINOR_VERSION, GTS_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gts_major_version, gts_minor_version, gts_micro_version); } else { if ((gts_major_version > major) || ((gts_major_version == major) && (gts_minor_version > minor)) || ((gts_major_version == major) && (gts_minor_version == minor) && (gts_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTS (%d.%d.%d) was found.\n", gts_major_version, gts_minor_version, gts_micro_version); printf("*** You need a version of GTS newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTS is always available from http://gts.sourceforge.net.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gts-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTS, but you can also set the GTS_CONFIG environment to point to the\n"); printf("*** correct copy of gts-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gts" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTS_CONFIG" = "no" ; then echo "*** The gts-config script installed by GTS could not be found" echo "*** If GTS was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTS_CONFIG environment variable to the" echo "*** full path to gts-config." else if test -f conf.gtstest ; then : else echo "*** Could not run GTS test program, checking why..." CFLAGS="$CFLAGS $GTS_CFLAGS" LIBS="$LIBS $GTS_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gts_major_version) || (gts_minor_version) || (gts_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTS or finding the wrong" echo "*** version of GTS. If it is not finding GTS, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTS was incorrectly installed" echo "*** or that you have moved GTS since it was installed. In the latter case, you" echo "*** may want to edit the gts-config script: $GTS_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTS_CFLAGS="" GTS_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTS_CFLAGS) AC_SUBST(GTS_LIBS) rm -f conf.gtstest ]) gts-snapshot-121130/src/object.c0000644000175100017510000002061212055775440013373 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" #include "gts-private.h" static GHashTable * class_table = NULL; static void gts_object_class_init (GtsObjectClass * klass, GtsObjectClass * parent_class) { if (parent_class) { gts_object_class_init (klass, parent_class->parent_class); if (parent_class->info.class_init_func) (*parent_class->info.class_init_func) (klass); } } /** * gts_object_class_new: * @parent_class: a #GtsObjectClass. * @info: a #GtsObjectClassInfo, description of the new class to create. * * Returns: a new #GtsObjectClass derived from @parent_class and described by * @info. */ gpointer gts_object_class_new (GtsObjectClass * parent_class, GtsObjectClassInfo * info) { GtsObjectClass * klass; g_return_val_if_fail (info != NULL, NULL); g_return_val_if_fail (parent_class == NULL || info->object_size >= parent_class->info.object_size, NULL); g_return_val_if_fail (parent_class == NULL || info->class_size >= parent_class->info.class_size, NULL); klass = g_malloc0 (info->class_size); klass->info = *info; klass->parent_class = parent_class; gts_object_class_init (klass, klass); if (!class_table) class_table = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (class_table, klass->info.name, klass); return klass; } /** * gts_object_class_from_name: * @name: the name of a #GtsObjectClass. * * Returns: the #GtsObjectClass with name @name or %NULL if it hasn't been * instantiated yet. */ GtsObjectClass * gts_object_class_from_name (const gchar * name) { g_return_val_if_fail (name != NULL, NULL); if (!class_table) return NULL; return g_hash_table_lookup (class_table, name); } static void object_destroy (GtsObject * object) { #ifdef DEBUG_IDENTITY #ifdef DEBUG_LEAKS fprintf (stderr, "destroy %s %p->%d\n", object->klass->info.name, object, id (object)); #endif id_remove (object); #endif object->klass = NULL; g_free (object); } static void object_clone (GtsObject * clone, GtsObject * object) { memcpy (clone, object, object->klass->info.object_size); clone->reserved = NULL; } static void object_class_init (GtsObjectClass * klass) { klass->clone = object_clone; klass->destroy = object_destroy; klass->read = NULL; klass->write = NULL; klass->color = NULL; klass->attributes = NULL; } static void object_init (GtsObject * object) { object->reserved = NULL; object->flags = 0; } /** * gts_object_class: * * Returns: the #GtsObjectClass. */ GtsObjectClass * gts_object_class (void) { static GtsObjectClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo object_info = { "GtsObject", sizeof (GtsObject), sizeof (GtsObjectClass), (GtsObjectClassInitFunc) object_class_init, (GtsObjectInitFunc) object_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (NULL, &object_info); } return klass; } /** * gts_object_check_cast: * @object: a #GtsObject. * @klass: a #GtsObjectClass. * * Returns: @object while emitting warnings if @object is not of class @klass. */ gpointer gts_object_check_cast (gpointer object, gpointer klass) { if (!object) { g_warning ("invalid cast from (NULL) pointer to `%s'", GTS_OBJECT_CLASS (klass)->info.name); return object; } if (!((GtsObject *) object)->klass) { g_warning ("invalid unclassed pointer in cast to `%s'", GTS_OBJECT_CLASS (klass)->info.name); return object; } if (!gts_object_is_from_class (object, klass)) { g_warning ("invalid cast from `%s' to `%s'", ((GtsObject *) object)->klass->info.name, GTS_OBJECT_CLASS (klass)->info.name); return object; } return object; } /** * gts_object_class_check_cast: * @klass: a #GtsObjectClass. * @from: a #GtsObjectClass. * * Returns: @klass while emitting warnings if @klass is not derived from * @from. */ gpointer gts_object_class_check_cast (gpointer klass, gpointer from) { if (!klass) { g_warning ("invalid cast from (NULL) pointer to `%s'", GTS_OBJECT_CLASS (from)->info.name); return klass; } if (!gts_object_class_is_from_class (klass, from)) { g_warning ("invalid cast from `%s' to `%s'", GTS_OBJECT_CLASS (klass)->info.name, GTS_OBJECT_CLASS (from)->info.name); return klass; } return klass; } /** * gts_object_init: * @object: a #GtsObject. * @klass: a #GtsObjectClass. * * Calls the init method of @klass with @object as argument. This is done * recursively in the correct order (from the base class to the top). You * should rarely need this function as it is called automatically by the * constructor for each class. */ void gts_object_init (GtsObject * object, GtsObjectClass * klass) { GtsObjectClass * parent_class; g_return_if_fail (object != NULL); g_return_if_fail (klass != NULL); parent_class = klass->parent_class; if (parent_class) gts_object_init (object, parent_class); if (klass->info.object_init_func) (*klass->info.object_init_func) (object); } /** * gts_object_new: * @klass: a #GtsObjectClass. * * Returns: a new initialized object of class @klass. */ GtsObject * gts_object_new (GtsObjectClass * klass) { GtsObject * object; g_return_val_if_fail (klass != NULL, NULL); object = g_malloc0 (klass->info.object_size); object->klass = klass; gts_object_init (object, klass); #ifdef DEBUG_IDENTITY id_insert (object); #ifdef DEBUG_LEAKS fprintf (stderr, "new %s %p->%d\n", klass->info.name, object, id (object)); #endif #endif return object; } /** * gts_object_clone: * @object: a #GtsObject. * * Calls the clone method of @object. The call to this function will fail * if no clone method exists for the given object. * * Returns: a new object clone of @object. */ GtsObject * gts_object_clone (GtsObject * object) { GtsObject * clone; g_return_val_if_fail (object != NULL, NULL); g_return_val_if_fail (object->klass->clone, NULL); clone = g_malloc0 (object->klass->info.object_size); clone->klass = object->klass; object_init (clone); (* object->klass->clone) (clone, object); #ifdef DEBUG_IDENTITY id_insert (clone); #ifdef DEBUG_LEAKS fprintf (stderr, "clone %s %p->%d\n", clone->klass->info.name, clone, id (clone)); #endif #endif return clone; } /** * gts_object_destroy: * @object: a #GtsObject. * * Calls the destroy method of @object, freeing all memory allocated for it. */ void gts_object_destroy (GtsObject * object) { g_assert (object->klass->destroy); GTS_OBJECT_SET_FLAGS (object, GTS_DESTROYED); (* object->klass->destroy) (object); } /** * gts_object_reset_reserved: * @object: a #GtsObject. * * Reset the reserved field of @object. */ void gts_object_reset_reserved (GtsObject * object) { g_return_if_fail (object != NULL); object->reserved = NULL; } /** * gts_object_attributes: * @object: a #GtsObject. * @from: a #GtsObject. * * Calls the attributes() method of @object using @from as source. */ void gts_object_attributes (GtsObject * object, GtsObject * from) { g_return_if_fail (object != NULL); if (object->klass->attributes) (* object->klass->attributes) (object, from); } static void free_class (gchar * name, GtsObjectClass * klass) { g_free (klass); } /** * gts_finalize: * * Free all the memory allocated by the object system of GTS. No other * GTS function can be called after this function has been called. */ void gts_finalize (void) { if (class_table) { g_hash_table_foreach (class_table, (GHFunc) free_class, NULL); g_hash_table_destroy (class_table); class_table = NULL; } } gts-snapshot-121130/src/predicates.c0000644000175100017510000033507412055775440014263 00000000000000/*****************************************************************************/ /* */ /* Routines for Arbitrary Precision Floating-point Arithmetic */ /* and Fast Robust Geometric Predicates */ /* (predicates.c) */ /* */ /* May 18, 1996 */ /* */ /* Placed in the public domain by */ /* Jonathan Richard Shewchuk */ /* School of Computer Science */ /* Carnegie Mellon University */ /* 5000 Forbes Avenue */ /* Pittsburgh, Pennsylvania 15213-3891 */ /* jrs@cs.cmu.edu */ /* */ /* This file contains C implementation of algorithms for exact addition */ /* and multiplication of floating-point numbers, and predicates for */ /* robustly performing the orientation and incircle tests used in */ /* computational geometry. The algorithms and underlying theory are */ /* described in Jonathan Richard Shewchuk. "Adaptive Precision Floating- */ /* Point Arithmetic and Fast Robust Geometric Predicates." Technical */ /* Report CMU-CS-96-140, School of Computer Science, Carnegie Mellon */ /* University, Pittsburgh, Pennsylvania, May 1996. (Submitted to */ /* Discrete & Computational Geometry.) */ /* */ /* This file, the paper listed above, and other information are available */ /* from the Web page http://www.cs.cmu.edu/~quake/robust.html . */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* */ /* Using this code: */ /* */ /* First, read the short or long version of the paper (from the Web page */ /* above). */ /* */ /* Be sure to call exactinit() once, before calling any of the arithmetic */ /* functions or geometric predicates. Also be sure to turn on the */ /* optimizer when compiling this file. */ /* */ /* */ /* Several geometric predicates are defined. Their parameters are all */ /* points. Each point is an array of two or three floating-point */ /* numbers. The geometric predicates, described in the papers, are */ /* */ /* orient2d(pa, pb, pc) */ /* orient2dfast(pa, pb, pc) */ /* orient3d(pa, pb, pc, pd) */ /* orient3dfast(pa, pb, pc, pd) */ /* incircle(pa, pb, pc, pd) */ /* incirclefast(pa, pb, pc, pd) */ /* insphere(pa, pb, pc, pd, pe) */ /* inspherefast(pa, pb, pc, pd, pe) */ /* */ /* Those with suffix "fast" are approximate, non-robust versions. Those */ /* without the suffix are adaptive precision, robust versions. There */ /* are also versions with the suffices "exact" and "slow", which are */ /* non-adaptive, exact arithmetic versions, which I use only for timings */ /* in my arithmetic papers. */ /* */ /* */ /* An expansion is represented by an array of floating-point numbers, */ /* sorted from smallest to largest magnitude (possibly with interspersed */ /* zeros). The length of each expansion is stored as a separate integer, */ /* and each arithmetic function returns an integer which is the length */ /* of the expansion it created. */ /* */ /* Several arithmetic functions are defined. Their parameters are */ /* */ /* e, f Input expansions */ /* elen, flen Lengths of input expansions (must be >= 1) */ /* h Output expansion */ /* b Input scalar */ /* */ /* The arithmetic functions are */ /* */ /* grow_expansion(elen, e, b, h) */ /* grow_expansion_zeroelim(elen, e, b, h) */ /* expansion_sum(elen, e, flen, f, h) */ /* expansion_sum_zeroelim1(elen, e, flen, f, h) */ /* expansion_sum_zeroelim2(elen, e, flen, f, h) */ /* fast_expansion_sum(elen, e, flen, f, h) */ /* fast_expansion_sum_zeroelim(elen, e, flen, f, h) */ /* linear_expansion_sum(elen, e, flen, f, h) */ /* linear_expansion_sum_zeroelim(elen, e, flen, f, h) */ /* scale_expansion(elen, e, b, h) */ /* scale_expansion_zeroelim(elen, e, b, h) */ /* compress(elen, e, h) */ /* */ /* All of these are described in the long version of the paper; some are */ /* described in the short version. All return an integer that is the */ /* length of h. Those with suffix _zeroelim perform zero elimination, */ /* and are recommended over their counterparts. The procedure */ /* fast_expansion_sum_zeroelim() (or linear_expansion_sum_zeroelim() on */ /* processors that do not use the round-to-even tiebreaking rule) is */ /* recommended over expansion_sum_zeroelim(). Each procedure has a */ /* little note next to it (in the code below) that tells you whether or */ /* not the output expansion may be the same array as one of the input */ /* expansions. */ /* */ /* */ /* If you look around below, you'll also find macros for a bunch of */ /* simple unrolled arithmetic operations, and procedures for printing */ /* expansions (commented out because they don't work with all C */ /* compilers) and for generating random floating-point numbers whose */ /* significand bits are all random. Most of the macros have undocumented */ /* requirements that certain of their parameters should not be the same */ /* variable; for safety, better to make sure all the parameters are */ /* distinct variables. Feel free to send email to jrs@cs.cmu.edu if you */ /* have questions. */ /* */ /*****************************************************************************/ #include #include #include #include "predicates.h" /* Use header file generated automatically by predicates_init. */ #define USE_PREDICATES_INIT #ifdef USE_PREDICATES_INIT #include "predicates_init.h" #endif /* USE_PREDICATES_INIT */ /* FPU control. We MUST have only double precision (not extended precision) */ #include "rounding.h" /* On some machines, the exact arithmetic routines might be defeated by the */ /* use of internal extended precision floating-point registers. Sometimes */ /* this problem can be fixed by defining certain values to be volatile, */ /* thus forcing them to be stored to memory and rounded off. This isn't */ /* a great solution, though, as it slows the arithmetic down. */ /* */ /* To try this out, write "#define INEXACT volatile" below. Normally, */ /* however, INEXACT should be defined to be nothing. ("#define INEXACT".) */ #define INEXACT /* Nothing */ /* #define INEXACT volatile */ #define REAL double /* float or double */ #define REALPRINT doubleprint #define REALRAND doublerand #define NARROWRAND narrowdoublerand #define UNIFORMRAND uniformdoublerand /* Which of the following two methods of finding the absolute values is */ /* fastest is compiler-dependent. A few compilers can inline and optimize */ /* the fabs() call; but most will incur the overhead of a function call, */ /* which is disastrously slow. A faster way on IEEE machines might be to */ /* mask the appropriate bit, but that's difficult to do in C. */ #define Absolute(a) ((a) >= 0.0 ? (a) : -(a)) /* #define Absolute(a) fabs(a) */ /* Many of the operations are broken up into two pieces, a main part that */ /* performs an approximate operation, and a "tail" that computes the */ /* roundoff error of that operation. */ /* */ /* The operations Fast_Two_Sum(), Fast_Two_Diff(), Two_Sum(), Two_Diff(), */ /* Split(), and Two_Product() are all implemented as described in the */ /* reference. Each of these macros requires certain variables to be */ /* defined in the calling routine. The variables `bvirt', `c', `abig', */ /* `_i', `_j', `_k', `_l', `_m', and `_n' are declared `INEXACT' because */ /* they store the result of an operation that may incur roundoff error. */ /* The input parameter `x' (or the highest numbered `x_' parameter) must */ /* also be declared `INEXACT'. */ #define Fast_Two_Sum_Tail(a, b, x, y) \ bvirt = x - a; \ y = b - bvirt #define Fast_Two_Sum(a, b, x, y) \ x = (REAL) (a + b); \ Fast_Two_Sum_Tail(a, b, x, y) #define Fast_Two_Diff_Tail(a, b, x, y) \ bvirt = a - x; \ y = bvirt - b #define Fast_Two_Diff(a, b, x, y) \ x = (REAL) (a - b); \ Fast_Two_Diff_Tail(a, b, x, y) #define Two_Sum_Tail(a, b, x, y) \ bvirt = (REAL) (x - a); \ avirt = x - bvirt; \ bround = b - bvirt; \ around = a - avirt; \ y = around + bround #define Two_Sum(a, b, x, y) \ x = (REAL) (a + b); \ Two_Sum_Tail(a, b, x, y) #define Two_Diff_Tail(a, b, x, y) \ bvirt = (REAL) (a - x); \ avirt = x + bvirt; \ bround = bvirt - b; \ around = a - avirt; \ y = around + bround #define Two_Diff(a, b, x, y) \ x = (REAL) (a - b); \ Two_Diff_Tail(a, b, x, y) #define Split(a, ahi, alo) \ c = (REAL) (splitter * a); \ abig = (REAL) (c - a); \ ahi = c - abig; \ alo = a - ahi #define Two_Product_Tail(a, b, x, y) \ Split(a, ahi, alo); \ Split(b, bhi, blo); \ err1 = x - (ahi * bhi); \ err2 = err1 - (alo * bhi); \ err3 = err2 - (ahi * blo); \ y = (alo * blo) - err3 #define Two_Product(a, b, x, y) \ x = (REAL) (a * b); \ Two_Product_Tail(a, b, x, y) /* Two_Product_Presplit() is Two_Product() where one of the inputs has */ /* already been split. Avoids redundant splitting. */ #define Two_Product_Presplit(a, b, bhi, blo, x, y) \ x = (REAL) (a * b); \ Split(a, ahi, alo); \ err1 = x - (ahi * bhi); \ err2 = err1 - (alo * bhi); \ err3 = err2 - (ahi * blo); \ y = (alo * blo) - err3 /* Two_Product_2Presplit() is Two_Product() where both of the inputs have */ /* already been split. Avoids redundant splitting. */ #define Two_Product_2Presplit(a, ahi, alo, b, bhi, blo, x, y) \ x = (REAL) (a * b); \ err1 = x - (ahi * bhi); \ err2 = err1 - (alo * bhi); \ err3 = err2 - (ahi * blo); \ y = (alo * blo) - err3 /* Square() can be done more quickly than Two_Product(). */ #define Square_Tail(a, x, y) \ Split(a, ahi, alo); \ err1 = x - (ahi * ahi); \ err3 = err1 - ((ahi + ahi) * alo); \ y = (alo * alo) - err3 #define Square(a, x, y) \ x = (REAL) (a * a); \ Square_Tail(a, x, y) /* Macros for summing expansions of various fixed lengths. These are all */ /* unrolled versions of Expansion_Sum(). */ #define Two_One_Sum(a1, a0, b, x2, x1, x0) \ Two_Sum(a0, b , _i, x0); \ Two_Sum(a1, _i, x2, x1) #define Two_One_Diff(a1, a0, b, x2, x1, x0) \ Two_Diff(a0, b , _i, x0); \ Two_Sum( a1, _i, x2, x1) #define Two_Two_Sum(a1, a0, b1, b0, x3, x2, x1, x0) \ Two_One_Sum(a1, a0, b0, _j, _0, x0); \ Two_One_Sum(_j, _0, b1, x3, x2, x1) #define Two_Two_Diff(a1, a0, b1, b0, x3, x2, x1, x0) \ Two_One_Diff(a1, a0, b0, _j, _0, x0); \ Two_One_Diff(_j, _0, b1, x3, x2, x1) #define Four_One_Sum(a3, a2, a1, a0, b, x4, x3, x2, x1, x0) \ Two_One_Sum(a1, a0, b , _j, x1, x0); \ Two_One_Sum(a3, a2, _j, x4, x3, x2) #define Four_Two_Sum(a3, a2, a1, a0, b1, b0, x5, x4, x3, x2, x1, x0) \ Four_One_Sum(a3, a2, a1, a0, b0, _k, _2, _1, _0, x0); \ Four_One_Sum(_k, _2, _1, _0, b1, x5, x4, x3, x2, x1) #define Four_Four_Sum(a3, a2, a1, a0, b4, b3, b1, b0, x7, x6, x5, x4, x3, x2, \ x1, x0) \ Four_Two_Sum(a3, a2, a1, a0, b1, b0, _l, _2, _1, _0, x1, x0); \ Four_Two_Sum(_l, _2, _1, _0, b4, b3, x7, x6, x5, x4, x3, x2) #define Eight_One_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b, x8, x7, x6, x5, x4, \ x3, x2, x1, x0) \ Four_One_Sum(a3, a2, a1, a0, b , _j, x3, x2, x1, x0); \ Four_One_Sum(a7, a6, a5, a4, _j, x8, x7, x6, x5, x4) #define Eight_Two_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b1, b0, x9, x8, x7, \ x6, x5, x4, x3, x2, x1, x0) \ Eight_One_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b0, _k, _6, _5, _4, _3, _2, \ _1, _0, x0); \ Eight_One_Sum(_k, _6, _5, _4, _3, _2, _1, _0, b1, x9, x8, x7, x6, x5, x4, \ x3, x2, x1) #define Eight_Four_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b4, b3, b1, b0, x11, \ x10, x9, x8, x7, x6, x5, x4, x3, x2, x1, x0) \ Eight_Two_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b1, b0, _l, _6, _5, _4, _3, \ _2, _1, _0, x1, x0); \ Eight_Two_Sum(_l, _6, _5, _4, _3, _2, _1, _0, b4, b3, x11, x10, x9, x8, \ x7, x6, x5, x4, x3, x2) /* Macros for multiplying expansions of various fixed lengths. */ #define Two_One_Product(a1, a0, b, x3, x2, x1, x0) \ Split(b, bhi, blo); \ Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \ Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \ Two_Sum(_i, _0, _k, x1); \ Fast_Two_Sum(_j, _k, x3, x2) #define Four_One_Product(a3, a2, a1, a0, b, x7, x6, x5, x4, x3, x2, x1, x0) \ Split(b, bhi, blo); \ Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \ Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \ Two_Sum(_i, _0, _k, x1); \ Fast_Two_Sum(_j, _k, _i, x2); \ Two_Product_Presplit(a2, b, bhi, blo, _j, _0); \ Two_Sum(_i, _0, _k, x3); \ Fast_Two_Sum(_j, _k, _i, x4); \ Two_Product_Presplit(a3, b, bhi, blo, _j, _0); \ Two_Sum(_i, _0, _k, x5); \ Fast_Two_Sum(_j, _k, x7, x6) #define Two_Two_Product(a1, a0, b1, b0, x7, x6, x5, x4, x3, x2, x1, x0) \ Split(a0, a0hi, a0lo); \ Split(b0, bhi, blo); \ Two_Product_2Presplit(a0, a0hi, a0lo, b0, bhi, blo, _i, x0); \ Split(a1, a1hi, a1lo); \ Two_Product_2Presplit(a1, a1hi, a1lo, b0, bhi, blo, _j, _0); \ Two_Sum(_i, _0, _k, _1); \ Fast_Two_Sum(_j, _k, _l, _2); \ Split(b1, bhi, blo); \ Two_Product_2Presplit(a0, a0hi, a0lo, b1, bhi, blo, _i, _0); \ Two_Sum(_1, _0, _k, x1); \ Two_Sum(_2, _k, _j, _1); \ Two_Sum(_l, _j, _m, _2); \ Two_Product_2Presplit(a1, a1hi, a1lo, b1, bhi, blo, _j, _0); \ Two_Sum(_i, _0, _n, _0); \ Two_Sum(_1, _0, _i, x2); \ Two_Sum(_2, _i, _k, _1); \ Two_Sum(_m, _k, _l, _2); \ Two_Sum(_j, _n, _k, _0); \ Two_Sum(_1, _0, _j, x3); \ Two_Sum(_2, _j, _i, _1); \ Two_Sum(_l, _i, _m, _2); \ Two_Sum(_1, _k, _i, x4); \ Two_Sum(_2, _i, _k, x5); \ Two_Sum(_m, _k, x7, x6) /* An expansion of length two can be squared more quickly than finding the */ /* product of two different expansions of length two, and the result is */ /* guaranteed to have no more than six (rather than eight) components. */ #define Two_Square(a1, a0, x5, x4, x3, x2, x1, x0) \ Square(a0, _j, x0); \ _0 = a0 + a0; \ Two_Product(a1, _0, _k, _1); \ Two_One_Sum(_k, _1, _j, _l, _2, x1); \ Square(a1, _j, _1); \ Two_Two_Sum(_j, _1, _l, _2, x5, x4, x3, x2) #ifndef USE_PREDICATES_INIT static REAL splitter; /* = 2^ceiling(p / 2) + 1. Used to split floats in half. */ /* A set of coefficients used to calculate maximum roundoff errors. */ static REAL resulterrbound; static REAL ccwerrboundA, ccwerrboundB, ccwerrboundC; static REAL o3derrboundA, o3derrboundB, o3derrboundC; static REAL iccerrboundA, iccerrboundB, iccerrboundC; static REAL isperrboundA, isperrboundB, isperrboundC; #endif /* USE_PREDICATES_INIT */ /*****************************************************************************/ /* */ /* doubleprint() Print the bit representation of a double. */ /* */ /* Useful for debugging exact arithmetic routines. */ /* */ /*****************************************************************************/ /* void doubleprint(number) double number; { unsigned long long no; unsigned long long sign, expo; int exponent; int i, bottomi; no = *(unsigned long long *) &number; sign = no & 0x8000000000000000ll; expo = (no >> 52) & 0x7ffll; exponent = (int) expo; exponent = exponent - 1023; if (sign) { printf("-"); } else { printf(" "); } if (exponent == -1023) { printf( "0.0000000000000000000000000000000000000000000000000000_ ( )"); } else { printf("1."); bottomi = -1; for (i = 0; i < 52; i++) { if (no & 0x0008000000000000ll) { printf("1"); bottomi = i; } else { printf("0"); } no <<= 1; } printf("_%d (%d)", exponent, exponent - 1 - bottomi); } } */ /*****************************************************************************/ /* */ /* floatprint() Print the bit representation of a float. */ /* */ /* Useful for debugging exact arithmetic routines. */ /* */ /*****************************************************************************/ /* void floatprint(number) float number; { unsigned no; unsigned sign, expo; int exponent; int i, bottomi; no = *(unsigned *) &number; sign = no & 0x80000000; expo = (no >> 23) & 0xff; exponent = (int) expo; exponent = exponent - 127; if (sign) { printf("-"); } else { printf(" "); } if (exponent == -127) { printf("0.00000000000000000000000_ ( )"); } else { printf("1."); bottomi = -1; for (i = 0; i < 23; i++) { if (no & 0x00400000) { printf("1"); bottomi = i; } else { printf("0"); } no <<= 1; } printf("_%3d (%3d)", exponent, exponent - 1 - bottomi); } } */ /*****************************************************************************/ /* */ /* expansion_print() Print the bit representation of an expansion. */ /* */ /* Useful for debugging exact arithmetic routines. */ /* */ /*****************************************************************************/ /* void expansion_print(elen, e) int elen; REAL *e; { int i; for (i = elen - 1; i >= 0; i--) { REALPRINT(e[i]); if (i > 0) { printf(" +\n"); } else { printf("\n"); } } } */ /*****************************************************************************/ /* */ /* doublerand() Generate a double with random 53-bit significand and a */ /* random exponent in [0, 511]. */ /* */ /*****************************************************************************/ /* static double doublerand() { double result; double expo; long a, b, c; long i; a = random(); b = random(); c = random(); result = (double) (a - 1073741824) * 8388608.0 + (double) (b >> 8); for (i = 512, expo = 2; i <= 131072; i *= 2, expo = expo * expo) { if (c & i) { result *= expo; } } return result; } */ /*****************************************************************************/ /* */ /* narrowdoublerand() Generate a double with random 53-bit significand */ /* and a random exponent in [0, 7]. */ /* */ /*****************************************************************************/ /* static double narrowdoublerand() { double result; double expo; long a, b, c; long i; a = random(); b = random(); c = random(); result = (double) (a - 1073741824) * 8388608.0 + (double) (b >> 8); for (i = 512, expo = 2; i <= 2048; i *= 2, expo = expo * expo) { if (c & i) { result *= expo; } } return result; } */ /*****************************************************************************/ /* */ /* uniformdoublerand() Generate a double with random 53-bit significand. */ /* */ /*****************************************************************************/ /* static double uniformdoublerand() { double result; long a, b; a = random(); b = random(); result = (double) (a - 1073741824) * 8388608.0 + (double) (b >> 8); return result; } */ /*****************************************************************************/ /* */ /* floatrand() Generate a float with random 24-bit significand and a */ /* random exponent in [0, 63]. */ /* */ /*****************************************************************************/ /* static float floatrand() { float result; float expo; long a, c; long i; a = random(); c = random(); result = (float) ((a - 1073741824) >> 6); for (i = 512, expo = 2; i <= 16384; i *= 2, expo = expo * expo) { if (c & i) { result *= expo; } } return result; } */ /*****************************************************************************/ /* */ /* narrowfloatrand() Generate a float with random 24-bit significand and */ /* a random exponent in [0, 7]. */ /* */ /*****************************************************************************/ /* static float narrowfloatrand() { float result; float expo; long a, c; long i; a = random(); c = random(); result = (float) ((a - 1073741824) >> 6); for (i = 512, expo = 2; i <= 2048; i *= 2, expo = expo * expo) { if (c & i) { result *= expo; } } return result; } */ /*****************************************************************************/ /* */ /* uniformfloatrand() Generate a float with random 24-bit significand. */ /* */ /*****************************************************************************/ /* static float uniformfloatrand() { float result; long a; a = random(); result = (float) ((a - 1073741824) >> 6); return result; } */ /*****************************************************************************/ /* */ /* fast_expansion_sum_zeroelim() Sum two expansions, eliminating zero */ /* components from the output expansion. */ /* */ /* Sets h = e + f. See the long version of my paper for details. */ /* */ /* If round-to-even is used (as with IEEE 754), maintains the strongly */ /* nonoverlapping property. (That is, if e is strongly nonoverlapping, h */ /* will be also.) Does NOT maintain the nonoverlapping or nonadjacent */ /* properties. */ /* */ /*****************************************************************************/ static int fast_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f, REAL *h) /* h cannot be e or f. */ { REAL Q; INEXACT REAL Qnew; INEXACT REAL hh; INEXACT REAL bvirt; REAL avirt, bround, around; int eindex, findex, hindex; REAL enow, fnow; enow = e[0]; fnow = f[0]; eindex = findex = 0; if ((fnow > enow) == (fnow > -enow)) { Q = enow; enow = e[++eindex]; } else { Q = fnow; fnow = f[++findex]; } hindex = 0; if ((eindex < elen) && (findex < flen)) { if ((fnow > enow) == (fnow > -enow)) { Fast_Two_Sum(enow, Q, Qnew, hh); enow = e[++eindex]; } else { Fast_Two_Sum(fnow, Q, Qnew, hh); fnow = f[++findex]; } Q = Qnew; if (hh != 0.0) { h[hindex++] = hh; } while ((eindex < elen) && (findex < flen)) { if ((fnow > enow) == (fnow > -enow)) { Two_Sum(Q, enow, Qnew, hh); enow = e[++eindex]; } else { Two_Sum(Q, fnow, Qnew, hh); fnow = f[++findex]; } Q = Qnew; if (hh != 0.0) { h[hindex++] = hh; } } } while (eindex < elen) { Two_Sum(Q, enow, Qnew, hh); enow = e[++eindex]; Q = Qnew; if (hh != 0.0) { h[hindex++] = hh; } } while (findex < flen) { Two_Sum(Q, fnow, Qnew, hh); fnow = f[++findex]; Q = Qnew; if (hh != 0.0) { h[hindex++] = hh; } } if ((Q != 0.0) || (hindex == 0)) { h[hindex++] = Q; } return hindex; } /*****************************************************************************/ /* */ /* scale_expansion_zeroelim() Multiply an expansion by a scalar, */ /* eliminating zero components from the */ /* output expansion. */ /* */ /* Sets h = be. See either version of my paper for details. */ /* */ /* Maintains the nonoverlapping property. If round-to-even is used (as */ /* with IEEE 754), maintains the strongly nonoverlapping and nonadjacent */ /* properties as well. (That is, if e has one of these properties, so */ /* will h.) */ /* */ /*****************************************************************************/ static int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h) /* e and h cannot be the same. */ { INEXACT REAL Q, sum; REAL hh; INEXACT REAL product1; REAL product0; int eindex, hindex; REAL enow; INEXACT REAL bvirt; REAL avirt, bround, around; INEXACT REAL c; INEXACT REAL abig; REAL ahi, alo, bhi, blo; REAL err1, err2, err3; Split(b, bhi, blo); Two_Product_Presplit(e[0], b, bhi, blo, Q, hh); hindex = 0; if (hh != 0) { h[hindex++] = hh; } for (eindex = 1; eindex < elen; eindex++) { enow = e[eindex]; Two_Product_Presplit(enow, b, bhi, blo, product1, product0); Two_Sum(Q, product0, sum, hh); if (hh != 0) { h[hindex++] = hh; } Fast_Two_Sum(product1, sum, Q, hh); if (hh != 0) { h[hindex++] = hh; } } if ((Q != 0.0) || (hindex == 0)) { h[hindex++] = Q; } return hindex; } /*****************************************************************************/ /* */ /* estimate() Produce a one-word estimate of an expansion's value. */ /* */ /* See either version of my paper for details. */ /* */ /*****************************************************************************/ static REAL estimate(int elen, REAL *e) { REAL Q; int eindex; Q = e[0]; for (eindex = 1; eindex < elen; eindex++) { Q += e[eindex]; } return Q; } /*****************************************************************************/ /* */ /* orient2dfast() Approximate 2D orientation test. Nonrobust. */ /* orient2dexact() Exact 2D orientation test. Robust. */ /* orient2dslow() Another exact 2D orientation test. Robust. */ /* orient2d() Adaptive exact 2D orientation test. Robust. */ /* */ /* Return a positive value if the points pa, pb, and pc occur */ /* in counterclockwise order; a negative value if they occur */ /* in clockwise order; and zero if they are collinear. The */ /* result is also a rough approximation of twice the signed */ /* area of the triangle defined by the three points. */ /* */ /* Only the first and last routine should be used; the middle two are for */ /* timings. */ /* */ /* The last three use exact arithmetic to ensure a correct answer. The */ /* result returned is the determinant of a matrix. In orient2d() only, */ /* this determinant is computed adaptively, in the sense that exact */ /* arithmetic is used only to the degree it is needed to ensure that the */ /* returned value has the correct sign. Hence, orient2d() is usually quite */ /* fast, but will run more slowly when the input points are collinear or */ /* nearly so. */ /* */ /*****************************************************************************/ static REAL orient2dadapt(REAL *pa, REAL *pb, REAL *pc, REAL detsum) { INEXACT REAL acx, acy, bcx, bcy; REAL acxtail, acytail, bcxtail, bcytail; INEXACT REAL detleft, detright; REAL detlefttail, detrighttail; REAL det, errbound; REAL B[4], C1[8], C2[12], D[16]; INEXACT REAL B3; int C1length, C2length, Dlength; REAL u[4]; INEXACT REAL u3; INEXACT REAL s1, t1; REAL s0, t0; INEXACT REAL bvirt; REAL avirt, bround, around; INEXACT REAL c; INEXACT REAL abig; REAL ahi, alo, bhi, blo; REAL err1, err2, err3; INEXACT REAL _i, _j; REAL _0; acx = (REAL) (pa[0] - pc[0]); bcx = (REAL) (pb[0] - pc[0]); acy = (REAL) (pa[1] - pc[1]); bcy = (REAL) (pb[1] - pc[1]); Two_Product(acx, bcy, detleft, detlefttail); Two_Product(acy, bcx, detright, detrighttail); Two_Two_Diff(detleft, detlefttail, detright, detrighttail, B3, B[2], B[1], B[0]); B[3] = B3; det = estimate(4, B); errbound = ccwerrboundB * detsum; if ((det >= errbound) || (-det >= errbound)) { return det; } Two_Diff_Tail(pa[0], pc[0], acx, acxtail); Two_Diff_Tail(pb[0], pc[0], bcx, bcxtail); Two_Diff_Tail(pa[1], pc[1], acy, acytail); Two_Diff_Tail(pb[1], pc[1], bcy, bcytail); if ((acxtail == 0.0) && (acytail == 0.0) && (bcxtail == 0.0) && (bcytail == 0.0)) { return det; } errbound = ccwerrboundC * detsum + resulterrbound * Absolute(det); det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail); if ((det >= errbound) || (-det >= errbound)) { return det; } Two_Product(acxtail, bcy, s1, s0); Two_Product(acytail, bcx, t1, t0); Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]); u[3] = u3; C1length = fast_expansion_sum_zeroelim(4, B, 4, u, C1); Two_Product(acx, bcytail, s1, s0); Two_Product(acy, bcxtail, t1, t0); Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]); u[3] = u3; C2length = fast_expansion_sum_zeroelim(C1length, C1, 4, u, C2); Two_Product(acxtail, bcytail, s1, s0); Two_Product(acytail, bcxtail, t1, t0); Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]); u[3] = u3; Dlength = fast_expansion_sum_zeroelim(C2length, C2, 4, u, D); return(D[Dlength - 1]); } REAL orient2d(pa, pb, pc) REAL *pa; REAL *pb; REAL *pc; { REAL detleft, detright, det; REAL detsum, errbound; REAL orient; FPU_ROUND_DOUBLE; detleft = (pa[0] - pc[0]) * (pb[1] - pc[1]); detright = (pa[1] - pc[1]) * (pb[0] - pc[0]); det = detleft - detright; if (detleft > 0.0) { if (detright <= 0.0) { FPU_RESTORE; return det; } else { detsum = detleft + detright; } } else if (detleft < 0.0) { if (detright >= 0.0) { FPU_RESTORE; return det; } else { detsum = -detleft - detright; } } else { FPU_RESTORE; return det; } errbound = ccwerrboundA * detsum; if ((det >= errbound) || (-det >= errbound)) { FPU_RESTORE; return det; } orient = orient2dadapt(pa, pb, pc, detsum); FPU_RESTORE; return orient; } /*****************************************************************************/ /* */ /* orient3dfast() Approximate 3D orientation test. Nonrobust. */ /* orient3dexact() Exact 3D orientation test. Robust. */ /* orient3dslow() Another exact 3D orientation test. Robust. */ /* orient3d() Adaptive exact 3D orientation test. Robust. */ /* */ /* Return a positive value if the point pd lies below the */ /* plane passing through pa, pb, and pc; "below" is defined so */ /* that pa, pb, and pc appear in counterclockwise order when */ /* viewed from above the plane. Returns a negative value if */ /* pd lies above the plane. Returns zero if the points are */ /* coplanar. The result is also a rough approximation of six */ /* times the signed volume of the tetrahedron defined by the */ /* four points. */ /* */ /* Only the first and last routine should be used; the middle two are for */ /* timings. */ /* */ /* The last three use exact arithmetic to ensure a correct answer. The */ /* result returned is the determinant of a matrix. In orient3d() only, */ /* this determinant is computed adaptively, in the sense that exact */ /* arithmetic is used only to the degree it is needed to ensure that the */ /* returned value has the correct sign. Hence, orient3d() is usually quite */ /* fast, but will run more slowly when the input points are coplanar or */ /* nearly so. */ /* */ /*****************************************************************************/ static REAL orient3dadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL permanent) { INEXACT REAL adx, bdx, cdx, ady, bdy, cdy, adz, bdz, cdz; REAL det, errbound; INEXACT REAL bdxcdy1, cdxbdy1, cdxady1, adxcdy1, adxbdy1, bdxady1; REAL bdxcdy0, cdxbdy0, cdxady0, adxcdy0, adxbdy0, bdxady0; REAL bc[4], ca[4], ab[4]; INEXACT REAL bc3, ca3, ab3; REAL adet[8], bdet[8], cdet[8]; int alen, blen, clen; REAL abdet[16]; int ablen; REAL *finnow, *finother, *finswap; REAL fin1[192], fin2[192]; int finlength; REAL adxtail, bdxtail, cdxtail; REAL adytail, bdytail, cdytail; REAL adztail, bdztail, cdztail; INEXACT REAL at_blarge, at_clarge; INEXACT REAL bt_clarge, bt_alarge; INEXACT REAL ct_alarge, ct_blarge; REAL at_b[4], at_c[4], bt_c[4], bt_a[4], ct_a[4], ct_b[4]; int at_blen, at_clen, bt_clen, bt_alen, ct_alen, ct_blen; INEXACT REAL bdxt_cdy1, cdxt_bdy1, cdxt_ady1; INEXACT REAL adxt_cdy1, adxt_bdy1, bdxt_ady1; REAL bdxt_cdy0, cdxt_bdy0, cdxt_ady0; REAL adxt_cdy0, adxt_bdy0, bdxt_ady0; INEXACT REAL bdyt_cdx1, cdyt_bdx1, cdyt_adx1; INEXACT REAL adyt_cdx1, adyt_bdx1, bdyt_adx1; REAL bdyt_cdx0, cdyt_bdx0, cdyt_adx0; REAL adyt_cdx0, adyt_bdx0, bdyt_adx0; REAL bct[8], cat[8], abt[8]; int bctlen, catlen, abtlen; INEXACT REAL bdxt_cdyt1, cdxt_bdyt1, cdxt_adyt1; INEXACT REAL adxt_cdyt1, adxt_bdyt1, bdxt_adyt1; REAL bdxt_cdyt0, cdxt_bdyt0, cdxt_adyt0; REAL adxt_cdyt0, adxt_bdyt0, bdxt_adyt0; REAL u[4], v[12], w[16]; INEXACT REAL u3; int vlength, wlength; REAL negate; INEXACT REAL bvirt; REAL avirt, bround, around; INEXACT REAL c; INEXACT REAL abig; REAL ahi, alo, bhi, blo; REAL err1, err2, err3; INEXACT REAL _i, _j, _k; REAL _0; adx = (REAL) (pa[0] - pd[0]); bdx = (REAL) (pb[0] - pd[0]); cdx = (REAL) (pc[0] - pd[0]); ady = (REAL) (pa[1] - pd[1]); bdy = (REAL) (pb[1] - pd[1]); cdy = (REAL) (pc[1] - pd[1]); adz = (REAL) (pa[2] - pd[2]); bdz = (REAL) (pb[2] - pd[2]); cdz = (REAL) (pc[2] - pd[2]); Two_Product(bdx, cdy, bdxcdy1, bdxcdy0); Two_Product(cdx, bdy, cdxbdy1, cdxbdy0); Two_Two_Diff(bdxcdy1, bdxcdy0, cdxbdy1, cdxbdy0, bc3, bc[2], bc[1], bc[0]); bc[3] = bc3; alen = scale_expansion_zeroelim(4, bc, adz, adet); Two_Product(cdx, ady, cdxady1, cdxady0); Two_Product(adx, cdy, adxcdy1, adxcdy0); Two_Two_Diff(cdxady1, cdxady0, adxcdy1, adxcdy0, ca3, ca[2], ca[1], ca[0]); ca[3] = ca3; blen = scale_expansion_zeroelim(4, ca, bdz, bdet); Two_Product(adx, bdy, adxbdy1, adxbdy0); Two_Product(bdx, ady, bdxady1, bdxady0); Two_Two_Diff(adxbdy1, adxbdy0, bdxady1, bdxady0, ab3, ab[2], ab[1], ab[0]); ab[3] = ab3; clen = scale_expansion_zeroelim(4, ab, cdz, cdet); ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet); finlength = fast_expansion_sum_zeroelim(ablen, abdet, clen, cdet, fin1); det = estimate(finlength, fin1); errbound = o3derrboundB * permanent; if ((det >= errbound) || (-det >= errbound)) { return det; } Two_Diff_Tail(pa[0], pd[0], adx, adxtail); Two_Diff_Tail(pb[0], pd[0], bdx, bdxtail); Two_Diff_Tail(pc[0], pd[0], cdx, cdxtail); Two_Diff_Tail(pa[1], pd[1], ady, adytail); Two_Diff_Tail(pb[1], pd[1], bdy, bdytail); Two_Diff_Tail(pc[1], pd[1], cdy, cdytail); Two_Diff_Tail(pa[2], pd[2], adz, adztail); Two_Diff_Tail(pb[2], pd[2], bdz, bdztail); Two_Diff_Tail(pc[2], pd[2], cdz, cdztail); if ((adxtail == 0.0) && (bdxtail == 0.0) && (cdxtail == 0.0) && (adytail == 0.0) && (bdytail == 0.0) && (cdytail == 0.0) && (adztail == 0.0) && (bdztail == 0.0) && (cdztail == 0.0)) { return det; } errbound = o3derrboundC * permanent + resulterrbound * Absolute(det); det += (adz * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx)) + (bdz * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx)) + (cdz * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx)); if ((det >= errbound) || (-det >= errbound)) { return det; } finnow = fin1; finother = fin2; if (adxtail == 0.0) { if (adytail == 0.0) { at_b[0] = 0.0; at_blen = 1; at_c[0] = 0.0; at_clen = 1; } else { negate = -adytail; Two_Product(negate, bdx, at_blarge, at_b[0]); at_b[1] = at_blarge; at_blen = 2; Two_Product(adytail, cdx, at_clarge, at_c[0]); at_c[1] = at_clarge; at_clen = 2; } } else { if (adytail == 0.0) { Two_Product(adxtail, bdy, at_blarge, at_b[0]); at_b[1] = at_blarge; at_blen = 2; negate = -adxtail; Two_Product(negate, cdy, at_clarge, at_c[0]); at_c[1] = at_clarge; at_clen = 2; } else { Two_Product(adxtail, bdy, adxt_bdy1, adxt_bdy0); Two_Product(adytail, bdx, adyt_bdx1, adyt_bdx0); Two_Two_Diff(adxt_bdy1, adxt_bdy0, adyt_bdx1, adyt_bdx0, at_blarge, at_b[2], at_b[1], at_b[0]); at_b[3] = at_blarge; at_blen = 4; Two_Product(adytail, cdx, adyt_cdx1, adyt_cdx0); Two_Product(adxtail, cdy, adxt_cdy1, adxt_cdy0); Two_Two_Diff(adyt_cdx1, adyt_cdx0, adxt_cdy1, adxt_cdy0, at_clarge, at_c[2], at_c[1], at_c[0]); at_c[3] = at_clarge; at_clen = 4; } } if (bdxtail == 0.0) { if (bdytail == 0.0) { bt_c[0] = 0.0; bt_clen = 1; bt_a[0] = 0.0; bt_alen = 1; } else { negate = -bdytail; Two_Product(negate, cdx, bt_clarge, bt_c[0]); bt_c[1] = bt_clarge; bt_clen = 2; Two_Product(bdytail, adx, bt_alarge, bt_a[0]); bt_a[1] = bt_alarge; bt_alen = 2; } } else { if (bdytail == 0.0) { Two_Product(bdxtail, cdy, bt_clarge, bt_c[0]); bt_c[1] = bt_clarge; bt_clen = 2; negate = -bdxtail; Two_Product(negate, ady, bt_alarge, bt_a[0]); bt_a[1] = bt_alarge; bt_alen = 2; } else { Two_Product(bdxtail, cdy, bdxt_cdy1, bdxt_cdy0); Two_Product(bdytail, cdx, bdyt_cdx1, bdyt_cdx0); Two_Two_Diff(bdxt_cdy1, bdxt_cdy0, bdyt_cdx1, bdyt_cdx0, bt_clarge, bt_c[2], bt_c[1], bt_c[0]); bt_c[3] = bt_clarge; bt_clen = 4; Two_Product(bdytail, adx, bdyt_adx1, bdyt_adx0); Two_Product(bdxtail, ady, bdxt_ady1, bdxt_ady0); Two_Two_Diff(bdyt_adx1, bdyt_adx0, bdxt_ady1, bdxt_ady0, bt_alarge, bt_a[2], bt_a[1], bt_a[0]); bt_a[3] = bt_alarge; bt_alen = 4; } } if (cdxtail == 0.0) { if (cdytail == 0.0) { ct_a[0] = 0.0; ct_alen = 1; ct_b[0] = 0.0; ct_blen = 1; } else { negate = -cdytail; Two_Product(negate, adx, ct_alarge, ct_a[0]); ct_a[1] = ct_alarge; ct_alen = 2; Two_Product(cdytail, bdx, ct_blarge, ct_b[0]); ct_b[1] = ct_blarge; ct_blen = 2; } } else { if (cdytail == 0.0) { Two_Product(cdxtail, ady, ct_alarge, ct_a[0]); ct_a[1] = ct_alarge; ct_alen = 2; negate = -cdxtail; Two_Product(negate, bdy, ct_blarge, ct_b[0]); ct_b[1] = ct_blarge; ct_blen = 2; } else { Two_Product(cdxtail, ady, cdxt_ady1, cdxt_ady0); Two_Product(cdytail, adx, cdyt_adx1, cdyt_adx0); Two_Two_Diff(cdxt_ady1, cdxt_ady0, cdyt_adx1, cdyt_adx0, ct_alarge, ct_a[2], ct_a[1], ct_a[0]); ct_a[3] = ct_alarge; ct_alen = 4; Two_Product(cdytail, bdx, cdyt_bdx1, cdyt_bdx0); Two_Product(cdxtail, bdy, cdxt_bdy1, cdxt_bdy0); Two_Two_Diff(cdyt_bdx1, cdyt_bdx0, cdxt_bdy1, cdxt_bdy0, ct_blarge, ct_b[2], ct_b[1], ct_b[0]); ct_b[3] = ct_blarge; ct_blen = 4; } } bctlen = fast_expansion_sum_zeroelim(bt_clen, bt_c, ct_blen, ct_b, bct); wlength = scale_expansion_zeroelim(bctlen, bct, adz, w); finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w, finother); finswap = finnow; finnow = finother; finother = finswap; catlen = fast_expansion_sum_zeroelim(ct_alen, ct_a, at_clen, at_c, cat); wlength = scale_expansion_zeroelim(catlen, cat, bdz, w); finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w, finother); finswap = finnow; finnow = finother; finother = finswap; abtlen = fast_expansion_sum_zeroelim(at_blen, at_b, bt_alen, bt_a, abt); wlength = scale_expansion_zeroelim(abtlen, abt, cdz, w); finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w, finother); finswap = finnow; finnow = finother; finother = finswap; if (adztail != 0.0) { vlength = scale_expansion_zeroelim(4, bc, adztail, v); finlength = fast_expansion_sum_zeroelim(finlength, finnow, vlength, v, finother); finswap = finnow; finnow = finother; finother = finswap; } if (bdztail != 0.0) { vlength = scale_expansion_zeroelim(4, ca, bdztail, v); finlength = fast_expansion_sum_zeroelim(finlength, finnow, vlength, v, finother); finswap = finnow; finnow = finother; finother = finswap; } if (cdztail != 0.0) { vlength = scale_expansion_zeroelim(4, ab, cdztail, v); finlength = fast_expansion_sum_zeroelim(finlength, finnow, vlength, v, finother); finswap = finnow; finnow = finother; finother = finswap; } if (adxtail != 0.0) { if (bdytail != 0.0) { Two_Product(adxtail, bdytail, adxt_bdyt1, adxt_bdyt0); Two_One_Product(adxt_bdyt1, adxt_bdyt0, cdz, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; if (cdztail != 0.0) { Two_One_Product(adxt_bdyt1, adxt_bdyt0, cdztail, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; } } if (cdytail != 0.0) { negate = -adxtail; Two_Product(negate, cdytail, adxt_cdyt1, adxt_cdyt0); Two_One_Product(adxt_cdyt1, adxt_cdyt0, bdz, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; if (bdztail != 0.0) { Two_One_Product(adxt_cdyt1, adxt_cdyt0, bdztail, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; } } } if (bdxtail != 0.0) { if (cdytail != 0.0) { Two_Product(bdxtail, cdytail, bdxt_cdyt1, bdxt_cdyt0); Two_One_Product(bdxt_cdyt1, bdxt_cdyt0, adz, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; if (adztail != 0.0) { Two_One_Product(bdxt_cdyt1, bdxt_cdyt0, adztail, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; } } if (adytail != 0.0) { negate = -bdxtail; Two_Product(negate, adytail, bdxt_adyt1, bdxt_adyt0); Two_One_Product(bdxt_adyt1, bdxt_adyt0, cdz, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; if (cdztail != 0.0) { Two_One_Product(bdxt_adyt1, bdxt_adyt0, cdztail, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; } } } if (cdxtail != 0.0) { if (adytail != 0.0) { Two_Product(cdxtail, adytail, cdxt_adyt1, cdxt_adyt0); Two_One_Product(cdxt_adyt1, cdxt_adyt0, bdz, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; if (bdztail != 0.0) { Two_One_Product(cdxt_adyt1, cdxt_adyt0, bdztail, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; } } if (bdytail != 0.0) { negate = -cdxtail; Two_Product(negate, bdytail, cdxt_bdyt1, cdxt_bdyt0); Two_One_Product(cdxt_bdyt1, cdxt_bdyt0, adz, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; if (adztail != 0.0) { Two_One_Product(cdxt_bdyt1, cdxt_bdyt0, adztail, u3, u[2], u[1], u[0]); u[3] = u3; finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u, finother); finswap = finnow; finnow = finother; finother = finswap; } } } if (adztail != 0.0) { wlength = scale_expansion_zeroelim(bctlen, bct, adztail, w); finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w, finother); finswap = finnow; finnow = finother; finother = finswap; } if (bdztail != 0.0) { wlength = scale_expansion_zeroelim(catlen, cat, bdztail, w); finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w, finother); finswap = finnow; finnow = finother; finother = finswap; } if (cdztail != 0.0) { wlength = scale_expansion_zeroelim(abtlen, abt, cdztail, w); finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w, finother); finswap = finnow; finnow = finother; finother = finswap; } return finnow[finlength - 1]; } REAL orient3d(pa, pb, pc, pd) REAL *pa; REAL *pb; REAL *pc; REAL *pd; { REAL adx, bdx, cdx, ady, bdy, cdy, adz, bdz, cdz; REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady; REAL det; REAL permanent, errbound; REAL orient; FPU_ROUND_DOUBLE; adx = pa[0] - pd[0]; bdx = pb[0] - pd[0]; cdx = pc[0] - pd[0]; ady = pa[1] - pd[1]; bdy = pb[1] - pd[1]; cdy = pc[1] - pd[1]; adz = pa[2] - pd[2]; bdz = pb[2] - pd[2]; cdz = pc[2] - pd[2]; bdxcdy = bdx * cdy; cdxbdy = cdx * bdy; cdxady = cdx * ady; adxcdy = adx * cdy; adxbdy = adx * bdy; bdxady = bdx * ady; det = adz * (bdxcdy - cdxbdy) + bdz * (cdxady - adxcdy) + cdz * (adxbdy - bdxady); permanent = (Absolute(bdxcdy) + Absolute(cdxbdy)) * Absolute(adz) + (Absolute(cdxady) + Absolute(adxcdy)) * Absolute(bdz) + (Absolute(adxbdy) + Absolute(bdxady)) * Absolute(cdz); errbound = o3derrboundA * permanent; if ((det > errbound) || (-det > errbound)) { FPU_RESTORE; return det; } orient = orient3dadapt(pa, pb, pc, pd, permanent); FPU_RESTORE; return orient; } /*****************************************************************************/ /* */ /* incirclefast() Approximate 2D incircle test. Nonrobust. */ /* incircleexact() Exact 2D incircle test. Robust. */ /* incircleslow() Another exact 2D incircle test. Robust. */ /* incircle() Adaptive exact 2D incircle test. Robust. */ /* */ /* Return a positive value if the point pd lies inside the */ /* circle passing through pa, pb, and pc; a negative value if */ /* it lies outside; and zero if the four points are cocircular.*/ /* The points pa, pb, and pc must be in counterclockwise */ /* order, or the sign of the result will be reversed. */ /* */ /* Only the first and last routine should be used; the middle two are for */ /* timings. */ /* */ /* The last three use exact arithmetic to ensure a correct answer. The */ /* result returned is the determinant of a matrix. In incircle() only, */ /* this determinant is computed adaptively, in the sense that exact */ /* arithmetic is used only to the degree it is needed to ensure that the */ /* returned value has the correct sign. Hence, incircle() is usually quite */ /* fast, but will run more slowly when the input points are cocircular or */ /* nearly so. */ /* */ /*****************************************************************************/ static REAL incircleadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL permanent) { INEXACT REAL adx, bdx, cdx, ady, bdy, cdy; REAL det, errbound; INEXACT REAL bdxcdy1, cdxbdy1, cdxady1, adxcdy1, adxbdy1, bdxady1; REAL bdxcdy0, cdxbdy0, cdxady0, adxcdy0, adxbdy0, bdxady0; REAL bc[4], ca[4], ab[4]; INEXACT REAL bc3, ca3, ab3; REAL axbc[8], axxbc[16], aybc[8], ayybc[16], adet[32]; int axbclen, axxbclen, aybclen, ayybclen, alen; REAL bxca[8], bxxca[16], byca[8], byyca[16], bdet[32]; int bxcalen, bxxcalen, bycalen, byycalen, blen; REAL cxab[8], cxxab[16], cyab[8], cyyab[16], cdet[32]; int cxablen, cxxablen, cyablen, cyyablen, clen; REAL abdet[64]; int ablen; REAL fin1[1152], fin2[1152]; REAL *finnow, *finother, *finswap; int finlength; REAL adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail; INEXACT REAL adxadx1, adyady1, bdxbdx1, bdybdy1, cdxcdx1, cdycdy1; REAL adxadx0, adyady0, bdxbdx0, bdybdy0, cdxcdx0, cdycdy0; REAL aa[4], bb[4], cc[4]; INEXACT REAL aa3, bb3, cc3; INEXACT REAL ti1, tj1; REAL ti0, tj0; REAL u[4], v[4]; INEXACT REAL u3, v3; REAL temp8[8], temp16a[16], temp16b[16], temp16c[16]; REAL temp32a[32], temp32b[32], temp48[48], temp64[64]; int temp8len, temp16alen, temp16blen, temp16clen; int temp32alen, temp32blen, temp48len, temp64len; REAL axtbb[8], axtcc[8], aytbb[8], aytcc[8]; int axtbblen, axtcclen, aytbblen, aytcclen; REAL bxtaa[8], bxtcc[8], bytaa[8], bytcc[8]; int bxtaalen, bxtcclen, bytaalen, bytcclen; REAL cxtaa[8], cxtbb[8], cytaa[8], cytbb[8]; int cxtaalen, cxtbblen, cytaalen, cytbblen; REAL axtbc[8], aytbc[8], bxtca[8], bytca[8], cxtab[8], cytab[8]; int axtbclen = 0, aytbclen = 0; int bxtcalen = 0, bytcalen = 0; int cxtablen = 0, cytablen = 0; REAL axtbct[16], aytbct[16], bxtcat[16], bytcat[16], cxtabt[16], cytabt[16]; int axtbctlen, aytbctlen, bxtcatlen, bytcatlen, cxtabtlen, cytabtlen; REAL axtbctt[8], aytbctt[8], bxtcatt[8]; REAL bytcatt[8], cxtabtt[8], cytabtt[8]; int axtbcttlen, aytbcttlen, bxtcattlen, bytcattlen, cxtabttlen, cytabttlen; REAL abt[8], bct[8], cat[8]; int abtlen, bctlen, catlen; REAL abtt[4], bctt[4], catt[4]; int abttlen, bcttlen, cattlen; INEXACT REAL abtt3, bctt3, catt3; REAL negate; INEXACT REAL bvirt; REAL avirt, bround, around; INEXACT REAL c; INEXACT REAL abig; REAL ahi, alo, bhi, blo; REAL err1, err2, err3; INEXACT REAL _i, _j; REAL _0; adx = (REAL) (pa[0] - pd[0]); bdx = (REAL) (pb[0] - pd[0]); cdx = (REAL) (pc[0] - pd[0]); ady = (REAL) (pa[1] - pd[1]); bdy = (REAL) (pb[1] - pd[1]); cdy = (REAL) (pc[1] - pd[1]); Two_Product(bdx, cdy, bdxcdy1, bdxcdy0); Two_Product(cdx, bdy, cdxbdy1, cdxbdy0); Two_Two_Diff(bdxcdy1, bdxcdy0, cdxbdy1, cdxbdy0, bc3, bc[2], bc[1], bc[0]); bc[3] = bc3; axbclen = scale_expansion_zeroelim(4, bc, adx, axbc); axxbclen = scale_expansion_zeroelim(axbclen, axbc, adx, axxbc); aybclen = scale_expansion_zeroelim(4, bc, ady, aybc); ayybclen = scale_expansion_zeroelim(aybclen, aybc, ady, ayybc); alen = fast_expansion_sum_zeroelim(axxbclen, axxbc, ayybclen, ayybc, adet); Two_Product(cdx, ady, cdxady1, cdxady0); Two_Product(adx, cdy, adxcdy1, adxcdy0); Two_Two_Diff(cdxady1, cdxady0, adxcdy1, adxcdy0, ca3, ca[2], ca[1], ca[0]); ca[3] = ca3; bxcalen = scale_expansion_zeroelim(4, ca, bdx, bxca); bxxcalen = scale_expansion_zeroelim(bxcalen, bxca, bdx, bxxca); bycalen = scale_expansion_zeroelim(4, ca, bdy, byca); byycalen = scale_expansion_zeroelim(bycalen, byca, bdy, byyca); blen = fast_expansion_sum_zeroelim(bxxcalen, bxxca, byycalen, byyca, bdet); Two_Product(adx, bdy, adxbdy1, adxbdy0); Two_Product(bdx, ady, bdxady1, bdxady0); Two_Two_Diff(adxbdy1, adxbdy0, bdxady1, bdxady0, ab3, ab[2], ab[1], ab[0]); ab[3] = ab3; cxablen = scale_expansion_zeroelim(4, ab, cdx, cxab); cxxablen = scale_expansion_zeroelim(cxablen, cxab, cdx, cxxab); cyablen = scale_expansion_zeroelim(4, ab, cdy, cyab); cyyablen = scale_expansion_zeroelim(cyablen, cyab, cdy, cyyab); clen = fast_expansion_sum_zeroelim(cxxablen, cxxab, cyyablen, cyyab, cdet); ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet); finlength = fast_expansion_sum_zeroelim(ablen, abdet, clen, cdet, fin1); det = estimate(finlength, fin1); errbound = iccerrboundB * permanent; if ((det >= errbound) || (-det >= errbound)) { return det; } Two_Diff_Tail(pa[0], pd[0], adx, adxtail); Two_Diff_Tail(pa[1], pd[1], ady, adytail); Two_Diff_Tail(pb[0], pd[0], bdx, bdxtail); Two_Diff_Tail(pb[1], pd[1], bdy, bdytail); Two_Diff_Tail(pc[0], pd[0], cdx, cdxtail); Two_Diff_Tail(pc[1], pd[1], cdy, cdytail); if ((adxtail == 0.0) && (bdxtail == 0.0) && (cdxtail == 0.0) && (adytail == 0.0) && (bdytail == 0.0) && (cdytail == 0.0)) { return det; } errbound = iccerrboundC * permanent + resulterrbound * Absolute(det); det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) + 2.0 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) + ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) + 2.0 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) + ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) + 2.0 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx)); if ((det >= errbound) || (-det >= errbound)) { return det; } finnow = fin1; finother = fin2; if ((bdxtail != 0.0) || (bdytail != 0.0) || (cdxtail != 0.0) || (cdytail != 0.0)) { Square(adx, adxadx1, adxadx0); Square(ady, adyady1, adyady0); Two_Two_Sum(adxadx1, adxadx0, adyady1, adyady0, aa3, aa[2], aa[1], aa[0]); aa[3] = aa3; } if ((cdxtail != 0.0) || (cdytail != 0.0) || (adxtail != 0.0) || (adytail != 0.0)) { Square(bdx, bdxbdx1, bdxbdx0); Square(bdy, bdybdy1, bdybdy0); Two_Two_Sum(bdxbdx1, bdxbdx0, bdybdy1, bdybdy0, bb3, bb[2], bb[1], bb[0]); bb[3] = bb3; } if ((adxtail != 0.0) || (adytail != 0.0) || (bdxtail != 0.0) || (bdytail != 0.0)) { Square(cdx, cdxcdx1, cdxcdx0); Square(cdy, cdycdy1, cdycdy0); Two_Two_Sum(cdxcdx1, cdxcdx0, cdycdy1, cdycdy0, cc3, cc[2], cc[1], cc[0]); cc[3] = cc3; } if (adxtail != 0.0) { axtbclen = scale_expansion_zeroelim(4, bc, adxtail, axtbc); temp16alen = scale_expansion_zeroelim(axtbclen, axtbc, 2.0 * adx, temp16a); axtcclen = scale_expansion_zeroelim(4, cc, adxtail, axtcc); temp16blen = scale_expansion_zeroelim(axtcclen, axtcc, bdy, temp16b); axtbblen = scale_expansion_zeroelim(4, bb, adxtail, axtbb); temp16clen = scale_expansion_zeroelim(axtbblen, axtbb, -cdy, temp16c); temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; } if (adytail != 0.0) { aytbclen = scale_expansion_zeroelim(4, bc, adytail, aytbc); temp16alen = scale_expansion_zeroelim(aytbclen, aytbc, 2.0 * ady, temp16a); aytbblen = scale_expansion_zeroelim(4, bb, adytail, aytbb); temp16blen = scale_expansion_zeroelim(aytbblen, aytbb, cdx, temp16b); aytcclen = scale_expansion_zeroelim(4, cc, adytail, aytcc); temp16clen = scale_expansion_zeroelim(aytcclen, aytcc, -bdx, temp16c); temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; } if (bdxtail != 0.0) { bxtcalen = scale_expansion_zeroelim(4, ca, bdxtail, bxtca); temp16alen = scale_expansion_zeroelim(bxtcalen, bxtca, 2.0 * bdx, temp16a); bxtaalen = scale_expansion_zeroelim(4, aa, bdxtail, bxtaa); temp16blen = scale_expansion_zeroelim(bxtaalen, bxtaa, cdy, temp16b); bxtcclen = scale_expansion_zeroelim(4, cc, bdxtail, bxtcc); temp16clen = scale_expansion_zeroelim(bxtcclen, bxtcc, -ady, temp16c); temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; } if (bdytail != 0.0) { bytcalen = scale_expansion_zeroelim(4, ca, bdytail, bytca); temp16alen = scale_expansion_zeroelim(bytcalen, bytca, 2.0 * bdy, temp16a); bytcclen = scale_expansion_zeroelim(4, cc, bdytail, bytcc); temp16blen = scale_expansion_zeroelim(bytcclen, bytcc, adx, temp16b); bytaalen = scale_expansion_zeroelim(4, aa, bdytail, bytaa); temp16clen = scale_expansion_zeroelim(bytaalen, bytaa, -cdx, temp16c); temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; } if (cdxtail != 0.0) { cxtablen = scale_expansion_zeroelim(4, ab, cdxtail, cxtab); temp16alen = scale_expansion_zeroelim(cxtablen, cxtab, 2.0 * cdx, temp16a); cxtbblen = scale_expansion_zeroelim(4, bb, cdxtail, cxtbb); temp16blen = scale_expansion_zeroelim(cxtbblen, cxtbb, ady, temp16b); cxtaalen = scale_expansion_zeroelim(4, aa, cdxtail, cxtaa); temp16clen = scale_expansion_zeroelim(cxtaalen, cxtaa, -bdy, temp16c); temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; } if (cdytail != 0.0) { cytablen = scale_expansion_zeroelim(4, ab, cdytail, cytab); temp16alen = scale_expansion_zeroelim(cytablen, cytab, 2.0 * cdy, temp16a); cytaalen = scale_expansion_zeroelim(4, aa, cdytail, cytaa); temp16blen = scale_expansion_zeroelim(cytaalen, cytaa, bdx, temp16b); cytbblen = scale_expansion_zeroelim(4, bb, cdytail, cytbb); temp16clen = scale_expansion_zeroelim(cytbblen, cytbb, -adx, temp16c); temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; } if ((adxtail != 0.0) || (adytail != 0.0)) { if ((bdxtail != 0.0) || (bdytail != 0.0) || (cdxtail != 0.0) || (cdytail != 0.0)) { Two_Product(bdxtail, cdy, ti1, ti0); Two_Product(bdx, cdytail, tj1, tj0); Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]); u[3] = u3; negate = -bdy; Two_Product(cdxtail, negate, ti1, ti0); negate = -bdytail; Two_Product(cdx, negate, tj1, tj0); Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]); v[3] = v3; bctlen = fast_expansion_sum_zeroelim(4, u, 4, v, bct); Two_Product(bdxtail, cdytail, ti1, ti0); Two_Product(cdxtail, bdytail, tj1, tj0); Two_Two_Diff(ti1, ti0, tj1, tj0, bctt3, bctt[2], bctt[1], bctt[0]); bctt[3] = bctt3; bcttlen = 4; } else { bct[0] = 0.0; bctlen = 1; bctt[0] = 0.0; bcttlen = 1; } if (adxtail != 0.0) { temp16alen = scale_expansion_zeroelim(axtbclen, axtbc, adxtail, temp16a); axtbctlen = scale_expansion_zeroelim(bctlen, bct, adxtail, axtbct); temp32alen = scale_expansion_zeroelim(axtbctlen, axtbct, 2.0 * adx, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; if (bdytail != 0.0) { temp8len = scale_expansion_zeroelim(4, cc, adxtail, temp8); temp16alen = scale_expansion_zeroelim(temp8len, temp8, bdytail, temp16a); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen, temp16a, finother); finswap = finnow; finnow = finother; finother = finswap; } if (cdytail != 0.0) { temp8len = scale_expansion_zeroelim(4, bb, -adxtail, temp8); temp16alen = scale_expansion_zeroelim(temp8len, temp8, cdytail, temp16a); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen, temp16a, finother); finswap = finnow; finnow = finother; finother = finswap; } temp32alen = scale_expansion_zeroelim(axtbctlen, axtbct, adxtail, temp32a); axtbcttlen = scale_expansion_zeroelim(bcttlen, bctt, adxtail, axtbctt); temp16alen = scale_expansion_zeroelim(axtbcttlen, axtbctt, 2.0 * adx, temp16a); temp16blen = scale_expansion_zeroelim(axtbcttlen, axtbctt, adxtail, temp16b); temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32b); temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a, temp32blen, temp32b, temp64); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len, temp64, finother); finswap = finnow; finnow = finother; finother = finswap; } if (adytail != 0.0) { temp16alen = scale_expansion_zeroelim(aytbclen, aytbc, adytail, temp16a); aytbctlen = scale_expansion_zeroelim(bctlen, bct, adytail, aytbct); temp32alen = scale_expansion_zeroelim(aytbctlen, aytbct, 2.0 * ady, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; temp32alen = scale_expansion_zeroelim(aytbctlen, aytbct, adytail, temp32a); aytbcttlen = scale_expansion_zeroelim(bcttlen, bctt, adytail, aytbctt); temp16alen = scale_expansion_zeroelim(aytbcttlen, aytbctt, 2.0 * ady, temp16a); temp16blen = scale_expansion_zeroelim(aytbcttlen, aytbctt, adytail, temp16b); temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32b); temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a, temp32blen, temp32b, temp64); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len, temp64, finother); finswap = finnow; finnow = finother; finother = finswap; } } if ((bdxtail != 0.0) || (bdytail != 0.0)) { if ((cdxtail != 0.0) || (cdytail != 0.0) || (adxtail != 0.0) || (adytail != 0.0)) { Two_Product(cdxtail, ady, ti1, ti0); Two_Product(cdx, adytail, tj1, tj0); Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]); u[3] = u3; negate = -cdy; Two_Product(adxtail, negate, ti1, ti0); negate = -cdytail; Two_Product(adx, negate, tj1, tj0); Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]); v[3] = v3; catlen = fast_expansion_sum_zeroelim(4, u, 4, v, cat); Two_Product(cdxtail, adytail, ti1, ti0); Two_Product(adxtail, cdytail, tj1, tj0); Two_Two_Diff(ti1, ti0, tj1, tj0, catt3, catt[2], catt[1], catt[0]); catt[3] = catt3; cattlen = 4; } else { cat[0] = 0.0; catlen = 1; catt[0] = 0.0; cattlen = 1; } if (bdxtail != 0.0) { temp16alen = scale_expansion_zeroelim(bxtcalen, bxtca, bdxtail, temp16a); bxtcatlen = scale_expansion_zeroelim(catlen, cat, bdxtail, bxtcat); temp32alen = scale_expansion_zeroelim(bxtcatlen, bxtcat, 2.0 * bdx, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; if (cdytail != 0.0) { temp8len = scale_expansion_zeroelim(4, aa, bdxtail, temp8); temp16alen = scale_expansion_zeroelim(temp8len, temp8, cdytail, temp16a); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen, temp16a, finother); finswap = finnow; finnow = finother; finother = finswap; } if (adytail != 0.0) { temp8len = scale_expansion_zeroelim(4, cc, -bdxtail, temp8); temp16alen = scale_expansion_zeroelim(temp8len, temp8, adytail, temp16a); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen, temp16a, finother); finswap = finnow; finnow = finother; finother = finswap; } temp32alen = scale_expansion_zeroelim(bxtcatlen, bxtcat, bdxtail, temp32a); bxtcattlen = scale_expansion_zeroelim(cattlen, catt, bdxtail, bxtcatt); temp16alen = scale_expansion_zeroelim(bxtcattlen, bxtcatt, 2.0 * bdx, temp16a); temp16blen = scale_expansion_zeroelim(bxtcattlen, bxtcatt, bdxtail, temp16b); temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32b); temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a, temp32blen, temp32b, temp64); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len, temp64, finother); finswap = finnow; finnow = finother; finother = finswap; } if (bdytail != 0.0) { temp16alen = scale_expansion_zeroelim(bytcalen, bytca, bdytail, temp16a); bytcatlen = scale_expansion_zeroelim(catlen, cat, bdytail, bytcat); temp32alen = scale_expansion_zeroelim(bytcatlen, bytcat, 2.0 * bdy, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; temp32alen = scale_expansion_zeroelim(bytcatlen, bytcat, bdytail, temp32a); bytcattlen = scale_expansion_zeroelim(cattlen, catt, bdytail, bytcatt); temp16alen = scale_expansion_zeroelim(bytcattlen, bytcatt, 2.0 * bdy, temp16a); temp16blen = scale_expansion_zeroelim(bytcattlen, bytcatt, bdytail, temp16b); temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32b); temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a, temp32blen, temp32b, temp64); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len, temp64, finother); finswap = finnow; finnow = finother; finother = finswap; } } if ((cdxtail != 0.0) || (cdytail != 0.0)) { if ((adxtail != 0.0) || (adytail != 0.0) || (bdxtail != 0.0) || (bdytail != 0.0)) { Two_Product(adxtail, bdy, ti1, ti0); Two_Product(adx, bdytail, tj1, tj0); Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]); u[3] = u3; negate = -ady; Two_Product(bdxtail, negate, ti1, ti0); negate = -adytail; Two_Product(bdx, negate, tj1, tj0); Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]); v[3] = v3; abtlen = fast_expansion_sum_zeroelim(4, u, 4, v, abt); Two_Product(adxtail, bdytail, ti1, ti0); Two_Product(bdxtail, adytail, tj1, tj0); Two_Two_Diff(ti1, ti0, tj1, tj0, abtt3, abtt[2], abtt[1], abtt[0]); abtt[3] = abtt3; abttlen = 4; } else { abt[0] = 0.0; abtlen = 1; abtt[0] = 0.0; abttlen = 1; } if (cdxtail != 0.0) { temp16alen = scale_expansion_zeroelim(cxtablen, cxtab, cdxtail, temp16a); cxtabtlen = scale_expansion_zeroelim(abtlen, abt, cdxtail, cxtabt); temp32alen = scale_expansion_zeroelim(cxtabtlen, cxtabt, 2.0 * cdx, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; if (adytail != 0.0) { temp8len = scale_expansion_zeroelim(4, bb, cdxtail, temp8); temp16alen = scale_expansion_zeroelim(temp8len, temp8, adytail, temp16a); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen, temp16a, finother); finswap = finnow; finnow = finother; finother = finswap; } if (bdytail != 0.0) { temp8len = scale_expansion_zeroelim(4, aa, -cdxtail, temp8); temp16alen = scale_expansion_zeroelim(temp8len, temp8, bdytail, temp16a); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen, temp16a, finother); finswap = finnow; finnow = finother; finother = finswap; } temp32alen = scale_expansion_zeroelim(cxtabtlen, cxtabt, cdxtail, temp32a); cxtabttlen = scale_expansion_zeroelim(abttlen, abtt, cdxtail, cxtabtt); temp16alen = scale_expansion_zeroelim(cxtabttlen, cxtabtt, 2.0 * cdx, temp16a); temp16blen = scale_expansion_zeroelim(cxtabttlen, cxtabtt, cdxtail, temp16b); temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32b); temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a, temp32blen, temp32b, temp64); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len, temp64, finother); finswap = finnow; finnow = finother; finother = finswap; } if (cdytail != 0.0) { temp16alen = scale_expansion_zeroelim(cytablen, cytab, cdytail, temp16a); cytabtlen = scale_expansion_zeroelim(abtlen, abt, cdytail, cytabt); temp32alen = scale_expansion_zeroelim(cytabtlen, cytabt, 2.0 * cdy, temp32a); temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp32alen, temp32a, temp48); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len, temp48, finother); finswap = finnow; finnow = finother; finother = finswap; temp32alen = scale_expansion_zeroelim(cytabtlen, cytabt, cdytail, temp32a); cytabttlen = scale_expansion_zeroelim(abttlen, abtt, cdytail, cytabtt); temp16alen = scale_expansion_zeroelim(cytabttlen, cytabtt, 2.0 * cdy, temp16a); temp16blen = scale_expansion_zeroelim(cytabttlen, cytabtt, cdytail, temp16b); temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a, temp16blen, temp16b, temp32b); temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a, temp32blen, temp32b, temp64); finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len, temp64, finother); finswap = finnow; finnow = finother; finother = finswap; } } return finnow[finlength - 1]; } REAL incircle(pa, pb, pc, pd) REAL *pa; REAL *pb; REAL *pc; REAL *pd; { REAL adx, bdx, cdx, ady, bdy, cdy; REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady; REAL alift, blift, clift; REAL det; REAL permanent, errbound; REAL inc; FPU_ROUND_DOUBLE; adx = pa[0] - pd[0]; bdx = pb[0] - pd[0]; cdx = pc[0] - pd[0]; ady = pa[1] - pd[1]; bdy = pb[1] - pd[1]; cdy = pc[1] - pd[1]; bdxcdy = bdx * cdy; cdxbdy = cdx * bdy; alift = adx * adx + ady * ady; cdxady = cdx * ady; adxcdy = adx * cdy; blift = bdx * bdx + bdy * bdy; adxbdy = adx * bdy; bdxady = bdx * ady; clift = cdx * cdx + cdy * cdy; det = alift * (bdxcdy - cdxbdy) + blift * (cdxady - adxcdy) + clift * (adxbdy - bdxady); permanent = (Absolute(bdxcdy) + Absolute(cdxbdy)) * alift + (Absolute(cdxady) + Absolute(adxcdy)) * blift + (Absolute(adxbdy) + Absolute(bdxady)) * clift; errbound = iccerrboundA * permanent; if ((det > errbound) || (-det > errbound)) { FPU_RESTORE; return det; } inc = incircleadapt(pa, pb, pc, pd, permanent); FPU_RESTORE; return inc; } /*****************************************************************************/ /* */ /* inspherefast() Approximate 3D insphere test. Nonrobust. */ /* insphereexact() Exact 3D insphere test. Robust. */ /* insphereslow() Another exact 3D insphere test. Robust. */ /* insphere() Adaptive exact 3D insphere test. Robust. */ /* */ /* Return a positive value if the point pe lies inside the */ /* sphere passing through pa, pb, pc, and pd; a negative value */ /* if it lies outside; and zero if the five points are */ /* cospherical. The points pa, pb, pc, and pd must be ordered */ /* so that they have a positive orientation (as defined by */ /* orient3d()), or the sign of the result will be reversed. */ /* */ /* Only the first and last routine should be used; the middle two are for */ /* timings. */ /* */ /* The last three use exact arithmetic to ensure a correct answer. The */ /* result returned is the determinant of a matrix. In insphere() only, */ /* this determinant is computed adaptively, in the sense that exact */ /* arithmetic is used only to the degree it is needed to ensure that the */ /* returned value has the correct sign. Hence, insphere() is usually quite */ /* fast, but will run more slowly when the input points are cospherical or */ /* nearly so. */ /* */ /*****************************************************************************/ static REAL insphereexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe) { INEXACT REAL axby1, bxcy1, cxdy1, dxey1, exay1; INEXACT REAL bxay1, cxby1, dxcy1, exdy1, axey1; INEXACT REAL axcy1, bxdy1, cxey1, dxay1, exby1; INEXACT REAL cxay1, dxby1, excy1, axdy1, bxey1; REAL axby0, bxcy0, cxdy0, dxey0, exay0; REAL bxay0, cxby0, dxcy0, exdy0, axey0; REAL axcy0, bxdy0, cxey0, dxay0, exby0; REAL cxay0, dxby0, excy0, axdy0, bxey0; REAL ab[4], bc[4], cd[4], de[4], ea[4]; REAL ac[4], bd[4], ce[4], da[4], eb[4]; REAL temp8a[8], temp8b[8], temp16[16]; int temp8alen, temp8blen, temp16len; REAL abc[24], bcd[24], cde[24], dea[24], eab[24]; REAL abd[24], bce[24], cda[24], deb[24], eac[24]; int abclen, bcdlen, cdelen, dealen, eablen; int abdlen, bcelen, cdalen, deblen, eaclen; REAL temp48a[48], temp48b[48]; int temp48alen, temp48blen; REAL abcd[96], bcde[96], cdea[96], deab[96], eabc[96]; int abcdlen, bcdelen, cdealen, deablen, eabclen; REAL temp192[192]; REAL det384x[384], det384y[384], det384z[384]; int xlen, ylen, zlen; REAL detxy[768]; int xylen; REAL adet[1152], bdet[1152], cdet[1152], ddet[1152], edet[1152]; int alen, blen, clen, dlen, elen; REAL abdet[2304], cddet[2304], cdedet[3456]; int ablen, cdlen; REAL deter[5760]; int deterlen; int i; INEXACT REAL bvirt; REAL avirt, bround, around; INEXACT REAL c; INEXACT REAL abig; REAL ahi, alo, bhi, blo; REAL err1, err2, err3; INEXACT REAL _i, _j; REAL _0; Two_Product(pa[0], pb[1], axby1, axby0); Two_Product(pb[0], pa[1], bxay1, bxay0); Two_Two_Diff(axby1, axby0, bxay1, bxay0, ab[3], ab[2], ab[1], ab[0]); Two_Product(pb[0], pc[1], bxcy1, bxcy0); Two_Product(pc[0], pb[1], cxby1, cxby0); Two_Two_Diff(bxcy1, bxcy0, cxby1, cxby0, bc[3], bc[2], bc[1], bc[0]); Two_Product(pc[0], pd[1], cxdy1, cxdy0); Two_Product(pd[0], pc[1], dxcy1, dxcy0); Two_Two_Diff(cxdy1, cxdy0, dxcy1, dxcy0, cd[3], cd[2], cd[1], cd[0]); Two_Product(pd[0], pe[1], dxey1, dxey0); Two_Product(pe[0], pd[1], exdy1, exdy0); Two_Two_Diff(dxey1, dxey0, exdy1, exdy0, de[3], de[2], de[1], de[0]); Two_Product(pe[0], pa[1], exay1, exay0); Two_Product(pa[0], pe[1], axey1, axey0); Two_Two_Diff(exay1, exay0, axey1, axey0, ea[3], ea[2], ea[1], ea[0]); Two_Product(pa[0], pc[1], axcy1, axcy0); Two_Product(pc[0], pa[1], cxay1, cxay0); Two_Two_Diff(axcy1, axcy0, cxay1, cxay0, ac[3], ac[2], ac[1], ac[0]); Two_Product(pb[0], pd[1], bxdy1, bxdy0); Two_Product(pd[0], pb[1], dxby1, dxby0); Two_Two_Diff(bxdy1, bxdy0, dxby1, dxby0, bd[3], bd[2], bd[1], bd[0]); Two_Product(pc[0], pe[1], cxey1, cxey0); Two_Product(pe[0], pc[1], excy1, excy0); Two_Two_Diff(cxey1, cxey0, excy1, excy0, ce[3], ce[2], ce[1], ce[0]); Two_Product(pd[0], pa[1], dxay1, dxay0); Two_Product(pa[0], pd[1], axdy1, axdy0); Two_Two_Diff(dxay1, dxay0, axdy1, axdy0, da[3], da[2], da[1], da[0]); Two_Product(pe[0], pb[1], exby1, exby0); Two_Product(pb[0], pe[1], bxey1, bxey0); Two_Two_Diff(exby1, exby0, bxey1, bxey0, eb[3], eb[2], eb[1], eb[0]); temp8alen = scale_expansion_zeroelim(4, bc, pa[2], temp8a); temp8blen = scale_expansion_zeroelim(4, ac, -pb[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, ab, pc[2], temp8a); abclen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, abc); temp8alen = scale_expansion_zeroelim(4, cd, pb[2], temp8a); temp8blen = scale_expansion_zeroelim(4, bd, -pc[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, bc, pd[2], temp8a); bcdlen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, bcd); temp8alen = scale_expansion_zeroelim(4, de, pc[2], temp8a); temp8blen = scale_expansion_zeroelim(4, ce, -pd[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, cd, pe[2], temp8a); cdelen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, cde); temp8alen = scale_expansion_zeroelim(4, ea, pd[2], temp8a); temp8blen = scale_expansion_zeroelim(4, da, -pe[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, de, pa[2], temp8a); dealen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, dea); temp8alen = scale_expansion_zeroelim(4, ab, pe[2], temp8a); temp8blen = scale_expansion_zeroelim(4, eb, -pa[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, ea, pb[2], temp8a); eablen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, eab); temp8alen = scale_expansion_zeroelim(4, bd, pa[2], temp8a); temp8blen = scale_expansion_zeroelim(4, da, pb[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, ab, pd[2], temp8a); abdlen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, abd); temp8alen = scale_expansion_zeroelim(4, ce, pb[2], temp8a); temp8blen = scale_expansion_zeroelim(4, eb, pc[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, bc, pe[2], temp8a); bcelen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, bce); temp8alen = scale_expansion_zeroelim(4, da, pc[2], temp8a); temp8blen = scale_expansion_zeroelim(4, ac, pd[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, cd, pa[2], temp8a); cdalen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, cda); temp8alen = scale_expansion_zeroelim(4, eb, pd[2], temp8a); temp8blen = scale_expansion_zeroelim(4, bd, pe[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, de, pb[2], temp8a); deblen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, deb); temp8alen = scale_expansion_zeroelim(4, ac, pe[2], temp8a); temp8blen = scale_expansion_zeroelim(4, ce, pa[2], temp8b); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp8alen = scale_expansion_zeroelim(4, ea, pc[2], temp8a); eaclen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16, eac); temp48alen = fast_expansion_sum_zeroelim(cdelen, cde, bcelen, bce, temp48a); temp48blen = fast_expansion_sum_zeroelim(deblen, deb, bcdlen, bcd, temp48b); for (i = 0; i < temp48blen; i++) { temp48b[i] = -temp48b[i]; } bcdelen = fast_expansion_sum_zeroelim(temp48alen, temp48a, temp48blen, temp48b, bcde); xlen = scale_expansion_zeroelim(bcdelen, bcde, pa[0], temp192); xlen = scale_expansion_zeroelim(xlen, temp192, pa[0], det384x); ylen = scale_expansion_zeroelim(bcdelen, bcde, pa[1], temp192); ylen = scale_expansion_zeroelim(ylen, temp192, pa[1], det384y); zlen = scale_expansion_zeroelim(bcdelen, bcde, pa[2], temp192); zlen = scale_expansion_zeroelim(zlen, temp192, pa[2], det384z); xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy); alen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, adet); temp48alen = fast_expansion_sum_zeroelim(dealen, dea, cdalen, cda, temp48a); temp48blen = fast_expansion_sum_zeroelim(eaclen, eac, cdelen, cde, temp48b); for (i = 0; i < temp48blen; i++) { temp48b[i] = -temp48b[i]; } cdealen = fast_expansion_sum_zeroelim(temp48alen, temp48a, temp48blen, temp48b, cdea); xlen = scale_expansion_zeroelim(cdealen, cdea, pb[0], temp192); xlen = scale_expansion_zeroelim(xlen, temp192, pb[0], det384x); ylen = scale_expansion_zeroelim(cdealen, cdea, pb[1], temp192); ylen = scale_expansion_zeroelim(ylen, temp192, pb[1], det384y); zlen = scale_expansion_zeroelim(cdealen, cdea, pb[2], temp192); zlen = scale_expansion_zeroelim(zlen, temp192, pb[2], det384z); xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy); blen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, bdet); temp48alen = fast_expansion_sum_zeroelim(eablen, eab, deblen, deb, temp48a); temp48blen = fast_expansion_sum_zeroelim(abdlen, abd, dealen, dea, temp48b); for (i = 0; i < temp48blen; i++) { temp48b[i] = -temp48b[i]; } deablen = fast_expansion_sum_zeroelim(temp48alen, temp48a, temp48blen, temp48b, deab); xlen = scale_expansion_zeroelim(deablen, deab, pc[0], temp192); xlen = scale_expansion_zeroelim(xlen, temp192, pc[0], det384x); ylen = scale_expansion_zeroelim(deablen, deab, pc[1], temp192); ylen = scale_expansion_zeroelim(ylen, temp192, pc[1], det384y); zlen = scale_expansion_zeroelim(deablen, deab, pc[2], temp192); zlen = scale_expansion_zeroelim(zlen, temp192, pc[2], det384z); xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy); clen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, cdet); temp48alen = fast_expansion_sum_zeroelim(abclen, abc, eaclen, eac, temp48a); temp48blen = fast_expansion_sum_zeroelim(bcelen, bce, eablen, eab, temp48b); for (i = 0; i < temp48blen; i++) { temp48b[i] = -temp48b[i]; } eabclen = fast_expansion_sum_zeroelim(temp48alen, temp48a, temp48blen, temp48b, eabc); xlen = scale_expansion_zeroelim(eabclen, eabc, pd[0], temp192); xlen = scale_expansion_zeroelim(xlen, temp192, pd[0], det384x); ylen = scale_expansion_zeroelim(eabclen, eabc, pd[1], temp192); ylen = scale_expansion_zeroelim(ylen, temp192, pd[1], det384y); zlen = scale_expansion_zeroelim(eabclen, eabc, pd[2], temp192); zlen = scale_expansion_zeroelim(zlen, temp192, pd[2], det384z); xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy); dlen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, ddet); temp48alen = fast_expansion_sum_zeroelim(bcdlen, bcd, abdlen, abd, temp48a); temp48blen = fast_expansion_sum_zeroelim(cdalen, cda, abclen, abc, temp48b); for (i = 0; i < temp48blen; i++) { temp48b[i] = -temp48b[i]; } abcdlen = fast_expansion_sum_zeroelim(temp48alen, temp48a, temp48blen, temp48b, abcd); xlen = scale_expansion_zeroelim(abcdlen, abcd, pe[0], temp192); xlen = scale_expansion_zeroelim(xlen, temp192, pe[0], det384x); ylen = scale_expansion_zeroelim(abcdlen, abcd, pe[1], temp192); ylen = scale_expansion_zeroelim(ylen, temp192, pe[1], det384y); zlen = scale_expansion_zeroelim(abcdlen, abcd, pe[2], temp192); zlen = scale_expansion_zeroelim(zlen, temp192, pe[2], det384z); xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy); elen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, edet); ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet); cdlen = fast_expansion_sum_zeroelim(clen, cdet, dlen, ddet, cddet); cdelen = fast_expansion_sum_zeroelim(cdlen, cddet, elen, edet, cdedet); deterlen = fast_expansion_sum_zeroelim(ablen, abdet, cdelen, cdedet, deter); return deter[deterlen - 1]; } static REAL insphereadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe, REAL permanent) { INEXACT REAL aex, bex, cex, dex, aey, bey, cey, dey, aez, bez, cez, dez; REAL det, errbound; INEXACT REAL aexbey1, bexaey1, bexcey1, cexbey1; INEXACT REAL cexdey1, dexcey1, dexaey1, aexdey1; INEXACT REAL aexcey1, cexaey1, bexdey1, dexbey1; REAL aexbey0, bexaey0, bexcey0, cexbey0; REAL cexdey0, dexcey0, dexaey0, aexdey0; REAL aexcey0, cexaey0, bexdey0, dexbey0; REAL ab[4], bc[4], cd[4], da[4], ac[4], bd[4]; INEXACT REAL ab3, bc3, cd3, da3, ac3, bd3; REAL abeps, bceps, cdeps, daeps, aceps, bdeps; REAL temp8a[8], temp8b[8], temp8c[8], temp16[16], temp24[24], temp48[48]; int temp8alen, temp8blen, temp8clen, temp16len, temp24len, temp48len; REAL xdet[96], ydet[96], zdet[96], xydet[192]; int xlen, ylen, zlen, xylen; REAL adet[288], bdet[288], cdet[288], ddet[288]; int alen, blen, clen, dlen; REAL abdet[576], cddet[576]; int ablen, cdlen; REAL fin1[1152]; int finlength; REAL aextail, bextail, cextail, dextail; REAL aeytail, beytail, ceytail, deytail; REAL aeztail, beztail, ceztail, deztail; INEXACT REAL bvirt; REAL avirt, bround, around; INEXACT REAL c; INEXACT REAL abig; REAL ahi, alo, bhi, blo; REAL err1, err2, err3; INEXACT REAL _i, _j; REAL _0; aex = (REAL) (pa[0] - pe[0]); bex = (REAL) (pb[0] - pe[0]); cex = (REAL) (pc[0] - pe[0]); dex = (REAL) (pd[0] - pe[0]); aey = (REAL) (pa[1] - pe[1]); bey = (REAL) (pb[1] - pe[1]); cey = (REAL) (pc[1] - pe[1]); dey = (REAL) (pd[1] - pe[1]); aez = (REAL) (pa[2] - pe[2]); bez = (REAL) (pb[2] - pe[2]); cez = (REAL) (pc[2] - pe[2]); dez = (REAL) (pd[2] - pe[2]); Two_Product(aex, bey, aexbey1, aexbey0); Two_Product(bex, aey, bexaey1, bexaey0); Two_Two_Diff(aexbey1, aexbey0, bexaey1, bexaey0, ab3, ab[2], ab[1], ab[0]); ab[3] = ab3; Two_Product(bex, cey, bexcey1, bexcey0); Two_Product(cex, bey, cexbey1, cexbey0); Two_Two_Diff(bexcey1, bexcey0, cexbey1, cexbey0, bc3, bc[2], bc[1], bc[0]); bc[3] = bc3; Two_Product(cex, dey, cexdey1, cexdey0); Two_Product(dex, cey, dexcey1, dexcey0); Two_Two_Diff(cexdey1, cexdey0, dexcey1, dexcey0, cd3, cd[2], cd[1], cd[0]); cd[3] = cd3; Two_Product(dex, aey, dexaey1, dexaey0); Two_Product(aex, dey, aexdey1, aexdey0); Two_Two_Diff(dexaey1, dexaey0, aexdey1, aexdey0, da3, da[2], da[1], da[0]); da[3] = da3; Two_Product(aex, cey, aexcey1, aexcey0); Two_Product(cex, aey, cexaey1, cexaey0); Two_Two_Diff(aexcey1, aexcey0, cexaey1, cexaey0, ac3, ac[2], ac[1], ac[0]); ac[3] = ac3; Two_Product(bex, dey, bexdey1, bexdey0); Two_Product(dex, bey, dexbey1, dexbey0); Two_Two_Diff(bexdey1, bexdey0, dexbey1, dexbey0, bd3, bd[2], bd[1], bd[0]); bd[3] = bd3; temp8alen = scale_expansion_zeroelim(4, cd, bez, temp8a); temp8blen = scale_expansion_zeroelim(4, bd, -cez, temp8b); temp8clen = scale_expansion_zeroelim(4, bc, dez, temp8c); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c, temp16len, temp16, temp24); temp48len = scale_expansion_zeroelim(temp24len, temp24, aex, temp48); xlen = scale_expansion_zeroelim(temp48len, temp48, -aex, xdet); temp48len = scale_expansion_zeroelim(temp24len, temp24, aey, temp48); ylen = scale_expansion_zeroelim(temp48len, temp48, -aey, ydet); temp48len = scale_expansion_zeroelim(temp24len, temp24, aez, temp48); zlen = scale_expansion_zeroelim(temp48len, temp48, -aez, zdet); xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet); alen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, adet); temp8alen = scale_expansion_zeroelim(4, da, cez, temp8a); temp8blen = scale_expansion_zeroelim(4, ac, dez, temp8b); temp8clen = scale_expansion_zeroelim(4, cd, aez, temp8c); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c, temp16len, temp16, temp24); temp48len = scale_expansion_zeroelim(temp24len, temp24, bex, temp48); xlen = scale_expansion_zeroelim(temp48len, temp48, bex, xdet); temp48len = scale_expansion_zeroelim(temp24len, temp24, bey, temp48); ylen = scale_expansion_zeroelim(temp48len, temp48, bey, ydet); temp48len = scale_expansion_zeroelim(temp24len, temp24, bez, temp48); zlen = scale_expansion_zeroelim(temp48len, temp48, bez, zdet); xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet); blen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, bdet); temp8alen = scale_expansion_zeroelim(4, ab, dez, temp8a); temp8blen = scale_expansion_zeroelim(4, bd, aez, temp8b); temp8clen = scale_expansion_zeroelim(4, da, bez, temp8c); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c, temp16len, temp16, temp24); temp48len = scale_expansion_zeroelim(temp24len, temp24, cex, temp48); xlen = scale_expansion_zeroelim(temp48len, temp48, -cex, xdet); temp48len = scale_expansion_zeroelim(temp24len, temp24, cey, temp48); ylen = scale_expansion_zeroelim(temp48len, temp48, -cey, ydet); temp48len = scale_expansion_zeroelim(temp24len, temp24, cez, temp48); zlen = scale_expansion_zeroelim(temp48len, temp48, -cez, zdet); xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet); clen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, cdet); temp8alen = scale_expansion_zeroelim(4, bc, aez, temp8a); temp8blen = scale_expansion_zeroelim(4, ac, -bez, temp8b); temp8clen = scale_expansion_zeroelim(4, ab, cez, temp8c); temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b, temp16); temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c, temp16len, temp16, temp24); temp48len = scale_expansion_zeroelim(temp24len, temp24, dex, temp48); xlen = scale_expansion_zeroelim(temp48len, temp48, dex, xdet); temp48len = scale_expansion_zeroelim(temp24len, temp24, dey, temp48); ylen = scale_expansion_zeroelim(temp48len, temp48, dey, ydet); temp48len = scale_expansion_zeroelim(temp24len, temp24, dez, temp48); zlen = scale_expansion_zeroelim(temp48len, temp48, dez, zdet); xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet); dlen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, ddet); ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet); cdlen = fast_expansion_sum_zeroelim(clen, cdet, dlen, ddet, cddet); finlength = fast_expansion_sum_zeroelim(ablen, abdet, cdlen, cddet, fin1); det = estimate(finlength, fin1); errbound = isperrboundB * permanent; if ((det >= errbound) || (-det >= errbound)) { return det; } Two_Diff_Tail(pa[0], pe[0], aex, aextail); Two_Diff_Tail(pa[1], pe[1], aey, aeytail); Two_Diff_Tail(pa[2], pe[2], aez, aeztail); Two_Diff_Tail(pb[0], pe[0], bex, bextail); Two_Diff_Tail(pb[1], pe[1], bey, beytail); Two_Diff_Tail(pb[2], pe[2], bez, beztail); Two_Diff_Tail(pc[0], pe[0], cex, cextail); Two_Diff_Tail(pc[1], pe[1], cey, ceytail); Two_Diff_Tail(pc[2], pe[2], cez, ceztail); Two_Diff_Tail(pd[0], pe[0], dex, dextail); Two_Diff_Tail(pd[1], pe[1], dey, deytail); Two_Diff_Tail(pd[2], pe[2], dez, deztail); if ((aextail == 0.0) && (aeytail == 0.0) && (aeztail == 0.0) && (bextail == 0.0) && (beytail == 0.0) && (beztail == 0.0) && (cextail == 0.0) && (ceytail == 0.0) && (ceztail == 0.0) && (dextail == 0.0) && (deytail == 0.0) && (deztail == 0.0)) { return det; } errbound = isperrboundC * permanent + resulterrbound * Absolute(det); abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail); bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail); cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail); daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail); aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail); bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail); det += (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) + (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) * ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) - ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) + (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) * ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) + 2.0 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) + (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) - ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) + (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3))); if ((det >= errbound) || (-det >= errbound)) { return det; } return insphereexact(pa, pb, pc, pd, pe); } REAL insphere(pa, pb, pc, pd, pe) REAL *pa; REAL *pb; REAL *pc; REAL *pd; REAL *pe; { REAL aex, bex, cex, dex; REAL aey, bey, cey, dey; REAL aez, bez, cez, dez; REAL aexbey, bexaey, bexcey, cexbey, cexdey, dexcey, dexaey, aexdey; REAL aexcey, cexaey, bexdey, dexbey; REAL alift, blift, clift, dlift; REAL ab, bc, cd, da, ac, bd; REAL abc, bcd, cda, dab; REAL aezplus, bezplus, cezplus, dezplus; REAL aexbeyplus, bexaeyplus, bexceyplus, cexbeyplus; REAL cexdeyplus, dexceyplus, dexaeyplus, aexdeyplus; REAL aexceyplus, cexaeyplus, bexdeyplus, dexbeyplus; REAL det; REAL permanent, errbound; REAL ins; FPU_ROUND_DOUBLE; aex = pa[0] - pe[0]; bex = pb[0] - pe[0]; cex = pc[0] - pe[0]; dex = pd[0] - pe[0]; aey = pa[1] - pe[1]; bey = pb[1] - pe[1]; cey = pc[1] - pe[1]; dey = pd[1] - pe[1]; aez = pa[2] - pe[2]; bez = pb[2] - pe[2]; cez = pc[2] - pe[2]; dez = pd[2] - pe[2]; aexbey = aex * bey; bexaey = bex * aey; ab = aexbey - bexaey; bexcey = bex * cey; cexbey = cex * bey; bc = bexcey - cexbey; cexdey = cex * dey; dexcey = dex * cey; cd = cexdey - dexcey; dexaey = dex * aey; aexdey = aex * dey; da = dexaey - aexdey; aexcey = aex * cey; cexaey = cex * aey; ac = aexcey - cexaey; bexdey = bex * dey; dexbey = dex * bey; bd = bexdey - dexbey; abc = aez * bc - bez * ac + cez * ab; bcd = bez * cd - cez * bd + dez * bc; cda = cez * da + dez * ac + aez * cd; dab = dez * ab + aez * bd + bez * da; alift = aex * aex + aey * aey + aez * aez; blift = bex * bex + bey * bey + bez * bez; clift = cex * cex + cey * cey + cez * cez; dlift = dex * dex + dey * dey + dez * dez; det = (dlift * abc - clift * dab) + (blift * cda - alift * bcd); aezplus = Absolute(aez); bezplus = Absolute(bez); cezplus = Absolute(cez); dezplus = Absolute(dez); aexbeyplus = Absolute(aexbey); bexaeyplus = Absolute(bexaey); bexceyplus = Absolute(bexcey); cexbeyplus = Absolute(cexbey); cexdeyplus = Absolute(cexdey); dexceyplus = Absolute(dexcey); dexaeyplus = Absolute(dexaey); aexdeyplus = Absolute(aexdey); aexceyplus = Absolute(aexcey); cexaeyplus = Absolute(cexaey); bexdeyplus = Absolute(bexdey); dexbeyplus = Absolute(dexbey); permanent = ((cexdeyplus + dexceyplus) * bezplus + (dexbeyplus + bexdeyplus) * cezplus + (bexceyplus + cexbeyplus) * dezplus) * alift + ((dexaeyplus + aexdeyplus) * cezplus + (aexceyplus + cexaeyplus) * dezplus + (cexdeyplus + dexceyplus) * aezplus) * blift + ((aexbeyplus + bexaeyplus) * dezplus + (bexdeyplus + dexbeyplus) * aezplus + (dexaeyplus + aexdeyplus) * bezplus) * clift + ((bexceyplus + cexbeyplus) * aezplus + (cexaeyplus + aexceyplus) * bezplus + (aexbeyplus + bexaeyplus) * cezplus) * dlift; errbound = isperrboundA * permanent; if ((det > errbound) || (-det > errbound)) { FPU_RESTORE; return det; } ins = insphereadapt(pa, pb, pc, pd, pe, permanent); FPU_RESTORE; return ins; } gts-snapshot-121130/src/named.c0000644000175100017510000001076712055775440013223 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void nvertex_read (GtsObject ** po, GtsFile * fp) { if ((*po)->klass->parent_class->read) (* (*po)->klass->parent_class->read) (po, fp); if (fp->type != '\n' && fp->type != GTS_ERROR) { strncpy (GTS_NVERTEX (*po)->name, fp->token->str, GTS_NAME_LENGTH); gts_file_next_token (fp); } } static void nvertex_write (GtsObject * o, FILE * fptr) { GtsNVertex * nv = GTS_NVERTEX (o); (* o->klass->parent_class->write) (o, fptr); if (nv->name[0] != '\0') fprintf (fptr, " %s", nv->name); } static void nvertex_class_init (GtsNVertexClass * klass) { GTS_OBJECT_CLASS (klass)->read = nvertex_read; GTS_OBJECT_CLASS (klass)->write = nvertex_write; } static void nvertex_init (GtsNVertex * nvertex) { nvertex->name[0] = '\0'; } /** * gts_nvertex_class: * * Returns: the #GtsNVertexClass. */ GtsNVertexClass * gts_nvertex_class (void) { static GtsNVertexClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo nvertex_info = { "GtsNVertex", sizeof (GtsNVertex), sizeof (GtsNVertexClass), (GtsObjectClassInitFunc) nvertex_class_init, (GtsObjectInitFunc) nvertex_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_vertex_class ()), &nvertex_info); } return klass; } static void nedge_read (GtsObject ** po, GtsFile * fp) { if (fp->type != GTS_STRING) { gts_file_error (fp, "expecting a string (name)"); return; } strncpy (GTS_NEDGE (*po)->name, fp->token->str, GTS_NAME_LENGTH); gts_file_next_token (fp); } static void nedge_write (GtsObject * o, FILE * fptr) { GtsNEdge * ne = GTS_NEDGE (o); if (ne->name[0] != '\0') fprintf (fptr, " %s", ne->name); } static void nedge_class_init (GtsNEdgeClass * klass) { GTS_OBJECT_CLASS (klass)->read = nedge_read; GTS_OBJECT_CLASS (klass)->write = nedge_write; } static void nedge_init (GtsNEdge * nedge) { nedge->name[0] = '\0'; } /** * gts_nedge_class: * * Returns: the #GtsNEdgeClass. */ GtsNEdgeClass * gts_nedge_class (void) { static GtsNEdgeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo nedge_info = { "GtsNEdge", sizeof (GtsNEdge), sizeof (GtsNEdgeClass), (GtsObjectClassInitFunc) nedge_class_init, (GtsObjectInitFunc) nedge_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_edge_class ()), &nedge_info); } return klass; } static void nface_read (GtsObject ** po, GtsFile * fp) { if (fp->type != GTS_STRING) { gts_file_error (fp, "expecting a string (name)"); return; } strncpy (GTS_NFACE (*po)->name, fp->token->str, GTS_NAME_LENGTH); gts_file_next_token (fp); } static void nface_write (GtsObject * o, FILE * fptr) { GtsNFace * nf = GTS_NFACE (o); if (nf->name[0] != '\0') fprintf (fptr, " %s", GTS_NFACE (o)->name); } static void nface_class_init (GtsNFaceClass * klass) { GTS_OBJECT_CLASS (klass)->read = nface_read; GTS_OBJECT_CLASS (klass)->write = nface_write; } static void nface_init (GtsNFace * nface) { nface->name[0] = '\0'; } /** * gts_nface_class: * * Returns: the #GtsNFaceClass. */ GtsNFaceClass * gts_nface_class (void) { static GtsNFaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo nface_info = { "GtsNFace", sizeof (GtsNFace), sizeof (GtsNFaceClass), (GtsObjectClassInitFunc) nface_class_init, (GtsObjectInitFunc) nface_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_face_class ()), &nface_info); } return klass; } gts-snapshot-121130/src/gtsconfig.h0000644000175100017510000000035212055775454014121 00000000000000/* gtsconfig.h * * This is a generated file. Please modify `configure.ac' */ #ifndef GTSCONFIG_H #define GTSCONFIG_H #define GTS_MAJOR_VERSION 0 #define GTS_MINOR_VERSION 7 #define GTS_MICRO_VERSION 6 #endif /* GTSCONFIG_H */ gts-snapshot-121130/src/NOTES0000644000175100017510000000021712055775440012573 00000000000000- hsurface may create surfaces with duplicates edges and triangles (because of collapses of "empty triangles"). - psurface however will not. gts-snapshot-121130/src/psurface.c0000644000175100017510000003142112055775440013735 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" #define HEAP_INSERT_OBJECT(h, e) (GTS_OBJECT (e)->reserved =\ gts_eheap_insert (h, e)) #define HEAP_REMOVE_OBJECT(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\ GTS_OBJECT (e)->reserved = NULL) static void psurface_destroy (GtsObject * object) { GtsPSurface * ps = GTS_PSURFACE (object); guint i; if (!GTS_PSURFACE_IS_CLOSED (ps)) gts_psurface_close (ps); for (i = 0; i < ps->split->len; i++) if (g_ptr_array_index (ps->split, i)) gts_object_destroy (GTS_OBJECT (g_ptr_array_index (ps->split, i))); g_ptr_array_free (ps->split, TRUE); (* GTS_OBJECT_CLASS (gts_psurface_class ())->parent_class->destroy) (object); } static void psurface_class_init (GtsObjectClass * klass) { klass->destroy = psurface_destroy; } static void psurface_init (GtsPSurface * psurface) { psurface->s = NULL; psurface->split = g_ptr_array_new (); psurface->split_class = gts_split_class (); psurface->pos = psurface->min = 0; psurface->vertices = psurface->faces = NULL; } /** * gts_psurface_class: * * Returns: the #GtsPSurfaceClass. */ GtsPSurfaceClass * gts_psurface_class (void) { static GtsPSurfaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo psurface_info = { "GtsPSurface", sizeof (GtsPSurface), sizeof (GtsPSurfaceClass), (GtsObjectClassInitFunc) psurface_class_init, (GtsObjectInitFunc) psurface_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &psurface_info); } return klass; } static GtsVertex * edge_collapse (GtsPSurface * ps, GtsEdge * e, GtsEHeap * heap, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, gdouble maxcosine2) { GtsVertex * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid; GtsSplit * vs; GtsObject * o1, * o2; /* if the edge is degenerate (i.e. v1 == v2), destroy and return */ if (v1 == v2) { gts_object_destroy (GTS_OBJECT (e)); return NULL; } if (!gts_edge_collapse_is_valid (e) || /* check that a non-manifold edge is not a contact edge */ (g_slist_length (e->triangles) > 2 && gts_edge_is_contact (e) > 1)) { GTS_OBJECT (e)->reserved = gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE); return NULL; } mid = (*coarsen_func) (e, ps->s->vertex_class, coarsen_data); if (gts_edge_collapse_creates_fold (e, mid, maxcosine2)) { GTS_OBJECT (e)->reserved = gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE); gts_object_destroy (GTS_OBJECT (mid)); return NULL; } if (GTS_OBJECT (v1)->reserved) o1 = GTS_OBJECT (v1)->reserved; else o1 = GTS_OBJECT (v1); if (GTS_OBJECT (v2)->reserved) o2 = GTS_OBJECT (v2)->reserved; else o2 = GTS_OBJECT (v2); vs = gts_split_new (ps->split_class, mid, o1, o2); gts_split_collapse (vs, ps->s->edge_class, heap); GTS_OBJECT (vs->v)->reserved = vs; g_ptr_array_add (ps->split, vs); return mid; } static void update_2nd_closest_neighbors (GtsVertex * v, GtsEHeap * heap) { GSList * i = v->segments; GSList * list = NULL; while (i) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { GtsVertex * v1 = s->v1 == v ? s->v2 : s->v1; GSList * j = v1->segments; while (j) { GtsSegment * s1 = j->data; if (GTS_IS_EDGE (s1) && !g_slist_find (list, s1)) list = g_slist_prepend (list, s1); j = j->next; } } i = i->next; } i = list; while (i) { GtsEdge * e = i->data; if (GTS_OBJECT (e)->reserved) HEAP_REMOVE_OBJECT (heap, e); HEAP_INSERT_OBJECT (heap, e); i = i->next; } g_slist_free (list); } static gdouble edge_length2 (GtsEdge * e) { return gts_point_distance2 (GTS_POINT (GTS_SEGMENT (e)->v1), GTS_POINT (GTS_SEGMENT (e)->v2)); } static void create_heap_coarsen (GtsEdge * e, GtsEHeap * heap) { HEAP_INSERT_OBJECT (heap, e); } /* #define DEBUG_FOLD */ /* #define DEBUG_CONTACT_VERTEX */ #ifdef DEBUG_FOLD static void check_fold (GtsTriangle * t, gdouble * maxcosine2) { GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3; if (gts_triangles_are_folded (e1->triangles, GTS_SEGMENT (e1)->v1, GTS_SEGMENT (e1)->v2, *maxcosine2) || gts_triangles_are_folded (e2->triangles, GTS_SEGMENT (e2)->v1, GTS_SEGMENT (e2)->v2, *maxcosine2) || gts_triangles_are_folded (e3->triangles, GTS_SEGMENT (e3)->v1, GTS_SEGMENT (e3)->v2, *maxcosine2)) { fprintf (stderr, "triangle %p:(%p,%p,%p) is folded\n", t, e1, e2, e3); g_assert_not_reached (); } } #endif /** * gts_psurface_new: * @klass: a #GtsPSurfaceClass. * @surface: a #GtsSurface. * @split_class: a #GtsSplitClass to use for the new progressive surface. * @cost_func: cost function for the edge collapse algorithm. * @cost_data: data to pass to @cost_func. * @coarsen_func: the function returning the vertex replacement for the edge * collapse. * @coarsen_data: data to pass to @coarsen_func. * @stop_func: the function to call to decide whether to stop the coarsening * process. * @stop_data: data to pass to @stop_func. * @minangle: the minimum angle allowable between two neighboring triangles. * This is used to avoid introducing folds in the mesh during simplification. * * This function works in exactly the same way as the * gts_surface_coarsen() function, except that the history of edge * collapse is saved in an array of #GtsSplit objects. This allows for * dynamic continuous multiresolution control of the input @surface. * * Returns: a new progressive surface. */ GtsPSurface * gts_psurface_new (GtsPSurfaceClass * klass, GtsSurface * surface, GtsSplitClass * split_class, GtsKeyFunc cost_func, gpointer cost_data, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsStopFunc stop_func, gpointer stop_data, gdouble minangle) { GtsPSurface * psurface; GtsEHeap * heap; GtsEdge * e; gdouble top_cost, maxcosine2; guint i; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (surface != NULL, NULL); g_return_val_if_fail (split_class != NULL, NULL); g_return_val_if_fail (stop_func != NULL, NULL); psurface = GTS_PSURFACE (gts_object_new (GTS_OBJECT_CLASS (klass))); psurface->s = surface; psurface->split_class = split_class; if (cost_func == NULL) cost_func = (GtsKeyFunc) edge_length2; if (coarsen_func == NULL) coarsen_func = (GtsCoarsenFunc) gts_segment_midvertex; heap = gts_eheap_new (cost_func, cost_data); maxcosine2 = cos (minangle); maxcosine2 *= maxcosine2; gts_eheap_freeze (heap); gts_surface_foreach_edge (surface, (GtsFunc) create_heap_coarsen, heap); gts_eheap_thaw (heap); /* we want to control edge destruction manually */ gts_allow_floating_edges = TRUE; while ((e = gts_eheap_remove_top (heap, &top_cost)) && (top_cost < G_MAXDOUBLE) && !(*stop_func) (top_cost, gts_eheap_size (heap) - gts_edge_face_number (e, surface), stop_data)) { GtsVertex * v = edge_collapse (psurface, e, heap, coarsen_func, coarsen_data, maxcosine2); if (v != NULL) { update_2nd_closest_neighbors (v, heap); #ifdef DEBUG_FOLD { GSList * triangles = gts_vertex_triangles (v, NULL), * i; fprintf (stderr, "\n---- Check for folds ----\n%p: ", v); i = triangles; while (i) { GtsTriangle * t = i->data; fprintf (stderr, "%p:(%p,%p,%p) ", t, t->e1, t->e2, t->e3); i = i->next; } fprintf (stderr, "\n"); g_slist_free (triangles); gts_surface_foreach_face (surface, (GtsFunc) check_fold, &maxcosine2); } #endif #ifdef DEBUG_CONTACT_VERTEX if (gts_vertex_is_contact (v, FALSE) != 1) { FILE * fptr = fopen ("after", "wt"); GSList * triangles = gts_vertex_triangles (v, NULL), * i; fprintf (stderr, "collapse of %p created a contact vertex\n", e); fprintf (fptr, "(geometry \"sphere\" { = SPHERE 0.1 0. 0. 0. })\n" "(normalization \"sphere\" none)\n"); i = triangles; while (i) { gts_write_triangle (i->data, GTS_POINT (v), fptr); i = i->next; } g_assert_not_reached (); } #endif } } gts_allow_floating_edges = FALSE; /* set reserved field of remaining edges back to NULL */ if (e) GTS_OBJECT (e)->reserved = NULL; gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL); gts_eheap_destroy (heap); psurface->pos = psurface->split->len; psurface->min = gts_surface_vertex_number (psurface->s); /* set reserved field of vertices (used to build the hierarchy) back to NULL */ for (i = 0; i < psurface->split->len; i++) { GtsSplit * vs = g_ptr_array_index (psurface->split, i); gts_object_reset_reserved (GTS_OBJECT (vs->v)); } return psurface; } /** * gts_psurface_add_vertex: * @ps: a #GtsPSurface. * * Adds a vertex to the progressive surface @ps by expanding the next * available #GtsSplit. * * Returns: the expanded #GtsSplit or %NULL if all the #GtsSplit have already * been expanded. */ GtsSplit * gts_psurface_add_vertex (GtsPSurface * ps) { GtsSplit * vs; g_return_val_if_fail (ps != NULL, NULL); g_return_val_if_fail (GTS_PSURFACE_IS_CLOSED (ps), NULL); if (ps->pos == 0) return NULL; vs = g_ptr_array_index (ps->split, --ps->pos); gts_split_expand (vs, ps->s, ps->s->edge_class); return vs; } /** * gts_psurface_remove_vertex: * @ps: a #GtsPSurface. * * Removes one vertex from the progressive surface @ps by collapsing the first * available #GtsSplit. * * Returns: the collapsed #GtsSplit or %NULL if all the #GtsSplit have already * been collapsed. */ GtsSplit * gts_psurface_remove_vertex (GtsPSurface * ps) { GtsSplit * vs; g_return_val_if_fail (ps != NULL, NULL); g_return_val_if_fail (GTS_PSURFACE_IS_CLOSED (ps), NULL); if (ps->pos == ps->split->len) return NULL; vs = g_ptr_array_index (ps->split, ps->pos++); gts_split_collapse (vs, ps->s->edge_class, NULL); return vs; } /** * gts_psurface_max_vertex_number: * @ps: a #GtsPSurface. * * Returns: the maximum number of vertices of @ps i.e. the number of vertices * if all the #GtsSplit were expanded. */ guint gts_psurface_max_vertex_number (GtsPSurface * ps) { g_return_val_if_fail (ps != NULL, 0); return ps->min + ps->split->len; } /** * gts_psurface_min_vertex_number: * @ps: a #GtsPSurface. * * Returns: the minimum number of vertices of @ps i.e. the number of vertices * if all the #GtsSplit were collapsed. */ guint gts_psurface_min_vertex_number (GtsPSurface * ps) { g_return_val_if_fail (ps != NULL, 0); return ps->min; } /** * gts_psurface_set_vertex_number: * @ps: a #GtsPSurface. * @n: a number of vertices. * * Performs the required number of collapses or expansions to set the number * of vertices of @ps to @n. */ void gts_psurface_set_vertex_number (GtsPSurface * ps, guint n) { g_return_if_fail (ps != NULL); g_return_if_fail (GTS_PSURFACE_IS_CLOSED (ps)); n = ps->min + ps->split->len - n; while (ps->pos > n && gts_psurface_add_vertex (ps)) ; while (ps->pos < n && gts_psurface_remove_vertex (ps)) ; } /** * gts_psurface_get_vertex_number: * @ps: a #GtsPSurface. * * Returns: the current number of vertices of @ps. */ guint gts_psurface_get_vertex_number (GtsPSurface * ps) { g_return_val_if_fail (ps != NULL, 0); if (!GTS_PSURFACE_IS_CLOSED (ps)) return ps->min + ps->pos; else return ps->min + ps->split->len - ps->pos; } /** * gts_psurface_foreach_vertex: * @ps: a #GtsPSurface. * @func: a function to call for each vertex of @ps. * @data: data to be passed to @func. * * Calls @func for each (potential) vertex of @ps, whether actually used * or not. The vertices are called in the order they were created during the * edge collapse operation. */ void gts_psurface_foreach_vertex (GtsPSurface * ps, GtsFunc func, gpointer data) { guint i; g_return_if_fail (ps != NULL); g_return_if_fail (func != NULL); g_return_if_fail (GTS_PSURFACE_IS_CLOSED (ps)); for (i = 0; i < ps->split->len; i++) { GtsSplit * vs = g_ptr_array_index (ps->split, i); (*func) (vs->v, data); } } gts-snapshot-121130/src/gts.def0000644000175100017510000002513412055775530013242 00000000000000EXPORTS gts_finalize gts_object_attributes gts_object_check_cast gts_object_class gts_object_class_check_cast gts_object_class_from_name gts_object_class_new gts_object_clone gts_object_destroy gts_object_init gts_object_new gts_object_reset_reserved gts_point_class gts_point_distance gts_point_distance2 gts_point_in_circle gts_point_in_sphere gts_point_in_triangle_circle gts_point_is_in_triangle gts_point_is_inside_surface gts_point_new gts_point_orientation gts_point_orientation_3d gts_point_orientation_3d_sos gts_point_orientation_sos gts_point_segment_closest gts_point_segment_distance gts_point_segment_distance2 gts_point_set gts_point_transform gts_point_triangle_closest gts_point_triangle_distance gts_point_triangle_distance2 gts_segment_triangle_intersection gts_allow_floating_vertices gts_color_vertex_class gts_vertex_class gts_vertex_faces gts_vertex_fan_oriented gts_vertex_is_boundary gts_vertex_is_contact gts_vertex_is_unattached gts_vertex_neighbors gts_vertex_new gts_vertex_normal_class gts_vertex_replace gts_vertex_triangles gts_vertices_are_connected gts_vertices_from_segments gts_vertices_merge gts_segment_class gts_segment_is_duplicate gts_segment_is_ok gts_segment_midvertex gts_segment_new gts_segments_are_intersecting gts_segments_from_vertices gts_allow_floating_edges gts_edge_belongs_to_tetrahedron gts_edge_class gts_edge_face_number gts_edge_has_any_parent_surface gts_edge_has_parent_surface gts_edge_is_boundary gts_edge_is_contact gts_edge_is_duplicate gts_edge_manifold_faces gts_edge_new gts_edge_replace gts_edge_swap gts_edges_from_vertices gts_edges_merge gts_triangle_area gts_triangle_circumcircle_center gts_triangle_class gts_triangle_edge_opposite gts_triangle_enclosing gts_triangle_interpolate_height gts_triangle_is_duplicate gts_triangle_is_ok gts_triangle_is_stabbed gts_triangle_neighbor_number gts_triangle_neighbors gts_triangle_new gts_triangle_normal gts_triangle_orientation gts_triangle_perimeter gts_triangle_quality gts_triangle_revert gts_triangle_set gts_triangle_use_edges gts_triangle_vertex_opposite gts_triangle_vertices gts_triangle_vertices_edges gts_triangles_angle gts_triangles_are_compatible gts_triangles_are_folded gts_triangles_common_edge gts_triangles_from_edges gts_allow_floating_faces gts_face_class gts_face_foreach_neighbor gts_face_has_parent_surface gts_face_is_compatible gts_face_neighbor_number gts_face_neighbors gts_face_new gts_faces_from_edges gts_kdtree_new gts_kdtree_range gts_bb_tree_destroy gts_bb_tree_draw gts_bb_tree_is_overlapping gts_bb_tree_new gts_bb_tree_overlap gts_bb_tree_point_closest gts_bb_tree_point_closest_bboxes gts_bb_tree_point_distance gts_bb_tree_segment_distance gts_bb_tree_stabbed gts_bb_tree_surface gts_bb_tree_surface_boundary_distance gts_bb_tree_surface_distance gts_bb_tree_traverse_overlapping gts_bb_tree_triangle_distance gts_bbox_bboxes gts_bbox_class gts_bbox_diagonal2 gts_bbox_draw gts_bbox_is_stabbed gts_bbox_new gts_bbox_overlaps_segment gts_bbox_overlaps_triangle gts_bbox_point_distance2 gts_bbox_points gts_bbox_segment gts_bbox_set gts_bbox_surface gts_bbox_triangle gts_bboxes_are_overlapping gts_file_assign_next gts_file_assign_start gts_file_assign_variables gts_file_destroy gts_file_error gts_file_first_token_after gts_file_getc gts_file_getc_scope gts_file_new gts_file_new_from_buffer gts_file_new_from_string gts_file_next_token gts_file_read gts_file_variable_error gts_file_verror incircle insphere orient2d orient3d gts_heap_destroy gts_heap_foreach gts_heap_freeze gts_heap_insert gts_heap_new gts_heap_remove_top gts_heap_size gts_heap_thaw gts_heap_top gts_eheap_decrease_key gts_eheap_destroy gts_eheap_foreach gts_eheap_freeze gts_eheap_insert gts_eheap_insert_with_key gts_eheap_key gts_eheap_new gts_eheap_randomized gts_eheap_remove gts_eheap_remove_top gts_eheap_size gts_eheap_thaw gts_eheap_top gts_eheap_update gts_fifo_destroy gts_fifo_foreach gts_fifo_is_empty gts_fifo_new gts_fifo_pop gts_fifo_push gts_fifo_reverse gts_fifo_size gts_fifo_top gts_fifo_write gts_matrix3_inverse gts_matrix_assign gts_matrix_compatible_row gts_matrix_destroy gts_matrix_determinant gts_matrix_identity gts_matrix_inverse gts_matrix_new gts_matrix_print gts_matrix_product gts_matrix_projection gts_matrix_quadratic_optimization gts_matrix_rotate gts_matrix_scale gts_matrix_translate gts_matrix_transpose gts_matrix_zero gts_vector4_print gts_vector_print gts_coarsen_stop_cost gts_coarsen_stop_number gts_edge_collapse_creates_fold gts_edge_collapse_is_valid gts_range_add_value gts_range_init gts_range_print gts_range_reset gts_range_update gts_surface_add_face gts_surface_area gts_surface_boundary gts_surface_center_of_area gts_surface_center_of_mass gts_surface_class gts_surface_coarsen gts_surface_copy gts_surface_distance gts_surface_edge_number gts_surface_face_number gts_surface_foreach_edge gts_surface_foreach_face gts_surface_foreach_face_remove gts_surface_foreach_vertex gts_surface_generate_sphere gts_surface_is_closed gts_surface_is_manifold gts_surface_is_orientable gts_surface_merge gts_surface_new gts_surface_print_stats gts_surface_quality_stats gts_surface_read gts_surface_refine gts_surface_remove_face gts_surface_split gts_surface_stats gts_surface_tessellate gts_surface_traverse_destroy gts_surface_traverse_new gts_surface_traverse_next gts_surface_vertex_number gts_surface_volume gts_surface_write gts_surface_write_oogl gts_surface_write_oogl_boundary gts_surface_write_vtk gts_surface_strip gts_volume_optimized_cost gts_volume_optimized_vertex gts_delaunay_conform gts_delaunay_refine gts_edge_is_encroached gts_vertex_encroaches_edge gts_grid_plane_destroy gts_grid_plane_new gts_iso_slice_destroy gts_iso_slice_fill gts_iso_slice_fill_cartesian gts_iso_slice_new gts_isosurface_cartesian gts_isosurface_slice gts_isosurface_tetra gts_isosurface_tetra_bcl gts_isosurface_tetra_bounded gts_hsplit_force_expand gts_psurface_close gts_psurface_open gts_psurface_read_vertex gts_psurface_write gts_split_class gts_split_collapse gts_split_expand gts_split_height gts_split_new gts_split_traverse gts_psurface_add_vertex gts_psurface_class gts_psurface_foreach_vertex gts_psurface_get_vertex_number gts_psurface_max_vertex_number gts_psurface_min_vertex_number gts_psurface_new gts_psurface_remove_vertex gts_psurface_set_vertex_number gts_hsplit_class gts_hsplit_collapse gts_hsplit_expand gts_hsplit_new gts_hsurface_class gts_hsurface_foreach gts_hsurface_height gts_hsurface_new gts_hsurface_traverse gts_constraint_class gts_delaunay_add_constraint gts_delaunay_add_vertex gts_delaunay_add_vertex_to_face gts_delaunay_check gts_delaunay_remove_hull gts_delaunay_remove_vertex gts_list_face_class gts_point_locate gts_surface_foreach_intersecting_face gts_surface_inter_boolean gts_surface_inter_check gts_surface_inter_class gts_surface_inter_new gts_surface_intersection gts_surface_is_self_intersecting gts_nedge_class gts_nface_class gts_nvertex_class gts_cluster_add gts_cluster_class gts_cluster_grid_add_triangle gts_cluster_grid_class gts_cluster_grid_new gts_cluster_grid_update gts_cluster_new gts_cluster_update gts_containee_class gts_containee_is_contained gts_containee_new gts_containee_replace gts_container_add gts_container_class gts_container_foreach gts_container_new gts_container_remove gts_container_size gts_hash_container_class gts_slist_containee_class gts_slist_container_class gts_allow_floating_gnodes gts_fnode_class gts_fnode_new gts_gedge_class gts_gedge_new gts_gedge_weight gts_gnode_class gts_gnode_degree gts_gnode_foreach_edge gts_gnode_foreach_neighbor gts_gnode_move_cost gts_gnode_new gts_gnode_weight gts_graph_class gts_graph_distance_sum gts_graph_edges_cut gts_graph_edges_cut_weight gts_graph_farthest gts_graph_foreach_edge gts_graph_new gts_graph_print_stats gts_graph_read gts_graph_read_jostle gts_graph_traverse_destroy gts_graph_traverse_new gts_graph_traverse_next gts_graph_traverse_what_next gts_graph_weight gts_graph_write gts_graph_write_dot gts_ngnode_class gts_ngnode_new gts_pgedge_class gts_pgedge_new gts_pnode_class gts_pnode_new gts_segments_graph_new gts_surface_graph_new gts_surface_graph_surface gts_wgedge_class gts_wgedge_new gts_wgnode_class gts_wgnode_new gts_wgraph_class gts_wgraph_weight_max gts_gnode_split_class gts_gnode_split_collapse gts_gnode_split_expand gts_gnode_split_new gts_pgraph_add_node gts_pgraph_class gts_pgraph_down gts_pgraph_get_node_number gts_pgraph_max_node_number gts_pgraph_min_node_number gts_pgraph_new gts_pgraph_remove_node gts_pgraph_set_node_number gts_graph_bfgg_bisection gts_graph_bisection_bkl_refine gts_graph_bisection_check gts_graph_bisection_destroy gts_graph_bisection_kl_refine gts_graph_bisection_new gts_graph_bubble_partition gts_graph_ggg_bisection gts_graph_partition_balance gts_graph_partition_clone gts_graph_partition_destroy gts_graph_partition_edges_cut gts_graph_partition_edges_cut_weight gts_graph_partition_print_stats gts_graph_recursive_bisection gts_vertex_gaussian_curvature gts_vertex_mean_curvature_normal gts_vertex_principal_curvatures gts_vertex_principal_directions planeBoxOverlap triBoxOverlap gts-snapshot-121130/src/Makefile.in0000644000175100017510000006132112055775445014035 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ subdir = src DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gts-config.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = gts-config CONFIG_CLEAN_VPATH_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 = 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__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libgts_la_LIBADD = am_libgts_la_OBJECTS = object.lo point.lo vertex.lo segment.lo edge.lo \ triangle.lo face.lo kdtree.lo bbtree.lo misc.lo predicates.lo \ heap.lo eheap.lo fifo.lo matrix.lo surface.lo stripe.lo \ vopt.lo refine.lo iso.lo isotetra.lo split.lo psurface.lo \ hsurface.lo cdt.lo boolean.lo named.lo oocs.lo container.lo \ graph.lo pgraph.lo partition.lo curvature.lo tribox3.lo libgts_la_OBJECTS = $(am_libgts_la_OBJECTS) libgts_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libgts_la_LDFLAGS) $(LDFLAGS) -o $@ SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) --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 = $(libgts_la_SOURCES) DIST_SOURCES = $(libgts_la_SOURCES) DATA = $(m4data_DATA) HEADERS = $(include_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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ INCLUDES = -I$(top_srcdir) -I$(includedir) -DG_LOG_DOMAIN=\"Gts\" bin_SCRIPTS = gts-config BUILT_SOURCES = \ gts-config \ predicates_init.h lib_LTLIBRARIES = libgts.la libgts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\ -release $(LT_RELEASE) -export-dynamic -lm libgts_la_DEPENDENCIES = \ predicates_init.h libgts_la_SOURCES = \ predicates_init.h \ object.c \ point.c \ vertex.c \ segment.c \ edge.c \ triangle.c \ face.c \ kdtree.c \ bbtree.c \ misc.c \ gts.h \ gts-private.h \ predicates.c \ predicates.h \ rounding.h \ heap.c \ eheap.c \ fifo.c \ matrix.c \ surface.c \ stripe.c \ vopt.c \ refine.c \ iso.c \ isotetra.c \ split.c \ psurface.c \ hsurface.c \ cdt.c \ boolean.c \ named.c \ oocs.c \ container.c \ graph.c \ pgraph.c \ partition.c \ curvature.c \ tribox3.c include_HEADERS = \ gts.h gtsconfig.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ predicates_init.c \ gts.m4 \ makefile.msc \ config.h.win32 \ gts.def \ NOTES m4datadir = $(datadir)/aclocal m4data_DATA = gts.m4 all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gts-config: $(top_builddir)/config.status $(srcdir)/gts-config.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ 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 libgts.la: $(libgts_la_OBJECTS) $(libgts_la_DEPENDENCIES) $(libgts_la_LINK) -rpath $(libdir) $(libgts_la_OBJECTS) $(libgts_la_LIBADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | 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; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boolean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curvature.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eheap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/face.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fifo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsurface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isotetra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/named.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oocs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pgraph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/predicates.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psurface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/segment.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/triangle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tribox3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vertex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vopt.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)" @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ 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)$(m4datadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \ done uninstall-m4dataDATA: @$(NORMAL_UNINSTALL) @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(m4datadir)" && rm -f $$files install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ 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_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files 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) set x; \ 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; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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 "$(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-hook check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(includedir)"; 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) -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." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) 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-includeHEADERS install-m4dataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS 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-binSCRIPTS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-m4dataDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags dist-hook distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags 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-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES 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-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-m4dataDATA gts-config: gts-config.in predicates.o: predicates.c predicates_init.h predicates.h $(COMPILE) -c $(srcdir)/predicates.c predicates_init: predicates_init.c rounding.h $(COMPILE) $(srcdir)/predicates_init.c -o $(srcdir)/predicates_init predicates_init.h: predicates_init ./predicates_init > $(srcdir)/predicates_init.h gts.def: libgts.la .libs/libgts.a nm -g .libs/libgts.a | awk 'BEGIN{print "EXPORTS"}{if ($$2 == "T" || $$2 == "D" || $$2 == "B") print " " $$3}' > gts.def dist-hook: gts.def cd $(distdir); rm -f $(BUILT_SOURCES) # 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: gts-snapshot-121130/src/predicates.h0000644000175100017510000000260212055775440014254 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* Header file for robust predicates by Jonathan Richard Shewchuk */ #ifndef __PREDICATES_H__ #define __PREDICATES_H__ double orient2d (double * pa, double * pb, double * pc); double orient3d (double * pa, double * pb, double * pc, double * pd); double incircle (double * pa, double * pb, double * pc, double * pd); double insphere (double * pa, double * pb, double * pc, double * pd, double * pe); #endif /* __PREDICATES_H__ */ gts-snapshot-121130/src/edge.c0000644000175100017510000003332612055775440013037 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" gboolean gts_allow_floating_edges = FALSE; static void edge_destroy (GtsObject * object) { GtsEdge * edge = GTS_EDGE (object); GSList * i; i = edge->triangles; while (i) { GSList * next = i->next; gts_object_destroy (i->data); i = next; } g_assert (edge->triangles == NULL); (* GTS_OBJECT_CLASS (gts_edge_class ())->parent_class->destroy) (object); } static void edge_clone (GtsObject * clone, GtsObject * object) { (* GTS_OBJECT_CLASS (gts_edge_class ())->parent_class->clone) (clone, object); GTS_SEGMENT (clone)->v1 = GTS_SEGMENT (clone)->v2 = NULL; GTS_EDGE (clone)->triangles = NULL; } static void edge_class_init (GtsObjectClass * klass) { klass->clone = edge_clone; klass->destroy = edge_destroy; } static void edge_init (GtsEdge * edge) { edge->triangles = NULL; } /** * gts_edge_class: * * Returns: the #GtsEdgeClass. */ GtsEdgeClass * gts_edge_class (void) { static GtsEdgeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo edge_info = { "GtsEdge", sizeof (GtsEdge), sizeof (GtsEdgeClass), (GtsObjectClassInitFunc) edge_class_init, (GtsObjectInitFunc) edge_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_segment_class ()), &edge_info); } return klass; } /** * gts_edge_new: * @klass: a #GtsEdgeClass. * @v1: a #GtsVertex. * @v2: a #GtsVertex. * * Returns: a new #GtsEdge linking @v1 and @v2. */ GtsEdge * gts_edge_new (GtsEdgeClass * klass, GtsVertex * v1, GtsVertex * v2) { return GTS_EDGE (gts_segment_new (GTS_SEGMENT_CLASS (klass), v1, v2)); } /** * gts_edge_replace: * @e: a #GtsEdge. * @with: a #GtsEdge. * * Replaces @e with @with. For each triangle which uses @e as an * edge, @e is replaced with @with. The @with->triangles list is * updated appropriately and the @e->triangles list is freed and set * to %NULL. */ void gts_edge_replace (GtsEdge * e, GtsEdge * with) { GSList * i; g_return_if_fail (e != NULL && with != NULL && e != with); i = e->triangles; while (i) { GtsTriangle * t = i->data; if (t->e1 == e) t->e1 = with; if (t->e2 == e) t->e2 = with; if (t->e3 == e) t->e3 = with; if (!g_slist_find (with->triangles, t)) with->triangles = g_slist_prepend (with->triangles, t); i = i->next; } g_slist_free (e->triangles); e->triangles = NULL; } /** * gts_edge_has_parent_surface: * @e: a #GtsEdge. * @surface: a #GtsSurface. * * Returns: a #GtsFace of @surface having @e as an edge, %NULL otherwise. */ GtsFace * gts_edge_has_parent_surface (GtsEdge * e, GtsSurface * surface) { GSList * i; g_return_val_if_fail (e != NULL, NULL); i = e->triangles; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, surface)) return i->data; i = i->next; } return NULL; } /** * gts_edge_has_any_parent_surface: * @e: a #GtsEdge. * * Returns: %NULL if @e is not an edge of any triangle or if all the * faces having @e has an edge do not belong to any surface, * a #GtsFace belonging to a surface and having @e as an edge. */ GtsFace * gts_edge_has_any_parent_surface (GtsEdge * e) { GSList * i; g_return_val_if_fail (e != NULL, NULL); i = e->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_IS_FACE (t) && GTS_FACE (t)->surfaces != NULL) return GTS_FACE (t); i = i->next; } return NULL; } /** * gts_edge_is_boundary: * @e: a #GtsEdge. * @surface: a #GtsSurface or %NULL. * * Returns: the unique #GtsFace (which belongs to @surface) and which * has @e as an edge (i.e. @e is a boundary edge (of @surface)) or %NULL * if there is more than one or no faces (belonging to @surface) and * with @e as an edge. */ GtsFace * gts_edge_is_boundary (GtsEdge * e, GtsSurface * surface) { GSList * i; GtsFace * f = NULL; g_return_val_if_fail (e != NULL, NULL); i = e->triangles; while (i) { if (GTS_IS_FACE (i->data)) { if (!surface || gts_face_has_parent_surface (i->data, surface)) { if (f != NULL) return NULL; f = i->data; } } i = i->next; } return f; } /** * gts_edges_from_vertices: * @vertices: a list of #GtsVertex. * @parent: a #GtsSurface. * * Returns: a list of unique #GtsEdge which have one of their vertices in * @vertices and are used by a face of @parent. */ GSList * gts_edges_from_vertices (GSList * vertices, GtsSurface * parent) { GHashTable * hash; GSList * edges = NULL, * i; g_return_val_if_fail (parent != NULL, NULL); hash = g_hash_table_new (NULL, NULL); i = vertices; while (i) { GSList * j = GTS_VERTEX (i->data)->segments; while (j) { GtsSegment * s = j->data; if (GTS_IS_EDGE (s) && gts_edge_has_parent_surface (GTS_EDGE (s), parent) && g_hash_table_lookup (hash, s) == NULL) { edges = g_slist_prepend (edges, s); g_hash_table_insert (hash, s, i); } j = j->next; } i = i->next; } g_hash_table_destroy (hash); return edges; } /** * gts_edge_face_number: * @e: a #GtsEdge. * @s: a #GtsSurface. * * Returns: the number of faces using @e and belonging to @s. */ guint gts_edge_face_number (GtsEdge * e, GtsSurface * s) { GSList * i; guint nt = 0; g_return_val_if_fail (e != NULL, 0); g_return_val_if_fail (s != NULL, 0); i = e->triangles; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (GTS_FACE (i->data), s)) nt++; i = i->next; } return nt; } /** * gts_edge_is_duplicate: * @e: a #GtsEdge. * * Returns: the first #GtsEdge different from @e which shares the * same endpoints or %NULL if there is none. */ GtsEdge * gts_edge_is_duplicate (GtsEdge * e) { GSList * i; GtsVertex * v2; g_return_val_if_fail (e != NULL, NULL); v2 = GTS_SEGMENT (e)->v2; i = GTS_SEGMENT (e)->v1->segments; if (GTS_SEGMENT (e)->v1 == v2) /* e is degenerate: special treatment */ while (i) { GtsSegment * s = i->data; if (s != GTS_SEGMENT (e) && GTS_IS_EDGE (s) && s->v1 == v2 && s->v2 == v2) return GTS_EDGE (s); i = i->next; } else /* e is not degenerate */ while (i) { GtsSegment * s = i->data; if (s != GTS_SEGMENT (e) && GTS_IS_EDGE (s) && (s->v1 == v2 || s->v2 == v2)) return GTS_EDGE (s); i = i->next; } return NULL; } /** * gts_edges_merge: * @edges: a list of #GtsEdge. * * For each edge in @edges check if it is duplicated (as * returned by gts_edge_is_duplicate()). If it is replace it by its * duplicate, destroy it and remove it from the list. * * Returns: the updated @edges list. */ GList * gts_edges_merge (GList * edges) { GList * i = edges; /* we want to control edge destruction */ gts_allow_floating_edges = TRUE; while (i) { GtsEdge * e = i->data; GtsEdge * de = gts_edge_is_duplicate (e); if (de) { GList * next = i->next; edges = g_list_remove_link (edges, i); g_list_free_1 (i); i = next; gts_edge_replace (e, de); gts_object_destroy (GTS_OBJECT (e)); } else i = i->next; } gts_allow_floating_edges = FALSE;; return edges; } static void triangle_vertices_edges (GtsTriangle * t, GtsEdge * e, GtsVertex ** v, GtsEdge ** ee1, GtsEdge ** ee2) { GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3; GtsVertex * v1 = GTS_SEGMENT (e)->v1; if (e1 == e) e1 = e3; else if (e2 == e) e2 = e3; else g_assert (e3 == e); if (GTS_SEGMENT (e2)->v1 == v1 || GTS_SEGMENT (e2)->v2 == v1) { e3 = e1; e1 = e2; e2 = e3; } if (GTS_SEGMENT (e1)->v1 == v1) *v = GTS_SEGMENT (e1)->v2; else *v = GTS_SEGMENT (e1)->v1; *ee1 = e1; *ee2 = e2; } /** * gts_edge_belongs_to_tetrahedron: * @e: a #GtsEdge. * * Returns: %TRUE if @e is used by faces forming a tetrahedron, %FALSE * otherwise. */ gboolean gts_edge_belongs_to_tetrahedron (GtsEdge * e) { GSList * i; GtsVertex * v1, * v2; g_return_val_if_fail (e != NULL, FALSE); v1 = GTS_SEGMENT (e)->v1; v2 = GTS_SEGMENT (e)->v2; i = e->triangles; while (i) { GtsEdge * e1, * e2; GtsVertex * vt1; GSList * j = i->next; triangle_vertices_edges (i->data, e, &vt1, &e1, &e2); while (j) { GtsSegment * s5; GtsEdge * e3, * e4; GtsVertex * vt2; triangle_vertices_edges (j->data, e, &vt2, &e3, &e4); s5 = gts_vertices_are_connected (vt1, vt2); if (GTS_IS_EDGE (s5) && gts_triangle_use_edges (e1, e3, GTS_EDGE (s5)) && gts_triangle_use_edges (e2, e4, GTS_EDGE (s5))) return TRUE; j = j->next; } i = i->next; } return FALSE; } #define edge_use_vertex(e, v) (GTS_SEGMENT(e)->v1 == v ||\ GTS_SEGMENT(e)->v2 == v) static GtsEdge * next_edge (GtsTriangle * t, GtsEdge * e1, GtsEdge * e) { GtsVertex * v1 = GTS_SEGMENT (e)->v1; GtsVertex * v2 = GTS_SEGMENT (e)->v2; if (t->e1 != e1 && t->e1 != e && (edge_use_vertex (t->e1, v1) || edge_use_vertex (t->e1, v2))) return t->e1; else if (t->e2 != e1 && t->e2 != e && (edge_use_vertex (t->e2, v1) || edge_use_vertex (t->e2, v2))) return t->e2; else if (t->e3 != e1 && t->e3 != e && (edge_use_vertex (t->e3, v1) || edge_use_vertex (t->e3, v2))) return t->e3; g_assert_not_reached (); return NULL; } static void triangle_next (GtsEdge * e1, GtsEdge * e) { GSList * i; i = e1->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_OBJECT (t)->reserved) { GTS_OBJECT (t)->reserved = NULL; triangle_next (next_edge (t, e1, e), e); } i = i->next; } } /** * gts_edge_is_contact: * @e: a #GtsEdge. * * Returns: the number of sets of connected triangles sharing @e as a * contact edge. */ guint gts_edge_is_contact (GtsEdge * e) { GSList * i, * triangles; guint ncomponent = 0; g_return_val_if_fail (e != NULL, 0); triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL); i = triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles); while (i) { GTS_OBJECT (i->data)->reserved = i; i = i->next; } i = e->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_OBJECT (t)->reserved) { GtsEdge * e1; GTS_OBJECT (t)->reserved = NULL; e1 = next_edge (t, NULL, e); triangle_next (e1, e); triangle_next (next_edge (t, e1, e), e); ncomponent++; } i = i->next; } g_slist_foreach (triangles, (GFunc) gts_object_reset_reserved, NULL); g_slist_free (triangles); return ncomponent; } /** * gts_edge_swap: * @e: a #GtsEdge. * @s: a #GtsSurface. * * Performs an "edge swap" on the two triangles sharing @e and * belonging to @s. */ void gts_edge_swap (GtsEdge * e, GtsSurface * s) { GtsTriangle * t1 = NULL, * t2 = NULL, * t; GtsFace * f; GSList * i; GtsVertex * v1, * v2, * v3, * v4, * v5, * v6; GtsEdge * e1, * e2, * e3, * e4; GtsSegment * v3v6; g_return_if_fail (e != NULL); g_return_if_fail (s != NULL); i = e->triangles; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, s)) { if (!t1) t1 = i->data; else if (!t2) t2 = i->data; else g_return_if_fail (gts_edge_face_number (e, s) == 2); } i = i->next; } g_assert (t1 && t2); gts_triangle_vertices_edges (t1, e, &v1, &v2, &v3, &e, &e1, &e2); gts_triangle_vertices_edges (t2, e, &v4, &v5, &v6, &e, &e3, &e4); g_assert (v2 == v4 && v1 == v5); v3v6 = gts_vertices_are_connected (v3, v6); if (!GTS_IS_EDGE (v3v6)) v3v6 = GTS_SEGMENT (gts_edge_new (s->edge_class, v3, v6)); f = gts_face_new (s->face_class, e1, GTS_EDGE (v3v6), e4); if ((t = gts_triangle_is_duplicate (GTS_TRIANGLE (f))) && GTS_IS_FACE (t)) { gts_object_destroy (GTS_OBJECT (f)); f = GTS_FACE (t); } gts_surface_add_face (s, f); f = gts_face_new (s->face_class, GTS_EDGE (v3v6), e2, e3); if ((t = gts_triangle_is_duplicate (GTS_TRIANGLE (f))) && GTS_IS_FACE (t)) { gts_object_destroy (GTS_OBJECT (f)); f = GTS_FACE (t); } gts_surface_add_face (s, f); gts_surface_remove_face (s, GTS_FACE (t1)); gts_surface_remove_face (s, GTS_FACE (t2)); } /** * gts_edge_manifold_faces: * @e: a #GtsEdge. * @s: a #GtsSurface. * @f1: pointer for first face. * @f2: pointer for second face. * * If @e is a manifold edge of surface @s, fills @f1 and @f2 with the * faces belonging to @s and sharing @e. * * Returns: %TRUE if @e is a manifold edge, %FALSE otherwise. */ gboolean gts_edge_manifold_faces (GtsEdge * e, GtsSurface * s, GtsFace ** f1, GtsFace ** f2) { GSList * i; g_return_val_if_fail (e != NULL, FALSE); g_return_val_if_fail (s != NULL, FALSE); g_return_val_if_fail (f1 != NULL, FALSE); g_return_val_if_fail (f2 != NULL, FALSE); *f1 = *f2 = NULL; i = e->triangles; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, s)) { if (!(*f1)) *f1 = i->data; else if (!(*f2)) *f2 = i->data; else return FALSE; } i = i->next; } return (*f1 && *f2); } gts-snapshot-121130/src/container.c0000644000175100017510000003244412055775440014115 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" /* GtsContainee */ static void containee_class_init (GtsContaineeClass * klass) { klass->remove_container = NULL; klass->add_container = NULL; klass->foreach = NULL; klass->is_contained = NULL; klass->replace = NULL; } GtsContaineeClass * gts_containee_class (void) { static GtsContaineeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo containee_info = { "GtsContainee", sizeof (GtsContainee), sizeof (GtsContaineeClass), (GtsObjectClassInitFunc) containee_class_init, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &containee_info); } return klass; } GtsContainee * gts_containee_new (GtsContaineeClass * klass) { GtsContainee * object; object = GTS_CONTAINEE (gts_object_new (GTS_OBJECT_CLASS (klass))); return object; } gboolean gts_containee_is_contained (GtsContainee * item, GtsContainer * c) { g_return_val_if_fail (item != NULL, FALSE); g_return_val_if_fail (c != NULL, FALSE); if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->is_contained) return (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->is_contained) (item, c); return FALSE; } void gts_containee_replace (GtsContainee * item, GtsContainee * with) { if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->replace) (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->replace) (item, with); if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->foreach) { (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->foreach) (item, (GtsFunc) gts_container_add, with); (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->foreach) (item, (GtsFunc) gts_container_remove, item); } } /* GtsSListContainee */ static void slist_containee_destroy (GtsObject * object) { GtsSListContainee * item = GTS_SLIST_CONTAINEE (object); GSList * i; i = item->containers; while (i) { GSList * next = i->next; gts_container_remove (i->data, GTS_CONTAINEE (item)); i = next; } g_assert (item->containers == NULL); (* GTS_OBJECT_CLASS (gts_slist_containee_class ())->parent_class->destroy) (object); } static void slist_containee_remove_container (GtsContainee * i, GtsContainer * c) { GtsSListContainee * item = GTS_SLIST_CONTAINEE (i); item->containers = g_slist_remove (item->containers, c); } static void slist_containee_add_container (GtsContainee * i, GtsContainer * c) { GtsSListContainee * item = GTS_SLIST_CONTAINEE (i); if (!g_slist_find (item->containers, c)) item->containers = g_slist_prepend (item->containers, c); } static void slist_containee_foreach (GtsContainee * c, GtsFunc func, gpointer data) { GSList * i = GTS_SLIST_CONTAINEE (c)->containers; while (i) { GSList * next = i->next; (* func) (i->data, data); i = next; } } static gboolean slist_containee_is_contained (GtsContainee * i, GtsContainer * c) { return g_slist_find (GTS_SLIST_CONTAINEE (i)->containers, c) ? TRUE : FALSE; } static void slist_containee_class_init (GtsSListContaineeClass * klass) { GTS_CONTAINEE_CLASS (klass)->remove_container = slist_containee_remove_container; GTS_CONTAINEE_CLASS (klass)->add_container = slist_containee_add_container; GTS_CONTAINEE_CLASS (klass)->foreach = slist_containee_foreach; GTS_CONTAINEE_CLASS (klass)->is_contained = slist_containee_is_contained; GTS_OBJECT_CLASS (klass)->destroy = slist_containee_destroy; } static void slist_containee_init (GtsSListContainee * object) { object->containers = NULL; } GtsSListContaineeClass * gts_slist_containee_class (void) { static GtsSListContaineeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo slist_containee_info = { "GtsSListContainee", sizeof (GtsSListContainee), sizeof (GtsSListContaineeClass), (GtsObjectClassInitFunc) slist_containee_class_init, (GtsObjectInitFunc) slist_containee_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_containee_class ()), &slist_containee_info); } return klass; } /* GtsContainer */ static void remove_container (GtsContainee * item, GtsContainer * c) { if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container) (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container) (item, c); } static void container_destroy (GtsObject * object) { GtsContainer * c = GTS_CONTAINER (object); gts_container_foreach (c, (GtsFunc) remove_container, c); (* GTS_OBJECT_CLASS (gts_container_class ())->parent_class->destroy) (object); } static void container_add (GtsContainer * c, GtsContainee * item) { if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->add_container) (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->add_container) (item, c); } static void container_remove (GtsContainer * c, GtsContainee * item) { if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container) (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container) (item, c); } static void container_clone_add (GtsContainee * item, GtsContainer * clone) { gts_container_add (clone, item); } static void container_clone (GtsObject * clone, GtsObject * object) { gts_object_init (clone, object->klass); gts_container_foreach (GTS_CONTAINER (object), (GtsFunc) container_clone_add, clone); } static void container_class_init (GtsContainerClass * klass) { klass->add = container_add; klass->remove = container_remove; klass->foreach = NULL; klass->size = NULL; GTS_OBJECT_CLASS (klass)->destroy = container_destroy; GTS_OBJECT_CLASS (klass)->clone = container_clone; } GtsContainerClass * gts_container_class (void) { static GtsContainerClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo container_info = { "GtsContainer", sizeof (GtsContainer), sizeof (GtsContainerClass), (GtsObjectClassInitFunc) container_class_init, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_slist_containee_class ()), &container_info); } return klass; } GtsContainer * gts_container_new (GtsContainerClass * klass) { GtsContainer * object; object = GTS_CONTAINER (gts_object_new (GTS_OBJECT_CLASS (klass))); return object; } void gts_container_add (GtsContainer * c, GtsContainee * item) { g_return_if_fail (c != NULL); g_return_if_fail (item != NULL); g_assert (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->add); (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->add) (c, item); } void gts_container_remove (GtsContainer * c, GtsContainee * item) { g_return_if_fail (c != NULL); g_return_if_fail (item != NULL); g_assert (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->remove); (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->remove) (c, item); } void gts_container_foreach (GtsContainer * c, GtsFunc func, gpointer data) { g_return_if_fail (c != NULL); g_return_if_fail (func != NULL); if (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->foreach) (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->foreach) (c, func, data); } guint gts_container_size (GtsContainer * c) { g_return_val_if_fail (c != NULL, 0); if (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->size) return (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->size) (c); return 0; } /* GtsHashContainer */ static void hash_container_destroy (GtsObject * object) { GHashTable * items = GTS_HASH_CONTAINER (object)->items; (* GTS_OBJECT_CLASS (gts_hash_container_class ())->parent_class->destroy) (object); g_hash_table_destroy (items); } static void hash_container_add (GtsContainer * c, GtsContainee * item) { g_return_if_fail (GTS_HASH_CONTAINER (c)->frozen == FALSE); g_hash_table_insert (GTS_HASH_CONTAINER (c)->items, item, NULL); (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_hash_container_class ())->parent_class)->add) (c, item); } static void hash_container_remove (GtsContainer * c, GtsContainee * item) { g_return_if_fail (GTS_HASH_CONTAINER (c)->frozen == FALSE); g_hash_table_remove (GTS_HASH_CONTAINER (c)->items, item); (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_hash_container_class ())->parent_class)->remove) (c, item); } static void hash_foreach (GtsContainee * item, gpointer item_data, gpointer * info) { (* ((GtsFunc) info[0])) (item, info[1]); } static void hash_container_foreach (GtsContainer * c, GtsFunc func, gpointer data) { gpointer info[2]; info[0] = func; info[1] = data; /* prevent removing or adding items */ GTS_HASH_CONTAINER (c)->frozen = TRUE; g_hash_table_foreach (GTS_HASH_CONTAINER (c)->items, (GHFunc) hash_foreach, info); GTS_HASH_CONTAINER (c)->frozen = FALSE; } static guint hash_container_size (GtsContainer * c) { return g_hash_table_size (GTS_HASH_CONTAINER (c)->items); } static void hash_container_class_init (GtsHashContainerClass * klass) { GTS_CONTAINER_CLASS (klass)->add = hash_container_add; GTS_CONTAINER_CLASS (klass)->remove = hash_container_remove; GTS_CONTAINER_CLASS (klass)->foreach = hash_container_foreach; GTS_CONTAINER_CLASS (klass)->size = hash_container_size; GTS_OBJECT_CLASS (klass)->destroy = hash_container_destroy; } static void hash_container_init (GtsHashContainer * object) { object->items = g_hash_table_new (NULL, NULL); object->frozen = FALSE; } GtsHashContainerClass * gts_hash_container_class (void) { static GtsHashContainerClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo hash_container_info = { "GtsHashContainer", sizeof (GtsHashContainer), sizeof (GtsHashContainerClass), (GtsObjectClassInitFunc) hash_container_class_init, (GtsObjectInitFunc) hash_container_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_container_class ()), &hash_container_info); } return klass; } /* GtsSListContainer */ static void slist_container_destroy (GtsObject * object) { GSList * items = GTS_SLIST_CONTAINER (object)->items; (* GTS_OBJECT_CLASS (gts_slist_container_class ())->parent_class->destroy) (object); g_slist_free (items); } static void slist_container_add (GtsContainer * c, GtsContainee * item) { g_return_if_fail (GTS_SLIST_CONTAINER (c)->frozen == FALSE); if (!g_slist_find (GTS_SLIST_CONTAINER (c)->items, item)) GTS_SLIST_CONTAINER (c)->items = g_slist_prepend (GTS_SLIST_CONTAINER (c)->items, item); (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_slist_container_class ())->parent_class)->add) (c, item); } static void slist_container_remove (GtsContainer * c, GtsContainee * item) { g_return_if_fail (GTS_SLIST_CONTAINER (c)->frozen == FALSE); GTS_SLIST_CONTAINER (c)->items = g_slist_remove (GTS_SLIST_CONTAINER (c)->items, item); (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_slist_container_class ())->parent_class)->remove) (c, item); } static void slist_container_foreach (GtsContainer * c, GtsFunc func, gpointer data) { GSList * i; i = GTS_SLIST_CONTAINER (c)->items; while (i) { GSList * next = i->next; (* func) (i->data, data); i = next; } } static guint slist_container_size (GtsContainer * c) { return g_slist_length (GTS_SLIST_CONTAINER (c)->items); } static void slist_container_class_init (GtsSListContainerClass * klass) { GTS_CONTAINER_CLASS (klass)->add = slist_container_add; GTS_CONTAINER_CLASS (klass)->remove = slist_container_remove; GTS_CONTAINER_CLASS (klass)->foreach = slist_container_foreach; GTS_CONTAINER_CLASS (klass)->size = slist_container_size; GTS_OBJECT_CLASS (klass)->destroy = slist_container_destroy; } static void slist_container_init (GtsSListContainer * object) { object->items = NULL; object->frozen = FALSE; } GtsSListContainerClass * gts_slist_container_class (void) { static GtsSListContainerClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo slist_container_info = { "GtsSListContainer", sizeof (GtsSListContainer), sizeof (GtsSListContainerClass), (GtsObjectClassInitFunc) slist_container_class_init, (GtsObjectInitFunc) slist_container_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_container_class ()), &slist_container_info); } return klass; } gts-snapshot-121130/src/gts.h0000644000175100017510000024270712055775440012742 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTS_H__ #define __GTS_H__ #include #include #ifndef NATIVE_WIN32 # include #endif #ifdef GTS_COMPILATION # include "config.h" #endif /* not GTS_COMPILATION */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Added based on glib.h by M J Loehr 01/01/01 */ /* GTS version. * we prefix variable declarations so they can * properly get exported in windows dlls. */ #ifdef NATIVE_WIN32 # ifdef GTS_COMPILATION # define GTS_C_VAR __declspec(dllexport) # else /* not GTS_COMPILATION */ # define GTS_C_VAR extern __declspec(dllimport) # endif /* not GTS_COMPILATION */ #else /* not NATIVE_WIN32 */ # define GTS_C_VAR extern #endif /* not NATIVE_WIN32 */ GTS_C_VAR const guint gts_major_version; GTS_C_VAR const guint gts_minor_version; GTS_C_VAR const guint gts_micro_version; GTS_C_VAR const guint gts_interface_age; GTS_C_VAR const guint gts_binary_age; #define GTS_CHECK_VERSION(major,minor,micro) \ (gts_major_version > (major) || \ (gts_major_version == (major) && gts_minor_version > (minor)) || \ (gts_major_version == (major) && gts_minor_version == (minor) && \ gts_micro_version >= (micro))) #define GTS_COMMENTS "#!" #define GTS_MAINTAINER "popinet@users.sourceforge.net" /* Class declarations for base types */ typedef struct _GtsObjectClassInfo GtsObjectClassInfo; typedef struct _GtsObject GtsObject; typedef struct _GtsObjectClass GtsObjectClass; typedef struct _GtsPoint GtsPoint; typedef struct _GtsPointClass GtsPointClass; typedef struct _GtsVertex GtsVertex; typedef struct _GtsVertexClass GtsVertexClass; typedef struct _GtsSegment GtsSegment; typedef struct _GtsSegmentClass GtsSegmentClass; typedef struct _GtsEdge GtsEdge; typedef struct _GtsEdgeClass GtsEdgeClass; typedef struct _GtsTriangle GtsTriangle; typedef struct _GtsTriangleClass GtsTriangleClass; typedef struct _GtsFace GtsFace; typedef struct _GtsFaceClass GtsFaceClass; typedef struct _GtsBBox GtsBBox; typedef struct _GtsBBoxClass GtsBBoxClass; typedef struct _GtsSurface GtsSurface; typedef struct _GtsSurfaceClass GtsSurfaceClass; typedef void (*GtsObjectClassInitFunc) (GtsObjectClass * objclass); typedef void (*GtsObjectInitFunc) (GtsObject * obj); typedef void (*GtsArgSetFunc) (GtsObject * obj); typedef void (*GtsArgGetFunc) (GtsObject * obj); typedef gdouble GtsVector[3]; typedef gdouble GtsVector4[4]; typedef GtsVector4 GtsMatrix; /** * GtsKeyFunc: * @item: A pointer to an item to be stored in the heap. * @data: User data passed to gts_eheap_new(). * * Returns: the value of the key for the given item. */ typedef gdouble (*GtsKeyFunc) (gpointer item, gpointer data); typedef enum { GTS_OUT = -1, GTS_ON = 0, GTS_IN = 1 } GtsIntersect; typedef struct _GtsColor GtsColor; struct _GtsColor { gfloat r, g, b; }; typedef gint (*GtsFunc) (gpointer item, gpointer data); /* misc.c */ typedef struct _GtsFile GtsFile; typedef enum { GTS_NONE = 1 << 8, GTS_INT = 1 << 9, GTS_UINT = 1 << 10, GTS_FLOAT = 1 << 11, GTS_DOUBLE = 1 << 12, GTS_STRING = 1 << 13, GTS_FILE = 1 << 14, GTS_ERROR = 1 << 15, GTS_OBJ = 1 << 16, } GtsTokenType; struct _GtsFile { FILE * fp; guint line, pos; GString * token; GtsTokenType type; gchar * error; guint curline, curpos; guint scope, scope_max; gint next_token; gchar * delimiters; gchar * comments; gchar * tokens; gchar * buf; size_t len; }; typedef struct _GtsFileVariable GtsFileVariable; struct _GtsFileVariable { GtsTokenType type; gchar name[30]; gboolean unique; gpointer data; gboolean set; guint line, pos; }; GtsFile * gts_file_new (FILE * fp); GtsFile * gts_file_new_from_string (gchar * s); GtsFile * gts_file_new_from_buffer (gchar * buf, size_t len); void gts_file_verror (GtsFile * f, const gchar * format, va_list args); void gts_file_error (GtsFile * f, const gchar * format, ...); gint gts_file_getc (GtsFile * f); guint gts_file_read (GtsFile * f, gpointer ptr, guint size, guint nmemb); gint gts_file_getc_scope (GtsFile * f); void gts_file_next_token (GtsFile * f); void gts_file_first_token_after (GtsFile * f, GtsTokenType type); void gts_file_assign_start (GtsFile * f, GtsFileVariable * vars); GtsFileVariable * gts_file_assign_next (GtsFile * f, GtsFileVariable * vars); void gts_file_assign_variables (GtsFile * f, GtsFileVariable * vars); void gts_file_variable_error (GtsFile * f, GtsFileVariable * vars, const gchar * name, const gchar * format, ...); void gts_file_destroy (GtsFile * f); /* Objects: object.c */ #ifdef GTS_CHECK_CASTS # define GTS_OBJECT_CAST(obj, type, klass) ((type *) gts_object_check_cast (obj, klass)) # define GTS_OBJECT_CLASS_CAST(objklass, type, klass) ((type *) gts_object_class_check_cast (objklass, klass)) #else /* not GTS_CHECK_CASTS */ # define GTS_OBJECT_CAST(obj, type, klass) ((type *) (obj)) # define GTS_OBJECT_CLASS_CAST(objklass, type, klass) ((type *) (objklass)) #endif /* not GTS_CHECK_CASTS */ #define GTS_CLASS_NAME_LENGTH 40 #define GTS_OBJECT(obj) GTS_OBJECT_CAST (obj,\ GtsObject,\ gts_object_class ()) #define GTS_OBJECT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsObjectClass,\ gts_object_class()) #define GTS_IS_OBJECT(obj) (gts_object_is_from_class (obj,\ gts_object_class ())) typedef enum { GTS_DESTROYED = 1 << 0, GTS_USER_FLAG = 1 /* user flags start from here */ } GtsObjectFlags; #define GTS_OBJECT_FLAGS(obj) (GTS_OBJECT (obj)->flags) #define GTS_OBJECT_DESTROYED(obj) ((GTS_OBJECT_FLAGS (obj) & GTS_DESTROYED) != 0) #define GTS_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (GTS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END #define GTS_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (GTS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END struct _GtsObjectClassInfo { gchar name[GTS_CLASS_NAME_LENGTH]; guint object_size; guint class_size; GtsObjectClassInitFunc class_init_func; GtsObjectInitFunc object_init_func; GtsArgSetFunc arg_set_func; GtsArgGetFunc arg_get_func; }; struct _GtsObject { GtsObjectClass * klass; gpointer reserved; guint32 flags; }; struct _GtsObjectClass { GtsObjectClassInfo info; GtsObjectClass * parent_class; void (* clone) (GtsObject *, GtsObject *); void (* destroy) (GtsObject *); void (* read) (GtsObject **, GtsFile *); void (* write) (GtsObject *, FILE *); GtsColor (* color) (GtsObject *); void (* attributes) (GtsObject *, GtsObject *); }; gpointer gts_object_class_new (GtsObjectClass * parent_class, GtsObjectClassInfo * info); GtsObjectClass * gts_object_class (void); gpointer gts_object_check_cast (gpointer object, gpointer klass); gpointer gts_object_class_check_cast (gpointer klass, gpointer from); static inline gpointer gts_object_is_from_class (gpointer object, gpointer klass) { GtsObjectClass * c; g_return_val_if_fail (klass != NULL, NULL); if (object == NULL) return NULL; c = ((GtsObject *) object)->klass; g_return_val_if_fail (c != NULL, NULL); while (c) { if (c == klass) return object; c = c->parent_class; } return NULL; } static inline gpointer gts_object_class_is_from_class (gpointer klass, gpointer from) { GtsObjectClass * c; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (from != NULL, NULL); c = (GtsObjectClass *) klass; while (c) { if (c == from) return klass; c = c->parent_class; } return NULL; } GtsObjectClass * gts_object_class_from_name (const gchar * name); GtsObject * gts_object_new (GtsObjectClass * klass); GtsObject * gts_object_clone (GtsObject * object); void gts_object_attributes (GtsObject * object, GtsObject * from); void gts_object_init (GtsObject * object, GtsObjectClass * klass); void gts_object_reset_reserved (GtsObject * object); void gts_object_destroy (GtsObject * object); void gts_finalize (void); /* Ranges: surface.c */ typedef struct _GtsRange GtsRange; struct _GtsRange { gdouble min, max, sum, sum2, mean, stddev; guint n; }; void gts_range_init (GtsRange * r); void gts_range_reset (GtsRange * r); void gts_range_add_value (GtsRange * r, gdouble val); void gts_range_update (GtsRange * r); void gts_range_print (GtsRange * r, FILE * fptr); /* Points: point.c */ #define GTS_IS_POINT(obj) (gts_object_is_from_class (obj,\ gts_point_class ())) #define GTS_POINT(obj) GTS_OBJECT_CAST (obj,\ GtsPoint,\ gts_point_class ()) #define GTS_POINT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsPointClass,\ gts_point_class ()) struct _GtsPoint { GtsObject object; gdouble x, y, z; /* must be contiguous (cast to robust functions) */ }; struct _GtsPointClass { GtsObjectClass parent_class; gboolean binary; }; GtsPointClass * gts_point_class (void); GtsPoint * gts_point_new (GtsPointClass * klass, gdouble x, gdouble y, gdouble z); void gts_point_set (GtsPoint * p, gdouble x, gdouble y, gdouble z); #define gts_point_is_in_rectangle(p, p1, p2) ((p)->x >= (p1)->x &&\ (p)->x <= (p2)->x &&\ (p)->y >= (p1)->y &&\ (p)->y <= (p2)->y &&\ (p)->z >= (p1)->z &&\ (p)->z <= (p2)->z) GtsPoint * gts_segment_triangle_intersection (GtsSegment * s, GtsTriangle * t, gboolean boundary, GtsPointClass * klass); void gts_point_transform (GtsPoint * p, GtsMatrix * m); gdouble gts_point_distance (GtsPoint * p1, GtsPoint * p2); gdouble gts_point_distance2 (GtsPoint * p1, GtsPoint * p2); gdouble gts_point_orientation_3d (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4); gint gts_point_orientation_3d_sos (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4); GtsIntersect gts_point_is_in_triangle (GtsPoint * p, GtsTriangle * t); gdouble gts_point_in_circle (GtsPoint * p, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3); gdouble gts_point_in_sphere (GtsPoint * p, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4); gdouble gts_point_in_triangle_circle (GtsPoint * p, GtsTriangle * t); gdouble gts_point_orientation (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3); gint gts_point_orientation_sos (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3); gdouble gts_point_segment_distance2 (GtsPoint * p, GtsSegment * s); gdouble gts_point_segment_distance (GtsPoint * p, GtsSegment * s); void gts_point_segment_closest (GtsPoint * p, GtsSegment * s, GtsPoint * closest); gdouble gts_point_triangle_distance2 (GtsPoint * p, GtsTriangle * t); gdouble gts_point_triangle_distance (GtsPoint * p, GtsTriangle * t); void gts_point_triangle_closest (GtsPoint * p, GtsTriangle * t, GtsPoint * closest); gboolean gts_point_is_inside_surface (GtsPoint * p, GNode * tree, gboolean is_open); /* Vertices: vertex.c */ #define GTS_IS_VERTEX(obj) (gts_object_is_from_class (obj,\ gts_vertex_class ())) #define GTS_VERTEX(obj) GTS_OBJECT_CAST (obj,\ GtsVertex,\ gts_vertex_class ()) #define GTS_VERTEX_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsVertexClass,\ gts_vertex_class ()) struct _GtsVertex { GtsPoint p; GSList * segments; }; struct _GtsVertexClass { GtsPointClass parent_class; void (* intersection_attributes) (GtsVertex *, GtsObject *, GtsObject *); }; GTS_C_VAR gboolean gts_allow_floating_vertices; GtsVertexClass * gts_vertex_class (void); GtsVertex * gts_vertex_new (GtsVertexClass * klass, gdouble x, gdouble y, gdouble z); void gts_vertex_replace (GtsVertex * v, GtsVertex * with); gboolean gts_vertex_is_unattached (GtsVertex * v); GtsSegment * gts_vertices_are_connected (GtsVertex * v1, GtsVertex * v2); GSList * gts_vertex_triangles (GtsVertex * v, GSList * list); GSList * gts_vertex_faces (GtsVertex * v, GtsSurface * surface, GSList * list); GSList * gts_vertex_neighbors (GtsVertex * v, GSList * list, GtsSurface * surface); GSList * gts_vertices_from_segments (GSList * segments); gboolean gts_vertex_is_boundary (GtsVertex * v, GtsSurface * surface); GList * gts_vertices_merge (GList * vertices, gdouble epsilon, gboolean (* check) (GtsVertex *, GtsVertex *)); GSList * gts_vertex_fan_oriented (GtsVertex * v, GtsSurface * surface); guint gts_vertex_is_contact (GtsVertex * v, gboolean sever); /* GtsVertexNormal: Header */ typedef struct _GtsVertexNormal GtsVertexNormal; struct _GtsVertexNormal { /*< private >*/ GtsVertex parent; /*< public >*/ GtsVector n; }; #define GTS_VERTEX_NORMAL(obj) GTS_OBJECT_CAST (obj,\ GtsVertexNormal,\ gts_vertex_normal_class ()) #define GTS_IS_VERTEX_NORMAL(obj) (gts_object_is_from_class (obj,\ gts_vertex_normal_class ())) GtsVertexClass * gts_vertex_normal_class (void); /* GtsColorVertex: Header */ typedef struct _GtsColorVertex GtsColorVertex; struct _GtsColorVertex { /*< private >*/ GtsVertex parent; /*< public >*/ GtsColor c; }; #define GTS_COLOR_VERTEX(obj) GTS_OBJECT_CAST (obj,\ GtsColorVertex,\ gts_color_vertex_class ()) #define GTS_IS_COLOR_VERTEX(obj) (gts_object_is_from_class (obj,\ gts_color_vertex_class ())) GtsVertexClass * gts_color_vertex_class (void); /* Segments: segment.c */ #define GTS_IS_SEGMENT(obj) (gts_object_is_from_class (obj,\ gts_segment_class ())) #define GTS_SEGMENT(obj) GTS_OBJECT_CAST (obj,\ GtsSegment,\ gts_segment_class ()) #define GTS_SEGMENT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsSegmentClass,\ gts_segment_class ()) struct _GtsSegment { GtsObject object; GtsVertex * v1; GtsVertex * v2; }; struct _GtsSegmentClass { GtsObjectClass parent_class; }; GtsSegmentClass * gts_segment_class (void); GtsSegment * gts_segment_new (GtsSegmentClass * klass, GtsVertex * v1, GtsVertex * v2); #define gts_segment_connect(s, e1, e2) (((s)->v1 == e1 &&\ (s)->v2 == e2) || \ ((s)->v1 == e2 &&\ (s)->v2 == e1)) #define gts_segments_are_identical(s1, s2) (((s1)->v1 == (s2)->v1 &&\ (s1)->v2 == (s2)->v2)\ ||\ ((s1)->v1 == (s2)->v2 &&\ (s1)->v2 == (s2)->v1)) #define gts_segments_touch(s1, s2) ((s1)->v1 == (s2)->v1 ||\ (s1)->v1 == (s2)->v2 ||\ (s1)->v2 == (s2)->v1 ||\ (s1)->v2 == (s2)->v2) GtsIntersect gts_segments_are_intersecting (GtsSegment * s1, GtsSegment * s2); GtsSegment * gts_segment_is_duplicate (GtsSegment * s); GtsVertex * gts_segment_midvertex (GtsSegment * s, GtsVertexClass * klass); GSList * gts_segments_from_vertices (GSList * vertices); gboolean gts_segment_is_ok (GtsSegment * s); /* Edges: edge.c */ #define GTS_IS_EDGE(obj) (gts_object_is_from_class (obj,\ gts_edge_class ())) #define GTS_EDGE(obj) GTS_OBJECT_CAST (obj,\ GtsEdge,\ gts_edge_class ()) #define GTS_EDGE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsEdgeClass,\ gts_edge_class ()) struct _GtsEdge { GtsSegment segment; GSList * triangles; }; struct _GtsEdgeClass { GtsSegmentClass parent_class; }; GTS_C_VAR gboolean gts_allow_floating_edges; GtsEdgeClass * gts_edge_class (void); GtsEdge * gts_edge_new (GtsEdgeClass * klass, GtsVertex * v1, GtsVertex * v2); /** * gts_edge_is_unattached: * @s: a #GtsEdge. * * Evaluates to %TRUE if no triangles uses @s as an edge, %FALSE otherwise. */ #define gts_edge_is_unattached(s) ((s)->triangles == NULL ? TRUE : FALSE) GtsFace * gts_edge_has_parent_surface (GtsEdge * e, GtsSurface * surface); GtsFace * gts_edge_has_any_parent_surface (GtsEdge * e); GtsFace * gts_edge_is_boundary (GtsEdge * e, GtsSurface * surface); void gts_edge_replace (GtsEdge * e, GtsEdge * with); GSList * gts_edges_from_vertices (GSList * vertices, GtsSurface * parent); guint gts_edge_face_number (GtsEdge * e, GtsSurface * s); gboolean gts_edge_collapse_is_valid (GtsEdge * e); gboolean gts_edge_collapse_creates_fold (GtsEdge * e, GtsVertex * v, gdouble max); GtsEdge * gts_edge_is_duplicate (GtsEdge * e); GList * gts_edges_merge (GList * edges); gboolean gts_edge_belongs_to_tetrahedron (GtsEdge * e); guint gts_edge_is_contact (GtsEdge * e); void gts_edge_swap (GtsEdge * e, GtsSurface * s); gboolean gts_edge_manifold_faces (GtsEdge * e, GtsSurface * s, GtsFace ** f1, GtsFace ** f2); /* Triangles: triangle.c */ #define GTS_IS_TRIANGLE(obj) (gts_object_is_from_class (obj,\ gts_triangle_class ())) #define GTS_TRIANGLE(obj) GTS_OBJECT_CAST (obj,\ GtsTriangle,\ gts_triangle_class ()) #define GTS_TRIANGLE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsTriangleClass,\ gts_triangle_class ()) struct _GtsTriangle { GtsObject object; GtsEdge * e1; GtsEdge * e2; GtsEdge * e3; }; struct _GtsTriangleClass { GtsObjectClass parent_class; }; GtsTriangleClass * gts_triangle_class (void); void gts_triangle_set (GtsTriangle * triangle, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3); GtsTriangle * gts_triangle_new (GtsTriangleClass * klass, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3); #define gts_triangle_vertex(t) (GTS_SEGMENT (GTS_TRIANGLE (t)->e1)->v1 ==\ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1 || \ GTS_SEGMENT (GTS_TRIANGLE (t)->e1)->v2 ==\ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1 ? \ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v2 :\ GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1) GtsVertex * gts_triangle_vertex_opposite (GtsTriangle * t, GtsEdge * e); GtsEdge * gts_triangle_edge_opposite (GtsTriangle * t, GtsVertex * v); gdouble gts_triangles_angle (GtsTriangle * t1, GtsTriangle * t2); gboolean gts_triangles_are_compatible (GtsTriangle * t1, GtsTriangle * t2, GtsEdge * e); gdouble gts_triangle_area (GtsTriangle * t); gdouble gts_triangle_perimeter (GtsTriangle * t); gdouble gts_triangle_quality (GtsTriangle * t); void gts_triangle_normal (GtsTriangle * t, gdouble * x, gdouble * y, gdouble * z); gdouble gts_triangle_orientation (GtsTriangle * t); void gts_triangle_revert (GtsTriangle * t); GSList * gts_triangles_from_edges (GSList * edges); void gts_triangle_vertices_edges (GtsTriangle * t, GtsEdge * e, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3, GtsEdge ** e1, GtsEdge ** e2, GtsEdge ** e3); GtsTriangle * gts_triangle_enclosing (GtsTriangleClass * klass, GSList * points, gdouble scale); guint gts_triangle_neighbor_number (GtsTriangle * t); GSList * gts_triangle_neighbors (GtsTriangle * t); GtsEdge * gts_triangles_common_edge (GtsTriangle * t1, GtsTriangle * t2); GtsTriangle * gts_triangle_is_duplicate (GtsTriangle * t); GtsTriangle * gts_triangle_use_edges (GtsEdge * e1, GtsEdge * e2, GtsEdge * e3); gboolean gts_triangle_is_ok (GtsTriangle * t); void gts_triangle_vertices (GtsTriangle * t, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3); GtsPoint * gts_triangle_circumcircle_center (GtsTriangle * t, GtsPointClass * point_class); gboolean gts_triangles_are_folded (GSList * triangles, GtsVertex * A, GtsVertex * B, gdouble max); GtsObject * gts_triangle_is_stabbed (GtsTriangle * t, GtsPoint * p, gdouble * orientation); void gts_triangle_interpolate_height (GtsTriangle * t, GtsPoint * p); /* Faces: face.c */ #define GTS_IS_FACE(obj) (gts_object_is_from_class (obj,\ gts_face_class ())) #define GTS_FACE(obj) GTS_OBJECT_CAST (obj,\ GtsFace,\ gts_face_class ()) #define GTS_FACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsFaceClass,\ gts_face_class ()) struct _GtsFace { GtsTriangle triangle; GSList * surfaces; }; struct _GtsFaceClass { GtsTriangleClass parent_class; }; GTS_C_VAR gboolean gts_allow_floating_faces; GtsFaceClass * gts_face_class (void); GtsFace * gts_face_new (GtsFaceClass * klass, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3); gboolean gts_face_has_parent_surface (GtsFace * f, GtsSurface * s); GSList * gts_faces_from_edges (GSList * edges, GtsSurface * s); guint gts_face_neighbor_number (GtsFace * f, GtsSurface * s); GSList * gts_face_neighbors (GtsFace * f, GtsSurface * s); void gts_face_foreach_neighbor (GtsFace * f, GtsSurface * s, GtsFunc func, gpointer data); gboolean gts_face_is_compatible (GtsFace * f, GtsSurface * s); /* Matrices: matrix.c */ #define gts_vector_cross(C,A,B) ((C)[0] = (A)[1]*(B)[2] - (A)[2]*(B)[1],\ (C)[1] = (A)[2]*(B)[0] - (A)[0]*(B)[2],\ (C)[2] = (A)[0]*(B)[1] - (A)[1]*(B)[0]) #define gts_vector_init(v, p1, p2) ((v)[0] = (p2)->x - (p1)->x,\ (v)[1] = (p2)->y - (p1)->y,\ (v)[2] = (p2)->z - (p1)->z) #define gts_vector_scalar(v1, v2) ((v1)[0]*(v2)[0] +\ (v1)[1]*(v2)[1] +\ (v1)[2]*(v2)[2]) #define gts_vector_norm(v) (sqrt ((v)[0]*(v)[0] +\ (v)[1]*(v)[1] +\ (v)[2]*(v)[2])) #define gts_vector_normalize(v) {\ gdouble __gts_n = gts_vector_norm (v);\ if (__gts_n > 0.) {\ (v)[0] /= __gts_n;\ (v)[1] /= __gts_n;\ (v)[2] /= __gts_n;\ }\ } GtsMatrix * gts_matrix_new (gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33); void gts_matrix_assign (GtsMatrix * m, gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33); GtsMatrix * gts_matrix_projection (GtsTriangle * t); GtsMatrix * gts_matrix_transpose (GtsMatrix * m); gdouble gts_matrix_determinant (GtsMatrix * m); GtsMatrix * gts_matrix_inverse (GtsMatrix * m); GtsMatrix * gts_matrix3_inverse (GtsMatrix * m); void gts_matrix_print (GtsMatrix * m, FILE * fptr); guint gts_matrix_compatible_row (GtsMatrix * A, GtsVector b, guint n, GtsVector A1, gdouble b1); guint gts_matrix_quadratic_optimization (GtsMatrix * A, GtsVector b, guint n, GtsMatrix * H, GtsVector c); GtsMatrix * gts_matrix_product (GtsMatrix * m1, GtsMatrix * m2); GtsMatrix * gts_matrix_zero (GtsMatrix * m); GtsMatrix * gts_matrix_identity (GtsMatrix * m); GtsMatrix * gts_matrix_scale (GtsMatrix * m, GtsVector s); GtsMatrix * gts_matrix_translate (GtsMatrix * m, GtsVector t); GtsMatrix * gts_matrix_rotate (GtsMatrix * m, GtsVector r, gdouble angle); void gts_matrix_destroy (GtsMatrix * m); void gts_vector_print (GtsVector v, FILE * fptr); void gts_vector4_print (GtsVector4 v, FILE * fptr); /* Kdtrees: kdtree.c */ #define gts_kdtree_destroy(tree) g_node_destroy(tree) GNode * gts_kdtree_new (GPtrArray * points, int (*compare) (const void *, const void *)); GSList * gts_kdtree_range (GNode * tree, GtsBBox * bbox, int (*compare) (const void *, const void *)); /* Bboxtrees: bbtree.c */ /** * GtsBBTreeTraverseFunc: * @bb1: a #GtsBBox. * @bb2: another #GtsBBox. * @data: user data passed to the function. * * User function called for each pair of overlapping bounding * boxes. See gts_bb_tree_traverse_overlapping(). */ typedef void (*GtsBBTreeTraverseFunc) (GtsBBox * bb1, GtsBBox * bb2, gpointer data); /** * GtsBBoxDistFunc: * @p: a #GtsPoint. * @bounded: an object bounded by a #GtsBBox. * * User function returning the (minimum) distance between the object * defined by @bounded and point @p. * * Returns: the distance between @p and @bounded. */ typedef gdouble (*GtsBBoxDistFunc) (GtsPoint * p, gpointer bounded); /** * GtsBBoxClosestFunc: * @p: a #GtsPoint. * @bounded: an object bounded by a #GtsBBox. * * User function returning a #GtsPoint belonging to the object defined * by @bounded and closest to @p. * * Returns: a #GtsPoint. */ typedef GtsPoint * (*GtsBBoxClosestFunc) (GtsPoint * p, gpointer bounded); /** * GTS_IS_BBOX: * @obj: a #GtsObject. * * Evaluates to %TRUE if @obj is a #GtsBBox, %FALSE otherwise. */ #define GTS_IS_BBOX(obj) (gts_object_is_from_class (obj,\ gts_bbox_class ())) /** * GTS_BBOX: * @obj: a #GtsObject. * * Casts @obj to #GtsBBox. */ #define GTS_BBOX(obj) GTS_OBJECT_CAST (obj,\ GtsBBox,\ gts_bbox_class ()) /** * GTS_BBOX_CLASS: * @klass: a descendant of #GtsBBoxClass. * * Casts @klass to #GtsBBoxClass. */ #define GTS_BBOX_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsBBoxClass,\ gts_bbox_class ()) struct _GtsBBox { GtsObject object; gpointer bounded; gdouble x1, y1, z1; gdouble x2, y2, z2; }; struct _GtsBBoxClass { GtsObjectClass parent_class; }; GtsBBoxClass * gts_bbox_class (void); GtsBBox * gts_bbox_new (GtsBBoxClass * klass, gpointer bounded, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2); void gts_bbox_set (GtsBBox * bbox, gpointer bounded, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2); GtsBBox * gts_bbox_segment (GtsBBoxClass * klass, GtsSegment * s); GtsBBox * gts_bbox_triangle (GtsBBoxClass * klass, GtsTriangle * t); GtsBBox * gts_bbox_surface (GtsBBoxClass * klass, GtsSurface * surface); GtsBBox * gts_bbox_bboxes (GtsBBoxClass * klass, GSList * bboxes); GtsBBox * gts_bbox_points (GtsBBoxClass * klass, GSList * points); /** * gts_bbox_point_is_inside: * @bbox: a #GtsBBox. * @p: a #GtsPoint. * * Evaluates to %TRUE if @p is inside (or on the boundary) of @bbox, %FALSE otherwise. */ #define gts_bbox_point_is_inside(bbox, p) ((p)->x >= (bbox)->x1 &&\ (p)->y >= (bbox)->y1 &&\ (p)->z >= (bbox)->z1 &&\ (p)->x <= (bbox)->x2 &&\ (p)->y <= (bbox)->y2 &&\ (p)->z <= (bbox)->z2) gboolean gts_bboxes_are_overlapping (GtsBBox * bb1, GtsBBox * bb2); void gts_bbox_draw (GtsBBox * bb, FILE * fptr); gdouble gts_bbox_diagonal2 (GtsBBox * bb); void gts_bbox_point_distance2 (GtsBBox * bb, GtsPoint * p, gdouble * min, gdouble * max); gboolean gts_bbox_is_stabbed (GtsBBox * bb, GtsPoint * p); gboolean gts_bbox_overlaps_triangle (GtsBBox * bb, GtsTriangle * t); gboolean gts_bbox_overlaps_segment (GtsBBox * bb, GtsSegment * s); GNode * gts_bb_tree_new (GSList * bboxes); GNode * gts_bb_tree_surface (GtsSurface * s); GSList * gts_bb_tree_stabbed (GNode * tree, GtsPoint * p); GSList * gts_bb_tree_overlap (GNode * tree, GtsBBox * bbox); gboolean gts_bb_tree_is_overlapping (GNode * tree, GtsBBox * bbox); void gts_bb_tree_traverse_overlapping (GNode * tree1, GNode * tree2, GtsBBTreeTraverseFunc func, gpointer data); void gts_bb_tree_draw (GNode * tree, guint depth, FILE * fptr); GSList * gts_bb_tree_point_closest_bboxes (GNode * tree, GtsPoint * p); gdouble gts_bb_tree_point_distance (GNode * tree, GtsPoint * p, GtsBBoxDistFunc distance, GtsBBox ** bbox); GtsPoint * gts_bb_tree_point_closest (GNode * tree, GtsPoint * p, GtsBBoxClosestFunc closest, gdouble * distance); void gts_bb_tree_segment_distance (GNode * tree, GtsSegment * s, GtsBBoxDistFunc distance, gdouble delta, GtsRange * range); void gts_bb_tree_triangle_distance (GNode * tree, GtsTriangle * t, GtsBBoxDistFunc distance, gdouble delta, GtsRange * range); void gts_bb_tree_surface_distance (GNode * tree, GtsSurface * s, GtsBBoxDistFunc distance, gdouble delta, GtsRange * range); void gts_bb_tree_surface_boundary_distance (GNode * tree, GtsSurface * s, GtsBBoxDistFunc distance, gdouble delta, GtsRange * range); void gts_bb_tree_destroy (GNode * tree, gboolean free_leaves); /* Surfaces: surface.c */ typedef struct _GtsSurfaceStats GtsSurfaceStats; typedef struct _GtsSurfaceQualityStats GtsSurfaceQualityStats; typedef GtsVertex * (*GtsRefineFunc) (GtsEdge * e, GtsVertexClass * klass, gpointer data); typedef GtsVertex * (*GtsCoarsenFunc) (GtsEdge * e, GtsVertexClass * klass, gpointer data); typedef gboolean (*GtsStopFunc) (gdouble cost, guint nedge, gpointer data); struct _GtsSurfaceStats { guint n_faces; guint n_incompatible_faces; guint n_duplicate_faces; guint n_duplicate_edges; guint n_boundary_edges; guint n_non_manifold_edges; GtsRange edges_per_vertex, faces_per_edge; GtsSurface * parent; }; struct _GtsSurfaceQualityStats { GtsRange face_quality; GtsRange face_area; GtsRange edge_length; GtsRange edge_angle; GtsSurface * parent; }; struct _GtsSurface { GtsObject object; #ifdef USE_SURFACE_BTREE GTree * faces; #else /* not USE_SURFACE_BTREE */ GHashTable * faces; #endif /* not USE_SURFACE_BTREE */ GtsFaceClass * face_class; GtsEdgeClass * edge_class; GtsVertexClass * vertex_class; gboolean keep_faces; }; struct _GtsSurfaceClass { GtsObjectClass parent_class; void (* add_face) (GtsSurface *, GtsFace *); void (* remove_face) (GtsSurface *, GtsFace *); }; #define GTS_IS_SURFACE(obj) (gts_object_is_from_class (obj,\ gts_surface_class ())) #define GTS_SURFACE(obj) GTS_OBJECT_CAST (obj,\ GtsSurface,\ gts_surface_class ()) #define GTS_SURFACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsSurfaceClass,\ gts_surface_class ()) GtsSurfaceClass * gts_surface_class (void); GtsSurface * gts_surface_new (GtsSurfaceClass * klass, GtsFaceClass * face_class, GtsEdgeClass * edge_class, GtsVertexClass * vertex_class); void gts_surface_add_face (GtsSurface * s, GtsFace * f); void gts_surface_remove_face (GtsSurface * s, GtsFace * f); guint gts_surface_read (GtsSurface * surface, GtsFile * f); gdouble gts_surface_area (GtsSurface * s); void gts_surface_stats (GtsSurface * s, GtsSurfaceStats * stats); void gts_surface_quality_stats (GtsSurface * s, GtsSurfaceQualityStats * stats); void gts_surface_print_stats (GtsSurface * s, FILE * fptr); void gts_surface_write (GtsSurface * s, FILE * fptr); void gts_surface_write_oogl (GtsSurface * s, FILE * fptr); void gts_surface_write_vtk (GtsSurface * s, FILE * fptr); void gts_surface_write_oogl_boundary (GtsSurface * s, FILE * fptr); void gts_surface_foreach_vertex (GtsSurface * s, GtsFunc func, gpointer data); void gts_surface_foreach_edge (GtsSurface * s, GtsFunc func, gpointer data); void gts_surface_foreach_face (GtsSurface * s, GtsFunc func, gpointer data); guint gts_surface_foreach_face_remove (GtsSurface * s, GtsFunc func, gpointer data); typedef struct _GtsSurfaceTraverse GtsSurfaceTraverse; GtsSurfaceTraverse * gts_surface_traverse_new (GtsSurface * s, GtsFace * f); GtsFace * gts_surface_traverse_next (GtsSurfaceTraverse * t, guint * level); void gts_surface_traverse_destroy (GtsSurfaceTraverse * t); void gts_surface_refine (GtsSurface * surface, GtsKeyFunc cost_func, gpointer cost_data, GtsRefineFunc refine_func, gpointer refine_data, GtsStopFunc stop_func, gpointer stop_data); gboolean gts_edge_collapse_is_valid (GtsEdge * e); void gts_surface_coarsen (GtsSurface * surface, GtsKeyFunc cost_func, gpointer cost_data, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsStopFunc stop_func, gpointer stop_data, gdouble minangle); gboolean gts_coarsen_stop_number (gdouble cost, guint nedge, guint * min_number); gboolean gts_coarsen_stop_cost (gdouble cost, guint nedge, gdouble * max_cost); void gts_surface_tessellate (GtsSurface * s, GtsRefineFunc refine_func, gpointer refine_data); GtsSurface * gts_surface_generate_sphere (GtsSurface * s, guint geodesation_order); GtsSurface * gts_surface_copy (GtsSurface * s1, GtsSurface * s2); void gts_surface_merge (GtsSurface * s, GtsSurface * with); gboolean gts_surface_is_manifold (GtsSurface * s); gboolean gts_surface_is_closed (GtsSurface * s); gboolean gts_surface_is_orientable (GtsSurface * s); gdouble gts_surface_volume (GtsSurface * s); gdouble gts_surface_center_of_mass (GtsSurface * s, GtsVector cm); gdouble gts_surface_center_of_area (GtsSurface * s, GtsVector cm); guint gts_surface_vertex_number (GtsSurface * s); guint gts_surface_edge_number (GtsSurface * s); guint gts_surface_face_number (GtsSurface * s); void gts_surface_distance (GtsSurface * s1, GtsSurface * s2, gdouble delta, GtsRange * face_range, GtsRange * boundary_range); GSList * gts_surface_boundary (GtsSurface * surface); GSList * gts_surface_split (GtsSurface * s); /* Discrete differential operators: curvature.c */ gboolean gts_vertex_mean_curvature_normal (GtsVertex * v, GtsSurface * s, GtsVector Kh); gboolean gts_vertex_gaussian_curvature (GtsVertex * v, GtsSurface * s, gdouble * Kg); void gts_vertex_principal_curvatures (gdouble Kh, gdouble Kg, gdouble * K1, gdouble * K2); void gts_vertex_principal_directions (GtsVertex * v, GtsSurface * s, GtsVector Kh, gdouble Kg, GtsVector e1, GtsVector e2); /* Volume optimization: vopt.c */ typedef struct _GtsVolumeOptimizedParams GtsVolumeOptimizedParams; struct _GtsVolumeOptimizedParams { gdouble volume_weight; gdouble boundary_weight; gdouble shape_weight; }; GtsVertex * gts_volume_optimized_vertex (GtsEdge * edge, GtsVertexClass * klass, GtsVolumeOptimizedParams * params); gdouble gts_volume_optimized_cost (GtsEdge * e, GtsVolumeOptimizedParams * params); /* Boolean operations: boolean.c */ GSList * gts_surface_intersection (GtsSurface * s1, GtsSurface * s2, GNode * faces_tree1, GNode * faces_tree2); typedef struct _GtsSurfaceInter GtsSurfaceInter; typedef struct _GtsSurfaceInterClass GtsSurfaceInterClass; /** * GtsBooleanOperation: * @GTS_1_OUT_2: identifies the part of the first surface which lies * outside the second surface. * @GTS_1_IN_2: identifies the part of the first surface which lies * inside the second surface. * @GTS_2_OUT_1: identifies the part of the second surface which lies * outside the first surface. * @GTS_2_IN_1: identifies the part of the second surface which lies * inside the first surface. */ typedef enum { GTS_1_OUT_2, GTS_1_IN_2, GTS_2_OUT_1, GTS_2_IN_1 } GtsBooleanOperation; /** * GTS_IS_SURFACE_INTER: * @obj: a #GtsObject. * * Evaluates to %TRUE if @obj is a #GtsSurfaceInter, %FALSE otherwise. */ #define GTS_IS_SURFACE_INTER(obj) (gts_object_is_from_class (obj,\ gts_surface_inter_class ())) /** * GTS_SURFACE_INTER: * @obj: a descendant of #GtsSurfaceInter. * * Casts @obj to #GtsSurfaceInter. */ #define GTS_SURFACE_INTER(obj) GTS_OBJECT_CAST (obj,\ GtsSurfaceInter,\ gts_surface_inter_class ()) /** * GTS_SURFACE_INTER_CLASS: * @klass: a descendant of #GtsSurfaceInterClass. * * Casts @klass to #GtsSurfaceInterClass. */ #define GTS_SURFACE_INTER_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsSurfaceInterClass,\ gts_surface_inter_class ()) struct _GtsSurfaceInter { GtsObject object; GtsSurface * s1; GtsSurface * s2; GSList * edges; }; struct _GtsSurfaceInterClass { GtsObjectClass parent_class; }; GtsSurfaceInterClass * gts_surface_inter_class (void); GtsSurfaceInter * gts_surface_inter_new (GtsSurfaceInterClass * klass, GtsSurface * s1, GtsSurface * s2, GNode * faces_tree1, GNode * faces_tree2, gboolean is_open1, gboolean is_open2); gboolean gts_surface_inter_check (GtsSurfaceInter * si, gboolean * closed); void gts_surface_inter_boolean (GtsSurfaceInter * si, GtsSurface * surface, GtsBooleanOperation op); gboolean gts_surface_foreach_intersecting_face (GtsSurface * s, GtsBBTreeTraverseFunc func, gpointer data); GtsSurface * gts_surface_is_self_intersecting (GtsSurface * s); /* Binary Heap: heap.c */ typedef struct _GtsHeap GtsHeap; GtsHeap * gts_heap_new (GCompareFunc compare_func); void gts_heap_insert (GtsHeap * heap, gpointer p); gpointer gts_heap_remove_top (GtsHeap * heap); gpointer gts_heap_top (GtsHeap * heap); void gts_heap_thaw (GtsHeap * heap); void gts_heap_foreach (GtsHeap * heap, GFunc func, gpointer user_data); void gts_heap_freeze (GtsHeap * heap); guint gts_heap_size (GtsHeap * heap); void gts_heap_destroy (GtsHeap * heap); /* Extended Binary Heap: eheap.c */ typedef struct _GtsEHeap GtsEHeap; typedef struct _GtsEHeapPair GtsEHeapPair; /** * _GtsEHeapPair: * @data: Points to the item stored in the heap. * @key: Value of the key for this item. * @pos: Private field. */ struct _GtsEHeapPair { gpointer data; gdouble key; guint pos; }; GtsEHeap * gts_eheap_new (GtsKeyFunc key_func, gpointer data); GtsEHeapPair * gts_eheap_insert (GtsEHeap * heap, gpointer p); GtsEHeapPair * gts_eheap_insert_with_key (GtsEHeap * heap, gpointer p, gdouble key); gpointer gts_eheap_remove_top (GtsEHeap * heap, gdouble * key); gpointer gts_eheap_top (GtsEHeap * heap, gdouble * key); void gts_eheap_thaw (GtsEHeap * heap); void gts_eheap_foreach (GtsEHeap * heap, GFunc func, gpointer data); gpointer gts_eheap_remove (GtsEHeap * heap, GtsEHeapPair * p); void gts_eheap_decrease_key (GtsEHeap * heap, GtsEHeapPair * p, gdouble new_key); void gts_eheap_freeze (GtsEHeap * heap); guint gts_eheap_size (GtsEHeap * heap); void gts_eheap_update (GtsEHeap * heap); gdouble gts_eheap_key (GtsEHeap * heap, gpointer p); void gts_eheap_randomized (GtsEHeap * heap, gboolean randomized); void gts_eheap_destroy (GtsEHeap * heap); /* FIFO queues: fifo.c */ typedef struct _GtsFifo GtsFifo; GtsFifo * gts_fifo_new (void); void gts_fifo_write (GtsFifo * fifo, FILE * fp); void gts_fifo_push (GtsFifo * fifo, gpointer data); gpointer gts_fifo_pop (GtsFifo * fifo); gpointer gts_fifo_top (GtsFifo * fifo); guint gts_fifo_size (GtsFifo * fifo); gboolean gts_fifo_is_empty (GtsFifo * fifo); void gts_fifo_foreach (GtsFifo * fifo, GtsFunc func, gpointer data); void gts_fifo_reverse (GtsFifo * fifo); void gts_fifo_destroy (GtsFifo * fifo); /* Progressive surfaces */ /* split.c */ typedef struct _GtsSplit GtsSplit; typedef struct _GtsSplitClass GtsSplitClass; typedef struct _GtsSplitCFace GtsSplitCFace; struct _GtsSplit { GtsObject object; GtsVertex * v; GtsObject * v1; GtsObject * v2; GtsSplitCFace * cfaces; guint ncf; }; struct _GtsSplitClass { GtsObjectClass parent_class; }; #define GTS_IS_SPLIT(obj) (gts_object_is_from_class (obj,\ gts_split_class ())) #define GTS_SPLIT(obj) GTS_OBJECT_CAST (obj,\ GtsSplit,\ gts_split_class ()) #define GTS_SPLIT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsSplitClass,\ gts_split_class ()) #define GTS_SPLIT_V1(vs) (GTS_IS_SPLIT ((vs)->v1) ?\ GTS_SPLIT ((vs)->v1)->v :\ GTS_VERTEX ((vs)->v1)) #define GTS_SPLIT_V2(vs) (GTS_IS_SPLIT ((vs)->v2) ?\ GTS_SPLIT ((vs)->v2)->v :\ GTS_VERTEX ((vs)->v2)) GtsSplitClass * gts_split_class (void); GtsSplit * gts_split_new (GtsSplitClass * klass, GtsVertex * v, GtsObject * o1, GtsObject * o2); void gts_split_collapse (GtsSplit * vs, GtsEdgeClass * klass, GtsEHeap * heap); void gts_split_expand (GtsSplit * vs, GtsSurface * s, GtsEdgeClass * klass); typedef gboolean (*GtsSplitTraverseFunc) (GtsSplit * vs, gpointer data); void gts_split_traverse (GtsSplit * root, GTraverseType order, gint depth, GtsSplitTraverseFunc func, gpointer data); guint gts_split_height (GtsSplit * root); /* psurface.c */ typedef struct _GtsPSurface GtsPSurface; typedef struct _GtsPSurfaceClass GtsPSurfaceClass; struct _GtsPSurface { GtsObject object; GtsSurface * s; GPtrArray * split; GtsSplitClass * split_class; guint pos, min; GPtrArray * vertices; GPtrArray * faces; }; struct _GtsPSurfaceClass { GtsObjectClass parent_class; }; #define GTS_IS_PSURFACE(obj) (gts_object_is_from_class (obj,\ gts_psurface_class ())) #define GTS_PSURFACE(obj) GTS_OBJECT_CAST (obj,\ GtsPSurface,\ gts_psurface_class ()) #define GTS_PSURFACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsPSurfaceClass,\ gts_psurface_class ()) #define GTS_PSURFACE_IS_CLOSED(ps) (!(ps)->vertices) GtsPSurfaceClass * gts_psurface_class (void); GtsPSurface * gts_psurface_new (GtsPSurfaceClass * klass, GtsSurface * surface, GtsSplitClass * split_class, GtsKeyFunc cost_func, gpointer cost_data, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsStopFunc stop_func, gpointer stop_data, gdouble minangle); GtsSplit * gts_psurface_add_vertex (GtsPSurface * ps); GtsSplit * gts_psurface_remove_vertex (GtsPSurface * ps); guint gts_psurface_max_vertex_number (GtsPSurface * ps); guint gts_psurface_min_vertex_number (GtsPSurface * ps); void gts_psurface_set_vertex_number (GtsPSurface * ps, guint n); guint gts_psurface_get_vertex_number (GtsPSurface * ps); void gts_psurface_write (GtsPSurface * ps, FILE * fptr); GtsPSurface * gts_psurface_open (GtsPSurfaceClass * klass, GtsSurface * s, GtsSplitClass * split_class, GtsFile * f); GtsSplit * gts_psurface_read_vertex (GtsPSurface * ps, GtsFile * fp); void gts_psurface_close (GtsPSurface * ps); void gts_psurface_foreach_vertex (GtsPSurface * ps, GtsFunc func, gpointer data); /* hsurface.c */ typedef struct _GtsHSplit GtsHSplit; typedef struct _GtsHSplitClass GtsHSplitClass; typedef struct _GtsHSurface GtsHSurface; typedef struct _GtsHSurfaceClass GtsHSurfaceClass; struct _GtsHSplit { GtsSplit split; GtsEHeapPair * index; GtsHSplit * parent; guint nchild; }; struct _GtsHSplitClass { GtsSplitClass parent_class; }; #define GTS_IS_HSPLIT(obj) (gts_object_is_from_class (obj,\ gts_hsplit_class ())) #define GTS_HSPLIT(obj) GTS_OBJECT_CAST (obj,\ GtsHSplit,\ gts_hsplit_class ()) #define GTS_HSPLIT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsHSplitClass,\ gts_hsplit_class ()) GtsHSplitClass * gts_hsplit_class (void); GtsHSplit * gts_hsplit_new (GtsHSplitClass * klass, GtsSplit * vs); void gts_hsplit_collapse (GtsHSplit * hs, GtsHSurface * hsurface); void gts_hsplit_expand (GtsHSplit * hs, GtsHSurface * hsurface); void gts_hsplit_force_expand (GtsHSplit * hs, GtsHSurface * hsurface); struct _GtsHSurface { GtsObject object; GtsSurface * s; GSList * roots; GtsEHeap * expandable; GtsEHeap * collapsable; GPtrArray * split; guint nvertex; }; struct _GtsHSurfaceClass { GtsObjectClass parent_class; }; #define GTS_IS_HSURFACE(obj) (gts_object_is_from_class (obj,\ gts_hsurface_class ())) #define GTS_HSURFACE(obj) GTS_OBJECT_CAST (obj,\ GtsHSurface,\ gts_hsurface_class ()) #define GTS_HSURFACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsHSurfaceClass,\ gts_hsurface_class ()) GtsHSurfaceClass * gts_hsurface_class (void); GtsHSurface * gts_hsurface_new (GtsHSurfaceClass * klass, GtsHSplitClass * hsplit_class, GtsPSurface * psurface, GtsKeyFunc expand_key, gpointer expand_data, GtsKeyFunc collapse_key, gpointer collapse_data); void gts_hsurface_traverse (GtsHSurface * hsurface, GTraverseType order, gint depth, GtsSplitTraverseFunc func, gpointer data); void gts_hsurface_foreach (GtsHSurface * hsurface, GTraverseType order, GtsFunc func, gpointer data); guint gts_hsurface_height (GtsHSurface * hsurface); /* Constrained Delaunay triangulation: cdt.c */ /** * GTS_IS_CONSTRAINT: * @obj: a #GtsObject. * * Evaluates to %TRUE if @obj is a #GtsConstraint, %FALSE otherwise. */ #define GTS_IS_CONSTRAINT(obj) (gts_object_is_from_class (obj,\ gts_constraint_class ())) /** * GTS_CONSTRAINT: * @obj: a descendant of #GtsConstraint. * * Casts @obj to #GtsConstraint. */ #define GTS_CONSTRAINT(obj) GTS_OBJECT_CAST (obj,\ GtsConstraint,\ gts_constraint_class ()) /** * GTS_CONSTRAINT_CLASS: * @klass: a desscendant of #GtsConstraintClass. * * Casts @klass to #GtsConstraintClass. */ #define GTS_CONSTRAINT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsConstraintClass,\ gts_constraint_class ()) typedef struct _GtsConstraint GtsConstraint; typedef struct _GtsConstraintClass GtsConstraintClass; GtsConstraintClass * gts_constraint_class (void); GtsFace * gts_point_locate (GtsPoint * p, GtsSurface * surface, GtsFace * guess); GtsVertex * gts_delaunay_add_vertex_to_face (GtsSurface * surface, GtsVertex * v, GtsFace * f); GtsVertex * gts_delaunay_add_vertex (GtsSurface * surface, GtsVertex * v, GtsFace * guess); void gts_delaunay_remove_vertex (GtsSurface * surface, GtsVertex * v); GtsFace * gts_delaunay_check (GtsSurface * surface); GSList * gts_delaunay_add_constraint (GtsSurface * surface, GtsConstraint * c); void gts_delaunay_remove_hull (GtsSurface * surface); /* GtsListFace: Header */ typedef struct _GtsListFace GtsListFace; struct _GtsListFace { /*< private >*/ GtsFace parent; /*< public >*/ GSList * points; }; #define GTS_LIST_FACE(obj) GTS_OBJECT_CAST (obj,\ GtsListFace,\ gts_list_face_class ()) #define GTS_IS_LIST_FACE(obj) (gts_object_is_from_class (obj,\ gts_list_face_class ())) GtsFaceClass * gts_list_face_class (void); /* Constrained Delaunay refinement: refine.c */ typedef gboolean (* GtsEncroachFunc) (GtsVertex * v, GtsEdge * e, GtsSurface * s, gpointer data); gboolean gts_vertex_encroaches_edge (GtsVertex * v, GtsEdge * e); GtsVertex * gts_edge_is_encroached (GtsEdge * e, GtsSurface * s, GtsEncroachFunc encroaches, gpointer data); guint gts_delaunay_conform (GtsSurface * surface, gint steiner_max, GtsEncroachFunc encroaches, gpointer data); guint gts_delaunay_refine (GtsSurface * surface, gint steiner_max, GtsEncroachFunc encroaches, gpointer encroach_data, GtsKeyFunc cost, gpointer cost_data); /* Isosurfaces (marching cubes): iso.c */ typedef struct _GtsGridPlane GtsGridPlane; typedef struct _GtsIsoSlice GtsIsoSlice; typedef struct _GtsCartesianGrid GtsCartesianGrid; struct _GtsGridPlane { GtsPoint ** p; guint nx, ny; }; struct _GtsCartesianGrid { guint nx, ny, nz; gdouble x, dx, y, dy, z, dz; }; typedef void (*GtsIsoCartesianFunc) (gdouble ** a, GtsCartesianGrid g, guint i, gpointer data); GtsGridPlane * gts_grid_plane_new (guint nx, guint ny); void gts_grid_plane_destroy (GtsGridPlane * g); GtsIsoSlice * gts_iso_slice_new (guint nx, guint ny); void gts_iso_slice_fill (GtsIsoSlice * slice, GtsGridPlane * plane1, GtsGridPlane * plane2, gdouble ** f1, gdouble ** f2, gdouble iso, GtsVertexClass * klass); void gts_iso_slice_fill_cartesian (GtsIsoSlice * slice, GtsCartesianGrid g, gdouble ** f1, gdouble ** f2, gdouble iso, GtsVertexClass * klass); void gts_iso_slice_destroy (GtsIsoSlice * slice); void gts_isosurface_slice (GtsIsoSlice * slice1, GtsIsoSlice * slice2, GtsSurface * surface); void gts_isosurface_cartesian (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso); /* Isosurfaces (marching tetrahedra): isotetra.c */ void gts_isosurface_tetra (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso); void gts_isosurface_tetra_bcl (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso); void gts_isosurface_tetra_bounded (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso); /* Named vertices, edges and triangles: named.c */ #define GTS_NAME_LENGTH 40 #define GTS_NVERTEX(obj) GTS_OBJECT_CAST (obj,\ GtsNVertex,\ gts_nvertex_class ()) #define GTS_NVERTEX_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsNVertexClass,\ gts_nvertex_class()) #define GTS_IS_NVERTEX(obj) (gts_object_is_from_class (obj,\ gts_nvertex_class ())) typedef struct _GtsNVertex GtsNVertex; typedef struct _GtsNVertexClass GtsNVertexClass; struct _GtsNVertex { GtsVertex parent; char name[GTS_NAME_LENGTH]; }; struct _GtsNVertexClass { GtsVertexClass parent_class; }; GtsNVertexClass * gts_nvertex_class (void); #define GTS_NEDGE(obj) GTS_OBJECT_CAST (obj,\ GtsNEdge,\ gts_nedge_class ()) #define GTS_NEDGE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsNEdgeClass,\ gts_nedge_class()) #define GTS_IS_NEDGE(obj) (gts_object_is_from_class (obj,\ gts_nedge_class ())) typedef struct _GtsNEdge GtsNEdge; typedef struct _GtsNEdgeClass GtsNEdgeClass; struct _GtsNEdge { GtsEdge parent; char name[GTS_NAME_LENGTH]; }; struct _GtsNEdgeClass { GtsEdgeClass parent_class; }; GtsNEdgeClass * gts_nedge_class (void); #define GTS_NFACE(obj) GTS_OBJECT_CAST (obj,\ GtsNFace,\ gts_nface_class ()) #define GTS_NFACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsNFaceClass,\ gts_nface_class()) #define GTS_IS_NFACE(obj) (gts_object_is_from_class (obj,\ gts_nface_class ())) typedef struct _GtsNFace GtsNFace; typedef struct _GtsNFaceClass GtsNFaceClass; struct _GtsNFace { GtsFace parent; char name[GTS_NAME_LENGTH]; }; struct _GtsNFaceClass { GtsFaceClass parent_class; }; GtsNFaceClass * gts_nface_class (void); /* Cluster object for out-of-core simplification: oocs.c */ #define GTS_CLUSTER(obj) GTS_OBJECT_CAST (obj,\ GtsCluster,\ gts_cluster_class ()) #define GTS_CLUSTER_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsClusterClass,\ gts_cluster_class()) #define GTS_IS_CLUSTER(obj) (gts_object_is_from_class (obj,\ gts_cluster_class ())) typedef struct _GtsCluster GtsCluster; typedef struct _GtsClusterClass GtsClusterClass; typedef struct _GtsClusterId GtsClusterId; struct _GtsClusterId { guint x, y, z; }; struct _GtsCluster { GtsObject parent; GtsClusterId id; GtsVertex * v; guint n; }; struct _GtsClusterClass { GtsObjectClass parent_class; void (* add) (GtsCluster * c, GtsPoint * p, gpointer data); void (* update) (GtsCluster * c); }; GtsClusterClass * gts_cluster_class (void); GtsCluster * gts_cluster_new (GtsClusterClass * klass, GtsClusterId id, GtsVertexClass * vklass); void gts_cluster_add (GtsCluster * c, GtsPoint * p, gpointer data); void gts_cluster_update (GtsCluster * c); /* Cluster group object for out-of-core simplification: oocs.c */ #define GTS_CLUSTER_GRID(obj) GTS_OBJECT_CAST (obj,\ GtsClusterGrid,\ gts_cluster_grid_class ()) #define GTS_CLUSTER_GRID_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsClusterGridClass,\ gts_cluster_grid_class()) #define GTS_IS_CLUSTER_GRID(obj) (gts_object_is_from_class (obj,\ gts_cluster_grid_class ())) typedef struct _GtsClusterGrid GtsClusterGrid; typedef struct _GtsClusterGridClass GtsClusterGridClass; struct _GtsClusterGrid { GtsObject parent; GtsSurface * surface; GtsBBox * bbox; GtsVector size; GtsClusterClass * cluster_class; GHashTable * clusters; }; struct _GtsClusterGridClass { GtsObjectClass parent_class; }; GtsClusterGridClass * gts_cluster_grid_class (void); GtsClusterGrid * gts_cluster_grid_new (GtsClusterGridClass * klass, GtsClusterClass * cluster_class, GtsSurface * s, GtsBBox * bbox, gdouble delta); void gts_cluster_grid_add_triangle (GtsClusterGrid * cluster_grid, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, gpointer data); GtsRange gts_cluster_grid_update (GtsClusterGrid * cluster_grid); /* Triangle strip generation: stripe.c */ GSList * gts_surface_strip (GtsSurface * s); /* GtsContainee: container.c */ typedef struct _GtsContainee GtsContainee; typedef struct _GtsContaineeClass GtsContaineeClass; typedef struct _GtsContainer GtsContainer; typedef struct _GtsContainerClass GtsContainerClass; struct _GtsContainee { GtsObject object; }; struct _GtsContaineeClass { GtsObjectClass parent_class; void (* add_container) (GtsContainee *, GtsContainer *); void (* remove_container) (GtsContainee *, GtsContainer *); void (* foreach) (GtsContainee *, GtsFunc, gpointer); gboolean (* is_contained) (GtsContainee *, GtsContainer *); void (* replace) (GtsContainee *, GtsContainee *); }; #define GTS_CONTAINEE(obj) GTS_OBJECT_CAST (obj,\ GtsContainee,\ gts_containee_class ()) #define GTS_CONTAINEE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsContaineeClass,\ gts_containee_class()) #define GTS_IS_CONTAINEE(obj) (gts_object_is_from_class (obj,\ gts_containee_class ())) GtsContaineeClass * gts_containee_class (void); GtsContainee * gts_containee_new (GtsContaineeClass * klass); gboolean gts_containee_is_contained (GtsContainee * item, GtsContainer * c); void gts_containee_replace (GtsContainee * item, GtsContainee * with); /* GtsSListContainee: container.c */ typedef struct _GtsSListContainee GtsSListContainee; typedef struct _GtsSListContaineeClass GtsSListContaineeClass; struct _GtsSListContainee { GtsContainee containee; GSList * containers; }; struct _GtsSListContaineeClass { GtsContaineeClass parent_class; }; #define GTS_SLIST_CONTAINEE(obj) GTS_OBJECT_CAST (obj,\ GtsSListContainee,\ gts_slist_containee_class ()) #define GTS_SLIST_CONTAINEE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsSListContaineeClass,\ gts_slist_containee_class()) #define GTS_IS_SLIST_CONTAINEE(obj) (gts_object_is_from_class (obj,\ gts_slist_containee_class ())) GtsSListContaineeClass * gts_slist_containee_class (void); /* GtsContainer: container.c */ struct _GtsContainer { GtsSListContainee object; }; struct _GtsContainerClass { GtsSListContaineeClass parent_class; void (* add) (GtsContainer *, GtsContainee *); void (* remove) (GtsContainer *, GtsContainee *); void (* foreach) (GtsContainer *, GtsFunc, gpointer); guint (* size) (GtsContainer *); }; #define GTS_CONTAINER(obj) GTS_OBJECT_CAST (obj,\ GtsContainer,\ gts_container_class ()) #define GTS_CONTAINER_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsContainerClass,\ gts_container_class()) #define GTS_IS_CONTAINER(obj) (gts_object_is_from_class (obj,\ gts_container_class ())) GtsContainerClass * gts_container_class (void); GtsContainer * gts_container_new (GtsContainerClass * klass); void gts_container_add (GtsContainer * c, GtsContainee * item); void gts_container_remove (GtsContainer * c, GtsContainee * item); void gts_container_foreach (GtsContainer * c, GtsFunc func, gpointer data); guint gts_container_size (GtsContainer * c); /* GtsHashContainer: container.c */ typedef struct _GtsHashContainer GtsHashContainer; typedef struct _GtsHashContainerClass GtsHashContainerClass; struct _GtsHashContainer { GtsContainer c; GHashTable * items; gboolean frozen; }; struct _GtsHashContainerClass { GtsContainerClass parent_class; }; #define GTS_HASH_CONTAINER(obj) GTS_OBJECT_CAST (obj,\ GtsHashContainer,\ gts_hash_container_class ()) #define GTS_HASH_CONTAINER_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsHashContainerClass,\ gts_hash_container_class()) #define GTS_IS_HASH_CONTAINER(obj) (gts_object_is_from_class (obj,\ gts_hash_container_class ())) GtsHashContainerClass * gts_hash_container_class (void); /* GtsSListContainer: container.c */ typedef struct _GtsSListContainer GtsSListContainer; typedef struct _GtsSListContainerClass GtsSListContainerClass; struct _GtsSListContainer { GtsContainer c; GSList * items; gboolean frozen; }; struct _GtsSListContainerClass { GtsContainerClass parent_class; }; #define GTS_SLIST_CONTAINER(obj) GTS_OBJECT_CAST (obj,\ GtsSListContainer,\ gts_slist_container_class ()) #define GTS_SLIST_CONTAINER_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsSListContainerClass,\ gts_slist_container_class()) #define GTS_IS_SLIST_CONTAINER(obj) (gts_object_is_from_class (obj,\ gts_slist_container_class ())) GtsSListContainerClass * gts_slist_container_class (void); /* GtsGNode: graph.c */ typedef struct _GtsGNode GtsGNode; typedef struct _GtsGNodeClass GtsGNodeClass; typedef struct _GtsGraph GtsGraph; typedef struct _GtsGraphClass GtsGraphClass; struct _GtsGNode { GtsSListContainer container; guint level; }; struct _GtsGNodeClass { GtsSListContainerClass parent_class; gfloat (* weight) (GtsGNode *); void (* write) (GtsGNode *, FILE *); }; #define GTS_GNODE(obj) GTS_OBJECT_CAST (obj,\ GtsGNode,\ gts_gnode_class ()) #define GTS_GNODE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsGNodeClass,\ gts_gnode_class()) #define GTS_IS_GNODE(obj) (gts_object_is_from_class (obj,\ gts_gnode_class ())) #define GTS_GNODE_NEIGHBOR(n,e) (GTS_GEDGE (e)->n1 == n ? GTS_GEDGE (e)->n2 : GTS_GEDGE (e)->n2 == n ? GTS_GEDGE (e)->n1 : NULL) GtsGNodeClass * gts_gnode_class (void); GtsGNode * gts_gnode_new (GtsGNodeClass * klass); void gts_gnode_foreach_neighbor (GtsGNode * n, GtsGraph * g, GtsFunc func, gpointer data); void gts_gnode_foreach_edge (GtsGNode * n, GtsGraph * g, GtsFunc func, gpointer data); guint gts_gnode_degree (GtsGNode * n, GtsGraph * g); gfloat gts_gnode_move_cost (GtsGNode * n, GtsGraph * src, GtsGraph * dst); gfloat gts_gnode_weight (GtsGNode * n); GTS_C_VAR gboolean gts_allow_floating_gnodes; /* GtsNGNode: graph.c */ typedef struct _GtsNGNode GtsNGNode; typedef struct _GtsNGNodeClass GtsNGNodeClass; struct _GtsNGNode { GtsGNode node; guint id; }; struct _GtsNGNodeClass { GtsGNodeClass parent_class; }; #define GTS_NGNODE(obj) GTS_OBJECT_CAST (obj,\ GtsNGNode,\ gts_ngnode_class ()) #define GTS_NGNODE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsNGNodeClass,\ gts_ngnode_class()) #define GTS_IS_NGNODE(obj) (gts_object_is_from_class (obj,\ gts_ngnode_class ())) GtsNGNodeClass * gts_ngnode_class (void); GtsNGNode * gts_ngnode_new (GtsNGNodeClass * klass, guint id); /* GtsWGNode: graph.c */ typedef struct _GtsWGNode GtsWGNode; typedef struct _GtsWGNodeClass GtsWGNodeClass; struct _GtsWGNode { GtsGNode node; gfloat weight; }; struct _GtsWGNodeClass { GtsGNodeClass parent_class; }; #define GTS_WGNODE(obj) GTS_OBJECT_CAST (obj,\ GtsWGNode,\ gts_wgnode_class ()) #define GTS_WGNODE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsWGNodeClass,\ gts_wgnode_class()) #define GTS_IS_WGNODE(obj) (gts_object_is_from_class (obj,\ gts_wgnode_class ())) GtsWGNodeClass * gts_wgnode_class (void); GtsWGNode * gts_wgnode_new (GtsWGNodeClass * klass, gfloat weight); /* GtsPNode */ typedef struct _GtsPNode GtsPNode; typedef struct _GtsPNodeClass GtsPNodeClass; struct _GtsPNode { GtsGNode node; gpointer data; }; struct _GtsPNodeClass { GtsGNodeClass parent_class; }; #define GTS_PNODE(obj) GTS_OBJECT_CAST (obj,\ GtsPNode,\ gts_pnode_class ()) #define GTS_PNODE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsPNodeClass,\ gts_pnode_class()) #define GTS_IS_PNODE(obj) (gts_object_is_from_class (obj,\ gts_pnode_class ())) GtsPNodeClass * gts_pnode_class (void); GtsPNode * gts_pnode_new (GtsPNodeClass * klass, gpointer data); /* GtsFNode */ typedef struct _GtsFNode GtsFNode; typedef struct _GtsFNodeClass GtsFNodeClass; struct _GtsFNode { GtsGNode node; GtsFace * f; }; struct _GtsFNodeClass { GtsGNodeClass parent_class; }; #define GTS_FNODE(obj) GTS_OBJECT_CAST (obj,\ GtsFNode,\ gts_fnode_class ()) #define GTS_FNODE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsFNodeClass,\ gts_fnode_class()) #define GTS_IS_FNODE(obj) (gts_object_is_from_class (obj,\ gts_fnode_class ())) GtsFNodeClass * gts_fnode_class (void); GtsFNode * gts_fnode_new (GtsFNodeClass * klass, GtsFace * f); /* GtsGEdge: graph.c */ typedef struct _GtsGEdge GtsGEdge; typedef struct _GtsGEdgeClass GtsGEdgeClass; struct _GtsGEdge { GtsContainee containee; GtsGNode * n1; GtsGNode * n2; }; struct _GtsGEdgeClass { GtsContaineeClass parent_class; GtsGEdge * (* link) (GtsGEdge * e, GtsGNode * n1, GtsGNode * n2); gfloat (* weight) (GtsGEdge * e); void (* write) (GtsGEdge * e, FILE * fp); }; #define GTS_GEDGE(obj) GTS_OBJECT_CAST (obj,\ GtsGEdge,\ gts_gedge_class ()) #define GTS_GEDGE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsGEdgeClass,\ gts_gedge_class()) #define GTS_IS_GEDGE(obj) (gts_object_is_from_class (obj,\ gts_gedge_class ())) GtsGEdgeClass * gts_gedge_class (void); GtsGEdge * gts_gedge_new (GtsGEdgeClass * klass, GtsGNode * n1, GtsGNode * n2); gfloat gts_gedge_weight (GtsGEdge * e); #define gts_gedge_connects(e, a1, a2)\ (((e)->n1 == a1 && (e)->n2 == a2) || ((e)->n1 == a2 && (e)->n2 == a1)) /* GtsPGEdge: graph.c */ typedef struct _GtsPGEdge GtsPGEdge; typedef struct _GtsPGEdgeClass GtsPGEdgeClass; struct _GtsPGEdge { GtsGEdge gedge; gpointer data; }; struct _GtsPGEdgeClass { GtsGEdgeClass parent_class; }; #define GTS_PGEDGE(obj) GTS_OBJECT_CAST (obj,\ GtsPGEdge,\ gts_pgedge_class ()) #define GTS_PGEDGE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsPGEdgeClass,\ gts_pgedge_class()) #define GTS_IS_PGEDGE(obj) (gts_object_is_from_class (obj,\ gts_pgedge_class ())) GtsPGEdgeClass * gts_pgedge_class (void); GtsPGEdge * gts_pgedge_new (GtsPGEdgeClass * klass, GtsGNode * n1, GtsGNode * n2, gpointer data); /* GtsWGEdge: graph.c */ typedef struct _GtsWGEdge GtsWGEdge; typedef struct _GtsWGEdgeClass GtsWGEdgeClass; struct _GtsWGEdge { GtsGEdge gedge; gfloat weight; }; struct _GtsWGEdgeClass { GtsGEdgeClass parent_class; }; #define GTS_WGEDGE(obj) GTS_OBJECT_CAST (obj,\ GtsWGEdge,\ gts_wgedge_class ()) #define GTS_WGEDGE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsWGEdgeClass,\ gts_wgedge_class()) #define GTS_IS_WGEDGE(obj) (gts_object_is_from_class (obj,\ gts_wgedge_class ())) GtsWGEdgeClass * gts_wgedge_class (void); GtsWGEdge * gts_wgedge_new (GtsWGEdgeClass * klass, GtsGNode * n1, GtsGNode * n2, gfloat weight); /* GtsGraph: graph.c */ struct _GtsGraph { GtsHashContainer object; GtsGraphClass * graph_class; GtsGNodeClass * node_class; GtsGEdgeClass * edge_class; }; struct _GtsGraphClass { GtsHashContainerClass parent_class; gfloat (* weight) (GtsGraph *); }; #define GTS_GRAPH(obj) GTS_OBJECT_CAST (obj,\ GtsGraph,\ gts_graph_class ()) #define GTS_GRAPH_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsGraphClass,\ gts_graph_class()) #define GTS_IS_GRAPH(obj) (gts_object_is_from_class (obj,\ gts_graph_class ())) GtsGraphClass * gts_graph_class (void); GtsGraph * gts_graph_new (GtsGraphClass * klass, GtsGNodeClass * node_class, GtsGEdgeClass * edge_class); void gts_graph_print_stats (GtsGraph * g, FILE * fp); typedef struct _GtsGraphTraverse GtsGraphTraverse; typedef enum { GTS_BREADTH_FIRST } GtsTraverseType; GtsGraphTraverse * gts_graph_traverse_new (GtsGraph * g, GtsGNode * n, GtsTraverseType type, gboolean reinit); GtsGNode * gts_graph_traverse_next (GtsGraphTraverse * t); GtsGNode * gts_graph_traverse_what_next (GtsGraphTraverse * t); void gts_graph_traverse_destroy (GtsGraphTraverse * t); void gts_graph_foreach_edge (GtsGraph * g, GtsFunc func, gpointer data); gfloat gts_graph_weight (GtsGraph * g); guint gts_graph_distance_sum (GtsGraph * g, GtsGNode * center); GtsGNode * gts_graph_farthest (GtsGraph * g, GSList * gnodes); guint gts_graph_edges_cut (GtsGraph * g); gfloat gts_graph_edges_cut_weight (GtsGraph * g); void gts_graph_write (GtsGraph * g, FILE * fp); void gts_graph_write_dot (GtsGraph * g, FILE * fp); GtsGraph * gts_graph_read (GtsFile * fp); guint gts_graph_read_jostle (GtsGraph * g, GtsFile * fp); /* GtsWGraph: graph.c */ typedef struct _GtsWGraph GtsWGraph; typedef struct _GtsWGraphClass GtsWGraphClass; struct _GtsWGraph { GtsGraph graph; gfloat weight; }; struct _GtsWGraphClass { GtsGraphClass parent_class; }; #define GTS_WGRAPH(obj) GTS_OBJECT_CAST (obj,\ GtsWGraph,\ gts_wgraph_class ()) #define GTS_WGRAPH_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsWGraphClass,\ gts_wgraph_class()) #define GTS_IS_WGRAPH(obj) (gts_object_is_from_class (obj,\ gts_wgraph_class ())) GtsWGraphClass * gts_wgraph_class (void); gfloat gts_wgraph_weight_max (GtsWGraph * wg); /* Surface graph: graph.c */ GtsGraph * gts_surface_graph_new (GtsGraphClass * klass, GtsSurface * s); GtsSurface * gts_surface_graph_surface (GtsGraph * surface_graph, GtsSurface * s); /* Segments graph: graph.c */ GtsGraph * gts_segments_graph_new (GtsGraphClass * klass, GSList * segments); /* GtsGNodeSplit: pgraph.c */ typedef struct _GtsGNodeSplit GtsGNodeSplit; typedef struct _GtsGNodeSplitClass GtsGNodeSplitClass; struct _GtsGNodeSplit { GtsObject object; GtsGNode * n; GtsObject * n1; GtsObject * n2; }; struct _GtsGNodeSplitClass { GtsObjectClass parent_class; }; #define GTS_GNODE_SPLIT(obj) GTS_OBJECT_CAST (obj,\ GtsGNodeSplit,\ gts_gnode_split_class ()) #define GTS_GNODE_SPLIT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsGNodeSplitClass,\ gts_gnode_split_class()) #define GTS_IS_GNODE_SPLIT(obj) (gts_object_is_from_class (obj,\ gts_gnode_split_class ())) #define GTS_GNODE_SPLIT_N1(ns) (GTS_IS_GNODE_SPLIT ((ns)->n1) ? GTS_GNODE_SPLIT ((ns)->n1)->n : GTS_GNODE ((ns)->n1)) #define GTS_GNODE_SPLIT_N2(ns) (GTS_IS_GNODE_SPLIT ((ns)->n2) ? GTS_GNODE_SPLIT ((ns)->n2)->n : GTS_GNODE ((ns)->n2)) GtsGNodeSplitClass * gts_gnode_split_class (void); GtsGNodeSplit * gts_gnode_split_new (GtsGNodeSplitClass * klass, GtsGNode * n, GtsObject * n1, GtsObject * n2); void gts_gnode_split_collapse (GtsGNodeSplit * ns, GtsGraph * g, GtsWGEdgeClass * klass); void gts_gnode_split_expand (GtsGNodeSplit * ns, GtsGraph * g); /* GtsPGraph: pgraph.c */ typedef struct _GtsPGraph GtsPGraph; typedef struct _GtsPGraphClass GtsPGraphClass; struct _GtsPGraph { GtsObject object; GtsGraph * g; GPtrArray * split; GArray * levels; GtsGNodeSplitClass * split_class; GtsWGEdgeClass * edge_class; guint pos, min, level; }; struct _GtsPGraphClass { GtsObjectClass parent_class; }; #define GTS_PGRAPH(obj) GTS_OBJECT_CAST (obj,\ GtsPGraph,\ gts_pgraph_class ()) #define GTS_PGRAPH_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\ GtsPGraphClass,\ gts_pgraph_class()) #define GTS_IS_PGRAPH(obj) (gts_object_is_from_class (obj,\ gts_pgraph_class ())) GtsPGraphClass * gts_pgraph_class (void); GtsPGraph * gts_pgraph_new (GtsPGraphClass * klass, GtsGraph * g, GtsGNodeSplitClass * split_class, GtsWGNodeClass * node_class, GtsWGEdgeClass * edge_class, guint min); GtsGNodeSplit * gts_pgraph_add_node (GtsPGraph * pg); GtsGNodeSplit * gts_pgraph_remove_node (GtsPGraph * pg); void gts_pgraph_set_node_number (GtsPGraph *pg, guint n); guint gts_pgraph_get_node_number (GtsPGraph *pg); guint gts_pgraph_min_node_number (GtsPGraph *pg); guint gts_pgraph_max_node_number (GtsPGraph *pg); void gts_pgraph_foreach_node (GtsPGraph *pg, GtsFunc func, gpointer data); gboolean gts_pgraph_down (GtsPGraph * pg, GtsFunc func, gpointer data); /* Graph partition: partition.c */ GSList * gts_graph_bubble_partition (GtsGraph * g, guint np, guint niter, GtsFunc step_info, gpointer data); guint gts_graph_partition_edges_cut (GSList * partition); gfloat gts_graph_partition_edges_cut_weight (GSList * partition); void gts_graph_partition_print_stats (GSList * partition, FILE * fp); gfloat gts_graph_partition_balance (GSList * partition); GSList * gts_graph_partition_clone (GSList * partition); GSList * gts_graph_recursive_bisection (GtsWGraph * wg, guint n, guint ntry, guint mmax, guint nmin, gfloat imbalance); void gts_graph_partition_destroy (GSList * partition); /* Graph bisection: partition.c */ typedef struct _GtsGraphBisection GtsGraphBisection; struct _GtsGraphBisection { GtsGraph * g; GtsGraph * g1; GtsGraph * g2; GHashTable * bg1; GHashTable * bg2; }; gboolean gts_graph_bisection_check (GtsGraphBisection * bg); GtsGraphBisection * gts_graph_ggg_bisection (GtsGraph * g, guint ntry); GtsGraphBisection * gts_graph_bfgg_bisection (GtsGraph * g, guint ntry); gdouble gts_graph_bisection_kl_refine (GtsGraphBisection * bg, guint mmax); gdouble gts_graph_bisection_bkl_refine (GtsGraphBisection * bg, guint mmax, gfloat imbalance); GtsGraphBisection * gts_graph_bisection_new (GtsWGraph * wg, guint ntry, guint mmax, guint nmin, gfloat imbalance); void gts_graph_bisection_destroy (GtsGraphBisection * bg, gboolean destroy_graphs); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTS_H__ */ gts-snapshot-121130/src/triangle.c0000644000175100017510000007102312055775440013734 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void triangle_destroy (GtsObject * object) { GtsTriangle * triangle = GTS_TRIANGLE (object); GtsEdge * e1 = triangle->e1; GtsEdge * e2 = triangle->e2; GtsEdge * e3 = triangle->e3; e1->triangles = g_slist_remove (e1->triangles, triangle); if (!GTS_OBJECT_DESTROYED (e1) && !gts_allow_floating_edges && e1->triangles == NULL) gts_object_destroy (GTS_OBJECT (e1)); e2->triangles = g_slist_remove (e2->triangles, triangle); if (!GTS_OBJECT_DESTROYED (e2) && !gts_allow_floating_edges && e2->triangles == NULL) gts_object_destroy (GTS_OBJECT (e2)); e3->triangles = g_slist_remove (e3->triangles, triangle); if (!GTS_OBJECT_DESTROYED (e3) && !gts_allow_floating_edges && e3->triangles == NULL) gts_object_destroy (GTS_OBJECT (e3)); (* GTS_OBJECT_CLASS (gts_triangle_class ())->parent_class->destroy) (object); } static void triangle_class_init (GtsObjectClass * klass) { klass->destroy = triangle_destroy; } static void triangle_init (GtsTriangle * triangle) { triangle->e1 = triangle->e2 = triangle->e3 = NULL; } /** * gts_triangle_class: * * Returns: the #GtsTriangleClass. */ GtsTriangleClass * gts_triangle_class (void) { static GtsTriangleClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo triangle_info = { "GtsTriangle", sizeof (GtsTriangle), sizeof (GtsTriangleClass), (GtsObjectClassInitFunc) triangle_class_init, (GtsObjectInitFunc) triangle_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &triangle_info); } return klass; } /** * gts_triangle_set: * @triangle: a #GtsTriangle. * @e1: a #GtsEdge. * @e2: another #GtsEdge touching @e1. * @e3: another #GtsEdge touching both @e1 and @e2. * * Sets the edge of @triangle to @e1, @e2 and @e3 while checking that they * define a valid triangle. */ void gts_triangle_set (GtsTriangle * triangle, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3) { g_return_if_fail (e1 != NULL); g_return_if_fail (e2 != NULL); g_return_if_fail (e3 != NULL); g_return_if_fail (e1 != e2 && e1 != e3 && e2 != e3); triangle->e1 = e1; triangle->e2 = e2; triangle->e3 = e3; if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1) g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), GTS_SEGMENT (e1)->v2, GTS_SEGMENT (e2)->v2)); else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1) g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), GTS_SEGMENT (e1)->v1, GTS_SEGMENT (e2)->v2)); else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2) g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), GTS_SEGMENT (e1)->v1, GTS_SEGMENT (e2)->v1)); else if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v2) g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), GTS_SEGMENT (e1)->v2, GTS_SEGMENT (e2)->v1)); else g_assert_not_reached (); e1->triangles = g_slist_prepend (e1->triangles, triangle); e2->triangles = g_slist_prepend (e2->triangles, triangle); e3->triangles = g_slist_prepend (e3->triangles, triangle); } /** * gts_triangle_new: * @klass: a #GtsTriangleClass. * @e1: a #GtsEdge. * @e2: another #GtsEdge touching @e1. * @e3: another #GtsEdge touching both @e1 and @e2. * * Returns: a new #GtsTriangle having @e1, @e2 and @e3 as edges. */ GtsTriangle * gts_triangle_new (GtsTriangleClass * klass, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3) { GtsTriangle * t; t = GTS_TRIANGLE (gts_object_new (GTS_OBJECT_CLASS (klass))); gts_triangle_set (t, e1, e2, e3); return t; } /** * gts_triangle_vertex_opposite: * @t: a #GtsTriangle. * @e: a #GtsEdge used by @t. * * This function fails if @e is not an edge of @t. * * Returns: a #GtsVertex, vertex of @t which does not belong to @e. */ GtsVertex * gts_triangle_vertex_opposite (GtsTriangle * t, GtsEdge * e) { g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (e != NULL, NULL); if (t->e1 == e) { GtsVertex * v = GTS_SEGMENT (t->e2)->v1; if (v != GTS_SEGMENT (e)->v1 && v != GTS_SEGMENT (e)->v2) return v; return GTS_SEGMENT (t->e2)->v2; } if (t->e2 == e) { GtsVertex * v = GTS_SEGMENT (t->e1)->v1; if (v != GTS_SEGMENT (e)->v1 && v != GTS_SEGMENT (e)->v2) return v; return GTS_SEGMENT (t->e1)->v2; } if (t->e3 == e) { GtsVertex * v = GTS_SEGMENT (t->e2)->v1; if (v != GTS_SEGMENT (e)->v1 && v != GTS_SEGMENT (e)->v2) return v; return GTS_SEGMENT (t->e2)->v2; } g_assert_not_reached (); return NULL; } /** * gts_triangle_edge_opposite: * @t: a #GtsTriangle. * @v: a #GtsVertex of @t. * * Returns: the edge of @t opposite @v or %NULL if @v is not a vertice of @t. */ GtsEdge * gts_triangle_edge_opposite (GtsTriangle * t, GtsVertex * v) { GtsSegment * s1, * s2, * s3; g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); s1 = GTS_SEGMENT (t->e1); s2 = GTS_SEGMENT (t->e2); if (s1->v1 != v && s1->v2 != v) { if (s2->v1 != v && s2->v2 != v) return NULL; return t->e1; } if (s2->v1 != v && s2->v2 != v) return t->e2; s3 = GTS_SEGMENT (t->e3); g_assert (s3->v1 != v && s3->v2 != v); return t->e3; } /** * gts_triangles_angle: * @t1: a #GtsTriangle. * @t2: a #GtsTriangle. * * Returns: the value (in radians) of the angle between @t1 and @t2. */ gdouble gts_triangles_angle (GtsTriangle * t1, GtsTriangle * t2) { gdouble nx1, ny1, nz1, nx2, ny2, nz2; gdouble pvx, pvy, pvz; gdouble theta; g_return_val_if_fail (t1 != NULL && t2 != NULL, 0.0); gts_triangle_normal (t1, &nx1, &ny1, &nz1); gts_triangle_normal (t2, &nx2, &ny2, &nz2); pvx = ny1*nz2 - nz1*ny2; pvy = nz1*nx2 - nx1*nz2; pvz = nx1*ny2 - ny1*nx2; theta = atan2 (sqrt (pvx*pvx + pvy*pvy + pvz*pvz), nx1*nx2 + ny1*ny2 + nz1*nz2) - M_PI; return theta < - M_PI ? theta + 2.*M_PI : theta; } /** * gts_triangles_are_compatible: * @t1: a #GtsTriangle. * @t2: a #GtsTriangle. * @e: a #GtsEdge used by both @t1 and @t2. * * Checks if @t1 and @t2 have compatible orientations i.e. if @t1 and * @t2 can be part of the same surface without conflict in the surface * normal orientation. * * Returns: %TRUE if @t1 and @t2 are compatible, %FALSE otherwise. */ gboolean gts_triangles_are_compatible (GtsTriangle * t1, GtsTriangle * t2, GtsEdge * e) { GtsEdge * e1 = NULL, * e2 = NULL; g_return_val_if_fail (t1 != NULL, FALSE); g_return_val_if_fail (t2 != NULL, FALSE); g_return_val_if_fail (e != NULL, FALSE); if (t1->e1 == e) e1 = t1->e2; else if (t1->e2 == e) e1 = t1->e3; else if (t1->e3 == e) e1 = t1->e1; else g_assert_not_reached (); if (t2->e1 == e) e2 = t2->e2; else if (t2->e2 == e) e2 = t2->e3; else if (t2->e3 == e) e2 = t2->e1; else g_assert_not_reached (); if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1 || GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v2 || GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1 || GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2) return FALSE; return TRUE; } /** * gts_triangle_area: * @t: a #GtsTriangle. * * Returns: the area of the triangle @t. */ gdouble gts_triangle_area (GtsTriangle * t) { gdouble x, y, z; g_return_val_if_fail (t != NULL, 0.0); gts_triangle_normal (t, &x, &y, &z); return sqrt (x*x + y*y + z*z)/2.; } /** * gts_triangle_perimeter: * @t: a #GtsTriangle. * * Returns: the perimeter of the triangle @t. */ gdouble gts_triangle_perimeter (GtsTriangle * t) { GtsVertex * v; g_return_val_if_fail (t != NULL, 0.0); v = gts_triangle_vertex (t); return gts_point_distance (GTS_POINT (GTS_SEGMENT (t->e1)->v1), GTS_POINT (GTS_SEGMENT (t->e1)->v2)) + gts_point_distance (GTS_POINT (GTS_SEGMENT (t->e1)->v1), GTS_POINT (v)) + gts_point_distance (GTS_POINT (GTS_SEGMENT (t->e1)->v2), GTS_POINT (v)); } /* perimeter of the equilateral triangle of area unity */ #define GOLDEN_PERIMETER 4.5590141139 /** * gts_triangle_quality: * @t: a #GtsTriangle. * * The quality of a triangle is defined as the ratio of the square * root of its surface area to its perimeter relative to this same * ratio for an equilateral triangle with the same area. The quality * is then one for an equilateral triangle and tends to zero for a * very stretched triangle. * * Returns: the quality of the triangle @t. */ gdouble gts_triangle_quality (GtsTriangle * t) { gdouble perimeter; g_return_val_if_fail (t != NULL, 0.0); perimeter = gts_triangle_perimeter (t); return perimeter > 0.0 ? GOLDEN_PERIMETER*sqrt (gts_triangle_area (t))/perimeter : 0.0; } /** * gts_triangle_normal: * @t: a #GtsTriangle. * @x: the x coordinate of the normal. * @y: the y coordinate of the normal. * @z: the z coordinate of the normal. * * Computes the coordinates of the oriented normal of @t as the * cross-product of two edges, using the left-hand rule. The normal is * not normalized. If this triangle is part of a closed and oriented * surface, the normal points to the outside of the surface. */ void gts_triangle_normal (GtsTriangle * t, gdouble * x, gdouble * y, gdouble * z) { GtsVertex * v1, * v2 = NULL, * v3 = NULL; GtsPoint * p1, * p2, * p3; gdouble x1, y1, z1, x2, y2, z2; g_return_if_fail (t != NULL); v1 = GTS_SEGMENT (t->e1)->v1; if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { v2 = GTS_SEGMENT (t->e2)->v2; v3 = GTS_SEGMENT (t->e1)->v2; } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { v2 = GTS_SEGMENT (t->e1)->v2; v3 = GTS_SEGMENT (t->e2)->v1; } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { v2 = GTS_SEGMENT (t->e2)->v1; v3 = GTS_SEGMENT (t->e1)->v2; } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { v2 = GTS_SEGMENT (t->e1)->v2; v3 = GTS_SEGMENT (t->e2)->v2; } else { fprintf (stderr, "t: %p t->e1: %p t->e2: %p t->e3: %p t->e1->v1: %p t->e1->v2: %p t->e2->v1: %p t->e2->v2: %p t->e3->v1: %p t->e3->v2: %p\n", t, t->e1, t->e2, t->e3, GTS_SEGMENT (t->e1)->v1, GTS_SEGMENT (t->e1)->v2, GTS_SEGMENT (t->e2)->v1, GTS_SEGMENT (t->e2)->v2, GTS_SEGMENT (t->e3)->v1, GTS_SEGMENT (t->e3)->v2); g_assert_not_reached (); } p1 = GTS_POINT (v1); p2 = GTS_POINT (v2); p3 = GTS_POINT (v3); x1 = p2->x - p1->x; y1 = p2->y - p1->y; z1 = p2->z - p1->z; x2 = p3->x - p1->x; y2 = p3->y - p1->y; z2 = p3->z - p1->z; *x = y1*z2 - z1*y2; *y = z1*x2 - x1*z2; *z = x1*y2 - y1*x2; } /** * gts_triangle_orientation: * @t: a #GtsTriangle. * * Checks for the orientation of the plane (x,y) projection of a * triangle. See gts_point_orientation() for details. This function * is geometrically robust. * * Returns: a number depending on the orientation of the vertices of @t. */ gdouble gts_triangle_orientation (GtsTriangle * t) { GtsVertex * v1, * v2 = NULL, * v3 = NULL; g_return_val_if_fail (t != NULL, 0.0); v1 = GTS_SEGMENT (t->e1)->v1; if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { v2 = GTS_SEGMENT (t->e2)->v2; v3 = GTS_SEGMENT (t->e1)->v2; } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { v2 = GTS_SEGMENT (t->e1)->v2; v3 = GTS_SEGMENT (t->e2)->v1; } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { v2 = GTS_SEGMENT (t->e2)->v1; v3 = GTS_SEGMENT (t->e1)->v2; } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { v2 = GTS_SEGMENT (t->e1)->v2; v3 = GTS_SEGMENT (t->e2)->v2; } else g_assert_not_reached (); return gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3)); } /** * gts_triangle_revert: * @t: a #GtsTriangle. * * Changes the orientation of triangle @t, turning it inside out. */ void gts_triangle_revert (GtsTriangle * t) { GtsEdge * e; g_return_if_fail (t != NULL); e = t->e1; t->e1 = t->e2; t->e2 = e; } /** * gts_triangles_from_edges: * @edges: a list of #GtsEdge. * * Builds a list of unique triangles which have one of their edges in @edges. * * Returns: the list of triangles. */ GSList * gts_triangles_from_edges (GSList * edges) { GHashTable * hash; GSList * triangles = NULL, * i; hash = g_hash_table_new (NULL, NULL); i = edges; while (i) { GSList * j = GTS_EDGE (i->data)->triangles; while (j) { GtsTriangle * t = j->data; if (g_hash_table_lookup (hash, t) == NULL) { triangles = g_slist_prepend (triangles, t); g_hash_table_insert (hash, t, i); } j = j->next; } i = i->next; } g_hash_table_destroy (hash); return triangles; } /** * gts_triangle_vertices_edges: * @t: a #GtsTriangle. * @e: a #GtsEdge belonging to the edges of @t or %NULL. * @v1: a #GtsVertex used by @t. * @v2: a #GtsVertex used by @t. * @v3: a #GtsVertex used by @t. * @e1: a #GtsEdge used by @t. * @e2: a #GtsEdge used by @t. * @e3: a #GtsEdge used by @t. * * Given @t and @e, returns @v1, @v2, @v3, @e1, @e2 and @e3. @e1 * has @v1 and @v2 as vertices, @e2 has @v2 and @v3 as vertices * and @e3 has @v3 and @v1 as vertices. @v1, @v2 and @v3 respects * the orientation of @t. If @e is not NULL, @e1 and @e are * identical. */ void gts_triangle_vertices_edges (GtsTriangle * t, GtsEdge * e, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3, GtsEdge ** e1, GtsEdge ** e2, GtsEdge ** e3) { GtsEdge * ee1, * ee2; g_return_if_fail (t != NULL); if (e == t->e1 || e == NULL) { *e1 = ee1 = t->e1; *e2 = ee2 = t->e2; *e3 = t->e3; } else if (e == t->e2) { *e1 = ee1 = e; *e2 = ee2 = t->e3; *e3 = t->e1; } else if (e == t->e3) { *e1 = ee1 = e; *e2 = ee2 = t->e1; *e3 = t->e2; } else { g_assert_not_reached (); ee1 = ee2 = NULL; /* to avoid complaints from the compiler */ } if (GTS_SEGMENT (ee1)->v2 == GTS_SEGMENT (ee2)->v1) { *v1 = GTS_SEGMENT (ee1)->v1; *v2 = GTS_SEGMENT (ee1)->v2; *v3 = GTS_SEGMENT (ee2)->v2; } else if (GTS_SEGMENT (ee1)->v2 == GTS_SEGMENT (ee2)->v2) { *v1 = GTS_SEGMENT (ee1)->v1; *v2 = GTS_SEGMENT (ee1)->v2; *v3 = GTS_SEGMENT (ee2)->v1; } else if (GTS_SEGMENT (ee1)->v1 == GTS_SEGMENT (ee2)->v1) { *v1 = GTS_SEGMENT (ee1)->v2; *v2 = GTS_SEGMENT (ee1)->v1; *v3 = GTS_SEGMENT (ee2)->v2; } else if (GTS_SEGMENT (ee1)->v1 == GTS_SEGMENT (ee2)->v2) { *v1 = GTS_SEGMENT (ee1)->v2; *v2 = GTS_SEGMENT (ee1)->v1; *v3 = GTS_SEGMENT (ee2)->v1; } else g_assert_not_reached (); } /* sqrt(3) */ #define SQRT3 1.73205080757 /** * gts_triangle_enclosing: * @klass: the class of the new triangle. * @points: a list of #GtsPoint. * @scale: a scaling factor (must be larger than one). * * Builds a new triangle (including new vertices and edges) enclosing * the plane projection of all the points in @points. This triangle is * equilateral and encloses a rectangle defined by the maximum and * minimum x and y coordinates of the points. @scale is an homothetic * scaling factor. If equal to one, the triangle encloses exactly the * enclosing rectangle. * * Returns: a new #GtsTriangle. */ GtsTriangle * gts_triangle_enclosing (GtsTriangleClass * klass, GSList * points, gdouble scale) { gdouble xmax, xmin, ymax, ymin; gdouble xo, yo, r; GtsVertex * v1, * v2, * v3; GtsEdge * e1, * e2, * e3; if (points == NULL) return NULL; xmax = xmin = GTS_POINT (points->data)->x; ymax = ymin = GTS_POINT (points->data)->y; points = points->next; while (points) { GtsPoint * p = points->data; if (p->x > xmax) xmax = p->x; else if (p->x < xmin) xmin = p->x; if (p->y > ymax) ymax = p->y; else if (p->y < ymin) ymin = p->y; points = points->next; } xo = (xmax + xmin)/2.; yo = (ymax + ymin)/2.; r = scale*sqrt((xmax - xo)*(xmax - xo) + (ymax - yo)*(ymax - yo)); if (r == 0.0) r = scale; v1 = gts_vertex_new (gts_vertex_class (), xo + r*SQRT3, yo - r, 0.0); v2 = gts_vertex_new (gts_vertex_class (), xo, yo + 2.*r, 0.0); v3 = gts_vertex_new (gts_vertex_class (), xo - r*SQRT3, yo - r, 0.0); e1 = gts_edge_new (gts_edge_class (), v1, v2); e2 = gts_edge_new (gts_edge_class (), v2, v3); e3 = gts_edge_new (gts_edge_class (), v3, v1); return gts_triangle_new (gts_triangle_class (), e1, e2, e3); } /** * gts_triangle_neighbor_number: * @t: a #GtsTriangle. * * Returns: the number of triangles neighbors of @t. */ guint gts_triangle_neighbor_number (GtsTriangle * t) { GSList * i; guint nn = 0; GtsEdge * ee[4], ** e = ee; g_return_val_if_fail (t != NULL, 0); ee[0] = t->e1; ee[1] = t->e2; ee[2] = t->e3; ee[3] = NULL; while (*e) { i = (*e++)->triangles; while (i) { GtsTriangle * t1 = i->data; if (t1 != t) nn++; i = i->next; } } return nn; } /** * gts_triangle_neighbors: * @t: a #GtsTriangle. * * Returns: a list of #GtsTriangle neighbors of @t. */ GSList * gts_triangle_neighbors (GtsTriangle * t) { GSList * i, * list = NULL; GtsEdge * ee[4], ** e = ee; g_return_val_if_fail (t != NULL, NULL); ee[0] = t->e1; ee[1] = t->e2; ee[2] = t->e3; ee[3] = NULL; while (*e) { i = (*e++)->triangles; while (i) { GtsTriangle * t1 = i->data; if (t1 != t) list = g_slist_prepend (list, t1); i = i->next; } } return list; } /** * gts_triangles_common_edge: * @t1: a #GtsTriangle. * @t2: a #GtsTriangle. * * Returns: a #GtsEdge common to both @t1 and @t2 or %NULL if @t1 and @t2 * do not share any edge. */ GtsEdge * gts_triangles_common_edge (GtsTriangle * t1, GtsTriangle * t2) { g_return_val_if_fail (t1 != NULL, NULL); g_return_val_if_fail (t2 != NULL, NULL); if (t1->e1 == t2->e1 || t1->e1 == t2->e2 || t1->e1 == t2->e3) return t1->e1; if (t1->e2 == t2->e1 || t1->e2 == t2->e2 || t1->e2 == t2->e3) return t1->e2; if (t1->e3 == t2->e1 || t1->e3 == t2->e2 || t1->e3 == t2->e3) return t1->e3; return NULL; } /** * gts_triangle_is_duplicate: * @t: a #GtsTriangle. * * Returns: a #GtsTriangle different from @t but sharing all its edges * with @t or %NULL if there is none. */ GtsTriangle * gts_triangle_is_duplicate (GtsTriangle * t) { GSList * i; GtsEdge * e2, * e3; g_return_val_if_fail (t != NULL, NULL); e2 = t->e2; e3 = t->e3; i = t->e1->triangles; while (i) { GtsTriangle * t1 = i->data; if (t1 != t && (t1->e1 == e2 || t1->e2 == e2 || t1->e3 == e2) && (t1->e1 == e3 || t1->e2 == e3 || t1->e3 == e3)) return t1; i = i->next; } return NULL; } /** * gts_triangle_use_edges: * @e1: a #GtsEdge. * @e2: a #GtsEdge. * @e3: a #GtsEdge. * * Returns: a #GtsTriangle having @e1, @e2 and @e3 as edges or %NULL if @e1, * @e2 and @e3 are not part of any triangle. */ GtsTriangle * gts_triangle_use_edges (GtsEdge * e1, GtsEdge * e2, GtsEdge * e3) { GSList * i; g_return_val_if_fail (e1 != NULL, NULL); g_return_val_if_fail (e2 != NULL, NULL); g_return_val_if_fail (e3 != NULL, NULL); i = e1->triangles; while (i) { GtsTriangle * t = i->data; if ((t->e1 == e2 && (t->e2 == e3 || t->e3 == e3)) || (t->e2 == e2 && (t->e1 == e3 || t->e3 == e3)) || (t->e3 == e2 && (t->e1 == e3 || t->e2 == e3))) return t; i = i->next; } return NULL; } /** * gts_triangle_is_ok: * @t: a #GtsTriangle. * * Returns: %TRUE if @t is a non-degenerate, non-duplicate triangle, * %FALSE otherwise. */ gboolean gts_triangle_is_ok (GtsTriangle * t) { g_return_val_if_fail (t != NULL, FALSE); g_return_val_if_fail (t->e1 != NULL, FALSE); g_return_val_if_fail (t->e2 != NULL, FALSE); g_return_val_if_fail (t->e3 != NULL, FALSE); g_return_val_if_fail (t->e1 != t->e2 && t->e1 != t->e3 && t->e2 != t->e3, FALSE); g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), GTS_SEGMENT (t->e2)), FALSE); g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), GTS_SEGMENT (t->e3)), FALSE); g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e2), GTS_SEGMENT (t->e3)), FALSE); g_return_val_if_fail (GTS_SEGMENT (t->e1)->v1 != GTS_SEGMENT (t->e1)->v2, FALSE); g_return_val_if_fail (GTS_SEGMENT (t->e2)->v1 != GTS_SEGMENT (t->e2)->v2, FALSE); g_return_val_if_fail (GTS_SEGMENT (t->e3)->v1 != GTS_SEGMENT (t->e3)->v2, FALSE); g_return_val_if_fail (GTS_OBJECT (t)->reserved == NULL, FALSE); g_return_val_if_fail (!gts_triangle_is_duplicate (t), FALSE); return TRUE; } /** * gts_triangle_vertices: * @t: a #GtsTriangle. * @v1: a pointer on a #GtsVertex. * @v2: a pointer on a #GtsVertex. * @v3: a pointer on a #GtsVertex. * * Fills @v1, @v2 and @v3 with the oriented set of vertices, summits of @t. */ void gts_triangle_vertices (GtsTriangle * t, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3) { GtsSegment * e1, * e2; g_return_if_fail (t != NULL); g_return_if_fail (v1 != NULL && v2 != NULL && v3 != NULL); e1 = GTS_SEGMENT (t->e1); e2 = GTS_SEGMENT (t->e2); if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1) { *v1 = GTS_SEGMENT (e1)->v1; *v2 = GTS_SEGMENT (e1)->v2; *v3 = GTS_SEGMENT (e2)->v2; } else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2) { *v1 = GTS_SEGMENT (e1)->v1; *v2 = GTS_SEGMENT (e1)->v2; *v3 = GTS_SEGMENT (e2)->v1; } else if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1) { *v1 = GTS_SEGMENT (e1)->v2; *v2 = GTS_SEGMENT (e1)->v1; *v3 = GTS_SEGMENT (e2)->v2; } else { *v1 = GTS_SEGMENT (e1)->v2; *v2 = GTS_SEGMENT (e1)->v1; *v3 = GTS_SEGMENT (e2)->v1; } } /** * gts_triangle_circumcircle_center: * @t: a #GtsTriangle. * @point_class: a #GtsPointClass. * * Returns: a new #GtsPoint, center of the circumscribing circle of @t or * %NULL if the circumscribing circle is not defined. */ GtsPoint * gts_triangle_circumcircle_center (GtsTriangle * t, GtsPointClass * point_class) { GtsVertex * v1, * v2, * v3; gdouble xa, ya, xb, yb, xc, yc; gdouble xd, yd, xe, ye; gdouble xad, yad, xae, yae; gdouble det; g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (point_class != NULL, NULL); gts_triangle_vertices (t, &v1, &v2, &v3); xa = GTS_POINT (v1)->x; ya = GTS_POINT (v1)->y; xb = GTS_POINT (v2)->x; yb = GTS_POINT (v2)->y; xc = GTS_POINT (v3)->x; yc = GTS_POINT (v3)->y; xd = (xa + xb)/2.; yd = (ya + yb)/2.; xe = (xa + xc)/2.; ye = (ya + yc)/2.; xad = xd - xa; yad = yd - ya; xae = xe - xa; yae = ye - ya; det = xad*yae - xae*yad; if (det == 0.) return NULL; return gts_point_new (point_class, (yae*yad*(yd - ye) + xad*yae*xd - xae*yad*xe)/det, -(xae*xad*(xd - xe) + yad*xae*yd - yae*xad*ye)/det, 0.); } /* square of the maximum area ratio admissible */ #define AREA_RATIO_MAX2 1e8 static gboolean points_are_folded (GtsPoint * A, GtsPoint * B, GtsPoint * C, GtsPoint * D, gdouble max) { GtsVector AB, AC, AD; GtsVector n1, n2; gdouble nn1, nn2, n1n2; gts_vector_init (AB, A, B); gts_vector_init (AC, A, C); gts_vector_init (AD, A, D); gts_vector_cross (n1, AB, AC); gts_vector_cross (n2, AD, AB); nn1 = gts_vector_scalar (n1, n1); nn2 = gts_vector_scalar (n2, n2); if (nn1 >= AREA_RATIO_MAX2*nn2 || nn2 >= AREA_RATIO_MAX2*nn1) return TRUE; n1n2 = gts_vector_scalar (n1, n2); if (n1n2 > 0.) return FALSE; if (n1n2*n1n2/(nn1*nn2) > max) return TRUE; return FALSE; } static GtsVertex * triangle_use_vertices (GtsTriangle * t, GtsVertex * A, GtsVertex * B) { GtsVertex * v1 = GTS_SEGMENT (t->e1)->v1, * v2 = GTS_SEGMENT (t->e1)->v2, * v3 = gts_triangle_vertex (t); if (v1 == A) { if (v2 == B) return v3; g_assert (v3 == B); return v2; } if (v2 == A) { if (v1 == B) return v3; g_assert (v3 == B); return v1; } if (v3 == A) { if (v1 == B) return v2; g_assert (v2 == B); return v1; } g_assert_not_reached (); return NULL; } /** * gts_triangles_are_folded: * @triangles: a list of #GtsTriangle. * @A: a #GtsVertex. * @B: another #GtsVertex. * @max: the maximum value of the square of the cosine of the angle between * two triangles. * * Given a list of triangles sharing @A and @B as vertices, checks if any * two triangles in the list make an angle larger than a given value defined * by @max. * * Returns: %TRUE if any pair of triangles in @triangles makes an angle larger * than the maximum value, %FALSE otherwise. */ gboolean gts_triangles_are_folded (GSList * triangles, GtsVertex * A, GtsVertex * B, gdouble max) { GSList * i; g_return_val_if_fail (A != NULL, TRUE); g_return_val_if_fail (B != NULL, TRUE); i = triangles; while (i) { GtsVertex * C = triangle_use_vertices (i->data, A, B); GSList * j = i->next; while (j) { GtsVertex * D = triangle_use_vertices (j->data, A, B); if (points_are_folded (GTS_POINT (A), GTS_POINT (B), GTS_POINT (C), GTS_POINT (D), max)) return TRUE; j = j->next; } i = i->next; } return FALSE; } /** * gts_triangle_is_stabbed: * @t: a #GtsTriangle. * @p: a #GtsPoint. * @orientation: a pointer or %NULL. * * Returns: one of the vertices of @t, one of the edges of @t or @t if * any of these are stabbed by the ray starting at @p (included) and * ending at (@p->x, @p->y, +infty), %NULL otherwise. If the ray is * contained in the plane of the triangle %NULL is also returned. If * @orientation is not %NULL, it is set to the value of the * orientation of @p relative to @t (as given by * gts_point_orientation_3d()). */ GtsObject * gts_triangle_is_stabbed (GtsTriangle * t, GtsPoint * p, gdouble * orientation) { GtsVertex * v1, * v2, * v3, * inverted = NULL; GtsEdge * e1, * e2, * e3, * tmp; gdouble o, o1, o2, o3; g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (p != NULL, NULL); gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3); o = gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3)); if (o == 0.) return NULL; if (o < 0.) { inverted = v1; v1 = v2; v2 = inverted; tmp = e2; e2 = e3; e3 = tmp; } o = gts_point_orientation_3d (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3), p); if (o < 0.) return NULL; o1 = gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p); if (o1 < 0.) return NULL; o2 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p); if (o2 < 0.) return NULL; o3 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p); if (o3 < 0.) return NULL; if (orientation) *orientation = inverted ? -o : o; if (o1 == 0.) { if (o2 == 0.) return GTS_OBJECT (v2); if (o3 == 0.) return GTS_OBJECT (v1); return GTS_OBJECT (e1); } if (o2 == 0.) { if (o3 == 0.) return GTS_OBJECT (v3); return GTS_OBJECT (e2); } if (o3 == 0.) return GTS_OBJECT (e3); return GTS_OBJECT (t); } /** * gts_triangle_interpolate_height: * @t: a #GtsTriangle. * @p: a #GtsPoint. * * Fills the z-coordinate of point @p belonging to the plane * projection of triangle @t with the linearly interpolated value of * the z-coordinates of the vertices of @t. */ void gts_triangle_interpolate_height (GtsTriangle * t, GtsPoint * p) { GtsPoint * p1, * p2, * p3; gdouble x1, x2, y1, y2, det; g_return_if_fail (t != NULL); g_return_if_fail (p != NULL); p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (gts_triangle_vertex (t)); x1 = p2->x - p1->x; y1 = p2->y - p1->y; x2 = p3->x - p1->x; y2 = p3->y - p1->y; det = x1*y2 - x2*y1; if (det == 0.) p->z = (p1->z + p2->z + p3->z)/3.; else { gdouble x = p->x - p1->x; gdouble y = p->y - p1->y; gdouble a = (x*y2 - y*x2)/det; gdouble b = (y*x1 - x*y1)/det; p->z = (1. - a - b)*p1->z + a*p2->z + b*p3->z; } } gts-snapshot-121130/src/config.h.win320000644000175100017510000000141212055775440014335 00000000000000/* config.h.win32: Handcrafted for Microsoft C */ /* Define if you need to in order for stat and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 #define GTS_MAJOR_VERSION 0 #define GTS_MINOR_VERSION 6 #define GTS_MICRO_VERSION 0 #define GTS_INTERFACE_AGE 0 #define GTS_BINARY_AGE 0 /* Define if you have the header file. */ /* #undef HAVE_FLOATINGPOINT_H */ /* Define if you have the header file. */ /* #undef HAVE_FPU_CONTROL_H */ /* Define if this is Win32, possibly using the Cygwin emulation layer. */ #define WIN32 1 /* Define if this is Win32 without Cygwin. */ #define NATIVE_WIN32 1 #ifndef M_PI # define M_PI 3.14159265359 #endif /* not M_PI */ gts-snapshot-121130/src/point.c0000644000175100017510000006247012055775440013266 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" #include "gts-private.h" #include "predicates.h" static void point_read (GtsObject ** o, GtsFile * f) { GtsPoint * p = GTS_POINT (*o); if (GTS_POINT_CLASS ((*o)->klass)->binary) { if (gts_file_read (f, &(p->x), sizeof (gdouble), 1) != 1) { gts_file_error (f, "expecting a binary number (x coordinate)"); return; } if (gts_file_read (f, &(p->y), sizeof (gdouble), 1) != 1) { gts_file_error (f, "expecting a binary number (y coordinate)"); return; } if (gts_file_read (f, &(p->z), sizeof (gdouble), 1) != 1) { gts_file_error (f, "expecting a binary number (z coordinate)"); return; } } else { if (f->type != GTS_INT && f->type != GTS_FLOAT) { gts_file_error (f, "expecting a number (x coordinate)"); return; } p->x = atof (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { gts_file_error (f, "expecting a number (y coordinate)"); return; } p->y = atof (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { gts_file_error (f, "expecting a number (z coordinate)"); return; } p->z = atof (f->token->str); gts_file_next_token (f); } } static void point_write (GtsObject * o, FILE * fptr) { GtsPoint * p = GTS_POINT (o); if (GTS_POINT_CLASS ((o)->klass)->binary) { fwrite (&(p->x), sizeof (gdouble), 1, fptr); fwrite (&(p->y), sizeof (gdouble), 1, fptr); fwrite (&(p->z), sizeof (gdouble), 1, fptr); } else fprintf (fptr, "%.10g %.10g %.10g", p->x, p->y, p->z); } static void point_class_init (GtsObjectClass * klass) { klass->read = point_read; klass->write = point_write; } /** * gts_point_class: * * Returns: the #GtsPointClass. */ GtsPointClass * gts_point_class (void) { static GtsPointClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo point_info = { "GtsPoint", sizeof (GtsPoint), sizeof (GtsPointClass), (GtsObjectClassInitFunc) point_class_init, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &point_info); } return klass; } /** * gts_point_new: * @klass: a #GtsPointClass. * @x: the x-coordinate. * @y: the y-coordinate. * @z: the z-coordinate. * * Returns: a new #GtsPoint. */ GtsPoint * gts_point_new (GtsPointClass * klass, gdouble x, gdouble y, gdouble z) { GtsPoint * p; p = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (klass))); p->x = x; p->y = y; p->z = z; return p; } /** * gts_point_set: * @p: a #GtsPoint. * @x: the x-coordinate. * @y: the y-coordinate. * @z: the z-coordinate. * * Sets the coordinates of @p. */ void gts_point_set (GtsPoint * p, gdouble x, gdouble y, gdouble z) { g_return_if_fail (p != NULL); p->x = x; p->y = y; p->z = z; } /** * gts_point_distance: * @p1: a #GtsPoint. * @p2: another #GtsPoint. * * Returns: the Euclidean distance between @p1 and @p2. */ gdouble gts_point_distance (GtsPoint * p1, GtsPoint * p2) { g_return_val_if_fail (p1 != NULL && p2 != NULL, 0.0); return sqrt ((p1->x - p2->x)*(p1->x - p2->x) + (p1->y - p2->y)*(p1->y - p2->y) + (p1->z - p2->z)*(p1->z - p2->z)); } /** * gts_point_distance2: * @p1: a #GtsPoint. * @p2: another #GtsPoint. * * Returns: the square of the Euclidean distance between @p1 and @p2. */ gdouble gts_point_distance2 (GtsPoint * p1, GtsPoint * p2) { g_return_val_if_fail (p1 != NULL && p2 != NULL, 0.0); return (p1->x - p2->x)*(p1->x - p2->x) + (p1->y - p2->y)*(p1->y - p2->y) + (p1->z - p2->z)*(p1->z - p2->z); } /** * gts_point_orientation_3d: * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * @p4: a #GtsPoint. * * Checks if @p4 lies above, below or on the plane passing through the * points @p1, @p2 and @p3. Below is defined so that @p1, @p2 and @p3 * appear in counterclockwise order when viewed from above the * plane. The returned value is an approximation of six times the * signed volume of the tetrahedron defined by the four points. This * function uses adaptive floating point arithmetic and is * consequently geometrically robust. * * Returns: a positive value if @p4 lies below, a negative value if * @p4 lies above the plane, zero if the four points are coplanar. */ gdouble gts_point_orientation_3d (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4) { g_return_val_if_fail (p1 != NULL && p2 != NULL && p3 != NULL && p4 != NULL, 0.0); return orient3d ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x, (gdouble *) &p4->x); } /** * gts_point_is_in_triangle: * @p: a #GtsPoint. * @t: a #GtsTriangle. * * Tests if the planar projection (x, y) of @p is inside, outside or * on the boundary of the planar projection of @t. This function is * geometrically robust. * * Returns: %GTS_IN if @p is inside @t, %GTS_ON if @p is on the boundary of * @t, %GTS_OUT otherwise. */ GtsIntersect gts_point_is_in_triangle (GtsPoint * p, GtsTriangle * t) { GtsVertex * v1, * v2, * v3; gdouble d1, d2, d3; g_return_val_if_fail (p != NULL && t != NULL, FALSE); gts_triangle_vertices (t, &v1, &v2, &v3); d1 = gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p); if (d1 < 0.0) return GTS_OUT; d2 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p); if (d2 < 0.0) return GTS_OUT; d3 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p); if (d3 < 0.0) return GTS_OUT; if (d1 == 0.0 || d2 == 0.0 || d3 == 0.0) return GTS_ON; return GTS_IN; } /** * gts_point_in_triangle_circle: * @p: a #GtsPoint. * @t: a #GtsTriangle. * * Tests if the planar projection (x, y) of @p is inside or outside * the circumcircle of the planar projection of @t. This function is * geometrically robust. * * Returns: a positive number if @p lies inside, * a negative number if @p lies outside and zero if @p lies on * the circumcircle of @t. */ gdouble gts_point_in_triangle_circle (GtsPoint * p, GtsTriangle * t) { GtsPoint * p1, * p2, * p3; g_return_val_if_fail (p != NULL && t != NULL, 0.0); gts_triangle_vertices (t, (GtsVertex **) &p1, (GtsVertex **) &p2, (GtsVertex **) &p3); return incircle ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x, (gdouble *) &p->x); } /** * gts_point_in_circle: * @p: a #GtsPoint. * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * * Tests if the planar projection (x, y) of @p is inside or outside the * circle defined by the planar projection of @p1, @p2 and @p3. * * Returns: a positive number if @p lies inside, * a negative number if @p lies outside and zero if @p lies on * the circle. */ gdouble gts_point_in_circle (GtsPoint * p, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3) { g_return_val_if_fail (p != NULL && p1 != NULL && p2 != NULL && p3 != NULL, 0.0); return incircle ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x, (gdouble *) &p->x); } /** * gts_point_in_sphere: * @p: a #GtsPoint. * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * @p4: a #GtsPoint. * * Tests if @p is inside or outside the sphere defined by @p1, @p2, * @p3 and @p4. * * Returns: a positive number if @p lies inside, * a negative number if @p lies outside and zero if @p lies on * the sphere. */ gdouble gts_point_in_sphere (GtsPoint * p, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4) { g_return_val_if_fail (p != NULL && p1 != NULL && p2 != NULL && p3 != NULL && p4 != NULL, 0.0); return insphere ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x, (gdouble *) &p4->x, (gdouble *) &p->x); } /** * gts_point_segment_distance2: * @p: a #GtsPoint. * @s: a #GtsSegment. * * Returns: the square of the minimun Euclidean distance between @p and @s. */ gdouble gts_point_segment_distance2 (GtsPoint * p, GtsSegment * s) { gdouble t, ns2, x, y, z; GtsPoint * p1, * p2; g_return_val_if_fail (p != NULL, 0.0); g_return_val_if_fail (s != NULL, 0.0); p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); ns2 = gts_point_distance2 (p1, p2); if (ns2 == 0.0) return gts_point_distance2 (p, p1); t = ((p2->x - p1->x)*(p->x - p1->x) + (p2->y - p1->y)*(p->y - p1->y) + (p2->z - p1->z)*(p->z - p1->z))/ns2; if (t > 1.0) return gts_point_distance2 (p, p2); if (t < 0.0) return gts_point_distance2 (p, p1); x = (1. - t)*p1->x + t*p2->x - p->x; y = (1. - t)*p1->y + t*p2->y - p->y; z = (1. - t)*p1->z + t*p2->z - p->z; return x*x + y*y + z*z; } /** * gts_point_segment_distance: * @p: a #GtsPoint. * @s: a #GtsSegment. * * Returns: the minimun Euclidean distance between @p and @s. */ gdouble gts_point_segment_distance (GtsPoint * p, GtsSegment * s) { g_return_val_if_fail (p != NULL, 0.0); g_return_val_if_fail (s != NULL, 0.0); return sqrt (gts_point_segment_distance2 (p, s)); } /** * gts_point_segment_closest: * @p: a #GtsPoint. * @s: a #GtsSegment. * @closest: a #GtsPoint. * * Set the coordinates of @closest to the coordinates of the point belonging * to @s closest to @p. */ void gts_point_segment_closest (GtsPoint * p, GtsSegment * s, GtsPoint * closest) { gdouble t, ns2; GtsPoint * p1, * p2; g_return_if_fail (p != NULL); g_return_if_fail (s != NULL); g_return_if_fail (closest != NULL); p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); ns2 = gts_point_distance2 (p1, p2); if (ns2 == 0.0) { gts_point_set (closest, p1->x, p1->y, p1->z); return; } t = ((p2->x - p1->x)*(p->x - p1->x) + (p2->y - p1->y)*(p->y - p1->y) + (p2->z - p1->z)*(p->z - p1->z))/ns2; if (t > 1.0) gts_point_set (closest, p2->x, p2->y, p2->z); else if (t < 0.0) gts_point_set (closest, p1->x, p1->y, p1->z); else gts_point_set (closest, (1. - t)*p1->x + t*p2->x, (1. - t)*p1->y + t*p2->y, (1. - t)*p1->z + t*p2->z); } /** * gts_point_triangle_distance2: * @p: a #GtsPoint. * @t: a #GtsTriangle. * * Returns: the square of the minimun Euclidean distance between @p and @t. */ gdouble gts_point_triangle_distance2 (GtsPoint * p, GtsTriangle * t) { GtsPoint * p1, * p2, * p3; GtsEdge * e1, * e2, * e3; GtsVector p1p2, p1p3, pp1; gdouble A, B, C, D, E, det; gdouble t1, t2; gdouble x, y, z; g_return_val_if_fail (p != NULL, 0.0); g_return_val_if_fail (t != NULL, 0.0); gts_triangle_vertices_edges (t, NULL, (GtsVertex **) &p1, (GtsVertex **) &p2, (GtsVertex **) &p3, &e1, &e2, &e3); gts_vector_init (p1p2, p1, p2); gts_vector_init (p1p3, p1, p3); gts_vector_init (pp1, p, p1); B = gts_vector_scalar (p1p3, p1p2); E = gts_vector_scalar (p1p2, p1p2); C = gts_vector_scalar (p1p3, p1p3); det = B*B - E*C; if (det == 0.) { /* p1p2 and p1p3 are colinear */ gdouble d1 = gts_point_segment_distance2 (p, GTS_SEGMENT (e1)); gdouble d2 = gts_point_segment_distance2 (p, GTS_SEGMENT (e3)); if (d1 < d2) return d1; return d2; } A = gts_vector_scalar (p1p3, pp1); D = gts_vector_scalar (p1p2, pp1); t1 = (D*C - A*B)/det; t2 = (A*E - D*B)/det; if (t1 < 0.) return gts_point_segment_distance2 (p, GTS_SEGMENT (e3)); if (t2 < 0.) return gts_point_segment_distance2 (p, GTS_SEGMENT (e1)); if (t1 + t2 > 1.) return gts_point_segment_distance2 (p, GTS_SEGMENT (e2)); x = pp1[0] + t1*p1p2[0] + t2*p1p3[0]; y = pp1[1] + t1*p1p2[1] + t2*p1p3[1]; z = pp1[2] + t1*p1p2[2] + t2*p1p3[2]; return x*x + y*y + z*z; } /** * gts_point_triangle_distance: * @p: a #GtsPoint. * @t: a #GtsTriangle. * * Returns: the minimun Euclidean distance between @p and @t. */ gdouble gts_point_triangle_distance (GtsPoint * p, GtsTriangle * t) { g_return_val_if_fail (p != NULL, 0.0); g_return_val_if_fail (t != NULL, 0.0); return sqrt (gts_point_triangle_distance2 (p, t)); } /** * gts_point_triangle_closest: * @p: a #GtsPoint. * @t: a #GtsTriangle. * @closest: a #GtsPoint. * * Set the coordinates of @closest to those of the point belonging to @t and * closest to @p. */ void gts_point_triangle_closest (GtsPoint * p, GtsTriangle * t, GtsPoint * closest) { GtsPoint * p1, * p2, * p3; GtsEdge * e1, * e2, * e3; GtsVector p1p2, p1p3, pp1; gdouble A, B, C, D, E, det; gdouble t1, t2; g_return_if_fail (p != NULL); g_return_if_fail (t != NULL); g_return_if_fail (closest != NULL); gts_triangle_vertices_edges (t, NULL, (GtsVertex **) &p1, (GtsVertex **) &p2, (GtsVertex **) &p3, &e1, &e2, &e3); gts_vector_init (p1p2, p1, p2); gts_vector_init (p1p3, p1, p3); gts_vector_init (pp1, p, p1); B = gts_vector_scalar (p1p3, p1p2); E = gts_vector_scalar (p1p2, p1p2); C = gts_vector_scalar (p1p3, p1p3); det = B*B - E*C; if (det == 0.) { /* p1p2 and p1p3 are colinear */ GtsPoint * cp = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class ()))); gts_point_segment_closest (p, GTS_SEGMENT (e1), cp); gts_point_segment_closest (p, GTS_SEGMENT (e3), closest); if (gts_point_distance2 (cp, p) < gts_point_distance2 (closest, p)) gts_point_set (closest, cp->x, cp->y, cp->z); gts_object_destroy (GTS_OBJECT (cp)); return; } A = gts_vector_scalar (p1p3, pp1); D = gts_vector_scalar (p1p2, pp1); t1 = (D*C - A*B)/det; t2 = (A*E - D*B)/det; if (t1 < 0.) gts_point_segment_closest (p, GTS_SEGMENT (e3), closest); else if (t2 < 0.) gts_point_segment_closest (p, GTS_SEGMENT (e1), closest); else if (t1 + t2 > 1.) gts_point_segment_closest (p, GTS_SEGMENT (e2), closest); else gts_point_set (closest, p1->x + t1*p1p2[0] + t2*p1p3[0], p1->y + t1*p1p2[1] + t2*p1p3[1], p1->z + t1*p1p2[2] + t2*p1p3[2]); } /** * gts_segment_triangle_intersection: * @s: a #GtsSegment. * @t: a #GtsTriangle. * @boundary: if %TRUE, the boundary of @t is taken into account. * @klass: a #GtsPointClass to be used for the new point. * * Checks if @s intersects @t. If this is the case, creates a new * point pi intersection of @s with @t. * * This function is geometrically robust in the sense that it will not * return a point if @s and @t do not intersect and will return a * point if @s and @t do intersect. However, the point coordinates are * subject to round-off errors. * * Note that this function will not return any point if @s is contained in * the plane defined by @t. * * Returns: a summit of @t (if @boundary is set to %TRUE), one of the endpoints * of @s or a new #GtsPoint, intersection of @s with @t or %NULL if @s * and @t don't intersect. */ GtsPoint * gts_segment_triangle_intersection (GtsSegment * s, GtsTriangle * t, gboolean boundary, GtsPointClass * klass) { GtsPoint * A, * B, * C, * D, * E, * I; gdouble ABCE, ABCD, ADCE, ABDE, BCDE; gdouble c; g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); A = GTS_POINT (GTS_SEGMENT (t->e1)->v1); B = GTS_POINT (GTS_SEGMENT (t->e1)->v2); C = GTS_POINT (gts_triangle_vertex (t)); D = GTS_POINT (s->v1); E = GTS_POINT (s->v2); ABCE = gts_point_orientation_3d (A, B, C, E); ABCD = gts_point_orientation_3d (A, B, C, D); if (ABCE < 0.0 || ABCD > 0.0) { GtsPoint * tmpp; gdouble tmp; tmpp = E; E = D; D = tmpp; tmp = ABCE; ABCE = ABCD; ABCD = tmp; } if (ABCE < 0.0 || ABCD > 0.0) return NULL; ADCE = gts_point_orientation_3d (A, D, C, E); if ((boundary && ADCE < 0.) || (!boundary && ADCE <= 0.)) return NULL; ABDE = gts_point_orientation_3d (A, B, D, E); if ((boundary && ABDE < 0.) || (!boundary && ABDE <= 0.)) return NULL; BCDE = gts_point_orientation_3d (B, C, D, E); if ((boundary && BCDE < 0.) || (!boundary && BCDE <= 0.)) return NULL; if (ABCE == 0.0) { if (ABCD == 0.0) /* s is contained in the plane defined by t*/ return NULL; return E; } if (ABCD == 0.0) return D; if (boundary) { /* corners of @t */ if (ABDE == 0.) { if (ADCE == 0.) return A; if (BCDE == 0.) return B; } else if (BCDE == 0. && ADCE == 0.) return C; } c = ABCE/(ABCE - ABCD); I = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (klass))); gts_point_set (I, E->x + c*(D->x - E->x), E->y + c*(D->y - E->y), E->z + c*(D->z - E->z)); return I; } /** * gts_point_transform: * @p: a #GtsPoint. * @m: the #GtsMatrix representing the transformation to * apply to the coordinates of @p. * * Transform the coordinates of @p according to @m. (p[] becomes m[][].p[]). */ void gts_point_transform (GtsPoint * p, GtsMatrix * m) { gdouble x, y, z; g_return_if_fail (p != NULL && m != NULL); x = m[0][0]*p->x + m[0][1]*p->y + m[0][2]*p->z + m[0][3]; y = m[1][0]*p->x + m[1][1]*p->y + m[1][2]*p->z + m[1][3]; z = m[2][0]*p->x + m[2][1]*p->y + m[2][2]*p->z + m[2][3]; p->x = x; p->y = y; p->z = z; } /** * gts_point_orientation: * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * * Checks for orientation of the projection of three points on the * (x,y) plane. The result is also an approximation of twice the * signed area of the triangle defined by the three points. This * function uses adaptive floating point arithmetic and is * consequently geometrically robust. * * Returns: a positive value if @p1, @p2 and @p3 appear in * counterclockwise order, a negative value if they appear in * clockwise order and zero if they are colinear. */ gdouble gts_point_orientation (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3) { g_return_val_if_fail (p1 != NULL && p2 != NULL && p3 != NULL, 0.0); return orient2d ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x); } static gboolean ray_intersects_triangle (GtsPoint * D, GtsPoint * E, GtsTriangle * t) { GtsPoint * A, * B, * C; gint ABCE, ABCD, ADCE, ABDE, BCDE; gts_triangle_vertices (t, (GtsVertex **) &A, (GtsVertex **) &B, (GtsVertex **) &C); ABCE = gts_point_orientation_3d_sos (A, B, C, E); ABCD = gts_point_orientation_3d_sos (A, B, C, D); if (ABCE < 0 || ABCD > 0) { GtsPoint * tmpp; gint tmp; tmpp = E; E = D; D = tmpp; tmp = ABCE; ABCE = ABCD; ABCD = tmp; } if (ABCE < 0 || ABCD > 0) return FALSE; ADCE = gts_point_orientation_3d_sos (A, D, C, E); if (ADCE < 0) return FALSE; ABDE = gts_point_orientation_3d_sos (A, B, D, E); if (ABDE < 0) return FALSE; BCDE = gts_point_orientation_3d_sos (B, C, D, E); if (BCDE < 0) return FALSE; return TRUE; } /** * gts_point_is_inside_surface: * @p: a #GtsPoint. * @tree: a bounding box tree of the faces of a closed, orientable * surface (see gts_bb_tree_surface()). * @is_open: %TRUE if the surface defined by @tree is "open" i.e. its volume * is negative, %FALSE otherwise. * * Returns: %TRUE if @p is inside the surface defined by @tree, %FALSE * otherwise. */ gboolean gts_point_is_inside_surface (GtsPoint * p, GNode * tree, gboolean is_open) { GSList * list, * i; guint nc = 0; GtsPoint * p1; GtsBBox * bb; g_return_val_if_fail (p != NULL, FALSE); g_return_val_if_fail (tree != NULL, FALSE); bb = tree->data; p1 = gts_point_new (gts_point_class (), bb->x2 + fabs (bb->x2)/10., p->y, p->z); i = list = gts_bb_tree_stabbed (tree, p); while (i) { GtsTriangle * t = GTS_TRIANGLE (GTS_BBOX (i->data)->bounded); if (ray_intersects_triangle (p, p1, t)) nc++; i = i->next; } g_slist_free (list); gts_object_destroy (GTS_OBJECT (p1)); return is_open ? (nc % 2 == 0) : (nc % 2 != 0); } #define SIGN(x) ((x) > 0. ? 1 : -1) #define ORIENT1D(a,b) ((a) > (b) ? 1 : (a) < (b) ? -1 : 0) static gint sortp (gpointer * p, guint n) { gint sign = 1; guint i, j; for (i = 0; i < n - 1; i++) for (j = 0; j < n - 1 - i; j++) if (GPOINTER_TO_UINT (p[j+1]) < GPOINTER_TO_UINT (p[j])) { gpointer tmp = p[j]; p[j] = p[j+1]; p[j+1] = tmp; sign = - sign; } return sign; } /** * gts_point_orientation_3d_sos: * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * @p4: a #GtsPoint. * * Checks if @p4 lies above or below the plane passing through the * points @p1, @p2 and @p3. Below is defined so that @p1, @p2 and @p3 * appear in counterclockwise order when viewed from above the * plane. This function uses adaptive floating point arithmetic and is * consequently geometrically robust. * * Simulation of Simplicity (SoS) is used to break ties when the * orientation is degenerate (i.e. @p4 lies on the plane defined by * @p1, @p2 and @p3). * * Returns: +1 if @p4 lies below, -1 if @p4 lies above the plane. */ gint gts_point_orientation_3d_sos (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4) { gdouble o; g_return_val_if_fail (p1 != NULL && p2 != NULL && p3 != NULL && p4 != NULL, 0); o = orient3d ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x, (gdouble *) &p4->x); if (o != 0.) return SIGN (o); else { GtsPoint * p[4]; gdouble a[2], b[2], c[2]; gint sign; p[0] = p1; p[1] = p2; p[2] = p3; p[3] = p4; sign = sortp ((gpointer *) p, 4); /* epsilon^1/8 */ a[0] = p[1]->x; a[1] = p[1]->y; b[0] = p[2]->x; b[1] = p[2]->y; c[0] = p[3]->x; c[1] = p[3]->y; o = orient2d (a, b, c); if (o != 0.) return SIGN (o)*sign; /* epsilon^1/4 */ a[0] = p[1]->x; a[1] = p[1]->z; b[0] = p[2]->x; b[1] = p[2]->z; c[0] = p[3]->x; c[1] = p[3]->z; o = orient2d (a, b, c); if (o != 0.) return - SIGN (o)*sign; /* epsilon^1/2 */ a[0] = p[1]->y; a[1] = p[1]->z; b[0] = p[2]->y; b[1] = p[2]->z; c[0] = p[3]->y; c[1] = p[3]->z; o = orient2d (a, b, c); if (o != 0.) return SIGN (o)*sign; /* epsilon */ a[0] = p[0]->x; a[1] = p[0]->y; b[0] = p[2]->x; b[1] = p[2]->y; c[0] = p[3]->x; c[1] = p[3]->y; o = orient2d (a, b, c); if (o != 0.) return - SIGN (o)*sign; /* epsilon^5/4 */ o = ORIENT1D (p[2]->x, p[3]->x); if (o != 0.) return SIGN (o)*sign; /* epsilon^3/2 */ o = ORIENT1D (p[2]->y, p[3]->y); if (o != 0.) return - SIGN (o)*sign; /* epsilon^2 */ a[0] = p[0]->x; a[1] = p[0]->z; b[0] = p[2]->x; b[1] = p[2]->z; c[0] = p[3]->x; c[1] = p[3]->z; o = orient2d (a, b, c); if (o != 0.) return SIGN (o)*sign; /* epsilon^5/2 */ o = ORIENT1D (p[2]->z, p[3]->z); if (o != 0.) return SIGN (o)*sign; /* epsilon^4 */ a[0] = p[0]->y; a[1] = p[0]->z; b[0] = p[2]->y; b[1] = p[2]->z; c[0] = p[3]->y; c[1] = p[3]->z; o = orient2d (a, b, c); if (o != 0.) return - SIGN (o)*sign; /* epsilon^8 */ a[0] = p[0]->x; a[1] = p[0]->y; b[0] = p[1]->x; b[1] = p[1]->y; c[0] = p[3]->x; c[1] = p[3]->y; o = orient2d (a, b, c); if (o != 0.) return SIGN (o)*sign; /* epsilon^33/4 */ o = ORIENT1D (p[1]->x, p[3]->x); if (o != 0.) return - SIGN (o)*sign; /* epsilon^17/2 */ o = ORIENT1D (p[1]->y, p[3]->y); if (o != 0.) return SIGN (o)*sign; /* epsilon^10 */ o = ORIENT1D (p[0]->x, p[3]->x); if (o != 0.) return SIGN (o)*sign; /* epsilon^21/2 */ return sign; } } /** * gts_point_orientation_sos: * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * * Checks for orientation of the projection of three points on the * (x,y) plane. * * Simulation of Simplicity (SoS) is used to break ties when the * orientation is degenerate (i.e. @p3 lies on the line defined by * @p1 and @p2). * * Returns: a positive value if @p1, @p2 and @p3 appear in * counterclockwise order or a negative value if they appear in * clockwise order. */ gint gts_point_orientation_sos (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3) { gdouble o; g_return_val_if_fail (p1 != NULL && p2 != NULL && p3 != NULL, 0); o = orient2d ((gdouble *) &p1->x, (gdouble *) &p2->x, (gdouble *) &p3->x); if (o != 0.) return SIGN (o); else { GtsPoint * p[3]; gint sign; p[0] = p1; p[1] = p2; p[2] = p3; sign = sortp ((gpointer *) p, 3); /* epsilon^1/4 */ o = ORIENT1D (p[1]->x, p[2]->x); if (o != 0.) return - SIGN (o)*sign; /* epsilon^1/2 */ o = ORIENT1D (p[1]->y, p[2]->y); if (o != 0.) return SIGN (o)*sign; /* epsilon */ o = ORIENT1D (p[0]->x, p[2]->x); if (o != 0.) return SIGN (o)*sign; /* epsilon^3/2 */ return sign; } } gts-snapshot-121130/src/graph.c0000644000175100017510000012244312055775440013233 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" /* GtsGNode */ gboolean gts_allow_floating_gnodes = FALSE; static void gnode_remove_container (GtsContainee * i, GtsContainer * c) { (* GTS_CONTAINEE_CLASS (GTS_OBJECT_CLASS (gts_gnode_class ())->parent_class)->remove_container) (i, c); if (GTS_SLIST_CONTAINEE (i)->containers == NULL && !gts_allow_floating_gnodes && !GTS_OBJECT_DESTROYED(GTS_OBJECT (i))) gts_object_destroy (GTS_OBJECT (i)); } static void gnode_class_init (GtsGNodeClass * klass) { klass->weight = NULL; GTS_CONTAINEE_CLASS (klass)->remove_container = gnode_remove_container; } static void gnode_init (GtsGNode * n) { n->level = 0; } /** * gts_gnode_class: * * Returns: the #GtsGNodeClass. */ GtsGNodeClass * gts_gnode_class (void) { static GtsGNodeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo gnode_info = { "GtsGNode", sizeof (GtsGNode), sizeof (GtsGNodeClass), (GtsObjectClassInitFunc) gnode_class_init, (GtsObjectInitFunc) gnode_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_slist_container_class ()), &gnode_info); } return klass; } /** * gts_gnode_new: * @klass: a #GtsGNodeClass. * * Returns: a new #GtsGNode. */ GtsGNode * gts_gnode_new (GtsGNodeClass * klass) { GtsGNode * object; object = GTS_GNODE (gts_object_new (GTS_OBJECT_CLASS (klass))); return object; } /** * gts_gnode_foreach_neighbor: * @n: a #GtsGNode. * @g: a #GtsGraph or %NULL. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func for each neighbor #GtsGNode of @n (belonging to @g if * @g is not %NULL. */ void gts_gnode_foreach_neighbor (GtsGNode * n, GtsGraph * g, GtsFunc func, gpointer data) { GSList * i; g_return_if_fail (n != NULL); g_return_if_fail (func != NULL); i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (g == NULL || gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) (* func) (n1, data); i = i->next; } } /** * gts_gnode_foreach_edge: * @n: a #GtsGNode. * @g: a #GtsGraph or %NULL. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func for each #GtsGEdge connecting @n to another #GtsGNode * (belonging to @g if @g is not %NULL. */ void gts_gnode_foreach_edge (GtsGNode * n, GtsGraph * g, GtsFunc func, gpointer data) { GSList * i; g_return_if_fail (n != NULL); g_return_if_fail (func != NULL); i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (g == NULL || gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) (* func) (i->data, data); i = i->next; } } /** * gts_gnode_degree: * @n: a #GtsGNode. * @g: a #GtsGraph or %NULL. * * Returns: the number of neighbors of @n (belonging to @g if @g is not %NULL). */ guint gts_gnode_degree (GtsGNode * n, GtsGraph * g) { GSList * i; guint nn = 0; g_return_val_if_fail (n != NULL, 0); i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (g == NULL || gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) nn++; i = i->next; } return nn; } /** * gts_gnode_move_cost: * @n: a #GtsGNode. * @src: a #GtsGraph containing @n. * @dst: another #GtsGraph. * * Returns: the cost (increase in the sum of the weights of the edges cut) of * moving @n from @src to @dst. */ gfloat gts_gnode_move_cost (GtsGNode * n, GtsGraph * src, GtsGraph * dst) { GSList * i; gfloat cost = 0.; g_return_val_if_fail (n != NULL, G_MAXFLOAT); g_return_val_if_fail (src != NULL, G_MAXFLOAT); g_return_val_if_fail (dst != NULL, G_MAXFLOAT); g_return_val_if_fail (gts_containee_is_contained (GTS_CONTAINEE (n), GTS_CONTAINER (src)), G_MAXFLOAT); i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGEdge * ge = i->data; GtsGNode * neighbor = GTS_GNODE_NEIGHBOR (n, ge); if (gts_containee_is_contained (GTS_CONTAINEE (neighbor), GTS_CONTAINER (src))) cost += gts_gedge_weight (ge); else if (gts_containee_is_contained (GTS_CONTAINEE (neighbor), GTS_CONTAINER (dst))) cost -= gts_gedge_weight (ge); i = i->next; } return cost; } /** * gts_gnode_weight: * @n: a #GtsGNode. * * Returns: the weight of @n as defined by the weight() method of the * #GtsGNodeClass. */ gfloat gts_gnode_weight (GtsGNode * n) { g_return_val_if_fail (n != NULL, 0.); if (GTS_GNODE_CLASS (GTS_OBJECT (n)->klass)->weight) return (* GTS_GNODE_CLASS (GTS_OBJECT (n)->klass)->weight) (n); return 1.; } /* GtsNGNode */ static void ngnode_init (GtsNGNode * n) { n->id = 0; } /** * gts_ngnode_class: * * Returns: the #GtsNGNodeClass. */ GtsNGNodeClass * gts_ngnode_class (void) { static GtsNGNodeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo ngnode_info = { "GtsNGNode", sizeof (GtsNGNode), sizeof (GtsNGNodeClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) ngnode_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()), &ngnode_info); } return klass; } /** * gts_ngnode_new: * @klass: a #GtsNGNodeClass. * * Returns: a new #GtsNGNode with identity @id. */ GtsNGNode * gts_ngnode_new (GtsNGNodeClass * klass, guint id) { GtsNGNode * n; n = GTS_NGNODE (gts_gnode_new (GTS_GNODE_CLASS (klass))); n->id = id; return n; } /* GtsWGNode */ static gfloat wgnode_weight (GtsGNode * n) { return GTS_WGNODE (n)->weight; } static void wgnode_class_init (GtsWGNodeClass * klass) { GTS_GNODE_CLASS (klass)->weight = wgnode_weight; } static void wgnode_init (GtsWGNode * n) { n->weight = 1.; } /** * gts_wgnode_class: * * Returns: the #GtsWGNodeClass. */ GtsWGNodeClass * gts_wgnode_class (void) { static GtsWGNodeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo wgnode_info = { "GtsWGNode", sizeof (GtsWGNode), sizeof (GtsWGNodeClass), (GtsObjectClassInitFunc) wgnode_class_init, (GtsObjectInitFunc) wgnode_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()), &wgnode_info); } return klass; } /** * gts_wgnode_new: * @klass: a #GtsWGNodeClass. * @weight: the weight of the #GtsWGNode to create. * * Returns: a new #GtsWGNode of weight @weight. */ GtsWGNode * gts_wgnode_new (GtsWGNodeClass * klass, gfloat weight) { GtsWGNode * n; n = GTS_WGNODE (gts_gnode_new (GTS_GNODE_CLASS (klass))); n->weight = weight; return n; } /* GtsPNode */ static void pnode_write (GtsGNode * n, FILE * fp) { if (GTS_IS_NVERTEX (GTS_PNODE (n)->data)) fprintf (fp, "label=\"%p:%s\",", GTS_PNODE (n)->data, GTS_NVERTEX (GTS_PNODE (n)->data)->name); else fprintf (fp, "label=\"%p\",", GTS_PNODE (n)->data); } static void pnode_class_init (GtsPNodeClass * klass) { GTS_GNODE_CLASS (klass)->write = pnode_write; } static void pnode_init (GtsPNode * pn) { pn->data = NULL; } /** * gts_pnode_class: * * Returns: the #GtsPNodeClass. */ GtsPNodeClass * gts_pnode_class (void) { static GtsPNodeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo pnode_info = { "GtsPNode", sizeof (GtsPNode), sizeof (GtsPNodeClass), (GtsObjectClassInitFunc) pnode_class_init, (GtsObjectInitFunc) pnode_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()), &pnode_info); } return klass; } /** * gts_pnode_new: * @klass: a #GtsPNodeClass. * @data: user data. * * Returns: a new #GtsPNode associated with @data. */ GtsPNode * gts_pnode_new (GtsPNodeClass * klass, gpointer data) { GtsPNode * pn; pn = GTS_PNODE (gts_object_new (GTS_OBJECT_CLASS (klass))); pn->data = data; return pn; } /* GtsFNode */ static void fnode_write (GtsGNode * n, FILE * fp) { fprintf (fp, "label=\"%p\",", GTS_FNODE (n)->f); } static void fnode_class_init (GtsGNodeClass * klass) { klass->write = fnode_write; } static void fnode_init (GtsFNode * fn) { fn->f = NULL; } /** * gts_fnode_class: * * Returns: the #GtsFNodeClass. */ GtsFNodeClass * gts_fnode_class (void) { static GtsFNodeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo fnode_info = { "GtsFNode", sizeof (GtsFNode), sizeof (GtsFNodeClass), (GtsObjectClassInitFunc) fnode_class_init, (GtsObjectInitFunc) fnode_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()), &fnode_info); } return klass; } /** * gts_fnode_new: * @klass: a #GtsFNodeClass. * @f: a #GtsFace. * * Returns: a new #GtsFNode associated with face @f. */ GtsFNode * gts_fnode_new (GtsFNodeClass * klass, GtsFace * f) { GtsFNode * fn; g_return_val_if_fail (f != NULL, NULL); fn = GTS_FNODE (gts_object_new (GTS_OBJECT_CLASS (klass))); fn->f = f; return fn; } /* GtsGEdge */ static void gedge_destroy (GtsObject * object) { GtsGEdge * ge = GTS_GEDGE (object); if (ge->n1) gts_container_remove (GTS_CONTAINER (ge->n1), GTS_CONTAINEE (ge)); if (ge->n2) gts_container_remove (GTS_CONTAINER (ge->n2), GTS_CONTAINEE (ge)); (* GTS_OBJECT_CLASS (gts_gedge_class ())->parent_class->destroy) (object); } static void gedge_remove_container (GtsContainee * i, GtsContainer * c) { GtsGEdge * ge = GTS_GEDGE (i); GtsGNode * n1 = ge->n1; GtsGNode * n2 = ge->n2; ge->n1 = ge->n2 = NULL; if (n1 != NULL && n2 != NULL) { if (GTS_CONTAINER (n1) == c) { if (n2 && n2 != n1) gts_container_remove (GTS_CONTAINER (n2), i); } else if (GTS_CONTAINER (n2) == c) { if (n1 && n1 != n2) gts_container_remove (GTS_CONTAINER (n1), i); } else g_assert_not_reached (); (* GTS_OBJECT_CLASS (gts_gedge_class ())->parent_class->destroy) (GTS_OBJECT (i)); } } static gboolean gedge_is_contained (GtsContainee * i, GtsContainer * c) { GtsGEdge * ge = GTS_GEDGE (i); if (GTS_CONTAINER (ge->n1) == c || GTS_CONTAINER (ge->n2) == c) return TRUE; return FALSE; } static void gedge_class_init (GtsGEdgeClass * klass) { klass->link = NULL; klass->weight = NULL; GTS_CONTAINEE_CLASS (klass)->remove_container = gedge_remove_container; GTS_CONTAINEE_CLASS (klass)->is_contained = gedge_is_contained; GTS_OBJECT_CLASS (klass)->destroy = gedge_destroy; } static void gedge_init (GtsGEdge * object) { object->n1 = object->n2 = NULL; } /** * gts_gedge_class: * * Returns: the #GtsGEdgeClass. */ GtsGEdgeClass * gts_gedge_class (void) { static GtsGEdgeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo gedge_info = { "GtsGEdge", sizeof (GtsGEdge), sizeof (GtsGEdgeClass), (GtsObjectClassInitFunc) gedge_class_init, (GtsObjectInitFunc) gedge_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_containee_class ()), &gedge_info); } return klass; } /** * gts_gedge_new: * @klass: a #GtsGEdgeClass. * @n1: a #GtsGNode. * @n2: another #GtsGNode. * * Returns: a new #GtsGEdge linking @n1 and @n2. */ GtsGEdge * gts_gedge_new (GtsGEdgeClass * klass, GtsGNode * n1, GtsGNode * n2) { GtsGEdge * object; g_return_val_if_fail (n1 != NULL, NULL); g_return_val_if_fail (n2 != NULL, NULL); object = GTS_GEDGE (gts_object_new (GTS_OBJECT_CLASS (klass))); object->n1 = n1; gts_container_add (GTS_CONTAINER (n1), GTS_CONTAINEE (object)); object->n2 = n2; if (n1 != n2) gts_container_add (GTS_CONTAINER (n2), GTS_CONTAINEE (object)); if (klass->link) object = (* klass->link) (object, n1, n2); return object; } /** * gts_gedge_weight: * @e: a #GtsGEdge. * * Returns: the weight of edge @e as defined by the weight() method of * #GtsGEdgeClass. */ gfloat gts_gedge_weight (GtsGEdge * e) { g_return_val_if_fail (e != NULL, 0.); if (GTS_GEDGE_CLASS (GTS_OBJECT (e)->klass)->weight) return (* GTS_GEDGE_CLASS (GTS_OBJECT (e)->klass)->weight) (e); return 1.; } /* GtsPGEdge */ static void pgedge_write (GtsGEdge * ge, FILE * fp) { if (GTS_IS_EDGE (GTS_PGEDGE (ge)->data)) { GtsEdge * e = GTS_PGEDGE (ge)->data; guint n = g_slist_length (e->triangles); fprintf (fp, "label=\"%p:%s:%d\",color=%s", e, GTS_IS_NEDGE (e) ? GTS_NEDGE (e)->name : "", n, n == 0 ? "black" : n == 1 ? "blue" : n == 2 ? "green" : n == 3 ? "violet" : n == 4 ? "red" : "pink"); } else fprintf (fp, "label=\"%p\",", GTS_PGEDGE (ge)->data); } static void pgedge_class_init (GtsPGEdgeClass * klass) { GTS_GEDGE_CLASS (klass)->write = pgedge_write; } static void pgedge_init (GtsPGEdge * e) { e->data = NULL; } /** * gts_pgedge_class: * * Returns: the #GtsPGEdgeClass. */ GtsPGEdgeClass * gts_pgedge_class (void) { static GtsPGEdgeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo pgedge_info = { "GtsPGEdge", sizeof (GtsPGEdge), sizeof (GtsPGEdgeClass), (GtsObjectClassInitFunc) pgedge_class_init, (GtsObjectInitFunc) pgedge_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gedge_class ()), &pgedge_info); } return klass; } /** * gts_pgedge_new: * @klass: a #GtsPGEdgeClass. * @n1: a #GtsGNode. * @n2: another #GtsGNode. * @data: user data. * * Returns: a new #GtsPGEdge associated with @data linking @n1 and @n2. */ GtsPGEdge * gts_pgedge_new (GtsPGEdgeClass * klass, GtsGNode * g1, GtsGNode * g2, gpointer data) { GtsPGEdge * we; we = GTS_PGEDGE (gts_gedge_new (GTS_GEDGE_CLASS (klass), g1, g2)); we->data = data; return we; } /* GtsWGEdge */ static gfloat wgedge_weight (GtsGEdge * e) { return GTS_WGEDGE (e)->weight; } static void wgedge_class_init (GtsWGEdgeClass * klass) { GTS_GEDGE_CLASS (klass)->weight = wgedge_weight; } static void wgedge_init (GtsWGEdge * e) { e->weight = 1.; } /** * gts_wgedge_class: * * Returns: the #GtsWGEdgeClass. */ GtsWGEdgeClass * gts_wgedge_class (void) { static GtsWGEdgeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo wgedge_info = { "GtsWGEdge", sizeof (GtsWGEdge), sizeof (GtsWGEdgeClass), (GtsObjectClassInitFunc) wgedge_class_init, (GtsObjectInitFunc) wgedge_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gedge_class ()), &wgedge_info); } return klass; } /** * gts_wgedge_new: * @klass: a #GtsWGEdgeClass. * @n1: a #GtsGNode. * @n2: another #GtsGNode. * @weight: the weight of the new edge. * * Returns: a new #GtsWGEdge of weight @weight linking @n1 and @n2. */ GtsWGEdge * gts_wgedge_new (GtsWGEdgeClass * klass, GtsGNode * g1, GtsGNode * g2, gfloat weight) { GtsWGEdge * we; we = GTS_WGEDGE (gts_gedge_new (GTS_GEDGE_CLASS (klass), g1, g2)); we->weight = weight; return we; } /* GtsGraph */ static void graph_init (GtsGraph * g) { g->graph_class = gts_graph_class (); g->node_class = gts_gnode_class (); g->edge_class = gts_gedge_class (); } static void graph_write (GtsObject * object, FILE * fp) { GtsGraph * graph = GTS_GRAPH (object); fprintf (fp, " %s %s %s", object->klass->info.name, GTS_OBJECT_CLASS (graph->node_class)->info.name, GTS_OBJECT_CLASS (graph->edge_class)->info.name); } static void graph_read (GtsObject ** object, GtsFile * f) { GtsObjectClass * klass; if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsGNodeClass)"); return; } klass = gts_object_class_from_name (f->token->str); if (klass == NULL) { gts_file_error (f, "unknown class `%s'", f->token->str); return; } if (!gts_object_class_is_from_class (klass, gts_gnode_class ())) { gts_file_error (f, "class `%s' is not a GtsGNodeClass", f->token->str); return; } GTS_GRAPH (*object)->node_class = GTS_GNODE_CLASS (klass); gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsGEdgeClass)"); return; } klass = gts_object_class_from_name (f->token->str); if (klass == NULL) { gts_file_error (f, "unknown class `%s'", f->token->str); return; } if (!gts_object_class_is_from_class (klass, gts_gedge_class ())) { gts_file_error (f, "class `%s' is not a GtsGEdgeClass", f->token->str); return; } GTS_GRAPH (*object)->edge_class = GTS_GEDGE_CLASS (klass); gts_file_next_token (f); } static void graph_class_init (GtsGraphClass * klass) { klass->weight = NULL; GTS_OBJECT_CLASS (klass)->write = graph_write; GTS_OBJECT_CLASS (klass)->read = graph_read; } /** * gts_graph_class: * * Returns: the #GtsGraphClass. */ GtsGraphClass * gts_graph_class (void) { static GtsGraphClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo graph_info = { "GtsGraph", sizeof (GtsGraph), sizeof (GtsGraphClass), (GtsObjectClassInitFunc) graph_class_init, (GtsObjectInitFunc) graph_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_hash_container_class ()), &graph_info); } return klass; } /** * gts_graph_new: * @klass: a #GtsGraphClass. * @node_class: a #GtsGNodeClass. * @edge_class: a #GtsGEdgeClass. * * Returns: a new #GtsGraph using @node_class and @edge_class as node types. */ GtsGraph * gts_graph_new (GtsGraphClass * klass, GtsGNodeClass * node_class, GtsGEdgeClass * edge_class) { GtsGraph * g; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (node_class != NULL, NULL); g_return_val_if_fail (edge_class != NULL, NULL); g = GTS_GRAPH (gts_object_new (GTS_OBJECT_CLASS (klass))); g->node_class = node_class; g->edge_class = edge_class; return g; } static void compute_degree (GtsGNode * n, gpointer * data) { GtsGraph * g = data[0]; GtsRange * degree = data[1]; gts_range_add_value (degree, gts_gnode_degree (n, g)); } /** * gts_graph_print_stats: * @g: a #GtsGraph. * @fp: a file pointer. * * Writes to @fp a summary of the properties of @g. */ void gts_graph_print_stats (GtsGraph * g, FILE * fp) { GtsRange degree; gpointer data[2]; g_return_if_fail (g != NULL); g_return_if_fail (fp != NULL); fprintf (fp, "# nodes: %d weight: %g\n", gts_container_size (GTS_CONTAINER (g)), gts_graph_weight (g)); fprintf (fp, "# degree: "); gts_range_init (°ree); data[0] = g; data[1] = °ree; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) compute_degree, data); gts_range_update (°ree); gts_range_print (°ree, fp); fprintf (fp, "\n"); fprintf (fp, "# edges cut: %d edges cut weight: %g\n", gts_graph_edges_cut (g), gts_graph_edges_cut_weight (g)); } struct _GtsGraphTraverse { GtsFifo * q; GtsGraph * g; }; static void reset_level (GtsGNode * n) { n->level = 0; } /** * gts_graph_traverse_new: * @g: a #GtsGraph. * @n: a #GtsGNode belonging to @g. * @type: the type of traversal. * @reinit: if %TRUE, the traversal is reinitialized. * * Returns: a new #GtsGraphTraverse initialized for the traversal of * @g of type @type, starting from @n. */ GtsGraphTraverse * gts_graph_traverse_new (GtsGraph * g, GtsGNode * n, GtsTraverseType type, gboolean reinit) { GtsGraphTraverse * t; g_return_val_if_fail (g != NULL, NULL); g_return_val_if_fail (n != NULL, NULL); g_return_val_if_fail (gts_containee_is_contained (GTS_CONTAINEE (n), GTS_CONTAINER (g)), NULL); if (reinit) gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) reset_level, NULL); t = g_malloc (sizeof (GtsGraphTraverse)); t->q = gts_fifo_new (); t->g = g; n->level = 1; gts_fifo_push (t->q, n); return t; } static void push_neighbor (GtsGNode * n, gpointer * data) { GtsFifo * q = data[0]; GtsGNode * u = data[1]; if (n->level == 0) { n->level = u->level + 1; gts_fifo_push (q, n); } } /** * gts_graph_traverse_next: * @t: a #GtsGraphTraverse. * * Returns: the next #GtsGNode of the traversal defined by @t or %NULL * if the traversal is complete. */ GtsGNode * gts_graph_traverse_next (GtsGraphTraverse * t) { GtsGNode * u; g_return_val_if_fail (t != NULL, NULL); u = gts_fifo_pop (t->q); if (u) { gpointer data[2]; data[0] = t->q; data[1] = u; gts_gnode_foreach_neighbor (u, t->g, (GtsFunc) push_neighbor, data); } return u; } /** * gts_graph_traverse_what_next: * @t: a #GtsGraphTraverse. * * Returns: the next #GtsGNode of the traversal defined by @t or %NULL * if the traversal is complete but without advancing the traversal. */ GtsGNode * gts_graph_traverse_what_next (GtsGraphTraverse * t) { g_return_val_if_fail (t != NULL, NULL); return gts_fifo_top (t->q); } /** * gts_graph_traverse_destroy: * @t: a #GtsGraphTraverse. * * Frees all the memory allocated for @t. */ void gts_graph_traverse_destroy (GtsGraphTraverse * t) { g_return_if_fail (t != NULL); gts_fifo_destroy (t->q); g_free (t); } static void edge_foreach_node (GtsGNode * n, gpointer * info) { GtsFunc func = (GtsFunc) info[0]; gpointer data = info[1]; GHashTable * hash = info[2]; GSList * i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGEdge * e = i->data; if (!g_hash_table_lookup (hash, e)) { (* func) (e, data); g_hash_table_insert (hash, e, e); } i = i->next; } } /** * gts_graph_foreach_edge: * @g: a #GtsGraph. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func for each #GtsEdge of @g. */ void gts_graph_foreach_edge (GtsGraph * g, GtsFunc func, gpointer data) { gpointer info[3]; GHashTable * hash; g_return_if_fail (g != NULL); g_return_if_fail (func != NULL); info[0] = func; info[1] = data; info[2] = hash = g_hash_table_new (NULL, NULL); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) edge_foreach_node, info); g_hash_table_destroy (hash); } /** * gts_graph_weight: * @g: a #GtsGraph. * * Returns: the weight of graph @g as defined by the weight() method * of #GtsGraphClass. */ gfloat gts_graph_weight (GtsGraph * g) { g_return_val_if_fail (g != NULL, 0.); if (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass)->weight) return (* GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass)->weight) (g); return (gfloat) gts_container_size (GTS_CONTAINER (g)); } /** * gts_graph_distance_sum: * @g: a #GtsGraph. * @center: a #GtsGNode of @g. * * Returns: the sum of the distances between all the other #GtsGNode * of @g and @center. */ guint gts_graph_distance_sum (GtsGraph * g, GtsGNode * center) { GtsGraphTraverse * t; GtsGNode * n; guint sum = 0; g_return_val_if_fail (g != NULL, 0); g_return_val_if_fail (center != NULL, 0); t = gts_graph_traverse_new (g, center, GTS_BREADTH_FIRST, TRUE); while ((n = gts_graph_traverse_next (t))) sum += n->level - 1; gts_graph_traverse_destroy (t); return sum; } /** * gts_graph_farthest: * @g: a #GtsGraph. * @gnodes: a list of #GtsGNode belonging to @g. * * Returns: the #GtsGNode belonging to @g and farthest from all the nodes in * @gnodes (hmmm, definition of "farthest"?). */ GtsGNode * gts_graph_farthest (GtsGraph * g, GSList * gnodes) { GtsGNode * farthest = NULL; GSList * i; gboolean reinit = TRUE, changed = TRUE; guint level = 1; g_return_val_if_fail (g != NULL, NULL); /* initialize traversals */ i = gnodes; while (i) { GTS_OBJECT (i->data)->reserved = gts_graph_traverse_new (g, i->data, GTS_BREADTH_FIRST, reinit); reinit = FALSE; i = i->next; } while (changed) { changed = FALSE; i = gnodes; while (i) { GtsGraphTraverse * t = GTS_OBJECT (i->data)->reserved; GtsGNode * n; while ((n = gts_graph_traverse_what_next (t)) && n->level == level) { changed = TRUE; farthest = n; gts_graph_traverse_next (t); } i = i->next; } level++; } /* destroy traversals */ i = gnodes; while (i) { gts_graph_traverse_destroy (GTS_OBJECT (i->data)->reserved); GTS_OBJECT (i->data)->reserved = NULL; i = i->next; } return farthest; } static void neighbor_count (GtsGNode * n, gpointer * data) { guint * cuts = data[0]; GtsGraph * g = data[1]; if (!gts_containee_is_contained (GTS_CONTAINEE (n), GTS_CONTAINER (g))) (*cuts)++; } static void count_edge_cuts (GtsGNode * n, gpointer * data) { gts_gnode_foreach_neighbor (n, NULL, (GtsFunc) neighbor_count, data); } /** * gts_graph_edges_cut: * @g: a #GtsGraph. * * Returns: the number of edges of @g connecting nodes belonging to @g * to nodes not belonging to @g. */ guint gts_graph_edges_cut (GtsGraph * g) { guint cuts = 0; gpointer data[2]; g_return_val_if_fail (g != NULL, 0); data[0] = &cuts; data[1] = g; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) count_edge_cuts, data); return cuts; } static void sum_edge_cuts_weight (GtsGNode * n, gpointer * data) { gfloat * weight = data[0]; GtsGraph * g = data[1]; GSList * i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (!gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) *weight += gts_gedge_weight (i->data); i = i->next; } } /** * gts_graph_edges_cut_weight: * @g: a #GtsGraph. * * Returns: the sum of the weights of the edges of @g connecting nodes * belonging to @g to nodes not belonging to @g. */ gfloat gts_graph_edges_cut_weight (GtsGraph * g) { gfloat weight = 0.; gpointer data[2]; g_return_val_if_fail (g != NULL, 0); data[0] = &weight; data[1] = g; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) sum_edge_cuts_weight, data); return weight; } /** * gts_graph_read_jostle: * @g: a #GtsGraph. * @fp: a #GtsFile. * * Adds to @g the nodes and edges defined in the file pointed to by * @fp. This file must use the Jostle "graph" ASCII format. * The nodes created are of type #GtsNGNode and their identities are the * line number at which they appear in @fp. * * Returns: 0 if the lecture was successful, the line number at which * an error occured otherwise (in which case the @error field of @fp * is set). */ guint gts_graph_read_jostle (GtsGraph * g, GtsFile * fp) { guint nn, ne, n; GtsGNode ** nodes; g_return_val_if_fail (g != NULL, 1); g_return_val_if_fail (fp != NULL, 1); if (fp->type != GTS_INT) { gts_file_error (fp, "expecting an integer (number of nodes)"); return fp->line; } nn = atoi (fp->token->str); gts_file_next_token (fp); if (fp->type != GTS_INT) { gts_file_error (fp, "expecting an integer (number of edges)"); return fp->line; } ne = atoi (fp->token->str); gts_file_first_token_after (fp, '\n'); nodes = g_malloc (sizeof (GtsGNode *)*(nn + 1)); n = 0; while (n < nn && fp->type != GTS_ERROR) { GtsNGNode * node = gts_ngnode_new (gts_ngnode_class (), fp->line); nodes[n++] = GTS_GNODE (node); gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (node)); do { if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (node index)"); else { guint in = atoi (fp->token->str); if (in == 0 || in > nn) gts_file_error (fp, "node index `%d' is out of range `[1,%d]'", in, nn); else if (in == n) gts_file_error (fp, "node index `%d' references itself", in); else if (in < n) { gts_gedge_new (g->edge_class, GTS_GNODE (node), nodes[in - 1]); ne--; gts_file_next_token (fp); } } } while (fp->type != GTS_ERROR && fp->type != '\n'); } g_free (nodes); if (fp->type != GTS_ERROR) { if (n != nn) gts_file_error (fp, "only `%d' nodes read out of `%d'", n, nn); else if (ne > 0) gts_file_error (fp, "`%d' unallocated edges remaining", ne); } if (fp->type == GTS_ERROR) return fp->line; return 0; } static void count_edges (GtsGEdge * e, guint * nedge) { (*nedge)++; } static void write_node (GtsObject * node, gpointer * data) { FILE * fp = data[0]; guint * nnode = data[1]; node->reserved = GUINT_TO_POINTER ((*nnode)++); if (node->klass->write) (* node->klass->write) (node, fp); fputc ('\n', fp); } static void write_edge (GtsGEdge * edge, FILE * fp) { fprintf (fp, "%u %u", GPOINTER_TO_UINT (GTS_OBJECT (edge->n1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (edge->n2)->reserved)); if (GTS_OBJECT (edge)->klass->write) (* GTS_OBJECT (edge)->klass->write) (GTS_OBJECT (edge), fp); fputc ('\n', fp); } /** * gts_graph_write: * @g: a #GtsGraph. * @fp: a file pointer. * * Writes in the file @fp an ASCII representation of @g. The file * format is as follows. * * All the lines beginning with #GTS_COMMENTS are ignored. The first line * contains two unsigned integers separated by spaces. The first * integer is the number of nodes, nn, the second is the number of * edges, ne. * * Follows nn lines containing node description. * Follows ne lines containing the two indices (starting * from one) of the nodes of each edge. * * The format described above is the least common denominator to all * GTS files. Consistent with an object-oriented approach, the GTS * file format is extensible. Each of the lines of the file can be * extended with user-specific attributes accessible through the * read() and write() virtual methods of each of the objects written * (graph, nodes or edges). When read with different object classes, * these extra attributes are just ignored. */ void gts_graph_write (GtsGraph * g, FILE * fp) { guint nnode = 1, nedge = 0; gpointer data[2]; g_return_if_fail (g != NULL); g_return_if_fail (fp != NULL); gts_graph_foreach_edge (g, (GtsFunc) count_edges, &nedge); fprintf (fp, "%u %u", gts_container_size (GTS_CONTAINER (g)), nedge); if (GTS_OBJECT (g)->klass->write) (* GTS_OBJECT (g)->klass->write) (GTS_OBJECT (g), fp); fputc ('\n', fp); data[0] = fp; data[1] = &nnode; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) write_node, data); gts_graph_foreach_edge (g, (GtsFunc) write_edge, fp); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) gts_object_reset_reserved, NULL); } /** * gts_graph_read: * @fp: a #GtsFile. * * Reads a graph from a file. * * Returns: the new #GtsGraph or %NULL if an error occured (in which * case the @error field of @fp is set). */ GtsGraph * gts_graph_read (GtsFile * fp) { GtsGraph * g; GtsGNode ** nodes; guint nn, ne, n; g_return_val_if_fail (fp != NULL, NULL); if (fp->type != GTS_INT) { gts_file_error (fp, "expecting an integer (number of nodes)"); return NULL; } nn = atoi (fp->token->str); gts_file_next_token (fp); if (fp->type != GTS_INT) { gts_file_error (fp, "expecting an integer (number of edges)"); return NULL; } ne = atoi (fp->token->str); gts_file_next_token (fp); if (fp->type != '\n') { GtsObjectClass * klass; gts_graph_class (); gts_gnode_class (); gts_gedge_class (); if (fp->type != GTS_STRING) { gts_file_error (fp, "expecting a string (GtsGraphClass)"); return NULL; } klass = gts_object_class_from_name (fp->token->str); if (klass == NULL) { gts_file_error (fp, "unknown class `%s'", fp->token->str); return NULL; } if (!gts_object_class_is_from_class (klass, gts_graph_class ())) { gts_file_error (fp, "class `%s' is not a GtsGraphClass", fp->token->str); return NULL; } g = GTS_GRAPH (gts_object_new (klass)); g->graph_class = GTS_GRAPH_CLASS (klass); gts_file_next_token (fp); (* klass->read) ((GtsObject **) &g, fp); if (fp->type == GTS_ERROR) { gts_object_destroy (GTS_OBJECT (g)); return NULL; } } else g = GTS_GRAPH (gts_object_new (GTS_OBJECT_CLASS (gts_graph_class ()))); gts_file_first_token_after (fp, '\n'); if (nn <= 0) return g; nodes = g_malloc ((nn + 1)*sizeof (GtsGNode *)); n = 0; while (n < nn && fp->type != GTS_ERROR) { GtsObject * new_node = gts_object_new (GTS_OBJECT_CLASS (g->node_class)); gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (new_node)); if (GTS_OBJECT_CLASS (g->node_class)->read) (*GTS_OBJECT_CLASS (g->node_class)->read) (&new_node, fp); gts_file_first_token_after (fp, '\n'); nodes[n++] = GTS_GNODE (new_node); } if (fp->type == GTS_ERROR) nn = n; n = 0; while (n < ne && fp->type != GTS_ERROR) { guint n1, n2; if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (first node index)"); else { n1 = atoi (fp->token->str); if (n1 == 0 || n1 > nn) gts_file_error (fp, "node index `%d' is out of range `[1,%d]'", n1, nn); else { gts_file_next_token (fp); if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (second node index)"); else { n2 = atoi (fp->token->str); if (n2 == 0 || n2 > nn) gts_file_error (fp, "node index `%d' is out of range `[1,%d]'", n2, nn); else { GtsGEdge * new_edge = gts_gedge_new (g->edge_class, nodes[n1 - 1], nodes [n2 - 1]); gts_file_next_token (fp); if (fp->type != '\n') if (GTS_OBJECT_CLASS (g->edge_class)->read) (*GTS_OBJECT_CLASS (g->edge_class)->read) ((GtsObject **) &new_edge, fp); if (++n < ne) gts_file_first_token_after (fp, '\n'); } } } } } if (fp->type == GTS_ERROR) { gts_allow_floating_gnodes = TRUE; while (nn) gts_object_destroy (GTS_OBJECT (nodes[nn-- - 1])); gts_allow_floating_gnodes = FALSE; } g_free (nodes); if (fp->type == GTS_ERROR) { gts_object_destroy (GTS_OBJECT (g)); return NULL; } return g; } static void write_dot_node (GtsGNode * node, gpointer * data) { FILE * fp = data[0]; guint * nnode = data[1]; fprintf (fp, " n%u", *nnode); if (GTS_GNODE_CLASS (GTS_OBJECT (node)->klass)->write) { fputs (" [", fp); (* GTS_GNODE_CLASS (GTS_OBJECT (node)->klass)->write) (node, fp); fputc (']', fp); } fputs (";\n", fp); GTS_OBJECT (node)->reserved = GUINT_TO_POINTER ((*nnode)++); } static void write_dot_edge (GtsGEdge * edge, FILE * fp) { fprintf (fp, " n%u -> n%u", GPOINTER_TO_UINT (GTS_OBJECT (edge->n1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (edge->n2)->reserved)); if (GTS_GEDGE_CLASS (GTS_OBJECT (edge)->klass)->write) { fputs (" [", fp); (* GTS_GEDGE_CLASS (GTS_OBJECT (edge)->klass)->write) (edge, fp); fputc (']', fp); } fputs (";\n", fp); } /** * gts_graph_write_dot: * @g: a #GtsGraph. * @fp: a file pointer. * * Writes in the file @fp an ASCII representation of @g in the dot format of * AT&T Bell Labs. */ void gts_graph_write_dot (GtsGraph * g, FILE * fp) { guint nnode = 1; gpointer data[2]; g_return_if_fail (g != NULL); g_return_if_fail (fp != NULL); fprintf (fp, "digraph \"%p\" {\n", g); data[0] = fp; data[1] = &nnode; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) write_dot_node, data); gts_graph_foreach_edge (g, (GtsFunc) write_dot_edge, fp); fputs ("}\n", fp); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) gts_object_reset_reserved, NULL); } /* GtsWGraph */ static gfloat wgraph_weight (GtsGraph * g) { return GTS_WGRAPH (g)->weight; } static void wgraph_add (GtsContainer * g, GtsContainee * n) { GtsWGraph * wg = GTS_WGRAPH (g); gfloat w = gts_gnode_weight (GTS_GNODE (n)); wg->weight += w; (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_wgraph_class ())->parent_class)->add) (g, n); } static void wgraph_remove (GtsContainer * g, GtsContainee * n) { GTS_WGRAPH (g)->weight -= gts_gnode_weight (GTS_GNODE (n)); (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_wgraph_class ())->parent_class)->remove) (g, n); } static void wgraph_class_init (GtsWGraphClass * klass) { GTS_GRAPH_CLASS (klass)->weight = wgraph_weight; GTS_CONTAINER_CLASS (klass)->add = wgraph_add; GTS_CONTAINER_CLASS (klass)->remove = wgraph_remove; } static void wgraph_init (GtsWGraph * g) { g->weight = 0.; } /** * gts_wgraph_class: * * Returns: the #GtsWGraphClass. */ GtsWGraphClass * gts_wgraph_class (void) { static GtsWGraphClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo wgraph_info = { "GtsWGraph", sizeof (GtsWGraph), sizeof (GtsWGraphClass), (GtsObjectClassInitFunc) wgraph_class_init, (GtsObjectInitFunc) wgraph_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_graph_class ()), &wgraph_info); } return klass; } static void weight_max (GtsGNode * n, gfloat * wmax) { gfloat w = gts_gnode_weight (n); if (w > *wmax) *wmax = w; } /** * gts_wgraph_weight_max: * @wg: a #GtsWGraph. * * Returns: the maximum weight of any vertices belonging to @g. */ gfloat gts_wgraph_weight_max (GtsWGraph * wg) { gfloat wmax = - G_MAXFLOAT; g_return_val_if_fail (wg != NULL, 0.); gts_container_foreach (GTS_CONTAINER (wg), (GtsFunc) weight_max, &wmax); return wmax; } /* Surface graph */ static void create_node (GtsFace * f, GtsGraph * graph) { GtsFNode * fn = gts_fnode_new (gts_fnode_class (), f); gts_container_add (GTS_CONTAINER (graph), GTS_CONTAINEE (fn)); GTS_OBJECT (f)->reserved = fn; } static void create_edge (GtsEdge * e, GtsSurface * s) { GSList * i = e->triangles; while (i) { GtsFace * f = i->data; if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s)) { GSList * j = i->next; while (j) { GtsFace * f1 = j->data; if (GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s)) gts_pgedge_new (gts_pgedge_class (), GTS_OBJECT (f)->reserved, GTS_OBJECT (f1)->reserved, e); j = j->next; } } i = i->next; } } /** * gts_surface_graph_new: * @klass: a #GtsGraphClass. * @s: a #GtsSurface. * * Returns: a new #GtsGraph representing the connectivity of the faces * of @s. This graph uses #GtsFGNode as nodes which allows to store * the dependencies between nodes and faces of @s. */ GtsGraph * gts_surface_graph_new (GtsGraphClass * klass, GtsSurface * s) { GtsGraph * graph; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (s != NULL, NULL); graph = GTS_GRAPH (gts_object_new (GTS_OBJECT_CLASS (klass))); gts_surface_foreach_face (s, (GtsFunc) create_node, graph); gts_surface_foreach_edge (s, (GtsFunc) create_edge, s); gts_surface_foreach_face (s, (GtsFunc) gts_object_reset_reserved, NULL); return graph; } static void create_segment_edge (GtsSegment * s, GtsGraph * graph) { GtsGNode * n1 = GTS_OBJECT (s->v1)->reserved, * n2; if (n1 == NULL) { n1 = GTS_GNODE (gts_pnode_new (gts_pnode_class (), s->v1)); gts_container_add (GTS_CONTAINER (graph), GTS_CONTAINEE (n1)); GTS_OBJECT (s->v1)->reserved = n1; } n2 = GTS_OBJECT (s->v2)->reserved; if (n2 == NULL) { n2 = GTS_GNODE (gts_pnode_new (gts_pnode_class (), s->v2)); gts_container_add (GTS_CONTAINER (graph), GTS_CONTAINEE (n2)); GTS_OBJECT (s->v2)->reserved = n2; } gts_pgedge_new (gts_pgedge_class (), n1, n2, s); } static void reset_reserved (GtsSegment * s) { GTS_OBJECT (s->v1)->reserved = GTS_OBJECT (s->v2)->reserved = NULL; } /** * gts_segments_graph_new: * @klass: a #GtsGraphClass. * @segments: a list of #GtsSegment. * * Returns: a new #GtsGraph representing the connectivity of the segments * in @segments. */ GtsGraph * gts_segments_graph_new (GtsGraphClass * klass, GSList * segments) { GtsGraph * graph; g_return_val_if_fail (klass != NULL, NULL); graph = GTS_GRAPH (gts_object_new (GTS_OBJECT_CLASS (klass))); g_slist_foreach (segments, (GFunc) create_segment_edge, graph); g_slist_foreach (segments, (GFunc) reset_reserved, NULL); return graph; } static void add_to_surface (GtsGNode * n, GtsSurface * s) { if (GTS_IS_FNODE (n)) gts_surface_add_face (s, GTS_FNODE (n)->f); } /** * gts_surface_graph_surface: * @surface_graph: a #GtsGraph using #GtsFGNode as nodes. * @s: a #GtsSurface. * * Returns: a new #GtsSurface using the same classes as @s and * composed of the faces defined by @surface_graph. */ GtsSurface * gts_surface_graph_surface (GtsGraph * surface_graph, GtsSurface * s) { GtsSurface * s1; g_return_val_if_fail (surface_graph != NULL, NULL); g_return_val_if_fail (s != NULL, NULL); s1 = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass), s->face_class, s->edge_class, s->vertex_class); gts_container_foreach (GTS_CONTAINER (surface_graph), (GtsFunc) add_to_surface, s1); return s1; } gts-snapshot-121130/src/segment.c0000644000175100017510000001414412055775440013572 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" static void segment_destroy (GtsObject * object) { GtsSegment * segment = GTS_SEGMENT (object); GtsVertex * v1 = segment->v1; GtsVertex * v2 = segment->v2; v1->segments = g_slist_remove (v1->segments, segment); if (!GTS_OBJECT_DESTROYED (v1) && !gts_allow_floating_vertices && v1->segments == NULL) gts_object_destroy (GTS_OBJECT (v1)); v2->segments = g_slist_remove (v2->segments, segment); if (!GTS_OBJECT_DESTROYED (v2) && !gts_allow_floating_vertices && v2->segments == NULL) gts_object_destroy (GTS_OBJECT (v2)); (* GTS_OBJECT_CLASS (gts_segment_class ())->parent_class->destroy) (object); } static void segment_class_init (GtsObjectClass * klass) { klass->destroy = segment_destroy; } static void segment_init (GtsSegment * segment) { segment->v1 = segment->v2 = NULL; } /** * gts_segment_class: * * Returns: the #GtsSegmentClass. */ GtsSegmentClass * gts_segment_class (void) { static GtsSegmentClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo segment_info = { "GtsSegment", sizeof (GtsSegment), sizeof (GtsSegmentClass), (GtsObjectClassInitFunc) segment_class_init, (GtsObjectInitFunc) segment_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &segment_info); } return klass; } /** * gts_segment_new: * @klass: a #GtsSegmentClass. * @v1: a #GtsVertex. * @v2: another #GtsVertex different from @v1. * * Returns: a new #GtsSegment linking @v1 and @v2. */ GtsSegment * gts_segment_new (GtsSegmentClass * klass, GtsVertex * v1, GtsVertex * v2) { GtsSegment * s; g_return_val_if_fail (v1 != NULL, NULL); g_return_val_if_fail (v2 != NULL, NULL); g_return_val_if_fail (v1 != v2, NULL); s = GTS_SEGMENT (gts_object_new (GTS_OBJECT_CLASS (klass))); s->v1 = v1; s->v2 = v2; v1->segments = g_slist_prepend (v1->segments, s); v2->segments = g_slist_prepend (v2->segments, s); return s; } /** * gts_segment_is_duplicate: * @s: a #GtsSegment. * * Returns: the first #GtsSegment different from @s which shares the * same endpoints or %NULL if there is none. */ GtsSegment * gts_segment_is_duplicate (GtsSegment * s) { GSList * i; GtsVertex * v2; g_return_val_if_fail (s != NULL, NULL); v2 = s->v2; i = s->v1->segments; if (s->v1 == v2) /* s is degenerate: special treatment */ while (i) { GtsSegment * s1 = i->data; if (s1 != s && s1->v1 == v2 && s1->v2 == v2) return s1; i = i->next; } else /* s is not degenerate */ while (i) { GtsSegment * s1 = i->data; if (s1 != s && (s1->v1 == v2 || s1->v2 == v2)) return s1; i = i->next; } return NULL; } /** * gts_segments_are_intersecting: * @s1: a #GtsSegment. * @s2: a #GtsSegment. * * Returns: %GTS_IN if @s1 and @s2 are intersecting, %GTS_ON if one of the * endpoints of @s1 (resp. @s2) lies on @s2 (resp. @s1), %GTS_OUT otherwise. */ GtsIntersect gts_segments_are_intersecting (GtsSegment * s1, GtsSegment * s2) { GtsPoint * p1, * p2, * p3, * p4; gdouble d1, d2, d3, d4; g_return_val_if_fail (s1 != NULL && s2 != NULL, FALSE); p1 = GTS_POINT (s1->v1); p2 = GTS_POINT (s1->v2); p3 = GTS_POINT (s2->v1); p4 = GTS_POINT (s2->v2); d1 = gts_point_orientation (p1, p2, p3); d2 = gts_point_orientation (p1, p2, p4); if ((d1 > 0.0 && d2 > 0.0) || (d1 < 0.0 && d2 < 0.0)) return GTS_OUT; d3 = gts_point_orientation (p3, p4, p1); d4 = gts_point_orientation (p3, p4, p2); if ((d3 > 0.0 && d4 > 0.0) || (d3 < 0.0 && d4 < 0.0)) return GTS_OUT; if (d1 == 0.0 || d2 == 0.0 || d3 == 0.0 || d4 == 0.0) return GTS_ON; return GTS_IN; } /** * gts_segment_midvertex: * @s: a #GtsSegment. * @klass: a #GtsVertexClass to be used for the new vertex. * * Returns: a new #GtsVertex, midvertex of @s. */ GtsVertex * gts_segment_midvertex (GtsSegment * s, GtsVertexClass * klass) { GtsPoint * p1, * p2; g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); return gts_vertex_new (klass, (p1->x + p2->x)/2., (p1->y + p2->y)/2., (p1->z + p2->z)/2.); } /** * gts_segments_from_vertices: * @vertices: a list of #GtsVertex. * * Returns: a list of unique #GtsSegment which have one of their vertices in * @vertices. */ GSList * gts_segments_from_vertices (GSList * vertices) { GHashTable * hash; GSList * segments = NULL, * i; hash = g_hash_table_new (NULL, NULL); i = vertices; while (i) { GSList * j = GTS_VERTEX (i->data)->segments; while (j) { GtsSegment * s = j->data; if (g_hash_table_lookup (hash, s) == NULL) { segments = g_slist_prepend (segments, s); g_hash_table_insert (hash, s, i); } j = j->next; } i = i->next; } g_hash_table_destroy (hash); return segments; } /** * gts_segment_is_ok: * @s: a #GtsSegment. * * Returns: %TRUE if @s is not degenerate (i.e. @s->v1 != @s->v2) and not * duplicate, %FALSE otherwise. */ gboolean gts_segment_is_ok (GtsSegment * s) { g_return_val_if_fail (s != NULL, FALSE); g_return_val_if_fail (s->v1 != s->v2, FALSE); g_return_val_if_fail (!gts_segment_is_duplicate (s), FALSE); g_return_val_if_fail (GTS_OBJECT (s)->reserved == NULL, FALSE); return TRUE; } gts-snapshot-121130/src/refine.c0000644000175100017510000003161012055775440013375 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" /** * gts_vertex_encroaches_edge: * @v: a #GtsVertex. * @e: a #GtsEdge. * * Returns: %TRUE if @v is strictly contained in the diametral circle of @e, * %FALSE otherwise. */ gboolean gts_vertex_encroaches_edge (GtsVertex * v, GtsEdge * e) { GtsPoint * p, * p1, * p2; g_return_val_if_fail (v != NULL, FALSE); g_return_val_if_fail (e != NULL, FALSE); p = GTS_POINT (v); p1 = GTS_POINT (GTS_SEGMENT (e)->v1); p2 = GTS_POINT (GTS_SEGMENT (e)->v2); if ((p1->x - p->x)*(p2->x - p->x) + (p1->y - p->y)*(p2->y - p->y) < 0.0) return TRUE; return FALSE; } /** * gts_edge_is_encroached: * @e: a #GtsEdge. * @s: a #GtsSurface describing a (constrained) Delaunay triangulation. * @encroaches: a #GtsEncroachFunc. * @data: user data to be passed to @encroaches. * * Returns: a #GtsVertex belonging to @s and encroaching upon @e * (as defined by @encroaches) or %NULL if there is none. */ GtsVertex * gts_edge_is_encroached (GtsEdge * e, GtsSurface * s, GtsEncroachFunc encroaches, gpointer data) { GSList * i; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (encroaches != NULL, NULL); i = e->triangles; while (i) { GtsFace * f = i->data; if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s)) { GtsVertex * v = gts_triangle_vertex_opposite (GTS_TRIANGLE (f), e); if ((* encroaches) (v, e, s, data)) return v; } i = i->next; } return NULL; } #define ALREADY_ENCROACHED(c) (GTS_OBJECT (c)->reserved) static void vertex_encroaches (GtsVertex * v, GtsSurface * surface, GtsFifo * encroached, GtsEncroachFunc encroaches, gpointer data) { GSList * triangles, * i; g_return_if_fail (v != NULL); g_return_if_fail (surface != NULL); g_return_if_fail (encroached != NULL); g_return_if_fail (encroaches != NULL); i = triangles = gts_vertex_triangles (v, NULL); while (i) { GtsFace * f = i->data; if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, surface)) { GtsEdge * e = gts_triangle_edge_opposite (i->data, v); if (!ALREADY_ENCROACHED (e) && GTS_IS_CONSTRAINT (e) && (* encroaches) (v, e, surface, data)) { gts_fifo_push (encroached, e); ALREADY_ENCROACHED (e) = encroached; } } i = i->next; } g_slist_free (triangles); } static void make_encroached_fifo (GtsEdge * e, gpointer * datas) { GtsFifo * fifo = datas[0]; GtsSurface * s = datas[1]; GtsEncroachFunc encroaches = (GtsEncroachFunc) datas[2]; gpointer data = datas[3]; if (GTS_IS_CONSTRAINT (e) && gts_edge_is_encroached (e, s, encroaches, data)) { gts_fifo_push (fifo, e); ALREADY_ENCROACHED (e) = fifo; } } #define SQUARE_ROOT_TWO 1.41421356237309504880168872420969807856967187 #define DISTANCE_2D(v1, v2) (sqrt ((GTS_POINT (v2)->x - GTS_POINT (v1)->x)*\ (GTS_POINT (v2)->x - GTS_POINT (v1)->x) +\ (GTS_POINT (v2)->y - GTS_POINT (v1)->y)*\ (GTS_POINT (v2)->y - GTS_POINT (v1)->y))) /* finds where to split the given edge to avoid infinite cycles. (see Shewchuk's thesis for details */ static GtsVertex * split_edge (GtsEdge * e, GtsSurface * surface) { GSList * i = e->triangles; GtsEdge * c = NULL; /* look for constraints touching e */ while (i && !c) { GtsTriangle * t = i->data; if (GTS_IS_FACE (t) && gts_face_has_parent_surface (GTS_FACE (t), surface)) { GtsEdge * e1, * e2; if (t->e1 == e) { e1 = t->e2; e2 = t->e3; } else if (t->e2 == e) { e1 = t->e1; e2 = t->e3; } else { e1 = t->e1; e2 = t->e2; } if (GTS_IS_CONSTRAINT (e1) && !GTS_IS_CONSTRAINT (e2)) c = e1; else if (GTS_IS_CONSTRAINT (e2) && !GTS_IS_CONSTRAINT (e1)) c = e2; } i = i->next; } if (c) { /* use power of two concentric shells */ GtsVertex * v1 = GTS_SEGMENT (e)->v1; GtsVertex * v2 = GTS_SEGMENT (e)->v2; gdouble l = DISTANCE_2D (v1, v2); gdouble nearestpower = 1., split; while (l > SQUARE_ROOT_TWO*nearestpower) nearestpower *= 2.; while (l < SQUARE_ROOT_TWO*nearestpower/2.) nearestpower /= 2.; split = nearestpower/l/2.; if (GTS_SEGMENT (c)->v1 == v2 || GTS_SEGMENT (c)->v2 == v2) split = 1. - split; return gts_vertex_new (surface->vertex_class, (1. - split)*GTS_POINT (v1)->x + split*GTS_POINT (v2)->x, (1. - split)*GTS_POINT (v1)->y + split*GTS_POINT (v2)->y, (1. - split)*GTS_POINT (v1)->z + split*GTS_POINT (v2)->z); } else return gts_segment_midvertex (GTS_SEGMENT (e), surface->vertex_class); } static gint split_encroached (GtsSurface * surface, GtsFifo * encroached, gint steiner_max, GtsEncroachFunc encroaches, gpointer data) { GtsSegment * s; while (steiner_max-- != 0 && (s = gts_fifo_pop (encroached))) { GtsVertex * v = split_edge (GTS_EDGE (s), surface); GtsFace * boundary = gts_edge_is_boundary (GTS_EDGE (s), surface); GtsFace * f = boundary; #if 1 GtsEdge * e1 = GTS_EDGE (gts_object_clone (GTS_OBJECT (s))); GtsEdge * e2 = GTS_EDGE (gts_object_clone (GTS_OBJECT (s))); GTS_SEGMENT (e1)->v1 = s->v1; s->v1->segments = g_slist_prepend (s->v1->segments, e1); GTS_SEGMENT (e1)->v2 = v; v->segments = g_slist_prepend (v->segments, e1); GTS_SEGMENT (e2)->v1 = v; v->segments = g_slist_prepend (v->segments, e2); GTS_SEGMENT (e2)->v2 = s->v2; s->v2->segments = g_slist_prepend (s->v2->segments, e2); #else GtsEdge * e1 = gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (s)->klass), s->v1, v); GtsEdge * e2 = gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (s)->klass), v, s->v2); #endif GTS_OBJECT (s)->klass = GTS_OBJECT_CLASS (surface->edge_class); if (f == NULL) g_assert ((f = gts_edge_has_parent_surface (GTS_EDGE (s), surface))); g_assert (gts_delaunay_add_vertex_to_face (surface, v, f) == NULL); if (boundary) gts_object_destroy (GTS_OBJECT (s)); vertex_encroaches (v, surface, encroached, encroaches, data); if (gts_edge_is_encroached (e1, surface, encroaches, data)) { gts_fifo_push (encroached, e1); ALREADY_ENCROACHED (e1) = encroached; } if (gts_edge_is_encroached (e2, surface, encroaches, data)) { gts_fifo_push (encroached, e2); ALREADY_ENCROACHED (e2) = encroached; } } return steiner_max; } /** * gts_delaunay_conform: * @surface: a #GtsSurface describing a constrained Delaunay triangulation. * @steiner_max: maximum number of Steiner points. * @encroaches: a #GtsEncroachFunc. * @data: user-data to pass to @encroaches. * * Recursively split constraints of @surface which are encroached by * vertices of @surface (see Shewchuk 96 for details). The split * constraints are destroyed and replaced by a set of new constraints * of the same class. If gts_vertex_encroaches_edge() is used for * @encroaches, the resulting surface will be Delaunay conforming. * * If @steiner_max is positive or nul, the recursive splitting * procedure will stop when this maximum number of Steiner points is * reached. In that case the resulting surface will not necessarily be * Delaunay conforming. * * Returns: the number of remaining encroached edges. If @steiner_max * is set to a negative value and gts_vertex_encroaches_edge() is used * for @encroaches this should always be zero. */ guint gts_delaunay_conform (GtsSurface * surface, gint steiner_max, GtsEncroachFunc encroaches, gpointer data) { GtsFifo * encroached; gpointer datas[4]; guint encroached_number; g_return_val_if_fail (surface != NULL, 0); g_return_val_if_fail (surface != NULL, 0); g_return_val_if_fail (encroaches != NULL, 0); datas[0] = encroached = gts_fifo_new (); datas[1] = surface; datas[2] = encroaches; datas[3] = data; gts_surface_foreach_edge (surface, (GtsFunc) make_encroached_fifo, datas); split_encroached (surface, encroached, steiner_max, encroaches, data); gts_fifo_foreach (encroached, (GtsFunc) gts_object_reset_reserved, NULL); encroached_number = gts_fifo_size (encroached); gts_fifo_destroy (encroached); return encroached_number; } #define EHEAP_PAIR(f) (GTS_OBJECT (f)->reserved) static void heap_surface_add_face (GtsSurface * s, GtsFace * f) { GtsEHeap * heap = GTS_OBJECT (s)->reserved; gdouble key = gts_eheap_key (heap, f); if (key != 0.) EHEAP_PAIR (f) = gts_eheap_insert_with_key (heap, f, key); if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->add_face) (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->add_face) (s, f); } static void heap_surface_remove_face (GtsSurface * s, GtsFace * f) { GtsEHeap * heap = GTS_OBJECT (s)->reserved; if (EHEAP_PAIR (f)) gts_eheap_remove (heap, EHEAP_PAIR (f)); if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->remove_face) (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->remove_face) (s, f); } static void heap_surface_class_init (GtsSurfaceClass * klass) { klass->add_face = heap_surface_add_face; klass->remove_face = heap_surface_remove_face; } static GtsObjectClass * heap_surface_class_new (GtsObjectClass * parent_class) { GtsObjectClassInfo heap_surface_info; heap_surface_info = parent_class->info; heap_surface_info.class_init_func = (GtsObjectClassInitFunc) heap_surface_class_init; return gts_object_class_new (parent_class, &heap_surface_info); } static void make_face_heap (GtsFace * f, GtsEHeap * heap) { gdouble key = gts_eheap_key (heap, f); if (key != 0.) EHEAP_PAIR (f) = gts_eheap_insert_with_key (heap, f, key); } /** * gts_delaunay_refine: * @surface: a #GtsSurface describing a conforming Delaunay triangulation. * @steiner_max: maximum number of Steiner points. * @encroaches: a #GtsEncroachFunc. * @encroach_data: user-data to pass to @encroaches. * @cost: a #GtsKeyFunc used to sort the faces during refinement. * @cost_data: user-data to pass to @cost. * * An implementation of the refinement algorithm described in Ruppert * (1995) and Shewchuk (1996). * * Returns: the number of unrefined faces of @surface left. Should be zero * if @steiner_max is set to a negative value. */ guint gts_delaunay_refine (GtsSurface * surface, gint steiner_max, GtsEncroachFunc encroaches, gpointer encroach_data, GtsKeyFunc cost, gpointer cost_data) { GtsObjectClass * heap_surface_class; GtsObjectClass * original_class; GtsEHeap * heap; GtsFifo * encroached; GtsFace * f; guint unrefined_number; g_return_val_if_fail (surface != NULL, 0); g_return_val_if_fail (encroaches != NULL, 0); g_return_val_if_fail (cost != NULL, 0); original_class = GTS_OBJECT (surface)->klass; heap_surface_class = heap_surface_class_new (original_class); GTS_OBJECT (surface)->klass = heap_surface_class; heap = gts_eheap_new (cost, cost_data); gts_surface_foreach_face (surface, (GtsFunc) make_face_heap, heap); encroached = gts_fifo_new (); GTS_OBJECT (surface)->reserved = heap; while (steiner_max-- != 0 && (f = gts_eheap_remove_top (heap, NULL))) { GtsVertex * c = GTS_VERTEX (gts_triangle_circumcircle_center (GTS_TRIANGLE (f), GTS_POINT_CLASS (surface->vertex_class))); EHEAP_PAIR (f) = NULL; g_assert (c != NULL); g_assert (gts_delaunay_add_vertex (surface, c, f) == NULL); vertex_encroaches (c, surface, encroached, encroaches, encroach_data); if (!gts_fifo_is_empty (encroached)) { gts_delaunay_remove_vertex (surface, c); steiner_max = split_encroached (surface, encroached, steiner_max, encroaches, encroach_data); } } unrefined_number = gts_eheap_size (heap); gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL); gts_eheap_destroy (heap); gts_fifo_foreach (encroached, (GtsFunc) gts_object_reset_reserved, NULL); gts_fifo_destroy (encroached); GTS_OBJECT (surface)->klass = original_class; GTS_OBJECT (surface)->reserved = NULL; g_free (heap_surface_class); return unrefined_number; } gts-snapshot-121130/src/oocs.c0000644000175100017510000002446112055775440013076 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void cluster_destroy (GtsObject * object) { GtsCluster * c = GTS_CLUSTER (object); if (c->v && gts_vertex_is_unattached (c->v)) gts_object_destroy (GTS_OBJECT (c->v)); /* do not forget to call destroy method of the parent */ (* GTS_OBJECT_CLASS (gts_cluster_class ())->parent_class->destroy) (object); } static void cluster_add (GtsCluster * c, GtsPoint * p, gpointer data) { GtsPoint * cp; g_return_if_fail (c != NULL); g_return_if_fail (c->v != NULL); g_return_if_fail (p != NULL); cp = GTS_POINT (c->v); cp->x += p->x; cp->y += p->y; cp->z += p->z; c->n++; } static void cluster_update (GtsCluster * c) { GtsPoint * p; g_return_if_fail (c != NULL); g_return_if_fail (c->v != NULL); if (c->n > 1) { p = GTS_POINT (c->v); p->x /= c->n; p->y /= c->n; p->z /= c->n; } } static void cluster_class_init (GtsClusterClass * klass) { klass->add = cluster_add; klass->update = cluster_update; GTS_OBJECT_CLASS (klass)->destroy = cluster_destroy; } static void cluster_init (GtsCluster * c) { c->v = NULL; c->n = 0; } /** * gts_cluster_class: * * Returns: the #GtsClusterClass. */ GtsClusterClass * gts_cluster_class (void) { static GtsClusterClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo cluster_info = { "GtsCluster", sizeof (GtsCluster), sizeof (GtsClusterClass), (GtsObjectClassInitFunc) cluster_class_init, (GtsObjectInitFunc) cluster_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &cluster_info); } return klass; } /** * gts_cluster_new: * @klass: a #GtsClusterClass. * @id: the id of the new cluster. * @vklass: a #GtsVertexClass for the representative vertex of the cluster. * * Returns: a new #GtsCluster. */ GtsCluster * gts_cluster_new (GtsClusterClass * klass, GtsClusterId id, GtsVertexClass * vklass) { GtsCluster * c; c = GTS_CLUSTER (gts_object_new (GTS_OBJECT_CLASS (klass))); c->id = id; c->v = gts_vertex_new (vklass, 0., 0., 0.); return c; } /** * gts_cluster_add: * @c: a #GtsCluster. * @p: a #GtsPoint. * @data: data to pass to the add() virtual method of #GtsClusterClass. * * Adds point @p to cluster @c. */ void gts_cluster_add (GtsCluster * c, GtsPoint * p, gpointer data) { g_return_if_fail (c != NULL); g_return_if_fail (p != NULL); (* GTS_CLUSTER_CLASS (GTS_OBJECT (c)->klass)->add) (c, p, data); } /** * gts_cluster_update: * @c: a #GtsCluster. * * Updates the position of the vertex representative of all the * vertices added to @c. */ void gts_cluster_update (GtsCluster * c) { g_return_if_fail (c != NULL); (* GTS_CLUSTER_CLASS (GTS_OBJECT (c)->klass)->update) (c); } static void destroy_cluster (GtsClusterId * id, GtsObject * cluster) { gts_object_destroy (cluster); } static void cluster_grid_destroy (GtsObject * object) { GtsClusterGrid * cluster_grid = GTS_CLUSTER_GRID (object); g_hash_table_foreach (cluster_grid->clusters, (GHFunc) destroy_cluster, NULL); g_hash_table_destroy (cluster_grid->clusters); (* GTS_OBJECT_CLASS (gts_cluster_grid_class ())->parent_class->destroy) (object); } static void cluster_grid_class_init (GtsClusterGridClass * klass) { GTS_OBJECT_CLASS (klass)->destroy = cluster_grid_destroy; } static gint cluster_id_equal (gconstpointer v1, gconstpointer v2) { const GtsClusterId * id1 = (const GtsClusterId *) v1; const GtsClusterId * id2 = (const GtsClusterId *) v2; return ((id1->x == id2->x) && (id1->y == id2->y) && (id1->z == id2->z)); } static guint cluster_id_hash (gconstpointer key) { const GtsClusterId * id = (const GtsClusterId *) key; return id->x + id->y + id->z; } static void cluster_grid_init (GtsClusterGrid * cluster_grid) { cluster_grid->surface = NULL; cluster_grid->bbox = NULL; cluster_grid->cluster_class = gts_cluster_class (); cluster_grid->clusters = g_hash_table_new (cluster_id_hash, cluster_id_equal); } /** * gts_cluster_grid_class: * * Returns: the #GtsClusterGridClass. */ GtsClusterGridClass * gts_cluster_grid_class (void) { static GtsClusterGridClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo cluster_grid_info = { "GtsClusterGrid", sizeof (GtsClusterGrid), sizeof (GtsClusterGridClass), (GtsObjectClassInitFunc) cluster_grid_class_init, (GtsObjectInitFunc) cluster_grid_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &cluster_grid_info); } return klass; } /** * gts_cluster_grid_new: * @klass: a #GtsClusterGridClass. * @cluster_class: the klass to be used for the vertex clusters. * @s: the simplified surface. * @bbox: bounding box of the surface to be simplified. * @delta: the size of one grid cell of the simplification grid. * * Returns: a new #GtsClusterGrid. */ GtsClusterGrid * gts_cluster_grid_new (GtsClusterGridClass * klass, GtsClusterClass * cluster_class, GtsSurface * s, GtsBBox * bbox, gdouble delta) { GtsClusterGrid * cluster_grid; GtsVector size; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (cluster_class != NULL, NULL); g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (bbox != NULL, NULL); g_return_val_if_fail (delta > 0., NULL); size[0] = ceil ((bbox->x2 - bbox->x1)/delta); size[1] = ceil ((bbox->y2 - bbox->y1)/delta); size[2] = ceil ((bbox->z2 - bbox->z1)/delta); g_return_val_if_fail (size[0] <= 2.*G_MAXINT + 2. && size[1] <= 2.*G_MAXINT + 2. && size[2] <= 2.*G_MAXINT + 2., NULL); cluster_grid = GTS_CLUSTER_GRID (gts_object_new (GTS_OBJECT_CLASS (klass))); cluster_grid->cluster_class = cluster_class; cluster_grid->surface = s; cluster_grid->bbox = bbox; cluster_grid->size[0] = size[0]; cluster_grid->size[1] = size[1]; cluster_grid->size[2] = size[2]; return cluster_grid; } static GtsClusterId cluster_index (GtsPoint * p, GtsBBox * bb, GtsVector n) { GtsClusterId id = {0, 0, 0}; g_return_val_if_fail (p->x >= bb->x1 && p->x <= bb->x2, id); g_return_val_if_fail (p->y >= bb->y1 && p->y <= bb->y2, id); g_return_val_if_fail (p->z >= bb->z1 && p->z <= bb->z2, id); id.x = (guint) (p->x == bb->x2 ? n[0] - 1. : n[0]*(p->x - bb->x1)/(bb->x2 - bb->x1)); id.y = (guint) (p->y == bb->y2 ? n[1] - 1. : n[1]*(p->y - bb->y1)/(bb->y2 - bb->y1)); id.z = (guint) (p->z == bb->z2 ? n[2] - 1. : n[2]*(p->z - bb->z1)/(bb->z2 - bb->z1)); return id; } static GtsCluster * cluster_grid_add_point (GtsClusterGrid * cluster_grid, GtsPoint * p, gpointer data) { GtsClusterId id = cluster_index (p, cluster_grid->bbox, cluster_grid->size); GtsCluster * c = g_hash_table_lookup (cluster_grid->clusters, &id); if (c == NULL) { c = gts_cluster_new (cluster_grid->cluster_class, id, cluster_grid->surface->vertex_class); g_hash_table_insert (cluster_grid->clusters, &c->id, c); } gts_cluster_add (c, p, data); return c; } /** * gts_cluster_grid_add_triangle: * @cluster_grid: a #GtsClusterGrid. * @p1: a #GtsPoint. * @p2: a #GtsPoint. * @p3: a #GtsPoint. * @data: user data to pass to the cluster add() method. * * Adds the triangle defined by @p1, @p2 and @p3 to the respective clusters * of @cluster_grid. */ void gts_cluster_grid_add_triangle (GtsClusterGrid * cluster_grid, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, gpointer data) { GtsCluster * c1, * c2, * c3; g_return_if_fail (cluster_grid != NULL); g_return_if_fail (p1 != NULL); g_return_if_fail (p2 != NULL); g_return_if_fail (p3 != NULL); g_return_if_fail (cluster_grid->surface != NULL); c1 = cluster_grid_add_point (cluster_grid, p1, data); c2 = cluster_grid_add_point (cluster_grid, p2, data); c3 = cluster_grid_add_point (cluster_grid, p3, data); if (c1 != c2 && c2 != c3 && c3 != c1) { GtsVertex * v1, * v2, * v3; GtsEdge * e1, * e2, * e3; gboolean new_edge = FALSE; v1 = c1->v; v2 = c2->v; v3 = c3->v; if ((e1 = GTS_EDGE (gts_vertices_are_connected (v1, v2))) == NULL) { e1 = gts_edge_new (cluster_grid->surface->edge_class, v1, v2); new_edge = TRUE; } if ((e2 = GTS_EDGE (gts_vertices_are_connected (v2, v3))) == NULL) { e2 = gts_edge_new (cluster_grid->surface->edge_class, v2, v3); new_edge = TRUE; } if ((e3 = GTS_EDGE (gts_vertices_are_connected (v3, v1))) == NULL) { e3 = gts_edge_new (cluster_grid->surface->edge_class, v3, v1); new_edge = TRUE; } if (new_edge || !gts_triangle_use_edges (e1, e2, e3)) gts_surface_add_face (cluster_grid->surface, gts_face_new (cluster_grid->surface->face_class, e1, e2, e3)); } } static void update_cluster (gint * id, GtsCluster * cluster, GtsRange * stats) { gts_cluster_update (cluster); gts_range_add_value (stats, cluster->n); } /** * gts_cluster_grid_update: * @cluster_grid: a #GtsClusterGrid. * * Updates the representative vertices of all the clusters of @cluster_grid. * * Returns: a #GtsRange describing the statistics for the number of vertices * added to each cluster of @cluster_grid. */ GtsRange gts_cluster_grid_update (GtsClusterGrid * cluster_grid) { GtsRange stats; gts_range_init (&stats); g_return_val_if_fail (cluster_grid != NULL, stats); g_hash_table_foreach (cluster_grid->clusters, (GHFunc) update_cluster, &stats); gts_range_update (&stats); return stats; } gts-snapshot-121130/src/cdt.c0000644000175100017510000007634012055775440012710 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include "gts.h" #ifdef USE_SURFACE_BTREE static gint find_closest (GtsTriangle * t, gpointer value, gpointer * data) { guint * ns = data[2]; guint * n = data[3]; if (*n >= *ns) return TRUE; else { gdouble * dmin = data[0]; gpointer * closest = data[1]; GtsPoint * p = data[4]; if (gts_triangle_orientation (t) > 0.) { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); gdouble d = (p->x - p1->x)*(p->x - p1->x) + (p->y - p1->y)*(p->y - p1->y); if (d < *dmin) { *dmin = d; *closest = t; } (*n)++; } } return FALSE; } /* select the face closest to @p among n^1/3 randomly picked faces * of @surface */ static GtsFace * closest_face (GtsSurface * s, GtsPoint * p) { guint n = 0, nt, ns; gdouble dmin = G_MAXDOUBLE; GtsFace * closest = NULL; gpointer data[5]; nt = gts_surface_face_number (s); if (!nt) return NULL; ns = exp (log ((gdouble) nt)/3.); data[0] = &dmin; data[1] = &closest; data[2] = &ns; data[3] = &n; data[4] = p; g_tree_traverse (s->faces, (GTraverseFunc) find_closest, G_IN_ORDER, data); return closest; } #else /* not USE_SURFACE_BTREE */ # if GLIB_CHECK_VERSION(2,4,0) /* finally, with g_hash_table_find we are able to stop iteration over the hash table in the middle */ typedef struct _SFindClosest SFindClosest; struct _SFindClosest { gdouble dmin; GtsFace *closest; GtsPoint * p; gint stop; }; static gboolean find_closest (gpointer key, gpointer value, gpointer user_data) { SFindClosest * data = (SFindClosest *) user_data; GtsFace * f = GTS_FACE (value); if (gts_triangle_orientation (GTS_TRIANGLE (f)) > 0.) { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (GTS_TRIANGLE (f)->e1)->v1); gdouble d = ((data->p->x - p1->x)*(data->p->x - p1->x) + (data->p->y - p1->y)*(data->p->y - p1->y)); if (d < data->dmin) { data->dmin = d; data->closest = f; } } data->stop--; return !(data->stop > 0); } static GtsFace * closest_face (GtsSurface * s, GtsPoint * p) { SFindClosest fc; fc.dmin = G_MAXDOUBLE; fc.closest = NULL; fc.p = p; fc.stop = (gint) exp (log ((gdouble) g_hash_table_size (s->faces))/3.); g_hash_table_find (s->faces, find_closest, &fc); return fc.closest; } # else /* VERSION < 2.4.0 */ /* Due to an unkown reason g_hash_table_foreach does not allow to stop * the loop, hence the redefinition. I hope they don't change * the GHashTable, GHashNode structures ... */ typedef struct _GHashNode GHashNode; struct _GHashNode { gpointer key; gpointer value; GHashNode *next; }; struct _GHashTable { gint size; gint nnodes; guint frozen; GHashNode **nodes; GHashFunc hash_func; GCompareFunc key_compare_func; }; /* select the face closest to @p among n^1/3 randomly picked faces * of @surface */ static GtsFace * closest_face (GtsSurface * s, GtsPoint * p) { guint i, n, nt, ns; gdouble dmin = G_MAXDOUBLE; GtsFace * closest = NULL; GHashNode * node; GHashTable * hash_table = s->faces; nt = g_hash_table_size (hash_table); if (!nt) return NULL; ns = exp(log((gdouble) nt)/3.); for (i = 0, n = 0; i < hash_table->size && n < ns; i++) for (node = hash_table->nodes[i]; node && n < ns; node = node->next) { GtsFace * f = node->key; if (gts_triangle_orientation (GTS_TRIANGLE (f)) > 0.) { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (GTS_TRIANGLE (f)->e1)->v1); gdouble d = (p->x - p1->x)*(p->x - p1->x) + (p->y - p1->y)*(p->y - p1->y); if (d < dmin) { dmin = d; closest = f; } n++; } } return closest; } # endif /* VERSION < 2.4.0 */ #endif /* not USE_SURFACE_BTREE */ /* returns the face belonging to @surface and neighbor of @f via @e */ static GtsFace * neighbor (GtsFace * f, GtsEdge * e, GtsSurface * surface) { GSList * i = e->triangles; GtsTriangle * t = GTS_TRIANGLE (f); while (i) { GtsTriangle * t1 = i->data; if (t1 != t && GTS_IS_FACE (t1) && gts_face_has_parent_surface (GTS_FACE (t1), surface)) return GTS_FACE (t1); i = i->next; } return NULL; } /* given a triangle @t and a segment s (@o -> @p). @o must be in @t. Returns the edge of @t which is intersected by s or %NULL if @p is also contained in @t (on_summit is set to %FALSE) or if s intersects @t exactly on one of its summit (on_summit is set to %TRUE). */ static GtsEdge * triangle_next_edge (GtsTriangle * t, GtsPoint * o, GtsPoint * p, gboolean * on_summit) { GtsVertex * v1, * v2, * v3; GtsEdge * e1, * e2, * e3; gdouble orient = 0.0; gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3); *on_summit = FALSE; orient = gts_point_orientation (o, GTS_POINT (v1), p); if (orient > 0.0) { orient = gts_point_orientation (o, GTS_POINT (v2), p); if (orient > 0.0) { if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0) return NULL; return e2; } if (orient < 0.0) { if (gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p) >= 0.0) return NULL; return e1; } if (gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p) < 0.0) *on_summit = TRUE; return NULL; } if (orient < 0.0) { orient = gts_point_orientation (o, GTS_POINT (v3), p); if (orient > 0.0) { if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p) >= 0.0) return NULL; return e3; } if (orient < 0.0) { if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0) return NULL; return e2; } if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p) < 0.0) *on_summit = TRUE; return NULL; } if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) < 0.0) return e2; if (gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p) < 0.0) *on_summit = TRUE; return NULL; } static void triangle_barycenter (GtsTriangle * t, GtsPoint * b) { GtsPoint * p = GTS_POINT (gts_triangle_vertex (t)); b->x = (p->x + GTS_POINT (GTS_SEGMENT(t->e1)->v1)->x + GTS_POINT (GTS_SEGMENT(t->e1)->v2)->x)/3.; b->y = (p->y + GTS_POINT (GTS_SEGMENT(t->e1)->v1)->y + GTS_POINT (GTS_SEGMENT(t->e1)->v2)->y)/3.; } static GtsFace * point_locate (GtsPoint * o, GtsPoint * p, GtsFace * f, GtsSurface * surface) { GtsEdge * prev; gboolean on_summit; GtsVertex * v1, * v2, * v3; GtsEdge * e2, * e3; prev = triangle_next_edge (GTS_TRIANGLE (f), o, p, &on_summit); if (!prev) { GtsFace * f1; if (!on_summit) return f; /* p is inside f */ /* s intersects f exactly on a summit: restarts from a neighbor of f */ if ((f1 = neighbor (f, GTS_TRIANGLE (f)->e1, surface)) || (f1 = neighbor (f, GTS_TRIANGLE (f)->e2, surface)) || (f1 = neighbor (f, GTS_TRIANGLE (f)->e3, surface))) { triangle_barycenter (GTS_TRIANGLE (f1), o); return point_locate (o, p, f1, surface); } return NULL; } f = neighbor (f, prev, surface); if (f) gts_triangle_vertices_edges (GTS_TRIANGLE (f), prev, &v1, &v2, &v3, &prev, &e2, &e3); while (f) { gdouble orient = gts_point_orientation (o, GTS_POINT (v3), p); if (orient < 0.0) { if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0) return f; /* p is inside f */ f = neighbor (f, e2, surface); prev = e2; v1 = v3; } else if (orient > 0.0) { if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p) >= 0.0) return f; /* p is inside f */ f = neighbor (f, e3, surface); prev = e3; v2 = v3; } else { GtsFace * f1; if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0) return f; /* p is inside f */ /* s intersects f exactly on v3: restarts from a neighbor of f */ if ((f1 = neighbor (f, e2, surface)) || (f1 = neighbor (f, e3, surface))) { triangle_barycenter (GTS_TRIANGLE (f1), o); return point_locate (o, p, f1, surface); } return NULL; } /* update e2, e3, v3 for the new triangle */ if (f) { if (prev == GTS_TRIANGLE (f)->e1) { e2 = GTS_TRIANGLE (f)->e2; e3 = GTS_TRIANGLE (f)->e3; } else if (prev == GTS_TRIANGLE (f)->e2) { e2 = GTS_TRIANGLE (f)->e3; e3 = GTS_TRIANGLE (f)->e1; } else { e2 = GTS_TRIANGLE (f)->e1; e3 = GTS_TRIANGLE (f)->e2; } if (GTS_SEGMENT (e2)->v1 == v1 || GTS_SEGMENT (e2)->v1 == v2) v3 = GTS_SEGMENT (e2)->v2; else v3 = GTS_SEGMENT (e2)->v1; } } return NULL; } /** * gts_point_locate: * @p: a #GtsPoint. * @surface: a #GtsSurface. * @guess: %NULL or a face of @surface close to @p. * * Locates the face of the planar projection of @surface containing * @p. The planar projection of @surface must define a connected set * of triangles without holes and bounded by a convex boundary. The * algorithm is randomized and performs in O(n^1/3) expected time * where n is the number of triangles of @surface. * * If a good @guess is given the point location can be significantly faster. * * Returns: a #GtsFace of @surface containing @p or %NULL if @p is not * contained within the boundary of @surface. */ GtsFace * gts_point_locate (GtsPoint * p, GtsSurface * surface, GtsFace * guess) { GtsFace * fr; GtsPoint * o; g_return_val_if_fail (p != NULL, NULL); g_return_val_if_fail (surface != NULL, NULL); g_return_val_if_fail (guess == NULL || gts_face_has_parent_surface (guess, surface), NULL); if (guess == NULL) guess = closest_face (surface, p); else g_return_val_if_fail (gts_triangle_orientation (GTS_TRIANGLE (guess)) > 0., NULL); if (guess == NULL) return NULL; o = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class ()))); triangle_barycenter (GTS_TRIANGLE (guess), o); fr = point_locate (o, p, guess, surface); gts_object_destroy (GTS_OBJECT (o)); return fr; } struct _GtsConstraint { GtsEdge edge; }; struct _GtsConstraintClass { GtsEdgeClass parent_class; }; /** * gts_constraint_class: * * Returns: the #GtsConstraintClass. */ GtsConstraintClass * gts_constraint_class (void) { static GtsConstraintClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo constraint_info = { "GtsConstraint", sizeof (GtsConstraint), sizeof (GtsConstraintClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_edge_class ()), &constraint_info); } return klass; } static void split_list (GtsListFace * f, GtsListFace * f1, GtsListFace * f2, GtsPoint * p1, GtsPoint * p2, GSList ** last1, GSList ** last2) { GSList * i = f->points, * l1 = *last1, * l2 = *last2; while (i) { GtsPoint * p = i->data; if (gts_point_orientation (p1, p2, p) >= 0.) { if (l1) l1->next = i; else f1->points = i; l1 = i; } else { if (l2) l2->next = i; else f2->points = i; l2 = i; } i = i->next; } f->points = NULL; *last1 = l1; *last2 = l2; } /* cf. figure misc/swap.fig */ static void swap_if_in_circle (GtsFace * f1, GtsVertex * v1, GtsVertex * v2, GtsVertex * v3, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3, GtsSurface * surface) { GtsFace * f2; GtsEdge * e4, *e5; GtsVertex * v4; if (GTS_IS_CONSTRAINT (e1)) /* @e1 is a constraint can not swap */ return; f2 = neighbor (f1, e1, surface); if (f2 == NULL) /* @e1 is a boundary of @surface */ return; if (GTS_TRIANGLE (f2)->e1 == e1) { e4 = GTS_TRIANGLE (f2)->e2; e5 = GTS_TRIANGLE (f2)->e3; } else if (GTS_TRIANGLE (f2)->e2 == e1) { e4 = GTS_TRIANGLE (f2)->e3; e5 = GTS_TRIANGLE (f2)->e1; } else { e4 = GTS_TRIANGLE (f2)->e1; e5 = GTS_TRIANGLE (f2)->e2; } if (GTS_SEGMENT (e4)->v1 == GTS_SEGMENT (e1)->v1 || GTS_SEGMENT (e4)->v1 == GTS_SEGMENT (e1)->v2) v4 = GTS_SEGMENT (e4)->v2; else v4 = GTS_SEGMENT (e4)->v1; if (gts_point_in_circle (GTS_POINT (v4), GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3)) > 0.0) { GtsEdge * en; GtsSegment * sn = gts_vertices_are_connected (v3, v4); GtsFace * f3, * f4; if (!GTS_IS_EDGE (sn)) en = gts_edge_new (surface->edge_class, v3, v4); else en = GTS_EDGE (sn); f3 = gts_face_new (surface->face_class, en, e5, e2); gts_object_attributes (GTS_OBJECT (f3), GTS_OBJECT (f1)); f4 = gts_face_new (surface->face_class, en, e3, e4); gts_object_attributes (GTS_OBJECT (f4), GTS_OBJECT (f2)); if (GTS_IS_LIST_FACE (f3)) { GSList * last3 = NULL, * last4 = NULL; if (GTS_IS_LIST_FACE (f1)) split_list (GTS_LIST_FACE (f1), GTS_LIST_FACE (f3), GTS_LIST_FACE (f4), GTS_POINT (v3), GTS_POINT (v4), &last3, &last4); if (GTS_IS_LIST_FACE (f2)) split_list (GTS_LIST_FACE (f2), GTS_LIST_FACE (f3), GTS_LIST_FACE (f4), GTS_POINT (v3), GTS_POINT (v4), &last3, &last4); if (last3) last3->next = NULL; if (last4) last4->next = NULL; } gts_surface_remove_face (surface, f1); gts_surface_remove_face (surface, f2); gts_surface_add_face (surface, f3); gts_surface_add_face (surface, f4); swap_if_in_circle (f3, v4, v2, v3, e5, e2, en, surface); swap_if_in_circle (f4, v1, v4, v3, e4, en, e3, surface); } } /** * gts_delaunay_add_vertex_to_face: * @surface: a #GtsSurface. * @v: a #GtsVertex. * @f: a #GtsFace belonging to @surface. * * Adds vertex @v to the face @f of the Delaunay triangulation defined * by @surface. * * Returns: %NULL is @v has been successfully added to @surface or was * already contained in @surface or a #GtsVertex having the same x and * y coordinates as @v. */ GtsVertex * gts_delaunay_add_vertex_to_face (GtsSurface * surface, GtsVertex * v, GtsFace * f) { GtsEdge * e1, * e2, * e3; GtsSegment * s4, * s5, * s6; GtsEdge * e4, * e5, * e6; GtsVertex * v1, * v2, * v3; GtsFace * nf[3]; g_return_val_if_fail (surface != NULL, v); g_return_val_if_fail (v != NULL, v); g_return_val_if_fail (f != NULL, v); gts_triangle_vertices_edges (GTS_TRIANGLE (f), NULL, &v1, &v2, &v3, &e1, &e2, &e3); if (v == v1 || v == v2 || v == v3) /* v already in @surface */ return NULL; if (GTS_POINT (v)->x == GTS_POINT (v1)->x && GTS_POINT (v)->y == GTS_POINT (v1)->y) return v1; if (GTS_POINT (v)->x == GTS_POINT (v2)->x && GTS_POINT (v)->y == GTS_POINT (v2)->y) return v2; if (GTS_POINT (v)->x == GTS_POINT (v3)->x && GTS_POINT (v)->y == GTS_POINT (v3)->y) return v3; s4 = gts_vertices_are_connected (v, v1); if (!GTS_IS_EDGE (s4)) e4 = gts_edge_new (surface->edge_class, v, v1); else e4 = GTS_EDGE (s4); s5 = gts_vertices_are_connected (v, v2); if (!GTS_IS_EDGE (s5)) e5 = gts_edge_new (surface->edge_class, v, v2); else e5 = GTS_EDGE (s5); s6 = gts_vertices_are_connected (v, v3); if (!GTS_IS_EDGE (s6)) e6 = gts_edge_new (surface->edge_class, v, v3); else e6 = GTS_EDGE (s6); /* cf. figure misc/swap.fig */ nf[0] = gts_face_new (surface->face_class, e4, e1, e5); gts_object_attributes (GTS_OBJECT (nf[0]), GTS_OBJECT (f)); nf[1] = gts_face_new (surface->face_class, e5, e2, e6); gts_object_attributes (GTS_OBJECT (nf[1]), GTS_OBJECT (f)); nf[2] = gts_face_new (surface->face_class, e6, e3, e4); gts_object_attributes (GTS_OBJECT (nf[2]), GTS_OBJECT (f)); if (GTS_IS_LIST_FACE (f) && GTS_IS_LIST_FACE (nf[0])) { GSList * i = GTS_LIST_FACE (f)->points, * last[3] = { NULL, NULL, NULL }; while (i) { GtsPoint * p = i->data; GSList * next = i->next; guint j; if (p != GTS_POINT (v)) { if (gts_point_orientation (GTS_POINT (v), GTS_POINT (v1), p) >= 0.) { gdouble o = gts_point_orientation (GTS_POINT (v), GTS_POINT (v2), p); if (o != 0.) j = o > 0. ? 1 : 0; else j = gts_point_orientation (GTS_POINT (v), GTS_POINT (v3), p) > 0. ? 0 : 1; } else if (gts_point_orientation (GTS_POINT (v), GTS_POINT (v3), p) > 0.) j = 2; else j = 1; if (last[j]) last[j]->next = i; else GTS_LIST_FACE (nf[j])->points = i; last[j] = i; } else g_slist_free_1 (i); i = next; } GTS_LIST_FACE (f)->points = NULL; if (last[0]) last[0]->next = NULL; if (last[1]) last[1]->next = NULL; if (last[2]) last[2]->next = NULL; } gts_surface_remove_face (surface, f); gts_surface_add_face (surface, nf[0]); gts_surface_add_face (surface, nf[1]); gts_surface_add_face (surface, nf[2]); swap_if_in_circle (nf[0], v1, v2, v, e1, e5, e4, surface); swap_if_in_circle (nf[1], v2, v3, v, e2, e6, e5, surface); swap_if_in_circle (nf[2], v3, v1, v, e3, e4, e6, surface); return NULL; } /** * gts_delaunay_add_vertex: * @surface: a #GtsSurface. * @v: a #GtsVertex. * @guess: %NULL or a #GtsFace belonging to @surface to be used as an initial * guess for point location. * * Adds vertex @v to the Delaunay triangulation defined by * @surface. If @v is not contained in the convex hull bounding * @surface, @v is not added to the triangulation. * * Returns: %NULL is @v has been successfully added to @surface or was * already contained in @surface, @v if @v is not contained in the * convex hull bounding surface or a #GtsVertex having the same x and * y coordinates as @v. */ GtsVertex * gts_delaunay_add_vertex (GtsSurface * surface, GtsVertex * v, GtsFace * guess) { GtsFace * f; g_return_val_if_fail (surface != NULL, v); g_return_val_if_fail (v != NULL, v); if (!(f = gts_point_locate (GTS_POINT (v), surface, guess))) return v; return gts_delaunay_add_vertex_to_face (surface, v, f); } static gboolean polygon_in_circle (GSList * poly, GtsPoint * p1, GtsPoint * p2, GtsPoint * p3) { GtsVertex * v1 = NULL, * v2 = NULL; while (poly) { GtsSegment * s = poly->data; GtsVertex * v; v = s->v1; if (v != v1 && v != v2 && v != GTS_VERTEX (p1) && v != GTS_VERTEX (p2) && v != GTS_VERTEX (p3) && gts_point_in_circle (GTS_POINT (v), p1, p2, p3) > 0.) return TRUE; v = s->v2; if (v != v1 && v != v2 && v != GTS_VERTEX (p1) && v != GTS_VERTEX (p2) && v != GTS_VERTEX (p3) && gts_point_in_circle (GTS_POINT (v), p1, p2, p3) > 0.) return TRUE; v1 = s->v1; v2 = s->v2; poly = poly->next; } return FALSE; } static void triangulate_polygon (GSList * poly, GtsSurface * surface, GtsFace * ref) { GSList * i, * poly1, * poly2; GtsVertex * v1, * v2, * v3 = NULL; gboolean found = FALSE; GtsSegment * s, * s1, * s2; GtsEdge * e1, * e2; GtsFace * f; if (poly == NULL || poly->next == NULL) { g_slist_free (poly); return; } s = poly->data; s1 = poly->next->data; if (s->v1 == s1->v1 || s->v1 == s1->v2) { v1 = s->v2; v2 = s->v1; } else { g_assert (s->v2 == s1->v1 || s->v2 == s1->v2); v1 = s->v1; v2 = s->v2; } i = poly->next; v3 = v2; while (i && !found) { s1 = i->data; if (s1->v1 == v3) v3 = s1->v2; else { g_assert (s1->v2 == v3); v3 = s1->v1; } if (v3 != v1 && gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3)) >= 0. && !polygon_in_circle (poly, GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3))) found = TRUE; else i = i->next; } if (!found) { g_slist_free (poly); return; } s1 = gts_vertices_are_connected (v2, v3); if (!GTS_IS_EDGE (s1)) e1 = gts_edge_new (surface->edge_class, v2, v3); else e1 = GTS_EDGE (s1); s2 = gts_vertices_are_connected (v3, v1); if (!GTS_IS_EDGE (s2)) e2 = gts_edge_new (surface->edge_class, v3, v1); else e2 = GTS_EDGE (s2); f = gts_face_new (surface->face_class, GTS_EDGE (s), e1, e2); gts_object_attributes (GTS_OBJECT (f), GTS_OBJECT (ref)); gts_surface_add_face (surface, f); poly1 = poly->next; g_slist_free_1 (poly); if (i->next && e2 != i->next->data) poly2 = g_slist_prepend (i->next, e2); else poly2 = i->next; if (e1 != i->data) i->next = g_slist_prepend (NULL, e1); else i->next = NULL; triangulate_polygon (poly1, surface, ref); triangulate_polygon (poly2, surface, ref); } /** * gts_delaunay_remove_vertex: * @surface: a #GtsSurface. * @v: a #GtsVertex. * * Removes @v from the Delaunay triangulation defined by @surface and * restores the Delaunay property. Vertex @v must not be used by any * constrained edge otherwise the triangulation is not guaranteed to * be Delaunay. */ void gts_delaunay_remove_vertex (GtsSurface * surface, GtsVertex * v) { GSList * triangles, * i; GtsFace * ref = NULL; g_return_if_fail (surface != NULL); g_return_if_fail (v != NULL); i = triangles = gts_vertex_triangles (v, NULL); while (i && !ref) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, surface)) ref = i->data; i = i->next; } if (!ref) { g_slist_free (triangles); g_return_if_fail (ref); } triangulate_polygon (gts_vertex_fan_oriented (v, surface), surface, ref); i = triangles; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, surface)) gts_surface_remove_face (surface, i->data); i = i->next; } g_slist_free (triangles); } #define NEXT_CUT(edge, edge1, list) { next = neighbor (f, edge, surface);\ remove_triangles (e, surface);\ if (!constraint && !e->triangles)\ gts_object_destroy (GTS_OBJECT (e));\ g_assert (next);\ *list = g_slist_prepend (*list, edge1);\ return g_slist_concat (constraint,\ remove_intersected_edge (s, edge,\ next, surface, left, right));\ } static void remove_triangles (GtsEdge * e, GtsSurface * s) { GSList * i = e->triangles; while (i) { GSList * next = i->next; if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, s)) gts_surface_remove_face (s, i->data); i = next; } } static GSList * remove_intersected_edge (GtsSegment * s, GtsEdge * e, GtsFace * f, GtsSurface * surface, GSList ** left, GSList ** right) { GtsVertex * v1, * v2, * v3; GtsEdge * e1, * e2; gdouble o1, o2; GtsFace * next; GSList * constraint = NULL; if (GTS_IS_CONSTRAINT (e)) constraint = g_slist_prepend (NULL, e); gts_triangle_vertices_edges (GTS_TRIANGLE (f), e, &v1, &v2, &v3, &e, &e1, &e2); o1 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), GTS_POINT (s->v2)); o2 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), GTS_POINT (s->v2)); if (o1 == 0.) { g_assert (o2 == 0.); remove_triangles (e, surface); if (!constraint && !e->triangles) gts_object_destroy (GTS_OBJECT (e)); *left = g_slist_prepend (*left, e2); *right = g_slist_prepend (*right, e1); } else if (o1 > 0.) { g_assert (o2 <= 0.); NEXT_CUT (e2, e1, right) } else if (o2 >= 0.) NEXT_CUT (e1, e2, left) else { gdouble o3 = gts_point_orientation (GTS_POINT (s->v1), GTS_POINT (s->v2), GTS_POINT (v3)); if (o3 > 0.) NEXT_CUT (e1, e2, left) else NEXT_CUT (e2, e1, right) } return constraint; } static GSList * remove_intersected_vertex (GtsSegment * s, GtsVertex * v, GtsSurface * surface, GSList ** left, GSList ** right, GtsFace ** ref) { GSList * triangles = gts_vertex_triangles (v, NULL); GSList * i; i = triangles; while (i) { GtsTriangle * t = i->data; if (GTS_IS_FACE (t) && gts_face_has_parent_surface (GTS_FACE (t), surface)) { GtsVertex * v1, * v2, * v3; gdouble o1, o2; gts_triangle_vertices (t, &v1, &v2, &v3); if (v == v2) { v2 = v3; v3 = v1; } else if (v == v3) { v3 = v2; v2 = v1; } else g_assert (v == v1); if ((o1 = gts_point_orientation (GTS_POINT (v), GTS_POINT (v2), GTS_POINT (s->v2))) >= 0. && (o2 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v), GTS_POINT (s->v2))) >= 0.) { gdouble o3 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), GTS_POINT (s->v2)); GtsEdge * e = gts_triangle_edge_opposite (t, v); GtsEdge * e1, * e2; GtsFace * next = neighbor (GTS_FACE (t), e, surface); *ref = GTS_FACE (t); gts_triangle_vertices_edges (t, e, &v2, &v3, &v, &e, &e2, &e1); g_slist_free (triangles); if (o3 >= 0.) /* @s->v2 is inside (or on the edge) of t */ return NULL; gts_allow_floating_faces = TRUE; gts_surface_remove_face (surface, GTS_FACE (t)); gts_allow_floating_faces = FALSE; *left = g_slist_prepend (*left, e2); *right = g_slist_prepend (*right, e1); g_assert (next); return remove_intersected_edge (s, e, next, surface, left, right); } } i = i->next; } g_assert_not_reached (); return NULL; } /** * gts_delaunay_add_constraint: * @surface: a #GtsSurface. * @c: a #GtsConstraint. * * Add constraint @c to the constrained Delaunay triangulation defined by * @surface. * * Returns: a list of #GtsConstraint conflicting (i.e. intersecting) with @c * which were removed from @surface (%NULL if there was none). */ GSList * gts_delaunay_add_constraint (GtsSurface * surface, GtsConstraint * c) { GSList * constraints; GtsVertex * v1, * v2; GSList * left = NULL, * right = NULL; GtsFace * ref = NULL; g_return_val_if_fail (surface != NULL, NULL); g_return_val_if_fail (c != NULL, NULL); g_return_val_if_fail (GTS_IS_CONSTRAINT (c), NULL); v1 = GTS_SEGMENT (c)->v1; v2 = GTS_SEGMENT (c)->v2; gts_allow_floating_edges = TRUE; constraints = remove_intersected_vertex (GTS_SEGMENT (c), v1, surface, &left, &right, &ref); gts_allow_floating_edges = FALSE; #if 1 triangulate_polygon (g_slist_prepend (g_slist_reverse (right), c), surface, ref); triangulate_polygon (g_slist_prepend (left, c), surface, ref); #else right = g_slist_prepend (g_slist_reverse (right), c); left = g_slist_prepend (left, c); { FILE * fp0 = fopen ("hole", "wt"); FILE * fp1 = fopen ("right", "wt"); FILE * fp2 = fopen ("left", "wt"); GSList * i = left; gts_surface_write (surface, fp0); fclose (fp0); fprintf (fp2, "LIST {\n"); while (i) { GtsSegment * s = i->data; fprintf (fp2, "# %p: %p->%p\n" "VECT 1 2 0 2 0 %g %g 0 %g %g 0\n", s, s->v1, s->v2, GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y); i = i->next; } fprintf (fp2, "}\n"); fprintf (fp1, "LIST {\n"); i = right; while (i) { GtsSegment * s = i->data; fprintf (fp1, "# %p: %p->%p\n" "VECT 1 2 0 2 0 %g %g 0 %g %g 0\n", s, s->v1, s->v2, GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y); i = i->next; } fprintf (fp1, "}\n"); fclose (fp1); fclose (fp2); } triangulate_polygon (right, surface); triangulate_polygon (left, surface); #endif if (ref && !ref->surfaces) { gts_allow_floating_edges = TRUE; gts_object_destroy (GTS_OBJECT (ref)); gts_allow_floating_edges = FALSE; } return constraints; } static void delaunay_check (GtsTriangle * t, gpointer * data) { GtsSurface * surface = data[0]; GtsFace ** face = data[1]; if (*face == NULL) { GSList * i, * list; GtsVertex * v1, * v2, * v3; gts_triangle_vertices (t, &v1, &v2, &v3); list = gts_vertex_neighbors (v1, NULL, surface); list = gts_vertex_neighbors (v2, list, surface); list = gts_vertex_neighbors (v3, list, surface); i = list; while (i && *face == NULL) { GtsVertex * v = i->data; if (v != v1 && v != v2 && v != v3 && gts_point_in_circle (GTS_POINT (v), GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3)) > 0.) *face = GTS_FACE (t); i = i->next; } g_slist_free (list); } } /** * gts_delaunay_check: * @surface: a #GtsSurface. * * Returns: %NULL if the planar projection of @surface is a Delaunay * triangulation (unconstrained), a #GtsFace violating the Delaunay * property otherwise. */ GtsFace * gts_delaunay_check (GtsSurface * surface) { GtsFace * face = NULL; gpointer data[2]; g_return_val_if_fail (surface != NULL, FALSE); data[0] = surface; data[1] = &face; gts_surface_foreach_face (surface, (GtsFunc) delaunay_check, data); return face; } /** * gts_delaunay_remove_hull: * @surface: a #GtsSurface. * * Removes all the edges of the boundary of @surface which are not * constraints. */ void gts_delaunay_remove_hull (GtsSurface * surface) { GSList * boundary; g_return_if_fail (surface != NULL); boundary = gts_surface_boundary (surface); gts_allow_floating_edges = TRUE; while (boundary) { GSList * i = boundary; GtsEdge * e = i->data; boundary = i->next; g_slist_free_1 (i); if (!GTS_IS_CONSTRAINT (e)) { GtsTriangle * t = GTS_TRIANGLE (gts_edge_is_boundary (e, surface)); if (t != NULL) { if (t->e1 != e && !GTS_IS_CONSTRAINT (t->e1) && !gts_edge_is_boundary (t->e1, surface)) boundary = g_slist_prepend (boundary, t->e1); if (t->e2 != e && !GTS_IS_CONSTRAINT (t->e2) && !gts_edge_is_boundary (t->e2, surface)) boundary = g_slist_prepend (boundary, t->e2); if (t->e3 != e && !GTS_IS_CONSTRAINT (t->e3) && !gts_edge_is_boundary (t->e3, surface)) boundary = g_slist_prepend (boundary, t->e3); gts_surface_remove_face (surface, GTS_FACE (t)); } if (!e->triangles) gts_object_destroy (GTS_OBJECT (e)); } } gts_allow_floating_edges = FALSE; } /* GtsListFace: Object */ static void gts_list_face_destroy (GtsObject * object) { g_slist_free (GTS_LIST_FACE (object)->points); (* GTS_OBJECT_CLASS (gts_list_face_class ())->parent_class->destroy) (object); } static void gts_list_face_class_init (GtsFaceClass * klass) { GTS_OBJECT_CLASS (klass)->destroy = gts_list_face_destroy; } GtsFaceClass * gts_list_face_class (void) { static GtsFaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo gts_list_face_info = { "GtsListFace", sizeof (GtsListFace), sizeof (GtsFaceClass), (GtsObjectClassInitFunc) gts_list_face_class_init, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_face_class ()), >s_list_face_info); } return klass; } gts-snapshot-121130/src/misc.c0000644000175100017510000004267712055775440013077 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" #include "gts-private.h" #include "config.h" const guint gts_major_version = GTS_MAJOR_VERSION; const guint gts_minor_version = GTS_MINOR_VERSION; const guint gts_micro_version = GTS_MICRO_VERSION; const guint gts_interface_age = GTS_INTERFACE_AGE; const guint gts_binary_age = GTS_BINARY_AGE; static gboolean char_in_string (char c, const char * s) { while (*s != '\0') if (*(s++) == c) return TRUE; return FALSE; } static GtsFile * file_new (void) { GtsFile * f; f = g_malloc (sizeof (GtsFile)); f->fp = NULL; f->buf = NULL; f->len = 0; f->curline = 1; f->curpos = 1; f->token = g_string_new (""); f->type = '\0'; f->error = NULL; f->next_token = '\0'; f->scope = f->scope_max = 0; f->delimiters = g_strdup (" \t"); f->comments = g_strdup (GTS_COMMENTS); f->tokens = g_strdup ("\n{}()="); return f; } /** * gts_file_new: * @fp: a file pointer. * * Returns: a new #GtsFile. */ GtsFile * gts_file_new (FILE * fp) { GtsFile * f; g_return_val_if_fail (fp != NULL, NULL); f = file_new (); f->fp = fp; gts_file_next_token (f); return f; } /** * gts_file_new_from_string: * @s: a string. * * Returns: a new #GtsFile. */ GtsFile * gts_file_new_from_string (gchar * s) { g_return_val_if_fail (s != NULL, NULL); return gts_file_new_from_buffer (s, strlen (s)); } /** * gts_file_new_from_buffer: * @buf: a buffer. * @len: the size of the buffer. * * Returns: a new #GtsFile. */ GtsFile * gts_file_new_from_buffer (gchar * buf, size_t len) { GtsFile * f; g_return_val_if_fail (buf != NULL, NULL); f = file_new (); f->buf = buf; f->len = len; gts_file_next_token (f); return f; } /** * gts_file_destroy: * @f: a #GtsFile. * * Frees all the memory allocated for @f. */ void gts_file_destroy (GtsFile * f) { g_return_if_fail (f != NULL); g_free (f->delimiters); g_free (f->comments); g_free (f->tokens); if (f->error) g_free (f->error); g_string_free (f->token, TRUE); g_free (f); } /** * gts_file_verror: * @f: a @GtsFile. * @format: the standard sprintf() format string. * @args: the list of parameters to insert into the format string. * * Sets the @error field of @f using g_strdup_vprintf(). * * This function can be called only once and disables any other * operation on @f (gts_file_close() excepted). */ void gts_file_verror (GtsFile * f, const gchar * format, va_list args) { g_return_if_fail (f != NULL); g_return_if_fail (format != NULL); g_assert (f->type != GTS_ERROR); f->error = g_strdup_vprintf (format, args); f->type = GTS_ERROR; } /** * gts_file_error: * @f: a @GtsFile. * @format: the standard sprintf() format string. * @...: the parameters to insert into the format string. * * Sets the @error field of @f using gts_file_verror(). * * This function can be called only once and disables any other * operation on @f (gts_file_close() excepted). */ void gts_file_error (GtsFile * f, const gchar * format, ...) { va_list args; g_return_if_fail (f != NULL); g_return_if_fail (format != NULL); va_start (args, format); gts_file_verror (f, format, args); va_end (args); } static gint next_char (GtsFile * f) { if (f->fp) return fgetc (f->fp); else { if (f->len == 0) return EOF; f->len--; return *(f->buf++); } } /** * gts_file_getc : * @f: a #GtsFile. * * Returns: the next character in @f or EOF if the end of the file is * reached or if an error occured. */ gint gts_file_getc (GtsFile * f) { gint c; g_return_val_if_fail (f != NULL, EOF); if (f->type == GTS_ERROR) return EOF; c = next_char (f); f->curpos++; while (char_in_string (c, f->comments)) { while (c != EOF && c != '\n') c = next_char (f); if (c == '\n') { f->curline++; f->curpos = 1; c = next_char (f); } } switch (c) { case '\n': f->curline++; f->curpos = 1; break; case '{': f->scope++; break; case '}': if (f->scope == 0) { f->line = f->curline; f->pos = f->curpos - 1; gts_file_error (f, "no matching opening brace"); c = EOF; } else f->scope--; } return c; } /** * gts_file_read: * @f: a #GtsFile. * @ptr: a pointer. * @size: size of an element. * @nmemb: number of elements. * * Reads @nmemb elements of data, each @size bytes long, from @f, * storing them at the location given by @ptr. * * Returns: the number of elements read. */ guint gts_file_read (GtsFile * f, gpointer ptr, guint size, guint nmemb) { guint i, n; gchar * p; g_return_val_if_fail (f != NULL, 0); g_return_val_if_fail (ptr != NULL, 0); g_return_val_if_fail (f->fp != NULL || f->buf != NULL, 0); if (f->type == GTS_ERROR) return 0; if (f->fp) n = fread (ptr, size, nmemb, f->fp); else { n = MIN (f->len/size, nmemb); if (n > 0) { memcpy (ptr, f->buf, n*size); f->buf += n*size; f->len -= n*size; } } for (i = 0, p = ptr; i < n*size; i++, p++) { f->curpos++; if (*p == '\n') { f->curline++; f->curpos = 1; } } return n; } /** * gts_file_getc_scope : * @f: a #GtsFile. * * Returns: the next character in @f in the scope defined by * @f->scope_max or EOF if the end of the file is reached or if an * error occured. */ gint gts_file_getc_scope (GtsFile * f) { gint c; g_return_val_if_fail (f != NULL, EOF); if (f->type == GTS_ERROR) return EOF; if (f->scope <= f->scope_max) c = gts_file_getc (f); else { c = gts_file_getc (f); while (c != EOF && f->scope > f->scope_max) c = gts_file_getc (f); } return c; } /** * gts_file_next_token: * @f: a #GtsFile. * * Reads next token from @f and updates its @token and @delim fields. */ void gts_file_next_token (GtsFile * f) { gint c; gboolean in_string = FALSE; g_return_if_fail (f != NULL); if (f->type == GTS_ERROR) return; f->token->str[0] = '\0'; f->token->len = 0; if (f->next_token != '\0') { if (char_in_string (f->next_token, f->tokens)) { f->line = f->curline; f->pos = f->curpos - 1; g_string_append_c (f->token, f->next_token); f->type = f->next_token; f->next_token = '\0'; return; } else { c = f->next_token; f->next_token = '\0'; } } else c = gts_file_getc_scope (f); f->type = GTS_NONE; while (c != EOF && (!in_string || !char_in_string (c, f->delimiters))) { if (in_string) { if (char_in_string (c, f->tokens)) { f->next_token = c; break; } g_string_append_c (f->token, c); } else if (!char_in_string (c, f->delimiters)) { in_string = TRUE; f->line = f->curline; f->pos = f->curpos - 1; g_string_append_c (f->token, c); if (char_in_string (c, f->tokens)) { f->type = c; break; } } c = gts_file_getc_scope (f); } if (f->type == GTS_NONE && f->token->len > 0) { gchar * a; a = f->token->str; while (*a != '\0' && char_in_string (*a, "+-")) a++; if (*a == '\0') { f->type = GTS_STRING; return; } a = f->token->str; while (*a != '\0' && char_in_string (*a, "+-0123456789")) a++; if (*a == '\0') { f->type = GTS_INT; return; } a = f->token->str; while (*a != '\0' && char_in_string (*a, "+-eE.")) a++; if (*a == '\0') { f->type = GTS_STRING; return; } a = f->token->str; while (*a != '\0' && char_in_string (*a, "+-0123456789eE.")) a++; if (*a == '\0') { f->type = GTS_FLOAT; return; } a = f->token->str; if (!strncmp (a, "0x", 2) || !strncmp (a, "-0x", 3) || !strncmp (a, "+0x", 3)) { while (*a != '\0' && char_in_string (*a, "+-0123456789abcdefx")) a++; if (*a == '\0') { f->type = GTS_INT; return; } a = f->token->str; while (*a != '\0' && char_in_string (*a, "+-0123456789abcdefx.p")) a++; if (*a == '\0') { f->type = GTS_FLOAT; return; } } f->type = GTS_STRING; } } /** * gts_file_first_token_after: * @f: a #GtsFile. * @type: a #GtsTokenType. * * Finds and sets the first token of a type different from @type * occuring after a token of type @type. */ void gts_file_first_token_after (GtsFile * f, GtsTokenType type) { g_return_if_fail (f != NULL); while (f->type != GTS_ERROR && f->type != GTS_NONE && f->type != type) gts_file_next_token (f); while (f->type == type) gts_file_next_token (f); } /** * gts_file_assign_start: * @f: a #GtsFile. * @vars: a %GTS_NONE terminated array of #GtsFileVariable. * * Opens a block delimited by braces to read a list of optional * arguments specified by @vars. * * If an error is encountered the @error field of @f is set. */ void gts_file_assign_start (GtsFile * f, GtsFileVariable * vars) { GtsFileVariable * var; g_return_if_fail (f != NULL); g_return_if_fail (vars != NULL); var = vars; while (var->type != GTS_NONE) (var++)->set = FALSE; if (f->type != '{') { gts_file_error (f, "expecting an opening brace"); return; } f->scope_max++; gts_file_next_token (f); } /** * gts_file_assign_next: * @f: a #GtsFile. * @vars: a %GTS_NONE terminated array of #GtsFileVariable. * * Assigns the next optional argument of @vars read from @f. * * Returns: the variable of @vars which has been assigned or %NULL if * no variable has been assigned (if an error has been encountered the * @error field of @f is set). */ GtsFileVariable * gts_file_assign_next (GtsFile * f, GtsFileVariable * vars) { GtsFileVariable * var; gboolean found = FALSE; g_return_val_if_fail (f != NULL, NULL); g_return_val_if_fail (vars != NULL, NULL); while (f->type == '\n') gts_file_next_token (f); if (f->type == '}') { f->scope_max--; gts_file_next_token (f); return NULL; } if (f->type == GTS_ERROR) return NULL; var = vars; while (f->type != GTS_ERROR && var->type != GTS_NONE && !found) { if (!strcmp (var->name, f->token->str)) { found = TRUE; if (var->unique && var->set) gts_file_error (f, "variable `%s' was already set at line %d:%d", var->name, var->line, var->pos); else { var->line = f->line; var->pos = f->pos; gts_file_next_token (f); if (f->type != '=') gts_file_error (f, "expecting `='"); else { var->set = TRUE; switch (var->type) { case GTS_FILE: break; case GTS_INT: gts_file_next_token (f); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer"); var->set = FALSE; } else if (var->data) *((gint *) var->data) = atoi (f->token->str); break; case GTS_UINT: gts_file_next_token (f); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer"); var->set = FALSE; } else if (var->data) *((guint *) var->data) = atoi (f->token->str); break; case GTS_FLOAT: gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { gts_file_error (f, "expecting a number"); var->set = FALSE; } else if (var->data) *((gfloat *) var->data) = atof (f->token->str); break; case GTS_DOUBLE: gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT) { gts_file_error (f, "expecting a number"); var->set = FALSE; } else if (var->data) *((gdouble *) var->data) = atof (f->token->str); break; case GTS_OBJ: gts_file_next_token (f); if (var->data) { GtsObject ** object = var->data; g_return_val_if_fail (GTS_IS_OBJECT (*object), NULL); (* (*object)->klass->read) (object, f); } break; case GTS_STRING: gts_file_next_token (f); if (f->type != GTS_INT && f->type != GTS_FLOAT && f->type != GTS_STRING) { gts_file_error (f, "expecting a string"); var->set = FALSE; } else { if (f->token->str[0] != '"') { /* simple string */ if (var->data) *((gchar **) var->data) = g_strdup (f->token->str); } else { /* quoted string */ gint len = strlen (f->token->str); if (f->token->str[len - 1] == '"') { /* simple quoted string */ f->token->str[len - 1] = '\0'; if (var->data) *((gchar **) var->data) = g_strdup (&(f->token->str[1])); f->token->str[len - 1] = '"'; } else { /* multiple parts */ GString * s = g_string_new (&(f->token->str[1])); g_string_append_c (s, ' '); int c = gts_file_getc (f); while (c != '"' && c != EOF) { g_string_append_c (s, c); c = gts_file_getc (f); } if (var->data) *((gchar **) var->data) = g_strdup (s->str); g_string_free (s, TRUE); } } } break; default: g_assert_not_reached (); } } } } else var++; } if (!found) gts_file_error (f, "unknown identifier `%s'", f->token->str); else if (f->type != GTS_ERROR) { g_assert (var->set); if (f->type != '}') gts_file_next_token (f); return var; } return NULL; } /** * gts_file_assign_variables: * @f: a #GtsFile. * @vars: an array of #GtsFileVariable. * * Assigns all the variables belonging to @vars found in @f. * * If an error is encountered the @error field of @f is set. */ void gts_file_assign_variables (GtsFile * f, GtsFileVariable * vars) { g_return_if_fail (f != NULL); g_return_if_fail (vars != NULL); gts_file_assign_start (f, vars); while (gts_file_assign_next (f, vars)) ; } /** * gts_file_variable_error: * @f: a #GtsFile. * @vars: an array of #GtsFileVariable. * @name: the name of a variable in @vars. * @format: the standard sprintf() format string. * @...: the parameters to insert into the format string. * * Sets the @error field of @f using gts_file_verror(). * * String @name must match one of the variable names in @vars. * * If variable @name has been assigned (using gts_file_assign_variables()) * sets the @line and @pos fields of @f to the line and position where * it has been assigned. */ void gts_file_variable_error (GtsFile * f, GtsFileVariable * vars, const gchar * name, const gchar * format, ...) { va_list args; GtsFileVariable * var; g_return_if_fail (f != NULL); g_return_if_fail (vars != NULL); g_return_if_fail (name != NULL); g_return_if_fail (format != NULL); var = vars; while (var->type != GTS_NONE && strcmp (var->name, name)) var++; g_return_if_fail (var->type != GTS_NONE); /* @name not found in @vars */ if (var->set) { f->line = var->line; f->pos = var->pos; } va_start (args, format); gts_file_verror (f, format, args); va_end (args); } #ifdef DEBUG_FUNCTIONS static GHashTable * ids = NULL; static guint next_id = 1; guint id (gpointer p) { g_return_val_if_fail (p != NULL, 0); g_return_val_if_fail (ids != NULL, 0); g_assert (g_hash_table_lookup (ids, p)); return GPOINTER_TO_UINT (g_hash_table_lookup (ids, p)); } void id_insert (gpointer p) { g_return_if_fail (p != NULL); if (ids == NULL) ids = g_hash_table_new (NULL, NULL); g_assert (g_hash_table_lookup (ids, p) == NULL); g_hash_table_insert (ids, p, GUINT_TO_POINTER (next_id++)); } void id_remove (gpointer p) { g_assert (g_hash_table_lookup (ids, p)); g_hash_table_remove (ids, p); } void gts_write_triangle (GtsTriangle * t, GtsPoint * o, FILE * fptr) { gdouble xo = o ? o->x : 0.0; gdouble yo = o ? o->y : 0.0; gdouble zo = o ? o->z : 0.0; g_return_if_fail (t != NULL && fptr != NULL); fprintf (fptr, "(hdefine geometry \"t%d\" { =\n", id (t)); fprintf (fptr, "OFF 3 1 0\n" "%g %g %g\n%g %g %g\n%g %g %g\n3 0 1 2\n})\n" "(geometry \"t%d\" { : \"t%d\"})\n" "(normalization \"t%d\" none)\n", GTS_POINT (GTS_SEGMENT (t->e1)->v1)->x - xo, GTS_POINT (GTS_SEGMENT (t->e1)->v1)->y - yo, GTS_POINT (GTS_SEGMENT (t->e1)->v1)->z - zo, GTS_POINT (GTS_SEGMENT (t->e1)->v2)->x - xo, GTS_POINT (GTS_SEGMENT (t->e1)->v2)->y - yo, GTS_POINT (GTS_SEGMENT (t->e1)->v2)->z - zo, GTS_POINT (gts_triangle_vertex (t))->x - xo, GTS_POINT (gts_triangle_vertex (t))->y - yo, GTS_POINT (gts_triangle_vertex (t))->z - zo, id (t), id (t), id (t)); } void gts_write_segment (GtsSegment * s, GtsPoint * o, FILE * fptr) { gdouble xo = o ? o->x : 0.0; gdouble yo = o ? o->y : 0.0; gdouble zo = o ? o->z : 0.0; g_return_if_fail (s != NULL && fptr != NULL); fprintf (fptr, "(geometry \"s%d\" { =\n", id (s)); fprintf (fptr, "VECT 1 2 0 2 0 %g %g %g %g %g %g })\n" "(normalization \"s%d\" none)\n", GTS_POINT (s->v1)->x - xo, GTS_POINT (s->v1)->y - yo, GTS_POINT (s->v1)->z - zo, GTS_POINT (s->v2)->x - xo, GTS_POINT (s->v2)->y - yo, GTS_POINT (s->v2)->z - zo, id (s)); } #endif /* DEBUG_FUNCTIONS */ gts-snapshot-121130/src/Makefile.am0000644000175100017510000000320512055775440014014 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) -I$(includedir) -DG_LOG_DOMAIN=\"Gts\" bin_SCRIPTS=gts-config BUILT_SOURCES= \ gts-config \ predicates_init.h gts-config: gts-config.in lib_LTLIBRARIES = libgts.la libgts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\ -release $(LT_RELEASE) -export-dynamic -lm libgts_la_DEPENDENCIES = \ predicates_init.h libgts_la_SOURCES = \ predicates_init.h \ object.c \ point.c \ vertex.c \ segment.c \ edge.c \ triangle.c \ face.c \ kdtree.c \ bbtree.c \ misc.c \ gts.h \ gts-private.h \ predicates.c \ predicates.h \ rounding.h \ heap.c \ eheap.c \ fifo.c \ matrix.c \ surface.c \ stripe.c \ vopt.c \ refine.c \ iso.c \ isotetra.c \ split.c \ psurface.c \ hsurface.c \ cdt.c \ boolean.c \ named.c \ oocs.c \ container.c \ graph.c \ pgraph.c \ partition.c \ curvature.c \ tribox3.c include_HEADERS = \ gts.h gtsconfig.h predicates.o: predicates.c predicates_init.h predicates.h $(COMPILE) -c $(srcdir)/predicates.c predicates_init: predicates_init.c rounding.h $(COMPILE) $(srcdir)/predicates_init.c -o $(srcdir)/predicates_init predicates_init.h: predicates_init ./predicates_init > $(srcdir)/predicates_init.h CLEANFILES = $(BUILT_SOURCES) gts.def: libgts.la .libs/libgts.a nm -g .libs/libgts.a | awk 'BEGIN{print "EXPORTS"}{if ($$2 == "T" || $$2 == "D" || $$2 == "B") print " " $$3}' > gts.def EXTRA_DIST = \ predicates_init.c \ gts.m4 \ makefile.msc \ config.h.win32 \ gts.def \ NOTES dist-hook: gts.def cd $(distdir); rm -f $(BUILT_SOURCES) m4datadir = $(datadir)/aclocal m4data_DATA = gts.m4 gts-snapshot-121130/src/vertex.c0000644000175100017510000004604112055775440013446 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" gboolean gts_allow_floating_vertices = FALSE; static void vertex_destroy (GtsObject * object) { GtsVertex * vertex = GTS_VERTEX (object); GSList * i; i = vertex->segments; while (i) { GTS_OBJECT_SET_FLAGS (i->data, GTS_DESTROYED); i = i->next; } i = vertex->segments; while (i) { GSList * next = i->next; gts_object_destroy (i->data); i = next; } g_assert (vertex->segments == NULL); (* GTS_OBJECT_CLASS (gts_vertex_class ())->parent_class->destroy) (object); } static void vertex_clone (GtsObject * clone, GtsObject * object) { (* GTS_OBJECT_CLASS (gts_vertex_class ())->parent_class->clone) (clone, object); GTS_VERTEX (clone)->segments = NULL; } static void vertex_class_init (GtsVertexClass * klass) { klass->intersection_attributes = NULL; GTS_OBJECT_CLASS (klass)->clone = vertex_clone; GTS_OBJECT_CLASS (klass)->destroy = vertex_destroy; } static void vertex_init (GtsVertex * vertex) { vertex->segments = NULL; } /** * gts_vertex_class: * * Returns: the #GtsVertexClass. */ GtsVertexClass * gts_vertex_class (void) { static GtsVertexClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo vertex_info = { "GtsVertex", sizeof (GtsVertex), sizeof (GtsVertexClass), (GtsObjectClassInitFunc) vertex_class_init, (GtsObjectInitFunc) vertex_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_point_class ()), &vertex_info); } return klass; } /** * gts_vertex_new: * @klass: a #GtsVertexClass. * @x: the x-coordinate of the vertex to create. * @y: the y-coordinate of the vertex to create. * @z: the y-coordinate of the vertex to create. * * Returns: a new #GtsVertex with @x, @y and @z as coordinates. */ GtsVertex * gts_vertex_new (GtsVertexClass * klass, gdouble x, gdouble y, gdouble z) { GtsVertex * v; v = GTS_VERTEX (gts_object_new (GTS_OBJECT_CLASS (klass))); gts_point_set (GTS_POINT (v), x, y, z); return v; } /** * gts_vertex_replace: * @v: a #GtsVertex. * @with: another #GtsVertex. * * Replaces vertex @v with vertex @with. @v and @with must be * different. All the #GtsSegment which have @v has one of their * vertices are updated. The segments list of vertex @v is freed and * @v->segments is set to %NULL. */ void gts_vertex_replace (GtsVertex * v, GtsVertex * with) { GSList * i; g_return_if_fail (v != NULL); g_return_if_fail (with != NULL); g_return_if_fail (v != with); i = v->segments; while (i) { GtsSegment * s = i->data; if (s->v1 != with && s->v2 != with) with->segments = g_slist_prepend (with->segments, s); if (s->v1 == v) s->v1 = with; if (s->v2 == v) s->v2 = with; i = i->next; } g_slist_free (v->segments); v->segments = NULL; } /** * gts_vertex_is_unattached: * @v: a #GtsVertex. * * Returns: %TRUE if @v is not the endpoint of any #GtsSegment, * %FALSE otherwise. */ gboolean gts_vertex_is_unattached (GtsVertex * v) { g_return_val_if_fail (v != NULL, FALSE); if (v->segments == NULL) return TRUE; return FALSE; } /** * gts_vertices_are_connected: * @v1: a #GtsVertex. * @v2: another #GtsVertex. * * Returns: if @v1 and @v2 are the vertices of the same #GtsSegment * this segment else %NULL. */ GtsSegment * gts_vertices_are_connected (GtsVertex * v1, GtsVertex * v2) { GSList * i; g_return_val_if_fail (v1 != NULL, FALSE); g_return_val_if_fail (v2 != NULL, FALSE); i = v1->segments; while (i) { GtsSegment * s = i->data; if (s->v1 == v2 || s->v2 == v2) return s; i = i->next; } return NULL; } /** * gts_vertices_from_segments: * @segments: a list of #GtsSegment. * * Returns: a list of #GtsVertex, vertices of a #GtsSegment in @segments. * Each element in the list is unique (no duplicates). */ GSList * gts_vertices_from_segments (GSList * segments) { GHashTable * hash; GSList * vertices = NULL, * i; hash = g_hash_table_new (NULL, NULL); i = segments; while (i) { GtsSegment * s = i->data; if (g_hash_table_lookup (hash, s->v1) == NULL) { vertices = g_slist_prepend (vertices, s->v1); g_hash_table_insert (hash, s->v1, s); } if (g_hash_table_lookup (hash, s->v2) == NULL) { vertices = g_slist_prepend (vertices, s->v2); g_hash_table_insert (hash, s->v2, s); } i = i->next; } g_hash_table_destroy (hash); return vertices; } /** * gts_vertex_triangles: * @v: a #GtsVertex. * @list: a list of #GtsTriangle. * * Adds all the #GtsTriangle which share @v as a vertex and do not * already belong to @list. * * Returns: the new list of unique #GtsTriangle which share @v as a * vertex. */ GSList * gts_vertex_triangles (GtsVertex * v, GSList * list) { GSList * i; g_return_val_if_fail (v != NULL, NULL); i = v->segments; while (i) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { GSList * j = GTS_EDGE (s)->triangles; while (j) { if (!g_slist_find (list, j->data)) list = g_slist_prepend (list, j->data); j = j->next; } } i = i->next; } return list; } /** * gts_vertex_faces: * @v: a #GtsVertex. * @surface: a #GtsSurface or %NULL. * @list: a list of #GtsFace. * * Adds all the #GtsFace belonging to @surface (if not %NULL) which share * @v as a vertex and do not already belong to @list. * * Returns: the new list of unique #GtsFace belonging to @surface * which share @v as a vertex. */ GSList * gts_vertex_faces (GtsVertex * v, GtsSurface * surface, GSList * list) { GSList * i; g_return_val_if_fail (v != NULL, NULL); i = v->segments; while (i) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { GSList * j = GTS_EDGE (s)->triangles; while (j) { GtsTriangle * t = j->data; if (GTS_IS_FACE (t) && (!surface || gts_face_has_parent_surface (GTS_FACE (t), surface)) && !g_slist_find (list, t)) list = g_slist_prepend (list, t); j = j->next; } } i = i->next; } return list; } /** * gts_vertex_neighbors: * @v: a #GtsVertex. * @list: a list of #GtsVertex. * @surface: a #GtsSurface or %NULL. * * Adds to @list all the #GtsVertex connected to @v by a #GtsSegment and not * already in @list. If @surface is not %NULL only the vertices connected to * @v by an edge belonging to @surface are considered. * * Returns: the new list of unique #GtsVertex. */ GSList * gts_vertex_neighbors (GtsVertex * v, GSList * list, GtsSurface * surface) { GSList * i; g_return_val_if_fail (v != NULL, NULL); i = v->segments; while (i) { GtsSegment * s = i->data; GtsVertex * v1 = s->v1 == v ? s->v2 : s->v1; if (v1 != v && (!surface || (GTS_IS_EDGE (s) && gts_edge_has_parent_surface (GTS_EDGE (s), surface))) && !g_slist_find (list, v1)) list = g_slist_prepend (list, v1); i = i->next; } return list; } /** * gts_vertex_is_boundary: * @v: a #GtsVertex. * @surface: a #GtsSurface or %NULL. * * Returns: %TRUE if @v is used by a #GtsEdge boundary of @surface as * determined by gts_edge_is_boundary(), %FALSE otherwise. */ gboolean gts_vertex_is_boundary (GtsVertex * v, GtsSurface * surface) { GSList * i; g_return_val_if_fail (v != NULL, FALSE); i = v->segments; while (i) { if (GTS_IS_EDGE (i->data) && gts_edge_is_boundary (i->data, surface)) return TRUE; i = i->next; } return FALSE; } /** * gts_vertices_merge: * @vertices: a list of #GtsVertex. * @epsilon: half the size of the bounding box to consider for each vertex. * @check: function called for each pair of vertices about to be merged * or %NULL. * * For each vertex v in @vertices look if there are any vertex of * @vertices contained in a box centered on v of size 2*@epsilon. If * there are and if @check is not %NULL and returns %TRUE, replace * them with v (using gts_vertex_replace()), destroy them and remove * them from list. This is done efficiently using Kd-Trees. * * Returns: the updated list of vertices. */ GList * gts_vertices_merge (GList * vertices, gdouble epsilon, gboolean (* check) (GtsVertex *, GtsVertex *)) { GPtrArray * array; GList * i; GNode * kdtree; g_return_val_if_fail (vertices != NULL, 0); array = g_ptr_array_new (); i = vertices; while (i) { g_ptr_array_add (array, i->data); i = i->next; } kdtree = gts_kdtree_new (array, NULL); g_ptr_array_free (array, TRUE); i = vertices; while (i) { GtsVertex * v = i->data; if (!GTS_OBJECT (v)->reserved) { /* Do something only if v is active */ GtsBBox * bbox; GSList * selected, * j; /* build bounding box */ bbox = gts_bbox_new (gts_bbox_class (), v, GTS_POINT (v)->x - epsilon, GTS_POINT (v)->y - epsilon, GTS_POINT (v)->z - epsilon, GTS_POINT (v)->x + epsilon, GTS_POINT (v)->y + epsilon, GTS_POINT (v)->z + epsilon); /* select vertices which are inside bbox using kdtree */ j = selected = gts_kdtree_range (kdtree, bbox, NULL); while (j) { GtsVertex * sv = j->data; if (sv != v && !GTS_OBJECT (sv)->reserved && (!check || (*check) (sv, v))) { /* sv is not v and is active */ gts_vertex_replace (sv, v); GTS_OBJECT (sv)->reserved = sv; /* mark sv as inactive */ } j = j->next; } g_slist_free (selected); gts_object_destroy (GTS_OBJECT (bbox)); } i = i->next; } gts_kdtree_destroy (kdtree); /* destroy inactive vertices and removes them from list */ /* we want to control vertex destruction */ gts_allow_floating_vertices = TRUE; i = vertices; while (i) { GtsVertex * v = i->data; GList * next = i->next; if (GTS_OBJECT (v)->reserved) { /* v is inactive */ gts_object_destroy (GTS_OBJECT (v)); vertices = g_list_remove_link (vertices, i); g_list_free_1 (i); } i = next; } gts_allow_floating_vertices = FALSE; return vertices; } /* returns the list of edges belonging to @surface turning around @v */ static GSList * edge_fan_list (GtsVertex * v, GtsSurface * surface, GtsFace * f, GtsEdge * e, GtsFace * first) { GSList * i = e->triangles; GtsFace * neighbor = NULL; GtsEdge * next = NULL, * enext = NULL; while (i) { GtsFace * f1 = i->data; if (GTS_IS_FACE (f1) && f1 != f && gts_face_has_parent_surface (f1, surface)) { g_return_val_if_fail (neighbor == NULL, NULL); /* non-manifold edge */ neighbor = f1; } i = i->next; } if (neighbor == NULL || neighbor == first) /* end of fan */ return NULL; if (GTS_TRIANGLE (neighbor)->e1 == e) { next = GTS_TRIANGLE (neighbor)->e2; enext = GTS_TRIANGLE (neighbor)->e3; } else if (GTS_TRIANGLE (neighbor)->e2 == e) { next = GTS_TRIANGLE (neighbor)->e3; enext = GTS_TRIANGLE (neighbor)->e1; } else if (GTS_TRIANGLE (neighbor)->e3 == e) { next = GTS_TRIANGLE (neighbor)->e1; enext = GTS_TRIANGLE (neighbor)->e2; } else g_assert_not_reached (); /* checking for correct orientation */ g_return_val_if_fail (GTS_SEGMENT (enext)->v1 == v || GTS_SEGMENT (enext)->v2 == v, NULL); return g_slist_prepend (edge_fan_list (v, surface, neighbor, enext, first), next); } /** * gts_vertex_fan_oriented: * @v: a #GtsVertex. * @surface: a #GtsSurface. * * Returns: a list of #GtsEdge describing in counterclockwise order the * boundary of the fan of summit @v, the faces of the fan belonging to * @surface. */ GSList * gts_vertex_fan_oriented (GtsVertex * v, GtsSurface * surface) { GtsFace * f = NULL; guint d = 2; GSList * i; GtsVertex * v1, * v2, * v3; GtsEdge * e1, * e2, * e3; g_return_val_if_fail (v != NULL, NULL); g_return_val_if_fail (surface != NULL, NULL); i = v->segments; while (i) { GtsEdge * e = i->data; if (GTS_IS_EDGE (e)) { GSList * j = e->triangles; GtsFace * f1 = NULL; guint degree = 0; while (j) { if (GTS_IS_FACE (j->data) && gts_face_has_parent_surface (j->data, surface)) { f1 = j->data; degree++; } j = j->next; } if (f1 != NULL) { g_return_val_if_fail (degree <= 2, NULL); /* non-manifold edge */ if (degree == 1) { gts_triangle_vertices_edges (GTS_TRIANGLE (f1), NULL, &v1, &v2, &v3, &e1, &e2, &e3); if (v == v2) { e2 = e3; e3 = e1; } else if (v == v3) { e3 = e2; e2 = e1; } if (e3 != e) { d = 1; f = f1; } } else if (degree <= d) f = f1; } } i = i->next; } if (f == NULL) return NULL; gts_triangle_vertices_edges (GTS_TRIANGLE (f), NULL, &v1, &v2, &v3, &e1, &e2, &e3); if (v == v2) { e2 = e3; e3 = e1; } else if (v == v3) { e3 = e2; e2 = e1; } return g_slist_prepend (edge_fan_list (v, surface, f, e3, f), e2); } #define edge_use_vertex(e, v) (GTS_SEGMENT(e)->v1 == v ||\ GTS_SEGMENT(e)->v2 == v) static GtsEdge * replace_vertex (GtsTriangle * t, GtsEdge * e1, GtsVertex * v, GtsVertex * with) { GtsEdge * e = NULL; if (t->e1 != e1 && edge_use_vertex (t->e1, v)) e = t->e1; else if (t->e2 != e1 && edge_use_vertex (t->e2, v)) e = t->e2; else if (t->e3 != e1 && edge_use_vertex (t->e3, v)) e = t->e3; else return NULL; if (with != v) { GtsSegment * s = GTS_SEGMENT (e); if (s->v1 == v) s->v1 = with; if (s->v2 == v) s->v2 = with; with->segments = g_slist_prepend (with->segments, s); v->segments = g_slist_remove (v->segments, s); } return e; } static void triangle_next (GtsEdge * e, GtsVertex * v, GtsVertex * with) { GSList * i; if (e == NULL) return; i = e->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_OBJECT (t)->reserved) { GTS_OBJECT (t)->reserved = NULL; triangle_next (replace_vertex (t, e, v, with), v, with); } i = i->next; } } /** * gts_vertex_is_contact: * @v: a #GtsVertex. * @sever: if %TRUE and if @v is a contact vertex between two or more * sets of connected triangles replaces it with as many vertices, * clones of @v. * * Returns: the number of sets of connected triangles sharing @v as a * contact vertex. */ guint gts_vertex_is_contact (GtsVertex * v, gboolean sever) { GSList * triangles, * i; GtsVertex * with = v; guint ncomponent = 0; g_return_val_if_fail (v != NULL, 0); triangles = gts_vertex_triangles (v, NULL); i = triangles; while (i) { GTS_OBJECT (i->data)->reserved = i; i = i->next; } i = triangles; while (i) { GtsTriangle * t = i->data; if (GTS_OBJECT (t)->reserved) { GtsEdge * e; if (ncomponent && sever) with = GTS_VERTEX (gts_object_clone (GTS_OBJECT (v))); GTS_OBJECT (t)->reserved = NULL; e = replace_vertex (t, NULL, v, with); triangle_next (e, v, with); triangle_next (replace_vertex (t, e, v, with), v, with); ncomponent++; } i = i->next; } g_slist_free (triangles); return ncomponent; } /* GtsVertexNormal: Object */ static void vertex_normal_attributes (GtsVertex * v, GtsObject * e, GtsObject * t) { g_return_if_fail (GTS_IS_EDGE (e)); g_return_if_fail (GTS_IS_TRIANGLE (t)); if (GTS_IS_VERTEX_NORMAL (GTS_SEGMENT (e)->v1) && GTS_IS_VERTEX_NORMAL (GTS_SEGMENT (e)->v2)) { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (e)->v1); GtsPoint * p2 = GTS_POINT (GTS_SEGMENT (e)->v2); GtsPoint * p = GTS_POINT (v); gdouble a, b, lambda; guint i; a = p2->x - p1->x; b = p->x - p1->x; if (fabs (p2->y - p1->y) > fabs (a)) { a = p2->y - p1->y; b = p->y - p1->y; } if (fabs (p2->z - p1->z) > fabs (a)) { a = p2->z - p1->z; b = p->z - p1->z; } lambda = a != 0. ? b/a : 0.; for (i = 0; i < 3; i++) GTS_VERTEX_NORMAL (v)->n[i] = (1. - lambda)*GTS_VERTEX_NORMAL (GTS_SEGMENT (e)->v1)->n[i] + lambda*GTS_VERTEX_NORMAL (GTS_SEGMENT (e)->v2)->n[i]; } else { GtsVertex * v1, * v2, * v3; gts_triangle_vertices (GTS_TRIANGLE (t), &v1, &v2, &v3); if (GTS_IS_VERTEX_NORMAL (v1) && GTS_IS_VERTEX_NORMAL (v2) && GTS_IS_VERTEX_NORMAL (v3)) { GtsVector a1, a2, a3, det; guint i, j = 0; gdouble l1, l2; gts_vector_init (a1, GTS_POINT (v1), GTS_POINT (v)); gts_vector_init (a2, GTS_POINT (v1), GTS_POINT (v2)); gts_vector_init (a3, GTS_POINT (v1), GTS_POINT (v3)); gts_vector_cross (det, a2, a3); if (fabs (det[1]) > fabs (det[0])) j = 1; if (fabs (det[2]) > fabs (det[j])) j = 2; if (det[j] == 0.) { g_warning ("vertex_normal_attributes: det[%d] == 0.", j); return; } switch (j) { case 0: l1 = (a1[1]*a3[2] - a1[2]*a3[1])/det[0]; l2 = (a1[2]*a2[1] - a1[1]*a2[2])/det[0]; break; case 1: l1 = (a1[2]*a3[0] - a1[0]*a3[2])/det[1]; l2 = (a1[0]*a2[2] - a1[2]*a2[0])/det[1]; break; case 2: l1 = (a1[0]*a3[1] - a1[1]*a3[0])/det[2]; l2 = (a1[1]*a2[0] - a1[0]*a2[1])/det[2]; break; default: l1 = l2 = 0.; } for (i = 0; i < 3; i++) GTS_VERTEX_NORMAL (v)->n[i] = GTS_VERTEX_NORMAL (v1)->n[i]*(1. - l1 - l2) + GTS_VERTEX_NORMAL (v2)->n[i]*l1 + GTS_VERTEX_NORMAL (v3)->n[i]*l2; } } } static void gts_vertex_normal_class_init (GtsVertexClass * klass) { klass->intersection_attributes = vertex_normal_attributes; } GtsVertexClass * gts_vertex_normal_class (void) { static GtsVertexClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo gts_vertex_normal_info = { "GtsVertexNormal", sizeof (GtsVertexNormal), sizeof (GtsVertexClass), (GtsObjectClassInitFunc) gts_vertex_normal_class_init, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_vertex_class ()), >s_vertex_normal_info); } return klass; } /* GtsColorVertex: Object */ GtsVertexClass * gts_color_vertex_class (void) { static GtsVertexClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo gts_color_vertex_info = { "GtsColorVertex", sizeof (GtsColorVertex), sizeof (GtsVertexClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_vertex_class ()), >s_color_vertex_info); } return klass; } gts-snapshot-121130/src/gts-private.h0000644000175100017510000000244012055775440014376 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTS_PRIVATE_H__ #define __GTS_PRIVATE_H__ /* Debugging flags */ /* #define DEBUG_FUNCTIONS */ #ifdef DEBUG_FUNCTIONS /* #define DEBUG_LEAKS */ #define DEBUG_IDENTITY guint id (gpointer p); void id_insert (gpointer p); void id_remove (gpointer p); void gts_write_triangle (GtsTriangle * t, GtsPoint * o, FILE * fptr); void gts_write_segment (GtsSegment * s, GtsPoint * o, FILE * fptr); #endif /* DEBUG_FUNCTIONS */ #endif /* __GTS_PRIVATE_H__ */ gts-snapshot-121130/src/split.c0000644000175100017510000013420312055775440013262 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" #define DYNAMIC_SPLIT #define NEW /* #define DEBUG #define DEBUG_HEXPAND #define DEBUG_EXPAND */ struct _GtsSplitCFace { GtsFace * f; GtsTriangle ** a1, ** a2; }; typedef struct _CFace CFace; typedef struct _CFaceClass CFaceClass; struct _CFace { GtsObject object; GtsSplit * parent_split; GtsTriangle * t; guint flags; }; /* the size of the CFace structure must be smaller or equal to the size of the GtsFace structure as both structures use the same memory location */ struct _CFaceClass { GtsObjectClass parent_class; }; #define IS_CFACE(obj) (gts_object_is_from_class (obj, cface_class ())) #define CFACE(obj) ((CFace *) obj) #define CFACE_ORIENTATION(cf) ((cf)->flags & 0x1) #define CFACE_ORIENTATION_DIRECT(cf) ((cf)->flags |= 0x1) #define CFACE_VVS(cf) ((cf)->flags & 0x2) #define CFACE_VVS_DIRECT(cf) ((cf)->flags |= 0x2) #define CFACE_E1 0x4 #define CFACE_E2 0x8 #define CFACE_KEEP_VVS 0x10 #define ROTATE_ORIENT(e, e1, e2, e3) { if (e1 == e) { e1 = e2; e2 = e3; }\ else if (e2 == e) { e2 = e1; e1 = e3; }\ else g_assert (e3 == e); } #define SEGMENT_USE_VERTEX(s, v) ((s)->v1 == v || (s)->v2 == v) #define TRIANGLE_REPLACE_EDGE(t, e, with) { if ((t)->e1 == e)\ (t)->e1 = with;\ else if ((t)->e2 == e)\ (t)->e2 = with;\ else {\ g_assert ((t)->e3 == e);\ (t)->e3 = with;\ }\ } #define HEAP_INSERT_OBJECT(h, e) (GTS_OBJECT (e)->reserved =\ gts_eheap_insert (h, e)) #define HEAP_REMOVE_OBJECT(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\ GTS_OBJECT (e)->reserved = NULL) static GtsObjectClass * cface_class (void) { static GtsObjectClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo cface_info = { "GtsCFace", sizeof (CFace), sizeof (CFaceClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &cface_info); g_assert (sizeof (CFace) <= sizeof (GtsFace)); } return klass; } /* Replace @e with @with for all the triangles using @e but @f. Destroys @e and removes it from @heap (if not %NULL). Returns a triangle using e different from f or %NULL. */ static GtsTriangle * replace_edge_collapse (GtsEdge * e, GtsEdge * with, CFace * cf, GtsEHeap * heap #ifdef DYNAMIC_SPLIT , GtsTriangle *** a1 #endif #ifdef NEW , guint edge_flag #endif ) { GSList * i; GtsTriangle * rt = NULL; #ifdef DYNAMIC_SPLIT guint size; GtsTriangle ** a; #endif #ifdef NEW i = e->triangles; e->triangles = NULL; size = g_slist_length (i)*sizeof (GtsTriangle *); *a1 = a = g_malloc (size > 0 ? size : sizeof (GtsTriangle *)); while (i) { GtsTriangle * t = i->data; GSList * next = i->next; if (t != ((GtsTriangle *) cf)) { if (IS_CFACE (t)) { i->next = e->triangles; e->triangles = i; /* set the edge given by edge_flag (CFACE_E1 or CFACE_E2) */ GTS_OBJECT (t)->reserved = GUINT_TO_POINTER (edge_flag); cf->flags |= CFACE_KEEP_VVS; } else { TRIANGLE_REPLACE_EDGE (t, e, with); i->next = with->triangles; with->triangles = i; rt = t; *(a++) = t; } } else g_slist_free_1 (i); i = next; } *a = NULL; if (!e->triangles) { if (heap) HEAP_REMOVE_OBJECT (heap, e); gts_object_destroy (GTS_OBJECT (e)); } #else /* not NEW */ i = e->triangles; #ifdef DYNAMIC_SPLIT size = g_slist_length (i)*sizeof (GtsTriangle *); *a1 = a = g_malloc (size > 0 ? size : sizeof (GtsTriangle *)); #endif while (i) { GtsTriangle * t = i->data; GSList * next = i->next; if (t != ((GtsTriangle *) cf)) { TRIANGLE_REPLACE_EDGE (t, e, with); i->next = with->triangles; with->triangles = i; rt = t; #ifdef DYNAMIC_SPLIT *(a++) = t; #endif } else g_slist_free_1 (i); i = next; } #ifdef DYNAMIC_SPLIT *a = NULL; #endif if (heap) HEAP_REMOVE_OBJECT (heap, e); e->triangles = NULL; gts_object_destroy (GTS_OBJECT (e)); #endif /* NEW */ return rt; } static CFace * cface_new (GtsFace * f, GtsEdge * e, GtsVertex * v1, GtsVertex * v2, GtsSplit * vs, GtsEHeap * heap, GtsEdgeClass * klass #ifdef DYNAMIC_SPLIT , GtsSplitCFace * scf #endif ) { CFace * cf; GtsVertex * v; GtsEdge * e1, * e2, * e3, * vvs; GSList * i; GtsTriangle * t, * t1 = NULL, * t2 = NULL; guint flags; g_return_val_if_fail (f != NULL, NULL); #ifndef NEW g_return_val_if_fail (GTS_IS_FACE (f), NULL); #endif g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (vs != NULL, NULL); t = ((GtsTriangle *) f); if (heap) g_return_val_if_fail (!gts_triangle_is_duplicate (t), NULL); #ifdef NEW /* get CFACE_E1 and CFACE_E2 info */ flags = GPOINTER_TO_UINT (GTS_OBJECT (f)->reserved); #endif GTS_OBJECT_SET_FLAGS (f, GTS_DESTROYED); i = f->surfaces; while (i) { GSList * next = i->next; gts_surface_remove_face (i->data, f); i = next; } g_slist_free (f->surfaces); e1 = t->e1; e2 = t->e2; e3 = t->e3; ROTATE_ORIENT (e, e1, e2, e3); cf = (CFace *) f; #ifndef NEW GTS_OBJECT (cf)->klass = cface_class (); #else cf->flags = flags; #endif gts_object_init (GTS_OBJECT (cf), cface_class ()); cf->parent_split = vs; if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), v2)) { CFACE_ORIENTATION_DIRECT (cf); /* v1->v2->v */ e3 = e1; e1 = e2; e2 = e3; } v = GTS_SEGMENT (e1)->v1 == v1 ? GTS_SEGMENT (e1)->v2 : GTS_SEGMENT (e1)->v1; #ifdef NEW if ((cf->flags & CFACE_E1) || (cf->flags & CFACE_E2)) g_assert ((vvs = GTS_EDGE (gts_vertices_are_connected (vs->v, v)))); else #endif vvs = gts_edge_new (klass, v, vs->v); t1 = replace_edge_collapse (e1, vvs, cf, heap #ifdef DYNAMIC_SPLIT , &scf->a1 #endif #ifdef NEW , CFACE_E1 #endif ); t2 = replace_edge_collapse (e2, vvs, cf, heap #ifdef DYNAMIC_SPLIT , &scf->a2 #endif #ifdef NEW , CFACE_E2 #endif ); t = cf->t = t1 ? t1 : t2; g_assert (t); /* set up flags necessary to find vvs */ if (t->e1 == vvs) e2 = t->e2; else if (t->e2 == vvs) e2 = t->e3; else { g_assert (t->e3 == vvs); e2 = t->e1; } if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e2), v)) CFACE_VVS_DIRECT (cf); return cf; } static void find_vvs (GtsVertex * vs, GtsTriangle * t, GtsVertex ** v, GtsEdge ** vvs, gboolean orientation) { GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3, * tmp; if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e2), vs)) { tmp = e1; e1 = e2; e2 = e3; e3 = tmp; } else if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e3), vs)) { tmp = e1; e1 = e3; e3 = e2; e2 = tmp; } else g_assert (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), vs)); if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e2), vs) || !gts_segments_touch (GTS_SEGMENT (e1), GTS_SEGMENT (e2))) { tmp = e1; e1 = e2; e2 = e3; e3 = tmp; g_assert (gts_segments_touch (GTS_SEGMENT (e1), GTS_SEGMENT (e2))); } *vvs = orientation ? e1 : e3; if (GTS_SEGMENT (*vvs)->v1 != vs) { g_assert (GTS_SEGMENT (*vvs)->v2 == vs); *v = GTS_SEGMENT (*vvs)->v1; } else *v = GTS_SEGMENT (*vvs)->v2; } static void replace_edge_expand (GtsEdge * e, GtsEdge * with, GtsTriangle ** a, GtsVertex * v) { GtsTriangle ** i = a, * t; while ((t = *(i++))) { #ifdef DEBUG_EXPAND g_assert (!IS_CFACE (t)); fprintf (stderr, "replacing %p->%d: e: %p->%d with: %p->%d\n", t, id (t), e, id (e), with, id (with)); #endif TRIANGLE_REPLACE_EDGE (t, e, with); with->triangles = g_slist_prepend (with->triangles, t); if (GTS_OBJECT (t)->reserved) { /* apart from the triangles having e as an edge, t is the only triangle using v */ g_assert (GTS_OBJECT (t)->reserved == v); GTS_OBJECT (t)->reserved = NULL; } else GTS_OBJECT (t)->reserved = v; } } static void cface_expand (CFace * cf, GtsTriangle ** a1, GtsTriangle ** a2, GtsEdge * e, GtsVertex * v1, GtsVertex * v2, GtsVertex * vs, GtsEdgeClass * klass) { GtsVertex * v; GtsEdge * e1, * e2, * vvs; gboolean orientation; guint flags; g_return_if_fail (cf != NULL); g_return_if_fail (IS_CFACE (cf)); g_return_if_fail (e != NULL); g_return_if_fail (vs != NULL); flags = cf->flags; orientation = CFACE_ORIENTATION (cf); find_vvs (vs, cf->t, &v, &vvs, CFACE_VVS (cf)); #ifdef NEW if (flags & CFACE_E1) e1 = GTS_EDGE (gts_vertices_are_connected (v1, v)); else e1 = gts_edge_new (klass, v, v1); if (flags & CFACE_E2) e2 = GTS_EDGE (gts_vertices_are_connected (v2, v)); else e2 = gts_edge_new (klass, v, v2); #else e1 = gts_edge_new (v, v1); e2 = gts_edge_new (v, v2); #endif replace_edge_expand (vvs, e1, a1, v1); replace_edge_expand (vvs, e2, a2, v2); #ifdef NEW if (!(flags & CFACE_KEEP_VVS)) { g_slist_free (vvs->triangles); vvs->triangles = NULL; gts_object_destroy (GTS_OBJECT (vvs)); } #else g_slist_free (vvs->triangles); vvs->triangles = NULL; gts_object_destroy (GTS_OBJECT (vvs)); #endif /* gts_face_new : because I am "creating" a face */ GTS_OBJECT (cf)->klass = GTS_OBJECT_CLASS (gts_face_class ()); gts_object_init (GTS_OBJECT (cf), GTS_OBJECT (cf)->klass); if (orientation) gts_triangle_set (GTS_TRIANGLE (cf), e, e2, e1); else gts_triangle_set (GTS_TRIANGLE (cf), e, e1, e2); } static void split_destroy (GtsObject * object) { GtsSplit * vs = GTS_SPLIT (object); guint i = vs->ncf; GtsSplitCFace * cf = vs->cfaces; while (i--) { if (IS_CFACE (cf->f)) gts_object_destroy (GTS_OBJECT (cf->f)); g_free (cf->a1); g_free (cf->a2); cf++; } g_free (vs->cfaces); if (!gts_allow_floating_vertices && vs->v && vs->v->segments == NULL) gts_object_destroy (GTS_OBJECT (vs->v)); (* GTS_OBJECT_CLASS (gts_split_class ())->parent_class->destroy) (object); } static void split_class_init (GtsObjectClass * klass) { klass->destroy = split_destroy; } static void split_init (GtsSplit * split) { split->v1 = split->v2 = NULL; split->v = NULL; split->cfaces = NULL; split->ncf = 0; } /** * gts_split_class: * * Returns: the #GtsSplitClass. */ GtsSplitClass * gts_split_class (void) { static GtsSplitClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo split_info = { "GtsSplit", sizeof (GtsSplit), sizeof (GtsSplitClass), (GtsObjectClassInitFunc) split_class_init, (GtsObjectInitFunc) split_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &split_info); } return klass; } #ifdef DEBUG static gboolean edge_collapse_is_valid (GtsEdge * e) { GSList * i; g_return_val_if_fail (e != NULL, FALSE); if (gts_segment_is_duplicate (GTS_SEGMENT (e))) { g_warning ("collapsing duplicate edge"); return FALSE; } i = GTS_SEGMENT (e)->v1->segments; while (i) { GtsEdge * e1 = i->data; if (e1 != e && GTS_IS_EDGE (e1)) { GtsEdge * e2 = NULL; GSList * j = GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v1 ? GTS_SEGMENT (e1)->v2->segments : GTS_SEGMENT (e1)->v1->segments; while (j && !e2) { GtsEdge * e1 = j->data; if (GTS_IS_EDGE (e1) && (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v2 || GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e)->v2)) e2 = e1; j = j->next; } if (e2 && !gts_triangle_use_edges (e, e1, e2)) { g_warning ("collapsing empty triangle"); return FALSE; } } i = i->next; } if (gts_edge_is_boundary (e, NULL)) { GtsTriangle * t = e->triangles->data; if (gts_edge_is_boundary (t->e1, NULL) && gts_edge_is_boundary (t->e2, NULL) && gts_edge_is_boundary (t->e3, NULL)) { g_warning ("collapsing single triangle"); return FALSE; } } else { if (gts_vertex_is_boundary (GTS_SEGMENT (e)->v1, NULL) && gts_vertex_is_boundary (GTS_SEGMENT (e)->v2, NULL)) { g_warning ("collapsing two sides of a strip"); return FALSE; } if (gts_edge_belongs_to_tetrahedron (e)) { g_warning ("collapsing tetrahedron"); return FALSE; } } return TRUE; } #endif /* DEBUG */ static void print_split (GtsSplit * vs, FILE * fptr) { guint j; GtsSplitCFace * cf; g_return_if_fail (vs != NULL); g_return_if_fail (fptr != NULL); fprintf (fptr, "%p: v: %p v1: %p v2: %p ncf: %u cfaces: %p\n", vs, vs->v, vs->v1, vs->v2, vs->ncf, vs->cfaces); cf = vs->cfaces; j = vs->ncf; while (j--) { fprintf (stderr, " f: %p a1: %p a2: %p\n", cf->f, cf->a1, cf->a2); cf++; } } /** * gts_split_collapse: * @vs: a #GtsSplit. * @klass: a #GtsEdgeClass. * @heap: a #GtsEHeap or %NULL. * * Collapses the vertex split @vs. Any new edge created during the process will * be of class @klass. If heap is not %NULL, the new edges will be inserted * into it and the destroyed edges will be removed from it. */ void gts_split_collapse (GtsSplit * vs, GtsEdgeClass * klass, GtsEHeap * heap) { GtsEdge * e; GtsVertex * v, * v1, * v2; GSList * i, * end; #ifdef DYNAMIC_SPLIT GtsSplitCFace * cf; guint j; #endif #ifdef DEBUG gboolean invalid = FALSE; static guint ninvalid = 0; #endif g_return_if_fail (vs != NULL); g_return_if_fail (klass != NULL); v = vs->v; g_return_if_fail (v->segments == NULL); /* we don't want to destroy vertices */ gts_allow_floating_vertices = TRUE; v1 = GTS_SPLIT_V1 (vs); v2 = GTS_SPLIT_V2 (vs); g_assert ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2)))); #ifdef DEBUG fprintf (stderr, "collapsing %p: v1: %p v2: %p v: %p\n", vs, v1, v2, v); if (!edge_collapse_is_valid (e)) { char fname[80]; FILE * fptr; GSList * triangles, * i; g_warning ("invalid edge collapse"); invalid = TRUE; sprintf (fname, "invalid.%d", ninvalid); fptr = fopen (fname, "wt"); gts_write_segment (GTS_SEGMENT (e), GTS_POINT (v), fptr); triangles = gts_vertex_triangles (v1, NULL); triangles = gts_vertex_triangles (v2, triangles); i = triangles; while (i) { gts_write_triangle (i->data, GTS_POINT (v), fptr); i = i->next; } g_slist_free (triangles); fclose (fptr); } #endif i = e->triangles; #ifdef DYNAMIC_SPLIT cf = vs->cfaces; j = vs->ncf; while (j--) { g_free (cf->a1); g_free (cf->a2); cf++; } g_free (vs->cfaces); vs->ncf = g_slist_length (i); g_assert (vs->ncf > 0); cf = vs->cfaces = g_malloc (vs->ncf*sizeof (GtsSplitCFace)); #endif /* DYNAMIC_SPLIT */ #ifdef NEW while (i) { cf->f = i->data; g_assert (GTS_IS_FACE (cf->f)); GTS_OBJECT (cf->f)->klass = GTS_OBJECT_CLASS (cface_class ()); cf++; i = i->next; } i = e->triangles; cf = vs->cfaces; while (i) { cface_new (i->data, e, v1, v2, vs, heap, klass, cf); #ifdef DEBUG fprintf (stderr, "cface: %p->%d t: %p->%d a1: ", cf->f, id (cf->f), CFACE (cf->f)->t, id (CFACE (cf->f)->t)); { GtsTriangle * t, ** a; a = cf->a1; while ((t = *(a++))) fprintf (stderr, "%p->%d ", t, id (t)); fprintf (stderr, "a2: "); a = cf->a2; while ((t = *(a++))) fprintf (stderr, "%p->%d ", t, id (t)); fprintf (stderr, "\n"); } #endif cf++; i = i->next; } #else /* not NEW */ while (i) { cface_new (i->data, e, v1, v2, vs, heap #ifdef DYNAMIC_SPLIT , cf #endif /* DYNAMIC_SPLIT */ ); #ifdef DYNAMIC_SPLIT cf->f = i->data; cf++; #endif /* DYNAMIC_SPLIT */ i = i->next; } #endif /* NEW */ g_slist_free (e->triangles); e->triangles = NULL; gts_object_destroy (GTS_OBJECT (e)); gts_allow_floating_vertices = FALSE; end = NULL; i = v1->segments; while (i) { GtsSegment * s = i->data; if (s->v1 == v1) s->v1 = v; else s->v2 = v; end = i; i = i->next; } if (end) { end->next = v->segments; v->segments = v1->segments; v1->segments = NULL; } end = NULL; i = v2->segments; while (i) { GtsSegment * s = i->data; if (s->v1 == v2) s->v1 = v; else s->v2 = v; end = i; i = i->next; } if (end) { end->next = v->segments; v->segments = v2->segments; v2->segments = NULL; } #ifdef DEBUG if (invalid) { char fname[80]; FILE * fptr; GSList * triangles, * i; GtsSurface * surface = NULL; sprintf (fname, "invalid_after.%d", ninvalid); fptr = fopen (fname, "wt"); triangles = gts_vertex_triangles (v, NULL); i = triangles; while (i) { GtsTriangle * t = i->data; fprintf (stderr, "checking %p->%d\n", t, id (t)); g_assert (GTS_IS_FACE (t)); gts_write_triangle (t, GTS_POINT (v), fptr); surface = GTS_FACE (t)->surfaces->data; if (gts_triangle_is_duplicate (t)) fprintf (stderr, "%p->%d is duplicate\n", t, id (t)); if (gts_segment_is_duplicate (GTS_SEGMENT (t->e1))) fprintf (stderr, "e1 of %p->%d is duplicate\n", t, id (t)); if (gts_segment_is_duplicate (GTS_SEGMENT (t->e2))) fprintf (stderr, "e2 of %p->%d is duplicate\n", t, id (t)); if (gts_segment_is_duplicate (GTS_SEGMENT (t->e3))) fprintf (stderr, "e3 of %p->%d is duplicate\n", t, id (t)); i = i->next; } fclose (fptr); g_slist_free (triangles); #if 0 gts_split_expand (vs, surface); sprintf (fname, "invalid_after_after.%d", ninvalid); fptr = fopen (fname, "wt"); triangles = gts_vertex_triangles (v1, NULL); triangles = gts_vertex_triangles (v2, triangles); i = triangles; while (i) { GtsTriangle * t = i->data; gts_write_triangle (t, GTS_POINT (v), fptr); surface = GTS_FACE (t)->surfaces->data; if (gts_triangle_is_duplicate (t)) fprintf (stderr, "%p->%d is duplicate\n", t, id (t)); if (gts_segment_is_duplicate (GTS_SEGMENT (t->e1))) fprintf (stderr, "e1 of %p->%d is duplicate\n", t, id (t)); if (gts_segment_is_duplicate (GTS_SEGMENT (t->e2))) fprintf (stderr, "e2 of %p->%d is duplicate\n", t, id (t)); if (gts_segment_is_duplicate (GTS_SEGMENT (t->e3))) fprintf (stderr, "e3 of %p->%d is duplicate\n", t, id (t)); i = i->next; } fclose (fptr); g_slist_free (triangles); exit (1); #endif ninvalid++; } #endif } /** * gts_split_expand: * @vs: a #GtsSplit. * @s: a #GtsSurface. * @klass: a #GtsEdgeClass. * * Expands the vertex split @vs adding the newly created faces to @s. Any * new edge will be of class @klass. */ void gts_split_expand (GtsSplit * vs, GtsSurface * s, GtsEdgeClass * klass) { GSList * i; GtsEdge * e; GtsVertex * v, * v1, * v2; gboolean changed = FALSE; GtsSplitCFace * cf; guint j; g_return_if_fail (vs != NULL); g_return_if_fail (s != NULL); g_return_if_fail (klass != NULL); /* we don't want to destroy vertices */ gts_allow_floating_vertices = TRUE; v1 = GTS_SPLIT_V1 (vs); v2 = GTS_SPLIT_V2 (vs); v = vs->v; #ifdef DEBUG_EXPAND fprintf (stderr, "expanding %p->%d: v1: %p->%d v2: %p->%d v: %p->%d\n", vs, id (vs), v1, id (v1), v2, id (v2), v, id (v)); #endif e = gts_edge_new (klass, v1, v2); cf = vs->cfaces; j = vs->ncf; while (j--) { cface_expand (CFACE (cf->f), cf->a1, cf->a2, e, v1, v2, v, klass); gts_surface_add_face (s, cf->f); cf++; } gts_allow_floating_vertices = FALSE; /* this part is described by figure "expand.fig" */ i = v->segments; while (i) { GtsEdge * e1 = i->data; GtsVertex * with = NULL; GSList * j = e1->triangles, * next = i->next; // fprintf (stderr, "e1: %p->%d\n", e1, id (e1)); while (j && !with) { with = GTS_OBJECT (j->data)->reserved; j = j->next; } if (with) { j = e1->triangles; while (j) { GtsTriangle * t = j->data; if (GTS_OBJECT (t)->reserved) { g_assert (GTS_OBJECT (t)->reserved == with); GTS_OBJECT (t)->reserved = NULL; } else GTS_OBJECT (t)->reserved = with; j = j->next; } if (GTS_SEGMENT (e1)->v1 == v) GTS_SEGMENT (e1)->v1 = with; else GTS_SEGMENT (e1)->v2 = with; v->segments = g_slist_remove_link (v->segments, i); i->next = with->segments; with->segments = i; changed = TRUE; } if (next) i = next; else { /* check for infinite loop (the crossed out case in figure "expand.fig") */ g_assert (changed); changed = FALSE; i = v->segments; } } } static void cface_neighbors (GtsSplitCFace * cf, GtsEdge * e, GtsVertex * v1, GtsVertex * v2) { GtsTriangle * t = GTS_TRIANGLE (cf->f), ** a; GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3; GSList * i; guint size; ROTATE_ORIENT (e, e1, e2, e3); if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), v2)) { e3 = e1; e1 = e2; e2 = e3; } i = e1->triangles; size = g_slist_length (i)*sizeof (GtsTriangle *); a = cf->a1 = g_malloc (size > 0 ? size : sizeof (GtsTriangle *)); while (i) { if (i->data != t) *(a++) = i->data; i = i->next; } *a = NULL; i = e2->triangles; size = g_slist_length (i)*sizeof (GtsTriangle *); a = cf->a2 = g_malloc (size > 0 ? size : sizeof (GtsTriangle *)); while (i) { if (i->data != t) *(a++) = i->data; i = i->next; } *a = NULL; } /** * gts_split_new: * @klass: a #GtsSplitClass. * @v: a #GtsVertex. * @o1: either a #GtsVertex or a #GtsSplit. * @o2: either a #GtsVertex or a #GtsSplit. * * Creates a new #GtsSplit which would collapse @o1 and @o2 into @v. The * collapse itself is not performed. * * Returns: the new #GtsSplit. */ GtsSplit * gts_split_new (GtsSplitClass * klass, GtsVertex * v, GtsObject * o1, GtsObject * o2) { GtsSplit * vs; GtsVertex * v1, * v2; GtsEdge * e; GSList * i; GtsSplitCFace * cf; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (v != NULL, NULL); g_return_val_if_fail (GTS_IS_SPLIT (o1) || GTS_IS_VERTEX (o1), NULL); g_return_val_if_fail (GTS_IS_SPLIT (o2) || GTS_IS_VERTEX (o2), NULL); vs = GTS_SPLIT (gts_object_new (GTS_OBJECT_CLASS (klass))); vs->v = v; vs->v1 = o1; vs->v2 = o2; v1 = GTS_SPLIT_V1 (vs); v2 = GTS_SPLIT_V2 (vs); #ifdef DYNAMIC_SPLIT vs->ncf = 0; vs->cfaces = NULL; #else g_assert ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2)))); i = e->triangles; vs->ncf = g_slist_length (i); g_assert (vs->ncf > 0); cf = vs->cfaces = g_malloc (vs->ncf*sizeof (GtsSplitCFace)); while (i) { cf->f = i->data; cface_neighbors (cf, e, v1, v2); i = i->next; cf++; } #endif return vs; } static gboolean split_traverse_pre_order (GtsSplit * vs, GtsSplitTraverseFunc func, gpointer data) { if (func (vs, data)) return TRUE; if (GTS_IS_SPLIT (vs->v1) && split_traverse_pre_order (GTS_SPLIT (vs->v1), func, data)) return TRUE; if (GTS_IS_SPLIT (vs->v2) && split_traverse_pre_order (GTS_SPLIT (vs->v2), func, data)) return TRUE; return FALSE; } static gboolean split_depth_traverse_pre_order (GtsSplit * vs, guint depth, GtsSplitTraverseFunc func, gpointer data) { if (func (vs, data)) return TRUE; depth--; if (!depth) return FALSE; if (GTS_IS_SPLIT (vs->v1) && split_depth_traverse_pre_order (GTS_SPLIT (vs->v1), depth, func, data)) return TRUE; if (GTS_IS_SPLIT (vs->v2) && split_depth_traverse_pre_order (GTS_SPLIT (vs->v2), depth, func, data)) return TRUE; return FALSE; } static gboolean split_traverse_post_order (GtsSplit * vs, GtsSplitTraverseFunc func, gpointer data) { if (GTS_IS_SPLIT (vs->v1) && split_traverse_post_order (GTS_SPLIT (vs->v1), func, data)) return TRUE; if (GTS_IS_SPLIT (vs->v2) && split_traverse_post_order (GTS_SPLIT (vs->v2), func, data)) return TRUE; if (func (vs, data)) return TRUE; return FALSE; } static gboolean split_depth_traverse_post_order (GtsSplit * vs, guint depth, GtsSplitTraverseFunc func, gpointer data) { depth--; if (depth) { if (GTS_IS_SPLIT (vs->v1) && split_depth_traverse_post_order (GTS_SPLIT (vs->v1), depth, func, data)) return TRUE; if (GTS_IS_SPLIT (vs->v2) && split_depth_traverse_post_order (GTS_SPLIT (vs->v2), depth, func, data)) return TRUE; } if (func (vs, data)) return TRUE; return FALSE; } /** * gts_split_traverse: * @root: the #GtsSplit to start the traversal from. * @order: the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER. * @depth: the maximum depth of the traversal. Nodes below this depth * will not be visited. If depth is -1 all nodes in the tree are * visited. If depth is 1, only the root is visited. If depth is 2, * the root and its children are visited. And so on. * @func: the function to call for each visited #GtsHSplit. * @data: user data to pass to the function. * * Traverses the #GtsSplit tree having @root as root. Calls @func for each * #GtsSplit of the tree in the order specified by @order. If order is set * to G_PRE_ORDER @func is called for the #GtsSplit then its children, if order * is set to G_POST_ORDER @func is called for the children and then for the * #GtsSplit. */ void gts_split_traverse (GtsSplit * root, GTraverseType order, gint depth, GtsSplitTraverseFunc func, gpointer data) { g_return_if_fail (root != NULL); g_return_if_fail (func != NULL); g_return_if_fail (order < G_LEVEL_ORDER); g_return_if_fail (depth == -1 || depth > 0); switch (order) { case G_PRE_ORDER: if (depth < 0) split_traverse_pre_order (root, func, data); else split_depth_traverse_pre_order (root, depth, func, data); break; case G_POST_ORDER: if (depth < 0) split_traverse_post_order (root, func, data); else split_depth_traverse_post_order (root, depth, func, data); break; default: g_assert_not_reached (); } } /** * gts_split_height: * @root: a #GtsSplit. * * Returns: the maximum height of the vertex split tree having @root as root. */ guint gts_split_height (GtsSplit * root) { guint height = 0, tmp_height; g_return_val_if_fail (root != NULL, 0); if (GTS_IS_SPLIT (root->v1)) { tmp_height = gts_split_height (GTS_SPLIT (root->v1)); if (tmp_height > height) height = tmp_height; } if (GTS_IS_SPLIT (root->v2)) { tmp_height = gts_split_height (GTS_SPLIT (root->v2)); if (tmp_height > height) height = tmp_height; } return height + 1; } static gboolean list_array_are_identical (GSList * list, gpointer * array, gpointer excluded) { while (list) { gpointer data = list->data; if (data != excluded) { gboolean found = FALSE; gpointer * a = array; while (!found && *a) if (*(a++) == data) found = TRUE; if (!found) return FALSE; } list = list->next; } return TRUE; } #ifndef NEW gboolean gts_split_is_collapsable (GtsSplit * vs) { guint i; GtsSplitCFace * cf; GtsVertex * v1, * v2; GtsEdge * e; g_return_val_if_fail (vs != NULL, FALSE); v1 = GTS_SPLIT_V1 (vs); v2 = GTS_SPLIT_V2 (vs); g_return_val_if_fail ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2))), FALSE); #ifdef DYNAMIC_SPLIT if (!gts_edge_collapse_is_valid (e)) return FALSE; #else i = vs->ncf; cf = vs->cfaces; while (i--) { GtsTriangle * t = GTS_TRIANGLE (cf->f); GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3; ROTATE_ORIENT (e, e1, e2, e3); if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), v2)) { e3 = e1; e1 = e2; e2 = e3; } if (!list_array_are_identical (e1->triangles, (gpointer *) cf->a1, t)) return FALSE; if (!list_array_are_identical (e2->triangles, (gpointer *) cf->a2, t)) return FALSE; cf++; } #endif return TRUE; } #endif /* not NEW */ #ifdef DEBUG_HEXPAND static guint expand_level = 0; static void expand_indent (FILE * fptr) { guint i = expand_level; while (i--) fputc (' ', fptr); } #endif /** * gts_hsplit_force_expand: * @hs: a #GtsHSplit. * @hsurface: a #GtsHSurface. * * Forces the expansion of @hs by first expanding all its dependencies not * already expanded. */ void gts_hsplit_force_expand (GtsHSplit * hs, GtsHSurface * hsurface) { guint i; GtsSplitCFace * cf; g_return_if_fail (hs != NULL); g_return_if_fail (hsurface != NULL); g_return_if_fail (hs->nchild == 0); #ifdef DEBUG_HEXPAND expand_level += 2; #endif if (hs->parent && hs->parent->nchild == 0) { #ifdef DEBUG_HEXPAND expand_indent (stderr); fprintf (stderr, "expand parent %p\n", hs->parent); #endif gts_hsplit_force_expand (hs->parent, hsurface); } i = GTS_SPLIT (hs)->ncf; cf = GTS_SPLIT (hs)->cfaces; while (i--) { GtsTriangle ** j, * t; j = cf->a1; while ((t = *(j++))) if (IS_CFACE (t)) { #ifdef DEBUG_HEXPAND expand_indent (stderr); fprintf (stderr, "expand a1: cf->f: %p t: %p parent_split: %p\n", cf->f, t, GTS_HSPLIT (CFACE (t)->parent_split)); #endif gts_hsplit_force_expand (GTS_HSPLIT (CFACE (t)->parent_split), hsurface); #ifdef DEBUG_HEXPAND g_assert (!IS_CFACE (t)); #endif } j = cf->a2; while ((t = *(j++))) if (IS_CFACE (t)) { #ifdef DEBUG_HEXPAND expand_indent (stderr); fprintf (stderr, "expand a2: cf->f: %p t: %p parent_split: %p\n", cf->f, t, GTS_HSPLIT (CFACE (t)->parent_split)); #endif gts_hsplit_force_expand (GTS_HSPLIT (CFACE (t)->parent_split), hsurface); } cf++; } gts_hsplit_expand (hs, hsurface); #ifdef DEBUG_HEXPAND expand_level -= 2; expand_indent (stderr); fprintf (stderr, "%p expanded\n", hs); #endif } static void index_object (GtsObject * o, guint * n) { o->reserved = GUINT_TO_POINTER ((*n)++); } static void index_face (GtsFace * f, gpointer * data) { guint * nf = data[1]; g_hash_table_insert (data[0], f, GUINT_TO_POINTER ((*nf)++)); } /** * gts_psurface_write: * @ps: a #GtsPSurface. * @fptr: a file pointer. * * Writes to @fptr a GTS progressive surface description. */ void gts_psurface_write (GtsPSurface * ps, FILE * fptr) { guint nv = 1; guint nf = 1; GHashTable * hash; gpointer data[2]; g_return_if_fail (ps != NULL); g_return_if_fail (fptr != NULL); g_return_if_fail (GTS_PSURFACE_IS_CLOSED (ps)); while (gts_psurface_remove_vertex (ps)) ; GTS_POINT_CLASS (ps->s->vertex_class)->binary = FALSE; gts_surface_write (ps->s, fptr); gts_surface_foreach_vertex (ps->s, (GtsFunc) index_object, &nv); hash = g_hash_table_new (NULL, NULL); data[0] = hash; data[1] = &nf; gts_surface_foreach_face (ps->s, (GtsFunc) index_face, data); fprintf (fptr, "%u\n", ps->split->len); while (ps->pos) { GtsSplit * vs = g_ptr_array_index (ps->split, --ps->pos); GtsSplitCFace * scf = vs->cfaces; GtsVertex * v1, * v2; guint i = vs->ncf; fprintf (fptr, "%u %u", GPOINTER_TO_UINT (GTS_OBJECT (vs->v)->reserved), vs->ncf); if (GTS_OBJECT (vs)->klass->write) (*GTS_OBJECT (vs)->klass->write) (GTS_OBJECT (vs), fptr); fputc ('\n', fptr); v1 = GTS_IS_SPLIT (vs->v1) ? GTS_SPLIT (vs->v1)->v : GTS_VERTEX (vs->v1); GTS_OBJECT (v1)->reserved = GUINT_TO_POINTER (nv++); v2 = GTS_IS_SPLIT (vs->v2) ? GTS_SPLIT (vs->v2)->v : GTS_VERTEX (vs->v2); GTS_OBJECT (v2)->reserved = GUINT_TO_POINTER (nv++); (*GTS_OBJECT (v1)->klass->write) (GTS_OBJECT (v1), fptr); fputc ('\n', fptr); (*GTS_OBJECT (v2)->klass->write) (GTS_OBJECT (v2), fptr); fputc ('\n', fptr); while (i--) { CFace * cf = CFACE (scf->f); GtsTriangle ** a, * t; fprintf (fptr, "%u %u", GPOINTER_TO_UINT (g_hash_table_lookup (hash, cf->t)), cf->flags); if (GTS_OBJECT_CLASS (ps->s->face_class)->write) (*GTS_OBJECT_CLASS (ps->s->face_class)->write) (GTS_OBJECT (cf), fptr); fputc ('\n', fptr); a = scf->a1; while ((t = *(a++))) fprintf (fptr, "%u ", GPOINTER_TO_UINT (g_hash_table_lookup (hash, t))); fprintf (fptr, "\n"); a = scf->a2; while ((t = *(a++))) fprintf (fptr, "%u ", GPOINTER_TO_UINT (g_hash_table_lookup (hash, t))); fprintf (fptr, "\n"); g_hash_table_insert (hash, cf, GUINT_TO_POINTER (nf++)); scf++; } gts_split_expand (vs, ps->s, ps->s->edge_class); } gts_surface_foreach_vertex (ps->s, (GtsFunc) gts_object_reset_reserved, NULL); g_hash_table_destroy (hash); } static guint surface_read (GtsSurface * surface, GtsFile * f, GPtrArray * vertices, GPtrArray * faces) { GtsEdge ** edges; guint n, nv, ne, nf; g_return_val_if_fail (surface != NULL, 1); g_return_val_if_fail (f != NULL, 1); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer (number of vertices)"); return f->line; } nv = atoi (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer (number of edges)"); return f->line; } ne = atoi (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer (number of faces)"); return f->line; } nf = atoi (f->token->str); gts_file_next_token (f); if (f->type == GTS_STRING) { if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsSurfaceClass)"); return f->line; } gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsFaceClass)"); return f->line; } gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsEdgeClass)"); return f->line; } gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsVertexClass)"); return f->line; } if (!strcmp (f->token->str, "GtsVertexBinary")) GTS_POINT_CLASS (surface->vertex_class)->binary = TRUE; else gts_file_first_token_after (f, '\n'); } else gts_file_first_token_after (f, '\n'); g_ptr_array_set_size (vertices, nv); g_ptr_array_set_size (faces, nf); /* allocate nv + 1 just in case nv == 0 */ edges = g_malloc ((ne + 1)*sizeof (GtsEdge *)); n = 0; while (n < nv && f->type != GTS_ERROR) { GtsObject * new_vertex = gts_object_new (GTS_OBJECT_CLASS (surface->vertex_class)); (* GTS_OBJECT_CLASS (surface->vertex_class)->read) (&new_vertex, f); if (f->type != GTS_ERROR) { if (!GTS_POINT_CLASS (surface->vertex_class)->binary) gts_file_first_token_after (f, '\n'); g_ptr_array_index (vertices, n++) = new_vertex; } else gts_object_destroy (new_vertex); } if (f->type == GTS_ERROR) nv = n; if (GTS_POINT_CLASS (surface->vertex_class)->binary) gts_file_first_token_after (f, '\n'); n = 0; while (n < ne && f->type != GTS_ERROR) { guint p1, p2; if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (first vertex index)"); else { p1 = atoi (f->token->str); if (p1 == 0 || p1 > nv) gts_file_error (f, "vertex index `%d' is out of range `[1,%d]'", p1, nv); else { gts_file_next_token (f); if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (second vertex index)"); else { p2 = atoi (f->token->str); if (p2 == 0 || p2 > nv) gts_file_error (f, "vertex index `%d' is out of range `[1,%d]'", p2, nv); else { GtsEdge * new_edge = gts_edge_new (surface->edge_class, g_ptr_array_index (vertices, p1 - 1), g_ptr_array_index (vertices, p2 - 1)); gts_file_next_token (f); if (f->type != '\n') if (GTS_OBJECT_CLASS (surface->edge_class)->read) (*GTS_OBJECT_CLASS (surface->edge_class)->read) ((GtsObject **) &new_edge, f); gts_file_first_token_after (f, '\n'); edges[n++] = new_edge; } } } } } if (f->type == GTS_ERROR) ne = n; n = 0; while (n < nf && f->type != GTS_ERROR) { guint s1, s2, s3; if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (first edge index)"); else { s1 = atoi (f->token->str); if (s1 == 0 || s1 > ne) gts_file_error (f, "edge index `%d' is out of range `[1,%d]'", s1, ne); else { gts_file_next_token (f); if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (second edge index)"); else { s2 = atoi (f->token->str); if (s2 == 0 || s2 > ne) gts_file_error (f, "edge index `%d' is out of range `[1,%d]'", s2, ne); else { gts_file_next_token (f); if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (third edge index)"); else { s3 = atoi (f->token->str); if (s3 == 0 || s3 > ne) gts_file_error (f, "edge index `%d' is out of range `[1,%d]'", s3, ne); else { GtsFace * new_face = gts_face_new (surface->face_class, edges[s1 - 1], edges[s2 - 1], edges[s3 - 1]); gts_file_next_token (f); if (f->type != '\n') if (GTS_OBJECT_CLASS (surface->face_class)->read) (*GTS_OBJECT_CLASS (surface->face_class)->read) ((GtsObject **) &new_face, f); gts_file_first_token_after (f, '\n'); gts_surface_add_face (surface, new_face); g_ptr_array_index (faces, n++) = new_face; } } } } } } } g_free (edges); if (f->type == GTS_ERROR) { gts_allow_floating_vertices = TRUE; while (nv) gts_object_destroy (GTS_OBJECT (g_ptr_array_index (vertices, nv-- - 1))); gts_allow_floating_vertices = FALSE; return f->line; } return 0; } /** * gts_psurface_open: * @klass: a #GtsPSurfaceClass. * @s: a #GtsSurface. * @split_class: a #GtsSplitClass to use for the #GtsSplit. * @f: a #GtsFile. * * Creates a new #GtsPSurface prepared for input from the file @f * containing a valid GTS representation of a progressive surface. The initial * shape of the progressive surface is loaded into @s. * * Before being usable as such this progressive surface must be closed using * gts_psurface_close(). While open however, the functions * gts_psurface_get_vertex_number(), gts_psurface_min_vertex_number() and * gts_psurface_max_vertex_number() can still be used. * * Returns: a new #GtsPSurface or %NULL if there was a format error while * reading the file, in which case @f contains information about the error. */ GtsPSurface * gts_psurface_open (GtsPSurfaceClass * klass, GtsSurface * s, GtsSplitClass * split_class, GtsFile * f) { GtsPSurface * ps; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (split_class != NULL, NULL); g_return_val_if_fail (f != NULL, NULL); ps = GTS_PSURFACE (gts_object_new (GTS_OBJECT_CLASS (klass))); ps->s = s; ps->split_class = split_class; ps->vertices = g_ptr_array_new (); ps->faces = g_ptr_array_new (); if (surface_read (s, f, ps->vertices, ps->faces)) { ps->s = NULL; gts_object_destroy (GTS_OBJECT (ps)); return NULL; } ps->min = gts_surface_vertex_number (ps->s); ps->pos = 0; if (f->type == GTS_INT) { gint ns = atoi (f->token->str); if (ns > 0) { g_ptr_array_set_size (ps->split, ns); gts_file_first_token_after (f, '\n'); } } return ps; } /** * gts_psurface_read_vertex: * @ps: a #GtsPSurface prealably created with gts_psurface_open(). * @fp: a #GtsFile. * * Reads in one vertex split operation from @fp and performs the expansion. * * If an error occurs while reading the file, the @error field of @fp is set. * * Returns: the newly created #GtsSplit or %NULL if no vertex split could be * read from @fp. */ GtsSplit * gts_psurface_read_vertex (GtsPSurface * ps, GtsFile * fp) { guint nv, ncf; GtsSplit * vs, * parent; GtsSplitCFace * scf; g_return_val_if_fail (ps != NULL, NULL); g_return_val_if_fail (fp != NULL, NULL); g_return_val_if_fail (!GTS_PSURFACE_IS_CLOSED (ps), NULL); if (ps->pos >= ps->split->len) return NULL; if (fp->type == GTS_NONE) return NULL; if (fp->type != GTS_INT) { gts_file_error (fp, "expecting an integer (vertex index)"); return NULL; } nv = atoi (fp->token->str); if (nv == 0 || nv > ps->vertices->len) { gts_file_error (fp, "vertex index `%d' is out of range `[1,%d]'", nv, ps->vertices->len); return NULL; } gts_file_next_token (fp); if (fp->type != GTS_INT) { gts_file_error (fp, "expecting an integer (ncf)"); return NULL; } ncf = atoi (fp->token->str); vs = GTS_SPLIT (gts_object_new (GTS_OBJECT_CLASS (ps->split_class))); vs->v = g_ptr_array_index (ps->vertices, nv - 1); vs->v1 = vs->v2 = NULL; vs->cfaces = NULL; vs->ncf = 0; gts_file_next_token (fp); if (fp->type != '\n') if (GTS_OBJECT (vs)->klass->read) (* GTS_OBJECT (vs)->klass->read) ((GtsObject **) &vs, fp); gts_file_first_token_after (fp, '\n'); if (fp->type != GTS_ERROR) { vs->v1 = gts_object_new (GTS_OBJECT_CLASS (ps->s->vertex_class)); (* GTS_OBJECT_CLASS (ps->s->vertex_class)->read) (&(vs->v1), fp); if (fp->type != GTS_ERROR) { vs->v1->reserved = vs; g_ptr_array_add (ps->vertices, vs->v1); gts_file_first_token_after (fp, '\n'); vs->v2 = gts_object_new (GTS_OBJECT_CLASS (ps->s->vertex_class)); (*GTS_OBJECT_CLASS (ps->s->vertex_class)->read) (&(vs->v2), fp); if (fp->type != GTS_ERROR) { vs->v2->reserved = vs; g_ptr_array_add (ps->vertices, vs->v2); gts_file_first_token_after (fp, '\n'); } } } if (fp->type != GTS_ERROR) { scf = vs->cfaces = g_malloc (sizeof (GtsSplitCFace)*ncf); while (fp->type != GTS_ERROR && ncf--) { guint it, flags; GtsFace * f; CFace * cf; GPtrArray * a; if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (face index)"); else { it = atoi (fp->token->str); if (it == 0 || it > ps->faces->len) gts_file_error (fp, "face index `%d' is out of range `[1,%d]'", it, ps->faces->len); else { gts_file_next_token (fp); if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (flags)"); else { flags = atoi (fp->token->str); f = GTS_FACE (gts_object_new (GTS_OBJECT_CLASS (ps->s->face_class))); gts_file_next_token (fp); if (fp->type != '\n') if (GTS_OBJECT (f)->klass->read) (*GTS_OBJECT (f)->klass->read) ((GtsObject **) &f, fp); gts_file_first_token_after (fp, '\n'); if (fp->type != GTS_ERROR) { scf->f = f; cf = (CFace *) f; GTS_OBJECT (cf)->klass = GTS_OBJECT_CLASS (cface_class ()); cf->parent_split = vs; cf->t = g_ptr_array_index (ps->faces, it - 1); cf->flags = flags; a = g_ptr_array_new (); do { if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (face index)"); else { it = atoi (fp->token->str); if (it > ps->faces->len) gts_file_error (fp, "face index `%d' is out of range `[1,%d]'", it, ps->faces->len); else { g_ptr_array_add (a, g_ptr_array_index (ps->faces, it - 1)); gts_file_next_token (fp); } } } while (fp->type != GTS_ERROR && fp->type != '\n'); gts_file_first_token_after (fp, '\n'); g_ptr_array_add (a, NULL); scf->a1 = (GtsTriangle **) a->pdata; g_ptr_array_free (a, FALSE); if (fp->type != GTS_ERROR) { a = g_ptr_array_new (); do { if (fp->type != GTS_INT) gts_file_error (fp, "expecting an integer (face index)"); else { it = atoi (fp->token->str); if (it > ps->faces->len) gts_file_error (fp, "face index `%d' is out of range `[1,%d]'", it, ps->faces->len); else { g_ptr_array_add (a, g_ptr_array_index (ps->faces, it - 1)); gts_file_next_token (fp); } } } while (fp->type != GTS_ERROR && fp->type != '\n'); gts_file_first_token_after (fp, '\n'); g_ptr_array_add (a, NULL); scf->a2 = (GtsTriangle **) a->pdata; g_ptr_array_free (a, FALSE); g_ptr_array_add (ps->faces, f); vs->ncf++; scf++; } } } } } } } if (fp->type != GTS_ERROR) { if ((parent = GTS_OBJECT (vs->v)->reserved)) { GTS_OBJECT (vs->v)->reserved = NULL; if (parent->v1 == GTS_OBJECT (vs->v)) parent->v1 = GTS_OBJECT (vs); else { g_assert (parent->v2 == GTS_OBJECT (vs->v)); parent->v2 = GTS_OBJECT (vs); } } g_ptr_array_index (ps->split, ps->pos++) = vs; gts_split_expand (vs, ps->s, ps->s->edge_class); return vs; } if (vs->v1) gts_object_destroy (vs->v1); if (vs->v2) gts_object_destroy (vs->v2); gts_object_destroy (GTS_OBJECT (vs)); return NULL; } /** * gts_psurface_close: * @ps: a #GtsPSurface prealably created with gts_psurface_open(). * * Closes a progressive surface. */ void gts_psurface_close (GtsPSurface * ps) { g_return_if_fail (ps != NULL); g_return_if_fail (!GTS_PSURFACE_IS_CLOSED (ps)); g_ptr_array_free (ps->vertices, TRUE); g_ptr_array_free (ps->faces, TRUE); ps->faces = ps->vertices = NULL; gts_surface_foreach_vertex (ps->s, (GtsFunc) gts_object_reset_reserved, NULL); if (ps->pos > 0) g_ptr_array_set_size (ps->split, ps->pos); if (ps->split->len > 1) { guint i, half = ps->split->len/2, n = ps->split->len - 1; for (i = 0; i < half; i++) { gpointer p1 = g_ptr_array_index (ps->split, i); gpointer p2 = g_ptr_array_index (ps->split, n - i); g_ptr_array_index (ps->split, n - i) = p1; g_ptr_array_index (ps->split, i) = p2; } } ps->pos = 0; } gts-snapshot-121130/src/vopt.c0000644000175100017510000003367212055775440013127 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" /* #define DEBUG_VOPT */ /* compute the normal (nx, ny, nz) as the cross-product of the first two oriented edges and the norm nt = |t| as (v1xv2).v3 */ static void triangle_normal (GtsTriangle * t, gdouble * nx, gdouble * ny, gdouble * nz, gdouble * nt) { GtsPoint * p1, * p2 = NULL, * p3 = NULL; gdouble x1, y1, z1, x2, y2, z2; g_return_if_fail (t != NULL); p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) { p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) { p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v1); } else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) { p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v1); p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); } else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) { p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v2); } else g_assert_not_reached (); x1 = p2->x - p1->x; y1 = p2->y - p1->y; z1 = p2->z - p1->z; x2 = p3->x - p1->x; y2 = p3->y - p1->y; z2 = p3->z - p1->z; *nt = ((p1->y*p2->z - p1->z*p2->y)*p3->x + (p1->z*p2->x - p1->x*p2->z)*p3->y + (p1->x*p2->y - p1->y*p2->x)*p3->z); *nx = y1*z2 - z1*y2; *ny = z1*x2 - x1*z2; *nz = x1*y2 - y1*x2; } static void boundary_preservation (GtsEdge * edge, GtsFace * f, GtsVector e1, GtsVector e2, GtsMatrix * H, GtsVector c) { GtsTriangle * t = GTS_TRIANGLE (f); GtsEdge * edge2; GtsVertex * v1 = GTS_SEGMENT (edge)->v1, * v2 = GTS_SEGMENT (edge)->v2; GtsPoint * p1, * p2; GtsVector e, e3; /* find orientation of segment */ edge2 = edge == t->e1 ? t->e2 : edge == t->e2 ? t->e3 : t->e1; if (v2 != GTS_SEGMENT (edge2)->v1 && v2 != GTS_SEGMENT (edge2)->v2) { v2 = v1; v1 = GTS_SEGMENT (edge)->v2; } p1 = GTS_POINT (v1); p2 = GTS_POINT (v2); e[0] = p2->x - p1->x; e[1] = p2->y - p1->y; e[2] = p2->z - p1->z; e1[0] += e[0]; e1[1] += e[1]; e1[2] += e[2]; e3[0] = p2->y*p1->z - p2->z*p1->y; e3[1] = p2->z*p1->x - p2->x*p1->z; e3[2] = p2->x*p1->y - p2->y*p1->x; e2[0] += e3[0]; e2[1] += e3[1]; e2[2] += e3[2]; H[0][0] += e[1]*e[1] + e[2]*e[2]; H[0][1] -= e[0]*e[1]; H[0][2] -= e[0]*e[2]; H[1][0] = H[0][1]; H[1][1] += e[0]*e[0] + e[2]*e[2]; H[1][2] -= e[1]*e[2]; H[2][0] = H[0][2]; H[2][1] = H[1][2]; H[2][2] += e[0]*e[0] + e[1]*e[1]; c[0] += e[1]*e3[2] - e[2]*e3[1]; c[1] += e[2]*e3[0] - e[0]*e3[2]; c[2] += e[0]*e3[1] - e[1]*e3[0]; } static gdouble boundary_cost (GtsEdge * edge, GtsFace * f, GtsVertex * v) { GtsTriangle * t = GTS_TRIANGLE (f); GtsEdge * edge2; GtsVertex * v1 = GTS_SEGMENT (edge)->v1, * v2 = GTS_SEGMENT (edge)->v2; GtsPoint * p1, * p2; GtsVector e; GtsPoint * p = GTS_POINT (v); /* find orientation of segment */ edge2 = edge == t->e1 ? t->e2 : edge == t->e2 ? t->e3 : t->e1; if (v2 != GTS_SEGMENT (edge2)->v1 && v2 != GTS_SEGMENT (edge2)->v2) { v2 = v1; v1 = GTS_SEGMENT (edge)->v2; } p1 = GTS_POINT (v1); p2 = GTS_POINT (v2); e[0] = (p2->y - p1->y)*(p->z - p2->z) - (p2->z - p1->z)*(p->y - p2->y); e[1] = (p2->z - p1->z)*(p->x - p2->x) - (p2->x - p1->x)*(p->z - p2->z); e[2] = (p2->x - p1->x)*(p->y - p2->y) - (p2->y - p1->y)*(p->x - p2->x); return e[0]*e[0] + e[1]*e[1] + e[2]*e[2]; } static gdouble edge_boundary_cost (GtsEdge * e, GtsVertex * v) { gdouble cost = 0.; GSList * i; i = GTS_SEGMENT (e)->v1->segments; while (i) { GtsFace * f; if (GTS_IS_EDGE (i->data) && (f = gts_edge_is_boundary (i->data, NULL))) cost += boundary_cost (i->data, f, v); i = i->next; } i = GTS_SEGMENT (e)->v2->segments; while (i) { GtsFace * f; if (i->data != e && GTS_IS_EDGE (i->data) && (f = gts_edge_is_boundary (i->data, NULL))) cost += boundary_cost (i->data, f, v); i = i->next; } return cost/4.; } static gdouble edge_volume_cost (GtsEdge * e, GtsVertex * v) { GSList * i, * triangles; gdouble n1, n2, n3, nt; gdouble cost = 0.0, a; triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL); triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles); i = triangles; while (i) { if (GTS_IS_FACE (i->data)) { triangle_normal (i->data, &n1, &n2, &n3, &nt); a = GTS_POINT (v)->x*n1 + GTS_POINT (v)->y*n2 + GTS_POINT (v)->z*n3 - nt; cost += a*a; } i = i->next; } g_slist_free (triangles); return cost/36.; } static gdouble edge_shape_cost (GtsEdge * e, GtsVertex * v) { GSList * list, * i; GtsVertex * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2; gdouble cost = 0.; list = gts_vertex_neighbors (v1, NULL, NULL); list = gts_vertex_neighbors (v2, list, NULL); i = list; while (i) { GtsPoint * p = i->data; if (p != GTS_POINT (v1) && p != GTS_POINT (v2)) cost += gts_point_distance2 (p, GTS_POINT (v)); i = i->next; } g_slist_free (list); return cost; } /** * gts_volume_optimized_vertex: * @edge: a #GtsEdge. * @klass: a #GtsVertexClass to be used for the new vertex. * @params: a #GtsVolumeOptimizedParms. * * Returns: a #GtsVertex which can be used to replace @edge for an * edge collapse operation. The position of the vertex is optimized in * order to minimize the changes in area and volume for the surface * using @edge. The volume enclosed by the surface is locally * preserved. For more details see "Fast and memory efficient * polygonal simplification" (1998) and "Evaluation of memoryless * simplification" (1999) by Lindstrom and Turk. */ GtsVertex * gts_volume_optimized_vertex (GtsEdge * edge, GtsVertexClass * klass, GtsVolumeOptimizedParams * params) { GSList * triangles, * i; gdouble sn1 = 0., sn2 = 0., sn3 = 0.; gdouble sn11 = 0., sn22 = 0., sn33 = 0.; gdouble sn12 = 0., sn13 = 0., sn23 = 0.; gdouble st = 0., stn1 = 0., stn2 = 0., stn3 = 0.; gdouble n1, n2, n3, nt; GtsMatrix * A, * Ai; GtsVector A1, b; GtsVector e1 = {0., 0., 0.}, e2 = {0., 0., 0.}; GtsMatrix * Hb; GtsVector cb = {0., 0., 0.}; GtsVertex * v; GtsVertex * v1, * v2; guint n = 0, nb = 0; #ifdef DEBUG_VOPT guint nold = 0; #endif g_return_val_if_fail (edge != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (params != NULL, NULL); A = gts_matrix_zero (NULL); Hb = gts_matrix_zero (NULL); v1 = GTS_SEGMENT (edge)->v1; v2 = GTS_SEGMENT (edge)->v2; /* boundary preservation */ i = v1->segments; while (i) { GtsEdge * edge1 = i->data; GtsFace * f; if (GTS_IS_EDGE (edge1) && (f = gts_edge_is_boundary (edge1, NULL))) { boundary_preservation (edge1, f, e1, e2, Hb, cb); nb++; } i = i->next; } i = v2->segments; while (i) { GtsEdge * edge1 = i->data; GtsFace * f; if (edge1 != edge && GTS_IS_EDGE (edge1) && (f = gts_edge_is_boundary (edge1, NULL))) { boundary_preservation (edge1, f, e1, e2, Hb, cb); nb++; } i = i->next; } if (nb > 0) { GtsMatrix * H = gts_matrix_new ( e1[2]*e1[2] + e1[1]*e1[1], - e1[0]*e1[1], - e1[0]*e1[2], 0., - e1[0]*e1[1], e1[2]*e1[2] + e1[0]*e1[0], - e1[1]*e1[2], 0., - e1[0]*e1[2], - e1[1]*e1[2], e1[1]*e1[1] + e1[0]*e1[0], 0., 0., 0., 0., 0.); GtsVector c; c[0] = e1[1]*e2[2] - e1[2]*e2[1]; c[1] = e1[2]*e2[0] - e1[0]*e2[2]; c[2] = e1[0]*e2[1] - e1[1]*e2[0]; n = gts_matrix_quadratic_optimization (A, b, n, H, c); gts_matrix_destroy (H); } g_assert (n <= 2); #ifdef DEBUG_VOPT if (n != nold) { fprintf (stderr, "--- boundary preservation ---\n"); gts_matrix_print (A, stderr); gts_vector_print (b, stderr); nold = n; } #endif /* volume preservation */ triangles = gts_vertex_triangles (v1, NULL); triangles = gts_vertex_triangles (v2, triangles); i = triangles; while (i) { if (GTS_IS_FACE (i->data)) { triangle_normal (i->data, &n1, &n2, &n3, &nt); sn1 += n1; sn2 += n2; sn3 += n3; sn11 += n1*n1; sn22 += n2*n2; sn33 += n3*n3; sn12 += n1*n2; sn13 += n1*n3; sn23 += n2*n3; st += nt; stn1 += nt*n1; stn2 += nt*n2; stn3 += nt*n3; } i = i->next; } g_slist_free (triangles); A1[0] = sn1; A1[1] = sn2; A1[2] = sn3; n = gts_matrix_compatible_row (A, b, n, A1, st); #ifdef DEBUG_VOPT if (n != nold) { fprintf (stderr, "--- volume preservation ---\n"); gts_matrix_print (A, stderr); gts_vector_print (b, stderr); nold = n; } #endif #if 1 /* Weighted average of volume and boundary optimization */ if (n < 3) { /* volume optimization and boundary optimization */ GtsMatrix * H = gts_matrix_new (sn11, sn12, sn13, 0., sn12, sn22, sn23, 0., sn13, sn23, sn33, 0., 0., 0., 0., 0.); GtsVector c; gdouble le = 9.*params->boundary_weight* gts_point_distance2 (GTS_POINT (v1), GTS_POINT (v2)); guint i, j; c[0] = - stn1; c[1] = - stn2; c[2] = - stn3; if (nb > 0) for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) H[i][j] = params->volume_weight*H[i][j] + le*Hb[i][j]; c[i] = params->volume_weight*c[i] + le*cb[i]; } n = gts_matrix_quadratic_optimization (A, b, n, H, c); gts_matrix_destroy (H); } #ifdef DEBUG_VOPT if (n != nold) { fprintf (stderr, "--- volume and boundary optimization ---\n"); gts_matrix_print (A, stderr); gts_vector_print (b, stderr); nold = n; } #endif if (n < 3) { /* triangle shape optimization */ gdouble nv = 0.0; GtsMatrix * H; GtsVector c = {0., 0., 0.}; GSList * list, * i; list = gts_vertex_neighbors (v1, NULL, NULL); list = gts_vertex_neighbors (v2, list, NULL); i = list; while (i) { GtsPoint * p1 = i->data; if (p1 != GTS_POINT (v1) && p1 != GTS_POINT (v2)) { nv += 1.0; c[0] -= p1->x; c[1] -= p1->y; c[2] -= p1->z; } i = i->next; } g_slist_free (list); H = gts_matrix_new (nv, 0., 0., 0., 0., nv, 0., 0., 0., 0., nv, 0., 0., 0., 0., 0.); n = gts_matrix_quadratic_optimization (A, b, n, H, c); gts_matrix_destroy (H); } #ifdef DEBUG_VOPT if (n != nold) { fprintf (stderr, "--- triangle shape optimization ---\n"); gts_matrix_print (A, stderr); gts_vector_print (b, stderr); nold = n; } #endif #else /* Weighted average of volume, boundary and shape optimization */ if (n < 3) { /* volume optimization, boundary and shape optimization */ GtsMatrix * H; GtsVector c; gdouble l2 = gts_point_distance2 (GTS_POINT (v1), GTS_POINT (v2)); gdouble wv = params->volume_weight/32.; gdouble wb = params->boundary_weight/4.*l2; gdouble ws = params->shape_weight*l2*l2; gdouble nv = 0.0; GtsVector cs = {0., 0., 0.}; GSList * list, * i; list = gts_vertex_neighbors (v1, NULL, NULL); list = gts_vertex_neighbors (v2, list, NULL); i = list; while (i) { GtsPoint * p1 = i->data; if (p1 != GTS_POINT (v1) && p1 != GTS_POINT (v2)) { nv += 1.0; cs[0] -= p1->x; cs[1] -= p1->y; cs[2] -= p1->z; } i = i->next; } g_slist_free (list); H = gts_matrix_new (wv*sn11 + wb*Hb[0][0] + ws*nv, wv*sn12 + wb*Hb[0][1], wv*sn13 + wb*Hb[0][2], wv*sn12 + wb*Hb[1][0], wv*sn22 + wb*Hb[1][1] + ws*nv, wv*sn23 + wb*Hb[1][2], wv*sn13 + wb*Hb[2][0], wv*sn23 + wb*Hb[2][1], wv*sn33 + wb*Hb[2][2] + ws*nv); c[0] = - wv*stn1 + wb*cb[0] + ws*cs[0]; c[1] = - wv*stn2 + wb*cb[1] + ws*cs[1]; c[2] = - wv*stn3 + wb*cb[2] + ws*cs[2]; n = gts_matrix_quadratic_optimization (A, b, n, H, c); gts_matrix_destroy (H); } #ifdef DEBUG_VOPT if (n != nold) { fprintf (stderr, "--- volume, boundary and shape optimization ---\n"); gts_matrix_print (A, stderr); gts_vector_print (b, stderr); nold = n; } #endif #endif /* Weighted average of volume, boundary and shape optimization */ g_assert (n == 3); g_assert ((Ai = gts_matrix3_inverse (A))); v = gts_vertex_new (klass, Ai[0][0]*b[0] + Ai[0][1]*b[1] + Ai[0][2]*b[2], Ai[1][0]*b[0] + Ai[1][1]*b[1] + Ai[1][2]*b[2], Ai[2][0]*b[0] + Ai[2][1]*b[1] + Ai[2][2]*b[2]); gts_matrix_destroy (A); gts_matrix_destroy (Ai); gts_matrix_destroy (Hb); return v; } /** * gts_volume_optimized_cost: * @e: a #GtsEdge. * @params: a #GtsVolumeOptimizedParams. * * Returns: the cost for the collapse of @e as minimized by the function * gts_volume_optimized_vertex(). */ gdouble gts_volume_optimized_cost (GtsEdge * e, GtsVolumeOptimizedParams * params) { GtsVertex * v; gdouble cost; gdouble length2; g_return_val_if_fail (e != NULL, G_MAXDOUBLE); g_return_val_if_fail (params != NULL, G_MAXDOUBLE); v = gts_volume_optimized_vertex (e, gts_vertex_class (), params); length2 = gts_point_distance2 (GTS_POINT (GTS_SEGMENT (e)->v1), GTS_POINT (GTS_SEGMENT (e)->v2)); cost = params->volume_weight*edge_volume_cost (e, v) + params->boundary_weight*length2*edge_boundary_cost (e, v) + params->shape_weight*length2*length2*edge_shape_cost (e, v); gts_object_destroy (GTS_OBJECT (v)); return cost; } gts-snapshot-121130/src/bbtree.c0000644000175100017510000010120612055775440013367 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static void bbox_init (GtsBBox * bbox) { bbox->bounded = NULL; } /** * gts_bbox_class: * * Returns: the #GtsBBoxClass. */ GtsBBoxClass * gts_bbox_class (void) { static GtsBBoxClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo bbox_info = { "GtsBBox", sizeof (GtsBBox), sizeof (GtsBBoxClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) bbox_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &bbox_info); } return klass; } /** * gts_bbox_set: * @bbox: a #GtsBBox. * @bounded: the object to be bounded. * @x1: x-coordinate of the lower left corner. * @y1: y-coordinate of the lower left corner. * @z1: z-coordinate of the lower left corner. * @x2: x-coordinate of the upper right corner. * @y2: y-coordinate of the upper right corner. * @z2: z-coordinate of the upper right corner. * * Sets fields of @bbox. */ void gts_bbox_set (GtsBBox * bbox, gpointer bounded, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2) { g_return_if_fail (bbox != NULL); g_return_if_fail (x2 >= x1 && y2 >= y1 && z2 >= z1); bbox->x1 = x1; bbox->y1 = y1; bbox->z1 = z1; bbox->x2 = x2; bbox->y2 = y2; bbox->z2 = z2; bbox->bounded = bounded; } /** * gts_bbox_new: * @klass: a #GtsBBoxClass. * @bounded: the object to be bounded. * @x1: x-coordinate of the lower left corner. * @y1: y-coordinate of the lower left corner. * @z1: z-coordinate of the lower left corner. * @x2: x-coordinate of the upper right corner. * @y2: y-coordinate of the upper right corner. * @z2: z-coordinate of the upper right corner. * * Returns: a new #GtsBBox. */ GtsBBox * gts_bbox_new (GtsBBoxClass * klass, gpointer bounded, gdouble x1, gdouble y1, gdouble z1, gdouble x2, gdouble y2, gdouble z2) { GtsBBox * bbox; g_return_val_if_fail (klass != NULL, NULL); bbox = GTS_BBOX (gts_object_new (GTS_OBJECT_CLASS (klass))); gts_bbox_set (bbox, bounded, x1, y1, z1, x2, y2, z2); return bbox; } /** * gts_bbox_triangle: * @klass: a #GtsBBoxClass. * @t: a #GtsTriangle. * * Returns: a new #GtsBBox bounding box of @t. */ GtsBBox * gts_bbox_triangle (GtsBBoxClass * klass, GtsTriangle * t) { GtsBBox * bbox; GtsPoint * p; g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); p = GTS_POINT (GTS_SEGMENT (t->e1)->v1); bbox = gts_bbox_new (klass, t, p->x, p->y, p->z, p->x, p->y, p->z); p = GTS_POINT (GTS_SEGMENT (t->e1)->v2); if (p->x > bbox->x2) bbox->x2 = p->x; if (p->x < bbox->x1) bbox->x1 = p->x; if (p->y > bbox->y2) bbox->y2 = p->y; if (p->y < bbox->y1) bbox->y1 = p->y; if (p->z > bbox->z2) bbox->z2 = p->z; if (p->z < bbox->z1) bbox->z1 = p->z; p = GTS_POINT (gts_triangle_vertex (t)); if (p->x > bbox->x2) bbox->x2 = p->x; if (p->x < bbox->x1) bbox->x1 = p->x; if (p->y > bbox->y2) bbox->y2 = p->y; if (p->y < bbox->y1) bbox->y1 = p->y; if (p->z > bbox->z2) bbox->z2 = p->z; if (p->z < bbox->z1) bbox->z1 = p->z; return bbox; } /** * gts_bbox_segment: * @klass: a #GtsBBoxClass. * @s: a #GtsSegment. * * Returns: a new #GtsBBox bounding box of @s. */ GtsBBox * gts_bbox_segment (GtsBBoxClass * klass, GtsSegment * s) { GtsBBox * bbox; GtsPoint * p1, * p2; g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); bbox = gts_bbox_new (klass, s, 0., 0., 0., 0., 0., 0.); p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); if (p1->x > p2->x) { bbox->x2 = p1->x; bbox->x1 = p2->x; } else { bbox->x1 = p1->x; bbox->x2 = p2->x; } if (p1->y > p2->y) { bbox->y2 = p1->y; bbox->y1 = p2->y; } else { bbox->y1 = p1->y; bbox->y2 = p2->y; } if (p1->z > p2->z) { bbox->z2 = p1->z; bbox->z1 = p2->z; } else { bbox->z1 = p1->z; bbox->z2 = p2->z; } return bbox; } static void bbox_foreach_vertex (GtsPoint * p, GtsBBox * bb) { if (p->x < bb->x1) bb->x1 = p->x; if (p->y < bb->y1) bb->y1 = p->y; if (p->z < bb->z1) bb->z1 = p->z; if (p->x > bb->x2) bb->x2 = p->x; if (p->y > bb->y2) bb->y2 = p->y; if (p->z > bb->z2) bb->z2 = p->z; } /** * gts_bbox_surface: * @klass: a #GtsBBoxClass. * @surface: a #GtsSurface. * * Returns: a new #GtsBBox bounding box of @surface. */ GtsBBox * gts_bbox_surface (GtsBBoxClass * klass, GtsSurface * surface) { GtsBBox * bbox; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (surface != NULL, NULL); bbox = gts_bbox_new (klass, surface, 0., 0., 0., 0., 0., 0.); bbox->x1 = bbox->y1 = bbox->z1 = G_MAXDOUBLE; bbox->x2 = bbox->y2 = bbox->z2 = -G_MAXDOUBLE; gts_surface_foreach_vertex (surface, (GtsFunc) bbox_foreach_vertex, bbox); return bbox; } /** * gts_bbox_bboxes: * @klass: a #GtsBBoxClass. * @bboxes: a list of #GtsBBox. * * Returns: a new #GtsBBox bounding box of all the bounding boxes in * @bboxes. */ GtsBBox * gts_bbox_bboxes (GtsBBoxClass * klass, GSList * bboxes) { GtsBBox * bbox; GtsBBox * bb; g_return_val_if_fail (bboxes != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); bb = bboxes->data; bbox = gts_bbox_new (klass, bboxes, bb->x1, bb->y1, bb->z1, bb->x2, bb->y2, bb->z2); bboxes = bboxes->next; while (bboxes) { bb = bboxes->data; if (bb->x1 < bbox->x1) bbox->x1 = bb->x1; if (bb->y1 < bbox->y1) bbox->y1 = bb->y1; if (bb->z1 < bbox->z1) bbox->z1 = bb->z1; if (bb->x2 > bbox->x2) bbox->x2 = bb->x2; if (bb->y2 > bbox->y2) bbox->y2 = bb->y2; if (bb->z2 > bbox->z2) bbox->z2 = bb->z2; bboxes = bboxes->next; } return bbox; } /** * gts_bbox_points: * @klass: a #GtsBBoxClass. * @points: a list of #GtsPoint. * * Returns: a new #GtsBBox bounding box of @points. */ GtsBBox * gts_bbox_points (GtsBBoxClass * klass, GSList * points) { GtsPoint * p; GtsBBox * bbox; GSList * i; if (points == NULL) return NULL; p = points->data; bbox = gts_bbox_new (klass, points, p->x, p->y, p->z, p->x, p->y, p->z); i = points->next; while (i) { p = i->data; if (p->x > bbox->x2) bbox->x2 = p->x; else if (p->x < bbox->x1) bbox->x1 = p->x; if (p->y > bbox->y2) bbox->y2 = p->y; else if (p->y < bbox->y1) bbox->y1 = p->y; if (p->z > bbox->z2) bbox->z2 = p->z; else if (p->z < bbox->z1) bbox->z1 = p->z; i = i->next; } return bbox; } /** * gts_bboxes_are_overlapping: * @bb1: a #GtsBBox. * @bb2: a #GtsBBox. * * Returns: %TRUE if the bounding boxes @bb1 and @bb2 are overlapping * (including just touching), %FALSE otherwise. */ gboolean gts_bboxes_are_overlapping (GtsBBox * bb1, GtsBBox * bb2) { if (bb1 == bb2) return TRUE; if (bb1->x1 > bb2->x2) return FALSE; if (bb2->x1 > bb1->x2) return FALSE; if (bb1->y1 > bb2->y2) return FALSE; if (bb2->y1 > bb1->y2) return FALSE; if (bb1->z1 > bb2->z2) return FALSE; if (bb2->z1 > bb1->z2) return FALSE; return TRUE; } #define bbox_volume(bb) (((bb)->x2 -\ (bb)->x1)*\ ((bb)->y2 -\ (bb)->y1)*\ ((bb)->z2 -\ (bb)->z1)) /** * gts_bbox_diagonal2: * @bb: a #GtsBBox. * * Returns: the squared length of the diagonal of @bb. */ gdouble gts_bbox_diagonal2 (GtsBBox * bb) { gdouble x, y, z; g_return_val_if_fail (bb != NULL, 0.); x = bb->x2 - bb->x1; y = bb->y2 - bb->y1; z = bb->z2 - bb->z1; return x*x + y*y + z*z; } /** * gts_bbox_draw: * @bb: a #GtsBBox. * @fptr: a file pointer. * * Writes in file @fptr an OOGL (Geomview) description of @bb. */ void gts_bbox_draw (GtsBBox * bb, FILE * fptr) { g_return_if_fail (bb != NULL); fprintf (fptr, "OFF 8 6 12\n"); fprintf (fptr, "%g %g %g\n", bb->x1, bb->y1, bb->z1); fprintf (fptr, "%g %g %g\n", bb->x2, bb->y1, bb->z1); fprintf (fptr, "%g %g %g\n", bb->x2, bb->y2, bb->z1); fprintf (fptr, "%g %g %g\n", bb->x1, bb->y2, bb->z1); fprintf (fptr, "%g %g %g\n", bb->x1, bb->y1, bb->z2); fprintf (fptr, "%g %g %g\n", bb->x2, bb->y1, bb->z2); fprintf (fptr, "%g %g %g\n", bb->x2, bb->y2, bb->z2); fprintf (fptr, "%g %g %g\n", bb->x1, bb->y2, bb->z2); fputs ("4 3 2 1 0\n" "4 4 5 6 7\n" "4 2 3 7 6\n" "4 0 1 5 4\n" "4 0 4 7 3\n" "4 1 2 6 5\n", fptr); } #define MINMAX(x1, x2, xmin, xmax) { if (x1 < x2) { xmin = x1; xmax = x2; }\ else { xmin = x2; xmax = x1; } } /** * gts_bbox_point_distance2: * @bb: a #GtsBBox. * @p: a #GtsPoint. * @min: a pointer on a gdouble. * @max: a pointer on a gdouble. * * Sets @min and @max to lower and upper bounds for the square of the * Euclidean distance between the object contained in @bb and @p. For these * bounds to make any sense the bounding box must be "tight" i.e. each of the * 6 faces of the box must at least be touched by one point of the bounded * object. */ void gts_bbox_point_distance2 (GtsBBox * bb, GtsPoint * p, gdouble * min, gdouble * max) { gdouble x1, y1, z1, x2, y2, z2, x, y, z; gdouble dmin, dmax, xd1, xd2, yd1, yd2, zd1, zd2; gdouble mx, Mx, my, My, mz, Mz; g_return_if_fail (bb != NULL); g_return_if_fail (p != NULL); g_return_if_fail (min != NULL); g_return_if_fail (max != NULL); x1 = bb->x1; y1 = bb->y1; z1 = bb->z1; x2 = bb->x2; y2 = bb->y2; z2 = bb->z2; x = p->x; y = p->y; z = p->z; xd1 = (x1 - x)*(x1 - x); xd2 = (x - x2)*(x - x2); yd1 = (y1 - y)*(y1 - y); yd2 = (y - y2)*(y - y2); zd1 = (z1 - z)*(z1 - z); zd2 = (z - z2)*(z - z2); dmin = x < x1 ? xd1 : x > x2 ? xd2 : 0.0; dmin += y < y1 ? yd1 : y > y2 ? yd2 : 0.0; dmin += z < z1 ? zd1 : z > z2 ? zd2 : 0.0; MINMAX (xd1, xd2, mx, Mx); MINMAX (yd1, yd2, my, My); MINMAX (zd1, zd2, mz, Mz); dmax = mx + My + Mz; dmax = MIN (dmax, Mx + my + Mz); dmax = MIN (dmax, Mx + My + mz); *min = dmin; *max = dmax; } /** * gts_bbox_is_stabbed: * @bb: a #GtsBBox. * @p: a #GtsPoint. * * Returns: %TRUE if the ray starting at @p and ending at (+infty, * @p->y, @p->z) intersects with @bb, %FALSE otherwise. */ gboolean gts_bbox_is_stabbed (GtsBBox * bb, GtsPoint * p) { g_return_val_if_fail (bb != NULL, FALSE); g_return_val_if_fail (p != NULL, FALSE); if (p->x > bb->x2 || p->y < bb->y1 || p->y > bb->y2 || p->z < bb->z1 || p->z > bb->z2) return FALSE; return TRUE; } extern int triBoxOverlap (double boxcenter[3], double boxhalfsize[3], double triverts[3][3]); /** * gts_bbox_overlaps_triangle: * @bb: a #GtsBBox. * @t: a #GtsTriangle. * * This is a wrapper around the fast overlap test of Tomas * Akenine-Moller (http://www.cs.lth.se/home/Tomas_Akenine_Moller/). * * Returns: %TRUE if @bb overlaps with @t, %FALSE otherwise. */ gboolean gts_bbox_overlaps_triangle (GtsBBox * bb, GtsTriangle * t) { double bc[3], bh[3], tv[3][3]; GtsPoint * p1, * p2, * p3; g_return_val_if_fail (bb != NULL, FALSE); g_return_val_if_fail (t != NULL, FALSE); bc[0] = (bb->x2 + bb->x1)/2.; bh[0] = (bb->x2 - bb->x1)/2.; bc[1] = (bb->y2 + bb->y1)/2.; bh[1] = (bb->y2 - bb->y1)/2.; bc[2] = (bb->z2 + bb->z1)/2.; bh[2] = (bb->z2 - bb->z1)/2.; p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); p3 = GTS_POINT (gts_triangle_vertex (t)); tv[0][0] = p1->x; tv[0][1] = p1->y; tv[0][2] = p1->z; tv[1][0] = p2->x; tv[1][1] = p2->y; tv[1][2] = p2->z; tv[2][0] = p3->x; tv[2][1] = p3->y; tv[2][2] = p3->z; return triBoxOverlap (bc, bh, tv); } /** * gts_bbox_overlaps_segment: * @bb: a #GtsBBox. * @s: a #GtsSegment. * * This functions uses gts_bbox_overlaps_triangle() with a degenerate * triangle. * * Returns: %TRUE if @bb overlaps with @s, %FALSE otherwise. */ gboolean gts_bbox_overlaps_segment (GtsBBox * bb, GtsSegment * s) { double bc[3], bh[3], tv[3][3]; GtsPoint * p1, * p2, * p3; g_return_val_if_fail (bb != NULL, FALSE); g_return_val_if_fail (s != NULL, FALSE); bc[0] = (bb->x2 + bb->x1)/2.; bh[0] = (bb->x2 - bb->x1)/2.; bc[1] = (bb->y2 + bb->y1)/2.; bh[1] = (bb->y2 - bb->y1)/2.; bc[2] = (bb->z2 + bb->z1)/2.; bh[2] = (bb->z2 - bb->z1)/2.; p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); p3 = p1; tv[0][0] = p1->x; tv[0][1] = p1->y; tv[0][2] = p1->z; tv[1][0] = p2->x; tv[1][1] = p2->y; tv[1][2] = p2->z; tv[2][0] = p3->x; tv[2][1] = p3->y; tv[2][2] = p3->z; return triBoxOverlap (bc, bh, tv); } /** * gts_bb_tree_new: * @bboxes: a list of #GtsBBox. * * Builds a new hierarchy of bounding boxes for @bboxes. At each * level, the GNode->data field contains a #GtsBBox bounding box of * all the children. The tree is binary and is built by repeatedly * cutting in two approximately equal halves the bounding boxes at * each level until a leaf node (i.e. a bounding box given in @bboxes) * is reached. In order to minimize the depth of the tree, the cutting * direction is always chosen as perpendicular to the longest * dimension of the bounding box. * * Returns: a new hierarchy of bounding boxes. */ GNode * gts_bb_tree_new (GSList * bboxes) { GSList * i, * positive = NULL, * negative = NULL; GNode * node; GtsBBox * bbox; guint dir, np = 0, nn = 0; gdouble * p1, * p2; gdouble cut; g_return_val_if_fail (bboxes != NULL, NULL); if (bboxes->next == NULL) /* leaf node */ return g_node_new (bboxes->data); bbox = gts_bbox_bboxes (gts_bbox_class (), bboxes); node = g_node_new (bbox); if (bbox->x2 - bbox->x1 > bbox->y2 - bbox->y1) { if (bbox->z2 - bbox->z1 > bbox->x2 - bbox->x1) dir = 2; else dir = 0; } else if (bbox->z2 - bbox->z1 > bbox->y2 - bbox->y1) dir = 2; else dir = 1; p1 = (gdouble *) &bbox->x1; p2 = (gdouble *) &bbox->x2; cut = (p1[dir] + p2[dir])/2.; i = bboxes; while (i) { bbox = i->data; p1 = (gdouble *) &bbox->x1; p2 = (gdouble *) &bbox->x2; if ((p1[dir] + p2[dir])/2. > cut) { positive = g_slist_prepend (positive, bbox); np++; } else { negative = g_slist_prepend (negative, bbox); nn++; } i = i->next; } if (!positive) { GSList * last = g_slist_nth (negative, (nn - 1)/2); positive = last->next; last->next = NULL; } else if (!negative) { GSList * last = g_slist_nth (positive, (np - 1)/2); negative = last->next; last->next = NULL; } g_node_prepend (node, gts_bb_tree_new (positive)); g_slist_free (positive); g_node_prepend (node, gts_bb_tree_new (negative)); g_slist_free (negative); return node; } static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes) { *bboxes = g_slist_prepend (*bboxes, gts_bbox_triangle (gts_bbox_class (), t)); } /** * gts_bb_tree_surface: * @s: a #GtsSurface. * * Returns: a new hierarchy of bounding boxes bounding the faces of @s. */ GNode * gts_bb_tree_surface (GtsSurface * s) { GSList * bboxes = NULL; GNode * tree; g_return_val_if_fail (s != NULL, NULL); gts_surface_foreach_face (s, (GtsFunc) prepend_triangle_bbox, &bboxes); tree = gts_bb_tree_new (bboxes); g_slist_free (bboxes); return tree; } /** * gts_bb_tree_stabbed: * @tree: a bounding box tree. * @p: a #GtsPoint. * * Returns: a list of bounding boxes, leaves of @tree which are * stabbed by the ray defined by @p (see gts_bbox_is_stabbed()). */ GSList * gts_bb_tree_stabbed (GNode * tree, GtsPoint * p) { GSList * list = NULL; GtsBBox * bb; GNode * i; g_return_val_if_fail (tree != NULL, NULL); g_return_val_if_fail (p != NULL, NULL); bb = tree->data; if (!gts_bbox_is_stabbed (bb, p)) return NULL; if (tree->children == NULL) /* leaf node */ return g_slist_prepend (NULL, bb); i = tree->children; while (i) { list = g_slist_concat (list, gts_bb_tree_stabbed (i, p)); i = i->next; } return list; } /** * gts_bb_tree_overlap: * @tree: a bounding box tree. * @bbox: a #GtsBBox. * * Returns: a list of bounding boxes, leaves of @tree which overlap @bbox. */ GSList * gts_bb_tree_overlap (GNode * tree, GtsBBox * bbox) { GSList * list = NULL; GtsBBox * bb; GNode * i; g_return_val_if_fail (tree != NULL, NULL); g_return_val_if_fail (bbox != NULL, NULL); bb = tree->data; if (!gts_bboxes_are_overlapping (bbox, bb)) return NULL; if (tree->children == NULL) /* leaf node */ return g_slist_prepend (NULL, bb); i = tree->children; while (i) { list = g_slist_concat (list, gts_bb_tree_overlap (i, bbox)); i = i->next; } return list; } /** * gts_bb_tree_is_overlapping: * @tree: a bounding box tree. * @bbox: a #GtsBBox. * * Returns: %TRUE if any leaf of @tree overlaps @bbox, %FALSE otherwise. */ gboolean gts_bb_tree_is_overlapping (GNode * tree, GtsBBox * bbox) { GtsBBox * bb; GNode * i; g_return_val_if_fail (tree != NULL, FALSE); g_return_val_if_fail (bbox != NULL, FALSE); bb = tree->data; if (!gts_bboxes_are_overlapping (bbox, bb)) return FALSE; if (tree->children == NULL) /* leaf node */ return TRUE; i = tree->children; while (i) { if (gts_bb_tree_is_overlapping (i, bbox)) return TRUE; i = i->next; } return FALSE; } /** * gts_bb_tree_traverse_overlapping: * @tree1: a bounding box tree. * @tree2: a bounding box tree. * @func: a #GtsBBTreeTraverseFunc. * @data: user data to be passed to @func. * * Calls @func for each overlapping pair of leaves of @tree1 and @tree2. */ void gts_bb_tree_traverse_overlapping (GNode * tree1, GNode * tree2, GtsBBTreeTraverseFunc func, gpointer data) { GtsBBox * bb1, * bb2; g_return_if_fail (tree1 != NULL && tree2 != NULL); bb1 = tree1->data; bb2 = tree2->data; if (!gts_bboxes_are_overlapping (bb1, bb2)) return; if (tree1->children == NULL && tree2->children == NULL) (*func) (tree1->data, tree2->data, data); else if (tree2->children == NULL || (tree1->children != NULL && bbox_volume (bb1) > bbox_volume (bb2))) { GNode * i = tree1->children; while (i) { gts_bb_tree_traverse_overlapping (i, tree2, func, data); i = i->next; } } else { GNode * i = tree2->children; while (i) { gts_bb_tree_traverse_overlapping (tree1, i, func, data); i = i->next; } } } /** * gts_bb_tree_draw: * @tree: a bounding box tree. * @depth: a specified depth. * @fptr: a file pointer. * * Write in @fptr an OOGL (Geomview) description of @tree for the * depth specified by @depth. */ void gts_bb_tree_draw (GNode * tree, guint depth, FILE * fptr) { guint d; g_return_if_fail (tree != NULL); g_return_if_fail (fptr != NULL); d = g_node_depth (tree); if (d == 1) fprintf (fptr, "{ LIST"); if (d == depth) gts_bbox_draw (tree->data, fptr); else if (d < depth) { GNode * i = tree->children; while (i) { gts_bb_tree_draw (i, depth, fptr); i = i->next; } } if (d == 1) fprintf (fptr, "}\n"); } static void bb_tree_free (GNode * tree, gboolean free_leaves) { GNode * i; g_return_if_fail (tree != NULL); if (!free_leaves && tree->children == NULL) /* leaf node */ return; gts_object_destroy (tree->data); i = tree->children; while (i) { bb_tree_free (i, free_leaves); i = i->next; } } /** * gts_bb_tree_destroy: * @tree: a bounding box tree. * @free_leaves: if %TRUE the bounding boxes given by the user are freed. * * Destroys all the bounding boxes created by @tree and destroys the * tree itself. If @free_leaves is set to %TRUE, destroys boxes given * by the user when creating the tree (i.e. leaves of the tree). */ void gts_bb_tree_destroy (GNode * tree, gboolean free_leaves) { g_return_if_fail (tree != NULL); bb_tree_free (tree, free_leaves); g_node_destroy (tree); } static gdouble bb_tree_min_max (GNode * tree, GtsPoint * p, gdouble min_max, GSList ** list) { GNode * tree1, * tree2; gdouble min1, max1, min2, max2; if (tree->children == NULL) { *list = g_slist_prepend (*list, tree->data); return min_max; } tree1 = tree->children; gts_bbox_point_distance2 (tree1->data, p, &min1, &max1); if (max1 < min_max) min_max = max1; tree2 = tree1->next; gts_bbox_point_distance2 (tree2->data, p, &min2, &max2); if (max2 < min_max) min_max = max2; if (min1 < min2) { if (min1 <= min_max) { min_max = bb_tree_min_max (tree1, p, min_max, list); if (min2 <= min_max) min_max = bb_tree_min_max (tree2, p, min_max, list); } } else { if (min2 <= min_max) { min_max = bb_tree_min_max (tree2, p, min_max, list); if (min1 <= min_max) min_max = bb_tree_min_max (tree1, p, min_max, list); } } return min_max; } /** * gts_bb_tree_point_closest_bboxes: * @tree: a bounding box tree. * @p: a #GtsPoint. * * Returns: a list of #GtsBBox. One of the bounding boxes is assured to contain * the object of @tree closest to @p. */ GSList * gts_bb_tree_point_closest_bboxes (GNode * tree, GtsPoint * p) { gdouble min, min_max; GSList * list = NULL, * i, * prev = NULL; g_return_val_if_fail (tree != NULL, NULL); g_return_val_if_fail (p != NULL, NULL); gts_bbox_point_distance2 (tree->data, p, &min, &min_max); min_max = bb_tree_min_max (tree, p, min_max, &list); i = list; while (i) { GSList * next = i->next; gdouble min, max; gts_bbox_point_distance2 (i->data, p, &min, &max); if (min > min_max) { if (prev == NULL) list = next; else prev->next = next; g_slist_free_1 (i); } else prev = i; i = next; } return list; } /** * gts_bb_tree_point_distance: * @tree: a bounding box tree. * @p: a #GtsPoint. * @distance: a #GtsBBoxDistFunc. * @bbox: if not %NULL is set to the bounding box containing the closest * object. * * Returns: the distance as evaluated by @distance between @p and the closest * object in @tree. */ gdouble gts_bb_tree_point_distance (GNode * tree, GtsPoint * p, GtsBBoxDistFunc distance, GtsBBox ** bbox) { GSList * list, * i; gdouble dmin = G_MAXDOUBLE; g_return_val_if_fail (tree != NULL, dmin); g_return_val_if_fail (p != NULL, dmin); g_return_val_if_fail (distance != NULL, dmin); i = list = gts_bb_tree_point_closest_bboxes (tree, p); while (i) { gdouble d = (*distance) (p, GTS_BBOX (i->data)->bounded); if (fabs (d) < fabs (dmin)) { dmin = d; if (bbox) *bbox = i->data; } i = i->next; } g_slist_free (list); return dmin; } /** * gts_bb_tree_point_closest: * @tree: a bounding box tree. * @p: a #GtsPoint. * @closest: a #GtsBBoxClosestFunc. * @distance: if not %NULL is set to the distance between @p and the * new #GtsPoint. * * Returns: a new #GtsPoint, closest point to @p and belonging to an object of * @tree. */ GtsPoint * gts_bb_tree_point_closest (GNode * tree, GtsPoint * p, GtsBBoxClosestFunc closest, gdouble * distance) { GSList * list, * i; gdouble dmin = G_MAXDOUBLE; GtsPoint * np = NULL; g_return_val_if_fail (tree != NULL, NULL); g_return_val_if_fail (p != NULL, NULL); g_return_val_if_fail (closest != NULL, NULL); i = list = gts_bb_tree_point_closest_bboxes (tree, p); while (i) { GtsPoint * tp = (*closest) (p, GTS_BBOX (i->data)->bounded); gdouble d = gts_point_distance2 (tp, p); if (d < dmin) { if (np) gts_object_destroy (GTS_OBJECT (np)); np = tp; dmin = d; } else gts_object_destroy (GTS_OBJECT (tp)); i = i->next; } g_slist_free (list); if (distance) *distance = dmin; return np; } /** * gts_bb_tree_triangle_distance: * @tree: a bounding box tree. * @t: a #GtsTriangle. * @distance: a #GtsBBoxDistFunc. * @delta: spatial scale of the sampling to be used. * @range: a #GtsRange to be filled with the results. * * Given a triangle @t, points are sampled regularly on its surface * using @delta as increment. The distance from each of these points * to the closest object of @tree is computed using @distance and the * gts_bb_tree_point_distance() function. The fields of @range are * filled with the number of points sampled, the minimum, average and * maximum value and the standard deviation. */ void gts_bb_tree_triangle_distance (GNode * tree, GtsTriangle * t, GtsBBoxDistFunc distance, gdouble delta, GtsRange * range) { GtsPoint * p1, * p2, * p3, * p; GtsVector p1p2, p1p3; gdouble l1, t1, dt1; guint i, n1; g_return_if_fail (tree != NULL); g_return_if_fail (t != NULL); g_return_if_fail (distance != NULL); g_return_if_fail (delta > 0.); g_return_if_fail (range != NULL); gts_triangle_vertices (t, (GtsVertex **) &p1, (GtsVertex **) &p2, (GtsVertex **) &p3); gts_vector_init (p1p2, p1, p2); gts_vector_init (p1p3, p1, p3); gts_range_init (range); p = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class ()))); l1 = sqrt (gts_vector_scalar (p1p2, p1p2)); n1 = l1/delta + 1; dt1 = 1.0/(gdouble) n1; t1 = 0.0; for (i = 0; i <= n1; i++, t1 += dt1) { gdouble t2 = 1. - t1; gdouble x = t2*p1p3[0]; gdouble y = t2*p1p3[1]; gdouble z = t2*p1p3[2]; gdouble l2 = sqrt (x*x + y*y + z*z); guint j, n2 = (guint) (l2/delta + 1); gdouble dt2 = t2/(gdouble) n2; x = t2*p1->x + t1*p2->x; y = t2*p1->y + t1*p2->y; z = t2*p1->z + t1*p2->z; t2 = 0.0; for (j = 0; j <= n2; j++, t2 += dt2) { p->x = x + t2*p1p3[0]; p->y = y + t2*p1p3[1]; p->z = z + t2*p1p3[2]; gts_range_add_value (range, gts_bb_tree_point_distance (tree, p, distance, NULL)); } } gts_object_destroy (GTS_OBJECT (p)); gts_range_update (range); } /** * gts_bb_tree_segment_distance: * @tree: a bounding box tree. * @s: a #GtsSegment. * @distance: a #GtsBBoxDistFunc. * @delta: spatial scale of the sampling to be used. * @range: a #GtsRange to be filled with the results. * * Given a segment @s, points are sampled regularly on its length * using @delta as increment. The distance from each of these points * to the closest object of @tree is computed using @distance and the * gts_bb_tree_point_distance() function. The fields of @range are * filled with the number of points sampled, the minimum, average and * maximum value and the standard deviation. */ void gts_bb_tree_segment_distance (GNode * tree, GtsSegment * s, gdouble (*distance) (GtsPoint *, gpointer), gdouble delta, GtsRange * range) { GtsPoint * p1, * p2, * p; GtsVector p1p2; gdouble l, t, dt; guint i, n; g_return_if_fail (tree != NULL); g_return_if_fail (s != NULL); g_return_if_fail (distance != NULL); g_return_if_fail (delta > 0.); g_return_if_fail (range != NULL); p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); gts_vector_init (p1p2, p1, p2); gts_range_init (range); p = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class()))); l = sqrt (gts_vector_scalar (p1p2, p1p2)); n = (guint) (l/delta + 1); dt = 1.0/(gdouble) n; t = 0.0; for (i = 0; i <= n; i++, t += dt) { p->x = p1->x + t*p1p2[0]; p->y = p1->y + t*p1p2[1]; p->z = p1->z + t*p1p2[2]; gts_range_add_value (range, gts_bb_tree_point_distance (tree, p, distance, NULL)); } gts_object_destroy (GTS_OBJECT (p)); gts_range_update (range); } static void surface_distance_foreach_triangle (GtsTriangle * t, gpointer * data) { gdouble * delta = data[1]; GtsRange * range = data[2]; gdouble * total_area = data[3], area; GtsRange range_triangle; gts_bb_tree_triangle_distance (data[0], t, data[4], *delta, &range_triangle); if (range_triangle.min < range->min) range->min = range_triangle.min; if (range_triangle.max > range->max) range->max = range_triangle.max; range->n += range_triangle.n; area = gts_triangle_area (t); *total_area += area; range->sum += area*range_triangle.mean; range->sum2 += area*range_triangle.mean*range_triangle.mean; } /** * gts_bb_tree_surface_distance: * @tree: a bounding box tree. * @s: a #GtsSurface. * @distance: a #GtsBBoxDistFunc. * @delta: a sampling increment defined as the percentage of the diagonal * of the root bounding box of @tree. * @range: a #GtsRange to be filled with the results. * * Calls gts_bb_tree_triangle_distance() for each face of @s. The * fields of @range are filled with the minimum, maximum and average * distance. The average distance is defined as the sum of the average * distances for each triangle weighthed by their area and divided by * the total area of the surface. The standard deviation is defined * accordingly. The @n field of @range is filled with the number of * sampled points used. */ void gts_bb_tree_surface_distance (GNode * tree, GtsSurface * s, GtsBBoxDistFunc distance, gdouble delta, GtsRange * range) { gpointer data[5]; gdouble total_area = 0.; g_return_if_fail (tree != NULL); g_return_if_fail (s != NULL); g_return_if_fail (delta > 0. && delta < 1.); g_return_if_fail (range != NULL); gts_range_init (range); delta *= sqrt (gts_bbox_diagonal2 (tree->data)); data[0] = tree; data[1] = δ data[2] = range; data[3] = &total_area; data[4] = distance; gts_surface_foreach_face (s, (GtsFunc) surface_distance_foreach_triangle, data); if (total_area > 0.) { if (range->sum2 - range->sum*range->sum/total_area >= 0.) range->stddev = sqrt ((range->sum2 - range->sum*range->sum/total_area) /total_area); else range->stddev = 0.; range->mean = range->sum/total_area; } else range->min = range->max = range->mean = range->stddev = 0.; } static void surface_distance_foreach_boundary (GtsEdge * e, gpointer * data) { gdouble * delta = data[1]; GtsRange * range = data[2]; gdouble * total_length = data[3], length; GtsRange range_edge; if (gts_edge_is_boundary (e, NULL)) { GtsSegment * s = GTS_SEGMENT (e); gts_bb_tree_segment_distance (data[0], s, data[4], *delta, &range_edge); if (range_edge.min < range->min) range->min = range_edge.min; if (range_edge.max > range->max) range->max = range_edge.max; range->n += range_edge.n; length = gts_point_distance (GTS_POINT (s->v1), GTS_POINT (s->v2)); *total_length += length; range->sum += length*range_edge.mean; range->sum2 += length*range_edge.mean*range_edge.mean; } } /** * gts_bb_tree_surface_boundary_distance: * @tree: a bounding box tree. * @s: a #GtsSurface. * @distance: a #GtsBBoxDistFunc. * @delta: a sampling increment defined as the percentage of the diagonal * of the root bounding box of @tree. * @range: a #GtsRange to be filled with the results. * * Calls gts_bb_tree_segment_distance() for each edge boundary of @s. * The fields of @range are filled with the minimum, maximum and * average distance. The average distance is defined as the sum of the * average distances for each boundary edge weighthed by their length * and divided by the total length of the boundaries. The standard * deviation is defined accordingly. The @n field of @range is filled * with the number of sampled points used. */ void gts_bb_tree_surface_boundary_distance (GNode * tree, GtsSurface * s, gdouble (*distance) (GtsPoint *, gpointer), gdouble delta, GtsRange * range) { gpointer data[5]; gdouble total_length = 0.; g_return_if_fail (tree != NULL); g_return_if_fail (s != NULL); g_return_if_fail (delta > 0. && delta < 1.); g_return_if_fail (range != NULL); gts_range_init (range); delta *= sqrt (gts_bbox_diagonal2 (tree->data)); data[0] = tree; data[1] = δ data[2] = range; data[3] = &total_length; data[4] = distance; gts_surface_foreach_edge (s, (GtsFunc) surface_distance_foreach_boundary, data); if (total_length > 0.) { if (range->sum2 - range->sum*range->sum/total_length >= 0.) range->stddev = sqrt ((range->sum2 - range->sum*range->sum/total_length) /total_length); else range->stddev = 0.; range->mean = range->sum/total_length; } else range->min = range->max = range->mean = range->stddev = 0.; } gts-snapshot-121130/src/pgraph.c0000644000175100017510000003602512055775440013413 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" /* GtsGNodeSplit */ static void gnode_split_destroy (GtsObject * object) { GtsGNodeSplit * ns = GTS_GNODE_SPLIT (object); if (gts_container_size (GTS_CONTAINER (ns->n)) == 0) { g_assert (GTS_SLIST_CONTAINEE (ns->n)->containers == NULL); gts_object_destroy (GTS_OBJECT (ns->n)); } else { GtsGNode * n1 = GTS_GNODE_SPLIT_N1 (ns); GtsGNode * n2 = GTS_GNODE_SPLIT_N2 (ns); g_warning ("Memory deallocation for GtsGNodeSplit not fully implemented yet: memory leak!"); } (* GTS_OBJECT_CLASS (gts_gnode_split_class ())->parent_class->destroy) (object); } static void gnode_split_class_init (GtsGNodeSplitClass * klass) { GTS_OBJECT_CLASS (klass)->destroy = gnode_split_destroy; } static void gnode_split_init (GtsGNodeSplit * ns) { ns->n = NULL; ns->n1 = ns->n2 = NULL; } /** * gts_gnode_split_class: * * Returns: the #GtsGNodeSplitClass. */ GtsGNodeSplitClass * gts_gnode_split_class (void) { static GtsGNodeSplitClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo gnode_split_info = { "GtsGNodeSplit", sizeof (GtsGNodeSplit), sizeof (GtsGNodeSplitClass), (GtsObjectClassInitFunc) gnode_split_class_init, (GtsObjectInitFunc) gnode_split_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &gnode_split_info); } return klass; } /** * gts_gnode_split_new: * @klass: a #GtsGNodeSplitClass. * @n: a #GtsGNode. * @n1: a #GtsGNodeSplit or #GtsGNode. * @n2: a #GtsGNodeSplit or #GtsGNode. * * Creates a new #GtsGNodeSplit which would collapse @n1 and @n2 into * @n. The collapse itself is not performed. * * Returns: the new #GtsGNodeSplit. */ GtsGNodeSplit * gts_gnode_split_new (GtsGNodeSplitClass * klass, GtsGNode * n, GtsObject * n1, GtsObject * n2) { GtsGNodeSplit * ns; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (n != NULL, NULL); g_return_val_if_fail (GTS_IS_GNODE_SPLIT (n1) || GTS_IS_GNODE (n1), NULL); g_return_val_if_fail (GTS_IS_GNODE_SPLIT (n2) || GTS_IS_GNODE (n2), NULL); ns = GTS_GNODE_SPLIT (gts_object_new (GTS_OBJECT_CLASS (klass))); ns->n = n; ns->n1 = n1; ns->n2 = n2; return ns; } static void connect_edge (GtsGEdge * e, gpointer * data) { GtsGNode * n = data[0]; GtsGNode * n1 = data[1]; GtsGNode * n2 = data[2]; if (GTS_OBJECT (e)->reserved || /* edge is disconnected */ gts_gedge_connects (e, n1, n2)) return; if (e->n1 == n1 || e->n1 == n2) e->n1 = n; else if (e->n2 == n1 || e->n2 == n2) e->n2 = n; else g_assert_not_reached (); gts_container_add (GTS_CONTAINER (n), GTS_CONTAINEE (e)); } /** * gts_gnode_split_collapse: * @ns: a #GtsGNodeSplit. * @g: a #GtsGraph. * @klass: a #GtsWGEdgeClass. * * Collapses the node split @ns. Any new edge created during the * process will be of class @klass. */ void gts_gnode_split_collapse (GtsGNodeSplit * ns, GtsGraph * g, GtsWGEdgeClass * klass) { GtsGNode * n1, * n2; GSList * i; gpointer data[3]; g_return_if_fail (ns != NULL); g_return_if_fail (g != NULL); g_return_if_fail (gts_container_size (GTS_CONTAINER (ns->n)) == 0); n1 = GTS_GNODE_SPLIT_N1 (ns); n2 = GTS_GNODE_SPLIT_N2 (ns); /* look for triangles */ i = GTS_SLIST_CONTAINER (n1)->items; while (i) { GtsGEdge * e13 = i->data; GtsGNode * n3 = GTS_GNODE_NEIGHBOR (n1, e13); if (n3 != n2) { GSList * j = GTS_SLIST_CONTAINER (n3)->items; while (j) { GtsGEdge * e32 = j->data; GSList * next = j->next; GtsGNode * n4 = GTS_GNODE_NEIGHBOR (n3, e32); if (n4 == n2) { /* found triangle n1 (e13) n3 (e32) n2 */ gts_wgedge_new (klass, ns->n, n3, gts_gedge_weight (e13) + gts_gedge_weight (e32)); GTS_OBJECT (e13)->reserved = n3; GTS_OBJECT (e32)->reserved = n3; GTS_SLIST_CONTAINER (n3)->items = g_slist_remove (GTS_SLIST_CONTAINER (n3)->items, e32); } j = next; } if (GTS_OBJECT (e13)->reserved == n3) GTS_SLIST_CONTAINER (n3)->items = g_slist_remove (GTS_SLIST_CONTAINER (n3)->items, e13); } i = i->next; } /* connect edges to new node */ data[0] = ns->n; data[1] = n1; data[2] = n2; gts_container_foreach (GTS_CONTAINER (n1), (GtsFunc) connect_edge, data); gts_container_foreach (GTS_CONTAINER (n2), (GtsFunc) connect_edge, data); gts_allow_floating_gnodes = TRUE; gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (n1)); gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (n2)); gts_allow_floating_gnodes = FALSE; gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (ns->n)); } static void restore_edge (GtsGEdge * e, gpointer * data) { GtsGNode * n = data[0]; GtsGNode * n1 = data[1]; GtsGNode * n2 = data[2]; GtsGNode * n3 = GTS_OBJECT (e)->reserved; if (n3) { /* e is a disconnected edge */ GTS_OBJECT (e)->reserved = NULL; gts_container_add (GTS_CONTAINER (n3), GTS_CONTAINEE (e)); return; } if (gts_gedge_connects (e, n1, n2)) return; if (e->n1 == n) e->n1 = n1; else if (e->n2 == n) e->n2 = n1; else g_assert_not_reached (); GTS_SLIST_CONTAINER (n)->items = g_slist_remove (GTS_SLIST_CONTAINER (n)->items, e); } /** * gts_gnode_split_expand: * @ns: a #GtsGNodeSplit. * @g: a #GtsGraph. * * Expands the node split ns adding the new nodes to @g. */ void gts_gnode_split_expand (GtsGNodeSplit * ns, GtsGraph * g) { GtsGNode * n1, * n2; gpointer data[3]; GSList * i; g_return_if_fail (ns != NULL); g_return_if_fail (g != NULL); g_return_if_fail (gts_containee_is_contained (GTS_CONTAINEE (ns->n), GTS_CONTAINER (g))); n1 = GTS_GNODE_SPLIT_N1 (ns); n2 = GTS_GNODE_SPLIT_N2 (ns); data[0] = ns->n; data[1] = n1; data[2] = n2; gts_container_foreach (GTS_CONTAINER (n1), (GtsFunc) restore_edge, data); data[1] = n2; data[2] = n1; gts_container_foreach (GTS_CONTAINER (n2), (GtsFunc) restore_edge, data); i = GTS_SLIST_CONTAINER (ns->n)->items; while (i) { GSList * next = i->next; gts_container_remove (GTS_CONTAINER (ns->n), GTS_CONTAINEE (i->data)); i = next; } g_assert (gts_container_size (GTS_CONTAINER (ns->n)) == 0); gts_allow_floating_gnodes = TRUE; gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (ns->n)); gts_allow_floating_gnodes = FALSE; gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n1)); gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n2)); } /* GtsPGraph */ static void pgraph_destroy (GtsObject * object) { GtsPGraph * pg = GTS_PGRAPH (object); guint i; for (i = 0; i < pg->split->len; i++) gts_object_destroy (GTS_OBJECT (g_ptr_array_index (pg->split, i))); g_ptr_array_free (pg->split, TRUE); g_array_free (pg->levels, TRUE); (* GTS_OBJECT_CLASS (gts_pgraph_class ())->parent_class->destroy) (object); } static void pgraph_class_init (GtsPGraphClass * klass) { GTS_OBJECT_CLASS (klass)->destroy = pgraph_destroy; } static void pgraph_init (GtsPGraph * pg) { pg->g = NULL; pg->split = g_ptr_array_new (); pg->levels = g_array_new (FALSE, FALSE, sizeof (guint)); pg->level = 0; pg->split_class = gts_gnode_split_class (); pg->edge_class = gts_wgedge_class (); pg->pos = pg->min = 0; } /** * gts_pgraph_class: * * Returns: the #GtsPGraphClass. */ GtsPGraphClass * gts_pgraph_class (void) { static GtsPGraphClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo pgraph_info = { "GtsPGraph", sizeof (GtsPGraph), sizeof (GtsPGraphClass), (GtsObjectClassInitFunc) pgraph_class_init, (GtsObjectInitFunc) pgraph_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &pgraph_info); } return klass; } static void match_neighbor (GtsGNode * n, gpointer * data) { if (!GTS_OBJECT (n)->reserved) { GtsGraph * g = data[0]; GSList ** list = data[1]; GSList * i = GTS_SLIST_CONTAINER (n)->items; gfloat wmax = - G_MAXFLOAT; GtsGEdge * emax = NULL; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (!GTS_OBJECT (n1)->reserved && gts_gedge_weight (i->data) > wmax && gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) { emax = i->data; wmax = gts_gedge_weight (emax); } i = i->next; } if (emax) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, emax); GTS_OBJECT (n1)->reserved = n; GTS_OBJECT (n)->reserved = n1; *list = g_slist_prepend (*list, emax); } } } static GSList * maximal_matching (GtsGraph * g) { GSList * list = NULL; gpointer data[2]; data[0] = g; data[1] = &list; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) match_neighbor, data); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) gts_object_reset_reserved, NULL); return list; } /** * gts_pgraph_new: * @klass: a #GtsPGraphClass. * @g: a #GtsGraph. * @split_class: a #GtsGNodeSplitClass. * @node_class: a #GtsWGNodeClass. * @edge_class: a #GtsWGEdgeClass. * @min: the minimum number of nodes. * * Creates a new multilevel approximation of graph @g. At each level a * maximal matching is created using the Heavy Edge Matching (HEM) * technique of Karypis and Kumar (1997). The newly created nodes are * of type @node_class and their weight is set to the sum of the * weights of their children. The newly created edges are of type * @edge_class and their weight is set to the sum of the weight of the * collapsed edges. The last level is reached when the maximal * matching obtained would lead to a graph with less than @min nodes. * * Returns: the new #GtsPGraph containing the multilevel * representation of @g. */ GtsPGraph * gts_pgraph_new (GtsPGraphClass * klass, GtsGraph * g, GtsGNodeSplitClass * split_class, GtsWGNodeClass * node_class, GtsWGEdgeClass * edge_class, guint min) { GtsPGraph * pg; GSList * matching; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (g != NULL, NULL); g_return_val_if_fail (split_class != NULL, NULL); g_return_val_if_fail (node_class != NULL, NULL); g_return_val_if_fail (edge_class != NULL, NULL); pg = GTS_PGRAPH (gts_object_new (GTS_OBJECT_CLASS (klass))); pg->g = g; pg->split_class = split_class; pg->edge_class = edge_class; while (gts_container_size (GTS_CONTAINER (g)) > min && (matching = maximal_matching (g))) { GSList * i = matching; guint size = gts_container_size (GTS_CONTAINER (g)); g_array_append_val (pg->levels, size); while (i && gts_container_size (GTS_CONTAINER (g)) > min) { GtsGEdge * e = i->data; GtsGNode * n = GTS_GNODE (gts_wgnode_new (node_class, gts_gnode_weight (e->n1) + gts_gnode_weight (e->n2))); GtsGNodeSplit * ns = gts_gnode_split_new (split_class, n, GTS_OBJECT (e->n1), GTS_OBJECT (e->n2)); gts_gnode_split_collapse (ns, g, edge_class); g_ptr_array_add (pg->split, ns); i = i->next; } g_slist_free (matching); } pg->pos = pg->split->len; pg->min = gts_container_size (GTS_CONTAINER (g)); pg->level = pg->levels->len; return pg; } /** * gts_pgraph_add_node: * @pg: a #GtsPGraph. * * Adds one node to the multilevel graph @pg by expanding the next * available #GtsGNodeSplit. * * Returns: the expanded #GtsGNodeSplit or #NULL if all the * #GtsGNodeSplit have already been expanded. */ GtsGNodeSplit * gts_pgraph_add_node (GtsPGraph * pg) { GtsGNodeSplit * ns; g_return_val_if_fail (pg != NULL, NULL); if (pg->pos == 0) return NULL; ns = g_ptr_array_index (pg->split, --pg->pos); gts_gnode_split_expand (ns, pg->g); return ns; } /** * gts_pgraph_remove_node: * @pg: a #GtsPGraph. * * Removes one node from the multilevel graph @pg by collapsing the * first available #GtsGNodeSplit. * * Returns: the collapsed #GtsGNodeSplit or %NULL if all the * #GtsGNodeSplit have already been collapsed. */ GtsGNodeSplit * gts_pgraph_remove_node (GtsPGraph * pg) { GtsGNodeSplit * ns; g_return_val_if_fail (pg != NULL, NULL); if (pg->pos == pg->split->len) return NULL; ns = g_ptr_array_index (pg->split, pg->pos++); gts_gnode_split_collapse (ns, pg->g, pg->edge_class); return ns; } /** * gts_pgraph_max_node_number: * @pg: a #GtsPGraph. * * Returns: the maximum number of nodes of @pg i.e. the number of * nodes if all the #GtsGNodeSplit were expanded. */ guint gts_pgraph_max_node_number (GtsPGraph * pg) { g_return_val_if_fail (pg != NULL, 0); return pg->min + pg->split->len; } /** * gts_pgraph_min_node_number: * @pg: a #GtsPGraph. * * Returns: the minimum number of nodes of @pg i.e. the number of * nodes if all the #GtsGNodeSplit were collapsed. */ guint gts_pgraph_min_node_number (GtsPGraph * pg) { g_return_val_if_fail (pg != NULL, 0); return pg->min; } /** * gts_pgraph_set_node_number: * @pg: a #GtsPGraph. * @n: a number of nodes. * * Performs the required number of collapses or expansions to set the * number of nodes of @pg to @n. */ void gts_pgraph_set_node_number (GtsPGraph * pg, guint n) { g_return_if_fail (pg != NULL); n = pg->min + pg->split->len - n; while (pg->pos > n && gts_pgraph_add_node (pg)) ; while (pg->pos < n && gts_pgraph_remove_node (pg)) ; } /** * gts_pgraph_get_node_number: * @pg: a #GtsPGraph. * * Returns: the current number of nodes of @pg. */ guint gts_pgraph_get_node_number (GtsPGraph * pg) { g_return_val_if_fail (pg != NULL, 0); return pg->min + pg->split->len - pg->pos; } /** * gts_pgraph_down: * @pg: a #GtsPGraph. * @func: a #GtsFunc or %NULL. * @data: user data to pass to @func. * * Performs the required number of expansions to go from the current * level to the level immediately below. * * If @func is not %NULL, it is called after each #GtsGNodeSplit has * been expanded. * * Returns: %FALSE if it is not possible to go down one level, %TRUE * otherwise. */ gboolean gts_pgraph_down (GtsPGraph * pg, GtsFunc func, gpointer data) { guint size; g_return_val_if_fail (pg != NULL, FALSE); if (pg->level == 0) return FALSE; size = g_array_index (pg->levels, guint, --(pg->level)); while (gts_container_size (GTS_CONTAINER (pg->g)) < size) { GtsGNodeSplit * ns = gts_pgraph_add_node (pg); g_assert (ns); if (func) (* func) (ns, data); } return TRUE; } gts-snapshot-121130/src/hsurface.c0000644000175100017510000002576012055775440013736 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gts.h" #define HEAP_INSERT_HSPLIT(h, e) ((e)->index = gts_eheap_insert (h, e)) #define HEAP_REMOVE_HSPLIT(h, e) (gts_eheap_remove (h, (e)->index),\ (e)->index = NULL) static void hsplit_init (GtsHSplit * hsplit) { hsplit->index = NULL; hsplit->parent = NULL; hsplit->nchild = 0; } /** * gts_hsplit_class: * * Returns: the #GtsHSplitClass. */ GtsHSplitClass * gts_hsplit_class (void) { static GtsHSplitClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo hsplit_info = { "GtsHSplit", sizeof (GtsHSplit), sizeof (GtsHSplitClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) hsplit_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_split_class ()), &hsplit_info); } return klass; } /** * gts_hsplit_new: * @klass: a #GtsHSplitClass. * @vs: a #GtsSplit. * * Returns: a new #GtsHSplit, hierarchical extension of @vs. */ GtsHSplit * gts_hsplit_new (GtsHSplitClass * klass, GtsSplit * vs) { GtsHSplit * hs; g_return_val_if_fail (vs != NULL, NULL); hs = GTS_HSPLIT (gts_object_new (GTS_OBJECT_CLASS (klass))); memcpy (hs, vs, sizeof (GtsSplit)); GTS_OBJECT (hs)->reserved = NULL; return hs; } /** * gts_hsplit_collapse: * @hs: a #GtsHSplit. * @hsurface: a #GtsHSurface. * * Collapses the #GtsSplit defined by @hs, updates the expandable and * collapsable priority heaps of @hsurface. */ void gts_hsplit_collapse (GtsHSplit * hs, GtsHSurface * hsurface) { GtsHSplit * parent; GtsSplit * vs; g_return_if_fail (hs != NULL); g_return_if_fail (hs->nchild == 2); g_return_if_fail (hsurface != NULL); gts_split_collapse (GTS_SPLIT (hs), hsurface->s->edge_class, NULL); hsurface->nvertex--; hs->nchild = 0; HEAP_REMOVE_HSPLIT (hsurface->collapsable, hs); HEAP_INSERT_HSPLIT (hsurface->expandable, hs); vs = GTS_SPLIT (hs); if (GTS_IS_HSPLIT (vs->v1)) HEAP_REMOVE_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v1)); if (GTS_IS_HSPLIT (vs->v2)) HEAP_REMOVE_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v2)); parent = hs->parent; if (parent && ++parent->nchild == 2) HEAP_INSERT_HSPLIT (hsurface->collapsable, parent); } /** * gts_hsplit_expand: * @hs: a #GtsHSplit. * @hsurface: a #GtsHSurface. * * Expands the #GtsSplit defined by @hs (which must be expandable) * and updates the priority heaps of @hsurface. */ void gts_hsplit_expand (GtsHSplit * hs, GtsHSurface * hsurface) { GtsHSplit * parent; GtsSplit * vs; g_return_if_fail (hs != NULL); g_return_if_fail (hsurface != NULL); g_return_if_fail (hs->nchild == 0); gts_split_expand (GTS_SPLIT (hs), hsurface->s, hsurface->s->edge_class); hsurface->nvertex++; hs->nchild = 2; HEAP_REMOVE_HSPLIT (hsurface->expandable, hs); HEAP_INSERT_HSPLIT (hsurface->collapsable, hs); vs = GTS_SPLIT (hs); if (GTS_IS_HSPLIT (vs->v1)) HEAP_INSERT_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v1)); if (GTS_IS_HSPLIT (vs->v2)) HEAP_INSERT_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v2)); parent = hs->parent; if (parent && parent->nchild-- == 2) HEAP_REMOVE_HSPLIT (hsurface->collapsable, parent); } static void hsurface_destroy (GtsObject * object) { GtsHSurface * hs = GTS_HSURFACE (object); gts_hsurface_traverse (hs, G_POST_ORDER, -1, (GtsSplitTraverseFunc) gts_object_destroy, NULL); g_slist_free (hs->roots); if (hs->expandable) gts_eheap_destroy (hs->expandable); if (hs->collapsable) gts_eheap_destroy (hs->collapsable); g_ptr_array_free (hs->split, TRUE); (* GTS_OBJECT_CLASS (gts_hsurface_class ())->parent_class->destroy) (object); } static void hsurface_class_init (GtsObjectClass * klass) { klass->destroy = hsurface_destroy; } static void hsurface_init (GtsHSurface * hsurface) { hsurface->s = NULL; hsurface->roots = NULL; hsurface->expandable = hsurface->collapsable = NULL; hsurface->split = g_ptr_array_new (); hsurface->nvertex = 0; } /** * gts_hsurface_class: * * Returns: the #GtsHSurfaceClass. */ GtsHSurfaceClass * gts_hsurface_class (void) { static GtsHSurfaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo hsurface_info = { "GtsHSurface", sizeof (GtsHSurface), sizeof (GtsHSurfaceClass), (GtsObjectClassInitFunc) hsurface_class_init, (GtsObjectInitFunc) hsurface_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &hsurface_info); } return klass; } /** * gts_hsurface_new: * @klass: a #GtsHSurfaceClass. * @hsplit_class: a #GtsHSplitClass. * @psurface: a #GtsPSurface. * @expand_key: a #GtsKeyFunc used to order the priority heap of expandable * #GtsHSplit. * @expand_data: data to be passed to @expand_key. * @collapse_key: a #GtsKeyFunc used to order the priority heap of collapsable * #GtsHSplit. * @collapse_data: data to be passed to @collapsed_key. * * Returns: a new #GtsHSurface, hierarchical extension of @psurface * and using #GtsHSplit of class @hsplit_class. Note that @psurface is * destroyed in the process. */ GtsHSurface * gts_hsurface_new (GtsHSurfaceClass * klass, GtsHSplitClass * hsplit_class, GtsPSurface * psurface, GtsKeyFunc expand_key, gpointer expand_data, GtsKeyFunc collapse_key, gpointer collapse_data) { GtsHSurface * hsurface; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (hsplit_class != NULL, NULL); g_return_val_if_fail (psurface != NULL, NULL); g_return_val_if_fail (expand_key != NULL, NULL); g_return_val_if_fail (collapse_key != NULL, NULL); hsurface = GTS_HSURFACE (gts_object_new (GTS_OBJECT_CLASS (klass))); hsurface->s = psurface->s; hsurface->expandable = gts_eheap_new (expand_key, expand_data); hsurface->collapsable = gts_eheap_new (collapse_key, collapse_data); g_ptr_array_set_size (hsurface->split, psurface->split->len); while (gts_psurface_remove_vertex (psurface)) ; while (psurface->pos) { GtsSplit * vs = g_ptr_array_index (psurface->split, psurface->pos - 1); GtsHSplit * hs = gts_hsplit_new (hsplit_class, vs); g_ptr_array_index (hsurface->split, psurface->pos - 1) = hs; psurface->pos--; hs->parent = GTS_OBJECT (vs)->reserved; if (hs->parent) { GtsSplit * vsp = GTS_SPLIT (hs->parent); if (vsp->v1 == GTS_OBJECT (vs)) { g_assert (vsp->v2 != GTS_OBJECT (vs)); vsp->v1 = GTS_OBJECT (hs); } else { g_assert (vsp->v2 == GTS_OBJECT (vs)); vsp->v2 = GTS_OBJECT (hs); } } else hsurface->roots = g_slist_prepend (hsurface->roots, hs); hs->nchild = 0; if (GTS_IS_SPLIT (vs->v1)) GTS_OBJECT (vs->v1)->reserved = hs; else hs->nchild++; if (GTS_IS_SPLIT (vs->v2)) GTS_OBJECT (vs->v2)->reserved = hs; else hs->nchild++; gts_split_expand (vs, psurface->s, psurface->s->edge_class); if (hs->nchild == 2) HEAP_INSERT_HSPLIT (hsurface->collapsable, hs); } hsurface->nvertex = gts_surface_vertex_number (hsurface->s); gts_object_destroy (GTS_OBJECT (psurface)); return hsurface; } /** * gts_hsurface_traverse: * @hsurface: a #GtsHSurface. * @order: the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER. * @depth: the maximum depth of the traversal. Nodes below this depth * will not be visited. If max_depth is -1 all nodes in the tree are * visited. If depth is 1, only the root is visited. If depth is 2, * the root and its children are visited. And so on. * @func: the function to call for each visited #GtsHSplit. * @data: user data to pass to the function. * * Traverses a hierarchical surface starting from its roots. It calls * the given function for each #GtsHSplit visited. * See also gts_split_traverse(). */ void gts_hsurface_traverse (GtsHSurface * hsurface, GTraverseType order, gint depth, GtsSplitTraverseFunc func, gpointer data) { GSList * i; g_return_if_fail (hsurface != NULL); g_return_if_fail (func != NULL); g_return_if_fail (order < G_LEVEL_ORDER); g_return_if_fail (depth == -1 || depth > 0); i = hsurface->roots; while (i) { gts_split_traverse (i->data, order, depth, func, data); i = i->next; } } /** * gts_hsurface_foreach: * @hsurface: a #GtsHSurface. * @order: the order in which #GtsHSplit are visited - G_PRE_ORDER or * G_POST_ORDER. * @func: the function to call for each visited #GtsHSplit. * @data: user data to pass to the function. * * Starts by expanding all the #GtsHSplit of @hsurface. If @order is * G_PRE_ORDER, calls @func for each #GtsHSplit and collapses it. If * order is G_POST_ORDER, collapses each #GtsHSplit first and then * calls @func. The traversal can be halted at any point by returning * TRUE from func. */ void gts_hsurface_foreach (GtsHSurface * hsurface, GTraverseType order, GtsFunc func, gpointer data) { GtsHSplit * hs; guint i = 0, len; gboolean stop = FALSE; g_return_if_fail (hsurface != NULL); g_return_if_fail (func != NULL); g_return_if_fail (order == G_PRE_ORDER || order == G_POST_ORDER); while ((hs = gts_eheap_top (hsurface->expandable, NULL))) gts_hsplit_expand (hs, hsurface); len = hsurface->split->len; switch (order) { case G_PRE_ORDER: while (i < len && !stop) { GtsHSplit * hs = g_ptr_array_index (hsurface->split, i); stop = (*func) (hs, data); if (!stop) gts_hsplit_collapse (hs, hsurface); i++; } break; case G_POST_ORDER: while (i < len && !stop) { GtsHSplit * hs = g_ptr_array_index (hsurface->split, i); gts_hsplit_collapse (hs, hsurface); stop = (*func) (hs, data); i++; } break; default: g_assert_not_reached (); } } /** * gts_hsurface_height: * @hsurface: a #GtsHSurface. * * Returns: the maximum height of the tree described by @hsurface. */ guint gts_hsurface_height (GtsHSurface * hsurface) { GSList * i; guint height = 0; g_return_val_if_fail (hsurface != NULL, 0); i = hsurface->roots; while (i) { guint tmp_height = gts_split_height (i->data); if (tmp_height > height) height = tmp_height; i = i->next; } return height; } gts-snapshot-121130/src/matrix.c0000644000175100017510000004454312055775440013442 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" /** * gts_matrix_new: * @a00: element [0][0]. * @a01: element [0][1]. * @a02: element [0][2]. * @a03: element [0][3]. * @a10: element [1][0]. * @a11: element [1][1]. * @a12: element [1][2]. * @a13: element [1][3]. * @a20: element [2][0]. * @a21: element [2][1]. * @a22: element [2][2]. * @a23: element [2][3]. * @a30: element [3][0]. * @a31: element [3][1]. * @a32: element [3][2]. * @a33: element [3][3]. * * Allocates memory and initializes a new #GtsMatrix. * * Returns: a pointer to the newly created #GtsMatrix. */ GtsMatrix * gts_matrix_new (gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33) { GtsMatrix * m; m = g_malloc (4*sizeof (GtsVector4)); m[0][0] = a00; m[1][0] = a10; m[2][0] = a20; m[3][0] = a30; m[0][1] = a01; m[1][1] = a11; m[2][1] = a21; m[3][1] = a31; m[0][2] = a02; m[1][2] = a12; m[2][2] = a22; m[3][2] = a32; m[0][3] = a03; m[1][3] = a13; m[2][3] = a23; m[3][3] = a33; return m; } /** * gts_matrix_assign: * @m: a #GtsMatrix. * @a00: element [0][0]. * @a01: element [0][1]. * @a02: element [0][2]. * @a03: element [0][3]. * @a10: element [1][0]. * @a11: element [1][1]. * @a12: element [1][2]. * @a13: element [1][3]. * @a20: element [2][0]. * @a21: element [2][1]. * @a22: element [2][2]. * @a23: element [2][3]. * @a30: element [3][0]. * @a31: element [3][1]. * @a32: element [3][2]. * @a33: element [3][3]. * * Set values of matrix elements. */ void gts_matrix_assign (GtsMatrix * m, gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33) { g_return_if_fail (m != NULL); m[0][0] = a00; m[1][0] = a10; m[2][0] = a20; m[3][0] = a30; m[0][1] = a01; m[1][1] = a11; m[2][1] = a21; m[3][1] = a31; m[0][2] = a02; m[1][2] = a12; m[2][2] = a22; m[3][2] = a32; m[0][3] = a03; m[1][3] = a13; m[2][3] = a23; m[3][3] = a33; } /** * gts_matrix_projection: * @t: a #GtsTriangle. * * Creates a new #GtsMatrix representing the projection onto a plane of normal * given by @t. * * Returns: a pointer to the newly created #GtsMatrix. */ GtsMatrix * gts_matrix_projection (GtsTriangle * t) { GtsVertex * v1, * v2, * v3; GtsEdge * e1, * e2, * e3; GtsMatrix * m; gdouble x1, y1, z1, x2, y2, z2, x3, y3, z3, l; g_return_val_if_fail (t != NULL, NULL); m = g_malloc (4*sizeof (GtsVector4)); gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3); x1 = GTS_POINT (v2)->x - GTS_POINT (v1)->x; y1 = GTS_POINT (v2)->y - GTS_POINT (v1)->y; z1 = GTS_POINT (v2)->z - GTS_POINT (v1)->z; x2 = GTS_POINT (v3)->x - GTS_POINT (v1)->x; y2 = GTS_POINT (v3)->y - GTS_POINT (v1)->y; z2 = GTS_POINT (v3)->z - GTS_POINT (v1)->z; x3 = y1*z2 - z1*y2; y3 = z1*x2 - x1*z2; z3 = x1*y2 - y1*x2; x2 = y3*z1 - z3*y1; y2 = z3*x1 - x3*z1; z2 = x3*y1 - y3*x1; g_assert ((l = sqrt (x1*x1 + y1*y1 + z1*z1)) > 0.0); m[0][0] = x1/l; m[1][0] = y1/l; m[2][0] = z1/l; m[3][0] = 0.; g_assert ((l = sqrt (x2*x2 + y2*y2 + z2*z2)) > 0.0); m[0][1] = x2/l; m[1][1] = y2/l; m[2][1] = z2/l; m[3][1] = 0.; g_assert ((l = sqrt (x3*x3 + y3*y3 + z3*z3)) > 0.0); m[0][2] = x3/l; m[1][2] = y3/l; m[2][2] = z3/l; m[3][2] = 0.; m[0][3] = 0; m[1][3] = 0.; m[2][3] = 0.; m[3][3] = 1.; return m; } /** * gts_matrix_transpose: * @m: a #GtsMatrix. * * Returns: a pointer to a newly created #GtsMatrix transposed of @m. */ GtsMatrix * gts_matrix_transpose (GtsMatrix * m) { GtsMatrix * mi; g_return_val_if_fail (m != NULL, NULL); mi = g_malloc (4*sizeof (GtsVector4)); mi[0][0] = m[0][0]; mi[1][0] = m[0][1]; mi[2][0] = m[0][2]; mi[3][0] = m[0][3]; mi[0][1] = m[1][0]; mi[1][1] = m[1][1]; mi[2][1] = m[1][2]; mi[3][1] = m[1][3]; mi[0][2] = m[2][0]; mi[1][2] = m[2][1]; mi[2][2] = m[2][2]; mi[3][2] = m[2][3]; mi[0][3] = m[3][0]; mi[1][3] = m[3][1]; mi[2][3] = m[3][2]; mi[3][3] = m[3][3]; return mi; } /* * calculate the determinant of a 2x2 matrix. * * Adapted from: * Matrix Inversion * by Richard Carling * from "Graphics Gems", Academic Press, 1990 */ static gdouble det2x2 (gdouble a, gdouble b, gdouble c, gdouble d) { gdouble ans2; ans2 = a*d - b*c; return ans2; } /* * calculate the determinant of a 3x3 matrix * in the form * * | a1, b1, c1 | * | a2, b2, c2 | * | a3, b3, c3 | * * Adapted from: * Matrix Inversion * by Richard Carling * from "Graphics Gems", Academic Press, 1990 */ static gdouble det3x3 (gdouble a1, gdouble a2, gdouble a3, gdouble b1, gdouble b2, gdouble b3, gdouble c1, gdouble c2, gdouble c3) { gdouble ans3; ans3 = a1 * det2x2( b2, b3, c2, c3 ) - b1 * det2x2( a2, a3, c2, c3 ) + c1 * det2x2( a2, a3, b2, b3 ); return ans3; } /** * gts_matrix_determinant: * @m: a #GtsMatrix. * * Returns: the value of det(@m). */ gdouble gts_matrix_determinant (GtsMatrix * m) { gdouble ans4; gdouble a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3, d4; g_return_val_if_fail (m != NULL, 0.0); a1 = m[0][0]; b1 = m[0][1]; c1 = m[0][2]; d1 = m[0][3]; a2 = m[1][0]; b2 = m[1][1]; c2 = m[1][2]; d2 = m[1][3]; a3 = m[2][0]; b3 = m[2][1]; c3 = m[2][2]; d3 = m[2][3]; a4 = m[3][0]; b4 = m[3][1]; c4 = m[3][2]; d4 = m[3][3]; ans4 = a1 * det3x3 (b2, b3, b4, c2, c3, c4, d2, d3, d4) - b1 * det3x3 (a2, a3, a4, c2, c3, c4, d2, d3, d4) + c1 * det3x3 (a2, a3, a4, b2, b3, b4, d2, d3, d4) - d1 * det3x3 (a2, a3, a4, b2, b3, b4, c2, c3, c4); return ans4; } /* * adjoint( original_matrix, inverse_matrix ) * * calculate the adjoint of a 4x4 matrix * * Let a denote the minor determinant of matrix A obtained by * ij * * deleting the ith row and jth column from A. * * i+j * Let b = (-1) a * ij ji * * The matrix B = (b ) is the adjoint of A * ij */ static GtsMatrix * adjoint (GtsMatrix * m) { gdouble a1, a2, a3, a4, b1, b2, b3, b4; gdouble c1, c2, c3, c4, d1, d2, d3, d4; GtsMatrix * ma; a1 = m[0][0]; b1 = m[0][1]; c1 = m[0][2]; d1 = m[0][3]; a2 = m[1][0]; b2 = m[1][1]; c2 = m[1][2]; d2 = m[1][3]; a3 = m[2][0]; b3 = m[2][1]; c3 = m[2][2]; d3 = m[2][3]; a4 = m[3][0]; b4 = m[3][1]; c4 = m[3][2]; d4 = m[3][3]; ma = g_malloc (4*sizeof (GtsVector4)); /* row column labeling reversed since we transpose rows & columns */ ma[0][0] = det3x3 (b2, b3, b4, c2, c3, c4, d2, d3, d4); ma[1][0] = - det3x3 (a2, a3, a4, c2, c3, c4, d2, d3, d4); ma[2][0] = det3x3 (a2, a3, a4, b2, b3, b4, d2, d3, d4); ma[3][0] = - det3x3 (a2, a3, a4, b2, b3, b4, c2, c3, c4); ma[0][1] = - det3x3 (b1, b3, b4, c1, c3, c4, d1, d3, d4); ma[1][1] = det3x3 (a1, a3, a4, c1, c3, c4, d1, d3, d4); ma[2][1] = - det3x3 (a1, a3, a4, b1, b3, b4, d1, d3, d4); ma[3][1] = det3x3 (a1, a3, a4, b1, b3, b4, c1, c3, c4); ma[0][2] = det3x3 (b1, b2, b4, c1, c2, c4, d1, d2, d4); ma[1][2] = - det3x3 (a1, a2, a4, c1, c2, c4, d1, d2, d4); ma[2][2] = det3x3 (a1, a2, a4, b1, b2, b4, d1, d2, d4); ma[3][2] = - det3x3 (a1, a2, a4, b1, b2, b4, c1, c2, c4); ma[0][3] = - det3x3 (b1, b2, b3, c1, c2, c3, d1, d2, d3); ma[1][3] = det3x3 (a1, a2, a3, c1, c2, c3, d1, d2, d3); ma[2][3] = - det3x3 (a1, a2, a3, b1, b2, b3, d1, d2, d3); ma[3][3] = det3x3 (a1, a2, a3, b1, b2, b3, c1, c2, c3); return ma; } /** * gts_matrix_inverse: * @m: a #GtsMatrix. * * Returns: a pointer to a newly created #GtsMatrix inverse of @m or %NULL * if @m is not invertible. */ GtsMatrix * gts_matrix_inverse (GtsMatrix * m) { GtsMatrix * madj; gdouble det; gint i, j; g_return_val_if_fail (m != NULL, NULL); det = gts_matrix_determinant (m); if (det == 0.) return NULL; madj = adjoint (m); for (i = 0; i < 4; i++) for(j = 0; j < 4; j++) madj[i][j] /= det; return madj; } /** * gts_matrix3_inverse: * @m: a 3x3 #GtsMatrix. * * Returns: a pointer to a newly created 3x3 #GtsMatrix inverse of @m or %NULL * if @m is not invertible. */ GtsMatrix * gts_matrix3_inverse (GtsMatrix * m) { GtsMatrix * mi; gdouble det; g_return_val_if_fail (m != NULL, NULL); det = (m[0][0]*(m[1][1]*m[2][2] - m[2][1]*m[1][2]) - m[0][1]*(m[1][0]*m[2][2] - m[2][0]*m[1][2]) + m[0][2]*(m[1][0]*m[2][1] - m[2][0]*m[1][1])); if (det == 0.0) return NULL; mi = g_malloc0 (4*sizeof (GtsVector)); mi[0][0] = (m[1][1]*m[2][2] - m[1][2]*m[2][1])/det; mi[0][1] = (m[2][1]*m[0][2] - m[0][1]*m[2][2])/det; mi[0][2] = (m[0][1]*m[1][2] - m[1][1]*m[0][2])/det; mi[1][0] = (m[1][2]*m[2][0] - m[1][0]*m[2][2])/det; mi[1][1] = (m[0][0]*m[2][2] - m[2][0]*m[0][2])/det; mi[1][2] = (m[1][0]*m[0][2] - m[0][0]*m[1][2])/det; mi[2][0] = (m[1][0]*m[2][1] - m[2][0]*m[1][1])/det; mi[2][1] = (m[2][0]*m[0][1] - m[0][0]*m[2][1])/det; mi[2][2] = (m[0][0]*m[1][1] - m[0][1]*m[1][0])/det; return mi; } /** * gts_matrix_print: * @m: a #GtsMatrix. * @fptr: a file descriptor. * * Print @m to file @fptr. */ void gts_matrix_print (GtsMatrix * m, FILE * fptr) { g_return_if_fail (m != NULL); g_return_if_fail (fptr != NULL); fprintf (fptr, "[[%15.7g %15.7g %15.7g %15.7g]\n" " [%15.7g %15.7g %15.7g %15.7g]\n" " [%15.7g %15.7g %15.7g %15.7g]\n" " [%15.7g %15.7g %15.7g %15.7g]]\n", m[0][0], m[0][1], m[0][2], m[0][3], m[1][0], m[1][1], m[1][2], m[1][3], m[2][0], m[2][1], m[2][2], m[2][3], m[3][0], m[3][1], m[3][2], m[3][3]); } /** * gts_vector_print: * @v: a #GtsVector. * @fptr: a file descriptor. * * Print @s to file @fptr. */ void gts_vector_print (GtsVector v, FILE * fptr) { g_return_if_fail (fptr != NULL); fprintf (fptr, "[%15.7g %15.7g %15.7g ]\n", v[0], v[1], v[2]); } /** * gts_vector4_print: * @v: a #GtsVector4. * @fptr: a file descriptor. * * Print @v to file @fptr. */ void gts_vector4_print (GtsVector4 v, FILE * fptr) { g_return_if_fail (fptr != NULL); fprintf (fptr, "[%15.7g %15.7g %15.7g %15.7g]\n", v[0], v[1], v[2], v[3]); } /* [cos(alpha)]^2 */ #define COSALPHA2 0.999695413509 /* alpha = 1 degree */ /* [sin(alpha)]^2 */ #define SINALPHA2 3.04586490453e-4 /* alpha = 1 degree */ /** * gts_matrix_compatible_row: * @A: a #GtsMatrix. * @b: a #GtsVector. * @n: the number of previous constraints of @A.x=@b. * @A1: a #GtsMatrix. * @b1: a #GtsVector. * * Given a system of @n constraints @A.x=@b adds to it the compatible * constraints defined by @A1.x=@b1. The compatibility is determined * by insuring that the resulting system is well-conditioned (see * Lindstrom and Turk (1998, 1999)). * * Returns: the number of constraints of the resulting system. */ guint gts_matrix_compatible_row (GtsMatrix * A, GtsVector b, guint n, GtsVector A1, gdouble b1) { gdouble na1; g_return_val_if_fail (A != NULL, 0); na1 = gts_vector_scalar (A1, A1); if (na1 == 0.0) return n; /* normalize row */ na1 = sqrt (na1); A1[0] /= na1; A1[1] /= na1; A1[2] /= na1; b1 /= na1; if (n == 1) { gdouble a0a1 = gts_vector_scalar (A[0], A1); if (a0a1*a0a1 >= COSALPHA2) return 1; } else if (n == 2) { GtsVector V; gdouble s; gts_vector_cross (V, A[0], A[1]); s = gts_vector_scalar (V, A1); if (s*s <= gts_vector_scalar (V, V)*SINALPHA2) return 2; } A[n][0] = A1[0]; A[n][1] = A1[1]; A[n][2] = A1[2]; b[n] = b1; return n + 1; } /** * gts_matrix_quadratic_optimization: * @A: a #GtsMatrix. * @b: a #GtsVector. * @n: the number of constraints (must be smaller than 3). * @H: a symmetric positive definite Hessian. * @c: a #GtsVector. * * Solve a quadratic optimization problem: Given a quadratic objective function * f which can be written as: f(x) = x^t.@H.x + @c^t.x + k, where @H is the * symmetric positive definite Hessian of f and k is a constant, find the * minimum of f subject to the set of @n prior linear constraints, defined by * the first @n rows of @A and @b (@A.x = @b). The new constraints given by * the minimization are added to @A and @b only if they are linearly * independent as determined by gts_matrix_compatible_row(). * * Returns: the new number of constraints defined by @A and @b. */ guint gts_matrix_quadratic_optimization (GtsMatrix * A, GtsVector b, guint n, GtsMatrix * H, GtsVector c) { g_return_val_if_fail (A != NULL, 0); g_return_val_if_fail (b != NULL, 0); g_return_val_if_fail (n < 3, 0); g_return_val_if_fail (H != NULL, 0); switch (n) { case 0: { n = gts_matrix_compatible_row (A, b, n, H[0], - c[0]); n = gts_matrix_compatible_row (A, b, n, H[1], - c[1]); n = gts_matrix_compatible_row (A, b, n, H[2], - c[2]); return n; } case 1: { GtsVector Q0 = {0., 0., 0.}; GtsVector Q1 = {0., 0., 0.}; GtsVector A1; gdouble max = A[0][0]*A[0][0]; guint d = 0; /* build a vector orthogonal to the constraint */ if (A[0][1]*A[0][1] > max) { max = A[0][1]*A[0][1]; d = 1; } if (A[0][2]*A[0][2] > max) { max = A[0][2]*A[0][2]; d = 2; } switch (d) { case 0: Q0[0] = - A[0][2]/A[0][0]; Q0[2] = 1.0; break; case 1: Q0[1] = - A[0][2]/A[0][1]; Q0[2] = 1.0; break; case 2: Q0[2] = - A[0][0]/A[0][2]; Q0[0] = 1.0; break; } /* build a second vector orthogonal to the first and to the constraint */ gts_vector_cross (Q1, A[0], Q0); A1[0] = gts_vector_scalar (Q0, H[0]); A1[1] = gts_vector_scalar (Q0, H[1]); A1[2] = gts_vector_scalar (Q0, H[2]); n = gts_matrix_compatible_row (A, b, n, A1, - gts_vector_scalar (Q0, c)); A1[0] = gts_vector_scalar (Q1, H[0]); A1[1] = gts_vector_scalar (Q1, H[1]); A1[2] = gts_vector_scalar (Q1, H[2]); n = gts_matrix_compatible_row (A, b, n, A1, - gts_vector_scalar (Q1, c)); return n; } case 2: { /* build a vector orthogonal to the two constraints */ GtsVector A1, Q; gts_vector_cross (Q, A[0], A[1]); A1[0] = gts_vector_scalar (Q, H[0]); A1[1] = gts_vector_scalar (Q, H[1]); A1[2] = gts_vector_scalar (Q, H[2]); n = gts_matrix_compatible_row (A, b, n, A1, - gts_vector_scalar (Q, c)); return n; } default: g_assert_not_reached (); } return 0; } /** * gts_matrix_destroy: * @m: a #GtsMatrix. * * Free all the memory allocated for @m. */ void gts_matrix_destroy (GtsMatrix * m) { g_free (m); } /** * gts_matrix_product: * @m1: a #GtsMatrix. * @m2: another #GtsMatrix. * * Returns: a new #GtsMatrix, product of @m1 and @m2. */ GtsMatrix * gts_matrix_product (GtsMatrix * m1, GtsMatrix * m2) { guint i, j; GtsMatrix * m; g_return_val_if_fail (m1 != NULL, NULL); g_return_val_if_fail (m2 != NULL, NULL); g_return_val_if_fail (m1 != m2, NULL); m = g_malloc (4*sizeof (GtsVector4)); for (i = 0; i < 4; i++) for (j = 0; j < 4; j++) m[i][j] = m1[i][0]*m2[0][j] + m1[i][1]*m2[1][j] + m1[i][2]*m2[2][j] + m1[i][3]*m2[3][j]; return m; } /** * gts_matrix_zero: * @m: a #GtsMatrix or $NULL. * * Initializes @m to zeros. Allocates a matrix if @m is %NULL. * * Returns: the zero'ed matrix. */ GtsMatrix * gts_matrix_zero (GtsMatrix * m) { if (m == NULL) m = g_malloc0 (4*sizeof (GtsVector4)); else { m[0][0] = m[1][0] = m[2][0] = m[3][0] = 0.; m[0][1] = m[1][1] = m[2][1] = m[3][1] = 0.; m[0][2] = m[1][2] = m[2][2] = m[3][2] = 0.; m[0][3] = m[1][3] = m[2][3] = m[3][3] = 0.; } return m; } /** * gts_matrix_identity: * @m: a #GtsMatrix or %NULL. * * Initializes @m to an identity matrix. Allocates a matrix if @m is %NULL. * * Returns: the identity matrix. */ GtsMatrix * gts_matrix_identity (GtsMatrix * m) { m = gts_matrix_zero (m); m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1.; return m; } /** * gts_matrix_scale: * @m: a #GtsMatrix or %NULL. * @s: the scaling vector. * * Initializes @m to a scaling matrix for @s. Allocates a matrix if @m * is %NULL. * * Returns: the scaling matrix. */ GtsMatrix * gts_matrix_scale (GtsMatrix * m, GtsVector s) { m = gts_matrix_zero (m); m[0][0] = s[0]; m[1][1] = s[1]; m[2][2] = s[2]; m[3][3] = 1.; return m; } /** * gts_matrix_translate: * @m: a #GtsMatrix or %NULL. * @t: the translation vector. * * Initializes @m to a translation matrix for @t. Allocates a new * matrix if @m is %NULL. * * Returns: the translation matix. */ GtsMatrix * gts_matrix_translate (GtsMatrix * m, GtsVector t) { m = gts_matrix_zero (m); m[0][3] = t[0]; m[1][3] = t[1]; m[2][3] = t[2]; m[3][3] = 1.; m[0][0] = m[1][1] = m[2][2] = 1.; return m; } /** * gts_matrix_rotate: * @m: a #GtsMatrix or %NULL. * @r: the rotation axis. * @angle: the angle (in radians) to rotate by. * * Initializes @m to a rotation matrix around @r by @angle. * Allocates a new matrix if @m is %NULL. * * Returns: the rotation matrix. */ GtsMatrix * gts_matrix_rotate (GtsMatrix * m, GtsVector r, gdouble angle) { gdouble c, c1, s; gts_vector_normalize (r); c = cos (angle); c1 = 1. - c; s = sin (angle); if (m == NULL) m = g_malloc (4*sizeof (GtsVector4)); m[0][0] = r[0]*r[0]*c1 + c; m[0][1] = r[0]*r[1]*c1 - r[2]*s; m[0][2] = r[0]*r[2]*c1 + r[1]*s; m[0][3] = 0.; m[1][0] = r[1]*r[0]*c1 + r[2]*s; m[1][1] = r[1]*r[1]*c1 + c; m[1][2] = r[1]*r[2]*c1 - r[0]*s; m[1][3] = 0.; m[2][0] = r[2]*r[0]*c1 - r[1]*s; m[2][1] = r[2]*r[1]*c1 + r[0]*s; m[2][2] = r[2]*r[2]*c1 + c; m[2][3] = 0.; m[3][0] = 0.; m[3][1] = 0.; m[3][2] = 0.; m[3][3] = 1.; return m; } gts-snapshot-121130/src/eheap.c0000644000175100017510000002420612055775440013212 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" #define PARENT(i) ((i) >= 2 ? (i)/2 : 0) #define LEFT_CHILD(i) (2*(i)) #define RIGHT_CHILD(i) (2*(i) + 1) struct _GtsEHeap { GPtrArray * elts; GtsKeyFunc func; gpointer data; gboolean frozen, randomized; }; /** * gts_eheap_new: * @key_func: a #GtsKeyFunc or %NULL. * @data: user data to be passed to @key_func. * * Returns: a new #GtsEHeap using @key_func as key. */ GtsEHeap * gts_eheap_new (GtsKeyFunc key_func, gpointer data) { GtsEHeap * heap; heap = g_malloc (sizeof(GtsEHeap)); heap->elts = g_ptr_array_new (); heap->func = key_func; heap->data = data; heap->frozen = FALSE; heap->randomized = FALSE; return heap; } static void sift_up (GtsEHeap * heap, guint i) { GtsEHeapPair * parent, * child; guint p; gpointer * pdata = heap->elts->pdata; gdouble key; child = pdata[i - 1]; key = child->key; while ((p = PARENT (i))) { parent = pdata[p - 1]; if (parent->key > key || (heap->randomized && parent->key == key && rand () < RAND_MAX/2)) { pdata[p - 1] = child; pdata[i - 1] = parent; child->pos = p; parent->pos = i; i = p; } else i = 0; } } /** * gts_eheap_insert: * @heap: a #GtsEHeap. * @p: a pointer to add to the heap. * * Inserts a new element @p in the heap. * * Returns: a #GtsEHeapPair describing the position of the element in the heap. * This pointer is necessary for gts_eheap_remove() and * gts_eheap_decrease_key(). */ GtsEHeapPair * gts_eheap_insert (GtsEHeap * heap, gpointer p) { GtsEHeapPair * pair; GPtrArray * elts; g_return_val_if_fail (heap != NULL, NULL); g_return_val_if_fail (heap->func != NULL, NULL); elts = heap->elts; pair = g_malloc (sizeof (GtsEHeapPair)); g_ptr_array_add (elts, pair); pair->data = p; pair->pos = elts->len; pair->key = (*heap->func) (p, heap->data); if (!heap->frozen) sift_up (heap, elts->len); return pair; } /** * gts_eheap_insert_with_key: * @heap: a #GtsEHeap. * @p: a pointer to add to the heap. * @key: the value of the key associated to @p. * * Inserts a new element @p in the heap. * * Returns: a #GtsEHeapPair describing the position of the element in the heap. * This pointer is necessary for gts_eheap_remove() and * gts_eheap_decrease_key(). */ GtsEHeapPair * gts_eheap_insert_with_key (GtsEHeap * heap, gpointer p, gdouble key) { GtsEHeapPair * pair; GPtrArray * elts; g_return_val_if_fail (heap != NULL, NULL); elts = heap->elts; pair = g_malloc (sizeof (GtsEHeapPair)); g_ptr_array_add (elts, pair); pair->data = p; pair->pos = elts->len; pair->key = key; if (!heap->frozen) sift_up (heap, elts->len); return pair; } static void sift_down (GtsEHeap * heap, guint i) { GtsEHeapPair * left_child, * right_child, * child, * parent; guint lc, rc, c; gpointer * pdata = heap->elts->pdata; guint len = heap->elts->len; gdouble key; lc = LEFT_CHILD (i); rc = RIGHT_CHILD (i); left_child = lc <= len ? pdata[lc - 1] : NULL; right_child = rc <= len ? pdata[rc - 1] : NULL; parent = pdata[i - 1]; key = parent->key; while (left_child != NULL) { if (right_child == NULL || left_child->key < right_child->key) { child = left_child; c = lc; } else { child = right_child; c = rc; } if (key > child->key) { pdata[i - 1] = child; child->pos = i; pdata[c - 1] = parent; parent->pos = c; i = c; lc = LEFT_CHILD (i); rc = RIGHT_CHILD (i); left_child = lc <= len ? pdata[lc - 1] : NULL; right_child = rc <= len ? pdata[rc - 1] : NULL; } else left_child = NULL; } } /** * gts_eheap_remove_top: * @heap: a #GtsEHeap. * @key: a pointer on a gdouble or %NULL. * * Removes the element at the top of the heap and optionally (if @key is not * %NULL) returns the value of its key. * * Returns: the element at the top of the heap. */ gpointer gts_eheap_remove_top (GtsEHeap * heap, gdouble * key) { gpointer root; GPtrArray * elts; guint len; GtsEHeapPair * pair; g_return_val_if_fail (heap != NULL, NULL); elts = heap->elts; len = elts->len; if (len == 0) return NULL; if (len == 1) { pair = g_ptr_array_remove_index (elts, 0); root = pair->data; if (key) *key = pair->key; g_free (pair); return root; } pair = elts->pdata[0]; root = pair->data; if (key) *key = pair->key; g_free (pair); pair = g_ptr_array_remove_index (elts, len - 1); elts->pdata[0] = pair; pair->pos = 1; sift_down (heap, 1); return root; } /** * gts_eheap_top: * @heap: a #GtsEHeap. * @key: a pointer on a gdouble or %NULL. * * Returns: the element at the top of the heap and optionally (if @key is not * %NULL) its key. */ gpointer gts_eheap_top (GtsEHeap * heap, gdouble * key) { GtsEHeapPair * pair; GPtrArray * elts; g_return_val_if_fail (heap != NULL, NULL); elts = heap->elts; if (elts->len == 0) return NULL; pair = elts->pdata[0]; if (key) *key = pair->key; return pair->data; } /** * gts_eheap_destroy: * @heap: a #GtsEHeap. * * Free all the memory allocated for @heap. */ void gts_eheap_destroy (GtsEHeap * heap) { guint i; g_return_if_fail (heap != NULL); for (i = 0; i < heap->elts->len; i++) g_free (heap->elts->pdata[i]); g_ptr_array_free (heap->elts, TRUE); g_free (heap); } /** * gts_eheap_thaw: * @heap: a #GtsEHeap. * * If @heap has been frozen previously using gts_eheap_freeze(), reorder it * in O(n) time and unfreeze it. */ void gts_eheap_thaw (GtsEHeap * heap) { guint i; g_return_if_fail (heap != NULL); if (!heap->frozen) return; for (i = heap->elts->len/2; i > 0; i--) sift_down (heap, i); heap->frozen = FALSE; } /** * gts_eheap_foreach: * @heap: a #GtsEHeap. * @func: the function to call for each element in the heap. * @data: to pass to @func. */ void gts_eheap_foreach (GtsEHeap * heap, GFunc func, gpointer data) { guint i; GPtrArray * elts; g_return_if_fail (heap != NULL); g_return_if_fail (func != NULL); elts = heap->elts; for (i = 0; i < elts->len; i++) (*func) (((GtsEHeapPair *) elts->pdata[i])->data, data); } /** * gts_eheap_remove: * @heap: a #GtsEHeap. * @p: a #GtsEHeapPair. * * Removes element corresponding to @p from @heap in O(log n). * * Returns: the element just removed from @heap. */ gpointer gts_eheap_remove (GtsEHeap * heap, GtsEHeapPair * p) { GtsEHeapPair ** pdata; GtsEHeapPair * parent; guint i, par; gpointer data; g_return_val_if_fail (heap != NULL, NULL); g_return_val_if_fail (p != NULL, NULL); pdata = (GtsEHeapPair **)heap->elts->pdata; i = p->pos; data = p->data; g_return_val_if_fail (i > 0 && i <= heap->elts->len, NULL); g_return_val_if_fail (p == pdata[i - 1], NULL); /* move element to the top */ while ((par = PARENT (i))) { parent = pdata[par - 1]; pdata[par - 1] = p; pdata[i - 1] = parent; p->pos = par; parent->pos = i; i = par; } gts_eheap_remove_top (heap, NULL); return data; } /** * gts_eheap_decrease_key: * @heap: a #GtsEHeap. * @p: a #GtsEHeapPair. * @new_key: the new value of the key for this element. Must be smaller than * the current key. * * Decreases the value of the key of the element at position @p. */ void gts_eheap_decrease_key (GtsEHeap * heap, GtsEHeapPair * p, gdouble new_key) { guint i; g_return_if_fail (heap != NULL); g_return_if_fail (p != NULL); i = p->pos; g_return_if_fail (i > 0 && i <= heap->elts->len); g_return_if_fail (p == heap->elts->pdata[i - 1]); g_return_if_fail (new_key <= p->key); p->key = new_key; if (!heap->frozen) sift_up (heap, i); } /** * gts_eheap_freeze: * @heap: a #GtsEHeap. * * Freezes the heap. Any subsequent operation will not preserve the heap * property. Used in conjunction with gts_eheap_insert() and gts_eheap_thaw() * to create a heap in O(n) time. */ void gts_eheap_freeze (GtsEHeap * heap) { g_return_if_fail (heap != NULL); heap->frozen = TRUE; } /** * gts_eheap_size: * @heap: a #GtsEHeap. * * Returns: the number of items in @heap. */ guint gts_eheap_size (GtsEHeap * heap) { g_return_val_if_fail (heap != NULL, 0); return heap->elts->len; } /** * gts_eheap_update: * @heap: a #GtsEHeap. * * Updates the key of each element of @heap and reorders it. */ void gts_eheap_update (GtsEHeap * heap) { guint i, len; GtsEHeapPair ** pairs; gpointer data; GtsKeyFunc func; g_return_if_fail (heap != NULL); g_return_if_fail (heap->func != NULL); heap->frozen = TRUE; len = heap->elts->len; pairs = (GtsEHeapPair **) heap->elts->pdata; data = heap->data; func = heap->func; for (i = 0; i < len; i++) { GtsEHeapPair * pair = pairs[i]; pair->key = (*func) (pair->data, data); } gts_eheap_thaw (heap); } /** * gts_eheap_key: * @heap: a #GtsEHeap. * @p: a pointer to be tested; * * Returns: the value of the key for pointer @p. */ gdouble gts_eheap_key (GtsEHeap * heap, gpointer p) { g_return_val_if_fail (heap != NULL, 0.); g_return_val_if_fail (heap->func != NULL, 0.); return (* heap->func) (p, heap->data); } /** * gts_eheap_randomized: * @heap: a #GtsEHeap. * @randomized: whether @heap should be randomized. */ void gts_eheap_randomized (GtsEHeap * heap, gboolean randomized) { g_return_if_fail (heap != NULL); heap->randomized = randomized; } gts-snapshot-121130/src/surface.c0000644000175100017510000022513112055775440013560 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include "gts.h" #include "gts-private.h" static void destroy_foreach_face (GtsFace * f, GtsSurface * s) { f->surfaces = g_slist_remove (f->surfaces, s); if (!GTS_OBJECT_DESTROYED (f) && !gts_allow_floating_faces && f->surfaces == NULL) gts_object_destroy (GTS_OBJECT (f)); } static void surface_destroy (GtsObject * object) { GtsSurface * surface = GTS_SURFACE (object); gts_surface_foreach_face (surface, (GtsFunc) destroy_foreach_face, surface); #ifdef USE_SURFACE_BTREE g_tree_destroy (surface->faces); #else /* not USE_SURFACE_BTREE */ g_hash_table_destroy (surface->faces); #endif /* not USE_SURFACE_BTREE */ (* GTS_OBJECT_CLASS (gts_surface_class ())->parent_class->destroy) (object); } static void surface_write (GtsObject * object, FILE * fptr) { fprintf (fptr, " %s %s %s %s", object->klass->info.name, GTS_OBJECT_CLASS (GTS_SURFACE (object)->face_class)->info.name, GTS_OBJECT_CLASS (GTS_SURFACE (object)->edge_class)->info.name, GTS_POINT_CLASS (GTS_SURFACE (object)->vertex_class)->binary ? "GtsVertexBinary" : GTS_OBJECT_CLASS (GTS_SURFACE (object)->vertex_class)->info.name); } static void surface_class_init (GtsSurfaceClass * klass) { GTS_OBJECT_CLASS (klass)->destroy = surface_destroy; GTS_OBJECT_CLASS (klass)->write = surface_write; klass->add_face = NULL; klass->remove_face = NULL; } #ifdef USE_SURFACE_BTREE static gint compare_pointers (gconstpointer a, gconstpointer b) { if (GPOINTER_TO_UINT (a) < GPOINTER_TO_UINT (b)) return -1; if (GPOINTER_TO_UINT (a) > GPOINTER_TO_UINT (b)) return 1; return 0; } #endif /* USE_SURFACE_BTREE */ static void surface_init (GtsSurface * surface) { #ifdef USE_SURFACE_BTREE surface->faces = g_tree_new (compare_pointers); #else /* not USE_SURFACE_BTREE */ surface->faces = g_hash_table_new (NULL, NULL); #endif /* not USE_SURFACE_BTREE */ surface->vertex_class = gts_vertex_class (); surface->edge_class = gts_edge_class (); surface->face_class = gts_face_class (); surface->keep_faces = FALSE; } /** * gts_surface_class: * * Returns: the #GtsSurfaceClass. */ GtsSurfaceClass * gts_surface_class (void) { static GtsSurfaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo surface_info = { "GtsSurface", sizeof (GtsSurface), sizeof (GtsSurfaceClass), (GtsObjectClassInitFunc) surface_class_init, (GtsObjectInitFunc) surface_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &surface_info); } return klass; } /** * gts_surface_new: * @klass: a #GtsSurfaceClass. * @face_class: a #GtsFaceClass. * @edge_class: a #GtsEdgeClass. * @vertex_class: a #GtsVertexClass. * * Returns: a new empty #GtsSurface. */ GtsSurface * gts_surface_new (GtsSurfaceClass * klass, GtsFaceClass * face_class, GtsEdgeClass * edge_class, GtsVertexClass * vertex_class) { GtsSurface * s; s = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (klass))); s->vertex_class = vertex_class; s->edge_class = edge_class; s->face_class = face_class; return s; } /** * gts_surface_add_face: * @s: a #GtsSurface. * @f: a #GtsFace. * * Adds face @f to surface @s. */ void gts_surface_add_face (GtsSurface * s, GtsFace * f) { g_return_if_fail (s != NULL); g_return_if_fail (f != NULL); g_assert (s->keep_faces == FALSE); #ifdef USE_SURFACE_BTREE if (!g_tree_lookup (s->faces, f)) { f->surfaces = g_slist_prepend (f->surfaces, s); g_tree_insert (s->faces, f, f); } #else /* not USE_SURFACE_BTREE */ if (!g_hash_table_lookup (s->faces, f)) { f->surfaces = g_slist_prepend (f->surfaces, s); g_hash_table_insert (s->faces, f, f); } #endif /* not USE_SURFACE_BTREE */ if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->add_face) (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->add_face) (s, f); } /** * gts_surface_remove_face: * @s: a #GtsSurface. * @f: a #GtsFace. * * Removes face @f from surface @s. */ void gts_surface_remove_face (GtsSurface * s, GtsFace * f) { g_return_if_fail (s != NULL); g_return_if_fail (f != NULL); g_assert (s->keep_faces == FALSE); #ifdef USE_SURFACE_BTREE g_tree_remove (s->faces, f); #else /* not USE_SURFACE_BTREE */ g_hash_table_remove (s->faces, f); #endif /* not USE_SURFACE_BTREE */ f->surfaces = g_slist_remove (f->surfaces, s); if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (s, f); if (!GTS_OBJECT_DESTROYED (f) && !gts_allow_floating_faces && f->surfaces == NULL) gts_object_destroy (GTS_OBJECT (f)); } /** * gts_surface_read: * @surface: a #GtsSurface. * @f: a #GtsFile. * * Add to @surface the data read from @f. The format of the file pointed to * by @f is as described in gts_surface_write(). * * Returns: 0 if successful or the line number at which the parsing * stopped in case of error (in which case the @error field of @f is * set to a description of the error which occured). */ /* Update split.c/surface_read() if modifying this function */ guint gts_surface_read (GtsSurface * surface, GtsFile * f) { GtsVertex ** vertices; GtsEdge ** edges; guint n, nv, ne, nf; g_return_val_if_fail (surface != NULL, 1); g_return_val_if_fail (f != NULL, 1); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer (number of vertices)"); return f->line; } nv = atoi (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer (number of edges)"); return f->line; } ne = atoi (f->token->str); gts_file_next_token (f); if (f->type != GTS_INT) { gts_file_error (f, "expecting an integer (number of faces)"); return f->line; } nf = atoi (f->token->str); gts_file_next_token (f); if (f->type == GTS_STRING) { if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsSurfaceClass)"); return f->line; } gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsFaceClass)"); return f->line; } gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsEdgeClass)"); return f->line; } gts_file_next_token (f); if (f->type != GTS_STRING) { gts_file_error (f, "expecting a string (GtsVertexClass)"); return f->line; } if (!strcmp (f->token->str, "GtsVertexBinary")) GTS_POINT_CLASS (surface->vertex_class)->binary = TRUE; else { GTS_POINT_CLASS (surface->vertex_class)->binary = FALSE; gts_file_first_token_after (f, '\n'); } } else gts_file_first_token_after (f, '\n'); if (nf <= 0) return 0; /* allocate nv + 1 just in case nv == 0 */ vertices = g_malloc ((nv + 1)*sizeof (GtsVertex *)); edges = g_malloc ((ne + 1)*sizeof (GtsEdge *)); n = 0; while (n < nv && f->type != GTS_ERROR) { GtsObject * new_vertex = gts_object_new (GTS_OBJECT_CLASS (surface->vertex_class)); (* GTS_OBJECT_CLASS (surface->vertex_class)->read) (&new_vertex, f); if (f->type != GTS_ERROR) { if (!GTS_POINT_CLASS (surface->vertex_class)->binary) gts_file_first_token_after (f, '\n'); vertices[n++] = GTS_VERTEX (new_vertex); } else gts_object_destroy (new_vertex); } if (f->type == GTS_ERROR) nv = n; if (GTS_POINT_CLASS (surface->vertex_class)->binary) gts_file_first_token_after (f, '\n'); n = 0; while (n < ne && f->type != GTS_ERROR) { guint p1, p2; if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (first vertex index)"); else { p1 = atoi (f->token->str); if (p1 == 0 || p1 > nv) gts_file_error (f, "vertex index `%d' is out of range `[1,%d]'", p1, nv); else { gts_file_next_token (f); if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (second vertex index)"); else { p2 = atoi (f->token->str); if (p2 == 0 || p2 > nv) gts_file_error (f, "vertex index `%d' is out of range `[1,%d]'", p2, nv); else { GtsEdge * new_edge = gts_edge_new (surface->edge_class, vertices[p1 - 1], vertices[p2 - 1]); gts_file_next_token (f); if (f->type != '\n') if (GTS_OBJECT_CLASS (surface->edge_class)->read) (*GTS_OBJECT_CLASS (surface->edge_class)->read) ((GtsObject **) &new_edge, f); gts_file_first_token_after (f, '\n'); edges[n++] = new_edge; } } } } } if (f->type == GTS_ERROR) ne = n; n = 0; while (n < nf && f->type != GTS_ERROR) { guint s1, s2, s3; if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (first edge index)"); else { s1 = atoi (f->token->str); if (s1 == 0 || s1 > ne) gts_file_error (f, "edge index `%d' is out of range `[1,%d]'", s1, ne); else { gts_file_next_token (f); if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (second edge index)"); else { s2 = atoi (f->token->str); if (s2 == 0 || s2 > ne) gts_file_error (f, "edge index `%d' is out of range `[1,%d]'", s2, ne); else { gts_file_next_token (f); if (f->type != GTS_INT) gts_file_error (f, "expecting an integer (third edge index)"); else { s3 = atoi (f->token->str); if (s3 == 0 || s3 > ne) gts_file_error (f, "edge index `%d' is out of range `[1,%d]'", s3, ne); else { GtsFace * new_face = gts_face_new (surface->face_class, edges[s1 - 1], edges[s2 - 1], edges[s3 - 1]); gts_file_next_token (f); if (f->type != '\n') if (GTS_OBJECT_CLASS (surface->face_class)->read) (*GTS_OBJECT_CLASS (surface->face_class)->read) ((GtsObject **) &new_face, f); gts_file_first_token_after (f, '\n'); gts_surface_add_face (surface, new_face); n++; } } } } } } } if (f->type == GTS_ERROR) { gts_allow_floating_vertices = TRUE; while (nv) gts_object_destroy (GTS_OBJECT (vertices[nv-- - 1])); gts_allow_floating_vertices = FALSE; } g_free (vertices); g_free (edges); if (f->type == GTS_ERROR) return f->line; return 0; } static void sum_area (GtsFace * f, gdouble * area) { *area += gts_triangle_area (GTS_TRIANGLE (f)); } /** * gts_surface_area: * @s: a #GtsSurface. * * Returns: the area of @s obtained as the sum of the signed areas of its * faces. */ gdouble gts_surface_area (GtsSurface * s) { gdouble area = 0.0; gts_surface_foreach_face (s, (GtsFunc)sum_area, &area); return area; } /** * gts_range_init: * @r: a #GtsRange. * * Initializes a #GtsRange. */ void gts_range_init (GtsRange * r) { g_return_if_fail (r != NULL); r->max = - G_MAXDOUBLE; r->min = G_MAXDOUBLE; r->sum = r->sum2 = 0.0; r->n = 0; } /** * gts_range_reset: * @r: a #GtsRange. * * Sets all the fields of @r to 0. */ void gts_range_reset (GtsRange * r) { g_return_if_fail (r != NULL); r->max = 0.0; r->min = 0.0; r->sum = r->sum2 = 0.0; r->n = 0; } /** * gts_range_add_value: * @r: a #GtsRange. * @val: a value to add to @r. * * Adds @val to @r. */ void gts_range_add_value (GtsRange * r, gdouble val) { g_return_if_fail (r != NULL); if (val < r->min) r->min = val; if (val > r->max) r->max = val; r->sum += val; r->sum2 += val*val; r->n++; } /** * gts_range_update: * @r: a #GtsRange. * * Updates the fields of @r. */ void gts_range_update (GtsRange * r) { g_return_if_fail (r != NULL); if (r->n > 0) { if (r->sum2 - r->sum*r->sum/(gdouble) r->n >= 0.) r->stddev = sqrt ((r->sum2 - r->sum*r->sum/(gdouble) r->n) /(gdouble) r->n); else r->stddev = 0.; r->mean = r->sum/(gdouble) r->n; } else r->min = r->max = r->mean = r->stddev = 0.; } /** * gts_range_print: * @r: a #GtsRange. * @fptr: a file pointer. * * Writes a text representation of @r in @fptr. */ void gts_range_print (GtsRange * r, FILE * fptr) { g_return_if_fail (r != NULL); g_return_if_fail (fptr != NULL); fprintf (fptr, "min: %g mean: %g | %g max: %g", r->min, r->mean, r->stddev, r->max); } static void stats_foreach_vertex (GtsVertex * v, GtsSurfaceStats * stats) { GSList * i = v->segments; guint nedges = 0; while (i) { if (GTS_IS_EDGE (i->data) && gts_edge_has_parent_surface (i->data, stats->parent)) nedges++; i = i->next; } gts_range_add_value (&stats->edges_per_vertex, nedges); } static void stats_foreach_edge (GtsEdge * e, GtsSurfaceStats * stats) { guint nt = gts_edge_face_number (e, stats->parent); if (gts_segment_is_duplicate (GTS_SEGMENT (e))) stats->n_duplicate_edges++; if (nt == 1) stats->n_boundary_edges++; else if (nt > 2) stats->n_non_manifold_edges++; gts_range_add_value (&stats->faces_per_edge, nt); } static void stats_foreach_face (GtsTriangle * t, GtsSurfaceStats * stats) { if (!gts_face_is_compatible (GTS_FACE (t), stats->parent)) stats->n_incompatible_faces++; if (gts_triangle_is_duplicate (t)) stats->n_duplicate_faces++; stats->n_faces++; } /** * gts_surface_stats: * @s: a #GtsSurface. * @stats: a #GtsSurfaceStats. * * Fills @stats with the statistics relevant to surface @s. */ void gts_surface_stats (GtsSurface * s, GtsSurfaceStats * stats) { g_return_if_fail (s != NULL); g_return_if_fail (stats != NULL); stats->parent = s; stats->n_faces = 0; stats->n_incompatible_faces = 0; stats->n_duplicate_faces = 0; stats->n_duplicate_edges = 0; stats->n_boundary_edges = 0; stats->n_non_manifold_edges = 0; gts_range_init (&stats->edges_per_vertex); gts_range_init (&stats->faces_per_edge); gts_surface_foreach_vertex (s, (GtsFunc) stats_foreach_vertex, stats); gts_surface_foreach_edge (s, (GtsFunc) stats_foreach_edge, stats); gts_surface_foreach_face (s, (GtsFunc) stats_foreach_face, stats); gts_range_update (&stats->edges_per_vertex); gts_range_update (&stats->faces_per_edge); } static void quality_foreach_edge (GtsSegment * s, GtsSurfaceQualityStats * stats) { GSList * i = GTS_EDGE (s)->triangles; gts_range_add_value (&stats->edge_length, gts_point_distance (GTS_POINT (s->v1), GTS_POINT (s->v2))); while (i) { GSList * j = i->next; while (j) { gts_range_add_value (&stats->edge_angle, fabs (gts_triangles_angle (i->data, j->data))); j = j->next; } i = i->next; } } static void quality_foreach_face (GtsTriangle * t, GtsSurfaceQualityStats * stats) { gts_range_add_value (&stats->face_quality, gts_triangle_quality (t)); gts_range_add_value (&stats->face_area, gts_triangle_area (t)); } /** * gts_surface_quality_stats: * @s: a #GtsSurface. * @stats: a #GtsSurfaceQualityStats. * * Fills @stats with quality statistics relevant to surface @s. */ void gts_surface_quality_stats (GtsSurface * s, GtsSurfaceQualityStats * stats) { g_return_if_fail (s != NULL); g_return_if_fail (stats != NULL); stats->parent = s; gts_range_init (&stats->face_quality); gts_range_init (&stats->face_area); gts_range_init (&stats->edge_length); gts_range_init (&stats->edge_angle); gts_surface_foreach_edge (s, (GtsFunc) quality_foreach_edge, stats); gts_surface_foreach_face (s, (GtsFunc) quality_foreach_face, stats); gts_range_update (&stats->face_quality); gts_range_update (&stats->face_area); gts_range_update (&stats->edge_length); gts_range_update (&stats->edge_angle); } /** * gts_surface_print_stats: * @s: a #GtsSurface. * @fptr: a file pointer. * * Writes in the file pointed to by @fptr the statistics for surface @s. */ void gts_surface_print_stats (GtsSurface * s, FILE * fptr) { GtsSurfaceStats stats; GtsSurfaceQualityStats qstats; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); gts_surface_stats (s, &stats); gts_surface_quality_stats (s, &qstats); fprintf (fptr, "# vertices: %u edges: %u faces: %u\n" "# Connectivity statistics\n" "# incompatible faces: %u\n" "# duplicate faces: %u\n" "# boundary edges: %u\n" "# duplicate edges: %u\n" "# non-manifold edges: %u\n", stats.edges_per_vertex.n, stats.faces_per_edge.n, stats.n_faces, stats.n_incompatible_faces, stats.n_duplicate_faces, stats.n_boundary_edges, stats.n_duplicate_edges, stats.n_non_manifold_edges); fputs ("# edges per vertex: ", fptr); gts_range_print (&stats.edges_per_vertex, fptr); fputs ("\n# faces per edge: ", fptr); gts_range_print (&stats.faces_per_edge, fptr); fputs ("\n# Geometric statistics\n# face quality: ", fptr); gts_range_print (&qstats.face_quality, fptr); fputs ("\n# face area : ", fptr); gts_range_print (&qstats.face_area, fptr); fputs ("\n# edge length : ", fptr); gts_range_print (&qstats.edge_length, fptr); fputc ('\n', fptr); } static void write_vertex (GtsPoint * p, gpointer * data) { (*GTS_OBJECT (p)->klass->write) (GTS_OBJECT (p), (FILE *) data[0]); if (!GTS_POINT_CLASS (GTS_OBJECT (p)->klass)->binary) fputc ('\n', (FILE *) data[0]); g_hash_table_insert (data[2], p, GUINT_TO_POINTER (++(*((guint *) data[1])))); } static void write_edge (GtsSegment * s, gpointer * data) { fprintf ((FILE *) data[0], "%u %u", GPOINTER_TO_UINT (g_hash_table_lookup (data[2], s->v1)), GPOINTER_TO_UINT (g_hash_table_lookup (data[2], s->v2))); if (GTS_OBJECT (s)->klass->write) (*GTS_OBJECT (s)->klass->write) (GTS_OBJECT (s), (FILE *) data[0]); fputc ('\n', (FILE *) data[0]); g_hash_table_insert (data[3], s, GUINT_TO_POINTER (++(*((guint *) data[1])))); } static void write_face (GtsTriangle * t, gpointer * data) { fprintf (data[0], "%u %u %u", GPOINTER_TO_UINT (g_hash_table_lookup (data[3], t->e1)), GPOINTER_TO_UINT (g_hash_table_lookup (data[3], t->e2)), GPOINTER_TO_UINT (g_hash_table_lookup (data[3], t->e3))); if (GTS_OBJECT (t)->klass->write) (*GTS_OBJECT (t)->klass->write) (GTS_OBJECT (t), data[0]); fputc ('\n', data[0]); } /** * gts_surface_write: * @s: a #GtsSurface. * @fptr: a file pointer. * * Writes in the file @fptr an ASCII representation of @s. The file * format is as follows. * * All the lines beginning with #GTS_COMMENTS are ignored. The first line * contains three unsigned integers separated by spaces. The first * integer is the number of vertices, nv, the second is the number of * edges, ne and the third is the number of faces, nf. * * Follows nv lines containing the x, y and z coordinates of the * vertices. Follows ne lines containing the two indices (starting * from one) of the vertices of each edge. Follows nf lines containing * the three ordered indices (also starting from one) of the edges of * each face. * * The format described above is the least common denominator to all * GTS files. Consistent with an object-oriented approach, the GTS * file format is extensible. Each of the lines of the file can be * extended with user-specific attributes accessible through the * read() and write() virtual methods of each of the objects written * (surface, vertices, edges or faces). When read with different * object classes, these extra attributes are just ignored. */ void gts_surface_write (GtsSurface * s, FILE * fptr) { guint n; gpointer data[4]; GHashTable * vindex, * eindex; GtsSurfaceStats stats; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); data[0] = fptr; data[1] = &n; data[2] = vindex = g_hash_table_new (NULL, NULL); data[3] = eindex = g_hash_table_new (NULL, NULL); gts_surface_stats (s, &stats); fprintf (fptr, "%u %u %u", stats.edges_per_vertex.n, stats.faces_per_edge.n, stats.n_faces); if (GTS_OBJECT (s)->klass->write) (*GTS_OBJECT (s)->klass->write) (GTS_OBJECT (s), fptr); fputc ('\n', fptr); n = 0; gts_surface_foreach_vertex (s, (GtsFunc) write_vertex, data); n = 0; if (GTS_POINT_CLASS (s->vertex_class)->binary) fputc ('\n', fptr); gts_surface_foreach_edge (s, (GtsFunc) write_edge, data); gts_surface_foreach_face (s, (GtsFunc) write_face, data); g_hash_table_destroy (vindex); g_hash_table_destroy (eindex); } static void write_vertex_oogl (GtsPoint * p, gpointer * data) { FILE * fp = data[0]; fprintf (fp, "%g %g %g", p->x, p->y, p->z); if (GTS_OBJECT (p)->klass->color) { GtsColor c = (* GTS_OBJECT (p)->klass->color) (GTS_OBJECT (p)); fprintf (fp, " %g %g %g 1.0\n", c.r, c.g, c.b); } else fputc ('\n', fp); GTS_OBJECT (p)->reserved = GUINT_TO_POINTER ((*((guint *) data[1]))++); } static void write_face_oogl (GtsTriangle * t, FILE * fp) { GtsVertex * v1, * v2, * v3; gts_triangle_vertices (t, &v1, &v2, &v3); fprintf (fp, "3 %u %u %u", GPOINTER_TO_UINT (GTS_OBJECT (v1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (v2)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (v3)->reserved)); if (GTS_OBJECT (t)->klass->color) { GtsColor c = (* GTS_OBJECT (t)->klass->color) (GTS_OBJECT (t)); fprintf (fp, " %g %g %g\n", c.r, c.g, c.b); } else fputc ('\n', fp); } /** * gts_surface_write_oogl: * @s: a #GtsSurface. * @fptr: a file pointer. * * Writes in the file @fptr an OOGL (Geomview) representation of @s. */ void gts_surface_write_oogl (GtsSurface * s, FILE * fptr) { guint n = 0; gpointer data[2]; GtsSurfaceStats stats; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); data[0] = fptr; data[1] = &n; gts_surface_stats (s, &stats); if (GTS_OBJECT_CLASS (s->vertex_class)->color) fputs ("COFF ", fptr); else fputs ("OFF ", fptr); fprintf (fptr, "%u %u %u\n", stats.edges_per_vertex.n, stats.n_faces, stats.faces_per_edge.n); gts_surface_foreach_vertex (s, (GtsFunc) write_vertex_oogl, data); gts_surface_foreach_face (s, (GtsFunc) write_face_oogl, fptr); gts_surface_foreach_vertex (s, (GtsFunc) gts_object_reset_reserved, NULL); } static void write_vertex_vtk (GtsPoint * p, gpointer * data) { FILE * fp = data[0]; fprintf (fp, "%g %g %g\n", p->x, p->y, p->z); GTS_OBJECT (p)->reserved = GUINT_TO_POINTER ((*((guint *) data[1]))++); } static void write_face_vtk (GtsTriangle * t, FILE * fp) { GtsVertex * v1, * v2, * v3; gts_triangle_vertices (t, &v1, &v2, &v3); fprintf (fp, "3 %u %u %u\n", GPOINTER_TO_UINT (GTS_OBJECT (v1)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (v2)->reserved), GPOINTER_TO_UINT (GTS_OBJECT (v3)->reserved)); } /** * gts_surface_write_vtk: * @s: a #GtsSurface. * @fptr: a file pointer. * * Writes in the file @fptr a VTK representation of @s. */ void gts_surface_write_vtk (GtsSurface * s, FILE * fptr) { guint n = 0; gpointer data[2]; GtsSurfaceStats stats; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); data[0] = fptr; data[1] = &n; gts_surface_stats (s, &stats); fprintf (fptr, "# vtk DataFile Version 2.0\n" "Generated by GTS\n" "ASCII\n" "DATASET POLYDATA\n" "POINTS %u float\n", stats.edges_per_vertex.n); gts_surface_foreach_vertex (s, (GtsFunc) write_vertex_vtk, data); fprintf (fptr, "POLYGONS %u %u\n", stats.n_faces, stats.n_faces*4); gts_surface_foreach_face (s, (GtsFunc) write_face_vtk, fptr); gts_surface_foreach_vertex (s, (GtsFunc) gts_object_reset_reserved, NULL); } static void write_edge_oogl_boundary (GtsSegment * s, gpointer * data) { if (!gts_edge_is_boundary (GTS_EDGE (s), data[1])) return; if (GTS_OBJECT (s)->klass->color) { GtsColor c = (* GTS_OBJECT (s)->klass->color) (GTS_OBJECT (s)); fprintf (data[0], "VECT 1 2 1 2 1 %g %g %g %g %g %g %g %g %g 1.\n", GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z, c.r, c.g, c.b); } else fprintf (data[0], "VECT 1 2 0 2 0 %g %g %g %g %g %g\n", GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z, GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z); } /** * gts_surface_write_oogl_boundary: * @s: a #GtsSurface. * @fptr: a file pointer. * * Writes in the file @fptr an OOGL (Geomview) representation of the * boundary of @s. */ void gts_surface_write_oogl_boundary (GtsSurface * s, FILE * fptr) { gpointer data[2]; g_return_if_fail (s != NULL); g_return_if_fail (fptr != NULL); data[0] = fptr; data[1] = s; fputs ("LIST {\n", fptr); gts_surface_foreach_edge (s, (GtsFunc) write_edge_oogl_boundary, data); fputs ("}\n", fptr); } #ifdef USE_SURFACE_BTREE static gint vertex_foreach_face (GtsTriangle * t, gpointer t_data, gpointer * info) #else /* not USE_SURFACE_BTREE */ static void vertex_foreach_face (GtsTriangle * t, gpointer t_data, gpointer * info) #endif /* not USE_SURFACE_BTREE */ { GHashTable * hash = info[0]; gpointer data = info[1]; GtsFunc func = (GtsFunc) info[2]; GtsSegment * s1 = GTS_SEGMENT (t->e1); if (!g_hash_table_lookup (hash, s1->v1)) { (*func) (s1->v1, data); g_hash_table_insert (hash, s1->v1, GINT_TO_POINTER (-1)); } if (!g_hash_table_lookup (hash, s1->v2)) { (*func) (s1->v2, data); g_hash_table_insert (hash, s1->v2, GINT_TO_POINTER (-1)); } if (!g_hash_table_lookup (hash, gts_triangle_vertex (t))) { (*func) (gts_triangle_vertex (t), data); g_hash_table_insert (hash, gts_triangle_vertex (t), GINT_TO_POINTER (-1)); } #ifdef USE_SURFACE_BTREE return FALSE; #endif /* USE_SURFACE_BTREE */ } /** * gts_surface_foreach_vertex: * @s: a #GtsSurface. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func once for each vertex of @s. */ void gts_surface_foreach_vertex (GtsSurface * s, GtsFunc func, gpointer data) { gpointer info[3]; g_return_if_fail (s != NULL); g_return_if_fail (func != NULL); /* forbid removal of faces */ s->keep_faces = TRUE; info[0] = g_hash_table_new (NULL, NULL); info[1] = data; info[2] = func; #ifdef USE_SURFACE_BTREE g_tree_traverse (s->faces, (GTraverseFunc) vertex_foreach_face, G_IN_ORDER, info); #else /* not USE_SURFACE_BTREE */ g_hash_table_foreach (s->faces, (GHFunc) vertex_foreach_face, info); #endif /* not USE_SURFACE_BTREE */ g_hash_table_destroy (info[0]); /* allow removal of faces */ s->keep_faces = FALSE; } #ifdef USE_SURFACE_BTREE static gint edge_foreach_face (GtsTriangle * t, gpointer t_data, gpointer * info) #else /* not USE_SURFACE_BTREE */ static void edge_foreach_face (GtsTriangle * t, gpointer t_data, gpointer * info) #endif /* not USE_SURFACE_BTREE */ { GHashTable * hash = info[0]; gpointer data = info[1]; GtsFunc func = (GtsFunc) info[2]; if (!g_hash_table_lookup (hash, t->e1)) { (*func) (t->e1, data); g_hash_table_insert (hash, t->e1, GINT_TO_POINTER (-1)); } if (!g_hash_table_lookup (hash, t->e2)) { (*func) (t->e2, data); g_hash_table_insert (hash, t->e2, GINT_TO_POINTER (-1)); } if (!g_hash_table_lookup (hash, t->e3)) { (*func) (t->e3, data); g_hash_table_insert (hash, t->e3, GINT_TO_POINTER (-1)); } #ifdef USE_SURFACE_BTREE return FALSE; #endif /* not USE_SURFACE_BTREE */ } /** * gts_surface_foreach_edge: * @s: a #GtsSurface. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func once for each edge of @s. */ void gts_surface_foreach_edge (GtsSurface * s, GtsFunc func, gpointer data) { gpointer info[3]; g_return_if_fail (s != NULL); g_return_if_fail (func != NULL); /* forbid removal of faces */ s->keep_faces = TRUE; info[0] = g_hash_table_new (NULL, NULL); info[1] = data; info[2] = func; #ifdef USE_SURFACE_BTREE g_tree_traverse (s->faces, (GTraverseFunc) edge_foreach_face, G_IN_ORDER, info); #else /* not USE_SURFACE_BTREE */ g_hash_table_foreach (s->faces, (GHFunc) edge_foreach_face, info); #endif /* not USE_SURFACE_BTREE */ g_hash_table_destroy (info[0]); /* allow removal of faces */ s->keep_faces = FALSE; } #ifdef USE_SURFACE_BTREE static gint foreach_face (GtsFace * f, gpointer t_data, gpointer * info) #else /* not USE_SURFACE_BTREE */ static void foreach_face (GtsFace * f, gpointer t_data, gpointer * info) #endif /* not USE_SURFACE_BTREE */ { (*((GtsFunc) info[0])) (f, info[1]); #ifdef USE_SURFACE_BTREE return FALSE; #endif /* USE_SURFACE_BTREE */ } /** * gts_surface_foreach_face: * @s: a #GtsSurface. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func once for each face of @s. */ void gts_surface_foreach_face (GtsSurface * s, GtsFunc func, gpointer data) { gpointer info[2]; g_return_if_fail (s != NULL); g_return_if_fail (func != NULL); /* forbid removal of faces */ s->keep_faces = TRUE; info[0] = func; info[1] = data; #ifdef USE_SURFACE_BTREE g_tree_traverse (s->faces, (GTraverseFunc) foreach_face, G_IN_ORDER, info); #else /* not USE_SURFACE_BTREE */ g_hash_table_foreach (s->faces, (GHFunc) foreach_face, info); #endif /* not USE_SURFACE_BTREE */ /* allow removal of faces */ s->keep_faces = FALSE; } #ifdef USE_SURFACE_BTREE static gint foreach_face_remove (GtsFace * f, gpointer t_data, gpointer * info) { if ((*((GtsFunc) info[0])) (f, info[1])) { GtsSurface * s = info[2]; guint * n = info[3]; f->surfaces = g_slist_remove (f->surfaces, s); if (!GTS_OBJECT_DESTROYED (f) && !gts_allow_floating_faces && f->surfaces == NULL) gts_object_destroy (GTS_OBJECT (f)); if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (s, f); g_tree_remove (s->faces, f); (*n)++; } return FALSE; } #else /* not USE_SURFACE_BTREE */ static gboolean foreach_face_remove (GtsFace * f, gpointer t_data, gpointer * info) { if ((*((GtsFunc) info[0])) (f, info[1])) { GtsSurface * s = info[2]; f->surfaces = g_slist_remove (f->surfaces, s); if (!GTS_OBJECT_DESTROYED (f) && !gts_allow_floating_faces && f->surfaces == NULL) gts_object_destroy (GTS_OBJECT (f)); if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (s, f); return TRUE; } return FALSE; } #endif /* not USE_SURFACE_BTREE */ /** * gts_surface_foreach_face_remove: * @s: a #GtsSurface. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func once for each face of @s. If @func returns %TRUE the * corresponding face is removed from @s (and destroyed if it does not * belong to any other surface and #gts_allow_floating_faces is set to * %FALSE). * * Returns: the number of faces removed from @s. */ guint gts_surface_foreach_face_remove (GtsSurface * s, GtsFunc func, gpointer data) { gpointer info[4]; guint n = 0; g_return_val_if_fail (s != NULL, 0); g_return_val_if_fail (func != NULL, 0); /* forbid removal of faces */ s->keep_faces = TRUE; info[0] = func; info[1] = data; info[2] = s; #ifdef USE_SURFACE_BTREE info[3] = &n; g_tree_traverse (s->faces, (GTraverseFunc) foreach_face_remove, G_PRE_ORDER, info); #else /* not USE_SURFACE_BTREE */ n = g_hash_table_foreach_remove (s->faces, (GHRFunc) foreach_face_remove, info); #endif /* not USE_SURFACE_BTREE */ /* allow removal of faces */ s->keep_faces = FALSE; return n; } static void midvertex_insertion (GtsEdge * e, GtsSurface * surface, GtsEHeap * heap, GtsRefineFunc refine_func, gpointer refine_data, GtsVertexClass * vertex_class, GtsEdgeClass * edge_class) { GtsVertex * midvertex; GtsEdge * e1, * e2; GSList * i; midvertex = (*refine_func) (e, vertex_class, refine_data); e1 = gts_edge_new (edge_class, GTS_SEGMENT (e)->v1, midvertex); gts_eheap_insert (heap, e1); e2 = gts_edge_new (edge_class, GTS_SEGMENT (e)->v2, midvertex); gts_eheap_insert (heap, e2); /* creates new faces and modifies old ones */ i = e->triangles; while (i) { GtsTriangle * t = i->data; GtsVertex * v1, * v2, * v3; GtsEdge * te2, * te3, * ne, * tmp; gts_triangle_vertices_edges (t, e, &v1, &v2, &v3, &e, &te2, &te3); ne = gts_edge_new (edge_class, midvertex, v3); gts_eheap_insert (heap, ne); if (GTS_SEGMENT (e1)->v1 == v2) { tmp = e1; e1 = e2; e2 = tmp; } e1->triangles = g_slist_prepend (e1->triangles, t); ne->triangles = g_slist_prepend (ne->triangles, t); te2->triangles = g_slist_remove (te2->triangles, t); t->e1 = e1; t->e2 = ne; t->e3 = te3; gts_surface_add_face (surface, gts_face_new (surface->face_class, e2, te2, ne)); i = i->next; } /* destroys edge */ g_slist_free (e->triangles); e->triangles = NULL; gts_object_destroy (GTS_OBJECT (e)); } static gdouble edge_length2_inverse (GtsSegment * s) { return - gts_point_distance2 (GTS_POINT (s->v1), GTS_POINT (s->v2)); } static void create_heap_refine (GtsEdge * e, GtsEHeap * heap) { gts_eheap_insert (heap, e); } /** * gts_surface_refine: * @surface: a #GtsSurface. * @cost_func: a function returning the cost for a given edge. * @cost_data: user data to be passed to @cost_func. * @refine_func: a #GtsRefineFunc. * @refine_data: user data to be passed to @refine_func. * @stop_func: a #GtsStopFunc. * @stop_data: user data to be passed to @stop_func. * * Refine @surface using a midvertex insertion technique. All the * edges of @surface are ordered according to @cost_func. The edges * are then processed in order until @stop_func returns %TRUE. Each * edge is split in two and new edges and faces are created. * * If @cost_func is set to %NULL, the edges are sorted according * to their length squared (the longest is on top). * * If @refine_func is set to %NULL gts_segment_midvertex() is used. * */ void gts_surface_refine (GtsSurface * surface, GtsKeyFunc cost_func, gpointer cost_data, GtsRefineFunc refine_func, gpointer refine_data, GtsStopFunc stop_func, gpointer stop_data) { GtsEHeap * heap; GtsEdge * e; gdouble top_cost; g_return_if_fail (surface != NULL); g_return_if_fail (stop_func != NULL); if (cost_func == NULL) cost_func = (GtsKeyFunc) edge_length2_inverse; if (refine_func == NULL) refine_func = (GtsRefineFunc) gts_segment_midvertex; heap = gts_eheap_new (cost_func, cost_data); gts_eheap_freeze (heap); gts_surface_foreach_edge (surface, (GtsFunc) create_heap_refine, heap); gts_eheap_thaw (heap); while ((e = gts_eheap_remove_top (heap, &top_cost)) && !(*stop_func) (top_cost, gts_eheap_size (heap) + gts_edge_face_number (e, surface) + 2, stop_data)) midvertex_insertion (e, surface, heap, refine_func, refine_data, surface->vertex_class, surface->edge_class); gts_eheap_destroy (heap); } static GSList * edge_triangles (GtsEdge * e1, GtsEdge * e) { GSList * i = e1->triangles; GSList * triangles = NULL; while (i) { GtsTriangle * t = i->data; if (t->e1 == e || t->e2 == e || t->e3 == e) { GtsEdge * e2; GSList * j; if (t->e1 == e) { if (t->e2 == e1) e2 = t->e3; else e2 = t->e2; } else if (t->e2 == e) { if (t->e3 == e1) e2 = t->e1; else e2 = t->e3; } else { if (t->e2 == e1) e2 = t->e1; else e2 = t->e2; } j = e2->triangles; while (j) { GtsTriangle * t = j->data; if (t->e1 != e && t->e2 != e && t->e3 != e) triangles = g_slist_prepend (triangles, t); j = j->next; } } else triangles = g_slist_prepend (triangles, t); i = i->next; } return triangles; } static void replace_vertex (GSList * i, GtsVertex * v1, GtsVertex * v) { while (i) { GtsSegment * s = i->data; if (s->v1 == v1) s->v1 = v; else s->v2 = v; i = i->next; } } /** * gts_edge_collapse_creates_fold: * @e: a #GtsEdge. * @v: a #GtsVertex. * @max: the maximum value of the square of the cosine of the angle between * two triangles. * * Returns: %TRUE if collapsing edge @e to vertex @v would create * faces making an angle the cosine squared of which would be larger than max, * %FALSE otherwise. */ gboolean gts_edge_collapse_creates_fold (GtsEdge * e, GtsVertex * v, gdouble max) { GtsVertex * v1, * v2; GtsSegment * s; GSList * i; gboolean folded = FALSE; g_return_val_if_fail (e != NULL, TRUE); g_return_val_if_fail (v != NULL, TRUE); s = GTS_SEGMENT (e); v1 = s->v1; v2 = s->v2; replace_vertex (v1->segments, v1, v); replace_vertex (v2->segments, v2, v); i = v1->segments; while (i && !folded) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { GtsEdge * e1 = GTS_EDGE (s); if (e1 != e) { GSList * triangles = edge_triangles (e1, e); folded = gts_triangles_are_folded (triangles, s->v1, s->v2, max); g_slist_free (triangles); } } i = i->next; } i = v2->segments; while (i && !folded) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { GtsEdge * e1 = GTS_EDGE (s); if (e1 != e) { GSList * triangles = edge_triangles (e1, e); folded = gts_triangles_are_folded (triangles, s->v1, s->v2, max); g_slist_free (triangles); } } i = i->next; } #if 1 if (!folded) { GSList * triangles = gts_vertex_triangles (v1, NULL); i = triangles = gts_vertex_triangles (v2, triangles); while (i && !folded) { GtsTriangle * t = i->data; if (t->e1 != e && t->e2 != e && t->e3 != e) { GtsEdge * e1 = gts_triangle_edge_opposite (t, v); g_assert (e1); folded = gts_triangles_are_folded (e1->triangles, GTS_SEGMENT (e1)->v1, GTS_SEGMENT (e1)->v2, max); } i = i->next; } g_slist_free (triangles); } #endif replace_vertex (v1->segments, v, v1); replace_vertex (v2->segments, v, v2); return folded; } /** * gts_edge_collapse_is_valid: * @e: a #GtsEdge. * * An implementation of the topological constraints described in the * "Mesh Optimization" article of Hoppe et al (1993). * * Returns: %TRUE if @e can be collapsed without violation of the topological * constraints, %FALSE otherwise. */ gboolean gts_edge_collapse_is_valid (GtsEdge * e) { GSList * i; g_return_val_if_fail (e != NULL, FALSE); i = GTS_SEGMENT (e)->v1->segments; while (i) { GtsEdge * e1 = i->data; if (e1 != e && GTS_IS_EDGE (e1)) { GtsEdge * e2 = NULL; GSList * j = GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v1 ? GTS_SEGMENT (e1)->v2->segments : GTS_SEGMENT (e1)->v1->segments; while (j && !e2) { GtsEdge * e1 = j->data; if (GTS_IS_EDGE (e1) && (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v2 || GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e)->v2)) e2 = e1; j = j->next; } if (e2 && !gts_triangle_use_edges (e, e1, e2)) return FALSE; } i = i->next; } if (gts_edge_is_boundary (e, NULL)) { GtsTriangle * t = e->triangles->data; if (gts_edge_is_boundary (t->e1, NULL) && gts_edge_is_boundary (t->e2, NULL) && gts_edge_is_boundary (t->e3, NULL)) return FALSE; } else { if (gts_vertex_is_boundary (GTS_SEGMENT (e)->v1, NULL) && gts_vertex_is_boundary (GTS_SEGMENT (e)->v2, NULL)) return FALSE; if (gts_edge_belongs_to_tetrahedron (e)) return FALSE; } return TRUE; } #define HEAP_INSERT_EDGE(h, e) (GTS_OBJECT (e)->reserved = gts_eheap_insert (h, e)) #define HEAP_REMOVE_EDGE(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\ GTS_OBJECT (e)->reserved = NULL) static GtsVertex * edge_collapse (GtsEdge * e, GtsEHeap * heap, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsVertexClass * klass, gdouble maxcosine2) { GSList * i; GtsVertex * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid; /* if the edge is degenerate (i.e. v1 == v2), destroy and return */ if (v1 == v2) { gts_object_destroy (GTS_OBJECT (e)); return NULL; } if (!gts_edge_collapse_is_valid (e)) { GTS_OBJECT (e)->reserved = gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE); return NULL; } mid = (*coarsen_func) (e, klass, coarsen_data); if (gts_edge_collapse_creates_fold (e, mid, maxcosine2)) { GTS_OBJECT (e)->reserved = gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE); gts_object_destroy (GTS_OBJECT (mid)); return NULL; } gts_object_destroy (GTS_OBJECT (e)); gts_vertex_replace (v1, mid); gts_object_destroy (GTS_OBJECT (v1)); gts_vertex_replace (v2, mid); gts_object_destroy (GTS_OBJECT (v2)); /* destroy duplicate edges */ i = mid->segments; while (i) { GtsEdge * e1 = i->data; GtsEdge * duplicate; while ((duplicate = gts_edge_is_duplicate (e1))) { gts_edge_replace (duplicate, GTS_EDGE (e1)); HEAP_REMOVE_EDGE (heap, duplicate); gts_object_destroy (GTS_OBJECT (duplicate)); } i = i->next; if (!e1->triangles) { /* e1 is the result of the collapse of one edge of a pair of identical faces (it should not happen unless duplicate triangles are present in the initial surface) */ g_warning ("file %s: line %d (%s): probably duplicate triangle.", __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION); HEAP_REMOVE_EDGE (heap, e1); gts_object_destroy (GTS_OBJECT (e1)); if (i == NULL) /* mid has been destroyed */ mid = NULL; } } return mid; } static void update_closest_neighbors (GtsVertex * v, GtsEHeap * heap) { GSList * i = v->segments; while (i) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { HEAP_REMOVE_EDGE (heap, GTS_EDGE (s)); HEAP_INSERT_EDGE (heap, GTS_EDGE (s)); } i = i->next; } } static void update_2nd_closest_neighbors (GtsVertex * v, GtsEHeap * heap) { GSList * i = v->segments; GSList * list = NULL; while (i) { GtsSegment * s = i->data; if (GTS_IS_EDGE (s)) { GtsVertex * v1 = s->v1 == v ? s->v2 : s->v1; GSList * j = v1->segments; while (j) { GtsSegment * s1 = j->data; if (GTS_IS_EDGE (s1) && !g_slist_find (list, s1)) list = g_slist_prepend (list, s1); j = j->next; } } i = i->next; } i = list; while (i) { GtsEdge * e = i->data; HEAP_REMOVE_EDGE (heap, e); HEAP_INSERT_EDGE (heap, e); i = i->next; } g_slist_free (list); } static gdouble edge_length2 (GtsEdge * e) { return gts_point_distance2 (GTS_POINT (GTS_SEGMENT (e)->v1), GTS_POINT (GTS_SEGMENT (e)->v2)); } static void create_heap_coarsen (GtsEdge * e, GtsEHeap * heap) { HEAP_INSERT_EDGE (heap, e); } /** * gts_surface_coarsen: * @surface: a #GtsSurface. * @cost_func: a function returning the cost for a given edge. * @cost_data: user data to be passed to @cost_func. * @coarsen_func: a #GtsCoarsenVertexFunc. * @coarsen_data: user data to be passed to @coarsen_func. * @stop_func: a #GtsStopFunc. * @stop_data: user data to be passed to @stop_func. * @minangle: minimum angle between two neighboring triangles. * * The edges of @surface are sorted according to @cost_func to * create a priority heap (a #GtsEHeap). The edges are extracted in * turn from the top of the heap and collapsed (i.e. the vertices are * replaced by the vertex returned by the @coarsen_func function) * until the @stop_func functions returns %TRUE. * * If @cost_func is set to %NULL, the edges are sorted according * to their length squared (the shortest is on top). * * If @coarsen_func is set to %NULL gts_segment_midvertex() is used. * * The minimum angle is used to avoid introducing faces which would be folded. */ void gts_surface_coarsen (GtsSurface * surface, GtsKeyFunc cost_func, gpointer cost_data, GtsCoarsenFunc coarsen_func, gpointer coarsen_data, GtsStopFunc stop_func, gpointer stop_data, gdouble minangle) { GtsEHeap * heap; GtsEdge * e; gdouble top_cost; gdouble maxcosine2; g_return_if_fail (surface != NULL); g_return_if_fail (stop_func != NULL); if (cost_func == NULL) cost_func = (GtsKeyFunc) edge_length2; if (coarsen_func == NULL) coarsen_func = (GtsCoarsenFunc) gts_segment_midvertex; heap = gts_eheap_new (cost_func, cost_data); maxcosine2 = cos (minangle); maxcosine2 *= maxcosine2; gts_eheap_freeze (heap); gts_surface_foreach_edge (surface, (GtsFunc) create_heap_coarsen, heap); gts_eheap_thaw (heap); /* we want to control edge destruction manually */ gts_allow_floating_edges = TRUE; while ((e = gts_eheap_remove_top (heap, &top_cost)) && (top_cost < G_MAXDOUBLE) && !(*stop_func) (top_cost, gts_eheap_size (heap) - gts_edge_face_number (e, surface), stop_data)) { GtsVertex * v = edge_collapse (e, heap, coarsen_func, coarsen_data, surface->vertex_class, maxcosine2); if (v != NULL) update_2nd_closest_neighbors (v, heap); } gts_allow_floating_edges = FALSE; /* set reserved field of remaining edges back to NULL */ if (e) GTS_OBJECT (e)->reserved = NULL; gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL); gts_eheap_destroy (heap); } /** * gts_coarsen_stop_number: * @cost: the cost of the edge collapse considered. * @nedge: the current number of edges of the surface being simplified. * @min_number: a pointer to the minimum number of edges desired for the * surface being simplified. * * This function is to be used as the @stop_func argument of * gts_surface_coarsen() or gts_psurface_new(). * * Returns: %TRUE if the edge collapse would create a surface with a smaller * number of edges than given by @min_number, %FALSE otherwise. */ gboolean gts_coarsen_stop_number (gdouble cost, guint nedge, guint * min_number) { g_return_val_if_fail (min_number != NULL, TRUE); if (nedge < *min_number) return TRUE; return FALSE; } /** * gts_coarsen_stop_cost: * @cost: the cost of the edge collapse considered. * @nedge: the current number of edges of the surface being simplified. * @max_cost: a pointer to the maximum cost allowed for an edge collapse. * * This function is to be used as the @stop_func argument of * gts_surface_coarsen() or gts_psurface_new(). * * Returns: %TRUE if the cost of the edge collapse considered is larger than * given by @max_cost, %FALSE otherwise. */ gboolean gts_coarsen_stop_cost (gdouble cost, guint nedge, gdouble * max_cost) { g_return_val_if_fail (max_cost != NULL, TRUE); if (cost > *max_cost) return TRUE; return FALSE; } #define GTS_M_ICOSAHEDRON_X /* sqrt(sqrt(5)+1)/sqrt(2*sqrt(5)) */ \ 0.850650808352039932181540497063011072240401406 #define GTS_M_ICOSAHEDRON_Y /* sqrt(2)/sqrt(5+sqrt(5)) */ \ 0.525731112119133606025669084847876607285497935 #define GTS_M_ICOSAHEDRON_Z 0.0 static guint generate_icosahedron (GtsSurface * s) { GtsVertex * v01 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_Z, +GTS_M_ICOSAHEDRON_X, -GTS_M_ICOSAHEDRON_Y); GtsVertex * v02 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_X, +GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z); GtsVertex * v03 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z, -GTS_M_ICOSAHEDRON_X); GtsVertex * v04 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z, +GTS_M_ICOSAHEDRON_X); GtsVertex * v05 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_X, -GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z); GtsVertex * v06 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_Z, +GTS_M_ICOSAHEDRON_X, +GTS_M_ICOSAHEDRON_Y); GtsVertex * v07 = gts_vertex_new (s->vertex_class, -GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z, +GTS_M_ICOSAHEDRON_X); GtsVertex * v08 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_Z, -GTS_M_ICOSAHEDRON_X, -GTS_M_ICOSAHEDRON_Y); GtsVertex * v09 = gts_vertex_new (s->vertex_class, -GTS_M_ICOSAHEDRON_X, +GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z); GtsVertex * v10 = gts_vertex_new (s->vertex_class, -GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z, -GTS_M_ICOSAHEDRON_X); GtsVertex * v11 = gts_vertex_new (s->vertex_class, -GTS_M_ICOSAHEDRON_X, -GTS_M_ICOSAHEDRON_Y, +GTS_M_ICOSAHEDRON_Z); GtsVertex * v12 = gts_vertex_new (s->vertex_class, +GTS_M_ICOSAHEDRON_Z, -GTS_M_ICOSAHEDRON_X, +GTS_M_ICOSAHEDRON_Y); GtsEdge * e01 = gts_edge_new (s->edge_class, v01, v02); GtsEdge * e02 = gts_edge_new (s->edge_class, v03, v02); GtsEdge * e03 = gts_edge_new (s->edge_class, v01, v03); GtsEdge * e04 = gts_edge_new (s->edge_class, v04, v05); GtsEdge * e05 = gts_edge_new (s->edge_class, v02, v05); GtsEdge * e06 = gts_edge_new (s->edge_class, v04, v02); GtsEdge * e07 = gts_edge_new (s->edge_class, v06, v07); GtsEdge * e08 = gts_edge_new (s->edge_class, v04, v07); GtsEdge * e09 = gts_edge_new (s->edge_class, v06, v04); GtsEdge * e10 = gts_edge_new (s->edge_class, v08, v03); GtsEdge * e11 = gts_edge_new (s->edge_class, v03, v05); GtsEdge * e12 = gts_edge_new (s->edge_class, v08, v05); GtsEdge * e13 = gts_edge_new (s->edge_class, v06, v09); GtsEdge * e14 = gts_edge_new (s->edge_class, v07, v09); GtsEdge * e15 = gts_edge_new (s->edge_class, v08, v10); GtsEdge * e16 = gts_edge_new (s->edge_class, v03, v10); GtsEdge * e17 = gts_edge_new (s->edge_class, v06, v01); GtsEdge * e18 = gts_edge_new (s->edge_class, v01, v09); GtsEdge * e19 = gts_edge_new (s->edge_class, v08, v11); GtsEdge * e20 = gts_edge_new (s->edge_class, v10, v11); GtsEdge * e21 = gts_edge_new (s->edge_class, v06, v02); GtsEdge * e22 = gts_edge_new (s->edge_class, v12, v11); GtsEdge * e23 = gts_edge_new (s->edge_class, v12, v08); GtsEdge * e24 = gts_edge_new (s->edge_class, v12, v07); GtsEdge * e25 = gts_edge_new (s->edge_class, v07, v11); GtsEdge * e26 = gts_edge_new (s->edge_class, v12, v04); GtsEdge * e27 = gts_edge_new (s->edge_class, v09, v11); GtsEdge * e28 = gts_edge_new (s->edge_class, v10, v09); GtsEdge * e29 = gts_edge_new (s->edge_class, v12, v05); GtsEdge * e30 = gts_edge_new (s->edge_class, v01, v10); gts_surface_add_face (s, gts_face_new (s->face_class, e01, e02, e03)); gts_surface_add_face (s, gts_face_new (s->face_class, e04, e05, e06)); gts_surface_add_face (s, gts_face_new (s->face_class, e07, e08, e09)); gts_surface_add_face (s, gts_face_new (s->face_class, e10, e11, e12)); gts_surface_add_face (s, gts_face_new (s->face_class, e13, e14, e07)); gts_surface_add_face (s, gts_face_new (s->face_class, e15, e16, e10)); gts_surface_add_face (s, gts_face_new (s->face_class, e17, e18, e13)); gts_surface_add_face (s, gts_face_new (s->face_class, e19, e20, e15)); gts_surface_add_face (s, gts_face_new (s->face_class, e21, e01, e17)); gts_surface_add_face (s, gts_face_new (s->face_class, e22, e19, e23)); gts_surface_add_face (s, gts_face_new (s->face_class, e09, e06, e21)); gts_surface_add_face (s, gts_face_new (s->face_class, e24, e25, e22)); gts_surface_add_face (s, gts_face_new (s->face_class, e26, e08, e24)); gts_surface_add_face (s, gts_face_new (s->face_class, e20, e27, e28)); gts_surface_add_face (s, gts_face_new (s->face_class, e29, e04, e26)); gts_surface_add_face (s, gts_face_new (s->face_class, e14, e27, e25)); gts_surface_add_face (s, gts_face_new (s->face_class, e23, e12, e29)); gts_surface_add_face (s, gts_face_new (s->face_class, e02, e05, e11)); gts_surface_add_face (s, gts_face_new (s->face_class, e30, e28, e18)); gts_surface_add_face (s, gts_face_new (s->face_class, e03, e16, e30)); return 0; } static GtsVertex * unit_sphere_arc_midvertex (GtsSegment * s, GtsVertexClass * vertex_class) { GtsPoint * p1, * p2; gdouble x, y, z, norm; p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2); x = 0.5*(p1->x + p2->x); y = 0.5*(p1->y + p2->y); z = 0.5*(p1->z + p2->z); norm = x*x + y*y + z*z; norm = sqrt (norm); x /= norm; y /= norm; z /= norm; return gts_vertex_new (vertex_class, x, y, z); } static void tessellate_face (GtsFace * f, GtsSurface * s, GtsRefineFunc refine_func, gpointer refine_data, GtsVertexClass * vertex_class, GtsEdgeClass * edge_class) { GtsTriangle * t; GtsEdge * e1, * e2, * e3; /* former edges */ GtsVertex * v1, * v2, * v3; /* initial vertices */ GtsVertex * v4, * v5, * v6; /* new vertices */ GtsEdge * e56, * e64, * e45; /* new inside edges */ GtsEdge * e24, * e34, * e35, * e15, * e16, * e26; /* new border edges */ GSList * dum; GtsEdge * edum; t = GTS_TRIANGLE (f); e1 = t->e1; e2 = t->e2; e3 = t->e3; if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1) { v1 = GTS_SEGMENT (e2)->v2; v2 = GTS_SEGMENT (e1)->v1; v3 = GTS_SEGMENT (e1)->v2; } else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2) { v1 = GTS_SEGMENT (e2)->v1; v2 = GTS_SEGMENT (e1)->v1; v3 = GTS_SEGMENT (e1)->v2; } else if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1) { v1 = GTS_SEGMENT (e2)->v2; v2 = GTS_SEGMENT (e1)->v2; v3 = GTS_SEGMENT (e1)->v1; } else if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v2) { v1 = GTS_SEGMENT (e2)->v1; v2 = GTS_SEGMENT (e1)->v2; v3 = GTS_SEGMENT (e1)->v1; } else { v1 = v2 = v3 = NULL; g_assert_not_reached (); } e1->triangles = g_slist_remove (e1->triangles, t); e2->triangles = g_slist_remove (e2->triangles, t); e3->triangles = g_slist_remove (e3->triangles, t); if (GTS_OBJECT (e1)->reserved) { dum = (GTS_OBJECT (e1)->reserved); e24 = dum->data; e34 = dum->next->data; v4 = GTS_SEGMENT (e24)->v2; if (GTS_SEGMENT (e24)->v1 == v3) { edum = e34; e34 = e24; e24 = edum; } } else { v4 = (*refine_func) (e1, vertex_class, refine_data); e24 = gts_edge_new (edge_class, v2, v4); e34 = gts_edge_new (edge_class, v3, v4); dum = g_slist_append (NULL, e24); dum = g_slist_append (dum, e34); GTS_OBJECT (e1)->reserved = dum; } if (GTS_OBJECT (e2)->reserved) { dum = (GTS_OBJECT (e2)->reserved); e35 = dum->data; e15 = dum->next->data; v5 = GTS_SEGMENT (e35)->v2; if (GTS_SEGMENT (e35)->v1 == v1) { edum = e15; e15 = e35; e35 = edum; } } else { v5 = (*refine_func) (e2, vertex_class, refine_data); e35 = gts_edge_new (edge_class, v3, v5); e15 = gts_edge_new (edge_class, v1, v5); dum = g_slist_append (NULL, e35); dum = g_slist_append (dum, e15); GTS_OBJECT (e2)->reserved = dum; } if (GTS_OBJECT (e3)->reserved) { dum = (GTS_OBJECT (e3)->reserved); e16 = dum->data; e26 = dum->next->data; v6 = GTS_SEGMENT (e16)->v2; if (GTS_SEGMENT (e16)->v1 == v2) { edum = e16; e16 = e26; e26 = edum; } } else { v6 = (*refine_func) (e3, vertex_class, refine_data); e16 = gts_edge_new (edge_class, v1, v6); e26 = gts_edge_new (edge_class, v2, v6); dum = g_slist_append (NULL, e16); dum = g_slist_append (dum, e26); GTS_OBJECT (e3)->reserved = dum; } if (e1->triangles == NULL) { g_slist_free (GTS_OBJECT (e1)->reserved); GTS_OBJECT (e1)->reserved = NULL; gts_object_destroy (GTS_OBJECT (e1)); e1 = NULL; } if (e2->triangles == NULL) { g_slist_free (GTS_OBJECT (e2)->reserved); GTS_OBJECT (e2)->reserved = NULL; gts_object_destroy (GTS_OBJECT (e2)); e2 = NULL; } if (e3->triangles == NULL) { g_slist_free (GTS_OBJECT (e3)->reserved); GTS_OBJECT (e3)->reserved = NULL; gts_object_destroy (GTS_OBJECT (e3)); e3 = NULL; } e56 = gts_edge_new (edge_class, v5, v6); e64 = gts_edge_new (edge_class, v6, v4); e45 = gts_edge_new (edge_class, v4, v5); t->e1 = e56; e56->triangles = g_slist_prepend (e56->triangles, t); t->e2 = e64; e64->triangles = g_slist_prepend (e64->triangles, t); t->e3 = e45; e45->triangles = g_slist_prepend (e45->triangles, t); gts_surface_add_face (s, gts_face_new (s->face_class, e16, e56, e15)); gts_surface_add_face (s, gts_face_new (s->face_class, e26, e24, e64)); gts_surface_add_face (s, gts_face_new (s->face_class, e45, e34, e35)); } static void create_array_tessellate (GtsFace * f, GPtrArray * array) { g_ptr_array_add (array, f); } /** * gts_surface_tessellate: * @s: a #GtsSurface. * @refine_func: a #GtsRefineFunc. * @refine_data: user data to be passed to @refine_func. * * Tessellate each triangle of @s with 4 triangles: * the number of triangles is increased by a factor of 4. * http://mathworld.wolfram.com/GeodesicDome.html * * If @refine_func is set to %NULL a mid arc function is used: if * the surface is a polyhedron with the unit sphere as circum sphere, * then gts_surface_tessellate() corresponds to a geodesation step * (see gts_surface_generate_sphere()). * */ void gts_surface_tessellate (GtsSurface * s, GtsRefineFunc refine_func, gpointer refine_data) { GPtrArray * array; guint i; g_return_if_fail (s != NULL); if (refine_func == NULL) /* tessellate_surface == geodesate_surface */ refine_func = (GtsRefineFunc) unit_sphere_arc_midvertex; array = g_ptr_array_new (); gts_surface_foreach_face (s, (GtsFunc) create_array_tessellate, array); for(i = 0; i < array->len; i++) tessellate_face (g_ptr_array_index (array, i), s, refine_func, refine_data, s->vertex_class, s->edge_class); g_ptr_array_free (array, TRUE); } /** * gts_surface_generate_sphere: * @s: a #GtsSurface. * @geodesation_order: a #guint. * * Add a triangulated unit sphere generated by recursive subdivision to @s. * First approximation is an isocahedron; each level of refinement * (@geodesation_order) increases the number of triangles by a factor of 4. * http://mathworld.wolfram.com/GeodesicDome.html * * Returns: @s. */ GtsSurface * gts_surface_generate_sphere (GtsSurface * s, guint geodesation_order) { guint cgo; g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (geodesation_order != 0, NULL); generate_icosahedron (s); for (cgo = 1; cgo < geodesation_order; cgo++) gts_surface_tessellate (s, NULL, NULL); return s; } static void foreach_vertex_copy (GtsPoint * p, GtsVertexClass * klass) { GTS_OBJECT (p)->reserved = gts_vertex_new (klass, p->x, p->y, p->z); } static void foreach_edge_copy (GtsSegment * s, GtsEdgeClass * klass) { GTS_OBJECT (s)->reserved = gts_edge_new (klass, GTS_OBJECT (s->v1)->reserved, GTS_OBJECT (s->v2)->reserved); } static void foreach_face_copy (GtsTriangle * t, GtsSurface * s) { gts_surface_add_face (s, gts_face_new (s->face_class, GTS_OBJECT (t->e1)->reserved, GTS_OBJECT (t->e2)->reserved, GTS_OBJECT (t->e3)->reserved)); } /** * gts_surface_copy: * @s1: a #GtsSurface. * @s2: a #GtsSurface. * * Add a copy of all the faces, edges and vertices of @s2 to @s1. * * Returns: @s1. */ GtsSurface * gts_surface_copy (GtsSurface * s1, GtsSurface * s2) { g_return_val_if_fail (s1 != NULL, NULL); g_return_val_if_fail (s2 != NULL, NULL); gts_surface_foreach_vertex (s2, (GtsFunc) foreach_vertex_copy, s1->vertex_class); gts_surface_foreach_edge (s2, (GtsFunc) foreach_edge_copy, s1->edge_class); gts_surface_foreach_face (s2, (GtsFunc) foreach_face_copy, s1); gts_surface_foreach_vertex (s2, (GtsFunc) gts_object_reset_reserved, NULL); gts_surface_foreach_edge (s2, (GtsFunc) gts_object_reset_reserved, NULL); return s1; } static void merge_foreach_face (GtsFace * f, GtsSurface * s) { gts_surface_add_face (s, f); } /** * gts_surface_merge: * @s: a #GtsSurface. * @with: another #GtsSurface. * * Adds all the faces of @with which do not already belong to @s * to @s. */ void gts_surface_merge (GtsSurface * s, GtsSurface * with) { g_return_if_fail (s != NULL); g_return_if_fail (with != NULL); gts_surface_foreach_face (with, (GtsFunc) merge_foreach_face, s); } static void manifold_foreach_edge (GtsEdge * e, gpointer * data) { gboolean * is_manifold = data[0]; if (*is_manifold) { if (gts_edge_face_number (e, data[1]) > 2) *is_manifold = FALSE; } } /** * gts_surface_is_manifold: * @s: a #GtsSurface. * * Returns: %TRUE if the surface is a manifold, %FALSE otherwise. */ gboolean gts_surface_is_manifold (GtsSurface * s) { gboolean is_manifold = TRUE; gpointer data[2]; g_return_val_if_fail (s != NULL, FALSE); data[0] = &is_manifold; data[1] = s; gts_surface_foreach_edge (s, (GtsFunc) manifold_foreach_edge, data); return is_manifold; } static void closed_foreach_edge (GtsEdge * e, gpointer * data) { gboolean * is_closed = data[0]; if (*is_closed) { if (gts_edge_face_number (e, data[1]) != 2) *is_closed = FALSE; } } /** * gts_surface_is_closed: * @s: a #GtsSurface. * * Returns: %TRUE if @s is a closed surface, %FALSE otherwise. Note that a * closed surface is also a manifold. */ gboolean gts_surface_is_closed (GtsSurface * s) { gboolean is_closed = TRUE; gpointer data[2]; g_return_val_if_fail (s != NULL, FALSE); data[0] = &is_closed; data[1] = s; gts_surface_foreach_edge (s, (GtsFunc) closed_foreach_edge, data); return is_closed; } static void orientable_foreach_edge (GtsEdge * e, gpointer * data) { gboolean * is_orientable = data[0]; if (*is_orientable) { GtsSurface * surface = data[1]; GtsFace * f1 = NULL, * f2 = NULL; GSList * i = e->triangles; while (i && *is_orientable) { GtsFace * f = i->data; if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, surface)) { if (!f1) f1 = f; else if (!f2) f2 = f; else *is_orientable = FALSE; } i = i->next; } if (f1 && f2 && !gts_triangles_are_compatible (GTS_TRIANGLE (f1), GTS_TRIANGLE (f2), e)) *is_orientable = FALSE; } } /** * gts_surface_is_orientable: * @s: a #GtsSurface. * * Returns: %TRUE if all the faces of @s have compatible orientation * as checked by gts_faces_are_compatible(), %FALSE otherwise. Note that * an orientable surface is also a manifold. */ gboolean gts_surface_is_orientable (GtsSurface * s) { gboolean is_orientable = TRUE; gpointer data[2]; g_return_val_if_fail (s != NULL, FALSE); data[0] = &is_orientable; data[1] = s; gts_surface_foreach_edge (s, (GtsFunc) orientable_foreach_edge, data); return is_orientable; } static void volume_foreach_face (GtsTriangle * t, gdouble * volume) { GtsVertex * va, * vb, * vc; GtsPoint * pa, * pb, * pc; gts_triangle_vertices (t, &va, &vb, &vc); pa = GTS_POINT (va); pb = GTS_POINT (vb); pc = GTS_POINT (vc); *volume += (pa->x * (pb->y * pc->z - pb->z * pc->y) + pb->x * (pc->y * pa->z - pc->z * pa->y) + pc->x * (pa->y * pb->z - pa->z * pb->y)); } /** * gts_surface_volume: * @s: a #GtsSurface. * * Returns: the signed volume of the domain bounded by the surface @s. It * makes sense only if @s is a closed and orientable manifold. */ gdouble gts_surface_volume (GtsSurface * s) { gdouble volume = 0.0; g_return_val_if_fail (s != NULL, 0.0); gts_surface_foreach_face (s, (GtsFunc) volume_foreach_face, &volume); return volume/6.; } static void center_of_mass_foreach_face (GtsTriangle * t, gpointer * data) { GtsVertex * v1, * v2, * v3; GtsPoint * p1, * p2, * p3; gdouble x1, y1, z1, x2, y2, z2, nx, ny, nz; gdouble * volume = data[0]; gdouble * cm = data[1]; gts_triangle_vertices (t, &v1, &v2, &v3); p1 = GTS_POINT (v1); p2 = GTS_POINT (v2); p3 = GTS_POINT (v3); x1 = p2->x - p1->x; y1 = p2->y - p1->y; z1 = p2->z - p1->z; x2 = p3->x - p1->x; y2 = p3->y - p1->y; z2 = p3->z - p1->z; nx = y1*z2 - z1*y2; ny = z1*x2 - x1*z2; nz = x1*y2 - y1*x2; cm[0] += nx*(p1->x*p1->x + p2->x*p2->x + p3->x*p3->x + p1->x*p2->x + p1->x*p3->x + p2->x*p3->x); cm[1] += ny*(p1->y*p1->y + p2->y*p2->y + p3->y*p3->y + p1->y*p2->y + p1->y*p3->y + p2->y*p3->y); cm[2] += nz*(p1->z*p1->z + p2->z*p2->z + p3->z*p3->z + p1->z*p2->z + p1->z*p3->z + p2->z*p3->z); *volume += nx*(p1->x + p2->x + p3->x); } /** * gts_surface_center_of_mass: * @s: a #GtsSurface. * @cm: a #GtsVector. * * Fills @cm with the coordinates of the center of mass of @s. * * Returns: the signed volume of the domain bounded by the surface @s. */ gdouble gts_surface_center_of_mass (GtsSurface * s, GtsVector cm) { gdouble volume = 0.; gpointer data[2]; g_return_val_if_fail (s != NULL, 0.0); data[0] = &volume; data[1] = &(cm[0]); cm[0] = cm[1] = cm[2] = 0.; gts_surface_foreach_face (s, (GtsFunc) center_of_mass_foreach_face, data); if (volume != 0.) { cm[0] /= 4.*volume; cm[1] /= 4.*volume; cm[2] /= 4.*volume; } return volume/6.; } static void center_of_area_foreach_face (GtsTriangle * t, gpointer * data) { GtsVertex * v1, * v2, * v3; GtsPoint * p1, * p2, * p3; gdouble a; gdouble * area = data[0]; gdouble * cm = data[1]; gts_triangle_vertices (t, &v1, &v2, &v3); p1 = GTS_POINT (v1); p2 = GTS_POINT (v2); p3 = GTS_POINT (v3); a = gts_triangle_area (t); cm[0] += a*(p1->x + p2->x + p3->x); cm[1] += a*(p1->y + p2->y + p3->y); cm[2] += a*(p1->z + p2->z + p3->z); *area += a; } /** * gts_surface_center_of_area: * @s: a #GtsSurface. * @cm: a #GtsVector. * * Fills @cm with the coordinates of the center of area of @s. * * Returns: the area of surface @s. */ gdouble gts_surface_center_of_area (GtsSurface * s, GtsVector cm) { gdouble area = 0.; gpointer data[2]; g_return_val_if_fail (s != NULL, 0.0); data[0] = &area; data[1] = &(cm[0]); cm[0] = cm[1] = cm[2] = 0.; gts_surface_foreach_face (s, (GtsFunc) center_of_area_foreach_face, data); if (area != 0.) { cm[0] /= 3.*area; cm[1] /= 3.*area; cm[2] /= 3.*area; } return area; } static void number_foreach (gpointer data, guint * n) { (*n)++; } /** * gts_surface_vertex_number: * @s: a #GtsSurface. * * Returns: the number of vertices of @s. */ guint gts_surface_vertex_number (GtsSurface * s) { guint n = 0; g_return_val_if_fail (s != NULL, 0); gts_surface_foreach_vertex (s, (GtsFunc) number_foreach, &n); return n; } /** * gts_surface_edge_number: * @s: a #GtsSurface. * * Returns: the number of edges of @s. */ guint gts_surface_edge_number (GtsSurface * s) { guint n = 0; g_return_val_if_fail (s != NULL, 0); gts_surface_foreach_edge (s, (GtsFunc) number_foreach, &n); return n; } /** * gts_surface_face_number: * @s: a #GtsSurface. * * Returns: the number of faces of @s */ guint gts_surface_face_number (GtsSurface * s) { g_return_val_if_fail (s != NULL, 0); #ifdef USE_SURFACE_BTREE return g_tree_nnodes (s->faces); #else /* not USE_SURFACE_BTREE */ return g_hash_table_size (s->faces); #endif /* not USE_SURFACE_BTREE */ } static void build_list_face (GtsTriangle * t, GSList ** list) { *list = g_slist_prepend (*list, gts_bbox_triangle (gts_bbox_class (), t)); } static void build_list_boundary (GtsEdge * e, GSList ** list) { if (gts_edge_is_boundary (e, NULL)) *list = g_slist_prepend (*list, gts_bbox_segment (gts_bbox_class (), GTS_SEGMENT (e))); } /** * gts_surface_distance: * @s1: a #GtsSurface. * @s2: a #GtsSurface. * @delta: a spatial increment defined as the percentage of the diagonal * of the bounding box of @s2. * @face_range: a #GtsRange. * @boundary_range: a #GtsRange. * * Using the gts_bb_tree_surface_distance() and * gts_bb_tree_surface_boundary_distance() functions fills @face_range * and @boundary_range with the min, max and average Euclidean * (minimum) distances between the faces of @s1 and the faces of @s2 * and between the boundary edges of @s1 and @s2. */ void gts_surface_distance (GtsSurface * s1, GtsSurface * s2, gdouble delta, GtsRange * face_range, GtsRange * boundary_range) { GNode * face_tree, * boundary_tree; GSList * bboxes; g_return_if_fail (s1 != NULL); g_return_if_fail (s2 != NULL); g_return_if_fail (delta > 0. && delta < 1.); g_return_if_fail (face_range != NULL); g_return_if_fail (boundary_range != NULL); bboxes = NULL; gts_surface_foreach_face (s2, (GtsFunc) build_list_face, &bboxes); if (bboxes != NULL) { face_tree = gts_bb_tree_new (bboxes); g_slist_free (bboxes); gts_bb_tree_surface_distance (face_tree, s1, (GtsBBoxDistFunc) gts_point_triangle_distance, delta, face_range); gts_bb_tree_destroy (face_tree, TRUE); bboxes = NULL; gts_surface_foreach_edge (s2, (GtsFunc) build_list_boundary, &bboxes); if (bboxes != NULL) { boundary_tree = gts_bb_tree_new (bboxes); g_slist_free (bboxes); gts_bb_tree_surface_boundary_distance (boundary_tree, s1, (GtsBBoxDistFunc) gts_point_segment_distance, delta, boundary_range); gts_bb_tree_destroy (boundary_tree, TRUE); } else gts_range_reset (boundary_range); } else { gts_range_reset (face_range); gts_range_reset (boundary_range); } } static void surface_boundary (GtsEdge * e, gpointer * data) { GSList ** list = data[0]; if (gts_edge_is_boundary (e, data[1])) *list = g_slist_prepend (*list, e); } /** * gts_surface_boundary: * @surface: a #GtsSurface. * * Returns: a list of #GtsEdge boundary of @surface. */ GSList * gts_surface_boundary (GtsSurface * surface) { GSList * list = NULL; gpointer data[2]; g_return_val_if_fail (surface != NULL, NULL); data[0] = &list; data[1] = surface; gts_surface_foreach_edge (surface, (GtsFunc) surface_boundary, data); return list; } struct _GtsSurfaceTraverse { GtsFifo * q; GtsSurface * s; }; /** * gts_surface_traverse_new: * @s: a #GtsSurface. * @f: a #GtsFace belonging to @s. * * Returns: a new #GtsSurfaceTraverse, initialized to start traversing * from face @f of surface @s. */ GtsSurfaceTraverse * gts_surface_traverse_new (GtsSurface * s, GtsFace * f) { GtsSurfaceTraverse * t; g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (f != NULL, NULL); g_return_val_if_fail (gts_face_has_parent_surface (f, s), NULL); t = g_malloc (sizeof (GtsSurfaceTraverse)); t->q = gts_fifo_new (); t->s = s; GTS_OBJECT (f)->reserved = GUINT_TO_POINTER (1); gts_fifo_push (t->q, f); return t; } static void push_neighbor (GtsFace * v, gpointer * data) { if (!GTS_OBJECT (v)->reserved) { GTS_OBJECT (v)->reserved = GUINT_TO_POINTER (GPOINTER_TO_UINT (GTS_OBJECT (data[1])->reserved) + 1); gts_fifo_push (data[0], v); } } /** * gts_surface_traverse_next: * @t: a #GtsSurfaceTraverse. * @level: a pointer to a guint or %NULL. * * Returns: the next face of the traversal in breadth-first order or * %NULL if no faces are left. If @level if not %NULL, it is filled * with the level of the returned face (0 for the initial face, 1 for * its neighbors and so on). */ GtsFace * gts_surface_traverse_next (GtsSurfaceTraverse * t, guint * level) { GtsFace * u; g_return_val_if_fail (t != NULL, NULL); u = gts_fifo_pop (t->q); if (u) { gpointer data[2]; if (level) *level = GPOINTER_TO_UINT (GTS_OBJECT (u)->reserved); data[0] = t->q; data[1] = u; gts_face_foreach_neighbor (u, t->s, (GtsFunc) push_neighbor, data); } return u; } /** * gts_surface_traverse_destroy: * @t: a #GtsSurfaceTraverse. * * Frees all the memory allocated for @t. */ void gts_surface_traverse_destroy (GtsSurfaceTraverse * t) { g_return_if_fail (t != NULL); gts_surface_foreach_face (t->s, (GtsFunc) gts_object_reset_reserved, NULL); gts_fifo_destroy (t->q); g_free (t); } static void traverse_manifold (GtsTriangle * t, GtsSurface * s) { if (g_slist_length (GTS_FACE (t)->surfaces) > 1) return; gts_surface_add_face (s, GTS_FACE (t)); if (g_slist_length (t->e1->triangles) == 2) { if (t->e1->triangles->data != t) traverse_manifold (t->e1->triangles->data, s); else traverse_manifold (t->e1->triangles->next->data, s); } if (g_slist_length (t->e2->triangles) == 2) { if (t->e2->triangles->data != t) traverse_manifold (t->e2->triangles->data, s); else traverse_manifold (t->e2->triangles->next->data, s); } if (g_slist_length (t->e3->triangles) == 2) { if (t->e3->triangles->data != t) traverse_manifold (t->e3->triangles->data, s); else traverse_manifold (t->e3->triangles->next->data, s); } } static void non_manifold_edges (GtsEdge * e, gpointer * data) { GtsSurface * s = data[0]; GSList ** non_manifold = data[1]; if (gts_edge_face_number (e, s) > 2) { GSList * i = e->triangles; while (i) { if (gts_face_has_parent_surface (i->data, s) && !g_slist_find (*non_manifold, i->data)) *non_manifold = g_slist_prepend (*non_manifold, i->data); i = i->next; } } } static void traverse_boundary (GtsEdge * e, gpointer * data) { GtsSurface * orig = data[0]; GSList ** components = data[1]; GtsFace * f = gts_edge_is_boundary (e, orig); if (f != NULL && g_slist_length (f->surfaces) == 1) { GtsSurface * s = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (orig)->klass), orig->face_class, orig->edge_class, orig->vertex_class); GSList * non_manifold = NULL, * i; gpointer data[2]; *components = g_slist_prepend (*components, s); data[0] = s; data[1] = &non_manifold; traverse_manifold (GTS_TRIANGLE (f), s); gts_surface_foreach_edge (s, (GtsFunc) non_manifold_edges, data); i = non_manifold; while (i) { gts_surface_remove_face (s, i->data); i = i->next; } g_slist_free (non_manifold); } } static void traverse_remaining (GtsFace * f, gpointer * data) { GtsSurface * orig = data[0]; GSList ** components = data[1]; if (g_slist_length (f->surfaces) == 1) { GtsSurface * s = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (orig)->klass), orig->face_class, orig->edge_class, orig->vertex_class); GSList * non_manifold = NULL, * i; gpointer data[2]; *components = g_slist_prepend (*components, s); data[0] = s; data[1] = &non_manifold; traverse_manifold (GTS_TRIANGLE (f), s); gts_surface_foreach_edge (s, (GtsFunc) non_manifold_edges, data); i = non_manifold; while (i) { gts_surface_remove_face (s, i->data); i = i->next; } g_slist_free (non_manifold); } } /** * gts_surface_split: * @s: a #GtsSurface. * * Splits a surface into connected and manifold components. * * Returns: a list of new #GtsSurface. */ GSList * gts_surface_split (GtsSurface * s) { gpointer data[2]; GSList * components = NULL; g_return_val_if_fail (s != NULL, NULL); data[0] = s; data[1] = &components; /* boundary components */ gts_surface_foreach_edge (s, (GtsFunc) traverse_boundary, data); /* remaining components */ gts_surface_foreach_face (s, (GtsFunc) traverse_remaining, data); return components; } gts-snapshot-121130/src/iso.c0000644000175100017510000003072012055775440012720 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" typedef enum { LEFT = 0, RIGHT = 1 } Orientation; typedef struct { GtsVertex * v; Orientation orientation; } OrientedVertex; struct _GtsIsoSlice { OrientedVertex *** vertices; guint nx, ny; }; /* coordinates of the edges of the cube (see doc/isocube.fig) */ static guint c[12][4] = { {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 1}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 1, 0, 1}, {1, 1, 0, 0}, {2, 0, 0, 0}, {2, 1, 0, 0}, {2, 1, 1, 0}, {2, 0, 1, 0}}; /* first index is the edge number, second index is the edge orientation (RIGHT or LEFT), third index are the edges which this edge may connect to in order */ static guint edge[12][2][3] = { {{9, 1, 8}, {4, 3, 7}}, /* 0 */ {{6, 2, 5}, {8, 0, 9}}, /* 1 */ {{10, 3, 11}, {5, 1, 6}}, /* 2 */ {{7, 0, 4}, {11, 2, 10}}, /* 3 */ {{3, 7, 0}, {8, 5, 11}}, /* 4 */ {{11, 4, 8}, {1, 6, 2}}, /* 5 */ {{2, 5, 1}, {9, 7, 10}}, /* 6 */ {{10, 6, 9}, {0, 4, 3}}, /* 7 */ {{5, 11, 4}, {0, 9, 1}}, /* 8 */ {{1, 8, 0}, {7, 10, 6}}, /* 9 */ {{6, 9, 7}, {3, 11, 2}}, /* 10 */ {{2, 10, 3}, {4, 8, 5}} /* 11 */ }; static void ** malloc2D (guint nx, guint ny, gulong size) { void ** m = g_malloc (nx*sizeof (void *)); guint i; for (i = 0; i < nx; i++) m[i] = g_malloc0 (ny*size); return m; } static void free2D (void ** m, guint nx) { guint i; g_return_if_fail (m != NULL); for (i = 0; i < nx; i++) g_free (m[i]); g_free (m); } /** * gts_grid_plane_new: * @nx: * @ny: * * Returns: */ GtsGridPlane * gts_grid_plane_new (guint nx, guint ny) { GtsGridPlane * g = g_malloc (sizeof (GtsGridPlane)); g->p = (GtsPoint **) malloc2D (nx, ny, sizeof (GtsPoint)); g->nx = nx; g->ny = ny; return g; } /** * gts_grid_plane_destroy: * @g: * */ void gts_grid_plane_destroy (GtsGridPlane * g) { g_return_if_fail (g != NULL); free2D ((void **) g->p, g->nx); g_free (g); } /** * gts_iso_slice_new: * @nx: number of vertices in the x direction. * @ny: number of vertices in the y direction. * * Returns: a new #GtsIsoSlice. */ GtsIsoSlice * gts_iso_slice_new (guint nx, guint ny) { GtsIsoSlice * slice; g_return_val_if_fail (nx > 1, NULL); g_return_val_if_fail (ny > 1, NULL); slice = g_malloc (sizeof (GtsIsoSlice)); slice->vertices = g_malloc (3*sizeof (OrientedVertex **)); slice->vertices[0] = (OrientedVertex **) malloc2D (nx, ny, sizeof (OrientedVertex)); slice->vertices[1] = (OrientedVertex **) malloc2D (nx - 1, ny, sizeof (OrientedVertex)); slice->vertices[2] = (OrientedVertex **) malloc2D (nx, ny - 1, sizeof (OrientedVertex)); slice->nx = nx; slice->ny = ny; return slice; } /** * gts_iso_slice_fill: * @slice: a #GtsIsoSlice. * @plane1: a #GtsGridPlane. * @plane2: another #GtsGridPlane. * @f1: values of the function corresponding to @plane1. * @f2: values of the function corresponding to @plane2. * @iso: isosurface value. * @klass: a #GtsVertexClass or one of its descendant to be used for the * new vertices. * * Fill @slice with the coordinates of the vertices defined by * f1 (x,y,z) = @iso and f2 (x, y, z) = @iso. */ void gts_iso_slice_fill (GtsIsoSlice * slice, GtsGridPlane * plane1, GtsGridPlane * plane2, gdouble ** f1, gdouble ** f2, gdouble iso, GtsVertexClass * klass) { OrientedVertex *** vertices; GtsPoint ** p1, ** p2 = NULL; guint i, j, nx, ny; g_return_if_fail (slice != NULL); g_return_if_fail (plane1 != NULL); g_return_if_fail (f1 != NULL); g_return_if_fail (f2 == NULL || plane2 != NULL); p1 = plane1->p; if (plane2) p2 = plane2->p; vertices = slice->vertices; nx = slice->nx; ny = slice->ny; if (f2) for (i = 0; i < nx; i++) for (j = 0; j < ny; j++) { gdouble v1 = f1[i][j] - iso; gdouble v2 = f2[i][j] - iso; if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) { gdouble c2 = v1/(v1 - v2), c1 = 1. - c2; vertices[0][i][j].v = gts_vertex_new (klass, c1*p1[i][j].x + c2*p2[i][j].x, c1*p1[i][j].y + c2*p2[i][j].y, c1*p1[i][j].z + c2*p2[i][j].z); vertices[0][i][j].orientation = v2 >= 0. ? RIGHT : LEFT; } else vertices[0][i][j].v = NULL; } for (i = 0; i < nx - 1; i++) for (j = 0; j < ny; j++) { gdouble v1 = f1[i][j] - iso; gdouble v2 = f1[i+1][j] - iso; if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) { gdouble c2 = v1/(v1 - v2), c1 = 1. - c2; vertices[1][i][j].v = gts_vertex_new (klass, c1*p1[i][j].x + c2*p1[i+1][j].x, c1*p1[i][j].y + c2*p1[i+1][j].y, c1*p1[i][j].z + c2*p1[i+1][j].z); vertices[1][i][j].orientation = v2 >= 0. ? RIGHT : LEFT; } else vertices[1][i][j].v = NULL; } for (i = 0; i < nx; i++) for (j = 0; j < ny - 1; j++) { gdouble v1 = f1[i][j] - iso; gdouble v2 = f1[i][j+1] - iso; if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) { gdouble c2 = v1/(v1 - v2), c1 = 1. - c2; vertices[2][i][j].v = gts_vertex_new (klass, c1*p1[i][j].x + c2*p1[i][j+1].x, c1*p1[i][j].y + c2*p1[i][j+1].y, c1*p1[i][j].z + c2*p1[i][j+1].z); vertices[2][i][j].orientation = v2 >= 0. ? RIGHT : LEFT; } else vertices[2][i][j].v = NULL; } } /** * gts_iso_slice_fill_cartesian: * @slice: a #GtsIsoSlice. * @g: a #GtsCartesianGrid. * @f1: values of the function for plane z = @g.z. * @f2: values of the function for plane z = @g.z + @g.dz. * @iso: isosurface value. * @klass: a #GtsVertexClass. * * Fill @slice with the coordinates of the vertices defined by * f1 (x,y,z) = @iso and f2 (x, y, z) = @iso. */ void gts_iso_slice_fill_cartesian (GtsIsoSlice * slice, GtsCartesianGrid g, gdouble ** f1, gdouble ** f2, gdouble iso, GtsVertexClass * klass) { OrientedVertex *** vertices; guint i, j; gdouble x, y; g_return_if_fail (slice != NULL); g_return_if_fail (f1 != NULL); vertices = slice->vertices; if (f2) for (i = 0, x = g.x; i < g.nx; i++, x += g.dx) for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) { gdouble v1 = f1[i][j] - iso; gdouble v2 = f2[i][j] - iso; if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) { vertices[0][i][j].v = gts_vertex_new (klass, x, y, g.z + g.dz*v1/(v1 - v2)); vertices[0][i][j].orientation = v2 >= 0. ? RIGHT : LEFT; } else vertices[0][i][j].v = NULL; } for (i = 0, x = g.x; i < g.nx - 1; i++, x += g.dx) for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) { gdouble v1 = f1[i][j] - iso; gdouble v2 = f1[i+1][j] - iso; if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) { vertices[1][i][j].v = gts_vertex_new (klass, x + g.dx*v1/(v1 - v2), y, g.z); vertices[1][i][j].orientation = v2 >= 0. ? RIGHT : LEFT; } else vertices[1][i][j].v = NULL; } for (i = 0, x = g.x; i < g.nx; i++, x += g.dx) for (j = 0, y = g.y; j < g.ny - 1; j++, y += g.dy) { gdouble v1 = f1[i][j] - iso; gdouble v2 = f1[i][j+1] - iso; if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) { vertices[2][i][j].v = gts_vertex_new (klass, x, y + g.dy*v1/(v1 - v2), g.z); vertices[2][i][j].orientation = v2 >= 0. ? RIGHT : LEFT; } else vertices[2][i][j].v = NULL; } } /** * gts_iso_slice_destroy: * @slice: a #GtsIsoSlice. * * Free all memory allocated for @slice. */ void gts_iso_slice_destroy (GtsIsoSlice * slice) { g_return_if_fail (slice != NULL); free2D ((void **) slice->vertices[0], slice->nx); free2D ((void **) slice->vertices[1], slice->nx - 1); free2D ((void **) slice->vertices[2], slice->nx); g_free (slice->vertices); g_free (slice); } /** * gts_isosurface_slice: * @slice1: a #GtsIsoSlice. * @slice2: another #GtsIsoSlice. * @surface: a #GtsSurface. * * Given two successive slices @slice1 and @slice2 link their vertices with * segments and triangles which are added to @surface. */ void gts_isosurface_slice (GtsIsoSlice * slice1, GtsIsoSlice * slice2, GtsSurface * surface) { guint j, k, l, nx, ny; OrientedVertex *** vertices[2]; GtsVertex * va[12]; g_return_if_fail (slice1 != NULL); g_return_if_fail (slice2 != NULL); g_return_if_fail (surface != NULL); g_return_if_fail (slice1->nx == slice2->nx && slice1->ny == slice2->ny); vertices[0] = slice1->vertices; vertices[1] = slice2->vertices; nx = slice1->nx; ny = slice1->ny; /* link vertices with segments and triangles */ for (j = 0; j < nx - 1; j++) for (k = 0; k < ny - 1; k++) { gboolean cube_is_cut = FALSE; for (l = 0; l < 12; l++) { guint nv = 0, e = l; OrientedVertex ov = vertices[c[e][1]][c[e][0]][j + c[e][2]][k + c[e][3]]; while (ov.v && !GTS_OBJECT (ov.v)->reserved) { guint m = 0, * ne = edge[e][ov.orientation]; va[nv++] = ov.v; GTS_OBJECT (ov.v)->reserved = surface; ov.v = NULL; while (m < 3 && !ov.v) { e = ne[m++]; ov = vertices[c[e][1]][c[e][0]][j + c[e][2]][k + c[e][3]]; } } /* create edges and faces */ if (nv > 2) { GtsEdge * e1, * e2, * e3; guint m; if (!(e1 = GTS_EDGE (gts_vertices_are_connected (va[0], va[1])))) e1 = gts_edge_new (surface->edge_class, va[0], va[1]); for (m = 1; m < nv - 1; m++) { if (!(e2 = GTS_EDGE (gts_vertices_are_connected (va[m], va[m+1])))) e2 = gts_edge_new (surface->edge_class, va[m], va[m+1]); if (!(e3 = GTS_EDGE (gts_vertices_are_connected (va[m+1], va[0])))) e3 = gts_edge_new (surface->edge_class, va[m+1], va[0]); gts_surface_add_face (surface, gts_face_new (surface->face_class, e1, e2, e3)); e1 = e3; } } if (nv > 0) cube_is_cut = TRUE; } if (cube_is_cut) for (l = 0; l < 12; l++) { GtsVertex * v = vertices[c[l][1]][c[l][0]][j + c[l][2]][k + c[l][3]].v; if (v) GTS_OBJECT (v)->reserved = NULL; } } } #define SWAP(s1, s2, tmp) (tmp = s1, s1 = s2, s2 = tmp) /** * gts_isosurface_cartesian: * @surface: a #GtsSurface. * @g: a #GtsCartesianGrid. * @f: a #GtsIsoCartesianFunc. * @data: user data to be passed to @f. * @iso: isosurface value. * * Adds to @surface new faces defining the isosurface f(x,y,z) = @iso. By * convention, the normals to the surface are pointing toward the positive * values of f(x,y,z) - @iso. * * The user function @f is called successively for each value of the z * coordinate defined by @g. It must fill the corresponding (x,y) plane with * the values of the function for which the isosurface is to be computed. */ void gts_isosurface_cartesian (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso) { void * tmp; gdouble ** f1, ** f2; GtsIsoSlice * slice1, * slice2; guint i; g_return_if_fail (surface != NULL); g_return_if_fail (f != NULL); g_return_if_fail (g.nx > 1); g_return_if_fail (g.ny > 1); g_return_if_fail (g.nz > 1); slice1 = gts_iso_slice_new (g.nx, g.ny); slice2 = gts_iso_slice_new (g.nx, g.ny); f1 = (gdouble **) malloc2D (g.nx, g.ny, sizeof (gdouble)); f2 = (gdouble **) malloc2D (g.nx, g.ny, sizeof (gdouble)); (*f) (f1, g, 0, data); g.z += g.dz; (*f) (f2, g, 1, data); g.z -= g.dz; gts_iso_slice_fill_cartesian (slice1, g, f1, f2, iso, surface->vertex_class); g.z += g.dz; for (i = 2; i < g.nz; i++) { g.z += g.dz; (*f) (f1, g, i, data); SWAP (f1, f2, tmp); g.z -= g.dz; gts_iso_slice_fill_cartesian (slice2, g, f1, f2, iso, surface->vertex_class); g.z += g.dz; gts_isosurface_slice (slice1, slice2, surface); SWAP (slice1, slice2, tmp); } gts_iso_slice_fill_cartesian (slice2, g, f2, NULL, iso, surface->vertex_class); gts_isosurface_slice (slice1, slice2, surface); gts_iso_slice_destroy (slice1); gts_iso_slice_destroy (slice2); free2D ((void **) f1, g.nx); free2D ((void **) f2, g.nx); } gts-snapshot-121130/src/stripe.c0000644000175100017510000004256312055775440013444 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999-2003 Wagner Toledo Correa, Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" #define PRINT_HEAP_ELEMENTS 0 typedef struct { GtsTriangle * t; gboolean used; GSList * neighbors; GtsEHeapPair *pos; } tri_data_t; typedef struct { GHashTable * ht; } map_t; typedef struct { map_t * map; GtsEHeap * heap; } heap_t; static tri_data_t * tri_data_new (GtsTriangle * t); static void tri_data_destroy (tri_data_t * td); static guint tri_data_num_unused_neighbors2 (const tri_data_t * td, const map_t * map); static GHashTable * tri_data_unused_neighbors2 (const tri_data_t * td, const map_t * map); static map_t * map_new (GtsSurface * s); static void map_destroy (map_t * map); static tri_data_t * map_lookup (const map_t * map, GtsTriangle * t); static heap_t * heap_new (GtsSurface * s); static void heap_destroy (heap_t * heap); static gboolean heap_is_empty (const heap_t * heap); static GtsTriangle * heap_top (const heap_t * heap); static void heap_remove (heap_t * heap, GtsTriangle * t); /* helper functions */ static gboolean vertices_are_unique (GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { g_assert (v1 && v2 && v3); return (v1 != v2 && v1 != v3 && v2 != v3); } static gboolean vertex_is_one_of (GtsVertex * v, GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { g_assert (v && v1 && v2 && v3); return v == v1 || v == v2 || v == v3; } static guint num_shared_vertices (GtsVertex * u1, GtsVertex * u2, GtsVertex * u3, GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { guint n = 0; g_assert (u1 && u2 && u3); g_assert (v1 && v2 && v3); g_assert (vertices_are_unique (u1, u2, u3)); g_assert (vertices_are_unique (v1, v2, v3)); if (vertex_is_one_of (v1, u1, u2, u3)) n++; if (vertex_is_one_of (v2, u1, u2, u3)) n++; if (vertex_is_one_of (v3, u1, u2, u3)) n++; return n; } static gboolean vertices_match (GtsVertex * v1, GtsVertex * v2, GtsVertex * v3, GtsVertex ** v4, GtsVertex ** v5, GtsVertex ** v6) { guint i; g_assert (v4 && v5 && v6); g_assert (*v4 && *v5 && *v6); g_assert (vertices_are_unique (*v4, *v5, *v6)); for (i = 0; i < 2; i++) { if ((!v1 || (v1 == *v4)) && (!v2 || (v2 == *v5)) && (!v3 || (v3 == *v6))) return TRUE; else { GtsVertex * v7 = * v4; *v4 = *v5; *v5 = *v6; *v6 = v7; } } return ((!v1 || (v1 == *v4)) && (!v2 || (v2 == *v5)) && (!v3 || (v3 == *v6))); } static GtsVertex * non_shared_vertex1 (GtsVertex * u1, GtsVertex * u2, GtsVertex * u3, GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { GtsVertex * u = NULL; g_assert (u1 && u2 && u3); g_assert (v1 && v2 && v3); g_assert (vertices_are_unique (u1, u2, u3)); g_assert (vertices_are_unique (v1, v2, v3)); g_assert (num_shared_vertices (u1, u2, u3, v1, v2, v3) == 2); if (!vertex_is_one_of (u1, v1, v2, v3)) { g_assert (vertex_is_one_of (u2, v1, v2, v3)); g_assert (vertex_is_one_of (u3, v1, v2, v3)); u = u1; } else if (!vertex_is_one_of (u2, v1, v2, v3)) { g_assert (vertex_is_one_of (u1, v1, v2, v3)); g_assert (vertex_is_one_of (u3, v1, v2, v3)); u = u2; } else if (!vertex_is_one_of (u3, v1, v2, v3)) { g_assert (vertex_is_one_of (u1, v1, v2, v3)); g_assert (vertex_is_one_of (u2, v1, v2, v3)); u = u3; } else g_assert_not_reached (); return u; } static void match_vertex (GtsVertex * v, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3) { g_assert (v && v1 && v2 && v3); g_assert (*v1 && *v2 && *v3); g_assert (vertex_is_one_of (v, *v1, *v2, *v3)); while (*v1 != v) { GtsVertex *v0 = *v1; *v1 = *v2; *v2 = *v3; *v3 = v0; } } /* tri_data_t functions */ static tri_data_t * tri_data_new (GtsTriangle * t) { tri_data_t * td; td = g_malloc (sizeof (tri_data_t)); td->t = t; td->used = FALSE; td->neighbors = gts_triangle_neighbors (t); td->pos = NULL; return td; } static void tri_data_destroy (tri_data_t * td) { if (!td) return; g_slist_free (td->neighbors); g_free (td); } static guint tri_data_num_unused_neighbors2 (const tri_data_t * td, const map_t * map) { GHashTable *h; guint n; g_assert (td); g_assert (map); h = tri_data_unused_neighbors2 (td, map); n = g_hash_table_size (h); g_hash_table_destroy (h); return n; } static void copy_key_to_array (gpointer key, gpointer value, gpointer user_data) { GtsTriangle * t = key; GtsTriangle *** p = user_data; (void) value; g_assert (t); g_assert (p && *p); **p = t; (*p)++; } static gboolean are_neighbors_unique (GHashTable *h) { GtsTriangle ** a; GtsTriangle ** p; gint i, j, n; /* guint won't work if n == 0 */ g_assert (h); n = g_hash_table_size (h); #ifdef DEBUG if (n > 9) g_warning ("triangle has %d 2-level neighbors", n); #endif /* DEBUG */ a = g_malloc(n*sizeof (GtsTriangle *)); p = a; g_hash_table_foreach (h, copy_key_to_array, &p); for (i = 0; i < n - 1; i++) { g_assert (a[i]); for (j = i + 1; j < n; j++) { g_assert (a[j]); if (a[i] == a[j]) { g_free (a); return FALSE; } } } g_free (a); return TRUE; } static GHashTable * tri_data_unused_neighbors2 (const tri_data_t * td, const map_t * map) { GHashTable * h = g_hash_table_new (NULL, NULL); GSList * li; g_assert (td); g_assert (map); for (li = td->neighbors; li != NULL; li = li->next) { GtsTriangle * t2 = li->data; tri_data_t * td2 = map_lookup (map, t2); GSList * lj; g_assert (td2); if (!td2->used) { g_hash_table_insert (h, t2, td2); for (lj = td2->neighbors; lj != NULL; lj = lj->next) { GtsTriangle * t3 = lj->data; tri_data_t * td3 = map_lookup (map, t3); g_assert (td3); if (td3 != td && !td3->used) g_hash_table_insert (h, t3, td3); } } } g_assert (are_neighbors_unique (h)); return h; } #if PRINT_HEAP_ELEMENTS static void tri_data_print (const tri_data_t * td, FILE * fp) { g_assert (td); g_assert (fp); fprintf(fp, "td=%p t=%p used=%d pos=%p key=%f\n", td, td->t, td->used, td->pos, td->pos ? td->pos->key : -1.0); } #endif /* PRINT_HEAP_ELEMENTS */ /* heap_t functions */ static gdouble triangle_priority (gpointer item, gpointer data) { GtsTriangle * t = item; map_t * map = data; tri_data_t * td; gdouble k; g_assert (t); g_assert (map); td = map_lookup (map, t); g_assert (td); k = tri_data_num_unused_neighbors2 (td, map); return k; } #if PRINT_HEAP_ELEMENTS static void print_heap_element (gpointer data, gpointer user_data) { GtsTriangle * t = data; map_t * map = user_data; tri_data_t * td; g_assert (t); g_assert (map); td = map_lookup (map, t); g_assert (td); g_assert (!td->used); g_assert (td->pos); tri_data_print (td, stderr); } #endif /* PRINT_HEAP_ELEMENTS */ static void insert_entry_into_heap (gpointer key, gpointer value, gpointer user_data) { GtsTriangle * t = key; tri_data_t * td = value; GtsEHeap * heap = user_data; g_assert (!td->pos); td->pos = gts_eheap_insert (heap, t); g_assert (td->pos); } static heap_t * heap_new (GtsSurface *s) { heap_t * heap; g_assert (s); heap = g_malloc (sizeof (heap_t)); heap->map = map_new (s); heap->heap = gts_eheap_new (triangle_priority, heap->map); g_hash_table_foreach (heap->map->ht, insert_entry_into_heap, heap->heap); #if PRINT_HEAP_ELEMENTS gts_eheap_foreach (heap->heap, print_heap_element, heap->map); #endif /* PRINT_HEAP_ELEMENTS */ return heap; } static void heap_destroy (heap_t * heap) { if (!heap) return; map_destroy (heap->map); gts_eheap_destroy (heap->heap); g_free (heap); } static gboolean heap_is_empty (const heap_t * heap) { g_assert (heap); g_assert (heap->heap); return gts_eheap_size (heap->heap) == 0; } typedef struct { const heap_t * heap; double min_key; } min_key_t; static GtsTriangle * heap_top (const heap_t * heap) { GtsTriangle * t; g_assert (heap); g_assert (heap->heap); t = gts_eheap_top (heap->heap, NULL); return t; } static void decrease_key (gpointer key, gpointer value, gpointer user_data) { GtsTriangle * t = key; tri_data_t * td = value; heap_t *heap = user_data; gdouble k; (void) t; g_assert (heap); g_assert (heap->map); g_assert (heap->heap); g_assert (td); g_assert (!td->used); g_assert (td->pos); k = tri_data_num_unused_neighbors2 (td, heap->map); g_assert (k <= td->pos->key); #ifdef DEBUG if (k == td->pos->key) g_warning ("same key: %f\n", k); #endif /* DEBUG */ if (k != td->pos->key) { g_assert (k < td->pos->key); g_assert (k >= 0.0); gts_eheap_decrease_key (heap->heap, td->pos, k); } } static void heap_remove (heap_t * heap, GtsTriangle * t) { tri_data_t * td; GHashTable * h; g_assert (heap); g_assert (t); td = map_lookup (heap->map, t); g_assert (td); g_assert (!td->used); g_assert (td->pos); td->used = TRUE; gts_eheap_remove (heap->heap, td->pos); td->pos = NULL; /* fprintf(stderr, "td: %p\n", td); */ h = tri_data_unused_neighbors2 (td, heap->map); g_hash_table_foreach (h, decrease_key, heap); g_hash_table_destroy (h); } /* map_t functions */ static gint create_map_entry (gpointer item, gpointer data) { GtsTriangle * t = item; GHashTable * ht = data; tri_data_t * td; g_assert (t); g_assert (ht); td = tri_data_new (t); g_hash_table_insert (ht, t, td); return 0; } static void free_map_entry (gpointer key, gpointer value, gpointer user_data) { GtsTriangle * t = key; tri_data_t * td = value; (void) user_data; g_assert (t); g_assert (td); g_assert (td->t == t); tri_data_destroy (td); } static map_t * map_new (GtsSurface * s) { map_t * map; map = g_malloc (sizeof (map_t)); map->ht = g_hash_table_new (NULL, NULL); gts_surface_foreach_face (s, create_map_entry, map->ht); return map; } static void map_destroy (map_t * map) { if (!map) return; g_hash_table_foreach (map->ht, free_map_entry, NULL); g_hash_table_destroy (map->ht); g_free (map); } static tri_data_t * map_lookup (const map_t * map, GtsTriangle * t) { tri_data_t * td; g_assert (map); g_assert (map->ht); g_assert (t); td = g_hash_table_lookup (map->ht, t); g_assert (td); g_assert (td->t == t); return td; } /* other helper functions */ static GtsTriangle * find_min_neighbor (heap_t * heap, GtsTriangle * t) { GtsTriangle * min_neighbor = NULL; gdouble min_key = G_MAXDOUBLE; tri_data_t * td; GSList * li; g_assert (heap); g_assert (t); td = map_lookup (heap->map, t); for (li = td->neighbors; li != NULL; li = li->next) { GtsTriangle * t2 = li->data; tri_data_t * td2 = map_lookup (heap->map, t2); gdouble k; g_assert (td2); if (td2->used) continue; g_assert (td2->pos); k = td2->pos->key; if (k < min_key) { min_key = k; min_neighbor = t2; } } return min_neighbor; } static GtsTriangle * find_neighbor_forward (heap_t * heap, GtsTriangle * t, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3, gboolean left_turn) { GtsTriangle * neighbor = NULL; tri_data_t * td; GSList * li; g_assert (heap); g_assert (t); g_assert (v1 && v2 && v3); g_assert (vertices_are_unique (*v1, *v2, *v3)); td = map_lookup (heap->map, t); g_assert (td); for (li = td->neighbors; li && !neighbor; li = li->next) { GtsTriangle * t2 = li->data; tri_data_t * td2 = map_lookup (heap->map, t2); GtsVertex * v4, * v5, * v6; g_assert (td2); if (t2 == t || td2->used) continue; gts_triangle_vertices (t2, &v4, &v5, &v6); if (left_turn) { if (!vertices_match (*v1, *v3, NULL, &v4, &v5, &v6)) continue; } else { if (!vertices_match (*v3, *v2, NULL, &v4, &v5, &v6)) continue; } neighbor = t2; *v1 = v4; *v2 = v5; *v3 = v6; } return neighbor; } static GtsTriangle * find_neighbor_backward (heap_t * heap, GtsTriangle * t, GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3, gboolean left_turn) { GtsTriangle * neighbor = NULL; tri_data_t * td; GSList * li; g_assert (heap); g_assert (t); g_assert (v1 && v2 && v3); g_assert (vertices_are_unique (*v1, *v2, *v3)); td = map_lookup (heap->map, t); g_assert (td); for (li = td->neighbors; li && !neighbor; li = li->next) { GtsTriangle * t2 = li->data; tri_data_t * td2 = map_lookup (heap->map, t2); GtsVertex * v4, * v5, * v6; g_assert (td2); if (t2 == t || td2->used) continue; gts_triangle_vertices (t2, &v4, &v5, &v6); if (left_turn) { if (!vertices_match (NULL, *v2, *v1, &v4, &v5, &v6)) continue; } else if (!vertices_match(*v1, NULL, *v2, &v4, &v5, &v6)) continue; neighbor = t2; *v1 = v4; *v2 = v5; *v3 = v6; } return neighbor; } static GSList * grow_strip_forward (heap_t * heap, GSList * strip, GtsTriangle * t, GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { gboolean left_turn; g_assert (heap); g_assert (g_slist_length(strip) == 2); g_assert (t); g_assert (v1 && v2 && v3); g_assert (vertices_are_unique (v1, v2, v3)); left_turn = TRUE; while ((t = find_neighbor_forward (heap, t, &v1, &v2, &v3, left_turn)) != NULL) { heap_remove (heap, t); strip = g_slist_prepend (strip, t); left_turn = !left_turn; } return strip; } static GSList * grow_strip_backward (heap_t * heap, GSList * strip, GtsTriangle * t, GtsVertex * v1, GtsVertex * v2, GtsVertex * v3) { /* we have to make sure we add an even number of triangles */ GtsTriangle * t2; g_assert (heap); g_assert (g_slist_length(strip) >= 2); g_assert (t); g_assert (v1 && v2 && v3); g_assert (vertices_are_unique (v1, v2, v3)); while ((t2 = find_neighbor_backward (heap, t, &v1, &v2, &v3, FALSE)) != NULL && (t = find_neighbor_backward (heap, t2, &v1, &v2, &v3, TRUE)) != NULL) { heap_remove (heap, t2); heap_remove (heap, t); strip = g_slist_prepend (strip, t2); strip = g_slist_prepend (strip, t); } return strip; } static gboolean find_right_turn (GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3, GtsVertex ** v4, GtsVertex ** v5, GtsVertex ** v6) { GtsVertex * v; g_assert (v1 && v2 && v3); g_assert (v4 && v5 && v6); g_assert (vertices_are_unique (*v1, *v2, *v3)); g_assert (vertices_are_unique (*v4, *v5, *v6)); g_assert (num_shared_vertices (*v1, *v2, *v3, *v4, *v5, *v6) == 2); v = non_shared_vertex1 (*v1, *v2, *v3, *v4, *v5, *v6); match_vertex (v, v1, v2, v3); match_vertex (*v3, v4, v5, v6); g_assert (v1 && v2 && v3); g_assert (v4 && v5 && v6); g_assert (*v4 == *v3); if (*v5 == *v2) { g_assert (vertices_are_unique (*v1, *v2, *v3)); g_assert (vertices_are_unique (*v4, *v5, *v6)); g_assert (num_shared_vertices (*v1, *v2, *v3, *v4, *v5, *v6) == 2); return TRUE; } else { #ifdef DEBUG g_warning ("couldn't find a right turn"); #endif /* DEBUG */ return FALSE; } } /** * gts_surface_strip: * @s: a #GtsSurface. * * Decompose @s into triangle strips for fast-rendering. * * Returns: a list of triangle strips containing all the triangles of @s. * A triangle strip is itself a list of successive triangles having one edge * in common. */ GSList * gts_surface_strip (GtsSurface *s) { GSList * strips = NULL; heap_t * heap; g_return_val_if_fail (s != NULL, NULL); heap = heap_new (s); while (!heap_is_empty (heap)) { GtsTriangle * t1, * t2; GtsVertex * v1, * v2, * v3, * v4, * v5, * v6; GSList * strip = NULL; /* remove heap top */ t1 = heap_top (heap); g_assert (t1); heap_remove (heap, t1); /* start a new strip */ strip = g_slist_prepend (strip, t1); /* find second triangle */ t2 = find_min_neighbor (heap, t1); if (t2) { g_assert (t2 != t1); /* find right turn */ gts_triangle_vertices (t1, &v1, &v2, &v3); gts_triangle_vertices (t2, &v4, &v5, &v6); if (find_right_turn (&v1, &v2, &v3, &v4, &v5, &v6)) { heap_remove (heap, t2); strip = g_slist_prepend (strip, t2); /* grow strip forward */ strip = grow_strip_forward (heap, strip, t2, v4, v5, v6); strip = g_slist_reverse (strip); /* grow strip backward */ strip = grow_strip_backward (heap, strip, t1, v1, v2, v3); } } strips = g_slist_prepend (strips, strip); } strips = g_slist_reverse (strips); heap_destroy (heap); return strips; } gts-snapshot-121130/src/makefile.msc0000644000175100017510000000350612055775440014245 00000000000000## Makefile for building the gts dlls with Microsoft C ## Modified by M J Loehr from GLIB makefile.msc ## Use: nmake -f makefile.msc install # Change this to wherever you want to install the DLLs. This directory # should be in your PATH. BIN = C:\bin ################################################################ # Nothing much configurable below # No general LDFLAGS needed LDFLAGS = /link INSTALL = copy CP = copy RM = del CC = cl GTS_VER = 0.7 CFLAGS = -I. -DHAVE_CONFIG_H -G5 -GF -Ox -W3 -MD -nologo all : \ config.h \ gts-$(GTS_VER).dll install : all $(INSTALL) gts-$(GTS_VER).dll $(BIN) gts_OBJECTS = \ object.obj \ point.obj \ vertex.obj \ segment.obj \ edge.obj \ triangle.obj \ face.obj \ kdtree.obj \ bbtree.obj \ misc.obj \ predicates.obj \ heap.obj \ eheap.obj \ fifo.obj \ matrix.obj \ surface.obj \ stripe.obj \ vopt.obj \ refine.obj \ iso.obj \ split.obj \ psurface.obj \ hsurface.obj \ cdt.obj \ boolean.obj \ named.obj \ oocs.obj \ container.obj \ graph.obj \ pgraph.obj \ partition.obj \ isotetra.obj \ curvature.obj gts-$(GTS_VER).dll : $(gts_OBJECTS) gts.def $(CC) $(CFLAGS) -LD -Fegts-$(GTS_VER).dll $(gts_OBJECTS) glib-1.3.lib user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:gts.def config.h: config.h.win32 $(CP) config.h.win32 config.h predicates.obj: predicates.c predicates_init.h predicates.h $(CC) $(CFLAGS) -GD -c -DGTS_COMPILATION -DG_LOG_DOMAIN=\"Gts\" predicates.c predicates_init.h: predicates_init predicates_init > predicates_init.h predicates_init: predicates_init.c $(CC) $(CFLAGS) predicates_init.c -o predicates_init .c.obj: $(CC) $(CFLAGS) -GD -c -DGTS_COMPILATION -DG_LOG_DOMAIN=\"Gts\" $< clean: $(RM) config.h $(RM) *.obj $(RM) *.dll $(RM) *.lib $(RM) *.err $(RM) *.map $(RM) *.sym $(RM) *.exp $(RM) *.lk1 $(RM) *.mk1 $(RM) *.pdb $(RM) *.ilk gts-snapshot-121130/src/kdtree.c0000644000175100017510000000755512055775440013416 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static int compare_x (const void * p1, const void * p2) { GtsPoint * pp1 = *((gpointer *) p1), * pp2 = *((gpointer *) p2); if (pp1->x > pp2->x) return 1; return -1; } static int compare_y (const void * p1, const void * p2) { GtsPoint * pp1 = *((gpointer *) p1), * pp2 = *((gpointer *) p2); if (pp1->y > pp2->y) return 1; return -1; } static int compare_z (const void * p1, const void * p2) { GtsPoint * pp1 = *((gpointer *) p1), * pp2 = *((gpointer *) p2); if (pp1->z > pp2->z) return 1; return -1; } /** * gts_kdtree_new: * @points: an array of #GtsPoint. * @compare: always %NULL. * * Note that the order of the points in array @points is modified by this * function. * * Returns: a new 3D tree for @points. */ GNode * gts_kdtree_new (GPtrArray * points, int (*compare) (const void *, const void *)) { guint middle; GPtrArray array; GNode * node; GtsPoint * point; g_return_val_if_fail (points != NULL, NULL); g_return_val_if_fail (points->len > 0, NULL); /* sort the points */ if (compare == compare_x) compare = compare_y; else if (compare == compare_y) compare = compare_z; else compare = compare_x; qsort (points->pdata, points->len, sizeof (gpointer), compare); middle = (points->len - 1)/2; point = points->pdata[middle]; node = g_node_new (point); if (points->len > 1) { array.len = middle; if (array.len > 0) { array.pdata = points->pdata; g_node_prepend (node, gts_kdtree_new (&array, compare)); } else g_node_prepend (node, g_node_new (NULL)); array.len = points->len - middle - 1; if (array.len > 0) { array.pdata = &(points->pdata[middle + 1]); g_node_prepend (node, gts_kdtree_new (&array, compare)); } else g_node_prepend (node, g_node_new (NULL)); } return node; } /** * gts_kdtree_range: * @tree: a 3D tree. * @bbox: a #GtsBBox. * @compare: always %NULL. * * Returns: a list of #GtsPoint belonging to @tree which are inside @bbox. */ GSList * gts_kdtree_range (GNode * tree_3d, GtsBBox * bbox, int (*compare) (const void *, const void *)) { GSList * list = NULL; GtsPoint * p; gdouble left, right, v; GNode * node; g_return_val_if_fail (tree_3d != NULL, NULL); g_return_val_if_fail (bbox != NULL, NULL); p = tree_3d->data; if (p == NULL) return NULL; if (gts_bbox_point_is_inside (bbox, p)) list = g_slist_prepend (list, p); if (compare == compare_x) { left = bbox->y1; right = bbox->y2; v = p->y; compare = compare_y; } else if (compare == compare_y) { left = bbox->z1; right = bbox->z2; v = p->z; compare = compare_z; } else { left = bbox->x1; right = bbox->x2; v = p->x; compare = compare_x; } if ((node = tree_3d->children)) { if (right >= v) list = g_slist_concat (list, gts_kdtree_range (node, bbox, compare)); node = node->next; if (left <= v) list = g_slist_concat (list, gts_kdtree_range (node, bbox, compare)); } return list; } gts-snapshot-121130/src/face.c0000644000175100017510000001546112055775440013031 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" gboolean gts_allow_floating_faces = FALSE; static void face_destroy (GtsObject * object) { GtsFace * face = GTS_FACE (object); GSList * i; i = face->surfaces; while (i) { GSList * next = i->next; gts_surface_remove_face (i->data, face); i = next; } g_assert (face->surfaces == NULL); (* GTS_OBJECT_CLASS (gts_face_class ())->parent_class->destroy) (object); } static void face_clone (GtsObject * clone, GtsObject * object) { (* GTS_OBJECT_CLASS (gts_face_class ())->parent_class->clone) (clone, object); GTS_FACE (clone)->surfaces = NULL; } static void face_class_init (GtsFaceClass * klass) { GTS_OBJECT_CLASS (klass)->clone = face_clone; GTS_OBJECT_CLASS (klass)->destroy = face_destroy; } static void face_init (GtsFace * face) { face->surfaces = NULL; } /** * gts_face_class: * * Returns: the #GtsFaceClass. */ GtsFaceClass * gts_face_class (void) { static GtsFaceClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo face_info = { "GtsFace", sizeof (GtsFace), sizeof (GtsFaceClass), (GtsObjectClassInitFunc) face_class_init, (GtsObjectInitFunc) face_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_triangle_class ()), &face_info); } return klass; } /** * gts_face_new: * @klass: a #GtsFaceClass. * @e1: a #GtsEdge. * @e2: a #GtsEdge. * @e3: a #GtsEdge. * * Returns: a new #GtsFace using @e1, @e2 and @e3 as edges. */ GtsFace * gts_face_new (GtsFaceClass * klass, GtsEdge * e1, GtsEdge * e2, GtsEdge * e3) { GtsFace * f; f = GTS_FACE (gts_object_new (GTS_OBJECT_CLASS (klass))); gts_triangle_set (GTS_TRIANGLE (f), e1, e2, e3); return f; } /** * gts_face_has_parent_surface: * @f: a #GtsFace. * @s: a #GtsSurface. * * Returns: %TRUE if @f belongs to @s, %FALSE otherwise. */ gboolean gts_face_has_parent_surface (GtsFace * f, GtsSurface * s) { GSList * i; g_return_val_if_fail (f != NULL, FALSE); i = f->surfaces; while (i) { if (i->data == s) return TRUE; i = i->next; } return FALSE; } /** * gts_faces_from_edges: * @edges: a list of #GtsEdge. * @s: a #GtsSurface or %NULL. * * Builds a list of unique faces which belong to @s and have * one of their edges in @edges. * * Returns: the list of faces. */ GSList * gts_faces_from_edges (GSList * edges, GtsSurface * s) { GHashTable * hash; GSList * faces = NULL, * i; hash = g_hash_table_new (NULL, NULL); i = edges; while (i) { GSList * j = GTS_EDGE (i->data)->triangles; while (j) { GtsTriangle * t = j->data; if (GTS_IS_FACE (t) && (!s || gts_face_has_parent_surface (GTS_FACE (t), s)) && g_hash_table_lookup (hash, t) == NULL) { faces = g_slist_prepend (faces, t); g_hash_table_insert (hash, t, i); } j = j->next; } i = i->next; } g_hash_table_destroy (hash); return faces; } /** * gts_face_neighbor_number: * @f: a #GtsFace. * @s: a #GtsSurface or %NULL. * * Returns: the number of faces neighbors of @f and belonging to @s. */ guint gts_face_neighbor_number (GtsFace * f, GtsSurface * s) { GSList * i; guint nn = 0; GtsEdge * e[4], ** e1 = e; g_return_val_if_fail (f != NULL, 0); e[0] = GTS_TRIANGLE (f)->e1; e[1] = GTS_TRIANGLE (f)->e2; e[2] = GTS_TRIANGLE (f)->e3; e[3] = NULL; while (*e1) { i = (*e1++)->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_FACE (t) != f && GTS_IS_FACE (t) && (!s || gts_face_has_parent_surface (GTS_FACE (t), s))) nn++; i = i->next; } } return nn; } /** * gts_face_neighbors: * @f: a #GtsFace. * @s: a #GtsSurface or %NULL. * * Returns: a list of unique #GtsFace neighbors of @f and belonging to @s. */ GSList * gts_face_neighbors (GtsFace * f, GtsSurface * s) { GSList * i, * list = NULL; GtsEdge * e[4], ** e1 = e; g_return_val_if_fail (f != NULL, NULL); e[0] = GTS_TRIANGLE (f)->e1; e[1] = GTS_TRIANGLE (f)->e2; e[2] = GTS_TRIANGLE (f)->e3; e[3] = NULL; while (*e1) { i = (*e1++)->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_FACE (t) != f && GTS_IS_FACE (t) && (!s || gts_face_has_parent_surface (GTS_FACE (t), s))) list = g_slist_prepend (list, t); i = i->next; } } return list; } /** * gts_face_foreach_neighbor: * @f: a #GtsFace. * @s: a #GtsSurface or %NULL. * @func: a #GtsFunc. * @data: user data to pass to @func. * * Calls @func for each neighbor of @f belonging to @s (if not %NULL). */ void gts_face_foreach_neighbor (GtsFace * f, GtsSurface * s, GtsFunc func, gpointer data) { GSList * i; GtsEdge * e[4], ** e1 = e; g_return_if_fail (f != NULL); g_return_if_fail (func != NULL); e[0] = GTS_TRIANGLE (f)->e1; e[1] = GTS_TRIANGLE (f)->e2; e[2] = GTS_TRIANGLE (f)->e3; e[3] = NULL; while (*e1) { i = (*e1++)->triangles; while (i) { GtsTriangle * t = i->data; if (GTS_FACE (t) != f && GTS_IS_FACE (t) && (!s || gts_face_has_parent_surface (GTS_FACE (t), s))) (* func) (t, data); i = i->next; } } } static gboolean triangle_is_incompatible (GtsTriangle * t, GtsEdge * e, GtsSurface * s) { GSList * i = e->triangles; while (i) { if (i->data != t && GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, s) && !gts_triangles_are_compatible (t, i->data, e)) return TRUE; i = i->next; } return FALSE; } /** * gts_face_is_compatible: * @f: a #GtsFace. * @s: a #GtsSurface. * * Returns: %TRUE if @f is compatible with all its neighbors belonging * to @s, %FALSE otherwise. */ gboolean gts_face_is_compatible (GtsFace * f, GtsSurface * s) { g_return_val_if_fail (f != NULL, FALSE); g_return_val_if_fail (s != NULL, FALSE); return !(triangle_is_incompatible (GTS_TRIANGLE (f), GTS_TRIANGLE (f)->e1, s) || triangle_is_incompatible (GTS_TRIANGLE (f), GTS_TRIANGLE (f)->e2, s) || triangle_is_incompatible (GTS_TRIANGLE (f), GTS_TRIANGLE (f)->e3, s)); } gts-snapshot-121130/src/gts-config.in0000644000175100017510000000461412055775440014355 00000000000000#!/bin/sh glib_libs="@glib_libs@" glib_cflags="@glib_cflags@" glib_thread_libs="@glib_thread_libs@" glib_thread_cflags="@glib_thread_cflags@" glib_module_libs="@glib_module_libs@" glib_module_cflags="@glib_module_cflags@" prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no usage() { cat <&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo @GTS_VERSION@ exit 0 ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; --check) echo_check=yes ;; gts) lib_gts=yes ;; gmodule) lib_gmodule=yes ;; gthread) lib_gthread=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_cflags" = "yes"; then if test "$lib_gmodule" = "yes"; then glib_cflags="$glib_cflags $glib_module_cflags" fi if test "$lib_gthread" = "yes"; then glib_cflags="$glib_cflags $glib_thread_cflags" fi glib_cflags="$glib_cflags -I${prefix}/include" glib_cflags=`uniquify "$glib_cflags"` if test "$echo_check" = "yes"; then echo -DGTS_CHECK_CASTS $glib_cflags else echo $glib_cflags fi fi if test "$echo_libs" = "yes"; then if test "$lib_gmodule" = "yes"; then glib_libs="$glib_libs $glib_module_libs" fi if test "$lib_gthread" = "yes"; then glib_libs="$glib_libs $glib_thread_libs" fi glib_libs="-L${exec_prefix}/lib -lgts $glib_libs -lm" glib_libs=`uniquify "$glib_libs"` echo $glib_libs fi gts-snapshot-121130/src/heap.c0000644000175100017510000001272312055775440013046 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" #define PARENT(i) ((i) >= 2 ? (i)/2 : 0) #define LEFT_CHILD(i) (2*(i)) #define RIGHT_CHILD(i) (2*(i) + 1) struct _GtsHeap { GPtrArray * elts; GCompareFunc func; gboolean frozen; }; /** * gts_heap_new: * @compare_func: a GCompareFunc. * * Returns: a new #GtsHeap using @compare_func as a sorting function. */ GtsHeap * gts_heap_new (GCompareFunc compare_func) { GtsHeap * heap; g_return_val_if_fail (compare_func != NULL, NULL); heap = g_malloc (sizeof(GtsHeap)); heap->elts = g_ptr_array_new (); heap->func = compare_func; heap->frozen = FALSE; return heap; } static void sift_up (GtsHeap * heap, guint i) { gpointer parent, child; guint p; gpointer * pdata = heap->elts->pdata; GCompareFunc func = heap->func; child = pdata[i - 1]; while ((p = PARENT (i))) { parent = pdata[p - 1]; if ((*func) (parent, child) > 0) { pdata[p - 1] = child; pdata[i - 1] = parent; i = p; } else i = 0; } } /** * gts_heap_insert: * @heap: a #GtsHeap. * @p: a pointer to add to the heap. * * Inserts a new element @p in the heap. */ void gts_heap_insert (GtsHeap * heap, gpointer p) { g_return_if_fail (heap != NULL); g_ptr_array_add (heap->elts, p); if (!heap->frozen) sift_up (heap, heap->elts->len); } static void sift_down (GtsHeap * heap, guint i) { gpointer left_child, right_child, child, parent; guint lc, rc, c; gpointer * pdata = heap->elts->pdata; guint len = heap->elts->len; GCompareFunc func = heap->func; lc = LEFT_CHILD (i); rc = RIGHT_CHILD (i); left_child = lc <= len ? pdata[lc - 1] : NULL; right_child = rc <= len ? pdata[rc - 1] : NULL; parent = pdata[i - 1]; while (left_child != NULL) { if (right_child == NULL || (*func) (left_child, right_child) < 0) { child = left_child; c = lc; } else { child = right_child; c = rc; } if ((*func) (parent, child) > 0) { pdata[i - 1] = child; pdata[c - 1] = parent; i = c; lc = LEFT_CHILD (i); rc = RIGHT_CHILD (i); left_child = lc <= len ? pdata[lc - 1] : NULL; right_child = rc <= len ? pdata[rc - 1] : NULL; } else left_child = NULL; } } /** * gts_heap_remove_top: * @heap: a #GtsHeap. * * Removes the element at the top of the heap. * * Returns: the element at the top of the heap. */ gpointer gts_heap_remove_top (GtsHeap * heap) { gpointer root; GPtrArray * elts; guint len; g_return_val_if_fail (heap != NULL, NULL); elts = heap->elts; len = elts->len; if (len == 0) return NULL; if (len == 1) return g_ptr_array_remove_index (elts, 0); root = elts->pdata[0]; elts->pdata[0] = g_ptr_array_remove_index (elts, len - 1); sift_down (heap, 1); return root; } /** * gts_heap_top: * @heap: a #GtsHeap. * * Returns: the element at the top of the heap. */ gpointer gts_heap_top (GtsHeap * heap) { GPtrArray * elts; guint len; g_return_val_if_fail (heap != NULL, NULL); elts = heap->elts; len = elts->len; if (len == 0) return NULL; return elts->pdata[0]; } /** * gts_heap_destroy: * @heap: a #GtsHeap. * * Free all the memory allocated for @heap. */ void gts_heap_destroy (GtsHeap * heap) { g_return_if_fail (heap != NULL); g_ptr_array_free (heap->elts, TRUE); g_free (heap); } /** * gts_heap_thaw: * @heap: a #GtsHeap. * * If @heap has been frozen previously using gts_heap_freeze(), reorder it * in O(n) time and unfreeze it. */ void gts_heap_thaw (GtsHeap * heap) { guint i; g_return_if_fail (heap != NULL); if (!heap->frozen) return; for (i = heap->elts->len/2; i > 0; i--) sift_down (heap, i); heap->frozen = FALSE; } /** * gts_heap_foreach: * @heap: a #GtsHeap. * @func: the function to call for each element in the heap. * @user_data: to pass to @func. */ void gts_heap_foreach (GtsHeap * heap, GFunc func, gpointer user_data) { guint i; GPtrArray * elts; g_return_if_fail (heap != NULL); g_return_if_fail (func != NULL); elts = heap->elts; for (i = 0; i < elts->len; i++) (*func) (elts->pdata[i], user_data); } /** * gts_heap_freeze: * @heap: a #GtsHeap. * * Freezes the heap. Any subsequent operation will not preserve the heap * property. Used in conjunction with gts_heap_insert() and gts_heap_thaw() * to create a heap in O(n) time. */ void gts_heap_freeze (GtsHeap * heap) { g_return_if_fail (heap != NULL); heap->frozen = TRUE; } /** * gts_heap_size: * @heap: a #GtsHeap. * * Returns: the number of items in @heap. */ guint gts_heap_size (GtsHeap * heap) { g_return_val_if_fail (heap != NULL, 0); return heap->elts->len; } gts-snapshot-121130/src/isotetra.c0000644000175100017510000005672012055775440013770 00000000000000/* GTS-Library conform marching tetrahedra algorithm * Copyright (C) 2002 Gert Wollny * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #ifdef NATIVE_WIN32 # include # define M_SQRT2 1.41421356237309504880 #endif /* NATIVE_WIN32 */ typedef struct { gint nx, ny; gdouble ** data; } slice_t; typedef struct { gint x, y, z; gboolean mid; gdouble d; } tetra_vertex_t; /* this helper is a lookup table for vertices */ typedef struct { gint nx, ny; GtsVertex ** vtop, ** vmid, **vbot; } helper_t ; typedef struct { GHashTable * vbot, * vtop; } helper_bcl ; static helper_t * init_helper (int nx, int ny) { gint nxy = 4*nx*ny; helper_t *retval = g_malloc0 (sizeof (helper_t)); retval->nx = nx; retval->ny = ny; retval->vtop = g_malloc0 (sizeof (GtsVertex *)*nxy); retval->vmid = g_malloc0 (sizeof (GtsVertex *)*nxy); retval->vbot = g_malloc0 (sizeof (GtsVertex *)*nxy); return retval; } static helper_bcl * init_helper_bcl (void) { helper_bcl *retval = g_malloc0 (sizeof (helper_bcl)); retval->vtop = g_hash_table_new (g_str_hash, g_str_equal); retval->vbot = g_hash_table_new (g_str_hash, g_str_equal); return retval; } static void free_helper (helper_t * h) { g_free (h->vtop); g_free (h->vmid); g_free (h->vbot); g_free (h); } static void free_helper_bcl (helper_bcl * h) { g_hash_table_destroy (h->vtop); g_hash_table_destroy (h->vbot); g_free (h); } /* move the vertices in the bottom slice to the top, and clear the other slices in the lookup tables */ static void helper_advance (helper_t * h) { GtsVertex ** help = h->vbot; h->vbot = h->vtop; h->vtop = help; memset (h->vmid, 0, 4*sizeof(GtsVertex *) * h->nx * h->ny); memset (h->vbot, 0, 4*sizeof(GtsVertex *) * h->nx * h->ny); } static void helper_advance_bcl (helper_bcl * h) { GHashTable * help = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_destroy (h->vbot); h->vbot = h->vtop; h->vtop = help; } /* find the zero-crossing of line through v1 and v2 and return the corresponding GtsVertex */ static GtsVertex * get_vertex (gint mz, const tetra_vertex_t * v1, const tetra_vertex_t * v2, helper_t * help, GtsCartesianGrid * g, GtsVertexClass * klass) { GtsVertex ** vertex; gint x, y, index, idx2, z; gdouble dx, dy, dz, d; g_assert (v1->d - v2->d != 0.); dx = dy = dz = 0.0; d = v1->d/(v1->d - v2->d); index = 0; if (v1->x != v2->x) { index |= 1; dx = d; } if (v1->y != v2->y) { index |= 2; dy = d; } if (v1->z != v2->z) { dz = d; } x = v1->x; if (v1->x > v2->x) { x = v2->x; dx = 1.0 - dx; } y = v1->y; if (v1->y > v2->y) { y = v2->y; dy = 1.0 - dy;} z = v1->z; if (v1->z > v2->z) { z = v2->z; dz = 1.0 - dz;} idx2 = 4 * ( x + y * help->nx ) + index; if (v1->z == v2->z) vertex = (mz == z) ? &help->vtop[idx2] : &help->vbot[idx2]; else vertex = &help->vmid[idx2]; if (mz != z && dz != 0.0) { fprintf(stderr, "%f \n", dz); } /* if vertex is not yet created, do it now */ if (!*vertex) *vertex = gts_vertex_new (klass, g->dx * ( x + dx) + g->x, g->dy * ( y + dy) + g->y, g->dz * ( z + dz) + g->z); return *vertex; } static GtsVertex * get_vertex_bcl (gint mz, const tetra_vertex_t * v1, const tetra_vertex_t * v2, helper_bcl * help, GtsCartesianGrid * g, GtsVertexClass * klass) { GtsVertex * v; GHashTable * table; gchar * s1, * s2, * hash; gdouble x1, x2, y1, y2, z1, z2, d; g_assert (v1->d - v2->d != 0.); /* first find correct hash table */ if ((v1->z > mz) && (v2->z > mz)) table = help->vtop; else table = help->vbot; d = v1->d / (v1->d - v2->d); /* sort vertices */ s1 = g_strdup_printf ("%d %d %d %d", v1->x, v1->y, v1->z, v1->mid); s2 = g_strdup_printf ("%d %d %d %d", v2->x, v2->y, v2->z, v2->mid); hash = (d == 0.0) ? g_strdup (s1) : (d == 1.0) ? g_strdup (s2) : (strcmp (s1, s2) < 0) ? g_strjoin (" ", s1, s2, NULL) : g_strjoin (" ", s2, s1, NULL); /* return existing vertex or make a new one */ v = g_hash_table_lookup (table, hash); if (!v){ x1 = g->dx * (v1->x + (v1->mid / 2.0)) + g->x; x2 = g->dx * (v2->x + (v2->mid / 2.0)) + g->x; y1 = g->dy * (v1->y + (v1->mid / 2.0)) + g->y; y2 = g->dy * (v2->y + (v2->mid / 2.0)) + g->y; z1 = g->dz * (v1->z + (v1->mid / 2.0)) + g->z; z2 = g->dz * (v2->z + (v2->mid / 2.0)) + g->z; v = gts_vertex_new (klass, x1 * (1.0 - d) + d * x2, y1 * (1.0 - d) + d * y2, z1 * (1.0 - d) + d * z2); g_hash_table_insert (table, g_strdup(hash), v); } g_free (s1); g_free (s2); g_free (hash); return v; } /* create an edge connecting the zero crossings of lines through a pair of vertices, or return an existing one */ static GtsEdge * get_edge (GtsVertex * v1, GtsVertex * v2, GtsEdgeClass * klass) { GtsSegment *s; GtsEdge *edge; g_assert (v1); g_assert (v2); s = gts_vertices_are_connected (v1, v2); if (GTS_IS_EDGE (s)) edge = GTS_EDGE(s); else edge = gts_edge_new (klass, v1, v2); return edge; } static void add_face (GtsSurface * surface, const tetra_vertex_t * a1, const tetra_vertex_t * a2, const tetra_vertex_t * b1, const tetra_vertex_t * b2, const tetra_vertex_t * c1, const tetra_vertex_t * c2, gint rev, helper_t * help, gint z, GtsCartesianGrid * g) { GtsFace * t; GtsEdge * e1, * e2, * e3; GtsVertex * v1 = get_vertex (z, a1, a2, help, g, surface->vertex_class); GtsVertex * v2 = get_vertex (z, b1, b2, help, g, surface->vertex_class); GtsVertex * v3 = get_vertex (z, c1, c2, help, g, surface->vertex_class); g_assert (v1 != v2); g_assert (v2 != v3); g_assert (v1 != v3); if (!rev) { e1 = get_edge (v1, v2, surface->edge_class); e2 = get_edge (v2, v3, surface->edge_class); e3 = get_edge (v1, v3, surface->edge_class); } else { e1 = get_edge (v1, v3, surface->edge_class); e2 = get_edge (v2, v3, surface->edge_class); e3 = get_edge (v1, v2, surface->edge_class); } t = gts_face_new (surface->face_class, e1, e2, e3); gts_surface_add_face (surface, t); } static void add_face_bcl (GtsSurface * surface, const tetra_vertex_t * a1, const tetra_vertex_t * a2, const tetra_vertex_t * b1, const tetra_vertex_t * b2, const tetra_vertex_t * c1, const tetra_vertex_t * c2, gint rev, helper_bcl * help, gint z, GtsCartesianGrid * g) { GtsFace * t; GtsEdge * e1, * e2, * e3; GtsVertex * v1 = get_vertex_bcl (z, a1, a2, help, g, surface->vertex_class); GtsVertex * v2 = get_vertex_bcl (z, b1, b2, help, g, surface->vertex_class); GtsVertex * v3 = get_vertex_bcl (z, c1, c2, help, g, surface->vertex_class); if (v1 == v2 || v2 == v3 || v1 == v3) return; if (!rev) { e1 = get_edge (v1, v2, surface->edge_class); e2 = get_edge (v2, v3, surface->edge_class); e3 = get_edge (v1, v3, surface->edge_class); } else { e1 = get_edge (v1, v3, surface->edge_class); e2 = get_edge (v2, v3, surface->edge_class); e3 = get_edge (v1, v2, surface->edge_class); } t = gts_face_new (surface->face_class, e1, e2, e3); gts_surface_add_face (surface, t); } /* create a new slice of site nx \times ny */ static slice_t * new_slice (gint nx, gint ny) { gint x; slice_t * retval = g_malloc (sizeof (slice_t)); retval->data = g_malloc (nx*sizeof(gdouble *)); retval->nx = nx; retval->ny = ny; for (x = 0; x < nx; x++) retval->data[x] = g_malloc (ny*sizeof (gdouble)); return retval; } /* initialize a slice with inival */ static void slice_init (slice_t * slice, gdouble inival) { gint x, y; g_assert (slice); for (x = 0; x < slice->nx; x++) for (y = 0; y < slice->ny; y++) slice->data[x][y] = inival; } /* free the memory of a slice */ static void free_slice (slice_t * slice) { gint x; g_return_if_fail (slice != NULL); for (x = 0; x < slice->nx; x++) g_free (slice->data[x]); g_free (slice->data); g_free (slice); } static void analyze_tetrahedra (const tetra_vertex_t * a, const tetra_vertex_t * b, const tetra_vertex_t * c, const tetra_vertex_t * d, gint parity, GtsSurface * surface, helper_t * help, gint z, GtsCartesianGrid * g) { gint rev = parity; gint code = 0; if (a->d >= 0.) code |= 1; if (b->d >= 0.) code |= 2; if (c->d >= 0.) code |= 4; if (d->d >= 0.) code |= 8; switch (code) { case 15: case 0: return; /* all inside or outside */ case 14:rev = !parity; case 1:add_face (surface, a, b, a, d, a, c, rev, help, z, g); break; case 13:rev = ! parity; case 2:add_face (surface, a, b, b, c, b, d, rev, help, z, g); break; case 12:rev = !parity; case 3:add_face (surface, a, d, a, c, b, c, rev, help, z, g); add_face (surface, a, d, b, c, b, d, rev, help, z, g); break; case 11:rev = !parity; case 4:add_face (surface, a, c, c, d, b, c, rev, help, z, g); break; case 10:rev = !parity; case 5: add_face (surface, a, b, a, d, c, d, rev, help, z, g); add_face (surface, a, b, c, d, b, c, rev, help, z, g); break; case 9:rev = !parity; case 6:add_face (surface, a, b, a, c, c, d, rev, help, z, g); add_face (surface, a, b, c, d, b, d, rev, help, z, g); break; case 7:rev = !parity; case 8:add_face (surface, a, d, b, d, c, d, rev, help, z, g); break; } } static void analyze_tetrahedra_bcl (const tetra_vertex_t * a, const tetra_vertex_t * b, const tetra_vertex_t * c, const tetra_vertex_t * d, GtsSurface * surface, helper_bcl * help, gint z, GtsCartesianGrid * g) { gint rev = 0; gint code = 0; if (a->d >= 0.) code |= 1; if (b->d >= 0.) code |= 2; if (c->d >= 0.) code |= 4; if (d->d >= 0.) code |= 8; switch (code) { case 15: case 0: return; /* all inside or outside */ case 14:rev = !rev; case 1:add_face_bcl (surface, a, b, a, d, a, c, rev, help, z, g); break; case 13:rev = !rev; case 2:add_face_bcl (surface, a, b, b, c, b, d, rev, help, z, g); break; case 12:rev = !rev; case 3:add_face_bcl (surface, a, d, a, c, b, c, rev, help, z, g); add_face_bcl (surface, a, d, b, c, b, d, rev, help, z, g); break; case 11:rev = !rev; case 4:add_face_bcl (surface, a, c, c, d, b, c, rev, help, z, g); break; case 10:rev = !rev; case 5: add_face_bcl (surface, a, b, a, d, c, d, rev, help, z, g); add_face_bcl (surface, a, b, c, d, b, c, rev, help, z, g); break; case 9:rev = !rev; case 6:add_face_bcl (surface, a, b, a, c, c, d, rev, help, z, g); add_face_bcl (surface, a, b, c, d, b, d, rev, help, z, g); break; case 7:rev = !rev; case 8:add_face_bcl (surface, a, d, b, d, c, d, rev, help, z, g); break; } } static void iso_slice_evaluate (slice_t * s1, slice_t * s2, GtsCartesianGrid g, gint z, GtsSurface * surface, helper_t * help) { gint x,y; tetra_vertex_t v0, v1, v2, v3, v4, v5, v6, v7; gdouble ** s1p = s1->data; gdouble ** s2p = s2->data; for (y = 0; y < g.ny-1; y++) for (x = 0; x < g.nx-1; x++) { gint parity = (((x ^ y) ^ z) & 1); v0.x = x ; v0.y = y ; v0.z = z ; v0.mid = FALSE; v0.d = s1p[x ][y ]; v1.x = x ; v1.y = y+1; v1.z = z ; v1.mid = FALSE; v1.d = s1p[x ][y+1]; v2.x = x+1; v2.y = y ; v2.z = z ; v2.mid = FALSE; v2.d = s1p[x+1][y ]; v3.x = x+1; v3.y = y+1; v3.z = z ; v3.mid = FALSE; v3.d = s1p[x+1][y+1]; v4.x = x ; v4.y = y ; v4.z = z+1; v4.mid = FALSE; v4.d = s2p[x ][y ]; v5.x = x ; v5.y = y+1; v5.z = z+1; v5.mid = FALSE; v5.d = s2p[x ][y+1]; v6.x = x+1; v6.y = y ; v6.z = z+1; v6.mid = FALSE; v6.d = s2p[x+1][y ]; v7.x = x+1; v7.y = y+1; v7.z = z+1; v7.mid = FALSE; v7.d = s2p[x+1][y+1]; if (parity == 0) { analyze_tetrahedra (&v0, &v1, &v2, &v4, parity, surface, help, z, &g); analyze_tetrahedra (&v7, &v1, &v4, &v2, parity, surface, help, z, &g); analyze_tetrahedra (&v1, &v7, &v3, &v2, parity, surface, help, z, &g); analyze_tetrahedra (&v1, &v7, &v4, &v5, parity, surface, help, z, &g); analyze_tetrahedra (&v2, &v6, &v4, &v7, parity, surface, help, z, &g); }else{ analyze_tetrahedra (&v4, &v5, &v6, &v0, parity, surface, help, z, &g); analyze_tetrahedra (&v3, &v5, &v0, &v6, parity, surface, help, z, &g); analyze_tetrahedra (&v5, &v3, &v7, &v6, parity, surface, help, z, &g); analyze_tetrahedra (&v5, &v3, &v0, &v1, parity, surface, help, z, &g); analyze_tetrahedra (&v6, &v2, &v0, &v3, parity, surface, help, z, &g); } } } static void iso_slice_evaluate_bcl (slice_t * s1, slice_t * s2, slice_t * s3, GtsCartesianGrid g, gint z, GtsSurface * surface, helper_bcl * help) { gint x,y; tetra_vertex_t v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, w0; gdouble ** s1p = s1->data; gdouble ** s2p = s2->data; gdouble ** s3p = s3->data; for (y = 0; y < g.ny-2; y++) for (x = 0; x < g.nx-2; x++) { v0.x = x ; v0.y = y ; v0.z = z ; v0.mid = TRUE; v0.d = (s1p[x ][y ] + s2p[x ][y ] + s1p[x ][y+1] + s2p[x ][y+1] + s1p[x+1][y ] + s2p[x+1][y ] + s1p[x+1][y+1] + s2p[x+1][y+1])/8.0; v1.x = x+1; v1.y = y ; v1.z = z ; v1.mid = TRUE; v1.d = (s1p[x+1][y ] + s2p[x+1][y ] + s1p[x+1][y+1] + s2p[x+1][y+1] + s1p[x+2][y ] + s2p[x+2][y ] + s1p[x+2][y+1] + s2p[x+2][y+1])/8.0; v2.x = x ; v2.y = y+1; v2.z = z ; v2.mid = TRUE; v2.d = (s1p[x ][y+1] + s2p[x ][y+1] + s1p[x ][y+2] + s2p[x ][y+2] + s1p[x+1][y+1] + s2p[x+1][y+1] + s1p[x+1][y+2] + s2p[x+1][y+2])/8.0; v3.x = x ; v3.y = y ; v3.z = z+1; v3.mid = TRUE; v3.d = (s2p[x ][y ] + s3p[x ][y ] + s2p[x ][y+1] + s3p[x ][y+1] + s2p[x+1][y ] + s3p[x+1][y ] + s2p[x+1][y+1] + s3p[x+1][y+1])/8.0; v4.x = x+1; v4.y = y ; v4.z = z ; v4.mid = FALSE; v4.d = s1p[x+1][y ]; v5.x = x ; v5.y = y+1; v5.z = z ; v5.mid = FALSE; v5.d = s1p[x ][y+1]; v6.x = x+1; v6.y = y+1; v6.z = z ; v6.mid = FALSE; v6.d = s1p[x+1][y+1]; v7.x = x+1; v7.y = y ; v7.z = z+1; v7.mid = FALSE; v7.d = s2p[x+1][y ]; v8.x = x ; v8.y = y+1; v8.z = z+1; v8.mid = FALSE; v8.d = s2p[x ][y+1]; v9.x = x+1; v9.y = y+1; v9.z = z+1; v9.mid = FALSE; v9.d = s2p[x+1][y+1]; w0.x = x ; w0.y = y ; w0.z = z+1; w0.mid = FALSE; w0.d = s2p[x ][y ]; analyze_tetrahedra_bcl (&v0, &v9, &v6, &v1, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v6, &v4, &v1, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v4, &v7, &v1, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v7, &v9, &v1, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v5, &v6, &v2, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v6, &v9, &v2, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v9, &v8, &v2, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v8, &v5, &v2, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v8, &v9, &v3, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v9, &v7, &v3, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &v7, &w0, &v3, surface, help, z, &g); analyze_tetrahedra_bcl (&v0, &w0, &v8, &v3, surface, help, z, &g); } } /* copy src into dest by stripping off the iso value and leave out the boundary (which should be G_MINDOUBLE) */ static void copy_to_bounded (slice_t * dest, slice_t * src, gdouble iso, gdouble fill) { gint x,y; gdouble * src_ptr; gdouble * dest_ptr = dest->data[0]; g_assert(dest->ny == src->ny + 2); g_assert(dest->nx == src->nx + 2); for (y = 0; y < dest->ny; ++y, ++dest_ptr) *dest_ptr = fill; for (x = 1; x < src->nx - 1; ++x) { dest_ptr = dest->data[x]; src_ptr = src->data[x-1]; *dest_ptr++ = fill; for (y = 0; y < src->ny; ++y, ++dest_ptr, ++src_ptr) *dest_ptr = *src_ptr - iso; *dest_ptr++ = fill; } dest_ptr = dest->data[y]; for (y = 0; y < dest->ny; ++y, ++dest_ptr) *dest_ptr = fill; } static void iso_sub (slice_t * s, gdouble iso) { gint x,y; for (x = 0; x < s->nx; ++x) { gdouble *ptr = s->data[x]; for (y = 0; y < s->ny; ++y, ++ptr) *ptr -= iso; } } /** * gts_isosurface_tetra_bounded: * @surface: a #GtsSurface. * @g: a #GtsCartesianGrid. * @f: a #GtsIsoCartesianFunc. * @data: user data to be passed to @f. * @iso: isosurface value. * * Adds to @surface new faces defining the isosurface f(x,y,z) = * @iso. By convention, the normals to the surface are pointing toward * the positive values of f(x,y,z) - @iso. To ensure a closed object, * a boundary of G_MINDOUBLE is added around the domain * * The user function @f is called successively for each value of the z * coordinate defined by @g. It must fill the corresponding (x,y) * plane with the values of the function for which the isosurface is * to be computed. */ void gts_isosurface_tetra_bounded (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso) { slice_t *slice1, *slice2, *transfer_slice; GtsCartesianGrid g_intern = g; helper_t *helper; gint z; g_return_if_fail (surface != NULL); g_return_if_fail (f != NULL); g_return_if_fail (g.nx > 1); g_return_if_fail (g.ny > 1); g_return_if_fail (g.nz > 1); /* create the helper slices */ slice1 = new_slice (g.nx + 2, g.ny + 2); slice2 = new_slice (g.nx + 2, g.ny + 2); /* initialize the first slice as OUTSIDE */ slice_init (slice1, -1.0); /* create a slice of the original image size */ transfer_slice = new_slice (g.nx, g.ny); /* adapt the parameters to our enlarged image */ g_intern.x -= g.dx; g_intern.y -= g.dy; g_intern.z -= g.dz; g_intern.nx = g.nx + 2; g_intern.ny = g.ny + 2; g_intern.nz = g.nz; /* create the helper for vertex-lookup */ helper = init_helper (g_intern.nx, g_intern.ny); /* go slicewise through the data */ z = 0; while (z < g.nz) { slice_t * hs; /* request slice */ f (transfer_slice->data, g, z, data); g.z += g.dz; /* copy slice in enlarged image and mark the border as OUTSIDE */ copy_to_bounded (slice2, transfer_slice, iso, -1.); /* triangulate */ iso_slice_evaluate (slice1, slice2, g_intern, z, surface, helper); /* switch the input slices */ hs = slice1; slice1 = slice2; slice2 = hs; /* switch the vertex lookup tables */ helper_advance(helper); ++z; } /* initialize the last slice as OUTSIDE */ slice_init (slice2, - 1.0); /* close the object */ iso_slice_evaluate(slice1, slice2, g_intern, z, surface, helper); free_helper (helper); free_slice (slice1); free_slice (slice2); free_slice (transfer_slice); } /** * gts_isosurface_tetra: * @surface: a #GtsSurface. * @g: a #GtsCartesianGrid. * @f: a #GtsIsoCartesianFunc. * @data: user data to be passed to @f. * @iso: isosurface value. * * Adds to @surface new faces defining the isosurface f(x,y,z) = * @iso. By convention, the normals to the surface are pointing toward * the positive values of f(x,y,z) - @iso. * * The user function @f is called successively for each value of the z * coordinate defined by @g. It must fill the corresponding (x,y) * plane with the values of the function for which the isosurface is * to be computed. */ void gts_isosurface_tetra (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso) { slice_t *slice1, *slice2; helper_t *helper; gint z; GtsCartesianGrid g_internal; g_return_if_fail (surface != NULL); g_return_if_fail (f != NULL); g_return_if_fail (g.nx > 1); g_return_if_fail (g.ny > 1); g_return_if_fail (g.nz > 1); memcpy (&g_internal, &g, sizeof (GtsCartesianGrid)); /* create the helper slices */ slice1 = new_slice (g.nx, g.ny); slice2 = new_slice (g.nx, g.ny); /* create the helper for vertex-lookup */ helper = init_helper (g.nx, g.ny); z = 0; f (slice1->data, g, z, data); iso_sub (slice1, iso); z++; g.z += g.dz; /* go slicewise through the data */ while (z < g.nz) { slice_t * hs; /* request slice */ f (slice2->data, g, z, data); iso_sub (slice2, iso); g.z += g.dz; /* triangulate */ iso_slice_evaluate (slice1, slice2, g_internal, z-1, surface, helper); /* switch the input slices */ hs = slice1; slice1 = slice2; slice2 = hs; /* switch the vertex lookup tables */ helper_advance (helper); ++z; } free_helper(helper); free_slice(slice1); free_slice(slice2); } /** * gts_isosurface_tetra_bcl: * @surface: a #GtsSurface. * @g: a #GtsCartesianGrid. * @f: a #GtsIsoCartesianFunc. * @data: user data to be passed to @f. * @iso: isosurface value. * * Adds to @surface new faces defining the isosurface f(x,y,z) = * @iso. By convention, the normals to the surface are pointing toward * the positive values of f(x,y,z) - @iso. * * The user function @f is called successively for each value of the z * coordinate defined by @g. It must fill the corresponding (x,y) * plane with the values of the function for which the isosurface is * to be computed. * * This version produces the dual "body-centered" faces relative to * the faces produced by gts_isosurface_tetra(). */ void gts_isosurface_tetra_bcl (GtsSurface * surface, GtsCartesianGrid g, GtsIsoCartesianFunc f, gpointer data, gdouble iso) { slice_t *slice1, *slice2, *slice3; helper_bcl *helper; gint z; GtsCartesianGrid g_internal; g_return_if_fail (surface != NULL); g_return_if_fail (f != NULL); g_return_if_fail (g.nx > 1); g_return_if_fail (g.ny > 1); g_return_if_fail (g.nz > 1); memcpy (&g_internal, &g, sizeof (GtsCartesianGrid)); /* create the helper slices */ slice1 = new_slice (g.nx, g.ny); slice2 = new_slice (g.nx, g.ny); slice3 = new_slice (g.nx, g.ny); /* create the helper for vertex-lookup */ helper = init_helper_bcl (); z = 0; f (slice1->data, g, z, data); iso_sub (slice1, iso); z++; g.z += g.dz; f (slice2->data, g, z, data); iso_sub (slice1, iso); z++; g.z += g.dz; /* go slicewise through the data */ while (z < g.nz) { slice_t * hs; /* request slice */ f (slice3->data, g, z, data); iso_sub (slice3, iso); g.z += g.dz; /* triangulate */ iso_slice_evaluate_bcl (slice1, slice2, slice3, g_internal, z-2, surface, helper); /* switch the input slices */ hs = slice1; slice1 = slice2; slice2 = slice3; slice3 = hs; /* switch the vertex lookup tables */ helper_advance_bcl (helper); ++z; } free_helper_bcl(helper); free_slice(slice1); free_slice(slice2); free_slice(slice3); } gts-snapshot-121130/src/predicates_init.c0000644000175100017510000001107412055775440015275 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* This program creates a header file defining the various constants needed by * predicates.c. These constant are machine dependent. * adapted from predicates.c by Jonathan Richard Shewchuk */ #include /* FPU control. We MUST have only double precision (not extended precision) */ #include "rounding.h" int main (int argc, char * argv[]) { double half = 0.5; double check = 1.0, lastcheck; int every_other = 1; /* epsilon = 2^(-p). Used to estimate roundoff errors. */ double epsilon = 1.0; /* splitter = 2^ceiling(p / 2) + 1. Used to split floats in half. */ double splitter = 1.0; /* A set of coefficients used to calculate maximum roundoff errors. */ double resulterrbound; double ccwerrboundA, ccwerrboundB, ccwerrboundC; double o3derrboundA, o3derrboundB, o3derrboundC; double iccerrboundA, iccerrboundB, iccerrboundC; double isperrboundA, isperrboundB, isperrboundC; FPU_ROUND_DOUBLE; epsilon = 1.0; splitter = 1.0; /* Repeatedly divide `epsilon' by two until it is too small to add to */ /* one without causing roundoff. (Also check if the sum is equal to */ /* the previous sum, for machines that round up instead of using exact */ /* rounding. Not that this library will work on such machines anyway). */ do { lastcheck = check; epsilon *= half; if (every_other) { splitter *= 2.0; } every_other = !every_other; check = 1.0 + epsilon; } while ((check != 1.0) && (check != lastcheck)); splitter += 1.0; /* Error bounds for orientation and incircle tests. */ resulterrbound = (3.0 + 8.0 * epsilon) * epsilon; ccwerrboundA = (3.0 + 16.0 * epsilon) * epsilon; ccwerrboundB = (2.0 + 12.0 * epsilon) * epsilon; ccwerrboundC = (9.0 + 64.0 * epsilon) * epsilon * epsilon; o3derrboundA = (7.0 + 56.0 * epsilon) * epsilon; o3derrboundB = (3.0 + 28.0 * epsilon) * epsilon; o3derrboundC = (26.0 + 288.0 * epsilon) * epsilon * epsilon; iccerrboundA = (10.0 + 96.0 * epsilon) * epsilon; iccerrboundB = (4.0 + 48.0 * epsilon) * epsilon; iccerrboundC = (44.0 + 576.0 * epsilon) * epsilon * epsilon; isperrboundA = (16.0 + 224.0 * epsilon) * epsilon; isperrboundB = (5.0 + 72.0 * epsilon) * epsilon; isperrboundC = (71.0 + 1408.0 * epsilon) * epsilon * epsilon; puts ("/* This file was generated automatically by predicates_init\n" " *\n" " * This file is free software; you can redistribute it and/or\n" " * modify it under the terms of the GNU Library General Public\n" " * License as published by the Free Software Foundation; either\n" " * version 2 of the License, or (at your option) any later version.\n" " *\n" " * This file is distributed in the hope that it will be useful,\n" " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" " */\n"); printf ("static double splitter = %f;\n", splitter); printf ("static double resulterrbound = %.16g;\n", resulterrbound); printf ("static double ccwerrboundA = %.16g;\n", ccwerrboundA); printf ("static double ccwerrboundB = %.16g;\n", ccwerrboundB); printf ("static double ccwerrboundC = %.16g;\n", ccwerrboundC); printf ("static double o3derrboundA = %.16g;\n", o3derrboundA); printf ("static double o3derrboundB = %.16g;\n", o3derrboundB); printf ("static double o3derrboundC = %.16g;\n", o3derrboundC); printf ("static double iccerrboundA = %.16g;\n", iccerrboundA); printf ("static double iccerrboundB = %.16g;\n", iccerrboundB); printf ("static double iccerrboundC = %.16g;\n", iccerrboundC); printf ("static double isperrboundA = %.16g;\n", isperrboundA); printf ("static double isperrboundB = %.16g;\n", isperrboundB); printf ("static double isperrboundC = %.16g;\n", isperrboundC); FPU_RESTORE; return 0; } gts-snapshot-121130/src/rounding.h0000644000175100017510000000670512055775440013766 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #ifdef HAVE_FPU_CONTROL_H # include # ifdef _FPU_EXTENDED # if !defined(__alpha__) || !defined(__GLIBC__) # if defined(__arm__) static fpu_control_t fpu_round_double = _FPU_DEFAULT; # else static fpu_control_t fpu_round_double = (_FPU_DEFAULT & ~ _FPU_EXTENDED)|_FPU_DOUBLE; # endif static fpu_control_t fpu_init; # define FPU_ROUND_DOUBLE { _FPU_GETCW(fpu_init);\ _FPU_SETCW(fpu_round_double); } # define FPU_RESTORE {_FPU_SETCW(fpu_init);} # else /* __alpha__ && __GLIBC__ */ # define FPU_ROUND_DOUBLE # define FPU_RESTORE # endif /* __alpha__ && __GLIBC__ */ # else /* not FPU_EXTENDED */ # define FPU_ROUND_DOUBLE # define FPU_RESTORE # endif /* not FPU_EXTENDED */ #else /* not HAVE_FPU_CONTROL_H */ # ifdef __FreeBSD__ # include # define FPU_ROUND_DOUBLE (fpsetprec(FP_PD)) # define FPU_RESTORE (fpsetprec(FP_PE)) # else /* not __FreeBSD__ */ # ifdef WIN32 # ifdef _MSC_VER # include static unsigned int fpu_init; # define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0),\ _controlfp (_PC_53, MCW_PC)) # define FPU_RESTORE (_controlfp (fpu_init, 0xfffff)) # elif __MINGW32__ # include static unsigned int fpu_init; # define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0),\ _controlfp (_PC_53, _MCW_PC)) # define FPU_RESTORE (_controlfp (fpu_init, 0xfffff)) # else /* not _MSC_VER or __MINGW32__ */ # error "You need MSVC or MinGW for the Win32 version" # endif /* not _MSC_VER or __MINGW32__ */ # else /* not WIN32 */ # ifdef __CYGWIN__ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); static fpu_control_t fpu_round_double = 0x027f; static fpu_control_t fpu_init; # define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw)) # define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw)) # define FPU_ROUND_DOUBLE { _FPU_GETCW(fpu_init);\ _FPU_SETCW(fpu_round_double); } # define FPU_RESTORE { _FPU_SETCW(fpu_init);} # else /* not __CYGWIN__ */ # ifdef CPP_HAS_WARNING # warning "Unknown CPU: assuming default double precision rounding" # endif /* CPP_HAS_WARNING */ # define FPU_ROUND_DOUBLE # define FPU_RESTORE # endif /* not __CYGWIN__ */ # endif /* not WIN32 */ # endif /* not __FreeBSD__ */ #endif /* not HAVE_FPU_CONTROL_H */ gts-snapshot-121130/src/partition.c0000644000175100017510000010037612055775440014144 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" /* #define DEBUG */ /* Graph partition */ /** * gts_graph_partition_edges_cut: * @partition: a list of @GtsGraph representing a partition. * * Returns: the number of edges cut by the partition. */ guint gts_graph_partition_edges_cut (GSList * partition) { guint cuts = 0; while (partition) { cuts += gts_graph_edges_cut (partition->data); partition = partition->next; } return cuts/2; } /** * gts_graph_partition_edges_cut_weight: * @partition: a list of @GtsGraph representing a partition. * * Returns: the total weight of the edges cut by the partition. */ gfloat gts_graph_partition_edges_cut_weight (GSList * partition) { gfloat weight = 0.; while (partition) { weight += gts_graph_edges_cut_weight (partition->data); partition = partition->next; } return weight/2.; } /** * gts_graph_partition_print_stats: * @partition: a list of @GtsGraph representing a partition. * @fp: a file pointer. * * Writes to @fp a summary of the properties of @partition. */ void gts_graph_partition_print_stats (GSList * partition, FILE * fp) { GtsRange weight; GSList * i; g_return_if_fail (partition != NULL); g_return_if_fail (fp != NULL); gts_range_init (&weight); i = partition; while (i) { gts_range_add_value (&weight, gts_graph_weight (i->data)); i = i->next; } gts_range_update (&weight); fprintf (fp, "# parts: %d\n" "# edge cuts: %5d edge cuts weight: %5g\n" "# weight: ", g_slist_length (partition), gts_graph_partition_edges_cut (partition), gts_graph_partition_edges_cut_weight (partition)); gts_range_print (&weight, fp); fputc ('\n', fp); } /** * gts_graph_partition_balance: * @partition: a list of @GtsGraph representing a partition. * * Returns: the difference between the maximum and the minimum weight * of the graphs in @partition. */ gfloat gts_graph_partition_balance (GSList * partition) { gfloat wmin = G_MAXFLOAT; gfloat wmax = - G_MAXFLOAT; g_return_val_if_fail (partition != NULL, 0.); while (partition) { gfloat weight = gts_graph_weight (partition->data); if (weight < wmin) wmin = weight; if (weight > wmax) wmax = weight; partition = partition->next; } return wmax - wmin; } /** * gts_graph_partition_clone: * @partition: a list of @GtsGraph representing a partition. * * Returns: a new partition clone of @partition (i.e. a list of new * graphs clones of the graphs in @partition). */ GSList * gts_graph_partition_clone (GSList * partition) { GSList * cparts = NULL; while (partition) { cparts = g_slist_prepend (cparts, gts_object_clone (GTS_OBJECT (partition->data))); partition = partition->next; } return cparts; } /** * gts_graph_partition_destroy: * @partition: a list of @GtsGraph representing a partition. * * Destroys all the graphs in @partition and frees @partition. */ void gts_graph_partition_destroy (GSList * partition) { GSList * i = partition; while (i) { gts_object_destroy (GTS_OBJECT (i->data)); i = i->next; } g_slist_free (partition); } static void find_smallest_degree (GtsGNode * n, gpointer * data) { GtsGNode ** nmin = data[0]; GtsGraph * g = data[1]; guint * min = data[2]; guint degree = gts_gnode_degree (n, g); if (degree < *min) { *min = degree; *nmin = n; } } static gint graph_comp_weight (GtsGraph * g1, GtsGraph * g2) { if (gts_graph_weight (g1) > gts_graph_weight (g2)) return 1; return -1; } static void partition_update (GSList * list, GtsGraph * g) { GSList * i; GtsGraph * g1; GtsHeap * size_heap; gboolean reinit = TRUE; /* initialize traversals */ i = list; while (i) { GtsGNode * seed = GTS_OBJECT (i->data)->reserved; GTS_OBJECT (seed)->reserved = gts_graph_traverse_new (g, seed, GTS_BREADTH_FIRST, reinit); reinit = FALSE; i = i->next; } size_heap = gts_heap_new ((GCompareFunc) graph_comp_weight); i = list; while (i) { gts_heap_insert (size_heap, i->data); i = i->next; } while ((g1 = gts_heap_remove_top (size_heap))) { GtsGraphTraverse * t = GTS_OBJECT (GTS_OBJECT (g1)->reserved)->reserved; GtsGNode * n = gts_graph_traverse_next (t); if (n) { gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); gts_heap_insert (size_heap, g1); } } gts_heap_destroy (size_heap); /* destroy traversals */ i = list; while (i) { GtsGNode * seed = GTS_OBJECT (i->data)->reserved; gts_graph_traverse_destroy (GTS_OBJECT (seed)->reserved); GTS_OBJECT (seed)->reserved = NULL; i = i->next; } } static void better_seed (GtsGNode * n, gpointer * data) { guint * sum = data[0]; GtsGNode ** seed = data[1]; GtsGraph * g = data[2]; guint sum1 = gts_graph_distance_sum (g, n); if (sum1 < *sum) { *sum = sum1; *seed = n; } } static GtsGNode * graph_new_seed (GtsGraph * g, GtsGNode * seed) { guint sum = gts_graph_distance_sum (g, seed); gpointer data[3]; GtsGNode * new_seed = seed; data[0] = ∑ data[1] = &new_seed; data[2] = g; gts_gnode_foreach_neighbor (seed, g, (GtsFunc) better_seed, data); return new_seed; } /** * gts_graph_bubble_partition: * @g: a #GtsGraph. * @np: number of partitions. * @niter: the maximum number of iterations. * @step_info: a #GtsFunc or %NULL. * @data: user data to pass to @step_info. * * An implementation of the "bubble partitioning algorithm" of * Diekmann, Preis, Schlimbach and Walshaw (2000). The maximum number * of iteration on the positions of the graph growing seeds is * controlled by @niter. * * If not %NULL @step_info is called after each iteration on the seeds * positions passing the partition (a GSList) as argument. * * Returns: a list of @np new #GtsGraph representing the partition. */ GSList * gts_graph_bubble_partition (GtsGraph * g, guint np, guint niter, GtsFunc step_info, gpointer data) { GSList * list = NULL, * seeds = NULL; GtsGNode * seed = NULL; guint min = G_MAXINT/2 - 1; gpointer info[3]; GtsGraph * g1; gboolean changed = TRUE; g_return_val_if_fail (g != NULL, NULL); g_return_val_if_fail (np > 0, NULL); info[0] = &seed; info[1] = g; info[2] = &min; gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) find_smallest_degree, info); if (seed == NULL) return NULL; g1 = GTS_GRAPH (gts_object_new (GTS_OBJECT (g)->klass)); gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed)); list = g_slist_prepend (list, g1); GTS_OBJECT (g1)->reserved = seed; seeds = g_slist_prepend (seeds, seed); while (--np && seed) if ((seed = gts_graph_farthest (g, seeds))) { g1 = GTS_GRAPH (gts_object_new (GTS_OBJECT (g)->klass)); gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed)); list = g_slist_prepend (list, g1); GTS_OBJECT (g1)->reserved = seed; seeds = g_slist_prepend (seeds, seed); } g_slist_free (seeds); partition_update (list, g); while (changed && niter--) { GSList * i; changed = FALSE; i = list; while (i) { GtsGraph * g1 = i->data; GtsGNode * seed = GTS_OBJECT (g1)->reserved; GtsGNode * new_seed = graph_new_seed (g1, seed); if (new_seed != seed) { changed = TRUE; GTS_OBJECT (g1)->reserved = new_seed; } i = i->next; } if (changed) { i = list; while (i) { GtsGraph * g1 = i->data; GtsGNode * seed = GTS_OBJECT (g1)->reserved; gts_object_destroy (GTS_OBJECT (g1)); i->data = g1 = GTS_GRAPH (gts_object_new (GTS_OBJECT (g)->klass)); gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed)); GTS_OBJECT (g1)->reserved = seed; i = i->next; } partition_update (list, g); if (step_info) (* step_info) (list, data); } } g_slist_foreach (list, (GFunc) gts_object_reset_reserved, NULL); return list; } /* Graph bisection */ static gdouble node_cost (GtsGNode * n, gpointer * data) { GtsGraph * g = data[0]; GtsGraph * g1 = data[1]; GSList * i = GTS_SLIST_CONTAINER (n)->items; gdouble cost = 0.; while (i) { GtsGEdge * e = i->data; GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, e); if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) { if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g1))) cost -= gts_gedge_weight (e); else cost += gts_gedge_weight (e); } i = i->next; } return cost; } static void add_neighbor (GtsGNode * n, GtsEHeap * heap) { if (GTS_OBJECT (n)->reserved == n) return; if (GTS_OBJECT (n)->reserved) gts_eheap_remove (heap, GTS_OBJECT (n)->reserved); GTS_OBJECT (n)->reserved = gts_eheap_insert (heap, n); } static void add_unused (GtsGNode * n, GtsGraph * g2) { if (GTS_OBJECT (n)->reserved) GTS_OBJECT (n)->reserved = NULL; else gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n)); } static gdouble degree_cost (GtsGNode * n, GtsGraph * g) { return gts_gnode_degree (n, g); } static void add_seed (GtsGNode * n, GtsEHeap * heap) { gts_eheap_insert (heap, n); } static void boundary_node1 (GtsGNode * n, GtsGraphBisection * bg) { GSList * i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (bg->g2))) { g_hash_table_insert (bg->bg1, n, n1); return; } i = i->next; } } static void boundary_node2 (GtsGNode * n, GtsGraphBisection * bg) { GSList * i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (bg->g1))) { g_hash_table_insert (bg->bg2, n, n1); return; } i = i->next; } } static void check_bg (GtsGNode * n, gpointer * data) { GHashTable * bg = data[0]; GtsGraph * g = data[1]; gboolean * ok = data[2]; guint * nb = data[3]; guint nn = gts_gnode_degree (n, g); if (nn > 0) (*nb)++; if ((nn > 0 && !g_hash_table_lookup (bg, n)) || (nn == 0 && g_hash_table_lookup (bg, n))) { g_warning ("nn: %d lookup: %p\n", nn, g_hash_table_lookup (bg, n)); *ok = FALSE; } } /** * gts_graph_bisection_check: * @bg: a #GtsGraphBisection. * * Checks that the boundary of @bg is correctly defined (used for * debugging purposes). * * Returns: %TRUE if @bg is ok, %FALSE otherwise. */ gboolean gts_graph_bisection_check (GtsGraphBisection * bg) { gboolean ok = TRUE; guint nb; gpointer data[4]; g_return_val_if_fail (bg != NULL, FALSE); nb = 0; data[0] = bg->bg1; data[1] = bg->g2; data[2] = &ok; data[3] = &nb; gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) check_bg, data); g_return_val_if_fail (g_hash_table_size (bg->bg1) == nb, FALSE); nb = 0; data[0] = bg->bg2; data[1] = bg->g1; gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) check_bg, data); g_return_val_if_fail (g_hash_table_size (bg->bg2) == nb, FALSE); return ok; } /** * gts_graph_ggg_bisection: * @g: a #GtsGraph. * @ntry: the number of randomly selected initial seeds. * * An implementation of the "Greedy Graph Growing" algorithm of * Karypis and Kumar (1997). * * @ntry randomly chosen seeds are used and the best partition is retained. * * Returns: a new #GtsGraphBisection of @g. */ GtsGraphBisection * gts_graph_ggg_bisection (GtsGraph * g, guint ntry) { gfloat size, bestcost = G_MAXFLOAT, smin; GtsGraph * bestg1 = NULL, * bestg2 = NULL; gboolean balanced = FALSE; GtsEHeap * degree_heap; GtsGNode * seed; GtsGraphBisection * bg; g_return_val_if_fail (g != NULL, NULL); bg = g_malloc (sizeof (GtsGraphBisection)); bg->g = g; size = gts_graph_weight (g)/2.; smin = 0.9*size; degree_heap = gts_eheap_new ((GtsKeyFunc) degree_cost, g); gts_eheap_freeze (degree_heap); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_seed, degree_heap); gts_eheap_thaw (degree_heap); while (ntry && ((seed = gts_eheap_remove_top (degree_heap, NULL)))) { GtsGraph * g1, * g2; GtsGNode * n; gdouble cost; gpointer data[2]; GtsEHeap * heap; g1 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass), g->node_class, g->edge_class); g2 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass), g->node_class, g->edge_class); data[0] = g; data[1] = g1; heap = gts_eheap_new ((GtsKeyFunc) node_cost, data); gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed)); GTS_OBJECT (seed)->reserved = seed; gts_gnode_foreach_neighbor (seed, g, (GtsFunc) add_neighbor, heap); while ((n = gts_eheap_remove_top (heap, &cost))) if (gts_graph_weight (g1) + gts_gnode_weight (n) <= size) { gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); GTS_OBJECT (n)->reserved = n; gts_gnode_foreach_neighbor (n, g, (GtsFunc) add_neighbor, heap); } else GTS_OBJECT (n)->reserved = NULL; gts_eheap_destroy (heap); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_unused, g2); cost = gts_graph_edges_cut_weight (g1); if (!bestg1 || (!balanced && gts_graph_weight (g1) >= smin) || (cost < bestcost && gts_graph_weight (g1) >= smin)) { if (bestg1) bestcost = cost; if (bestg1) gts_object_destroy (GTS_OBJECT (bestg1)); if (bestg2) gts_object_destroy (GTS_OBJECT (bestg2)); bestg1 = g1; bestg2 = g2; if (gts_graph_weight (g1) >= smin) balanced = TRUE; } else { gts_object_destroy (GTS_OBJECT (g1)); gts_object_destroy (GTS_OBJECT (g2)); } ntry--; } gts_eheap_destroy (degree_heap); #ifdef DEBUG fprintf (stderr, "bestcost: %5g g1: %5g|%5d g2: %5g|%5d\n", bestcost, gts_graph_weight (bestg1), gts_container_size (GTS_CONTAINER (bestg1)), gts_graph_weight (bestg2), gts_container_size (GTS_CONTAINER (bestg2))); #endif g_assert (bestg1 != NULL); bg->g1 = bestg1; g_assert (bestg2 != NULL); bg->g2 = bestg2; /* boundary nodes */ bg->bg1 = g_hash_table_new (NULL, NULL); gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) boundary_node1, bg); bg->bg2 = g_hash_table_new (NULL, NULL); gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) boundary_node2, bg); return bg; } /** * gts_graph_bfgg_bisection: * @g: a #GtsGraph. * @ntry: the number of randomly selected initial seeds. * * An implementation of a "Breadth-First Graph Growing" algorithm. * * @ntry randomly chosen seeds are used and the best partition is retained. * * Returns: a new #GtsGraphBisection of @g. */ GtsGraphBisection * gts_graph_bfgg_bisection (GtsGraph * g, guint ntry) { gfloat size, bestcost = G_MAXFLOAT, smin; GtsGraph * bestg1 = NULL, * bestg2 = NULL; GtsEHeap * degree_heap; GtsGNode * seed; GtsGraphBisection * bg; g_return_val_if_fail (g != NULL, NULL); bg = g_malloc (sizeof (GtsGraphBisection)); bg->g = g; size = gts_graph_weight (g)/2.; smin = 0.9*size; degree_heap = gts_eheap_new ((GtsKeyFunc) degree_cost, g); gts_eheap_freeze (degree_heap); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_seed, degree_heap); gts_eheap_thaw (degree_heap); while (ntry && ((seed = gts_eheap_remove_top (degree_heap, NULL)))) { GtsGraph * g1, * g2; GtsGNode * n; gdouble cost; GtsGraphTraverse * t = gts_graph_traverse_new (g, seed, GTS_BREADTH_FIRST, TRUE); g1 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass), g->node_class, g->edge_class); g2 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass), g->node_class, g->edge_class); while ((n = gts_graph_traverse_next (t))) if (gts_graph_weight (g1) + gts_gnode_weight (n) <= size) { gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); GTS_OBJECT (n)->reserved = n; } gts_graph_traverse_destroy (t); gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_unused, g2); cost = gts_graph_edges_cut_weight (g1); if (!bestg1 || (cost < bestcost && gts_graph_weight (g1) >= smin)) { if (bestg1) bestcost = cost; if (bestg1) gts_object_destroy (GTS_OBJECT (bestg1)); if (bestg2) gts_object_destroy (GTS_OBJECT (bestg2)); bestg1 = g1; bestg2 = g2; } else { gts_object_destroy (GTS_OBJECT (g1)); gts_object_destroy (GTS_OBJECT (g2)); } ntry--; } gts_eheap_destroy (degree_heap); #ifdef DEBUG fprintf (stderr, "bestcost: %5g g1: %5g|%5d g2: %5g|%5d\n", bestcost, gts_graph_weight (bestg1), gts_container_size (GTS_CONTAINER (bestg1)), gts_graph_weight (bestg2), gts_container_size (GTS_CONTAINER (bestg2))); #endif bg->g1 = bestg1; bg->g2 = bestg2; /* boundary nodes */ bg->bg1 = g_hash_table_new (NULL, NULL); gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) boundary_node1, bg); bg->bg2 = g_hash_table_new (NULL, NULL); gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) boundary_node2, bg); return bg; } static gdouble node_move_cost1 (GtsGNode * n, GtsGraphBisection * bg) { return gts_gnode_move_cost (n, bg->g1, bg->g2); } static gdouble node_move_cost2 (GtsGNode * n, GtsGraphBisection * bg) { return gts_gnode_move_cost (n, bg->g2, bg->g1); } static void build_heap (GtsGNode * n, GtsEHeap * heap) { GTS_OBJECT (n)->reserved = gts_eheap_insert (heap, n); } /** * gts_graph_bisection_kl_refine: * @bg: a #GtsGraphBisection. * @mmax: the maximum number of unsuccessful successive moves. * * An implementation of the simplified Kernighan-Lin algorithm for * graph bisection refinement as described in Karypis and Kumar * (1997). * * The algorithm stops if @mmax consecutive modes do not lead to a * decrease in the number of edges cut. This last @mmax moves are * undone. * * Returns: the decrease in the weight of the edges cut by the bisection. */ gdouble gts_graph_bisection_kl_refine (GtsGraphBisection * bg, guint mmax) { GtsEHeap * h1, * h2; GtsGNode * n; guint nm = 0, i; GtsGNode ** moves; gdouble bestcost = 0., totalcost = 0., best_balance; g_return_val_if_fail (bg != NULL, 0.); g_return_val_if_fail (mmax > 0, 0.); h1 = gts_eheap_new ((GtsKeyFunc) node_move_cost1, bg); gts_eheap_freeze (h1); gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) build_heap, h1); gts_eheap_thaw (h1); h2 = gts_eheap_new ((GtsKeyFunc) node_move_cost2, bg); gts_eheap_freeze (h2); gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) build_heap, h2); gts_eheap_thaw (h2); moves = g_malloc (sizeof (GtsGNode *)*mmax); best_balance = fabs (gts_graph_weight (bg->g1) - gts_graph_weight (bg->g2)); do { GtsGraph * g1, * g2; gdouble cost; if (gts_graph_weight (bg->g1) > gts_graph_weight (bg->g2)) { n = gts_eheap_remove_top (h1, &cost); g1 = bg->g1; g2 = bg->g2; } else { n = gts_eheap_remove_top (h2, &cost); g1 = bg->g2; g2 = bg->g1; } if (n) { GSList * i; GTS_OBJECT (n)->reserved = NULL; gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n)); gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); totalcost += cost; if (totalcost < bestcost) { bestcost = totalcost; nm = 0; } else if (totalcost == bestcost) { gdouble balance = fabs (gts_graph_weight (g1) - gts_graph_weight (g2)); if (balance < best_balance) { best_balance = balance; nm = 0; } } else moves[nm++] = n; i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (GTS_OBJECT (n1)->reserved && gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (bg->g))) { GtsEHeap * h = gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (bg->g1)) ? h1 : h2; gts_eheap_remove (h, GTS_OBJECT (n1)->reserved); GTS_OBJECT (n1)->reserved = gts_eheap_insert (h, n1); } i = i->next; } } } while (n && nm < mmax); gts_eheap_foreach (h1, (GFunc) gts_object_reset_reserved, NULL); gts_eheap_foreach (h2, (GFunc) gts_object_reset_reserved, NULL); gts_eheap_destroy (h1); gts_eheap_destroy (h2); /* undo last nm moves */ for (i = 0; i < nm; i++) { GtsGNode * n = moves[i]; GtsGraph * g1 = gts_containee_is_contained (GTS_CONTAINEE (n), GTS_CONTAINER (bg->g1)) ? bg->g1 : bg->g2; GtsGraph * g2 = g1 == bg->g1 ? bg->g2 : bg->g1; gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n)); gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); } g_free (moves); return bestcost; } static void build_bheap (GtsGNode * n, GtsGNode * n1, GtsEHeap * heap) { GTS_OBJECT (n)->reserved = gts_eheap_insert (heap, n); } static void update_neighbors (GtsGNode * n, GtsGraphBisection * bg, GtsEHeap * h1, GtsEHeap * h2) { GSList * i; i = GTS_SLIST_CONTAINER (n)->items; while (i) { GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data); if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (bg->g))) { GtsEHeap * h; GtsGraph * g1, * g2; GHashTable * bg1; if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (bg->g1))) { h = h1; g1 = bg->g1; g2 = bg->g2; bg1 = bg->bg1; } else { h = h2; g1 = bg->g2; g2 = bg->g1; bg1 = bg->bg2; } g_hash_table_remove (bg1, n1); if (h && GTS_OBJECT (n1)->reserved && GTS_OBJECT (n1)->reserved != n1) { gts_eheap_remove (h, GTS_OBJECT (n1)->reserved); GTS_OBJECT (n1)->reserved = NULL; } if (gts_gnode_degree (n1, g2)) { g_hash_table_insert (bg1, n1, n1); if (h && GTS_OBJECT (n1)->reserved != n1) GTS_OBJECT (n1)->reserved = gts_eheap_insert (h, n1); } } i = i->next; } } /** * gts_graph_bisection_bkl_refine: * @bg: a #GtsGraphBisection. * @mmax: the maximum number of unsuccessful successive moves. * @imbalance: the maximum relative imbalance allowed between the * weights of both halves of the partition. * * An implementation of the simplified boundary Kernighan-Lin * algorithm for graph bisection refinement as described in Karypis * and Kumar (1997). * * The algorithm stops if @mmax consecutive modes do not lead to a * decrease in the number of edges cut. This last @mmax moves are * undone. * * Returns: the decrease in the weight of the edges cut by the bisection. */ gdouble gts_graph_bisection_bkl_refine (GtsGraphBisection * bg, guint mmax, gfloat imbalance) { GtsEHeap * h1, * h2; GtsGNode * n; guint nm = 0, i; GtsGNode ** moves; gdouble bestcost = 0., totalcost = 0., best_balance; gboolean balanced = FALSE; g_return_val_if_fail (bg != NULL, 0.); g_return_val_if_fail (mmax > 0, 0.); g_return_val_if_fail (imbalance >= 0. && imbalance <= 1., 0.); h1 = gts_eheap_new ((GtsKeyFunc) node_move_cost1, bg); gts_eheap_freeze (h1); g_hash_table_foreach (bg->bg1, (GHFunc) build_bheap, h1); gts_eheap_thaw (h1); h2 = gts_eheap_new ((GtsKeyFunc) node_move_cost2, bg); gts_eheap_freeze (h2); g_hash_table_foreach (bg->bg2, (GHFunc) build_bheap, h2); gts_eheap_thaw (h2); moves = g_malloc (sizeof (GtsGNode *)*mmax); imbalance *= gts_graph_weight (bg->g); best_balance = fabs (gts_graph_weight (bg->g1) - gts_graph_weight (bg->g2)); if (best_balance <= imbalance) balanced = TRUE; do { GtsGraph * g1, * g2; GHashTable * bg1, * bg2; gdouble cost; if (gts_graph_weight (bg->g1) > gts_graph_weight (bg->g2)) { n = gts_eheap_remove_top (h1, &cost); g1 = bg->g1; g2 = bg->g2; bg1 = bg->bg1; bg2 = bg->bg2; } else { n = gts_eheap_remove_top (h2, &cost); g1 = bg->g2; g2 = bg->g1; bg1 = bg->bg2; bg2 = bg->bg1; } if (n) { gdouble balance; GTS_OBJECT (n)->reserved = n; gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n)); gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); g_hash_table_remove (bg1, n); if (gts_gnode_degree (n, g1)) g_hash_table_insert (bg2, n, n); update_neighbors (n, bg, h1, h2); totalcost += cost; balance = fabs (gts_graph_weight (g1) - gts_graph_weight (g2)); if (!balanced && balance <= imbalance) { bestcost = totalcost; best_balance = balance; balanced = TRUE; nm = 0; } else if (totalcost < bestcost && (balance < best_balance || balance <= imbalance)) { bestcost = totalcost; best_balance = balance; nm = 0; } else if (totalcost == bestcost && balance < best_balance) { best_balance = balance; nm = 0; } else moves[nm++] = n; } } while (n && nm < mmax); gts_container_foreach (GTS_CONTAINER (bg->g), (GtsFunc) gts_object_reset_reserved, NULL); gts_eheap_destroy (h1); gts_eheap_destroy (h2); /* undo last nm moves */ for (i = 0; i < nm; i++) { GtsGNode * n = moves[i]; GtsGraph * g1, * g2; GHashTable * bg1, * bg2; if (gts_containee_is_contained (GTS_CONTAINEE (n), GTS_CONTAINER (bg->g1))) { g1 = bg->g1; g2 = bg->g2; bg1 = bg->bg1; bg2 = bg->bg2; } else { g1 = bg->g2; g2 = bg->g1; bg1 = bg->bg2; bg2 = bg->bg1; } gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n)); gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n)); g_hash_table_remove (bg1, n); if (gts_gnode_degree (n, g1)) g_hash_table_insert (bg2, n, n); update_neighbors (n, bg, NULL, NULL); } g_free (moves); return bestcost; } /* Multilevel partitioning */ static void bisection_children (GtsGNodeSplit * ns, GtsGraphBisection * bg) { GtsGraph * g, * g1; GHashTable * bbg; GtsGNode * n1 = GTS_GNODE_SPLIT_N1 (ns); GtsGNode * n2 = GTS_GNODE_SPLIT_N2 (ns); if (gts_containee_is_contained (GTS_CONTAINEE (ns->n), GTS_CONTAINER (bg->g1))) { g = bg->g1; g1 = bg->g2; bbg = bg->bg1; } else { g = bg->g2; g1 = bg->g1; bbg = bg->bg2; } gts_allow_floating_gnodes = TRUE; gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (ns->n)); gts_allow_floating_gnodes = FALSE; gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n1)); gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n2)); if (g_hash_table_lookup (bbg, ns->n)) { g_hash_table_remove (bbg, ns->n); if (gts_gnode_degree (n1, g1) > 0) g_hash_table_insert (bbg, n1, n1); if (gts_gnode_degree (n2, g1) > 0) g_hash_table_insert (bbg, n2, n2); } } /** * gts_graph_bisection_new: * @wg: a #GtsWGraph. * @ntry: the number of tries for the graph growing algorithm. * @mmax: the number of unsucessful moves for the refinement algorithm. * @nmin: the minimum number of nodes of the coarsest graph. * @imbalance: the maximum relative imbalance allowed between the * weights of both halves of the partition. * * An implementation of a multilevel bisection algorithm as presented * in Karypis and Kumar (1997). A multilevel hierarchy of graphs is * created using the #GtsPGraph object. The bisection of the coarsest * graph is created using the gts_graph_ggg_bisection() function. The * graph is then uncoarsened using gts_pgraph_down() and at each level * the bisection is refined using gts_graph_bisection_bkl_refine(). * * Returns: a new #GtsGraphBisection of @wg. */ GtsGraphBisection * gts_graph_bisection_new (GtsWGraph * wg, guint ntry, guint mmax, guint nmin, gfloat imbalance) { GtsGraph * g; GtsPGraph * pg; GtsGraphBisection * bg; gdouble cost; g_return_val_if_fail (wg != NULL, NULL); g = GTS_GRAPH (wg); pg = gts_pgraph_new (gts_pgraph_class (), g, gts_gnode_split_class (), gts_wgnode_class (), gts_wgedge_class (), nmin); bg = gts_graph_ggg_bisection (g, ntry); #ifdef DEBUG fprintf (stderr, "before size: %5d weight: %5g cuts: %5d cweight: %5g\n", gts_container_size (GTS_CONTAINER (bg->g1)), gts_graph_weight (bg->g1), gts_graph_edges_cut (bg->g1), gts_graph_edges_cut_weight (bg->g1)); g_assert (gts_graph_bisection_check (bg)); #endif while ((cost = gts_graph_bisection_bkl_refine (bg, mmax, imbalance))) { #ifdef DEBUG fprintf (stderr, " cost: %g\n", cost); g_assert (gts_graph_bisection_check (bg)); #endif } #ifdef DEBUG fprintf (stderr, "after size: %5d weight: %5g cuts: %5d cweight: %5g\n", gts_container_size (GTS_CONTAINER (bg->g1)), gts_graph_weight (bg->g1), gts_graph_edges_cut (bg->g1), gts_graph_edges_cut_weight (bg->g1)); #endif while (gts_pgraph_down (pg, (GtsFunc) bisection_children, bg)) { #ifdef DEBUG fprintf (stderr, "before size: %5d weight: %5g cuts: %5d cweight: %5g\n", gts_container_size (GTS_CONTAINER (bg->g1)), gts_graph_weight (bg->g1), gts_graph_edges_cut (bg->g1), gts_graph_edges_cut_weight (bg->g1)); #endif while ((cost = gts_graph_bisection_bkl_refine (bg, mmax, imbalance))) { #ifdef DEBUG fprintf (stderr, " cost: %g\n", cost); g_assert (gts_graph_bisection_check (bg)); #endif } #ifdef DEBUG fprintf (stderr, "after size: %5d weight: %5g cuts: %5d cweight: %5g\n", gts_container_size (GTS_CONTAINER (bg->g1)), gts_graph_weight (bg->g1), gts_graph_edges_cut (bg->g1), gts_graph_edges_cut_weight (bg->g1)); #endif } gts_object_destroy (GTS_OBJECT (pg)); return bg; } /** * gts_graph_bisection_destroy: * @bg: a #GtsGraphBisection. * @destroy_graphs: controls graph destruction. * * Frees all the memory allocated for @bg. If @destroy_graphs is %TRUE * the graphs created by @bg are destroyed. */ void gts_graph_bisection_destroy (GtsGraphBisection * bg, gboolean destroy_graphs) { g_return_if_fail (bg != NULL); g_hash_table_destroy (bg->bg1); g_hash_table_destroy (bg->bg2); if (destroy_graphs) { gts_object_destroy (GTS_OBJECT (bg->g1)); gts_object_destroy (GTS_OBJECT (bg->g2)); } g_free (bg); } static void recursive_bisection (GtsWGraph * wg, guint np, guint ntry, guint mmax, guint nmin, gfloat imbalance, GSList ** list) { if (np == 0) *list = g_slist_prepend (*list, wg); else { GtsGraphBisection * bg = gts_graph_bisection_new (wg, ntry, mmax, nmin, imbalance); GtsGraph * g1 = bg->g1; GtsGraph * g2 = bg->g2; gts_object_destroy (GTS_OBJECT (wg)); gts_graph_bisection_destroy (bg, FALSE); recursive_bisection (GTS_WGRAPH (g1), np - 1, ntry, mmax, nmin, imbalance, list); recursive_bisection (GTS_WGRAPH (g2), np - 1, ntry, mmax, nmin, imbalance, list); } } /** * gts_graph_recursive_bisection: * @wg: a #GtsWGraph. * @n: the number of bisection levels. * @ntry: the number of tries for the graph growing algorithm. * @mmax: the number of unsucessful moves for the refinement algorithm. * @nmin: the minimum number of nodes of the coarsest graph. * @imbalance: the maximum relative imbalance allowed between the * weights of both halves of the partition. * * Calls gts_graph_bisection_new() recursively in order to obtain a * 2^@n partition of @wg. * * Returns: a list of 2^@n new #GtsGraph representing the partition. */ GSList * gts_graph_recursive_bisection (GtsWGraph * wg, guint n, guint ntry, guint mmax, guint nmin, gfloat imbalance) { GtsGraphBisection * bg; GtsGraph * g1, * g2; GSList * list = NULL; g_return_val_if_fail (wg != NULL, NULL); g_return_val_if_fail (n > 0, NULL); bg = gts_graph_bisection_new (wg, ntry, mmax, nmin, imbalance); g1 = bg->g1; g2 = bg->g2; gts_graph_bisection_destroy (bg, FALSE); recursive_bisection (GTS_WGRAPH (g1), n - 1, ntry, mmax, nmin, imbalance, &list); recursive_bisection (GTS_WGRAPH (g2), n - 1, ntry, mmax, nmin, imbalance, &list); return list; } gts-snapshot-121130/src/tribox3.c0000644000175100017510000001441112055775440013517 00000000000000/** * History: * 2004-10-27 Stephane Popinet: changed float to double */ /********************************************************/ /* AABB-triangle overlap test code */ /* by Tomas Akenine-Möller */ /* Function: int triBoxOverlap(float boxcenter[3], */ /* float boxhalfsize[3],float triverts[3][3]); */ /* History: */ /* 2001-03-05: released the code in its first version */ /* 2001-06-18: changed the order of the tests, faster */ /* */ /* Acknowledgement: Many thanks to Pierre Terdiman for */ /* suggestions and discussions on how to optimize code. */ /* Thanks to David Hunt for finding a ">="-bug! */ /********************************************************/ #include #include #define X 0 #define Y 1 #define Z 2 #define CROSS(dest,v1,v2) \ dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \ dest[1]=v1[2]*v2[0]-v1[0]*v2[2]; \ dest[2]=v1[0]*v2[1]-v1[1]*v2[0]; #define DOT(v1,v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) #define SUB(dest,v1,v2) \ dest[0]=v1[0]-v2[0]; \ dest[1]=v1[1]-v2[1]; \ dest[2]=v1[2]-v2[2]; #define FINDMINMAX(x0,x1,x2,min,max) \ min = max = x0; \ if(x1max) max=x1;\ if(x2max) max=x2; int planeBoxOverlap(double normal[3], double vert[3], double maxbox[3]) // -NJMP- { int q; double vmin[3],vmax[3],v; for(q=X;q<=Z;q++) { v=vert[q]; // -NJMP- if(normal[q]>0.0f) { vmin[q]=-maxbox[q] - v; // -NJMP- vmax[q]= maxbox[q] - v; // -NJMP- } else { vmin[q]= maxbox[q] - v; // -NJMP- vmax[q]=-maxbox[q] - v; // -NJMP- } } if(DOT(normal,vmin)>0.0f) return 0; // -NJMP- if(DOT(normal,vmax)>=0.0f) return 1; // -NJMP- return 0; } /*======================== X-tests ========================*/ #define AXISTEST_X01(a, b, fa, fb) \ p0 = a*v0[Y] - b*v0[Z]; \ p2 = a*v2[Y] - b*v2[Z]; \ if(p0rad || max<-rad) return 0; #define AXISTEST_X2(a, b, fa, fb) \ p0 = a*v0[Y] - b*v0[Z]; \ p1 = a*v1[Y] - b*v1[Z]; \ if(p0rad || max<-rad) return 0; /*======================== Y-tests ========================*/ #define AXISTEST_Y02(a, b, fa, fb) \ p0 = -a*v0[X] + b*v0[Z]; \ p2 = -a*v2[X] + b*v2[Z]; \ if(p0rad || max<-rad) return 0; #define AXISTEST_Y1(a, b, fa, fb) \ p0 = -a*v0[X] + b*v0[Z]; \ p1 = -a*v1[X] + b*v1[Z]; \ if(p0rad || max<-rad) return 0; /*======================== Z-tests ========================*/ #define AXISTEST_Z12(a, b, fa, fb) \ p1 = a*v1[X] - b*v1[Y]; \ p2 = a*v2[X] - b*v2[Y]; \ if(p2rad || max<-rad) return 0; #define AXISTEST_Z0(a, b, fa, fb) \ p0 = a*v0[X] - b*v0[Y]; \ p1 = a*v1[X] - b*v1[Y]; \ if(p0rad || max<-rad) return 0; int triBoxOverlap(double boxcenter[3],double boxhalfsize[3],double triverts[3][3]) { /* use separating axis theorem to test overlap between triangle and box */ /* need to test for overlap in these directions: */ /* 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle */ /* we do not even need to test these) */ /* 2) normal of the triangle */ /* 3) crossproduct(edge from tri, {x,y,z}-directin) */ /* this gives 3x3=9 more tests */ double v0[3],v1[3],v2[3]; // double axis[3]; double min,max,p0,p1,p2,rad,fex,fey,fez; // -NJMP- "d" local variable removed double normal[3],e0[3],e1[3],e2[3]; /* This is the fastest branch on Sun */ /* move everything so that the boxcenter is in (0,0,0) */ SUB(v0,triverts[0],boxcenter); SUB(v1,triverts[1],boxcenter); SUB(v2,triverts[2],boxcenter); /* compute triangle edges */ SUB(e0,v1,v0); /* tri edge 0 */ SUB(e1,v2,v1); /* tri edge 1 */ SUB(e2,v0,v2); /* tri edge 2 */ /* Bullet 3: */ /* test the 9 tests first (this was faster) */ fex = fabsf(e0[X]); fey = fabsf(e0[Y]); fez = fabsf(e0[Z]); AXISTEST_X01(e0[Z], e0[Y], fez, fey); AXISTEST_Y02(e0[Z], e0[X], fez, fex); AXISTEST_Z12(e0[Y], e0[X], fey, fex); fex = fabsf(e1[X]); fey = fabsf(e1[Y]); fez = fabsf(e1[Z]); AXISTEST_X01(e1[Z], e1[Y], fez, fey); AXISTEST_Y02(e1[Z], e1[X], fez, fex); AXISTEST_Z0(e1[Y], e1[X], fey, fex); fex = fabsf(e2[X]); fey = fabsf(e2[Y]); fez = fabsf(e2[Z]); AXISTEST_X2(e2[Z], e2[Y], fez, fey); AXISTEST_Y1(e2[Z], e2[X], fez, fex); AXISTEST_Z12(e2[Y], e2[X], fey, fex); /* Bullet 1: */ /* first test overlap in the {x,y,z}-directions */ /* find min, max of the triangle each direction, and test for overlap in */ /* that direction -- this is equivalent to testing a minimal AABB around */ /* the triangle against the AABB */ /* test in X-direction */ FINDMINMAX(v0[X],v1[X],v2[X],min,max); if(min>boxhalfsize[X] || max<-boxhalfsize[X]) return 0; /* test in Y-direction */ FINDMINMAX(v0[Y],v1[Y],v2[Y],min,max); if(min>boxhalfsize[Y] || max<-boxhalfsize[Y]) return 0; /* test in Z-direction */ FINDMINMAX(v0[Z],v1[Z],v2[Z],min,max); if(min>boxhalfsize[Z] || max<-boxhalfsize[Z]) return 0; /* Bullet 2: */ /* test if the box intersects the plane of the triangle */ /* compute plane equation of triangle: normal*x+d=0 */ CROSS(normal,e0,e1); // -NJMP- (line removed here) if(!planeBoxOverlap(normal,v0,boxhalfsize)) return 0; // -NJMP- return 1; /* box and triangle overlaps */ } gts-snapshot-121130/src/boolean.c0000644000175100017510000014517212055775440013555 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999--2002 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" /*#define DEBUG*/ /*#define DEBUG_BOOLEAN*/ /*#define CHECK_ORIENTED*/ #ifdef DEBUG # include "gts-private.h" #endif /* DEBUG */ static void surface_inter_destroy (GtsObject * object) { GtsSurfaceInter * si = GTS_SURFACE_INTER (object); gts_object_destroy (GTS_OBJECT (si->s1)); gts_object_destroy (GTS_OBJECT (si->s2)); g_slist_free (si->edges); (* GTS_OBJECT_CLASS (gts_surface_inter_class ())->parent_class->destroy) (object); } static void surface_inter_class_init (GtsObjectClass * klass) { klass->destroy = surface_inter_destroy; } static void surface_inter_init (GtsSurfaceInter * si) { si->s1 = si->s2 = NULL; si->edges = NULL; } /** * gts_surface_inter_class: * * Returns: the #GtsSurfaceInterClass. */ GtsSurfaceInterClass * gts_surface_inter_class (void) { static GtsSurfaceInterClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo surface_inter_info = { "GtsSurfaceInter", sizeof (GtsSurfaceInter), sizeof (GtsSurfaceInterClass), (GtsObjectClassInitFunc) surface_inter_class_init, (GtsObjectInitFunc) surface_inter_init, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (gts_object_class (), &surface_inter_info); } return klass; } /* EdgeInter: Header */ typedef struct _EdgeInter EdgeInter; struct _EdgeInter { GtsEdge parent; GtsTriangle * t1, * t2; }; #define EDGE_INTER(obj) GTS_OBJECT_CAST (obj,\ EdgeInter,\ edge_inter_class ()) #define IS_EDGE_INTER(obj) (gts_object_is_from_class (obj,\ edge_inter_class ())) static GtsEdgeClass * edge_inter_class (void); static EdgeInter * edge_inter_new (GtsVertex * v1, GtsVertex * v2, GtsTriangle * t1, GtsTriangle * t2); /* EdgeInter: Object */ static GtsEdgeClass * edge_inter_class (void) { static GtsEdgeClass * klass = NULL; if (klass == NULL) { GtsObjectClassInfo edge_inter_info = { "EdgeInter", sizeof (EdgeInter), sizeof (GtsEdgeClass), (GtsObjectClassInitFunc) NULL, (GtsObjectInitFunc) NULL, (GtsArgSetFunc) NULL, (GtsArgGetFunc) NULL }; klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_constraint_class ()), &edge_inter_info); } return klass; } static EdgeInter * edge_inter_new (GtsVertex * v1, GtsVertex * v2, GtsTriangle * t1, GtsTriangle * t2) { EdgeInter * object; object = EDGE_INTER (gts_edge_new (GTS_EDGE_CLASS (edge_inter_class ()), v1, v2)); object->t1 = t1; object->t2 = t2; return object; } #ifdef DEBUG static void write_surface_graph (GtsSurface * s, FILE * fp) { GSList * l = NULL; GtsGraph * g; static void add_to_list (gpointer data, GSList ** l) { *l = g_slist_prepend (*l, data); } gts_surface_foreach_vertex (s, (GtsFunc) gts_object_reset_reserved, NULL); gts_surface_foreach_edge (s, (GtsFunc) gts_object_reset_reserved, NULL); gts_surface_foreach_edge (s, (GtsFunc) add_to_list, &l); g = gts_segments_graph_new (gts_graph_class (), l); gts_graph_write_dot (g, fp); gts_object_destroy (GTS_OBJECT (g)); g_slist_free (l); } #endif /* DEBUG */ static GtsPoint * segment_triangle_intersection (GtsSegment * s, GtsTriangle * t, GtsPointClass * klass) { GtsPoint * A, * B, * C, * D, * E; gint ABCE, ABCD, ADCE, ABDE, BCDE; GtsEdge * AB, * BC, * CA; gdouble a, b, c; g_return_val_if_fail (s != NULL, NULL); g_return_val_if_fail (t != NULL, NULL); g_return_val_if_fail (klass != NULL, NULL); gts_triangle_vertices_edges (t, NULL, (GtsVertex **) &A, (GtsVertex **) &B, (GtsVertex **) &C, &AB, &BC, &CA); D = GTS_POINT (s->v1); E = GTS_POINT (s->v2); ABCE = gts_point_orientation_3d_sos (A, B, C, E); ABCD = gts_point_orientation_3d_sos (A, B, C, D); if (ABCE < 0 || ABCD > 0) { GtsPoint * tmpp; gint tmp; tmpp = E; E = D; D = tmpp; tmp = ABCE; ABCE = ABCD; ABCD = tmp; } if (ABCE < 0 || ABCD > 0) return NULL; ADCE = gts_point_orientation_3d_sos (A, D, C, E); if (ADCE < 0) return NULL; ABDE = gts_point_orientation_3d_sos (A, B, D, E); if (ABDE < 0) return NULL; BCDE = gts_point_orientation_3d_sos (B, C, D, E); if (BCDE < 0) return NULL; a = gts_point_orientation_3d (A, B, C, E); b = gts_point_orientation_3d (A, B, C, D); if (a != b) { c = a/(a - b); return gts_point_new (klass, E->x + c*(D->x - E->x), E->y + c*(D->y - E->y), E->z + c*(D->z - E->z)); } /* D and E are contained within ABC */ #ifdef DEBUG fprintf (stderr, "segment: %p:%s triangle: %p:%s intersection\n" "D and E contained in ABC\n", s, GTS_NEDGE (s)->name, t, GTS_NFACE (t)->name); #endif /* DEBUG */ g_assert (a == 0.); return gts_point_new (klass, (E->x + D->x)/2., (E->y + D->y)/2., (E->z + D->z)/2.); } static gint triangle_triangle_orientation (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4, GtsPoint * p5, GtsPoint * p6) { gint o4 = 0, o5 = 0, o6 = 0; if (p4 != p1 && p4 != p2 && p4 != p3) o4 = gts_point_orientation_3d_sos (p1, p2, p3, p4); if (p5 != p1 && p5 != p2 && p5 != p3) o5 = gts_point_orientation_3d_sos (p1, p2, p3, p5); if (o4*o5 < 0) return 0; if (p6 != p1 && p6 != p2 && p6 != p3) o6 = gts_point_orientation_3d_sos (p1, p2, p3, p6); if (o4*o6 < 0 || o5*o6 < 0) return 0; if (o4) return o4; if (o5) return o5; g_assert (o6); return o6; } static gint triangle_point_orientation (GtsTriangle * t1, GtsTriangle * t2, gint o1, GtsPoint * p) { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (t1->e1)->v1); GtsPoint * p2 = GTS_POINT (GTS_SEGMENT (t1->e1)->v2); GtsPoint * p3 = GTS_POINT (gts_triangle_vertex (t1)); GtsPoint * p4 = GTS_POINT (GTS_SEGMENT (t2->e1)->v1); GtsPoint * p5 = GTS_POINT (GTS_SEGMENT (t2->e1)->v2); GtsPoint * p6 = GTS_POINT (gts_triangle_vertex (t2)); gint o = triangle_triangle_orientation (p1, p2, p3, p4, p5, p6); if (o != 0) return o; o = triangle_triangle_orientation (p4, p5, p6, p1, p2, p3); if (o != 0) { gint o2 = gts_point_orientation_3d_sos (p4, p5, p6, p); return - o*o1*o2; } return 0; } static void add_edge_inter (GtsEdge * e, GtsTriangle * t, GtsVertex * v) { GtsVertex * ev1 = GTS_SEGMENT (e)->v1, * ev2 = GTS_SEGMENT (e)->v2; GList * i = GTS_OBJECT (e)->reserved; GTS_OBJECT (v)->reserved = t; if (i == NULL) { GTS_OBJECT (e)->reserved = g_list_prepend (NULL, v); #ifdef DEBUG fprintf (stderr, "add_edge_inter: inserting %p (%p,%p)\n", v, e, t); #endif /* DEBUG */ } else { GtsPoint * p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1); GtsPoint * p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2); GtsPoint * p3 = GTS_POINT (gts_triangle_vertex (t)); gint o1, oref = gts_point_orientation_3d_sos (p1, p2, p3, GTS_POINT (ev1)); o1 = oref; while (i) { gint o2 = triangle_point_orientation (t, GTS_OBJECT (i->data)->reserved, oref, GTS_POINT (ev1)); if (o2 == 0) { #ifdef DEBUG g_warning ("add_edge_inter: safe sign evaluation failed\n"); #endif /* DEBUG */ o2 = gts_point_orientation_3d_sos (p1, p2, p3, i->data); } if (o1*o2 < 0) break; ev1 = i->data; o1 = o2; i = i->next; } if (i != NULL) { GList * n = g_list_prepend (NULL, v); ev2 = i->data; n->next = i; n->prev = i->prev; i->prev = n; if (n->prev == NULL) GTS_OBJECT (e)->reserved = n; else n->prev->next = n; } else { g_assert (o1*gts_point_orientation_3d_sos (p1, p2, p3, GTS_POINT (ev2)) < 0); GTS_OBJECT (e)->reserved = g_list_append (GTS_OBJECT (e)->reserved, v); } #ifdef DEBUG fprintf (stderr, "add_edge_inter: inserting %p (%p,%p) between %p and %p\n", v, e, t, ev1, ev2); i = GTS_OBJECT (e)->reserved; while (i) { fprintf (stderr, " %p", i->data); i = i->next; } fprintf (stderr, "\n"); #endif /* DEBUG */ } } static GtsVertex * intersects (GtsEdge * e, GtsTriangle * t, GtsSurface * s) { GList * i = GTS_OBJECT (e)->reserved; GtsVertex * v; while (i) { if (GTS_OBJECT (i->data)->reserved == t) return i->data; i = i->next; } v = GTS_VERTEX (segment_triangle_intersection (GTS_SEGMENT (e), t, GTS_POINT_CLASS (s->vertex_class))); if (v != NULL) { #ifdef DEBUG if (GTS_IS_NVERTEX (v) && GTS_IS_NEDGE (e) && GTS_IS_NFACE (t) && GTS_NVERTEX (v)->name[0] == '\0') g_snprintf (GTS_NVERTEX (v)->name, GTS_NAME_LENGTH, "%s|%s", GTS_NEDGE (e)->name, GTS_NFACE (t)->name); #endif /* DEBUG */ if (s->vertex_class->intersection_attributes) (*s->vertex_class->intersection_attributes) (v, GTS_OBJECT (e), GTS_OBJECT (t)); add_edge_inter (e, t, v); } return v; } /* see figure misc/orientation.fig */ static gint intersection_orientation (GtsTriangle * t1, GtsEdge * e, GtsTriangle * t2) { GtsVertex * v1, * v2, * v3; GtsEdge * e2, * e3; GtsVertex * v4, * v5, * v6; gts_triangle_vertices_edges (t1, e, &v1, &v2, &v3, &e, &e2, &e3); gts_triangle_vertices (t2, &v4, &v5, &v6); return gts_point_orientation_3d_sos (GTS_POINT (v4), GTS_POINT (v5), GTS_POINT (v6), GTS_POINT (v2)); } #define UPDATE_ORIENTATION if (o > 0) { vi2 = v; e2 = e; } else { vi2 = vi1;\ e2 = e1;\ vi1 = v;\ e1 = e; } static void intersect_edges (GtsBBox * bb1, GtsBBox * bb2, GtsSurfaceInter * si) { GtsSurface * s1 = GTS_OBJECT (si->s1)->reserved; GtsTriangle * t1 = GTS_TRIANGLE (bb1->bounded); GtsTriangle * t2 = GTS_TRIANGLE (bb2->bounded); GtsVertex * v, * vi1 = NULL, * vi2 = NULL; GtsEdge * e1 = NULL, * e2 = NULL, * e; vi1 = intersects (t2->e1, t1, s1); e1 = t2->e1; v = intersects (t2->e2, t1, s1); e = t2->e2; if (!vi1) { vi1 = v; e1 = e; } else if (v) { gint o = intersection_orientation (t2, t2->e2, t1); UPDATE_ORIENTATION; } if (!vi2) { v = intersects (t2->e3, t1, s1); e = t2->e3; if (!vi1) { vi1 = v; e1 = e; } else if (v) { gint o = intersection_orientation (t2, t2->e3, t1); UPDATE_ORIENTATION; } } if (!vi2) { v = intersects (t1->e1, t2, s1); e = t1->e1; if (!vi1) { vi1 = v; e1 = e; } else if (v) { gint o = - intersection_orientation (t1, t1->e1, t2); UPDATE_ORIENTATION; } } if (!vi2) { v = intersects (t1->e2, t2, s1); e = t1->e2; if (!vi1) { vi1 = v; e1 = e; } else if (v) { gint o = - intersection_orientation (t1, t1->e2, t2); UPDATE_ORIENTATION; } } if (!vi2) { v = intersects (t1->e3, t2, s1); e = t1->e3; if (!vi1) { vi1 = v; e1 = e; } else if (v) { gint o = - intersection_orientation (t1, t1->e3, t2); UPDATE_ORIENTATION; } } g_assert ((!vi1 && !vi2) || (vi1 && vi2)); if (vi1) { GtsEdge * e = GTS_EDGE (edge_inter_new (vi1, vi2, t1, t2)); #ifdef DEBUG fprintf (stderr, "creating constraint %p: %p->%p: %p/%p\n", e, vi1, vi2, t1, t2); #endif /* DEBUG */ gts_surface_add_face (si->s1, GTS_FACE (t1)); gts_surface_add_face (si->s2, GTS_FACE (t2)); si->edges = g_slist_prepend (si->edges, e); GTS_OBJECT (t1)->reserved = g_slist_prepend (GTS_OBJECT (t1)->reserved, e); GTS_OBJECT (t2)->reserved = g_slist_prepend (GTS_OBJECT (t2)->reserved, e); } } static GtsSurfaceInter * surface_inter_new (GtsSurfaceInterClass * klass, GtsSurface * s1, GtsSurface * s2, GNode * faces_tree1, GNode * faces_tree2) { GtsSurfaceInter * si; si = GTS_SURFACE_INTER (gts_object_new (GTS_OBJECT_CLASS (klass))); si->s1 = gts_surface_new (gts_surface_class (), s1->face_class, s1->edge_class, s1->vertex_class); GTS_OBJECT (si->s1)->reserved = s1; si->s2 = gts_surface_new (gts_surface_class (), s2->face_class, s2->edge_class, s2->vertex_class); GTS_OBJECT (si->s2)->reserved = s2; gts_bb_tree_traverse_overlapping (faces_tree1, faces_tree2, (GtsBBTreeTraverseFunc) intersect_edges, si); return si; } static void free_slist (GtsObject * o) { g_slist_free (o->reserved); o->reserved = NULL; } static void free_glist (GtsObject * o) { g_list_foreach (o->reserved, (GFunc) gts_object_reset_reserved, NULL); g_list_free (o->reserved); o->reserved = NULL; } /** * gts_surface_intersection: * @s1: a #GtsSurface. * @s2: a #GtsSurface. * @faces_tree1: a bounding box tree (see gts_bb_tree_new()) for * the faces of @s1. * @faces_tree2: a bounding box tree for the faces of @s2. * * Returns: a list of #GtsEdge defining the curve intersection of the * two surfaces. */ GSList * gts_surface_intersection (GtsSurface * s1, GtsSurface * s2, GNode * faces_tree1, GNode * faces_tree2) { GtsSurfaceInter * si; GSList * inter; g_return_val_if_fail (s1 != NULL, NULL); g_return_val_if_fail (s2 != NULL, NULL); g_return_val_if_fail (faces_tree1 != NULL, NULL); g_return_val_if_fail (faces_tree2 != NULL, NULL); si = surface_inter_new (gts_surface_inter_class (), s1, s2, faces_tree1, faces_tree2); gts_surface_foreach_face (si->s1, (GtsFunc) free_slist, NULL); gts_surface_foreach_face (si->s2, (GtsFunc) free_slist, NULL); gts_surface_foreach_edge (si->s1, (GtsFunc) free_glist, NULL); gts_surface_foreach_edge (si->s2, (GtsFunc) free_glist, NULL); inter = si->edges; si->edges = NULL; gts_object_destroy (GTS_OBJECT (si)); return inter; } typedef enum { INTERIOR = 1 << (GTS_USER_FLAG), RELEVANT = 1 << (GTS_USER_FLAG + 1) } CurveFlag; #define IS_SET(s, f) ((GTS_OBJECT_FLAGS (s) & (f)) != 0) #define SET(s, f) (GTS_OBJECT_FLAGS (s) |= (f)) #define UNSET(s, f) (GTS_OBJECT_FLAGS (s) &= ~(f)) #define NEXT(s) (GTS_OBJECT (s)->reserved) #ifdef DEBUG static void print_segment (GtsSegment * s) { fprintf (stderr, "%p: %s->%s ", s, GTS_NVERTEX (s->v1)->name, GTS_NVERTEX (s->v2)->name); if (NEXT (s)) { GtsSegment * next = NEXT (s); fprintf (stderr, "next %p: %s->%s\n", next, GTS_NVERTEX (next->v1)->name, GTS_NVERTEX (next->v2)->name); } else fprintf (stderr, "next NULL\n"); } static void write_nodes (GSList * i, GHashTable * hash, guint * nn, FILE * fp) { while (i) { GtsSegment * s = i->data; if (!g_hash_table_lookup (hash, s->v1)) { fprintf (fp, " %u [ label = \"%p\" ];\n", *nn, s->v1); g_hash_table_insert (hash, s->v1, GUINT_TO_POINTER ((*nn)++)); } if (!g_hash_table_lookup (hash, s->v2)) { fprintf (fp, " %u [ label = \"%p\" ];\n", *nn, s->v2); g_hash_table_insert (hash, s->v2, GUINT_TO_POINTER ((*nn)++)); } i = i->next; } } static void write_edges (GSList * i, GHashTable * hash, GtsSurface * surface, FILE * fp) { while (i) { GtsSegment * s = i->data; fprintf (fp, " %u -> %u [ label = \"%p:%d\" ];\n", GPOINTER_TO_UINT (g_hash_table_lookup (hash, s->v1)), GPOINTER_TO_UINT (g_hash_table_lookup (hash, s->v2)), s, gts_edge_face_number (GTS_EDGE (s), surface)); i = i->next; } } static void write_graph (GSList * boundary, GSList * interior, GtsSurface * surface, FILE * fp) { GHashTable * hash = g_hash_table_new (NULL, NULL); guint nn = 1; fprintf (fp, "digraph oriented_curve {\n"); write_nodes (boundary, hash, &nn, fp); write_nodes (interior, hash, &nn, fp); write_edges (boundary, hash, surface, fp); fprintf (fp, " edge [ color = red ];\n"); write_edges (interior, hash, surface, fp); fprintf (fp, "}\n"); g_hash_table_destroy (hash); } static void write_graph1 (GtsSegment * start, GSList * i, GtsSurface * surface, FILE * fp) { GSList * boundary = NULL, * interior = NULL; GtsSegment * s = start; do { boundary = g_slist_prepend (boundary, s); s = NEXT (s); } while (s != start); while (i) { if (IS_SET (i->data, INTERIOR)) interior = g_slist_prepend (interior, i->data); i = i->next; } write_graph (boundary, interior, surface, fp); g_slist_free (boundary); g_slist_free (interior); } static void print_loop (GtsSegment * start, FILE * fp) { GtsSegment * s = start; do { fprintf (fp, " %p: %p:%s -> %p:%s\n", s, s->v1, GTS_NVERTEX (s->v1)->name, s->v2, GTS_NVERTEX (s->v2)->name); s = NEXT (s); } while (s != start && s != NULL); } static void draw_vector (GtsPoint * p1, GtsPoint * p2, FILE * fp) { gdouble x = p2->x - p1->x; gdouble y = p2->y - p1->y; gdouble z = p2->z - p1->z; fprintf (fp, "VECT 1 3 0 3 0 %g %g %g %g %g %g %g %g %g\n", p1->x + x - (x - y/2.)/5., p1->y + y - (x/2. + y)/5., p1->z + z - (x/2. + z)/5., p1->x + x, p1->y + y, p1->z + z, p1->x + x - (x + y/2.)/5., p1->y + y + (x/2. - y)/5., p1->z + z + (x/2. - z)/5.); fprintf (fp, "VECT 1 2 0 2 0 %g %g %g %g %g %g\n", p1->x, p1->y, p1->z, p1->x + x, p1->y + y, p1->z + z); } static void draw_vector1 (GtsPoint * p1, GtsPoint * p2, GtsPoint * o, FILE * fp) { gdouble x1 = o->x + 0.9*(p1->x - o->x); gdouble y1 = o->y + 0.9*(p1->y - o->y); gdouble z1 = o->z + 0.9*(p1->z - o->z); gdouble x2 = o->x + 0.9*(p2->x - o->x); gdouble y2 = o->y + 0.9*(p2->y - o->y); gdouble z2 = o->z + 0.9*(p2->z - o->z); gdouble x = x2 - x1; gdouble y = y2 - y1; gdouble z = z2 - z1; fprintf (fp, "VECT 1 3 0 3 0 %g %g %g %g %g %g %g %g %g\n", x1 + x - (x - y/2.)/5., y1 + y - (x/2. + y)/5., z1 + z - (x/2. + z)/5., x1 + x, y1 + y, z1 + z, x1 + x - (x + y/2.)/5., y1 + y + (x/2. - y)/5., z1 + z + (x/2. - z)/5.); fprintf (fp, "VECT 1 2 0 2 0 %g %g %g %g %g %g\n", x1, y1, z1, x1 + x, y1 + y, z1 + z); } static void write_segments (GSList * boundary, GSList * interior, FILE * fp) { GSList * i = boundary; fprintf (fp, "LIST {\n"); while (i) { GSList * inext = i->next; GtsSegment * s = i->data; GtsSegment * next = inext ? inext->data : boundary->data; GtsVertex * v1, * v2; if (s->v1 != next->v1 && s->v1 != next->v2) { v1 = s->v1; v2 = s->v2; } else { v1 = s->v2; v2 = s->v1; } draw_vector (GTS_POINT (v1), GTS_POINT (v2), fp); i = inext; } i = interior; while (i) { GtsSegment * s = i->data; draw_vector (GTS_POINT (s->v1), GTS_POINT (s->v2), fp); i = i->next; } fprintf (fp, "}\n"); } static void write_loops (GSList * i, FILE * fp) { guint nl = 0; while (i) { GtsSegment * start = i->data, * s; GtsPoint os; guint n = 0; fprintf (fp, "(geometry \"loop%d\" = LIST {\n", nl++); os.x = os.y = os.z = 0.; s = start; do { GtsSegment * next = NEXT (s); GtsPoint * p; if (s->v1 != next->v1 && s->v1 != next->v2) p = GTS_POINT (s->v1); else p = GTS_POINT (s->v2); os.x += p->x; os.y += p->y; os.z += p->z; n++; s = next; } while (s != start); os.x /= n; os.y /= n; os.z /= n; s = start; do { GtsSegment * next = NEXT (s); if (s->v1 != next->v1 && s->v1 != next->v2) draw_vector1 (GTS_POINT (s->v1), GTS_POINT (s->v2), &os, fp); else draw_vector1 (GTS_POINT (s->v2), GTS_POINT (s->v1), &os, fp); s = next; } while (s != start); fprintf (fp, "})\n"); i = i->next; } } #define NAME(v) (GTS_IS_NVERTEX (v) ? GTS_NVERTEX (v)->name : "") #endif /* DEBUG */ static GtsSegment * prev_flag (GtsSegment * s, CurveFlag flag) { GSList * i = s->v1->segments; while (i) { if (i->data != s && IS_SET (i->data, flag)) return i->data; i = i->next; } return NULL; } static GtsSegment * next_flag (GtsSegment * s, CurveFlag flag) { GSList * i = s->v2->segments; while (i) { if (i->data != s && IS_SET (i->data, flag)) return i->data; i = i->next; } return NULL; } static GtsSegment * next_interior (GtsVertex * v) { GSList * i = v->segments; while (i) { GtsSegment * s = i->data; if (s->v1 == v && IS_SET (s, INTERIOR)) return s; i = i->next; } return NULL; } static GtsSegment * prev_interior (GtsVertex * v) { GSList * i = v->segments; while (i) { GtsSegment * s = i->data; if (s->v2 == v && IS_SET (s, INTERIOR)) return s; i = i->next; } return NULL; } static GtsSegment * reverse (GtsSegment * start, gboolean interior, gboolean * isloop) { GtsSegment * s = start, * prev = NULL, * rprev = NULL; GtsSegment * rstart = NULL, * rstart1 = NULL; do { GtsSegment * rs; g_assert (IS_EDGE_INTER (s)); rs = GTS_SEGMENT (edge_inter_new (s->v2, s->v1, EDGE_INTER (s)->t1, EDGE_INTER (s)->t2)); if (rstart == NULL) rstart = rs; else if (rstart1 == NULL) rstart1 = rs; if (interior) SET (rs, INTERIOR); NEXT (rs) = rprev; rprev = rs; prev = s; s = NEXT (s); } while (s != NULL && s != start); if (s == start) { NEXT (rstart) = rprev; *isloop = TRUE; } else { NEXT (rstart) = start; NEXT (prev) = rprev; *isloop = FALSE; } return rstart1; } static GSList * interior_loops (GSList * interior) { GSList * i = interior; GSList * loops = NULL; i = interior; while (i) { GtsSegment * s = i->data; if (IS_SET (s, RELEVANT)) { GtsSegment * start = s, * end; do { GtsSegment * next = next_flag (s, INTERIOR); UNSET (s, RELEVANT); end = s; s = NEXT (s) = next; } while (s != NULL && s != start); if (s == start) loops = g_slist_prepend (loops, start); else { GtsSegment * next, * prev; gboolean isloop; s = prev_flag (start, INTERIOR); while (s) { UNSET (s, RELEVANT); NEXT (s) = start; start = s; s = prev_flag (s, INTERIOR); } next = next_flag (end, RELEVANT); prev = prev_flag (start, RELEVANT); if (prev != NULL) SET (start->v1, INTERIOR); if (next != NULL) SET (end->v2, INTERIOR); if (next == NULL && prev == NULL) loops = g_slist_prepend (loops, start); else reverse (start, TRUE, &isloop); } } i = i->next; } return loops; } #define ORIENTATION(p1,p2,p3,o) (gts_point_orientation_3d (p1, p2, o, p3)) #define ORIENTATION_SOS(p1,p2,p3,o) (gts_point_orientation_3d_sos (p1, p2, o, p3)) #define ORIENTED_VERTICES(s,next,w1,w2) {\ if ((s)->v1 == (next)->v1 || (s)->v1 == (next)->v2) {\ w1 = (s)->v2;\ w2 = (s)->v1;\ }\ else {\ w1 = (s)->v1;\ w2 = (s)->v2;\ }\ } #if 0 static GtsSegment * segment_intersects (GtsPoint * p1, GtsPoint * p2, GSList * i, GtsPoint * o) { while (i) { GtsSegment * s = i->data; GtsPoint * p3 = GTS_POINT (s->v1); GtsPoint * p4 = GTS_POINT (s->v2); if (p3 != p1 && p3 != p2 && p4 != p1 && p4 != p2) { gdouble o1 = ORIENTATION (p3, p4, p1, o); gdouble o2 = ORIENTATION (p3, p4, p2, o); if ((o1 < 0. && o2 > 0.) || (o1 > 0. && o2 < 0.)) { o1 = ORIENTATION (p1, p2, p3, o); o2 = ORIENTATION (p1, p2, p4, o); if ((o1 <= 0. && o2 >= 0.) || (o1 >= 0. && o2 <= 0.)) return s; } } i = i->next; } return NULL; } #else static GtsSegment * segment_intersects (GtsPoint * p1, GtsPoint * p2, GSList * i, GtsPoint * o) { while (i) { GtsSegment * s = i->data; GtsPoint * p3 = GTS_POINT (s->v1); GtsPoint * p4 = GTS_POINT (s->v2); if (p3 != p1 && p3 != p2 && p4 != p1 && p4 != p2) { gint o1 = ORIENTATION_SOS (p3, p4, p1, o); gint o2 = ORIENTATION_SOS (p3, p4, p2, o); if (o1*o2 < 0) { o1 = ORIENTATION_SOS (p1, p2, p3, o); o2 = ORIENTATION_SOS (p1, p2, p4, o); if (o1*o2 < 0) return s; } } i = i->next; } return NULL; } #endif static gboolean is_inside_wedge (GtsSegment * s1, GtsSegment * s2, GtsPoint * p, GtsPoint * o) { GtsVertex * v1, * v2, * v3; ORIENTED_VERTICES (s1, s2, v1, v2); v3 = s2->v1 != v2 ? s2->v1 : s2->v2; if (ORIENTATION (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3), o) >= 0.) { if (ORIENTATION (GTS_POINT (v1), GTS_POINT (v2), p, o) <= 0. || ORIENTATION (GTS_POINT (v2), GTS_POINT (v3), p, o) <= 0.) return FALSE; } else if (ORIENTATION (GTS_POINT (v1), GTS_POINT (v2), p, o) <= 0. && ORIENTATION (GTS_POINT (v2), GTS_POINT (v3), p, o) <= 0.) return FALSE; return TRUE; } static GtsSegment * connection (GtsPoint * p, GSList * interior, GSList * bloops, GtsPoint * o) { while (bloops) { GtsSegment * start = bloops->data, * s = start; do { GtsSegment * next = NEXT (s); GtsVertex * v2 = s->v1 == next->v1 || s->v1 == next->v2 ? s->v1 : s->v2; if (is_inside_wedge (s, next, p, o) && !segment_intersects (p, GTS_POINT (v2), interior, o)) return s; s = next; } while (s != start); bloops = bloops->next; } return NULL; } static gdouble loop_orientation (GtsSegment * start, GtsPoint * p, GtsPoint * o) { GtsSegment * s = start; gdouble or = 0.; do { GtsSegment * next = NEXT (s); GtsVertex * v1, * v2; ORIENTED_VERTICES (s, next, v1, v2); or += ORIENTATION (p, GTS_POINT (v1), GTS_POINT (v2), o); s = next; } while (s != start); #ifdef DEBUG fprintf (stderr, "loop orientation: %g\n", or); #endif /* DEBUG */ return or; } static void connect_interior_loop (GtsSegment * start, GSList ** interior, GSList ** bloops, GtsSurface * surface, GtsPoint * o) { GtsSegment * s = start, * c = NULL, * next, * s1, * rs1, * rs; GtsVertex * v, * cv; gboolean isloop; do { if (!(c = connection (GTS_POINT (s->v2), *interior, *bloops, o))) s = NEXT (s); } while (s != start && !c); g_assert (c); next = NEXT (c); v = c->v1 == next->v1 || c->v1 == next->v2 ? c->v1 : c->v2; cv = s->v2; #ifdef DEBUG fprintf (stderr, "connecting %p:%s with %p:%s\n", cv, NAME (cv), v, NAME (v)); fprintf (stderr, " c: %p: %p:%s %p:%s\n", c, c->v1, NAME (c->v1), c->v2, NAME (c->v2)); fprintf (stderr, " next: %p: %p:%s %p:%s\n", next, next->v1, NAME (next->v1), next->v2, NAME (next->v2)); #endif /* DEBUG */ rs = reverse (s, FALSE, &isloop); if (isloop) { if (loop_orientation (rs, GTS_POINT (v), o) < 0.) { GtsSegment * tmp = s; s = rs; rs = tmp; } *bloops = g_slist_prepend (*bloops, rs); } s1 = GTS_SEGMENT (gts_edge_new (surface->edge_class, v, cv)); rs1 = GTS_SEGMENT (gts_edge_new (surface->edge_class, cv, v)); NEXT (c) = s1; NEXT (rs1) = next; *interior = g_slist_prepend (*interior, s1); NEXT (s1) = NEXT (s); NEXT (s) = rs1; } static GSList * boundary_loops (GSList * boundary) { GSList * i = boundary; GtsSegment * start = i->data; GSList * loops = NULL; while (i) { GtsSegment * s = i->data; GSList * inext = i->next; GtsSegment * next = inext ? inext->data : start; GtsVertex * v = s->v1 == next->v1 || s->v1 == next->v2 ? s->v1 : s->v2; if (IS_SET (v, INTERIOR)) { GtsSegment * intprev = prev_interior (v); NEXT (intprev) = next; NEXT (s) = next_interior (v); UNSET (v, INTERIOR); } else NEXT (s) = next; i = inext; } i = boundary; while (i) { start = i->data; if (IS_SET (start, RELEVANT)) { GtsSegment * s = start; do { UNSET (s, RELEVANT); UNSET (s, INTERIOR); s = NEXT (s); } while (s != start); loops = g_slist_prepend (loops, start); } i = i->next; } return loops; } typedef struct _Ear Ear; struct _Ear { GtsVertex * v1, * v2, * v3; GtsSegment * s1, * s2, * s3; }; static gboolean point_in_wedge (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p, gboolean closed, GtsPoint * o) { gdouble o1; if (p == p2 || p == p3) return FALSE; o1 = ORIENTATION (p1, p2, p, o); if ((closed && o1 < 0.) || (!closed && o1 <= 0.)) return FALSE; o1 = ORIENTATION (p3, p1, p, o); if ((closed && o1 < 0.) || (!closed && o1 <= 0.)) return FALSE; return TRUE; } #if 0 static gboolean segment_intersects1 (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4, gboolean closed, GtsPoint * o) { gdouble o1 = ORIENTATION (p3, p4, p1, o); gdouble o2 = ORIENTATION (p3, p4, p2, o); gdouble o3, o4; if ((closed && ((o1 > 0. && o2 > 0.) || (o1 < 0. && o2 < 0.))) || (!closed && ((o1 >= 0. && o2 >= 0.) || (o1 <= 0. && o2 <= 0.)))) return FALSE; o3 = ORIENTATION (p1, p2, p3, o); o4 = ORIENTATION (p1, p2, p4, o); if ((o3 > 0. && o4 > 0.) || (o3 < 0. && o4 < 0.)) return FALSE; if (closed) return TRUE; if ((o3 == 0. && o4 > 0.) || (o4 == 0. && o3 > 0.)) return TRUE; return FALSE; } #else static gboolean segment_intersects1 (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, GtsPoint * p4, gboolean closed, GtsPoint * o) { gint o1, o2; o1 = ORIENTATION_SOS (p3, p4, p1, o); o2 = ORIENTATION_SOS (p3, p4, p2, o); if (o1*o2 > 0) return FALSE; o1 = ORIENTATION_SOS (p1, p2, p3, o); o2 = ORIENTATION_SOS (p1, p2, p4, o); if (o1*o2 > 0) return FALSE; return TRUE; } #endif static GtsSegment * triangle_intersects_segments (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3, gboolean closed, GtsSegment * start, GtsPoint * o) { GtsSegment * s = start; do { GtsPoint * p4 = GTS_POINT (s->v1); GtsPoint * p5 = GTS_POINT (s->v2); if (p4 == p1) { if (point_in_wedge (p1, p2, p3, p5, closed, o)) return s; } else if (p4 == p2) { if (point_in_wedge (p2, p3, p1, p5, closed, o)) return s; } else if (p4 == p3) { if (point_in_wedge (p3, p1, p2, p5, closed, o)) return s; } else if (p5 == p1) { if (point_in_wedge (p1, p2, p3, p4, closed, o)) return s; } else if (p5 == p2) { if (point_in_wedge (p2, p3, p1, p4, closed, o)) return s; } else if (p5 == p3) { if (point_in_wedge (p3, p1, p2, p4, closed, o)) return s; } else if (segment_intersects1 (p1, p2, p4, p5, closed, o) || segment_intersects1 (p2, p3, p4, p5, closed, o) || segment_intersects1 (p3, p1, p4, p5, closed, o)) return s; s = NEXT (s); } while (s != start); return NULL; } static gboolean new_ear (GtsSegment * s, Ear * e, GtsSegment * start, guint sloppy, GtsPoint * o) { gdouble or; e->s1 = s; e->s2 = NEXT (s); g_return_val_if_fail (e->s2, FALSE); g_return_val_if_fail (e->s2 != e->s1, FALSE); ORIENTED_VERTICES (e->s1, e->s2, e->v1, e->v2); e->v3 = e->s2->v1 != e->v2 ? e->s2->v1 : e->s2->v2; if (e->v3 == e->v1) return FALSE; e->s3 = NEXT (e->s2); if (gts_segment_connect (e->s3, e->v1, e->v3)) { if (NEXT (e->s3) != e->s1) return FALSE; } else if (gts_vertices_are_connected (e->v1, e->v3)) return FALSE; else e->s3 = NULL; or = ORIENTATION (GTS_POINT (e->v1), GTS_POINT (e->v2), GTS_POINT (e->v3),o); switch (sloppy) { case 0: if (or <= 0. || triangle_intersects_segments (GTS_POINT (e->v1), GTS_POINT (e->v2), GTS_POINT (e->v3), TRUE, start, o)) return FALSE; break; case 1: if (or < 0. || (or > 0. && triangle_intersects_segments (GTS_POINT (e->v1), GTS_POINT (e->v2), GTS_POINT (e->v3), FALSE, start, o))) return FALSE; break; case 2: if ((or > 0. && triangle_intersects_segments (GTS_POINT (e->v1), GTS_POINT (e->v2), GTS_POINT (e->v3), FALSE, start, o)) || (or < 0. && triangle_intersects_segments (GTS_POINT (e->v2), GTS_POINT (e->v1), GTS_POINT (e->v3), FALSE, start, o))) return FALSE; break; case 3: if (or < 0.) return FALSE; break; } #ifdef DEBUG if (or <= 0.) fprintf (stderr, "or: %g\n", or); #endif /* DEBUG */ g_assert (or > -1e-6); return TRUE; } static void triangulate_loop (GtsSegment * start, GtsSurface * surface, GtsPoint * o) { GtsSegment * prev = start, * s; guint sloppy = 0; #ifdef DEBUG guint nt = 0; #endif /* DEBUG */ s = NEXT (start); while (NEXT (s) != s) { GtsSegment * next = NEXT (s); Ear e; #ifdef DEBUG fprintf (stderr, "prev: %p s: %p next: %p\n", prev, s, next); #endif /* DEBUG */ if (!new_ear (s, &e, start, sloppy, o)) { if (s == start) { sloppy++; #ifdef DEBUG fprintf (stderr, "sloppy: %u\n", sloppy); #endif /* DEBUG */ } prev = s; s = next; } else { GtsFace * f; if (!GTS_IS_EDGE (e.s3)) e.s3 = GTS_SEGMENT (gts_edge_new (surface->edge_class, e.v1, e.v3)); f = gts_face_new (surface->face_class, GTS_EDGE (e.s1), GTS_EDGE (e.s2), GTS_EDGE (e.s3)); gts_surface_add_face (surface, f); UNSET (e.s1, RELEVANT); UNSET (e.s1, INTERIOR); UNSET (e.s2, RELEVANT); UNSET (e.s2, INTERIOR); NEXT (prev) = e.s3; NEXT (e.s3) = NEXT (e.s2); NEXT (e.s1) = NEXT (e.s2) = NULL; start = prev; s = NEXT (prev); sloppy = 0; #ifdef DEBUG { gchar name[80]; FILE * fp; fprintf (stderr, " t.%u: (%p:%s,%p:%s,%p:%s)\n", nt, e.v1, NAME (e.v1), e.v2, NAME (e.v2), e.v3, NAME (e.v3)); sprintf (name, "/tmp/t.%u", nt++); fp = fopen (name, "wt"); // gts_surface_write (surface, fp); gts_write_triangle (GTS_TRIANGLE (f), NULL, fp); // write_graph1 (start, interior, surface, fp); fclose (fp); print_loop (start, stderr); } #endif /* DEBUG */ } } UNSET (s, RELEVANT); UNSET (s, INTERIOR); NEXT (s) = NULL; } static void check_object (GtsObject * o) { g_assert (o->reserved == NULL); g_assert (o->flags == 0); } static void check_boundary (GtsEdge * e, GtsSurface * s) { check_object (GTS_OBJECT (e)); check_object (GTS_OBJECT (GTS_SEGMENT (e)->v1)); check_object (GTS_OBJECT (GTS_SEGMENT (e)->v2)); g_assert (gts_edge_face_number (e, s) == 1); } static void check_interior (GtsEdge * e, GtsSurface * s) { guint n; check_object (GTS_OBJECT (e)); check_object (GTS_OBJECT (GTS_SEGMENT (e)->v1)); check_object (GTS_OBJECT (GTS_SEGMENT (e)->v2)); n = gts_edge_face_number (e, s); #ifdef DEBUG if (n != 2) gts_surface_print_stats (s, stderr); #endif /* DEBUG */ g_assert (n == 2); } static void check_boundary_interior_triangulation (GSList * boundary, GSList * interior, GtsSurface * surface) { g_slist_foreach (boundary, (GFunc) check_boundary, surface); g_slist_foreach (interior, (GFunc) check_interior, surface); } static void merge_duplicate (GtsEdge * e) { GtsEdge * dup = gts_edge_is_duplicate (e); g_assert (dup); gts_edge_replace (dup, e); gts_object_destroy (GTS_OBJECT (dup)); } static void triangulate_boundary_interior (GSList * boundary, GSList * interior, GtsSurface * s, GtsPoint * o) { GSList * iloops, * bloops, * i; i = boundary; while (i) { SET (i->data, RELEVANT); i = i->next; } i = interior; while (i) { SET (i->data, RELEVANT); SET (i->data, INTERIOR); i = i->next; } iloops = interior_loops (interior); bloops = boundary_loops (boundary); i = iloops; while (i) { #ifdef DEBUG fprintf (stderr, "--- interior loop ---\n"); print_loop (i->data, stderr); #endif /* DEBUG */ connect_interior_loop (i->data, &interior, &bloops, s, o); i = i->next; } #ifdef DEBUG { FILE * fp = fopen ("/tmp/bloops", "w"); write_loops (bloops, fp); fclose (fp); } #endif /* DEBUG */ i = bloops; while (i) { #ifdef DEBUG fprintf (stderr, "--- boundary loop ---\n"); print_loop (i->data, stderr); #endif /* DEBUG */ triangulate_loop (i->data, s, o); i = i->next; } g_slist_foreach (interior, (GFunc) merge_duplicate, NULL); g_slist_free (iloops); g_slist_free (bloops); #ifdef CHECK_ORIENTED check_boundary_interior_triangulation (boundary, interior, s); #endif /* CHECK_ORIENTED */ } static void create_edges (GtsSegment * s, GtsSurface * surface) { if (GTS_OBJECT (s)->reserved) { GList * i = GTS_OBJECT (s)->reserved; GtsVertex * v1 = i->data; GTS_OBJECT (s)->reserved = g_list_prepend (i, gts_edge_new (surface->edge_class, s->v1, v1)); while (i) { GList * next = i->next; GtsVertex * v2 = next ? next->data : s->v2; GTS_OBJECT (i->data)->reserved = NULL; i->data = gts_edge_new (surface->edge_class, v1, v2); v1 = v2; i = next; } } } static void add_boundary (GtsSegment * s, GtsSegment * next, GSList ** boundary) { if (GTS_OBJECT (s)->reserved == NULL) *boundary = g_slist_prepend (*boundary, s); else { if (s->v2 == next->v2 || s->v2 == next->v1) { GList * i = g_list_last (GTS_OBJECT (s)->reserved); while (i) { *boundary = g_slist_prepend (*boundary, i->data); i = i->prev; } } else { GList * i = GTS_OBJECT (s)->reserved; while (i) { *boundary = g_slist_prepend (*boundary, i->data); i = i->next; } } } } static void triangulate_face (GtsTriangle * t, GtsSurface * surface) { GSList * interior = GTS_OBJECT (t)->reserved; GSList * boundary = NULL; GtsSurface * s = gts_surface_new (gts_surface_class (), surface->face_class, surface->edge_class, surface->vertex_class); gdouble x, y, z; GtsPoint * p = GTS_POINT (GTS_SEGMENT (t->e1)->v1); GtsPoint * o; GTS_OBJECT (t)->reserved = NULL; gts_triangle_normal (t, &x, &y, &z); g_assert (x != 0. || y != 0. || z != 0.); o = gts_point_new (gts_point_class (), p->x + x, p->y + y, p->z + z); add_boundary (GTS_SEGMENT (t->e3), GTS_SEGMENT (t->e1), &boundary); add_boundary (GTS_SEGMENT (t->e2), GTS_SEGMENT (t->e3), &boundary); add_boundary (GTS_SEGMENT (t->e1), GTS_SEGMENT (t->e2), &boundary); #ifdef DEBUG { static guint nt = 0; char name[80]; FILE * fp; fprintf (stderr, "%u: triangulating %p\n", nt, t); if (nt == 28) fprintf (stderr, "tintin!!!!\n"); sprintf (name, "/tmp/oc.%u", nt++); fp = fopen (name, "wt"); // write_graph (boundary, interior, s, fp); write_segments (boundary, interior, fp); fclose (fp); } #endif /* DEBUG */ triangulate_boundary_interior (boundary, interior, s, o); g_slist_free (interior); g_slist_free (boundary); if (GTS_OBJECT (t)->klass->attributes) gts_surface_foreach_face (s, (GtsFunc) gts_object_attributes, t); gts_surface_merge (surface, s); gts_object_destroy (GTS_OBJECT (s)); gts_object_destroy (GTS_OBJECT (o)); } static void free_edge_list (GtsObject * o) { g_list_free (o->reserved); o->reserved = NULL; } /** * gts_surface_inter_new: * @klass: a #GtsSurfaceInterClass. * @s1: a #GtsSurface. * @s2: a #GtsSurface. * @faces_tree1: a bounding box tree (see gts_bb_tree_new()) for * the faces of @s1. * @faces_tree2: a bounding box tree for the faces of @s2. * @is_open1: whether @s1 is an "open" surface. * @is_open2: whether @s2 is an "open" surface. * * When triangulating the cut faces, the new faces inherit the * attributes of these original faces through their attributes() * method. * * Returns: a new #GtsSurfaceInter describing the intersection of @s1 * and @s2. */ GtsSurfaceInter * gts_surface_inter_new (GtsSurfaceInterClass * klass, GtsSurface * s1, GtsSurface * s2, GNode * faces_tree1, GNode * faces_tree2, gboolean is_open1, gboolean is_open2) { GtsSurfaceInter * si; GtsSurface * s; g_return_val_if_fail (klass != NULL, NULL); g_return_val_if_fail (s1 != NULL, NULL); g_return_val_if_fail (s2 != NULL, NULL); g_return_val_if_fail (faces_tree1 != NULL, NULL); g_return_val_if_fail (faces_tree2 != NULL, NULL); si = surface_inter_new (klass, s1, s2, faces_tree1, faces_tree2); gts_surface_foreach_edge (si->s1, (GtsFunc) create_edges, si->s1); gts_surface_foreach_edge (si->s2, (GtsFunc) create_edges, si->s2); #ifdef DEBUG fprintf (stderr, "====== triangulating s1 ======\n"); #endif /* DEBUG */ s = gts_surface_new (gts_surface_class (), s1->face_class, s1->edge_class, s1->vertex_class); gts_surface_foreach_face (si->s1, (GtsFunc) triangulate_face, s); gts_surface_foreach_edge (si->s1, (GtsFunc) free_edge_list, NULL); gts_object_destroy (GTS_OBJECT (si->s1)); si->s1 = s; GTS_OBJECT (si->s1)->reserved = s1; #ifdef DEBUG fprintf (stderr, "====== triangulating s2 ======\n"); #endif /* DEBUG */ s = gts_surface_new (gts_surface_class (), s2->face_class, s2->edge_class, s2->vertex_class); gts_surface_foreach_face (si->s2, (GtsFunc) triangulate_face, s); gts_surface_foreach_edge (si->s2, (GtsFunc) free_edge_list, NULL); gts_object_destroy (GTS_OBJECT (si->s2)); si->s2 = s; GTS_OBJECT (si->s2)->reserved = s2; return si; } static void check_surface_edge (GtsEdge * e, gpointer * data) { gboolean * ok = data[0]; GtsSurface * s = data[1]; GtsSurface * bs = GTS_OBJECT (s)->reserved; guint nf = gts_edge_face_number (e, s); if (nf < 1 || nf > 2) { *ok = FALSE; g_return_if_fail (nf >= 1 && nf <= 2); } if (nf == 1 && gts_edge_face_number (e, bs) == 0) { *ok = FALSE; g_return_if_fail (gts_edge_face_number (e, bs) > 0); } } static void mark_edge (GtsObject * o, gpointer data) { o->reserved = data; } static gint triangle_orientation (GtsTriangle * t, GtsEdge * e) { GtsSegment * s = GTS_SEGMENT (t->e1 == e ? t->e2 : t->e2 == e ? t->e3 : t->e1); GtsVertex * v2 = GTS_SEGMENT (e)->v2; if (s->v1 == v2 || s->v2 == v2) return 1; return -1; } static gboolean check_orientation (GtsEdge * e, GtsSurface * s) { GtsTriangle * t1 = NULL, * t2 = NULL; GSList * i = e->triangles; gint o1 = 0, o2 = 0; while (i) { if (GTS_IS_FACE (i->data) && gts_face_has_parent_surface (i->data, s)) { if (t1 == NULL) { t1 = i->data; o1 = triangle_orientation (t1, e); } else if (t2 == NULL) { t2 = i->data; o2 = triangle_orientation (t2, e); g_return_val_if_fail (o1*o2 < 0, FALSE); } else g_assert_not_reached (); } i = i->next; } g_return_val_if_fail (t1 && t2, FALSE); return TRUE; } static void check_edge (GtsSegment * s, gpointer * data) { gboolean * ok = data[0]; GtsSurfaceInter * si = data[1]; gboolean * closed = data[2]; GSList * j; guint nn = 0; j = s->v1->segments; while (j && *ok) { GtsSegment * s1 = j->data; if (s1 != s && GTS_OBJECT (s1)->reserved == si) { if (s1->v2 != s->v1) *ok = FALSE; nn++; } j = j->next; } j = s->v2->segments; while (j && *ok) { GtsSegment * s1 = j->data; if (s1 != s && GTS_OBJECT (s1)->reserved == si) { if (s1->v1 != s->v2) *ok = FALSE; nn++; } j = j->next; } if (nn != 2) *closed = FALSE; if (!check_orientation (GTS_EDGE (s), si->s1)) *ok = FALSE; if (!check_orientation (GTS_EDGE (s), si->s2)) *ok = FALSE; } /** * gts_surface_inter_check: * @si: a #GtsSurfaceInter. * @closed: is set to %TRUE if @si->edges is a closed curve, %FALSE * otherwise. * * Returns: %TRUE if the curve described by @si is an orientable * manifold, %FALSE otherwise. */ gboolean gts_surface_inter_check (GtsSurfaceInter * si, gboolean * closed) { gboolean ok = TRUE; gpointer data[3]; g_return_val_if_fail (si != NULL, FALSE); g_return_val_if_fail (closed != NULL, FALSE); *closed = si->edges ? TRUE : FALSE; /* mark edges as used by si */ g_slist_foreach (si->edges, (GFunc) mark_edge, si); data[0] = &ok; data[1] = si; data[2] = closed; g_slist_foreach (si->edges, (GFunc) check_edge, data); g_slist_foreach (si->edges, (GFunc) gts_object_reset_reserved, NULL); /* check connectivity of the faces of @si */ if (*closed) { gpointer data[2]; data[0] = &ok; data[1] = si->s1; gts_surface_foreach_edge (si->s1, (GtsFunc) check_surface_edge, data); data[1] = si->s2; gts_surface_foreach_edge (si->s2, (GtsFunc) check_surface_edge, data); } return ok; } /* Given @e and @f returns a #GtsFace compatible with @f and belonging to @s1 or @s2 */ static GtsFace * next_compatible_face (GtsEdge * e, GtsFace * f, GtsSurface * s1, GtsSurface * s2) { GSList * i = e->triangles; GtsFace * f2 = NULL, * f3 = NULL; while (i) { GtsFace * f1 = i->data; if (f1 != f && GTS_IS_FACE (f1)) { if (gts_face_has_parent_surface (f1, s1)) return f1; if (gts_face_has_parent_surface (f1, s2)) { if (f2 == NULL) f2 = f1; else if (f3 == NULL) f3 = f1; else g_assert_not_reached (); /* s2 is a non-manifold surface */ } } i = i->next; } if (f3 == NULL) { if (gts_edge_is_boundary (e, s2)) return NULL; return f2; } g_assert (gts_face_has_parent_surface (f, s1)); if (gts_triangles_are_compatible (GTS_TRIANGLE (f), GTS_TRIANGLE (f2), e)) return f2; return f3; } static void walk_faces (GtsEdge * e, GtsFace * f, GtsSurface * s1, GtsSurface * s2, GtsSurface * s) { GtsFifo * faces = gts_fifo_new (); GtsFifo * edges = gts_fifo_new (); gts_fifo_push (faces, f); gts_fifo_push (edges, e); while ((f = gts_fifo_pop (faces)) && (e = gts_fifo_pop (edges))) { if (!GTS_OBJECT (f)->reserved) { GtsTriangle * t = GTS_TRIANGLE (f); GtsFace * f1; gts_surface_add_face (s, f); GTS_OBJECT (f)->reserved = s; if (t->e1 != e && !GTS_OBJECT (t->e1)->reserved && (f1 = next_compatible_face (t->e1, f, s1, s2))) { gts_fifo_push (faces, f1); gts_fifo_push (edges, t->e1); } if (t->e2 != e && !GTS_OBJECT (t->e2)->reserved && (f1 = next_compatible_face (t->e2, f, s1, s2))) { gts_fifo_push (faces, f1); gts_fifo_push (edges, t->e2); } if (t->e3 != e && !GTS_OBJECT (t->e3)->reserved && (f1 = next_compatible_face (t->e3, f, s1, s2))) { gts_fifo_push (faces, f1); gts_fifo_push (edges, t->e3); } } } gts_fifo_destroy (faces); gts_fifo_destroy (edges); } /** * gts_surface_inter_boolean: * @si: a #GtsSurfaceInter. * @surface: a #GtsSurface. * @op: a #GtsBooleanOperation. * * Adds to @surface the part of the surface described by @si and @op. */ void gts_surface_inter_boolean (GtsSurfaceInter * si, GtsSurface * surface, GtsBooleanOperation op) { GtsSurface * s = NULL; gint orient = 1; GSList * i; g_return_if_fail (si != NULL); g_return_if_fail (surface != NULL); switch (op) { case GTS_1_OUT_2: s = si->s1; orient = 1; break; case GTS_1_IN_2: s = si->s1; orient = -1; break; case GTS_2_OUT_1: s = si->s2; orient = -1; break; case GTS_2_IN_1: s = si->s2; orient = 1; break; default: g_assert_not_reached (); } /* mark edges as belonging to intersection */ g_slist_foreach (si->edges, (GFunc) mark_edge, si); i = si->edges; while (i) { GtsEdge * e = i->data; GSList * j = e->triangles; while (j) { if (gts_face_has_parent_surface (j->data, s) && orient*triangle_orientation (j->data, e) > 0) { #ifdef DEBUG_BOOLEAN GtsFace * boundary = gts_edge_is_boundary (e, surface); g_assert (!boundary || boundary == j->data); #endif /* DEBUG_BOOLEAN */ walk_faces (e, j->data, s, GTS_OBJECT (s)->reserved, surface); break; } j = j->next; } i = i->next; } g_slist_foreach (si->edges, (GFunc) gts_object_reset_reserved, NULL); gts_surface_foreach_face (surface, (GtsFunc) gts_object_reset_reserved, NULL); } static void self_intersecting (GtsBBox * bb1, GtsBBox * bb2, gpointer * d) { GtsTriangle * t1 = bb1->bounded; GtsTriangle * t2 = bb2->bounded; if (t1 != t2) { GtsSegment * s1 = GTS_SEGMENT (t1->e1); GtsSegment * s2 = GTS_SEGMENT (t1->e2); GtsSegment * s3 = GTS_SEGMENT (t1->e3); GtsSegment * s4 = GTS_SEGMENT (t2->e1); GtsSegment * s5 = GTS_SEGMENT (t2->e2); GtsSegment * s6 = GTS_SEGMENT (t2->e3); GtsPoint * pi; if ((!gts_segments_touch (s4, s1) && !gts_segments_touch (s4, s2) && !gts_segments_touch (s4, s3) && (pi = segment_triangle_intersection (s4, t1, gts_point_class ())) != NULL) || (!gts_segments_touch (s5, s1) && !gts_segments_touch (s5, s2) && !gts_segments_touch (s5, s3) && (pi = segment_triangle_intersection (s5, t1, gts_point_class ())) != NULL) || (!gts_segments_touch (s6, s1) && !gts_segments_touch (s6, s2) && !gts_segments_touch (s6, s3) && (pi = segment_triangle_intersection (s6, t1, gts_point_class ())) != NULL)) { GtsBBTreeTraverseFunc func = d[0]; gpointer data = d[1]; gboolean * self_inter = d[2]; gts_object_destroy (GTS_OBJECT (pi)); *self_inter = TRUE; (* func) (bb1, bb2, data); } } } /** * gts_surface_foreach_intersecting_face: * @s: a #GtsSurface. * @func: a #GtsBBTreeTraverseFunc. * @data: user data to pass to @func. * * Calls @func for each intersecting pair of faces of @s. * * Returns: %TRUE if @func was called at least once, %FALSE otherwise. */ gboolean gts_surface_foreach_intersecting_face (GtsSurface * s, GtsBBTreeTraverseFunc func, gpointer data) { GNode * tree; gpointer d[3]; gboolean self_inter = FALSE; g_return_val_if_fail (s != NULL, FALSE); g_return_val_if_fail (func != NULL, FALSE); tree = gts_bb_tree_surface (s); d[0] = func; d[1] = data; d[2] = &self_inter; gts_bb_tree_traverse_overlapping (tree, tree, (GtsBBTreeTraverseFunc) self_intersecting, d); gts_bb_tree_destroy (tree, TRUE); return self_inter; } static void add_intersecting (GtsBBox * bb1, GtsBBox * bb2, GtsSurface * intersected) { gts_surface_add_face (intersected, bb1->bounded); gts_surface_add_face (intersected, bb2->bounded); } /** * gts_surface_is_self_intersecting: * @s: a #GtsSurface. * * Returns: a new #GtsSurface containing the faces of @s which are * self-intersecting or %NULL if no faces of @s are self-intersecting. */ GtsSurface * gts_surface_is_self_intersecting (GtsSurface * s) { GtsSurface * intersected; g_return_val_if_fail (s != NULL, NULL); intersected = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass), s->face_class, s->edge_class, s->vertex_class); if (!gts_surface_foreach_intersecting_face (s, (GtsBBTreeTraverseFunc) add_intersecting, intersected)) { gts_object_destroy (GTS_OBJECT (intersected)); intersected = NULL; } return intersected; } gts-snapshot-121130/src/curvature.c0000644000175100017510000004451412055775440014154 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999-2002 Ray Jones, Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include "gts.h" static gboolean angle_obtuse (GtsVertex * v, GtsFace * f) { GtsEdge * e = gts_triangle_edge_opposite (GTS_TRIANGLE (f), v); GtsVector vec1, vec2; gts_vector_init (vec1, GTS_POINT (v), GTS_POINT (GTS_SEGMENT (e)->v1)); gts_vector_init (vec2, GTS_POINT (v), GTS_POINT (GTS_SEGMENT (e)->v2)); return (gts_vector_scalar (vec1, vec2) < 0.0); } static gboolean triangle_obtuse (GtsVertex * v, GtsFace * f) { GtsEdge * e = gts_triangle_edge_opposite (GTS_TRIANGLE (f), v); return (angle_obtuse (v, f) || angle_obtuse (GTS_SEGMENT (e)->v1, f) || angle_obtuse (GTS_SEGMENT (e)->v2, f)); } static gdouble cotan (GtsVertex * vo, GtsVertex * v1, GtsVertex * v2) { /* cf. Appendix B of [Meyer et al 2002] */ GtsVector u, v; gdouble udotv, denom; gts_vector_init (u, GTS_POINT (vo), GTS_POINT (v1)); gts_vector_init (v, GTS_POINT (vo), GTS_POINT (v2)); udotv = gts_vector_scalar (u, v); denom = sqrt (gts_vector_scalar (u,u)*gts_vector_scalar (v,v) - udotv*udotv); /* denom can be zero if u==v. Returning 0 is acceptable, based on * the callers of this function below. */ if (denom == 0.0) return (0.0); return (udotv/denom); } static gdouble angle_from_cotan (GtsVertex * vo, GtsVertex * v1, GtsVertex * v2) { /* cf. Appendix B and the caption of Table 1 from [Meyer et al 2002] */ GtsVector u, v; gdouble udotv, denom; gts_vector_init (u, GTS_POINT (vo), GTS_POINT (v1)); gts_vector_init (v, GTS_POINT (vo), GTS_POINT (v2)); udotv = gts_vector_scalar (u, v); denom = sqrt (gts_vector_scalar (u,u)*gts_vector_scalar (v,v) - udotv*udotv); /* Note: I assume this is what they mean by using atan2 (). -Ray Jones */ /* tan = denom/udotv = y/x (see man page for atan2) */ return (fabs (atan2 (denom, udotv))); } static gdouble region_area (GtsVertex * v, GtsFace * f) { /* cf. Section 3.3 of [Meyer et al 2002] */ if (gts_triangle_area (GTS_TRIANGLE (f)) == 0.0) return (0.0); if (triangle_obtuse (v, f)) { if (angle_obtuse (v, f)) return (gts_triangle_area (GTS_TRIANGLE (f))/2.0); else return (gts_triangle_area (GTS_TRIANGLE (f))/4.0); } else { GtsEdge * e = gts_triangle_edge_opposite (GTS_TRIANGLE (f), v); return ((cotan (GTS_SEGMENT (e)->v1, v, GTS_SEGMENT (e)->v2)* gts_point_distance2 (GTS_POINT (v), GTS_POINT (GTS_SEGMENT (e)->v2)) + cotan (GTS_SEGMENT (e)->v2, v, GTS_SEGMENT (e)->v1)* gts_point_distance2 (GTS_POINT (v), GTS_POINT (GTS_SEGMENT (e)->v1))) /8.0); } } /** * gts_vertex_mean_curvature_normal: * @v: a #GtsVertex. * @s: a #GtsSurface. * @Kh: the Mean Curvature Normal at @v. * * Computes the Discrete Mean Curvature Normal approximation at @v. * The mean curvature at @v is half the magnitude of the vector @Kh. * * Note: the normal computed is not unit length, and may point either * into or out of the surface, depending on the curvature at @v. It * is the responsibility of the caller of the function to use the mean * curvature normal appropriately. * * This approximation is from the paper: * Discrete Differential-Geometry Operators for Triangulated 2-Manifolds * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr * VisMath '02, Berlin (Germany) * http://www-grail.usc.edu/pubs.html * * Returns: %TRUE if the operator could be evaluated, %FALSE if the * evaluation failed for some reason (@v is boundary or is the * endpoint of a non-manifold edge.) */ gboolean gts_vertex_mean_curvature_normal (GtsVertex * v, GtsSurface * s, GtsVector Kh) { GSList * faces, * edges, * i; gdouble area = 0.0; g_return_val_if_fail (v != NULL, FALSE); g_return_val_if_fail (s != NULL, FALSE); /* this operator is not defined for boundary edges */ if (gts_vertex_is_boundary (v, s)) return (FALSE); faces = gts_vertex_faces (v, s, NULL); g_return_val_if_fail (faces != NULL, FALSE); edges = gts_vertex_fan_oriented (v, s); if (edges == NULL) { g_slist_free (faces); return (FALSE); } i = faces; while (i) { GtsFace * f = i->data; area += region_area (v, f); i = i->next; } g_slist_free (faces); Kh[0] = Kh[1] = Kh[2] = 0.0; i = edges; while (i) { GtsEdge * e = i->data; GtsVertex * v1 = GTS_SEGMENT (e)->v1; GtsVertex * v2 = GTS_SEGMENT (e)->v2; gdouble temp; temp = cotan (v1, v, v2); Kh[0] += temp*(GTS_POINT (v2)->x - GTS_POINT (v)->x); Kh[1] += temp*(GTS_POINT (v2)->y - GTS_POINT (v)->y); Kh[2] += temp*(GTS_POINT (v2)->z - GTS_POINT (v)->z); temp = cotan (v2, v, v1); Kh[0] += temp*(GTS_POINT (v1)->x - GTS_POINT (v)->x); Kh[1] += temp*(GTS_POINT (v1)->y - GTS_POINT (v)->y); Kh[2] += temp*(GTS_POINT (v1)->z - GTS_POINT (v)->z); i = i->next; } g_slist_free (edges); if (area > 0.0) { Kh[0] /= 2*area; Kh[1] /= 2*area; Kh[2] /= 2*area; } else { return (FALSE); } return TRUE; } /** * gts_vertex_gaussian_curvature: * @v: a #GtsVertex. * @s: a #GtsSurface. * @Kg: the Discrete Gaussian Curvature approximation at @v. * * Computes the Discrete Gaussian Curvature approximation at @v. * * This approximation is from the paper: * Discrete Differential-Geometry Operators for Triangulated 2-Manifolds * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr * VisMath '02, Berlin (Germany) * http://www-grail.usc.edu/pubs.html * * Returns: %TRUE if the operator could be evaluated, %FALSE if the * evaluation failed for some reason (@v is boundary or is the * endpoint of a non-manifold edge.) */ gboolean gts_vertex_gaussian_curvature (GtsVertex * v, GtsSurface * s, gdouble * Kg) { GSList * faces, * edges, * i; gdouble area = 0.0; gdouble angle_sum = 0.0; g_return_val_if_fail (v != NULL, FALSE); g_return_val_if_fail (s != NULL, FALSE); g_return_val_if_fail (Kg != NULL, FALSE); /* this operator is not defined for boundary edges */ if (gts_vertex_is_boundary (v, s)) return (FALSE); faces = gts_vertex_faces (v, s, NULL); g_return_val_if_fail (faces != NULL, FALSE); edges = gts_vertex_fan_oriented (v, s); if (edges == NULL) { g_slist_free (faces); return (FALSE); } i = faces; while (i) { GtsFace * f = i->data; area += region_area (v, f); i = i->next; } g_slist_free (faces); i = edges; while (i) { GtsEdge * e = i->data; GtsVertex * v1 = GTS_SEGMENT (e)->v1; GtsVertex * v2 = GTS_SEGMENT (e)->v2; angle_sum += angle_from_cotan (v, v1, v2); i = i->next; } g_slist_free (edges); *Kg = (2.0*M_PI - angle_sum)/area; return TRUE; } /** * gts_vertex_principal_curvatures: * @Kh: mean curvature. * @Kg: Gaussian curvature. * @K1: first principal curvature. * @K2: second principal curvature. * * Computes the principal curvatures at a point given the mean and * Gaussian curvatures at that point. * * The mean curvature can be computed as one-half the magnitude of the * vector computed by gts_vertex_mean_curvature_normal(). * * The Gaussian curvature can be computed with * gts_vertex_gaussian_curvature(). */ void gts_vertex_principal_curvatures (gdouble Kh, gdouble Kg, gdouble * K1, gdouble * K2) { gdouble temp = Kh*Kh - Kg; g_return_if_fail (K1 != NULL); g_return_if_fail (K2 != NULL); if (temp < 0.0) temp = 0.0; temp = sqrt (temp); *K1 = Kh + temp; *K2 = Kh - temp; } /* from Maple */ static void linsolve (gdouble m11, gdouble m12, gdouble b1, gdouble m21, gdouble m22, gdouble b2, gdouble * x1, gdouble * x2) { gdouble temp; temp = 1.0 / (m21*m12 - m11*m22); *x1 = (m12*b2 - m22*b1)*temp; *x2 = (m11*b2 - m21*b1)*temp; } /* from Maple - largest eigenvector of [a b; b c] */ static void eigenvector (gdouble a, gdouble b, gdouble c, GtsVector e) { if (b == 0.0) { e[0] = 0.0; } else { e[0] = -(c - a - sqrt (c*c - 2*a*c + a*a + 4*b*b))/(2*b); } e[1] = 1.0; e[2] = 0.0; } /** * gts_vertex_principal_directions: * @v: a #GtsVertex. * @s: a #GtsSurface. * @Kh: mean curvature normal (a #GtsVector). * @Kg: Gaussian curvature (a gdouble). * @e1: first principal curvature direction (direction of largest curvature). * @e2: second principal curvature direction. * * Computes the principal curvature directions at a point given @Kh * and @Kg, the mean curvature normal and Gaussian curvatures at that * point, computed with gts_vertex_mean_curvature_normal() and * gts_vertex_gaussian_curvature(), respectively. * * Note that this computation is very approximate and tends to be * unstable. Smoothing of the surface or the principal directions may * be necessary to achieve reasonable results. */ void gts_vertex_principal_directions (GtsVertex * v, GtsSurface * s, GtsVector Kh, gdouble Kg, GtsVector e1, GtsVector e2) { GtsVector N; gdouble normKh; GSList * i, * j; GtsVector basis1, basis2, d, eig; gdouble ve2, vdotN; gdouble aterm_da, bterm_da, cterm_da, const_da; gdouble aterm_db, bterm_db, cterm_db, const_db; gdouble a, b, c; gdouble K1, K2; gdouble *weights, *kappas, *d1s, *d2s; gint edge_count; gdouble err_e1, err_e2; int e; /* compute unit normal */ normKh = sqrt (gts_vector_scalar (Kh, Kh)); if (normKh > 0.0) { N[0] = Kh[0] / normKh; N[1] = Kh[1] / normKh; N[2] = Kh[2] / normKh; } else { /* This vertex is a point of zero mean curvature (flat or saddle * point). Compute a normal by averaging the adjacent triangles */ N[0] = N[1] = N[2] = 0.0; i = gts_vertex_faces (v, s, NULL); while (i) { gdouble x, y, z; gts_triangle_normal (GTS_TRIANGLE ((GtsFace *) i->data), &x, &y, &z); N[0] += x; N[1] += y; N[2] += z; i = i->next; } g_return_if_fail (gts_vector_norm (N) > 0.0); gts_vector_normalize (N); } /* construct a basis from N: */ /* set basis1 to any component not the largest of N */ basis1[0] = basis1[1] = basis1[2] = 0.0; if (fabs (N[0]) > fabs (N[1])) basis1[1] = 1.0; else basis1[0] = 1.0; /* make basis2 orthogonal to N */ gts_vector_cross (basis2, N, basis1); gts_vector_normalize (basis2); /* make basis1 orthogonal to N and basis2 */ gts_vector_cross (basis1, N, basis2); gts_vector_normalize (basis1); aterm_da = bterm_da = cterm_da = const_da = 0.0; aterm_db = bterm_db = cterm_db = const_db = 0.0; weights = g_malloc (sizeof (gdouble)*g_slist_length (v->segments)); kappas = g_malloc (sizeof (gdouble)*g_slist_length (v->segments)); d1s = g_malloc (sizeof (gdouble)*g_slist_length (v->segments)); d2s = g_malloc (sizeof (gdouble)*g_slist_length (v->segments)); edge_count = 0; i = v->segments; while (i) { GtsEdge * e; GtsFace * f1, * f2; gdouble weight, kappa, d1, d2; GtsVector vec_edge; if (! GTS_IS_EDGE (i->data)) { i = i->next; continue; } e = i->data; /* since this vertex passed the tests in * gts_vertex_mean_curvature_normal(), this should be true. */ g_assert (gts_edge_face_number (e, s) == 2); /* identify the two triangles bordering e in s */ f1 = f2 = NULL; j = e->triangles; while (j) { if ((! GTS_IS_FACE (j->data)) || (! gts_face_has_parent_surface (GTS_FACE (j->data), s))) { j = j->next; continue; } if (f1 == NULL) f1 = GTS_FACE (j->data); else { f2 = GTS_FACE (j->data); break; } j = j->next; } g_assert (f2 != NULL); /* We are solving for the values of the curvature tensor * B = [ a b ; b c ]. * The computations here are from section 5 of [Meyer et al 2002]. * * The first step is to calculate the linear equations governing * the values of (a,b,c). These can be computed by setting the * derivatives of the error E to zero (section 5.3). * * Since a + c = norm(Kh), we only compute the linear equations * for dE/da and dE/db. (NB: [Meyer et al 2002] has the * equation a + b = norm(Kh), but I'm almost positive this is * incorrect.) * * Note that the w_ij (defined in section 5.2) are all scaled by * (1/8*A_mixed). We drop this uniform scale factor because the * solution of the linear equations doesn't rely on it. * * The terms of the linear equations are xterm_dy with x in * {a,b,c} and y in {a,b}. There are also const_dy terms that are * the constant factors in the equations. */ /* find the vector from v along edge e */ gts_vector_init (vec_edge, GTS_POINT (v), GTS_POINT ((GTS_SEGMENT (e)->v1 == v) ? GTS_SEGMENT (e)->v2 : GTS_SEGMENT (e)->v1)); ve2 = gts_vector_scalar (vec_edge, vec_edge); vdotN = gts_vector_scalar (vec_edge, N); /* section 5.2 - There is a typo in the computation of kappa. The * edges should be x_j-x_i. */ kappa = 2.0 * vdotN / ve2; /* section 5.2 */ /* I don't like performing a minimization where some of the * weights can be negative (as can be the case if f1 or f2 are * obtuse). To ensure all-positive weights, we check for * obtuseness and use values similar to those in region_area(). */ weight = 0.0; if (! triangle_obtuse(v, f1)) { weight += ve2 * cotan (gts_triangle_vertex_opposite (GTS_TRIANGLE (f1), e), GTS_SEGMENT (e)->v1, GTS_SEGMENT (e)->v2) / 8.0; } else { if (angle_obtuse (v, f1)) { weight += ve2 * gts_triangle_area (GTS_TRIANGLE (f1)) / 4.0; } else { weight += ve2 * gts_triangle_area (GTS_TRIANGLE (f1)) / 8.0; } } if (! triangle_obtuse(v, f2)) { weight += ve2 * cotan (gts_triangle_vertex_opposite (GTS_TRIANGLE (f2), e), GTS_SEGMENT (e)->v1, GTS_SEGMENT (e)->v2) / 8.0; } else { if (angle_obtuse (v, f2)) { weight += ve2 * gts_triangle_area (GTS_TRIANGLE (f2)) / 4.0; } else { weight += ve2 * gts_triangle_area (GTS_TRIANGLE (f2)) / 8.0; } } /* projection of edge perpendicular to N (section 5.3) */ d[0] = vec_edge[0] - vdotN * N[0]; d[1] = vec_edge[1] - vdotN * N[1]; d[2] = vec_edge[2] - vdotN * N[2]; gts_vector_normalize (d); /* not explicit in the paper, but necessary. Move d to 2D basis. */ d1 = gts_vector_scalar (d, basis1); d2 = gts_vector_scalar (d, basis2); /* store off the curvature, direction of edge, and weights for later use */ weights[edge_count] = weight; kappas[edge_count] = kappa; d1s[edge_count] = d1; d2s[edge_count] = d2; edge_count++; /* Finally, update the linear equations */ aterm_da += weight * d1 * d1 * d1 * d1; bterm_da += weight * d1 * d1 * 2 * d1 * d2; cterm_da += weight * d1 * d1 * d2 * d2; const_da += weight * d1 * d1 * (- kappa); aterm_db += weight * d1 * d2 * d1 * d1; bterm_db += weight * d1 * d2 * 2 * d1 * d2; cterm_db += weight * d1 * d2 * d2 * d2; const_db += weight * d1 * d2 * (- kappa); i = i->next; } /* now use the identity (Section 5.3) a + c = |Kh| = 2 * kappa_h */ aterm_da -= cterm_da; const_da += cterm_da * normKh; aterm_db -= cterm_db; const_db += cterm_db * normKh; /* check for solvability of the linear system */ if (((aterm_da * bterm_db - aterm_db * bterm_da) != 0.0) && ((const_da != 0.0) || (const_db != 0.0))) { linsolve (aterm_da, bterm_da, -const_da, aterm_db, bterm_db, -const_db, &a, &b); c = normKh - a; eigenvector (a, b, c, eig); } else { /* region of v is planar */ eig[0] = 1.0; eig[1] = 0.0; } /* Although the eigenvectors of B are good estimates of the * principal directions, it seems that which one is attached to * which curvature direction is a bit arbitrary. This may be a bug * in my implementation, or just a side-effect of the inaccuracy of * B due to the discrete nature of the sampling. * * To overcome this behavior, we'll evaluate which assignment best * matches the given eigenvectors by comparing the curvature * estimates computed above and the curvatures calculated from the * discrete differential operators. */ gts_vertex_principal_curvatures (0.5 * normKh, Kg, &K1, &K2); err_e1 = err_e2 = 0.0; /* loop through the values previously saved */ for (e = 0; e < edge_count; e++) { gdouble weight, kappa, d1, d2; gdouble temp1, temp2; gdouble delta; weight = weights[e]; kappa = kappas[e]; d1 = d1s[e]; d2 = d2s[e]; temp1 = fabs (eig[0] * d1 + eig[1] * d2); temp1 = temp1 * temp1; temp2 = fabs (eig[1] * d1 - eig[0] * d2); temp2 = temp2 * temp2; /* err_e1 is for K1 associated with e1 */ delta = K1 * temp1 + K2 * temp2 - kappa; err_e1 += weight * delta * delta; /* err_e2 is for K1 associated with e2 */ delta = K2 * temp1 + K1 * temp2 - kappa; err_e2 += weight * delta * delta; } g_free (weights); g_free (kappas); g_free (d1s); g_free (d2s); /* rotate eig by a right angle if that would decrease the error */ if (err_e2 < err_e1) { gdouble temp = eig[0]; eig[0] = eig[1]; eig[1] = -temp; } e1[0] = eig[0] * basis1[0] + eig[1] * basis2[0]; e1[1] = eig[0] * basis1[1] + eig[1] * basis2[1]; e1[2] = eig[0] * basis1[2] + eig[1] * basis2[2]; gts_vector_normalize (e1); /* make N,e1,e2 a right handed coordinate sytem */ gts_vector_cross (e2, N, e1); gts_vector_normalize (e2); } gts-snapshot-121130/src/fifo.c0000644000175100017510000000753012055775440013054 00000000000000/* GTS - Library for the manipulation of triangulated surfaces * Copyright (C) 1999 Stéphane Popinet * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "gts.h" struct _GtsFifo { GList * head; GList * tail; }; /** * gts_fifo_new: * * Returns: a new #GtsFifo. */ GtsFifo * gts_fifo_new () { GtsFifo * fifo = g_malloc (sizeof (GtsFifo)); fifo->head = fifo->tail = NULL; return fifo; } /** * gts_fifo_write: * @fifo: a #GtsFifo. * @fp: a file pointer. * * Writes the content of @fifo in @fp. */ void gts_fifo_write (GtsFifo * fifo, FILE * fp) { GList * i; g_return_if_fail (fifo != NULL); g_return_if_fail (fp != NULL); fprintf (fp, "["); i = fifo->head; while (i) { fprintf (fp, "%p ", i->data); i = i->next; } fprintf (fp, "]"); } /** * gts_fifo_push: * @fifo: a #GtsFifo. * @data: data to add to @fifo. * * Push @data into @fifo. */ void gts_fifo_push (GtsFifo * fifo, gpointer data) { g_return_if_fail (fifo != NULL); fifo->head = g_list_prepend (fifo->head, data); if (fifo->tail == NULL) fifo->tail = fifo->head; } /** * gts_fifo_pop: * @fifo: a #GtsFifo. * * Removes the first element from @fifo. * * Returns: the first element in @fifo or %NULL if @fifo is empty. */ gpointer gts_fifo_pop (GtsFifo * fifo) { gpointer data; GList * tail; g_return_val_if_fail (fifo != NULL, NULL); if (fifo->tail == NULL) return NULL; tail = fifo->tail->prev; data = fifo->tail->data; fifo->head = g_list_remove_link (fifo->head, fifo->tail); g_list_free_1 (fifo->tail); fifo->tail = tail; return data; } /** * gts_fifo_top: * @fifo: a #GtsFifo. * * Returns: the first element in @fifo or %NULL if @fifo is empty. */ gpointer gts_fifo_top (GtsFifo * fifo) { g_return_val_if_fail (fifo != NULL, NULL); if (fifo->tail == NULL) return NULL; return fifo->tail->data; } /** * gts_fifo_size: * @fifo: a #GtsFifo. * * Returns: the number of elements in @fifo. */ guint gts_fifo_size (GtsFifo * fifo) { g_return_val_if_fail (fifo != NULL, 0); return g_list_length (fifo->head); } /** * gts_fifo_destroy: * @fifo: a #GtsFifo. * * Frees all the memory allocated for @fifo. */ void gts_fifo_destroy (GtsFifo * fifo) { g_return_if_fail (fifo != NULL); g_list_free (fifo->head); g_free (fifo); } /** * gts_fifo_is_empty: * @fifo: a #GtsFifo. * * Returns: %TRUE if @fifo is empty, %FALSE otherwise. */ gboolean gts_fifo_is_empty (GtsFifo * fifo) { g_return_val_if_fail (fifo != NULL, TRUE); return (fifo->head == NULL); } /** * gts_fifo_foreach: * @fifo: a #GtsFifo. * @func: a #GtsFunc. * @data: user data to be passed to @func. * * Calls @func in order for each item in @fifo, passing @data. */ void gts_fifo_foreach (GtsFifo * fifo, GtsFunc func, gpointer data) { GList * i; g_return_if_fail (fifo != NULL); g_return_if_fail (func != NULL); i = fifo->tail; while (i) { (* func) (i->data, data); i = i->prev; } } /** * gts_fifo_reverse: * @fifo: a #GtsFifo. * * Reverses the order of elements in @fifo. */ void gts_fifo_reverse (GtsFifo * fifo) { g_return_if_fail (fifo != NULL); fifo->tail = fifo->head; fifo->head = g_list_reverse (fifo->head); } gts-snapshot-121130/config.sub0000755000175100017510000010316712055775445013171 00000000000000#! /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: gts-snapshot-121130/gts.pc.in0000644000175100017510000000040412055775440012715 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: GTS Description: GNU Triangulated Surface Library Version: @VERSION@ Requires: glib-2.0,gthread-2.0,gmodule-2.0 Libs: -L${libdir} @LIBS@ -lgts -lm Cflags: -I${includedir} gts-snapshot-121130/TODO0000644000175100017510000000172512055775440011666 00000000000000This is a non-exhaustive list of things to do. - cleanup dual isosurface stuff by "Tim F" - paper doc - cleanup of GHashTable hack in cdt.c. - Specialized hash tables for surface->triangles? - Error status when reading GTS file. (done) - Homogeneous coordinates? - Boolean operations: check problems for some degenerate cases. - More generic interface for gts_surface_inter_new(). - Tutorial for the creation of new GtsObject classes. - Implicit dependencies for hierarchical surfaces. - More generic interface for isosurface computation (user-control of vertex generation). - GtsContainer class? (half-done) - Graph partitioning * optimisation BKL -> BKL(1,*) (Karypis & Kumar) * k-way partitioning * bug for memplus.graph, add20.graph - Doc: private fields of structures. - Include Volodymyr Babin's gts-iso-toy code. - Apply Norman Vine cygwin patch - Apply Patch for gts_triangles_angle - change gts_file_close() to gts_file_destroy() (patch Ray Jones). gts-snapshot-121130/doc/0000755000175100017510000000000012055775530012016 500000000000000gts-snapshot-121130/doc/html/0000755000175100017510000000000012055775530012762 500000000000000gts-snapshot-121130/doc/Makefile.in0000644000175100017510000004353312055775445014020 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_FILES = 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 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ SUBDIRS = manpages # The name of the module. DOC_MODULE = gts # The top-level SGML file. DOC_MAIN_SGML_FILE = gts-docs.sgml # The directory containing the source code (if it contains documentation). DOC_SOURCE_DIR = ../src TARGET_DIR = html/$(DOC_MODULE) EXTRA_DIST = html all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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'; \ $(am__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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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; \ ($(am__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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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 "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: 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: 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-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-local ctags ctags-recursive distclean 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 installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am scan: gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="predicates.h gts-private.h rounding.h" templates: scan gtkdoc-mktmpl --module=$(DOC_MODULE) sgml: gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) html: if ! test -d html ; then mkdir html ; fi -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) clean-local: rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt maintainer-clean-local: clean rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt .PHONY : html sgml templates scan # 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: gts-snapshot-121130/doc/Makefile.am0000644000175100017510000000215012055775440013770 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = manpages # The name of the module. DOC_MODULE=gts # The top-level SGML file. DOC_MAIN_SGML_FILE=gts-docs.sgml # The directory containing the source code (if it contains documentation). DOC_SOURCE_DIR=../src TARGET_DIR=html/$(DOC_MODULE) EXTRA_DIST=html scan: gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="predicates.h gts-private.h rounding.h" templates: scan gtkdoc-mktmpl --module=$(DOC_MODULE) sgml: gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) html: if ! test -d html ; then mkdir html ; fi -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) clean-local: rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt maintainer-clean-local: clean rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt ## install-data-local: ## install -d -m 0755 $(TARGET_DIR) ## install -m 0644 html/*.html $(TARGET_DIR) ## install -m 0644 html/index.sgml $(TARGET_DIR) ## gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR) .PHONY : html sgml templates scan gts-snapshot-121130/doc/manpages/0000755000175100017510000000000012055775530013611 500000000000000gts-snapshot-121130/doc/manpages/transform.10000644000175100017510000000307312055775440015631 00000000000000.TH transform 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME transform \- apply geometric transformations to the input. .SH SYNOPSIS .B transform .RI [\| OPTIONS \|]\ <\ file.gts .SH DESCRIPTION This manual page documents briefly the .B transform command. .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BI \-r\ ANGLE\fR,\ \-\-rx= ANGLE Rotate around x-axis .RI ( ANGLE in degrees). .TP .BI \-m\ ANGLE\fR,\ \-\-ry= ANGLE Rotate around y-axis. .TP .BI \-m\ ANGLE\fR,\ \-\-rz= ANGLE Rotate around z-axis. .TP .BI \-s\ FACTOR\fR,\ \-\-scale= FACTOR Scale by .IR FACTOR . .TP .BI \-R\ FACTOR\fR,\ \-\-sx= FACTOR Scale x-axis by .IR FACTOR . .TP .BI \-M\ FACTOR\fR,\ \-\-sy= FACTOR Scale y-axis by .IR FACTOR . .TP .BI \-N\ FACTOR\fR,\ \-\-sz= FACTOR Scale z-axis by .IR FACTOR . .TP .BI \-t\ V\fR,\ \-\-tx= V Translate of .I V along x-axis. .TP .BI \-u\ V\fR,\ \-\-ty= V Translate of .I V along y-axis. .TP .BI \-w\ V\fR,\ \-\-tz= V Translate of .I V along z-axis. .TP .BR \-i ,\ \-\-revert Turn surface inside out. .TP .BR \-o ,\ \-\-normalize Fit the resulting surface in a cube of size 1 centered at the origin. .TP .BR \-v ,\ \-\-verbose Print statistics about the surface. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR transform was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/happrox.10000644000175100017510000000260212055775440015274 00000000000000.TH happrox 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME happrox \- returns a simplified triangulation of a set of points using algorithm III of Garland and Heckbert (1995). .SH SYNOPSIS .B happrox .RI [\| OPTIONS \|]\ <\ [\| input.pgm | input \|]\ >\ output.gts .SH DESCRIPTION This manual page documents briefly the .B happrox command. .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BI \-n\ N\fR,\ \-\-number= N Stop the refinement process if the number of vertices is larger than \fIN\fR. .TP .BI \-c\ C\fR,\ \-\-cost= C Stop the refinement process if the cost of insertion of a vertex is smaller than \fIC\fR. .TP .BR \-f ,\ \-\-flat Input is a flat file with three x,y,z columns (default is PGM file). .TP .BI \-r\ Z\fR,\ \-\-relative= Z Use relative height cost for all heights larger than \fIZ\fR. .TP .BR \-k ,\ \-\-keep Keep enclosing triangle. .TP .BR \-C ,\ \-\-closed Close the surface. .TP .BR \-l ,\ \-\-log Log evolution of cost. .TP .BR \-v ,\ \-\-verbose Display surface statistics. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR happrox was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/gtscheck.10000644000175100017510000000200012055775440015376 00000000000000.TH gtscheck 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gtscheck \- checks that a surface defines a closed, orientable non self-intersecting manifold. .SH SYNOPSIS .B gtscheck .RI [\| OPTION \|]\ <\ FILE .SH DESCRIPTION This manual page documents briefly the .B gtscheck command. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-v ,\ \-\-verbose Print statistics about the surface. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH EXIT STATUS The return status reflects the error encountered: .B 0 none .B 1 the input file is not a valid GTS file .B 2 the surface is not an orientable manifold .B 3 the surface is an orientable manifold but is self-intersecting .SH AUTHOR gtscheck was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/Makefile.in0000644000175100017510000003310212055775445015602 00000000000000# Makefile.in generated by automake 1.11.1 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@ 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@ subdir = doc/manpages DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.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 = CONFIG_CLEAN_VPATH_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 = 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' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(dist_man_MANS) 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@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_DEPLIBS = @GLIB_DEPLIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@ GTS_MICRO_VERSION = @GTS_MICRO_VERSION@ GTS_MINOR_VERSION = @GTS_MINOR_VERSION@ GTS_VERSION = @GTS_VERSION@ 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_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ 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@ PKG_CONFIG = @PKG_CONFIG@ 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@ glib_cflags = @glib_cflags@ glib_libs = @glib_libs@ glib_module_cflags = @glib_module_cflags@ glib_module_libs = @glib_module_libs@ glib_thread_cflags = @glib_thread_cflags@ glib_thread_libs = @glib_thread_libs@ 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@ 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@ dist_man_MANS = \ delaunay.1 \ gts2dxf.1 \ gts2oogl.1 \ gts2stl.1 \ gtscheck.1 \ gtscompare.1 \ gts-config.1 \ gtstemplate.1 \ happrox.1 \ stl2gts.1 \ transform.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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/manpages/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/manpages/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @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 check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; 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) -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-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-man 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-man1 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-man uninstall-man: uninstall-man1 .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-man install-man1 \ 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-man uninstall-man1 # 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: gts-snapshot-121130/doc/manpages/gts2dxf.10000644000175100017510000000072412055775440015177 00000000000000.TH gts2dxf 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gts2dxf \- converts a GTS file to DXF format. .SH SYNOPSIS .B gts2dxf .RI <\ input.gts\ >\ output.dxf .SH DESCRIPTION This manual page documents briefly the .B gts2dxf command. .SH AUTHOR gts2dxf was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/gtstemplate.10000644000175100017510000000136312055775440016147 00000000000000.TH gtstemplate 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gtstemplate \- generates of a template used to create new object classes. .SH SYNOPSIS .B gtstemplate .RI [\| OPTIONS \|]\ [\| LIBRARIES \|] .SH DESCRIPTION This manual page documents briefly the .B gtstemplate command. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .B \-\-no-extra-data .TP .B \-\-no-extra-method .TP .BI \-\-overload= METHOD .SH AUTHOR gtstemplate was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/gtscompare.10000644000175100017510000000225712055775440015765 00000000000000.TH gtscompare 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gtscompare \- compare two GTS files. .SH SYNOPSIS .B gtscompare .RI [\| OPTIONS \|] .I FILE1 FILE2 DELTA .SH DESCRIPTION This manual page documents briefly the .B gtscompare command. .I DELTA is the sampling length expressed as a fraction of the bounding box diagonal of the second surface. .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-s ,\ \-\-symmetric Symmetric statistics. .TP .BR \-i ,\ \-\-image Output visualisation mesh. .TP .BI \-c\ FILE\fR,\ \-\-cmap= FILE Load .I FILE as colormap. .TP .BI \-m\ VAL\fR,\ \-\-min= VAL Use .I VAL as minimum scaling value. .TP .BI \-M\ VAL\fR,\ \-\-max= VAL Use .I VAL as maximum scaling value. .TP .BR \-r ,\ \-\-reverse Reverse colormap. .TP .BR \-l ,\ \-\-log Use log scale. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR gtscompare was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/Makefile.am0000644000175100017510000000025612055775440015570 00000000000000dist_man_MANS = \ delaunay.1 \ gts2dxf.1 \ gts2oogl.1 \ gts2stl.1 \ gtscheck.1 \ gtscompare.1 \ gts-config.1 \ gtstemplate.1 \ happrox.1 \ stl2gts.1 \ transform.1 gts-snapshot-121130/doc/manpages/gts-config.10000644000175100017510000000152512055775440015656 00000000000000.TH gts-config 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gts-config \- defines values for programs using gts. .SH SYNOPSIS .B gts-config .RI [\| OPTIONS \|]\ [\| LIBRARIES \|] .SH DESCRIPTION This manual page documents briefly the .B gts-config command. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BI \-\-prefix\fR[\|= DIR \fR\|] .TP .BI \-\-exec-prefix\fR[\|= DIR \fR\|] .TP .B \-\-version .TP .B \-\-libs .TP .B \-\-cflags .TP .B \-\-check .SH LIBRARIES .TP .B gts .TP .B gmodule .TP .B gthread .SH AUTHOR gts-config was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/stl2gts.10000644000175100017510000000152212055775440015215 00000000000000.TH stl2gts 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME stl2gts \- convert an STL file to GTS format. .SH SYNOPSIS .B stl2gts .RI [\| OPTIONS \|]\ <\ input.stl\ >\ output.gts .SH DESCRIPTION This manual page documents briefly the .B stl2gts command. .SH OPTIONS These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-r ,\ \-\-revert Revert face normals. .TP .BR \-n ,\ \-\-nomerge Do not merge vertices. .TP .BR \-v ,\ \-\-verbose Display surface statistics. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR stl2gts was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/delaunay.10000644000175100017510000000316712055775440015424 00000000000000.TH delaunay 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME delaunay \- constructs the constrained Delaunay triangulation of the input .SH SYNOPSIS .B delaunay .RI [\| OPTIONS \|]\ <\ file.gts .SH DESCRIPTION This manual page documents briefly the .B delaunay command. This command constructs the constrained Delaunay triangulation of the input .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-b ,\ \-\-hull Do not keep convex hull. .TP .BR \-e ,\ \-\-noconst Do not add constrained edges. .TP .BR \-S ,\ \-\-split Split constraints (experimental). .TP .BR \-H ,\ \-\-holes Remove holes from the triangulation. .TP .BR \-d ,\ \-\-duplicates Remove duplicate vertices. .TP .BR \-r ,\ \-\-randomize Shuffle input vertex list. .TP .BR \-c ,\ \-\-check Check Delaunay property. .TP .BI \-f\ FNAME\fR,\ \-\-files= FNAME Generate evolution files. .TP .BR \-o ,\ \-\-conform Generate conforming triangulation. .TP .BI \-s\ N\fR,\ \-\-steiner= N Maximum number of Steiner points for conforming triangulation (default is no limit). .TP .BI \-q\ Q\fR,\ \-\-quality= Q Set the minimum acceptable face quality. .TP .BI \-a\ A\fR,\ \-\-area= A Set the maximum acceptable face area. .TP .BR \-v ,\ \-\-verbose Print statistics about the triangulation. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR delaunay was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/gts2stl.10000644000175100017510000000143512055775440015220 00000000000000.TH gts2stl 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gts2stl \- converts a GTS file to STL format .SH SYNOPSIS .B gts2stl .RI [\| OPTIONS \|]\ <\ input.gts\ >\ output.stl .SH DESCRIPTION This manual page documents briefly the .B gts2stl command. .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-r ,\ \-\-revert Revert face normals. .TP .BR \-v ,\ \-\-verbose Display surface statistics. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR gts2stl was written by Stephane Popinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/doc/manpages/gts2oogl.10000644000175100017510000000440412055775440015355 00000000000000.TH gts2oogl 1 "June 2, 2008" "" "GNU Triangulated Surface utils" .SH NAME gts2oogl \- converts a GTS file to OOGL file format (Geomview). .SH SYNOPSIS .B gts2oogl .RI [\| OPTIONS \|]\ <\ input.srf\ >\ output.oogl .SH DESCRIPTION This manual page documents briefly the .B gts2oogl command. .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-G ,\ \-\-gnuplot Writes isolines in gnuplot format. .TP .B \-\-component Color faces according to the component they belong too. .TP .B \-\-quality Color faces according to their quality. .TP .B \-\-area Color faces according to their area. .TP .B \-\-incomp Color incompatible faces. .TP .BI \-f\ VAL\fR,\ \-\-fold= VAL Color faces which make an angle smaller than .I VAL degrees with any of their neighbors. .TP .BR \-t ,\ \-\-faces Output individual faces. .TP .B \-\-epv Color vertices according to number of edges per vertex. .TP .BI \-H\ C\fR,\ \-\-height= C Color vertices according to their .I C coordinate. .TP .BR \-g ,\ \-\-gaussian Color vertices according to Gaussian curvature. .TP .BR \-C ,\ \-\-curvature Color vertices according to mean curvature. .TP .B \-\-boundary Output boundary edges. .TP .BI \-e\ A\fR,\ \-\-feature= A Output `feature' edges defined by angle \fIA\fR. .TP .B \-\-non-manifold Output non-manifold edges. .TP .B \-\-duplicate Output duplicate edges. .TP .BI \-i\ N\fR,\ \-\-isolines= N Draw .I N isolines (levels of constant altitude). .TP .BI \-I\ L\fR,\ \-\-isolines= L Draw isoline at level \fIL\fR. .TP .BI \-\-cmap= FILE Load .I FILE as colormap. .TP .BI \-m\ VAL\fR,\ \-\-min= VAL Use .I VAL as minimum scaling value. .TP .BI \-M\ VAL\fR,\ \-\-max= VAL Use .I VAL as maximum scaling value. .TP .BR \-r ,\ \-\-reverse Reverse colormap. .TP .BR \-n ,\ \-\-nosurface Do not output surface. .TP .BI \-F\ C\fR,\ \-\-flatten= C Set .I C coordinate to average value. .TP .BR \-v ,\ \-\-verbose Display surface statistics. .TP .BR \-h ,\ \-\-help Display the help and exit. .SH AUTHOR gts2oogl was written by Stephane Pipinet . .PP This manual page was written by Ruben Molina , for the Debian project (but may be used by others). gts-snapshot-121130/THANKS0000644000175100017510000000072012055775440012103 00000000000000GTS would not have been as good :) without the contributions of the following people (in random order): Mike Loehr Bertrand Petit Jose Miguel Espadero Jordi Rovira i Bonet Sergey Y. Kazakov Florian Hars Peter Lindstrom Martin Herren Navneet Dalal Thomas Binder Helmut Cantzler Johannes Beigel Darie Aron Gary Van Sickle Ray Jones Olivier Parisy Mashhuda Glencross John (EBo) David Jerome Benoit Curtis Olson Kai Huettemann Magnus Sirvio Gene Ressler Omar Cornut