dime/0040755017777301777730000000000007733212517010307 5ustar wwwwwwdime/AUTHORS0100644017777301777730000000006007057751226011354 0ustar wwwwwwAUTHORS ======= Peder Blekken dime/COPYING0100644017777301777730000004321406763254773011357 0ustar wwwwwwGNU GENERAL PUBLIC LICENSE ========================== Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble ======== The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software -- to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION =============================================================== 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY =========== 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs ============================================= If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author. Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. dime/ChangeLog0100644017777301777730000003065007163705310012055 0ustar wwwwwwChangeLog ========= This is the ChangeLog file for the . module. This file is automatically generated every night. Entries are in reversed chronological order. See http://www.red-bean.com/~kfogel/cvs2cl.shtml for information about the cvs2cl script used to generate this file. ============================================================================ 2000-09-25 19:26 pederb * src/entities/Entity.cpp: Added documentation on how to create new entities. 2000-09-25 18:46 pederb * src/: Model.cpp, util/MemHandler.cpp: Added some documentation about the memory handler. 2000-09-25 18:29 pederb * include/dime/entities/Entity.h: Typofix. 2000-09-25 18:17 pederb * include/dime/Base.h, include/dime/Model.h, include/dime/entities/Entity.h, src/Base.cpp, src/Model.cpp: Added (empty) constructor and destructor for the base class. Suggested by Thomas Krebs. 2000-08-29 11:42 pederb * TODO, autogen.sh, configure.in, src/Makefile.am: Removed TODO item that won't be done. Removed version number from library name. Misc. cosmetic changes. Patch by larsa. 2000-08-18 11:00 pederb * FAQ: New faq items. By larsa. 2000-08-15 16:18 pederb * build-tmake/: makefile, mt.pro: Added tmake mt project. By kintel. 2000-08-04 12:00 pederb * dxf2vrml/dxf2vrml.cpp, include/dime/Basic.h, include/dime/Layer.h, include/dime/entities/Arc.h, include/dime/entities/Circle.h, include/dime/entities/Entity.h, include/dime/entities/FaceEntity.h, include/dime/entities/LWPolyline.h, include/dime/entities/Line.h, include/dime/entities/Point.h, include/dime/entities/Polyline.h, src/Input.cpp, src/Layer.cpp, src/entities/Arc.cpp, src/entities/Circle.cpp, src/entities/Entity.cpp, src/entities/FaceEntity.cpp, src/entities/LWPolyline.cpp, src/entities/Line.cpp, src/entities/Point.cpp, src/entities/Polyline.cpp, src/entities/Solid.cpp, src/entities/Trace.cpp: Miscellaneous fixes by Thomas Krebs . Several float to dxfdouble fixes. Some casting fixes to avoid compiler warnings. Fixed two ugly range checking bugs in Input.cpp. 2000-08-04 11:41 pederb * ChangeLog.sh: changelog script 2000-07-06 11:51 pederb * include/dime/RecordHolder.h, src/RecordHolder.cpp: Added methods to access records stored in record holder. Missing functionality reported by Rick Lowe 2000-06-19 20:50 pederb * include/dime/Basic.h: Fixed ugly macro bug in ARRAY_NEW. Bug reported by Rick Lowe 2000-05-31 17:58 pederb * include/dime/tables/LayerTable.h, include/dime/util/Linear.h, src/tables/LayerTable.cpp: Fixed problems reported by Rick Lowe (rlowe@osii.com). Eliminated a warning in SbLinear.h, and rewrote dimeLayerTable to make it possible to create and write layers correctly. 2000-05-05 13:39 pederb * ChangeLog.sh: Added ChangeLog.sh script 2000-05-05 13:38 pederb * src/entities/Insert.cpp: Added callback for INSERT entity when traversing without exploding inserts. Patch by Rick Lowe 2000-05-03 18:00 pederb * include/dime/Basic.h, include/dime/RecordHolder.h, src/RecordHolder.cpp: Added function to set indexed records (needed when several records with the same group code exists) 2000-04-18 16:57 pederb * src/entities/Arc.cpp: bugfix in extractGeometry. Patch by Andreas 2000-03-03 15:56 pederb * AUTHORS, NEWS, depcomp: Added files needed for libtool 1.3.4. By larsa 2000-03-03 15:23 pederb * autogen.sh, configure.in: Upgrade to libtool 1.3.4 and automake 1.4 (with depcomp). By larsa 2000-02-22 15:27 pederb * include/dime/entities/Vertex.h, include/dime/util/Array.h, src/util/Linear.cpp: misc. changes to compile under HPUX. By kintel. 2000-02-04 11:06 pederb * build-tmake/makefile: makefile patch by kintel 2000-02-03 14:09 pederb * src/: entities/Block.cpp, entities/Entity.cpp, entities/Insert.cpp, entities/LWPolyline.cpp, entities/Polyline.cpp, sections/BlocksSection.cpp, sections/EntitiesSection.cpp, sections/UnknownSection.cpp: Misc. cleanup 2000-02-03 14:08 pederb * include/dime/Input.h, src/Input.cpp: Fix to support (illegal?) binary files with 16bit groupcodes 2000-01-31 12:05 pederb * include/dime/RecordHolder.h, include/dime/entities/Entity.h, src/Output.cpp, src/RecordHolder.cpp, src/entities/Entity.cpp, src/entities/Polyline.cpp, src/entities/Vertex.cpp, src/sections/Section.cpp: Various export fixed to humour AutoCad import routines 1999-12-10 17:04 pederb * FAQ, TODO, include/dime/Input.h, src/Input.cpp: added beta-support for binary DXF 1999-12-10 17:02 pederb * INSTALL: updated INSTALL file 1999-10-07 16:37 pederb * autogen.sh: automake --include-deps fix 1999-10-07 15:00 pederb * Makefile.am, TODO, autogen.sh, configure.in, dxf2vrml/Makefile.am, dxf2vrml/makefile, dxf2vrml/makefile.generic, src/Makefile.am, src/classes/Makefile.am, src/entities/Makefile.am, src/objects/Makefile.am, src/records/Makefile.am, src/sections/Makefile.am, src/tables/Makefile.am, src/util/Makefile.am: Initial development of autoconf-based build process. mortene 1999-09-01 18:53 root * ANNOUNCEMENT.news, COPYING, FAQ, INSTALL, README, TODO, info.cvs, build-tmake/common.pro, build-tmake/dime.pro, build-tmake/makefile, build-tmake/release.pro, contrib/README, contrib/dime.dsw, contrib/dime.mcp, contrib/dxf2vrml.dsw, contrib/dxf2vrml.mcp, docs/dime.dox, docs/doxyfooter.html, docs/doxyheader.html, dxf2vrml/dxf2vrml.cpp, dxf2vrml/makefile, include/dime/Base.h, include/dime/Basic.h, include/dime/Input.h, include/dime/Layer.h, include/dime/Model.h, include/dime/Output.h, include/dime/RecordHolder.h, include/dime/State.h, include/dime/classes/Class.h, include/dime/classes/UnknownClass.h, include/dime/entities/3DFace.h, include/dime/entities/Arc.h, include/dime/entities/Block.h, include/dime/entities/Circle.h, include/dime/entities/Ellipse.h, include/dime/entities/Entity.h, include/dime/entities/ExtrusionEntity.h, include/dime/entities/FaceEntity.h, include/dime/entities/Insert.h, include/dime/entities/LWPolyline.h, include/dime/entities/Line.h, include/dime/entities/Point.h, include/dime/entities/Polyline.h, include/dime/entities/Solid.h, include/dime/entities/Spline.h, include/dime/entities/Trace.h, include/dime/entities/UnknownEntity.h, include/dime/entities/Vertex.h, include/dime/objects/Object.h, include/dime/objects/UnknownObject.h, include/dime/records/DoubleRecord.h, include/dime/records/FloatRecord.h, include/dime/records/HexRecord.h, include/dime/records/Int16Record.h, include/dime/records/Int32Record.h, include/dime/records/Int8Record.h, include/dime/records/Record.h, include/dime/records/StringRecord.h, include/dime/sections/BlocksSection.h, include/dime/sections/ClassesSection.h, include/dime/sections/EntitiesSection.h, include/dime/sections/HeaderSection.h, include/dime/sections/ObjectsSection.h, include/dime/sections/Section.h, include/dime/sections/TablesSection.h, include/dime/sections/UnknownSection.h, include/dime/tables/LayerTable.h, include/dime/tables/Table.h, include/dime/tables/TableEntry.h, include/dime/tables/UCSTable.h, include/dime/tables/UnknownTable.h, include/dime/util/Array.h, include/dime/util/BSPTree.h, include/dime/util/Box.h, include/dime/util/Dict.h, include/dime/util/Linear.h, include/dime/util/MemHandler.h, src/Base.cpp, src/Basic.cpp, src/Input.cpp, src/Layer.cpp, src/Model.cpp, src/Output.cpp, src/RecordHolder.cpp, src/State.cpp, src/classes/Class.cpp, src/classes/UnknownClass.cpp, src/entities/3DFace.cpp, src/entities/Arc.cpp, src/entities/Block.cpp, src/entities/Circle.cpp, src/entities/Ellipse.cpp, src/entities/Entity.cpp, src/entities/ExtrusionEntity.cpp, src/entities/FaceEntity.cpp, src/entities/Insert.cpp, src/entities/LWPolyline.cpp, src/entities/Line.cpp, src/entities/Point.cpp, src/entities/Polyline.cpp, src/entities/Solid.cpp, src/entities/Spline.cpp, src/entities/Trace.cpp, src/entities/UnknownEntity.cpp, src/entities/Vertex.cpp, src/objects/Object.cpp, src/objects/UnknownObject.cpp, src/records/DoubleRecord.cpp, src/records/FloatRecord.cpp, src/records/HexRecord.cpp, src/records/Int16Record.cpp, src/records/Int32Record.cpp, src/records/Int8Record.cpp, src/records/Record.cpp, src/records/StringRecord.cpp, src/sections/BlocksSection.cpp, src/sections/ClassesSection.cpp, src/sections/EntitiesSection.cpp, src/sections/HeaderSection.cpp, src/sections/ObjectsSection.cpp, src/sections/Section.cpp, src/sections/TablesSection.cpp, src/sections/UnknownSection.cpp, src/tables/LayerTable.cpp, src/tables/Table.cpp, src/tables/TableEntry.cpp, src/tables/UCSTable.cpp, src/tables/UnknownTable.cpp, src/util/Array.cpp, src/util/BSPTree.cpp, src/util/Box.cpp, src/util/Dict.cpp, src/util/Linear.cpp, src/util/MemHandler.cpp: Initial revision 1999-09-01 18:53 root * ANNOUNCEMENT.news, COPYING, FAQ, INSTALL, README, TODO, info.cvs, build-tmake/common.pro, build-tmake/dime.pro, build-tmake/makefile, build-tmake/release.pro, contrib/README, contrib/dime.dsw, contrib/dime.mcp, contrib/dxf2vrml.dsw, contrib/dxf2vrml.mcp, docs/dime.dox, docs/doxyfooter.html, docs/doxyheader.html, dxf2vrml/dxf2vrml.cpp, dxf2vrml/makefile, include/dime/Base.h, include/dime/Basic.h, include/dime/Input.h, include/dime/Layer.h, include/dime/Model.h, include/dime/Output.h, include/dime/RecordHolder.h, include/dime/State.h, include/dime/classes/Class.h, include/dime/classes/UnknownClass.h, include/dime/entities/3DFace.h, include/dime/entities/Arc.h, include/dime/entities/Block.h, include/dime/entities/Circle.h, include/dime/entities/Ellipse.h, include/dime/entities/Entity.h, include/dime/entities/ExtrusionEntity.h, include/dime/entities/FaceEntity.h, include/dime/entities/Insert.h, include/dime/entities/LWPolyline.h, include/dime/entities/Line.h, include/dime/entities/Point.h, include/dime/entities/Polyline.h, include/dime/entities/Solid.h, include/dime/entities/Spline.h, include/dime/entities/Trace.h, include/dime/entities/UnknownEntity.h, include/dime/entities/Vertex.h, include/dime/objects/Object.h, include/dime/objects/UnknownObject.h, include/dime/records/DoubleRecord.h, include/dime/records/FloatRecord.h, include/dime/records/HexRecord.h, include/dime/records/Int16Record.h, include/dime/records/Int32Record.h, include/dime/records/Int8Record.h, include/dime/records/Record.h, include/dime/records/StringRecord.h, include/dime/sections/BlocksSection.h, include/dime/sections/ClassesSection.h, include/dime/sections/EntitiesSection.h, include/dime/sections/HeaderSection.h, include/dime/sections/ObjectsSection.h, include/dime/sections/Section.h, include/dime/sections/TablesSection.h, include/dime/sections/UnknownSection.h, include/dime/tables/LayerTable.h, include/dime/tables/Table.h, include/dime/tables/TableEntry.h, include/dime/tables/UCSTable.h, include/dime/tables/UnknownTable.h, include/dime/util/Array.h, include/dime/util/BSPTree.h, include/dime/util/Box.h, include/dime/util/Dict.h, include/dime/util/Linear.h, include/dime/util/MemHandler.h, src/Base.cpp, src/Basic.cpp, src/Input.cpp, src/Layer.cpp, src/Model.cpp, src/Output.cpp, src/RecordHolder.cpp, src/State.cpp, src/classes/Class.cpp, src/classes/UnknownClass.cpp, src/entities/3DFace.cpp, src/entities/Arc.cpp, src/entities/Block.cpp, src/entities/Circle.cpp, src/entities/Ellipse.cpp, src/entities/Entity.cpp, src/entities/ExtrusionEntity.cpp, src/entities/FaceEntity.cpp, src/entities/Insert.cpp, src/entities/LWPolyline.cpp, src/entities/Line.cpp, src/entities/Point.cpp, src/entities/Polyline.cpp, src/entities/Solid.cpp, src/entities/Spline.cpp, src/entities/Trace.cpp, src/entities/UnknownEntity.cpp, src/entities/Vertex.cpp, src/objects/Object.cpp, src/objects/UnknownObject.cpp, src/records/DoubleRecord.cpp, src/records/FloatRecord.cpp, src/records/HexRecord.cpp, src/records/Int16Record.cpp, src/records/Int32Record.cpp, src/records/Int8Record.cpp, src/records/Record.cpp, src/records/StringRecord.cpp, src/sections/BlocksSection.cpp, src/sections/ClassesSection.cpp, src/sections/EntitiesSection.cpp, src/sections/HeaderSection.cpp, src/sections/ObjectsSection.cpp, src/sections/Section.cpp, src/sections/TablesSection.cpp, src/sections/UnknownSection.cpp, src/tables/LayerTable.cpp, src/tables/Table.cpp, src/tables/TableEntry.cpp, src/tables/UCSTable.cpp, src/tables/UnknownTable.cpp, src/util/Array.cpp, src/util/BSPTree.cpp, src/util/Box.cpp, src/util/Dict.cpp, src/util/Linear.cpp, src/util/MemHandler.cpp: Initial import of publicly available CVS. dime/ChangeLog.sh0100755017777301777730000000231007142507656012473 0ustar wwwwww#!/bin/sh ############################################################################ moduledir=${0%/[^/]*} module=${moduledir##*/} cvs2cl=/home/sigma/larsa/code/cvs/src/cvs2cl/cvs2cl.pl headerfile=/tmp/$module.header cd $moduledir ############################################################################ cat > $headerfile < include/stamp-hT 2> /dev/null cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=include/config.h \ $(SHELL) ./config.status @mv include/stamp-hT include/stamp-h $(srcdir)/./include/config.h.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/./include/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/./include/stamp-h.in; \ $(MAKE) $(srcdir)/./include/stamp-h.in; \ else :; fi $(srcdir)/./include/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) @rm -f $(srcdir)/./include/stamp-h.in $(srcdir)/./include/stamp-h.inT @echo timestamp > $(srcdir)/./include/stamp-h.inT 2> /dev/null cd $(top_srcdir) && $(AUTOHEADER) @mv $(srcdir)/./include/stamp-h.inT $(srcdir)/./include/stamp-h.in distclean-hdr: -rm -f include/config.h uninstall-info-am: # 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): @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . # Avoid unsightly `./'. distdir = $(PACKAGE)-$(VERSION) GZIP_ENV = --best distdir: $(DISTFILES) -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/./include $(distdir)/cfg @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done for subdir in $(DIST_SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(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 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ || (echo "Error: files left after uninstall" 1>&2; \ exit 1) ) \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && $(MAKE) $(AM_MAKEFLAGS) distclean \ && rm -f $(distdir).tar.gz \ && (test `find . -type f -print | wc -l` -eq 0 \ || (echo "Error: files left after distclean" 1>&2; \ exit 1) ) -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* 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 dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) distclean: distclean-recursive -rm -f config.status config.cache config.log distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ clean-generic clean-libtool clean-recursive dist dist-all \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive cvs-update: @cd $(top_srcdir) && cvs update -dP # 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: dime/NEWS0100644017777301777730000000001307057751226011001 0ustar wwwwwwNEWS ==== dime/README0100644017777301777730000000561706763254773011211 0ustar wwwwwwREADME for DIME =============== DIME is a DXF (Data eXchange Format) file format support library. This file contains general information about the library. For compilation and installation information, refer to the file named INSTALL. For copyright information, refer to the file named COPYING. Changes in the library since the first public release (v0.9) are described in the file named ChangeLog. 0. CONTENTS =========== 1. FUNCTIONALITY 2. TECHNICAL SUPPORT 3. LICENSE INFORMATION 1. FUNCTIONALITY ================ DIME is a C++ class library for reading, constructing, manipulating, and writing DXF file data. The name is an acronym for DXF Import, Manipulation, and Export library. The focus of the library is primarily on loading DXF files and building a data structure containing the DXF data, and on saving such data structures as a file conforming to the DXF file format. The intended purpose for DIME was on importing and exporting DXF files. For this kind of usage, special memory management techniques can be used to boost the performance significantly. Aside from loading and saving the data structure, functionality is also provided for traversing the data structure while performing various tasks, and also some special functionality for extracting geometry from the DXF data structure. A sample program is included in the directory dxf2vrml/ which will convert a DXF file (only the polygon data) to a VRML file. 2. TECHNICAL SUPPORT ==================== Systems In Motion (SIM) has no obligation to provide technical support for the GPL licensed version of DIME. If resources permit, however, SIM will of course try to be as helpful as possible. SIM has set up two mailing lists for DIME support. dime-announce This mailing list is for announcements regarding DIME. New releases, new functionality, license information, this kind of stuff. This list is moderated (read-only). dime-discuss This mailing list is for discussing DIME. Technical support can be provided through this discussion forum. Followups to announcements in dime-announce should also be directed to this list. This list is open for posting for all subscribers. To subscribe to either of the two lists, send an email to SIM's mailing list manager at with a subject line with the format "subscribe ". To unsubscribe, use a subject line with the format "unsubscribe ". Do not include brackets around the mailing list name. For general information about SIM's mailing list manager, use "help" as the subject line. 3. LICENSE INFORMATION ====================== DIME is released publicly under the GNU General Public License, version 2 (see the file named COPYING). If you need DIME for commercial use, you can read about acquiring a commercial licensed version of DIME at SIM's DIME web page at http://www.sim.no/dime/, or you can contact SIM's sales department directly at . dime/README.WIN320100644017777301777730000001021707470160151011760 0ustar wwwwwwSection 01 -- Basic build instructions. ======================================= You should be able to build the library if you have these components installed on your system: * Cygwin[1], latest release * Microsoft Visual C++ v6.x First, make sure Microsoft Visual C++ is accessible from the Cygwin shell. If you can run ``cl.exe'' from the bash command line, everything is probably set up for you already. If not, you need to add something like this to .bashrc and .bash_profile: # the Cygwin path to the Microsoft Visual Studio directory... MSVS_HOME="/cygdrive/c/Program Files/Microsoft Visual Studio" win_MSVS_HOME=`cygpath -w "$MSVS_HOME"` PATH="$PATH:$MSVS_HOME/VC98/Bin:$MSVS_HOME/VC98/Lib" PATH="$PATH:$MSVS_HOME/Common/MSDev98/Bin" LIB="$win_MSVS_HOME\\VC98\\Lib" INCLUDE="$win_MSVS_HOME\\VC98\\Include" export PATH LIB INCLUDE Configure and build the same way as you would on UNIX-based systems, i.e. $ [srcdir]/configure $ make install To specify which C library dime should be linked against, you should use the --with-msvcrt= option. You have the following choices (short aliases on the right): singlethread-static [ /ml | ml | libc ] (default) singlethread-static-debug [ /mld | mld | libcd ] multithread-static [ /mt | mt | libcmt ] multithread-static-debug [ /mtd | mtd | libcmtd ] multithread-dynamic [ /md | md | msvcrt ] multithread-dynamic-debug [ /mdd | mdd | msvcrtd ] Note that if you encounter any problems when trying to build on MSWindows, it is expected that you are able to do a minimum of troubleshooting yourself before contacting us. (If this is not an option, please consider using the pre-built binary installation packages we provide. Follow the download link from .) If you are confident that configure and/or build fails due to a mistake on our part, or you otherwise feel completely stuck, we will be happy to assist. --- [1] Section 02 -- What is this ``configure'' thing? =============================================== The configure script is a script that first determines what kind of system it's being run on, then tries to locate a compiler, and then uses the compiler to probe the system for its capabilities. For instance, which optional utility libraries are available? The configure script tries to link with all the potential libraries that we might want to use. If the linking works, the library is there. If the link-test fails, then it's not. Another thing that is often probed is whether a library is new enough so that it contains some function foo()? Depending on these tests, the configure script sets up a header-file called "config.h" that contains #define settings for what the configure script managed to find. This header is included from all the sources that needs system-dependent code blocks. In this way you tune the library on individual features instead of basing the compilation on which platform it is that is being used. The configure script also has the purpose of figuring out how the compiler should be used when you build the library. The result of these tests are put into all the Makefile files that are generated at the end of the configure run. The Makefile files are created through keyword substitution in the Makefile.in templates you will see in the source hierarchy. After having run configure, all system characteristics should be figured out and the Makefiles should be set up so you only need to type "make" to get everything built. Another feature of this setup is to run the configure script from an empty directory. This will create an an empty directory structure with makefiles that will compile the sources out of the source directory while putting the object files in the newly created directory structure. This means you can keep your sources in one place (even on a read-only medium like a CDROM), and build the library in some temporary location that can be scrapped after you have built and installed the library. dime/TODO0100644017777301777730000000362007674546703011010 0ustar wwwwwwTODO for DIME Just to clarify something; the order of the items in the list and the priority we have given the items do not guarantee when (or even if) the items will be implemented. *) Upgrade configure setup and and DLLify library - make Mac OS X framework [top priority] *) Audit API and fix parts that are not safe in a Win32 environment where the client code uses a different C run-time than the Dime library [high priority] This is _extremely_ important to get done before 1.0 release, or we will fight support requests over this for the remaining life time of the library.. A few examples of stuff that needs to be fixed: - methods getting or returning FILE*, see for instance dimeInput / dimeOutput classes (setFileHandle() methods) - methods allocating memory that are made the client's responsibility to deallocate, see for instance the copy() methods of the entity classes - functions appending or removing items from dimeArray template objects passed in as arguments, or passing them out as return values (this causes alternate memory allocation / deallocation in client or library code, due to dimeArray being fully inlined) see for instance dimeCircle::extractGeometry() *) Write more and better doxygen documentation comments. [high priority] *) Make a more robust run-time type checking system. [high priority] - shouldn't require client apps to be recompiled if new types are added - maybe make it possible to override the "built-in" types - must be in place before v1.0 *) Implement a (better) debug/warning/error system with callbacks [high priority] *) Implement more of the entities, tables, etc. used by AutoCAD [medium priority] *) implement some means of "seamless" integration with Coin [medium-low priority?] dime/aclocal.m40100644017777301777730000044252207643260561012157 0ustar wwwwww# aclocal.m4 generated automatically by aclocal 1.5 # Copyright 1996, 1997, 1998, 1999, 2000, 2001 # 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. # ************************************************************************** # gendsp.m4 # # macros: # SIM_AC_MSVC_DSP_ENABLE_OPTION # SIM_AC_MSVC_DSP_SETUP(PROJECT, Project, project, extra-args) # # authors: # Lars J. Aas # ************************************************************************** AC_DEFUN([SIM_AC_MSVC_DSP_ENABLE_OPTION], [ AC_ARG_ENABLE([msvcdsp], [AC_HELP_STRING([--enable-msvcdsp], [build .dsp, not library])], [case $enableval in no | false) sim_ac_make_dsp=false ;; *) sim_ac_make_dsp=true ;; esac], [sim_ac_make_dsp=false]) if $sim_ac_make_dsp; then enable_dependency_tracking=no enable_libtool_lock=no fi ]) # SIM_AC_MSVC_DSP_ENABLE_OPTION # ************************************************************************** AC_DEFUN([SIM_AC_MSVC_DSP_SETUP], [ AC_REQUIRE([SIM_AC_MSVC_DSP_ENABLE_OPTION]) $1_DSP_LIBDIRS= $1_DSP_LIBS= $1_DSP_INCS= $1_DSP_DEFS= if $sim_ac_make_dsp; then SIM_AC_CONFIGURATION_SETTING([$2 build type], [msvc .dsp]) # -DHAVE_CONFIG_H is set up in $DEFS too late for use to use, and some # include directives are usually set up in the Makefile.am files for arg in -DHAVE_CONFIG_H $4 $CPPFLAGS $LDFLAGS $LIBS; do case $arg in -L* ) libdir=`echo $arg | cut -c3-` $1_DSP_LIBDIRS="[$]$1_DSP_LIBDIRS $libdir" ;; -l* ) libname=`echo $arg | cut -c3-` for libdir in [$]$1_DSP_LIBDIRS; do if test -f $libdir/$libname.lib; then # lib is not in any standard location - use full path libname=`cygpath -w "$libdir/$libname" 2>/dev/null || echo "$libdir/$libname"` break fi done if test x"[$]$1_DSP_LIBS" = x""; then $1_DSP_LIBS="$libname.lib" else $1_DSP_LIBS="[$]$1_DSP_LIBS $libname.lib" fi ;; -I* ) incdir=`echo $arg | cut -c3-` incdir=`cygpath -w "$incdir" 2>/dev/null || echo "$incdir"` if test x"[$]$1_DSP_INCS" = x""; then $1_DSP_INCS="/I \"$incdir\"" else $1_DSP_INCS="[$]$1_DSP_INCS /I \"$incdir\"" fi ;; -D$1_DEBUG* | -DNDEBUG ) # Defines that vary between release/debug configurations can't be # set up dynamically in _DSP_DEFS - they must be static in the # gendsp.sh script. We therefore catche them here so we can ignore # checking for them below. ;; -D*=* | -D* ) define=`echo $arg | cut -c3-` if test x"[$]$1_DSP_DEFS" = x""; then $1_DSP_DEFS="/D \"$define\"" else $1_DSP_DEFS="[$]$1_DSP_DEFS /D \"$define\"" fi ;; esac done CC=[$]$3_src_dir/cfg/gendsp.sh CXX=[$]$3_src_dir/cfg/gendsp.sh CXXLD=[$]$3_src_dir/cfg/gendsp.sh # Yes, this is totally bogus stuff, but don't worry about it. As long # as gendsp.sh recognizes it... 20030219 larsa CPPFLAGS="$CPPFLAGS -Ddspfile=[$]$3_build_dir/$3[$]$1_MAJOR_VERSION.dsp" LDFLAGS="$LDFLAGS -Wl,-Ddspfile=[$]$3_build_dir/$3[$]$1_MAJOR_VERSION.dsp" LIBFLAGS="$LIBFLAGS -o $3[$]$1_MAJOR_VERSION.so.0" # this can't be set up at the point the libtool script is generated mv libtool libtool.bak sed -e "s%^CC=\"gcc\"%CC=\"[$]$3_src_dir/cfg/gendsp.sh\"%" \ -e "s%^CC=\".*/wrapmsvc.exe\"%CC=\"[$]$3_src_dir/cfg/gendsp.sh\"%" \ libtool rm -f libtool.bak chmod 755 libtool fi AC_SUBST([$1_DSP_LIBS]) AC_SUBST([$1_DSP_INCS]) AC_SUBST([$1_DSP_DEFS]) ]) # ************************************************************************** # configuration_summary.m4 # # This file contains some utility macros for making it easy to have a short # summary of the important configuration settings printed at the end of the # configure run. # # Authors: # Lars J. Aas # # ************************************************************************** # SIM_AC_CONFIGURATION_SETTING( DESCRIPTION, SETTING ) # # This macro registers a configuration setting to be dumped by the # SIM_AC_CONFIGURATION_SUMMARY macro. AC_DEFUN([SIM_AC_CONFIGURATION_SETTING], [if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="$1:$2" else sim_ac_configuration_settings="$sim_ac_configuration_settings|$1:$2" fi ]) # SIM_AC_CONFIGURATION_SETTING # ************************************************************************** # SIM_AC_CONFIGURATION_WARNING( WARNING ) # # This macro registers a configuration warning to be dumped by the # SIM_AC_CONFIGURATION_SUMMARY macro. AC_DEFUN([SIM_AC_CONFIGURATION_WARNING], [if test x${sim_ac_configuration_warnings+set} != xset; then sim_ac_configuration_warnings="$1" else sim_ac_configuration_warnings="$sim_ac_configuration_warnings|$1" fi ]) # SIM_AC_CONFIGURATION_WARNING # ************************************************************************** # SIM_AC_CONFIGURATION_SUMMARY # # This macro dumps the settings and warnings summary. AC_DEFUN([SIM_AC_CONFIGURATION_SUMMARY], [sim_ac_settings=$sim_ac_configuration_settings sim_ac_num_settings=`echo "$sim_ac_settings" | tr -d -c "|" | wc -c` sim_ac_maxlength=0 while test $sim_ac_num_settings -ge 0; do sim_ac_description=`echo "$sim_ac_settings" | cut -d: -f1` sim_ac_length=`echo "$sim_ac_description" | wc -c` if test $sim_ac_length -gt $sim_ac_maxlength; then sim_ac_maxlength=`expr $sim_ac_length + 0` fi sim_ac_settings=`echo $sim_ac_settings | cut -d"|" -f2-` sim_ac_num_settings=`expr $sim_ac_num_settings - 1` done sim_ac_maxlength=`expr $sim_ac_maxlength + 3` sim_ac_padding=`echo " " | cut -c1-$sim_ac_maxlength` sim_ac_num_settings=`echo "$sim_ac_configuration_settings" | tr -d -c "|" | wc -c` echo "" echo "$PACKAGE configuration settings:" while test $sim_ac_num_settings -ge 0; do sim_ac_setting=`echo $sim_ac_configuration_settings | cut -d"|" -f1` sim_ac_description=`echo "$sim_ac_setting" | cut -d: -f1` sim_ac_status=`echo "$sim_ac_setting" | cut -d: -f2-` # hopefully not too many terminals are too dumb for this echo -e "$sim_ac_padding $sim_ac_status\r $sim_ac_description:" sim_ac_configuration_settings=`echo $sim_ac_configuration_settings | cut -d"|" -f2-` sim_ac_num_settings=`expr $sim_ac_num_settings - 1` done if test x${sim_ac_configuration_warnings+set} = xset; then sim_ac_num_warnings=`echo "$sim_ac_configuration_warnings" | tr -d -c "|" | wc -c` echo "" echo "$PACKAGE configuration warnings:" while test $sim_ac_num_warnings -ge 0; do sim_ac_warning=`echo "$sim_ac_configuration_warnings" | cut -d"|" -f1` echo " * $sim_ac_warning" sim_ac_configuration_warnings=`echo $sim_ac_configuration_warnings | cut -d"|" -f2-` sim_ac_num_warnings=`expr $sim_ac_num_warnings - 1` done fi ]) # SIM_AC_CONFIGURATION_SUMMARY # ************************************************************************** # SIM_AC_SETUP_MSVC_IFELSE( IF-FOUND, IF-NOT-FOUND ) # # This macro invokes IF-FOUND if the wrapmsvc wrapper can be run, and # IF-NOT-FOUND if not. # # Authors: # Morten Eriksen # Lars J. Aas # ************************************************************************** AC_DEFUN([SIM_AC_MSVC_DISABLE_OPTION], [ AC_ARG_ENABLE([msvc], [AC_HELP_STRING([--disable-msvc], [don't require MS Visual C++ on Cygwin])], [case $enableval in no | false) sim_ac_try_msvc=false ;; *) sim_ac_try_msvc=true ;; esac], [sim_ac_try_msvc=true]) ]) # ************************************************************************** # Note: the SIM_AC_SETUP_MSVC_IFELSE macro has been OBSOLETED and # replaced by the one below. # # If the Microsoft Visual C++ cl.exe compiler is available, set us up for # compiling with it and to generate an MSWindows .dll file. AC_DEFUN([SIM_AC_SETUP_MSVCPP_IFELSE], [ AC_REQUIRE([SIM_AC_MSVC_DISABLE_OPTION]) BUILD_WITH_MSVC=false if $sim_ac_try_msvc; then sim_ac_wrapmsvc=`cd $srcdir; pwd`/cfg/wrapmsvc.exe if test -z "$CC" -a -z "$CXX" && $sim_ac_wrapmsvc >/dev/null 2>&1; then m4_ifdef([$0_VISITED], [AC_FATAL([Macro $0 invoked multiple times])]) m4_define([$0_VISITED], 1) CC=$sim_ac_wrapmsvc CXX=$sim_ac_wrapmsvc export CC CXX BUILD_WITH_MSVC=true else case $host in *-cygwin) SIM_AC_ERROR([no-msvc++]) ;; esac fi fi AC_SUBST(BUILD_WITH_MSVC) if $BUILD_WITH_MSVC; then ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi ]) # SIM_AC_SETUP_MSVC_IFELSE # ************************************************************************** # SIM_AC_SETUP_MSVCRT # # This macro sets up compiler flags for the MS Visual C++ C library of # choice. AC_DEFUN([SIM_AC_SETUP_MSVCRT], [sim_ac_msvcrt_LDFLAGS="" sim_ac_msvcrt_LIBS="" AC_ARG_WITH([msvcrt], [AC_HELP_STRING([--with-msvcrt=], [set which C run-time library to build against])], [case `echo "$withval" | tr "[A-Z]" "[a-z]"` in default | singlethread-static | ml | /ml | libc | libc\.lib ) sim_ac_msvcrt=singlethread-static sim_ac_msvcrt_CFLAGS="/ML" sim_ac_msvcrt_CXXFLAGS="/ML" ;; default-debug | singlethread-static-debug | mld | /mld | libcd | libcd\.lib ) sim_ac_msvcrt=singlethread-static-debug sim_ac_msvcrt_CFLAGS="/MLd" sim_ac_msvcrt_CXXFLAGS="/MLd" ;; multithread-static | mt | /mt | libcmt | libcmt\.lib ) sim_ac_msvcrt=multithread-static sim_ac_msvcrt_CFLAGS="/MT" sim_ac_msvcrt_CXXFLAGS="/MT" ;; multithread-static-debug | mtd | /mtd | libcmtd | libcmtd\.lib ) sim_ac_msvcrt=multithread-static-debug sim_ac_msvcrt_CFLAGS="/MTd" sim_ac_msvcrt_CXXFLAGS="/MTd" ;; multithread-dynamic | md | /md | msvcrt | msvcrt\.lib ) sim_ac_msvcrt=multithread-dynamic sim_ac_msvcrt_CFLAGS="/MD" sim_ac_msvcrt_CXXFLAGS="/MD" ;; multithread-dynamic-debug | mdd | /mdd | msvcrtd | msvcrtd\.lib ) sim_ac_msvcrt=multithread-dynamic-debug sim_ac_msvcrt_CFLAGS="/MDd" sim_ac_msvcrt_CXXFLAGS="/MDd" ;; *) SIM_AC_ERROR([invalid-msvcrt]) ;; esac], [sim_ac_msvcrt=singlethread-static]) AC_MSG_CHECKING([MSVC++ C library choice]) AC_MSG_RESULT([$sim_ac_msvcrt]) $1 ]) # SIM_AC_SETUP_MSVCRT # EOF ********************************************************************** # ************************************************************************** # SIM_AC_ERROR_MESSAGE_FILE( FILENAME ) # Sets the error message file. Default is $ac_aux_dir/m4/errors.txt. # # SIM_AC_ERROR( ERROR [, ERROR ...] ) # Fetches the error messages from the error message file and displays # them on stderr. # # SIM_AC_WITH_ERROR( WITHARG ) # Invokes AC_MSG_ERROR in a consistent way for problems with the --with-* # $withval argument. # # SIM_AC_ENABLE_ERROR( ENABLEARG ) # Invokes AC_MSG_ERROR in a consistent way for problems with the --enable-* # $enableval argument. # # Authors: # Lars J. Aas AC_DEFUN([SIM_AC_ERROR_MESSAGE_FILE], [ sim_ac_message_file=$1 ]) # SIM_AC_ERROR_MESSAGE_FILE AC_DEFUN([SIM_AC_ONE_MESSAGE], [ : ${sim_ac_message_file=$ac_aux_dir/errors.txt} if test -f $sim_ac_message_file; then sim_ac_message="`sed -n -e '/^!$1$/,/^!/ { /^!/ d; p; }' <$sim_ac_message_file`" if test x"$sim_ac_message" = x""; then AC_MSG_ERROR([no message named '$1' in '$sim_ac_message_file' - notify the $PACKAGE_NAME maintainer(s)]) else eval "echo >&2 \"$sim_ac_message\"" fi else AC_MSG_ERROR([file '$sim_ac_message_file' not found - notify the $PACKAGE_NAME maintainer(s)]) fi ]) # SIM_AC_ONE_MESSAGE AC_DEFUN([_SIM_AC_ERROR], [ SIM_AC_ONE_MESSAGE([$1]) ifelse([$2], , , [ echo >&2 "" _SIM_AC_ERROR(m4_shift($@))]) ]) # _SIM_AC_ERROR AC_DEFUN([SIM_AC_ERROR], [ echo >&2 "" _SIM_AC_ERROR($@) echo >&2 "" AC_MSG_ERROR([aborting]) ]) # SIM_AC_ERROR AC_DEFUN([SIM_AC_WITH_ERROR], [ AC_MSG_ERROR([invalid value "${withval}" for "$1" configure argument]) ]) # SIM_AC_WITH_ERROR AC_DEFUN([SIM_AC_ENABLE_ERROR], [ AC_MSG_ERROR([invalid value "${enableval}" for "$1" configure argument]) ]) # SIM_AC_ENABLE_ERROR # Do all the work for Automake. 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. # serial 5 # 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... # We require 2.13 because we rely on SHELL being computed by configure. AC_PREREQ([2.13]) # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. # The purpose of this macro is to provide the user with a means to # check macros which are provided without letting her know how the # information is coded. # If this macro is not defined by Autoconf, define it here. ifdef([AC_PROVIDE_IFELSE], [], [define([AC_PROVIDE_IFELSE], [ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) # ---------------------------------------------- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first]) fi # Define the identity of the package. PACKAGE=$1 AC_SUBST(PACKAGE)dnl VERSION=$2 AC_SUBST(VERSION)dnl ifelse([$3],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. ifdef([m4_pattern_allow], [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl # Autoconf 2.50 always computes EXEEXT. However we need to be # compatible with 2.13, for now. So we always define EXEEXT, but we # don't compute it. AC_SUBST(EXEEXT) # Similar for OBJEXT -- only we only use OBJEXT if the user actually # requests that it be used. This is a bit dumb. : ${OBJEXT=o} AC_SUBST(OBJEXT) # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # 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_DEP_TRACK])dnl AC_REQUIRE([AM_SET_DEPDIR])dnl 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 ]) # # Check to make sure that the build environment is sane. # # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # serial 2 # 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 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= am_backtick='`' AC_MSG_WARN([${am_backtick}missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # 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], [ # expand $ac_aux_dir to an absolute path if test "${CDPATH+set}" = set; then CDPATH=${ZSH_VERSION+.}: # as recommended in autoconf.texi fi am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # 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 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # serial 4 -*- Autoconf -*- # 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" 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], 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 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 for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_$1_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" AC_SUBST([$1DEPMODE]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null AC_SUBST(DEPDIR) ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --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]) pushdef([subst], defn([AC_SUBST])) subst(AMDEPBACKSLASH) popdef([subst]) ]) # Generate code to set up dependency tracking. # This macro should only be invoked once -- use via AC_REQUIRE. # Usage: # AM_OUTPUT_DEPENDENCY_COMMANDS # # 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_OUTPUT_COMMANDS([ test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do case "$mf" in Makefile) dirpart=.;; */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; *) continue;; esac grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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=`echo "$file" | sed -e 's|/[^/]*$||'` $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])]) # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include='#' am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote='"' _am_result=BSD fi fi AC_SUBST(am__include) AC_SUBST(am__quote) AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) # serial 3 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. # # FIXME: Once using 2.50, use this: # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [errprint(__file__:__line__: [$0: invalid condition: $1 ])dnl m4exit(1)])dnl ifelse([$1], [FALSE], [errprint(__file__:__line__: [$0: invalid condition: $1 ])dnl m4exit(1)])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi]) # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- # serial 46 AC_PROG_LIBTOOL AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ]) AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl _LT_AC_PROG_ECHO_BACKSLASH # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE(libtool-lock, [ --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 *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then 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 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_SAVE AC_LANG_C AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_RESTORE]) 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 ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, [AC_TRY_LINK([], [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); DllMain (0, 0, 0);], [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) case $host/$CC in *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) # old mingw systems require "-dll" to link a DLL, while more recent ones # require "-mdll" SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) CFLAGS="$SAVE_CFLAGS" ;; *-*-cygwin* | *-*-pw32*) # cygwin systems need to pass --dll to the linker, and not link # crt.o which will require a WinMain@16 definition. lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; esac ;; ]) esac _LT_AC_LTCONFIG_HACK ]) # AC_LIBTOOL_HEADER_ASSERT # ------------------------ AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], [AC_CACHE_CHECK([whether $CC supports assert without backlinking], [lt_cv_func_assert_works], [case $host in *-*-solaris*) if test "$GCC" = yes && test "$with_gnu_ld" != yes; then case `$CC --version 2>/dev/null` in [[12]].*) lt_cv_func_assert_works=no ;; *) lt_cv_func_assert_works=yes ;; esac fi ;; esac]) if test "x$lt_cv_func_assert_works" = xyes; then AC_CHECK_HEADERS(assert.h) fi ])# AC_LIBTOOL_HEADER_ASSERT # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h) ])# _LT_AC_CHECK_DLFCN # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl # 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]]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix*) symcode='[[BCDEGRST]]' ;; solaris* | sysv5*) symcode='[[BDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $host_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[[ABCDGISTW]]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $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 egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[[]] = { EOF sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if AC_TRY_EVAL(ac_link) && test -s conftest; then pipe_works=yes fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AC_FD_CC fi else echo "cannot find nm_test_var in $nlist" >&AC_FD_CC fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC fi else echo "$progname: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&5 fi rm -f 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 ]) global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" if test -z "$lt_cv_sys_global_symbol_pipe"; then global_symbol_to_cdecl= global_symbol_to_c_name_address= else global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" fi if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # --------------------------------- AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], [# Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) AC_DIVERT_POP ])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [if test "$cross_compiling" = yes; then : [$4] else AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #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 #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=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; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [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 ;; cygwin* | mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *) 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="-dld"], [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="-dld"]) ]) ]) ]) ]) ]) ;; 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" AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" 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_AC_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 LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_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 ])# AC_LIBTOOL_DLOPEN_SELF AC_DEFUN([_LT_AC_LTCONFIG_HACK], [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' 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' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" need_locks="$enable_libtool_lock" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o if test x"$host" != x"$build"; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac 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 # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Allow CC to be a program name with arguments. set dummy $CC compiler="[$]2" AC_MSG_CHECKING([for objdir]) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null AC_MSG_RESULT($objdir) AC_ARG_WITH(pic, [ --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=default # We assume here that the value for lt_cv_prog_cc_pic will not be cached # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. AC_MSG_CHECKING([for $compiler option to produce PIC]) AC_CACHE_VAL(lt_cv_prog_cc_pic, [ lt_cv_prog_cc_pic= lt_cv_prog_cc_shlib= lt_cv_prog_cc_wl= lt_cv_prog_cc_static= lt_cv_prog_cc_no_builtin= lt_cv_prog_cc_can_build_shared=$can_build_shared if test "$GCC" = yes; then lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-static' case $host_os in aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # not sure about C++ programs. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ;; amigaos*) # 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_cv_prog_cc_pic='-fno-common' ;; cygwin* | mingw* | pw32* | os2*) # 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_cv_prog_cc_pic='-DDLL_EXPORT' ;; sysv4*MP*) if test -d /usr/nec; then lt_cv_prog_cc_pic=-Kconform_pic fi ;; *) lt_cv_prog_cc_pic='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case $host_os in aix3* | aix4* | aix5*) lt_cv_prog_cc_wl='-Wl,' # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_cv_prog_cc_static='-Bstatic' else lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' fi ;; hpux9* | hpux10* | hpux11*) # Is there a better lt_cv_prog_cc_static that works with the bundled CC? lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" lt_cv_prog_cc_pic='+Z' ;; irix5* | irix6*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | pw32* | os2*) # 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_cv_prog_cc_pic='-DDLL_EXPORT' ;; newsos6) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' ;; sco3.2v5*) lt_cv_prog_cc_pic='-Kpic' lt_cv_prog_cc_static='-dn' lt_cv_prog_cc_shlib='-belf' ;; solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; sunos4*) lt_cv_prog_cc_pic='-PIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' if test "x$host_vendor" = xsni; then lt_cv_prog_cc_wl='-LD' else lt_cv_prog_cc_wl='-Wl,' fi ;; uts4*) lt_cv_prog_cc_pic='-pic' lt_cv_prog_cc_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_cv_prog_cc_pic='-Kconform_pic' lt_cv_prog_cc_static='-Bstatic' fi ;; *) lt_cv_prog_cc_can_build_shared=no ;; esac fi ]) if test -z "$lt_cv_prog_cc_pic"; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([$lt_cv_prog_cc_pic]) # Check to make sure the pic_flag actually works. AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" AC_TRY_COMPILE([], [], [dnl case $host_os in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then # they create non-PIC objects. So, if there were any warnings, we # assume that PIC is not supported. if test -s conftest.err; then lt_cv_prog_cc_pic_works=no else lt_cv_prog_cc_pic_works=yes fi ;; *) lt_cv_prog_cc_pic_works=yes ;; esac ], [dnl lt_cv_prog_cc_pic_works=no ]) CFLAGS="$save_CFLAGS" ]) if test "X$lt_cv_prog_cc_pic_works" = Xno; then lt_cv_prog_cc_pic= lt_cv_prog_cc_can_build_shared=no else lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" fi AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) fi # Check for any special shared library compilation flags. if test -n "$lt_cv_prog_cc_shlib"; then AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : else AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) lt_cv_prog_cc_can_build_shared=no fi fi AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl lt_cv_prog_cc_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) LDFLAGS="$save_LDFLAGS" ]) # Belt *and* braces to stop my trousers falling down: test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) pic_flag="$lt_cv_prog_cc_pic" special_shlib_compile_flags="$lt_cv_prog_cc_shlib" wl="$lt_cv_prog_cc_wl" link_static_flag="$lt_cv_prog_cc_static" no_builtin_flag="$lt_cv_prog_cc_no_builtin" can_build_shared="$lt_cv_prog_cc_can_build_shared" # Check to see if options -o and -c are simultaneously supported by compiler AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) AC_CACHE_VAL([lt_cv_compiler_c_o], [ $rm -r conftest 2>/dev/null mkdir conftest cd conftest echo "int some_variable = 0;" > conftest.$ac_ext mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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 if test -s out/conftest.err; then lt_cv_compiler_c_o=no else lt_cv_compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&AC_FD_CC lt_cv_compiler_c_o=no fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null ]) compiler_c_o=$lt_cv_compiler_c_o AC_MSG_RESULT([$compiler_c_o]) if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) AC_CACHE_VAL([lt_cv_compiler_o_lo], [ lt_cv_compiler_o_lo=no save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" save_objext="$ac_objext" ac_objext=lo AC_TRY_COMPILE([], [int some_variable = 0;], [dnl # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then lt_cv_compiler_o_lo=no else lt_cv_compiler_o_lo=yes fi ]) ac_objext="$save_objext" CFLAGS="$save_CFLAGS" ]) compiler_o_lo=$lt_cv_compiler_o_lo AC_MSG_RESULT([$compiler_o_lo]) else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = 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 if test "$GCC" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" compiler_rtti_exceptions=no AC_TRY_COMPILE([], [int some_variable = 0;], [dnl # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then compiler_rtti_exceptions=no else compiler_rtti_exceptions=yes fi ]) CFLAGS="$save_CFLAGS" AC_MSG_RESULT([$compiler_rtti_exceptions]) if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # See if the linker supports building shared libraries. AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_into_libs=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= link_all_deplibs=unknown always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # 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 egrep regular expression 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_" # 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. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # 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 ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX, the GNU linker is very broken # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) 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 # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': 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*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. # FIXME: what about values for MSVC? dll_entry=__cygwin_dll_entry@12 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ case $host_os in mingw*) # mingw values dll_entry=_DllMainCRTStartup@12 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ;; esac # mingw and cygwin differ, and it's simplest to just exclude the union # of the two symbol sets. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one (in ltdll.c) if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else ltdll_obj= ltdll_cmds= fi # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left be newer dlltools. export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \[$]# in 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done; fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&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. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 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 ;; 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 | egrep ': supported targets:.* elf' > /dev/null; then 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 if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw* | pw32*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) 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]].*|aix5*) 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. hardcode_direct=yes archive_cmds='' hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes 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' else # not using gcc if test "$host_cpu" = ia64; then shared_flag='${wl}-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall can do strange things, 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' hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. allow_undefined_flag='${wl}-berok' # This is a bit strange, but is similar to how AIX traditionally builds # it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' fi fi ;; amigaos*) 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 # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw* | pw32*) # 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. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''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' fix_srcfile_path='`cygpath -w "$srcfile"`' ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on allow_undefined_flag='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. archive_cmds='$nonopt $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes hardcode_shlibpath_var=no whole_archive_flag_spec='-all_load $convenience' ;; 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*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case $host_os in hpux9*) 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' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: 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 ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no 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 $linker_flags' 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 $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' #Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) 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 export_dynamic_flag_spec='${wl}-Bexport' ;; solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of # the object symbols generated in some cases. Libraries that use # assert need libgcc.a to resolve __eprintf, for example. Linking # a copy of libgcc.a into every shared library to guarantee resolving # such symbols causes other problems: According to Tim Van Holder # , C++ libraries end up with a separate # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' if test "$GCC" = yes; then case `$CC --version 2>/dev/null` in [[12]].*) cat <&2 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably *** create self contained shared libraries on Solaris systems, without *** introducing a dependency on libgcc.a. Therefore, libtool is disabling *** -no-undefined support, which will at least allow you to build shared *** libraries. However, you may find that when you link such libraries *** into an application without using GCC, you have to manually add *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to *** upgrade to a newer version of GCC. Another option is to rebuild your *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. EOF no_undefined_flag= ;; esac fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; 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) if test "x$host_vendor" = xsno; then archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? else 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 fi 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' ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; 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.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5uw7* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi AC_MSG_RESULT([$ld_shlibs]) test "$ld_shlibs" = no && can_build_shared=no # Check hardcoding attributes. AC_MSG_CHECKING([how to hardcode library paths into programs]) hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant 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 "$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 AC_MSG_RESULT([$hardcode_action]) 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 AC_MSG_RESULT([no]) fi reload_cmds='$LD$reload_flag -o $output$reload_objs' test -z "$deplibs_check_method" && deplibs_check_method=unknown # PORTME Fill in your ld.so characteristics AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= 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" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4* | aix5*) version_type=linux if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' 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}.so$versuffix ${libname}${release}.so$major $libname.so' 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}.so$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) 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=`$echo "X$lib" | $Xsed -e '\''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' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$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" export_dynamic_flag_spec=-rdynamic # 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*) version_type=windows need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin*) library_names_spec='$libname.dll.a' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog .libs/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' ;; yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ;; yes,pw32*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' ;; *) library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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 # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; *) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH 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. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) version_type=irix need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in irix5*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") 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}" ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # 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 # 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}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. 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 ;; aix4*) 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]) if test "$hardcode_action" = relink; 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 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 AC_LIBTOOL_DLOPEN_SELF 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. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], [$rm conftest* echo 'static int dummy;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_cv_prog_cc_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$save_allow_undefined_flag else cat conftest.err 1>&5 fi]) AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) ;; esac fi need_lc=${lt_cv_archive_cmds_need_lc-yes} # The second clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then : else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. test -f Makefile && make "$ltmain" fi if test -f "$ltmain"; then trap "$rm \"${ofile}T\"; exit 1" 1 2 15 $rm -f "${ofile}T" echo creating $ofile # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ old_striplib striplib file_magic_cmd export_symbols_cmds \ deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ global_symbol_to_c_name_address \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case $var in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done cat <<__EOF__ > "${ofile}T" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$need_lc # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # The default C compiler. CC=$lt_CC # Is the compiler the GNU C compiler? with_gcc=$GCC # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_pic_flag pic_mode=$pic_mode # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$lt_compiler_o_lo # Must we lock files when doing compilation ? need_locks=$lt_need_locks # 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 # 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 # Compiler flag to prevent dynamic linking. link_static_flag=$lt_link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_no_builtin_flag # 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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # 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 # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # 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 and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # 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 # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # 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 # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # 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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_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 # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "${ofile}T" # 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 EOF ;; esac case $host_os in cygwin* | mingw* | pw32* | os2*) cat <<'EOF' >> "${ofile}T" # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # 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. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # /* O_BINARY isn't required (or even defined sometimes) under Unix */ # #ifndef O_BINARY # #define O_BINARY 0 # #endif # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) mv -f "${ofile}T" "$ofile" || \ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") chmod +x "$ofile" fi ])# _LT_AC_LTCONFIG_HACK # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_LIBTOOL_PICMODE - implement the --with-pic flag # Usage: AC_LIBTOOL_PICMODE[(MODE)] # Where MODE is either `yes' or `no'. If omitted, it defaults to # `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default)]) # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [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_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 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="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do 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 <&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 EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_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 ]) # AC_PATH_MAGIC - find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) else MAGIC_CMD=: fi fi ]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])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 GCC]) 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. [[\\/]]* | [[A-Za-z]]:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the path 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 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do 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 GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$lt_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_PROG_LD_GNU ]) # AC_PROG_LD_GNU - AC_DEFUN([AC_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then lt_cv_prog_gnu_ld=yes else lt_cv_prog_gnu_ld=no fi]) with_gnu_ld=$lt_cv_prog_gnu_ld ]) # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker # -- PORTME Some linkers may need a different reload flag. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, [lt_cv_ld_reload_flag='-r']) reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" ]) # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], [AC_CACHE_CHECK([how to recognise dependant libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep 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 aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) 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* | mingw* | pw32*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in rhapsody* | darwin1.[[012]]) lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` ;; *) # Darwin 1.3 on lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac ;; freebsd*) 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)/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 ;; hpux10.20*|hpux11*) 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_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6*) case $host_os in irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux-gnu*) case $host_cpu in alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' 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 ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;; sysv5uw[[78]]* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 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 ;; esac ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/${ac_tool_prefix}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 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then lt_cv_path_NM="$tmp_nm -B" break elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then lt_cv_path_NM="$tmp_nm -p" break else 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 fi fi done IFS="$ac_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" AC_MSG_RESULT([$NM]) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the # configure arguments. Note that LIBLTDL and INCLTDL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed # with '${top_builddir}/' and INCLTDL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed # with '${top_srcdir}/' (note the single quotes!). If your package is # not flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" INCLTDL= fi ]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering # serial 1 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) # ************************************************************************** # SIM_AC_UNIQIFY_LIST( VARIABLE, LIST ) # # This macro filters out redundant items from a list. This macro was made # to avoid having multiple equivalent -I and -L options for the compiler on # the command-line, which made compilation quite messy to watch. # # BUGS: # Items with spaces are probably not supported. # # Authors: # Lars J. Aas # AC_DEFUN([SIM_AC_UNIQIFY_LIST], [ sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in $2; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done $1=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq ]) # SIM_AC_UNIQIFY_LIST # Like AC_CONFIG_HEADER, but automatically create stamp file. # serial 3 # 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. We must strip everything past the first ":", # and everything past the last "/". AC_PREREQ([2.12]) AC_DEFUN([AM_CONFIG_HEADER], [ifdef([AC_FOREACH],dnl [dnl init our file count if it isn't already m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) dnl prepare to store our destination file list for use in config.status AC_FOREACH([_AM_File], [$1], [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index)) dnl and add it to the list of files AC keeps track of, along dnl with our hook AC_CONFIG_HEADERS(_AM_File, dnl COMMANDS, [, INIT-CMDS] [# update the timestamp echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index[" ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS m4_popdef([_AM_Dest])])],dnl [AC_CONFIG_HEADER([$1]) AC_OUTPUT_COMMANDS( ifelse(patsubst([$1], [[^ ]], []), [], [test -z "$CONFIG_HEADERS" || echo timestamp >dnl patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl [am_indx=1 for am_file in $1; do case " \$CONFIG_HEADERS " in *" \$am_file "*) am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\` if test -n "\$am_dir"; then am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\` for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do am_tmpdir=\$am_tmpdir\$am_subdir/ if test ! -d \$am_tmpdir; then mkdir \$am_tmpdir fi done fi echo timestamp > "\$am_dir"stamp-h\$am_indx ;; esac am_indx=\`expr \$am_indx + 1\` done]) ])]) # AM_CONFIG_HEADER # _AM_DIRNAME(PATH) # ----------------- # Like AS_DIRNAME, only do it during macro expansion AC_DEFUN([_AM_DIRNAME], [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, m4_if(m4_regexp([$1], [^/.*]), -1, [.], m4_patsubst([$1], [^\(/\).*], [\1])), m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl ]) # _AM_DIRNAME dime/bootstrap0100755017777301777730000000014207643247723012253 0ustar wwwwww#!/bin/sh echo "Error: to bootstrap, invoke the script simacros/bin/bootstrap. Exiting." exit 1 dime/configure0100755017777301777730000112436107643260561012225 0ustar wwwwww#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for dime 0.9.1. # # Report bugs to . # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # NLS nuisances. # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi (set +x; test -n "`(LANG=C; export LANG) 2>&1`") && { $as_unset LANG || test "${LANG+set}" != set; } || { LANG=C; export LANG; } (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || { LC_ALL=C; export LC_ALL; } (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || { LC_TIME=C; export LC_TIME; } (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || { LC_CTYPE=C; export LC_CTYPE; } (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || { LANGUAGE=C; export LANGUAGE; } (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || { LC_COLLATE=C; export LC_COLLATE; } (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || { LC_NUMERIC=C; export LC_NUMERIC; } (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || { LC_MESSAGES=C; export LC_MESSAGES; } # Name of the executable. as_me=`(basename "$0") 2>/dev/null || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conftest.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='dime' PACKAGE_TARNAME='dime' PACKAGE_VERSION='0.9.1' PACKAGE_STRING='dime 0.9.1' PACKAGE_BUGREPORT='dime-support@coin3d.org' ac_unique_file="include/dime/Base.h" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -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 ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -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 ;; -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac 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 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 # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | 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 if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP # # 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 dime 0.9.1 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dime 0.9.1:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-msvcdsp build .dsp, not library --disable-msvc don't require MS Visual C++ on Cygwin --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --enable-static=PKGS build static libraries default=no --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared=PKGS build shared libraries default=yes --enable-fast-install=PKGS optimize for fast installation default=yes --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug turn on Dime debugging default=yes --enable-symbols turn on symbol debug information default=yes --enable-profile turn on inclusion of profiling code default=no --enable-warnings turn on warnings when compiling default=no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-msvcrt= set which C run-time library to build against --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects default=use both 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 CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF dime configure 0.9.1 generated by GNU Autoconf 2.53 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 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 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dime $as_me 0.9.1, which was generated by GNU Autoconf 2.53. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(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=. echo "PATH: $as_dir" done } >&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. # Also quote any args containing shell meta-characters. ac_configure_args= ac_sep= for ac_arg do case $ac_arg in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n ) continue ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ac_sep=" " ;; esac # Get rid of the leading space. done # 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: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # 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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 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 `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in cfg $srcdir/cfg; 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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in cfg $srcdir/cfg" >&5 echo "$as_me: error: cannot find install-sh or install.sh in cfg $srcdir/cfg" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- DIME_MAJOR_VERSION=0 DIME_MINOR_VERSION=9 DIME_MICRO_VERSION=1 DIME_BETA_VERSION=1 DIME_VERSION=0.9.1 VERSION=$DIME_VERSION DIME_INTERFACE_AGE=0 DIME_BINARY_AGE=0 # Check whether --enable-msvcdsp or --disable-msvcdsp was given. if test "${enable_msvcdsp+set}" = set; then enableval="$enable_msvcdsp" case $enableval in no | false) sim_ac_make_dsp=false ;; *) sim_ac_make_dsp=true ;; esac else sim_ac_make_dsp=false fi; if $sim_ac_make_dsp; then enable_dependency_tracking=no enable_libtool_lock=no fi # Check whether --enable-msvc or --disable-msvc was given. if test "${enable_msvc+set}" = set; then enableval="$enable_msvc" case $enableval in no | false) sim_ac_try_msvc=false ;; *) sim_ac_try_msvc=true ;; esac else sim_ac_try_msvc=true fi; BUILD_WITH_MSVC=false if $sim_ac_try_msvc; then sim_ac_wrapmsvc=`cd $srcdir; pwd`/cfg/wrapmsvc.exe if test -z "$CC" -a -z "$CXX" && $sim_ac_wrapmsvc >/dev/null 2>&1; then CC=$sim_ac_wrapmsvc CXX=$sim_ac_wrapmsvc export CC CXX BUILD_WITH_MSVC=true else case $host in *-cygwin) echo >&2 "" : ${sim_ac_message_file=$ac_aux_dir/errors.txt} if test -f $sim_ac_message_file; then sim_ac_message="`sed -n -e '/^!no-msvc++$/,/^!/ { /^!/ d; p; }' <$sim_ac_message_file`" if test x"$sim_ac_message" = x""; then { { echo "$as_me:$LINENO: error: no message named 'no-msvc++' in '$sim_ac_message_file' - notify the $PACKAGE_NAME maintainer(s)" >&5 echo "$as_me: error: no message named 'no-msvc++' in '$sim_ac_message_file' - notify the $PACKAGE_NAME maintainer(s)" >&2;} { (exit 1); exit 1; }; } else eval "echo >&2 \"$sim_ac_message\"" fi else { { echo "$as_me:$LINENO: error: file '$sim_ac_message_file' not found - notify the $PACKAGE_NAME maintainer(s)" >&5 echo "$as_me: error: file '$sim_ac_message_file' not found - notify the $PACKAGE_NAME maintainer(s)" >&2;} { (exit 1); exit 1; }; } fi echo >&2 "" { { echo "$as_me:$LINENO: error: aborting" >&5 echo "$as_me: error: aborting" >&2;} { (exit 1); exit 1; }; } ;; esac fi fi if $BUILD_WITH_MSVC; then : else : fi if $BUILD_WITH_MSVC; then sim_ac_msvcrt_LDFLAGS="" sim_ac_msvcrt_LIBS="" # Check whether --with-msvcrt or --without-msvcrt was given. if test "${with_msvcrt+set}" = set; then withval="$with_msvcrt" case `echo "$withval" | tr "A-Z" "a-z"` in default | singlethread-static | ml | /ml | libc | libc\.lib ) sim_ac_msvcrt=singlethread-static sim_ac_msvcrt_CFLAGS="/ML" sim_ac_msvcrt_CXXFLAGS="/ML" ;; default-debug | singlethread-static-debug | mld | /mld | libcd | libcd\.lib ) sim_ac_msvcrt=singlethread-static-debug sim_ac_msvcrt_CFLAGS="/MLd" sim_ac_msvcrt_CXXFLAGS="/MLd" ;; multithread-static | mt | /mt | libcmt | libcmt\.lib ) sim_ac_msvcrt=multithread-static sim_ac_msvcrt_CFLAGS="/MT" sim_ac_msvcrt_CXXFLAGS="/MT" ;; multithread-static-debug | mtd | /mtd | libcmtd | libcmtd\.lib ) sim_ac_msvcrt=multithread-static-debug sim_ac_msvcrt_CFLAGS="/MTd" sim_ac_msvcrt_CXXFLAGS="/MTd" ;; multithread-dynamic | md | /md | msvcrt | msvcrt\.lib ) sim_ac_msvcrt=multithread-dynamic sim_ac_msvcrt_CFLAGS="/MD" sim_ac_msvcrt_CXXFLAGS="/MD" ;; multithread-dynamic-debug | mdd | /mdd | msvcrtd | msvcrtd\.lib ) sim_ac_msvcrt=multithread-dynamic-debug sim_ac_msvcrt_CFLAGS="/MDd" sim_ac_msvcrt_CXXFLAGS="/MDd" ;; *) echo >&2 "" : ${sim_ac_message_file=$ac_aux_dir/errors.txt} if test -f $sim_ac_message_file; then sim_ac_message="`sed -n -e '/^!invalid-msvcrt$/,/^!/ { /^!/ d; p; }' <$sim_ac_message_file`" if test x"$sim_ac_message" = x""; then { { echo "$as_me:$LINENO: error: no message named 'invalid-msvcrt' in '$sim_ac_message_file' - notify the $PACKAGE_NAME maintainer(s)" >&5 echo "$as_me: error: no message named 'invalid-msvcrt' in '$sim_ac_message_file' - notify the $PACKAGE_NAME maintainer(s)" >&2;} { (exit 1); exit 1; }; } else eval "echo >&2 \"$sim_ac_message\"" fi else { { echo "$as_me:$LINENO: error: file '$sim_ac_message_file' not found - notify the $PACKAGE_NAME maintainer(s)" >&5 echo "$as_me: error: file '$sim_ac_message_file' not found - notify the $PACKAGE_NAME maintainer(s)" >&2;} { (exit 1); exit 1; }; } fi echo >&2 "" { { echo "$as_me:$LINENO: error: aborting" >&5 echo "$as_me: error: aborting" >&2;} { (exit 1); exit 1; }; } ;; esac else sim_ac_msvcrt=singlethread-static fi; echo "$as_me:$LINENO: checking MSVC++ C library choice" >&5 echo $ECHO_N "checking MSVC++ C library choice... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $sim_ac_msvcrt" >&5 echo "${ECHO_T}$sim_ac_msvcrt" >&6 CPPFLAGS="$CPPFLAGS $sim_ac_msvcrt_CPPFLAGS" CFLAGS="$CFLAGS $sim_ac_msvcrt_CFLAGS" CXXFLAGS="$CXXFLAGS $sim_ac_msvcrt_CXXFLAGS" LDFLAGS="$LDFLAGS $sim_ac_msvcrt_LDFLAGS" LIBS="$LIBS $sim_ac_msvcrt_LIBS" # sim_ac_msvcrt_LIBLIBS is set up at the end # sim_ac_msvcrt_LIBLDFLAGS is set up at the end DIME_MSVC_LIBC=$sim_ac_msvcrt 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done 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 set dummy "$as_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe" # 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. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include $ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext 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 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 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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. # 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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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 echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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. # 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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include $ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_declaration #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # 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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # 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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu LT_RELEASE=$DIME_MAJOR_VERSION.$DIME_MINOR_VERSION LT_CURRENT=`expr $DIME_MICRO_VERSION - $DIME_INTERFACE_AGE` LT_REVISION=$DIME_INTERFACE_AGE LT_AGE=`expr $DIME_BINARY_AGE - $DIME_INTERFACE_AGE` # These are used for constructing the dime-config file. DIME_EXTRA_CPPFLAGS=$CPPFLAGS DIME_EXTRA_CFLAGS=$CFLAGS DIME_EXTRA_CXXFLAGS=$CXXFLAGS DIME_EXTRA_LDFLAGS=$LDFLAGS DIME_EXTRA_LIBS=$LIBS # 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" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path if test "${CDPATH+set}" = set; then CDPATH=${ZSH_VERSION+.}: # as recommended in autoconf.texi fi am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= am_backtick='`' { echo "$as_me:$LINENO: WARNING: ${am_backtick}missing' script is too old or missing" >&5 echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;} 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="${MAKE}"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # Check whether --enable-dependency-tracking or --disable-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 rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null ac_config_commands="$ac_config_commands default-1" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include='#' am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote='"' _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # test to see if srcdir already configured if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # Define the identity of the package. PACKAGE=libdime VERSION=$VERSION cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. # Autoconf 2.50 always computes EXEEXT. However we need to be # compatible with 2.13, for now. So we always define EXEEXT, but we # don't compute it. # Similar for OBJEXT -- only we only use OBJEXT if the user actually # requests that it be used. This is a bit dumb. : ${OBJEXT=o} # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CC_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type" depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # 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. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_CXX_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE="depmode=$am_cv_CXX_dependencies_compiler_type" # Check whether --enable-static or --disable-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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac else enable_static=no fi; echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-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; echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$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 if $BUILD_WITH_MSVC; then RANLIB=: export RANLIB fi # Check whether --enable-shared or --disable-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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-fast-install or --disable-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. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac else enable_fast_install=yes fi; # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi # Check whether --with-gnu-ld or --without-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. echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&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. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path 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 echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do 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 GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$lt_cv_path_LD" if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then lt_cv_prog_gnu_ld=yes else lt_cv_prog_gnu_ld=no fi fi echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/${ac_tool_prefix}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 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then lt_cv_path_NM="$tmp_nm -B" break elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then lt_cv_path_NM="$tmp_nm -p" break else 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 fi fi done IFS="$ac_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi NM="$lt_cv_path_NM" echo "$as_me:$LINENO: result: $NM" >&5 echo "${ECHO_T}$NM" >&6 echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 egrep 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 aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) 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* | mingw* | pw32*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in rhapsody* | darwin1.[012]) lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` ;; *) # Darwin 1.3 on lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac ;; freebsd*) 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)/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 ;; hpux10.20*|hpux11*) 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_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6*) case $host_os in irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux-gnu*) case $host_cpu in alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' else lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' 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 ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;; sysv5uw[78]* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 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 ;; esac ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output" >&5 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix*) symcode='[BCDEGRST]' ;; solaris* | sysv5*) symcode='[BDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $host_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[ABCDGISTW]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$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=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = { EOF sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest; then pipe_works=yes fi LIBS="$save_LIBS" CFLAGS="$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 -f 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 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" if test -z "$lt_cv_sys_global_symbol_pipe"; then global_symbol_to_cdecl= global_symbol_to_c_name_address= else global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" fi if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include #include #include #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #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)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do 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 <&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 EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do 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 <&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 EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-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 *-*-irix6*) # Find out which ABI we are using. echo '#line 4999 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then 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 rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$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 ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' 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' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" need_locks="$enable_libtool_lock" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o if test x"$host" != x"$build"; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac 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 # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null echo "$as_me:$LINENO: result: $objdir" >&5 echo "${ECHO_T}$objdir" >&6 # Check whether --with-pic or --without-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 # We assume here that the value for lt_cv_prog_cc_pic will not be cached # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "${lt_cv_prog_cc_pic+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_cc_pic= lt_cv_prog_cc_shlib= lt_cv_prog_cc_wl= lt_cv_prog_cc_static= lt_cv_prog_cc_no_builtin= lt_cv_prog_cc_can_build_shared=$can_build_shared if test "$GCC" = yes; then lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-static' case $host_os in aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # not sure about C++ programs. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ;; amigaos*) # 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_cv_prog_cc_pic='-fno-common' ;; cygwin* | mingw* | pw32* | os2*) # 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_cv_prog_cc_pic='-DDLL_EXPORT' ;; sysv4*MP*) if test -d /usr/nec; then lt_cv_prog_cc_pic=-Kconform_pic fi ;; *) lt_cv_prog_cc_pic='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case $host_os in aix3* | aix4* | aix5*) lt_cv_prog_cc_wl='-Wl,' # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_cv_prog_cc_static='-Bstatic' else lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' fi ;; hpux9* | hpux10* | hpux11*) # Is there a better lt_cv_prog_cc_static that works with the bundled CC? lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" lt_cv_prog_cc_pic='+Z' ;; irix5* | irix6*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | pw32* | os2*) # 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_cv_prog_cc_pic='-DDLL_EXPORT' ;; newsos6) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' ;; sco3.2v5*) lt_cv_prog_cc_pic='-Kpic' lt_cv_prog_cc_static='-dn' lt_cv_prog_cc_shlib='-belf' ;; solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; sunos4*) lt_cv_prog_cc_pic='-PIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' if test "x$host_vendor" = xsni; then lt_cv_prog_cc_wl='-LD' else lt_cv_prog_cc_wl='-Wl,' fi ;; uts4*) lt_cv_prog_cc_pic='-pic' lt_cv_prog_cc_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_cv_prog_cc_pic='-Kconform_pic' lt_cv_prog_cc_static='-Bstatic' fi ;; *) lt_cv_prog_cc_can_build_shared=no ;; esac fi fi if test -z "$lt_cv_prog_cc_pic"; then echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 else echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 # Check to make sure the pic_flag actually works. echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 if test "${lt_cv_prog_cc_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then case $host_os in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then # they create non-PIC objects. So, if there were any warnings, we # assume that PIC is not supported. if test -s conftest.err; then lt_cv_prog_cc_pic_works=no else lt_cv_prog_cc_pic_works=yes fi ;; *) lt_cv_prog_cc_pic_works=yes ;; esac else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 lt_cv_prog_cc_pic_works=no fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi if test "X$lt_cv_prog_cc_pic_works" = Xno; then lt_cv_prog_cc_pic= lt_cv_prog_cc_can_build_shared=no else lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" fi echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 fi # Check for any special shared library compilation flags. if test -n "$lt_cv_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 if test "${lt_cv_prog_cc_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_cc_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_prog_cc_static_works=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi # Belt *and* braces to stop my trousers falling down: test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 pic_flag="$lt_cv_prog_cc_pic" special_shlib_compile_flags="$lt_cv_prog_cc_shlib" wl="$lt_cv_prog_cc_wl" link_static_flag="$lt_cv_prog_cc_static" no_builtin_flag="$lt_cv_prog_cc_no_builtin" can_build_shared="$lt_cv_prog_cc_can_build_shared" # Check to see if options -o and -c are simultaneously supported by compiler echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else $rm -r conftest 2>/dev/null mkdir conftest cd conftest echo "int some_variable = 0;" > conftest.$ac_ext mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no if { (eval echo configure:5535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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 if test -s out/conftest.err; then lt_cv_compiler_c_o=no else lt_cv_compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&5 lt_cv_compiler_c_o=no fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null fi compiler_c_o=$lt_cv_compiler_c_o echo "$as_me:$LINENO: result: $compiler_c_o" >&5 echo "${ECHO_T}$compiler_c_o" >&6 if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 if test "${lt_cv_compiler_o_lo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_compiler_o_lo=no save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" save_objext="$ac_objext" ac_objext=lo cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int some_variable = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then lt_cv_compiler_o_lo=no else lt_cv_compiler_o_lo=yes fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_objext="$save_objext" CFLAGS="$save_CFLAGS" fi compiler_o_lo=$lt_cv_compiler_o_lo echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 echo "${ECHO_T}$compiler_o_lo" >&6 else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 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 if test "$GCC" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" compiler_rtti_exceptions=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int some_variable = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then compiler_rtti_exceptions=no else compiler_rtti_exceptions=yes fi else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 echo "${ECHO_T}$compiler_rtti_exceptions" >&6 if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # See if the linker supports building shared libraries. echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_into_libs=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= link_all_deplibs=unknown always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # 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 egrep regular expression 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_" # 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. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # 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 ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX, the GNU linker is very broken # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) 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 # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': 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*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. # FIXME: what about values for MSVC? dll_entry=__cygwin_dll_entry@12 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ case $host_os in mingw*) # mingw values dll_entry=_DllMainCRTStartup@12 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ;; esac # mingw and cygwin differ, and it's simplest to just exclude the union # of the two symbol sets. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one (in ltdll.c) if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else ltdll_obj= ltdll_cmds= fi # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left be newer dlltools. export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \$# in 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done; fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&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. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 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 ;; 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 | egrep ': supported targets:.* elf' > /dev/null; then 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 if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw* | pw32*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac 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 "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) 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].*|aix5*) 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. hardcode_direct=yes archive_cmds='' hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes 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' else # not using gcc if test "$host_cpu" = ia64; then shared_flag='${wl}-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall can do strange things, 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' hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. allow_undefined_flag='${wl}-berok' # This is a bit strange, but is similar to how AIX traditionally builds # it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' fi fi ;; amigaos*) 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 # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw* | pw32*) # 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. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''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' fix_srcfile_path='`cygpath -w "$srcfile"`' ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on allow_undefined_flag='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. archive_cmds='$nonopt $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes hardcode_shlibpath_var=no whole_archive_flag_spec='-all_load $convenience' ;; 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*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case $host_os in hpux9*) 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' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: 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 ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no 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 $linker_flags' 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 $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' #Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) 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 export_dynamic_flag_spec='${wl}-Bexport' ;; solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of # the object symbols generated in some cases. Libraries that use # assert need libgcc.a to resolve __eprintf, for example. Linking # a copy of libgcc.a into every shared library to guarantee resolving # such symbols causes other problems: According to Tim Van Holder # , C++ libraries end up with a separate # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' if test "$GCC" = yes; then case `$CC --version 2>/dev/null` in [12].*) cat <&2 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably *** create self contained shared libraries on Solaris systems, without *** introducing a dependency on libgcc.a. Therefore, libtool is disabling *** -no-undefined support, which will at least allow you to build shared *** libraries. However, you may find that when you link such libraries *** into an application without using GCC, you have to manually add *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to *** upgrade to a newer version of GCC. Another option is to rebuild your *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. EOF no_undefined_flag= ;; esac fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; 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) if test "x$host_vendor" = xsno; then archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? else 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 fi 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' ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now 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' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; 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.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5uw7* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # Check hardcoding attributes. echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant 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 "$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 echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi reload_cmds='$LD$reload_flag -o $output$reload_objs' test -z "$deplibs_check_method" && deplibs_check_method=unknown # PORTME Fill in your ld.so characteristics echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= 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" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4* | aix5*) version_type=linux if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' 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}.so$versuffix ${libname}${release}.so$major $libname.so' 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}.so$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) 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=`$echo "X$lib" | $Xsed -e '\''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' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$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" export_dynamic_flag_spec=-rdynamic # 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*) version_type=windows need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin*) library_names_spec='$libname.dll.a' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog .libs/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' ;; yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ;; yes,pw32*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' ;; *) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # 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 # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; *) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH 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. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) version_type=irix need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in irix5*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") 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}" ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # 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 # 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}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no 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 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=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 ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 ;; aix4*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 if test "$hardcode_action" = relink; 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 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 "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 ;; cygwin* | mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); char (*f) (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else f = shl_load; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); char (*f) (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else f = dlopen; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" 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" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #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 #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=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; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 < #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 #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=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; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$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 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. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 if test "${lt_cv_archive_cmds_need_lc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else $rm conftest* echo 'static int dummy;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_cv_prog_cc_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$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=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$save_allow_undefined_flag else cat conftest.err 1>&5 fi fi echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 ;; esac fi need_lc=${lt_cv_archive_cmds_need_lc-yes} # The second clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then : else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. test -f Makefile && make "$ltmain" fi if test -f "$ltmain"; then trap "$rm \"${ofile}T\"; exit 1" 1 2 15 $rm -f "${ofile}T" echo creating $ofile # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ old_striplib striplib file_magic_cmd export_symbols_cmds \ deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ global_symbol_to_c_name_address \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case $var in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done cat <<__EOF__ > "${ofile}T" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$need_lc # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # The default C compiler. CC=$lt_CC # Is the compiler the GNU C compiler? with_gcc=$GCC # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_pic_flag pic_mode=$pic_mode # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$lt_compiler_o_lo # Must we lock files when doing compilation ? need_locks=$lt_need_locks # 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 # 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 # Compiler flag to prevent dynamic linking. link_static_flag=$lt_link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_no_builtin_flag # 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 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # 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 # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # 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 and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # 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 # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # 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 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # 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 # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # 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 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_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 # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "${ofile}T" # 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 EOF ;; esac case $host_os in cygwin* | mingw* | pw32* | os2*) cat <<'EOF' >> "${ofile}T" # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # 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. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # /* O_BINARY isn't required (or even defined sometimes) under Unix */ # #ifndef O_BINARY # #define O_BINARY 0 # #endif # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) mv -f "${ofile}T" "$ofile" || \ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") chmod +x "$ofile" fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion CPPFLAGS="$CPPFLAGS -DDIME_INTERNAL" sim_ac_build_library=true dime_build_dir=`pwd` dime_src_dir=`cd "$srcdir"; pwd` # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" case "${enableval}" in yes) enable_debug=yes ;; no) enable_debug=no ;; *) { { echo "$as_me:$LINENO: error: bad value \"${enableval}\" for --enable-debug" >&5 echo "$as_me: error: bad value \"${enableval}\" for --enable-debug" >&2;} { (exit 1); exit 1; }; } ;; esac else enable_debug=yes fi; if test "x$enable_debug" = "xno"; then CXXFLAGS="$CXXFLAGS -DNDEBUG" fi if test "x$ac_cv_prog_cxx_g" = "xyes"; then # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" case "${enableval}" in yes) enable_symbols=yes ;; no) enable_symbols=no ;; *) { { echo "$as_me:$LINENO: error: bad value \"${enableval}\" for --enable-symbols" >&5 echo "$as_me: error: bad value \"${enableval}\" for --enable-symbols" >&2;} { (exit 1); exit 1; }; } ;; esac else enable_symbols=yes fi; if test "x$enable_symbols" = "xno"; then CXXFLAGS="`echo $CXXFLAGS | sed 's/-g//'`" fi fi if test "x$ac_cv_prog_cxx_g" = "xyes"; then # Check whether --enable-profile or --disable-profile was given. if test "${enable_profile+set}" = set; then enableval="$enable_profile" case "${enableval}" in yes) enable_profile=yes ;; no) enable_profile=no ;; *) { { echo "$as_me:$LINENO: error: bad value \"${enableval}\" for --enable-profile" >&5 echo "$as_me: error: bad value \"${enableval}\" for --enable-profile" >&2;} { (exit 1); exit 1; }; } ;; esac else enable_profile=no fi; if test "x$enable_profile" = "xyes"; then CXXFLAGS="$CXXFLAGS -pg" LDFLAGS="$LDFLAGS -pg" fi fi if test "x$ac_cv_cxx_compiler_gnu" = "xyes"; then # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" case "${enableval}" in yes) enable_warnings=yes ;; no) enable_warnings=no ;; *) { { echo "$as_me:$LINENO: error: bad value \"${enableval}\" for --enable-warnings" >&5 echo "$as_me: error: bad value \"${enableval}\" for --enable-warnings" >&2;} { (exit 1); exit 1; }; } ;; esac else enable_warnings=no fi; if test "x$enable_warnings" = "xyes"; then CXXFLAGS="$CXXFLAGS -W -Wall" fi fi # ************************************************************************** sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in -I$includedir $DIME_EXTRA_CPPFLAGS; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done DIME_EXTRA_CPPFLAGS=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in -L$libdir $DIME_EXTRA_LDFLAGS; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done DIME_EXTRA_LDFLAGS=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in $DIME_EXTRA_LIBS; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done DIME_EXTRA_LIBS=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in $CPPFLAGS; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done CPPFLAGS=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in $LDFLAGS; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done LDFLAGS=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq sim_ac_save_prefix=$prefix sim_ac_save_exec_prefix=$exec_prefix test x"$prefix" = xNONE && prefix=/usr/local test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' sim_ac_uniqued_list= for sim_ac_item in $LIBS; do eval sim_ac_eval_item="$sim_ac_item" eval sim_ac_eval_item="$sim_ac_eval_item" if test x"$sim_ac_uniqued_list" = x; then sim_ac_uniqued_list="$sim_ac_item" else sim_ac_unique=true for sim_ac_uniq in $sim_ac_uniqued_list; do eval sim_ac_eval_uniq="$sim_ac_uniq" eval sim_ac_eval_uniq="$sim_ac_eval_uniq" test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false done $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" fi done LIBS=$sim_ac_uniqued_list prefix=$sim_ac_save_prefix exec_prefix=$sim_ac_save_exec_prefix # unset sim_ac_save_prefix # unset sim_ac_save_exec_prefix # unset sim_ac_eval_item # unset sim_ac_eval_uniq # ************************************************************************** # no DLL setup yet case $enable_static in yes | true) DIME_STATIC=true ;; *) DIME_STATIC=false ;; esac case $enable_shared in yes | true) DIME_STATIC=false ;; *) DIME_STATIC=true ;; esac # ************************************************************************** if $BUILD_WITH_MSVC; then BUILD_WITH_MSVC_TRUE= BUILD_WITH_MSVC_FALSE='#' else BUILD_WITH_MSVC_TRUE='#' BUILD_WITH_MSVC_FALSE= fi if $sim_ac_build_library; then if $BUILD_WITH_MSVC; then rm -f vc60.pdb LIBS="$LIBS $sim_ac_msvcrt_LIBLIBS" LIBFLAGS="$LIBFLAGS" # $sim_ac_msvcrt_LIBLDFLAGS if $DIME_STATIC; then DIME_EXTRA_CPPFLAGS="$DIME_EXTRA_CPPFLAGS -DDIME_NOT_DLL" else CPPFLAGS="-DDIME_MAKE_DLL $CPPFLAGS" DIME_EXTRA_CPPFLAGS="$DIME_EXTRA_CPPFLAGS -DDIME_DLL" fi debugfile="`pwd`/src/dime${DIME_MAJOR_VERSION}${SUFFIX}.pdb" debugfile=`cygpath -w "$debugfile" | sed 's,\\\\,\\\\\\\\,g'` if $DIME_STATIC; then if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="Dime build type:static .lib" else sim_ac_configuration_settings="$sim_ac_configuration_settings|Dime build type:static .lib" fi LIBFLAGS="-LIB $LIBFLAGS" LIBFLAGS="$LIBFLAGS /OUT:dime$DIME_MAJOR_VERSION$SUFFIX.lib" else LIBFLAGS="-DLL /INCREMENTAL:NO $LIBFLAGS" case $enable_symbols in no | false) if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="Dime build type:dynamic .dll, no symbols" else sim_ac_configuration_settings="$sim_ac_configuration_settings|Dime build type:dynamic .dll, no symbols" fi LIBFLAGS="$LIBFLAGS /RELEASE" ;; *) if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="Dime build type:dynamic .dll + .pdb" else sim_ac_configuration_settings="$sim_ac_configuration_settings|Dime build type:dynamic .dll + .pdb" fi CFLAGS="/Fd$debugfile -g $CFLAGS" CXXFLAGS="/Fd$debugfile -g $CXXFLAGS" LIBFLAGS="$LIBFLAGS /DEBUG /PDB:dime$DIME_MAJOR_VERSION$SUFFIX.pdb" ;; esac LIBFLAGS="$LIBFLAGS /OUT:dime$DIME_MAJOR_VERSION$SUFFIX.dll" fi if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="C library linkage:$sim_ac_msvcrt" else sim_ac_configuration_settings="$sim_ac_configuration_settings|C library linkage:$sim_ac_msvcrt" fi # We use a version suffix on the .dll-file, so several incompatible # (major) versions can be installed on a system. # # BTW, when linking DLLs, the 3rd-party .lib files will be # linked into the .dll file. I believe it is still advisable to # list all libs used upon `dime-config --libs`, as we can then # also use them from "parent" code (remember that their interfaces # is not exposed from the DLL) without any fuss. if test -n "$DIME_EXTRA_LIBS"; then DIME_EXTRA_LIBS="-ldime${DIME_MAJOR_VERSION}${SUFFIX} $DIME_EXTRA_LIBS" else DIME_EXTRA_LIBS="-ldime${DIME_MAJOR_VERSION}${SUFFIX}" fi else if test -n "$DIME_EXTRA_LIBS"; then DIME_EXTRA_LIBS="-ldime${SUFFIX} $DIME_EXTRA_LIBS" else DIME_EXTRA_LIBS="-ldime${SUFFIX}" fi fi DIME_COMPILER="$CXX" if $BUILD_WITH_MSVC; then # we'll use the installed wrapper when we use the dime-config script later # so we can remove the source code hierarchy DIME_COMPILER="wrapmsvc" fi sim_ac_path_problem=true # until proven otherwise if test -d "${bindir}"; then # search by inode seems safer than strings because of noncanonical paths ( findinode=`ls -id "$prefix/bin" 2>/dev/null | sed 's/^\( *\)\(0-9*\).*/\2/g'` IFS=:; for dir in $PATH; do inode=`ls -id "$dir" 2>/dev/null | sed 's/^\( *\)\(0-9*\).*/\2/g'`; test x"$inode" = x"$findinode" && exit 0 done; exit 1 ) && sim_ac_path_problem=false fi if $sim_ac_path_problem; then ( IFS=:; for dir in $PATH; do test x"$dir" = x"${bindir}" && exit 0 done; exit 1 ) && sim_ac_path_problem=false fi if $sim_ac_path_problem; then if test x${sim_ac_configuration_warnings+set} != xset; then sim_ac_configuration_warnings="Your \$PATH variable does not appear to include \"$prefix/bin\"" else sim_ac_configuration_warnings="$sim_ac_configuration_warnings|Your \$PATH variable does not appear to include \"$prefix/bin\"" fi fi else if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="Dime build type:build disabled" else sim_ac_configuration_settings="$sim_ac_configuration_settings|Dime build type:build disabled" fi fi # ************************************************************************** DIME_DSP_LIBDIRS= DIME_DSP_LIBS= DIME_DSP_INCS= DIME_DSP_DEFS= if $sim_ac_make_dsp; then if test x${sim_ac_configuration_settings+set} != xset; then sim_ac_configuration_settings="Dime build type:msvc .dsp" else sim_ac_configuration_settings="$sim_ac_configuration_settings|Dime build type:msvc .dsp" fi # -DHAVE_CONFIG_H is set up in $DEFS too late for use to use, and some # include directives are usually set up in the Makefile.am files for arg in -DHAVE_CONFIG_H -I$dime_build_dir -I$dime_build_dir/include -I$dime_src_dir/include $CPPFLAGS $LDFLAGS $LIBS; do case $arg in -L* ) libdir=`echo $arg | cut -c3-` DIME_DSP_LIBDIRS="$DIME_DSP_LIBDIRS $libdir" ;; -l* ) libname=`echo $arg | cut -c3-` for libdir in $DIME_DSP_LIBDIRS; do if test -f $libdir/$libname.lib; then # lib is not in any standard location - use full path libname=`cygpath -w "$libdir/$libname" 2>/dev/null || echo "$libdir/$libname"` break fi done if test x"$DIME_DSP_LIBS" = x""; then DIME_DSP_LIBS="$libname.lib" else DIME_DSP_LIBS="$DIME_DSP_LIBS $libname.lib" fi ;; -I* ) incdir=`echo $arg | cut -c3-` incdir=`cygpath -w "$incdir" 2>/dev/null || echo "$incdir"` if test x"$DIME_DSP_INCS" = x""; then DIME_DSP_INCS="/I \"$incdir\"" else DIME_DSP_INCS="$DIME_DSP_INCS /I \"$incdir\"" fi ;; -DDIME_DEBUG* | -DNDEBUG ) # Defines that vary between release/debug configurations can't be # set up dynamically in _DSP_DEFS - they must be static in the # gendsp.sh script. We therefore catche them here so we can ignore # checking for them below. ;; -D*=* | -D* ) define=`echo $arg | cut -c3-` if test x"$DIME_DSP_DEFS" = x""; then DIME_DSP_DEFS="/D \"$define\"" else DIME_DSP_DEFS="$DIME_DSP_DEFS /D \"$define\"" fi ;; esac done CC=$dime_src_dir/cfg/gendsp.sh CXX=$dime_src_dir/cfg/gendsp.sh CXXLD=$dime_src_dir/cfg/gendsp.sh # Yes, this is totally bogus stuff, but don't worry about it. As long # as gendsp.sh recognizes it... 20030219 larsa CPPFLAGS="$CPPFLAGS -Ddspfile=$dime_build_dir/dime$DIME_MAJOR_VERSION.dsp" LDFLAGS="$LDFLAGS -Wl,-Ddspfile=$dime_build_dir/dime$DIME_MAJOR_VERSION.dsp" LIBFLAGS="$LIBFLAGS -o dime$DIME_MAJOR_VERSION.so.0" # this can't be set up at the point the libtool script is generated mv libtool libtool.bak sed -e "s%^CC=\"gcc\"%CC=\"$dime_src_dir/cfg/gendsp.sh\"%" \ -e "s%^CC=\".*/wrapmsvc.exe\"%CC=\"$dime_src_dir/cfg/gendsp.sh\"%" \ libtool rm -f libtool.bak chmod 755 libtool fi # ************************************************************************** ac_config_headers="$ac_config_headers include/config.h" ac_config_files="$ac_config_files Makefile bin/Makefile src/Makefile src/classes/Makefile src/entities/Makefile src/objects/Makefile src/records/Makefile src/sections/Makefile src/tables/Makefile src/util/Makefile src/convert/Makefile dxf2vrml/Makefile dxfsphere/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 overriden 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, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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 SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # NLS nuisances. # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi (set +x; test -n "`(LANG=C; export LANG) 2>&1`") && { $as_unset LANG || test "${LANG+set}" != set; } || { LANG=C; export LANG; } (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || { LC_ALL=C; export LC_ALL; } (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || { LC_TIME=C; export LC_TIME; } (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || { LC_CTYPE=C; export LC_CTYPE; } (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || { LANGUAGE=C; export LANGUAGE; } (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || { LC_COLLATE=C; export LC_COLLATE; } (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || { LC_NUMERIC=C; export LC_NUMERIC; } (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || { LC_MESSAGES=C; export LC_MESSAGES; } # Name of the executable. as_me=`(basename "$0") 2>/dev/null || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conftest.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by dime $as_me 0.9.1, which was generated by GNU Autoconf 2.53. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ dime config.status 0.9.1 configured by $0, generated by GNU Autoconf 2.53, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` shift set dummy "$ac_option" "$ac_optarg" ${1+"$@"} shift ;; -*);; *) # This is not an option, so the user has probably given explicit # arguments. ac_need_defaults=false;; esac case $1 in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) shift CONFIG_FILES="$CONFIG_FILES $1" ac_need_defaults=false;; --header | --heade | --head | --hea ) shift CONFIG_HEADERS="$CONFIG_HEADERS $1" ac_need_defaults=false;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/classes/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/classes/Makefile" ;; "src/entities/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/entities/Makefile" ;; "src/objects/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/objects/Makefile" ;; "src/records/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/records/Makefile" ;; "src/sections/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/sections/Makefile" ;; "src/tables/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tables/Makefile" ;; "src/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;; "src/convert/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/convert/Makefile" ;; "dxf2vrml/Makefile" ) CONFIG_FILES="$CONFIG_FILES dxf2vrml/Makefile" ;; "dxfsphere/Makefile" ) CONFIG_FILES="$CONFIG_FILES dxfsphere/Makefile" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; 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 # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. : ${TMPDIR=/tmp} { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/cs$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@DIME_MAJOR_VERSION@,$DIME_MAJOR_VERSION,;t t s,@DIME_MINOR_VERSION@,$DIME_MINOR_VERSION,;t t s,@DIME_MICRO_VERSION@,$DIME_MICRO_VERSION,;t t s,@DIME_BETA_VERSION@,$DIME_BETA_VERSION,;t t s,@DIME_VERSION@,$DIME_VERSION,;t t s,@DIME_INTERFACE_AGE@,$DIME_INTERFACE_AGE,;t t s,@DIME_BINARY_AGE@,$DIME_BINARY_AGE,;t t s,@BUILD_WITH_MSVC@,$BUILD_WITH_MSVC,;t t s,@DIME_MSVC_LIBC@,$DIME_MSVC_LIBC,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXCPP@,$CXXCPP,;t t s,@LT_RELEASE@,$LT_RELEASE,;t t s,@LT_CURRENT@,$LT_CURRENT,;t t s,@LT_REVISION@,$LT_REVISION,;t t s,@LT_AGE@,$LT_AGE,;t t s,@SUFFIX@,$SUFFIX,;t t s,@DIME_EXTRA_CPPFLAGS@,$DIME_EXTRA_CPPFLAGS,;t t s,@DIME_EXTRA_CFLAGS@,$DIME_EXTRA_CFLAGS,;t t s,@DIME_EXTRA_CXXFLAGS@,$DIME_EXTRA_CXXFLAGS,;t t s,@DIME_EXTRA_LDFLAGS@,$DIME_EXTRA_LDFLAGS,;t t s,@DIME_EXTRA_LIBS@,$DIME_EXTRA_LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBFLAGS@,$LIBFLAGS,;t t s,@BUILD_WITH_MSVC_TRUE@,$BUILD_WITH_MSVC_TRUE,;t t s,@BUILD_WITH_MSVC_FALSE@,$BUILD_WITH_MSVC_FALSE,;t t s,@DIME_COMPILER@,$DIME_COMPILER,;t t s,@DIME_DSP_LIBS@,$DIME_DSP_LIBS,;t t s,@DIME_DSP_INCS@,$DIME_DSP_INCS,;t t s,@DIME_DSP_DEFS@,$DIME_DSP_DEFS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy="$ac_dir" for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" || { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; } ;; esac done; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # egrep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy="$ac_dir" for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" || { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; } ;; esac done; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Run the commands associated with the file. case $ac_file in include/config.h ) # update the timestamp echo timestamp >"include/stamp-h1" ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in default-1 ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do case "$mf" in Makefile) dirpart=.;; */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; *) continue;; esac grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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=`echo "$file" | sed -e 's|/[^/]*$||'` $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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=: exec 5>/dev/null $SHELL $CONFIG_STATUS || 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 || { (exit 1); exit 1; } fi # SIM_AC_CONFIGURATION_SUMMARY if $sim_ac_build_library; then echo "" echo "Now, run 'make install' to build and install Dime." echo "" else echo "" fi dime/configure.ac0100644017777301777730000002476107643260561012606 0ustar wwwwww m4_define([DIME_MAJOR], [0]) m4_define([DIME_MINOR], [9]) m4_define([DIME_MICRO], [1]) m4_define([DIME_BETA], []) m4_define([DIME_VERSION_STRING], [DIME_MAJOR.DIME_MINOR.DIME_MICRO[]DIME_BETA]) m4_define([DIME_ABI_VERSION], [0]) m4_define([DIME_ABI_AGE], [0]) m4_define([DIME_ABI_REVISION], [0]) # ************************************************************************** AC_INIT([dime], [DIME_VERSION_STRING], [dime-support@coin3d.org]) AC_CONFIG_SRCDIR([include/dime/Base.h]) AC_CONFIG_AUX_DIR([cfg]) AC_CANONICAL_SYSTEM AC_SUBST([DIME_MAJOR_VERSION], [DIME_MAJOR]) AC_SUBST([DIME_MINOR_VERSION], [DIME_MINOR]) AC_SUBST([DIME_MICRO_VERSION], [DIME_MICRO]) AC_SUBST([DIME_BETA_VERSION], [DIME_MICRO]) AC_SUBST([DIME_VERSION], [DIME_VERSION_STRING]) VERSION=$DIME_VERSION AC_SUBST(DIME_INTERFACE_AGE, 0) AC_SUBST(DIME_BINARY_AGE, 0) SIM_AC_MSVC_DSP_ENABLE_OPTION SIM_AC_SETUP_MSVCPP_IFELSE if $BUILD_WITH_MSVC; then SIM_AC_SETUP_MSVCRT([ CPPFLAGS="$CPPFLAGS $sim_ac_msvcrt_CPPFLAGS" CFLAGS="$CFLAGS $sim_ac_msvcrt_CFLAGS" CXXFLAGS="$CXXFLAGS $sim_ac_msvcrt_CXXFLAGS" LDFLAGS="$LDFLAGS $sim_ac_msvcrt_LDFLAGS" LIBS="$LIBS $sim_ac_msvcrt_LIBS" # sim_ac_msvcrt_LIBLIBS is set up at the end # sim_ac_msvcrt_LIBLDFLAGS is set up at the end AC_SUBST([DIME_MSVC_LIBC], [$sim_ac_msvcrt]) ]) fi dnl Locate C++ compiler and set C++ as the default compiler to run dnl in tests. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_LANG([C++]) dnl ******************************************************************* dnl * Library version control. dnl ******************************************************************* dnl Making releases: dnl DIME_MICRO_VERSION += 1; dnl DIME_INTERFACE_AGE += 1; dnl DIME_BINARY_AGE += 1; dnl if any functions have been added, set DIME_INTERFACE_AGE to 0. dnl if backwards compatibility has been broken, dnl set DIME_BINARY_AGE _and_ DIME_INTERFACE_AGE to 0. dnl dnl libtool versioning LT_RELEASE=$DIME_MAJOR_VERSION.$DIME_MINOR_VERSION LT_CURRENT=`expr $DIME_MICRO_VERSION - $DIME_INTERFACE_AGE` LT_REVISION=$DIME_INTERFACE_AGE LT_AGE=`expr $DIME_BINARY_AGE - $DIME_INTERFACE_AGE` AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) AC_SUBST([SUFFIX], []) # These are used for constructing the dime-config file. AC_SUBST([DIME_EXTRA_CPPFLAGS], [$CPPFLAGS]) AC_SUBST([DIME_EXTRA_CFLAGS], [$CFLAGS]) AC_SUBST([DIME_EXTRA_CXXFLAGS], [$CXXFLAGS]) AC_SUBST([DIME_EXTRA_LDFLAGS], [$LDFLAGS]) AC_SUBST([DIME_EXTRA_LIBS], [$LIBS]) dnl ******************************************************************* dnl * Miscellaneous options and initializations. dnl ******************************************************************* AM_INIT_AUTOMAKE(libdime, $VERSION) dnl Default to not building a static library. dnl Can be overridden by the user with --enable-static. AM_DISABLE_STATIC dnl Turn off default maintainer make-rules -- use ./autogen.sh instead. AM_MAINTAINER_MODE if $BUILD_WITH_MSVC; then RANLIB=: export RANLIB fi dnl Initialize libtool AC_PROG_LIBTOOL CPPFLAGS="$CPPFLAGS -DDIME_INTERNAL" sim_ac_build_library=true dime_build_dir=`pwd` dime_src_dir=`cd "$srcdir"; pwd` dnl ******************************************************************* dnl * Enable/disable compilation with debug information. dnl ******************************************************************* AC_ARG_ENABLE(debug, [ --enable-debug turn on Dime debugging [default=yes]], [case "${enableval}" in yes) enable_debug=yes ;; no) enable_debug=no ;; *) AC_MSG_ERROR(bad value "${enableval}" for --enable-debug) ;; esac], enable_debug=yes) if test "x$enable_debug" = "xno"; then CXXFLAGS="$CXXFLAGS -DNDEBUG" fi dnl ******************************************************************* dnl * Enable/disable compilation with symbol information. dnl ******************************************************************* if test "x$ac_cv_prog_cxx_g" = "xyes"; then AC_ARG_ENABLE(symbols, [ --enable-symbols turn on symbol debug information [default=yes]], [case "${enableval}" in yes) enable_symbols=yes ;; no) enable_symbols=no ;; *) AC_MSG_ERROR(bad value "${enableval}" for --enable-symbols) ;; esac], enable_symbols=yes) if test "x$enable_symbols" = "xno"; then CXXFLAGS="`echo $CXXFLAGS | sed 's/-g//'`" fi fi dnl ******************************************************************* dnl * Enable/disable compilation with profiling information dnl * for parsing by gprof (this is a g++ only option). dnl ******************************************************************* if test "x$ac_cv_prog_cxx_g" = "xyes"; then AC_ARG_ENABLE(profile, [ --enable-profile turn on inclusion of profiling code [default=no]], [case "${enableval}" in yes) enable_profile=yes ;; no) enable_profile=no ;; *) AC_MSG_ERROR(bad value "${enableval}" for --enable-profile) ;; esac], enable_profile=no) if test "x$enable_profile" = "xyes"; then CXXFLAGS="$CXXFLAGS -pg" LDFLAGS="$LDFLAGS -pg" fi fi dnl ******************************************************************* dnl * Enable/disable compilation with warnings turned on (g++ only). dnl ******************************************************************* if test "x$ac_cv_prog_gxx" = "xyes"; then AC_ARG_ENABLE(warnings, [ --enable-warnings turn on warnings when compiling [default=no]], [case "${enableval}" in yes) enable_warnings=yes ;; no) enable_warnings=no ;; *) AC_MSG_ERROR(bad value "${enableval}" for --enable-warnings) ;; esac], enable_warnings=no) if test "x$enable_warnings" = "xyes"; then CXXFLAGS="$CXXFLAGS -W -Wall" fi fi # ************************************************************************** SIM_AC_UNIQIFY_LIST(DIME_EXTRA_CPPFLAGS, -I$includedir $DIME_EXTRA_CPPFLAGS) SIM_AC_UNIQIFY_LIST(DIME_EXTRA_LDFLAGS, -L$libdir $DIME_EXTRA_LDFLAGS) SIM_AC_UNIQIFY_LIST(DIME_EXTRA_LIBS, $DIME_EXTRA_LIBS) SIM_AC_UNIQIFY_LIST(CPPFLAGS, $CPPFLAGS) SIM_AC_UNIQIFY_LIST(LDFLAGS, $LDFLAGS) SIM_AC_UNIQIFY_LIST(LIBS, $LIBS) # ************************************************************************** # no DLL setup yet case $enable_static in yes | true) DIME_STATIC=true ;; *) DIME_STATIC=false ;; esac case $enable_shared in yes | true) DIME_STATIC=false ;; *) DIME_STATIC=true ;; esac AC_SUBST([LIBFLAGS], []) # ************************************************************************** AM_CONDITIONAL([BUILD_WITH_MSVC], [$BUILD_WITH_MSVC]) if $sim_ac_build_library; then if $BUILD_WITH_MSVC; then rm -f vc60.pdb LIBS="$LIBS $sim_ac_msvcrt_LIBLIBS" LIBFLAGS="$LIBFLAGS" # $sim_ac_msvcrt_LIBLDFLAGS if $DIME_STATIC; then DIME_EXTRA_CPPFLAGS="$DIME_EXTRA_CPPFLAGS -DDIME_NOT_DLL" else CPPFLAGS="-DDIME_MAKE_DLL $CPPFLAGS" DIME_EXTRA_CPPFLAGS="$DIME_EXTRA_CPPFLAGS -DDIME_DLL" fi debugfile="`pwd`/src/dime${DIME_MAJOR_VERSION}${SUFFIX}.pdb" debugfile=`cygpath -w "$debugfile" | sed 's,\\\\,\\\\\\\\,g'` if $DIME_STATIC; then SIM_AC_CONFIGURATION_SETTING([Dime build type], [static .lib]) LIBFLAGS="-LIB $LIBFLAGS" LIBFLAGS="$LIBFLAGS /OUT:dime$DIME_MAJOR_VERSION$SUFFIX.lib" else LIBFLAGS="-DLL /INCREMENTAL:NO $LIBFLAGS" case $enable_symbols in no | false) SIM_AC_CONFIGURATION_SETTING([Dime build type], [dynamic .dll, no symbols]) LIBFLAGS="$LIBFLAGS /RELEASE" ;; *) SIM_AC_CONFIGURATION_SETTING([Dime build type], [dynamic .dll + .pdb]) CFLAGS="/Fd$debugfile -g $CFLAGS" CXXFLAGS="/Fd$debugfile -g $CXXFLAGS" LIBFLAGS="$LIBFLAGS /DEBUG /PDB:dime$DIME_MAJOR_VERSION$SUFFIX.pdb" ;; esac LIBFLAGS="$LIBFLAGS /OUT:dime$DIME_MAJOR_VERSION$SUFFIX.dll" fi SIM_AC_CONFIGURATION_SETTING([C library linkage], [$sim_ac_msvcrt]) # We use a version suffix on the .dll-file, so several incompatible # (major) versions can be installed on a system. # # BTW, when linking DLLs, the 3rd-party .lib files will be # linked into the .dll file. I believe it is still advisable to # list all libs used upon `dime-config --libs`, as we can then # also use them from "parent" code (remember that their interfaces # is not exposed from the DLL) without any fuss. if test -n "$DIME_EXTRA_LIBS"; then DIME_EXTRA_LIBS="-ldime${DIME_MAJOR_VERSION}${SUFFIX} $DIME_EXTRA_LIBS" else DIME_EXTRA_LIBS="-ldime${DIME_MAJOR_VERSION}${SUFFIX}" fi else if test -n "$DIME_EXTRA_LIBS"; then DIME_EXTRA_LIBS="-ldime${SUFFIX} $DIME_EXTRA_LIBS" else DIME_EXTRA_LIBS="-ldime${SUFFIX}" fi fi DIME_COMPILER="$CXX" if $BUILD_WITH_MSVC; then # we'll use the installed wrapper when we use the dime-config script later # so we can remove the source code hierarchy DIME_COMPILER="wrapmsvc" fi AC_SUBST(DIME_COMPILER) sim_ac_path_problem=true # until proven otherwise if test -d "${bindir}"; then # search by inode seems safer than strings because of noncanonical paths ( findinode=`ls -id "$prefix/bin" 2>/dev/null | sed 's/^\([ ]*\)\([0-9]*\).*/\2/g'` IFS=:; for dir in $PATH; do inode=`ls -id "$dir" 2>/dev/null | sed 's/^\([ ]*\)\([0-9]*\).*/\2/g'`; test x"$inode" = x"$findinode" && exit 0 done; exit 1 ) && sim_ac_path_problem=false fi if $sim_ac_path_problem; then ( IFS=:; for dir in $PATH; do test x"$dir" = x"${bindir}" && exit 0 done; exit 1 ) && sim_ac_path_problem=false fi if $sim_ac_path_problem; then SIM_AC_CONFIGURATION_WARNING([Your \$PATH variable does not appear to include \"$prefix/bin\"]) fi else SIM_AC_CONFIGURATION_SETTING([Dime build type], [build disabled]) fi # ************************************************************************** SIM_AC_MSVC_DSP_SETUP([DIME], [Dime], [dime], [-I$dime_build_dir -I$dime_build_dir/include -I$dime_src_dir/include]) # ************************************************************************** AM_CONFIG_HEADER([include/config.h]) AC_CONFIG_FILES([ Makefile bin/Makefile src/Makefile src/classes/Makefile src/entities/Makefile src/objects/Makefile src/records/Makefile src/sections/Makefile src/tables/Makefile src/util/Makefile src/convert/Makefile dxf2vrml/Makefile dxfsphere/Makefile ]) AC_OUTPUT # SIM_AC_CONFIGURATION_SUMMARY if $sim_ac_build_library; then echo "" echo "Now, run 'make install' to build and install Dime." echo "" else echo "" fi dime/dime.cfg.in0100644017777301777730000000067107457035165012321 0ustar wwwwww# prefix is determined in coin-config, making the package "movable" # prefix="@prefix@" host="@host@" exec_prefix="@exec_prefix@" version="@DIME_VERSION@" cflags="@DIME_EXTRA_CFLAGS@" cppflags="@DIME_EXTRA_CPPFLAGS@" cxxflags="@DIME_EXTRA_CXXFLAGS@" ldflags="@DIME_EXTRA_LDFLAGS@" libs="@DIME_EXTRA_LIBS@" msvcrt="@DIME_MSVC_LIBC@" datadir="@datadir@" # includedir="@dimeincludedir@" frameworkdir="@frameworkdir@" compiler="@DIME_COMPILER@" dime/bin/0040755017777301777730000000000007733212517011057 5ustar wwwwwwdime/bin/Makefile.am0100644017777301777730000000031507457035027013111 0ustar wwwwww # This has to be a separate subdir so bin/ won't be created in the # Mac OS X framework and coin-config won't be installed when you are not # building the library at all. dist_bin_SCRIPTS = coin-config dime/bin/Makefile.in0100644017777301777730000001606307470160151013121 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ # This has to be a separate subdir so bin/ won't be created in the # Mac OS X framework and coin-config won't be installed when you are not # building the library at all. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ dist_bin_SCRIPTS = coin-config subdir = bin mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = SCRIPTS = $(dist_bin_SCRIPTS) DIST_SOURCES = DIST_COMMON = $(dist_bin_SCRIPTS) Makefile.am Makefile.in all: all-am .SUFFIXES: mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ f="`echo $$p|sed '$(transform)'`"; \ if test -f $$p; then \ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \ elif test -f $(srcdir)/$$p; then \ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-dist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ f="`echo $$p|sed '$(transform)'`"; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done uninstall-info-am: tags: TAGS TAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* 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 distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-dist_binSCRIPTS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am info info-am install install-am install-data \ install-data-am install-dist_binSCRIPTS install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool uninstall uninstall-am \ uninstall-dist_binSCRIPTS uninstall-info-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: dime/bin/dime-config0100755017777301777730000001274707457035027013200 0ustar wwwwww#! /bin/sh # ************************************************************************** # dime-config -- a utility for retrieving configuration information about # the installed Dime library. # # Authors: # Lars J. Aas # Morten Eriksen # program="$0" me=`echo "$0" | sed 's,^.*[/\\],,g'` wd=`echo "$0" | sed 's,/[^/]*$,,'` prefix=`cd "$wd/.."; pwd` hello=`echo hello | fmt -t -w70 2>&1` if test x"$hello" = x"hello"; then # 'fmt -t' works preformat="fmt -t -w76" sedformat='$ q; s/$/ \\/' else # sed script replacing "fmt -w76 | sed '2,$ s/^/ /g; $ q; 1,$ s/$/ \\/'" preformat="cat" sedformat='/^............................................................................./ { G s/^\([^\ ]\{1,76\}\) \(.*\)\(\ \)/\1 \\\3 \2/ P D }' if test xhello != x"`echo hello | sed -e $sedformat 2>&1`"; then sedformat="s/a/a/" fi fi usage="\ Usage: $me [OPTIONS] Options: --alternate= --cppflags --cflags --cxxflags --ldflags --libs --includedir --frameworkdir --datadir --msvcrt --have-feature --compile []... --link []... --build []... --version --usage | --help" alternate=default for arg do case $arg in --alternate=*) alternate=`echo $arg | cut -d= -f2-` ;; --debug) alternate=debug ;; esac done if test -f $prefix/share/Dime/conf/dime-$alternate.cfg; then configfile="$prefix/share/Dime/conf/dime-$alternate.cfg" . $configfile elif test -f $prefix/share/Dime/conf/dime-default.cfg; then configfile="$prefix/share/Dime/conf/dime-default.cfg" . $configfile else echo >&2 "$me: no default Dime config available" exit 1 fi while test $# -gt 0 do case $1 in --usage | --help) echo "$usage" ;; --version) echo "$version" ;; --cppflags) echo "$cppflags" ;; --cflags) echo "$cflags" ;; --cxxflags) echo "$cxxflags" ;; --ldflags) echo "$ldflags" ;; --libs) echo "$libs" ;; --msvcrt) echo "$msvcrt" ;; --includedir) echo "$includedir" ;; --frameworkdir) echo "$frameworkdir" ;; --datadir) echo "$datadir" ;; --have-feature) exitcode=1 eval "test x\${have_$2} = x1 && exitcode=0" exit $exitcode ;; --compile) shift if test $# -eq 1; then echo $compiler $CPPFLAGS $cppflags $CXXFLAGS $cxxflags -c $1 \ | $preformat | sed "$sedformat" $compiler \ $CPPFLAGS $cppflags \ $CXXFLAGS $cxxflags \ -c $1 || exit $? else for arg in $@; do $program --alternate="$alternate" --compile $arg || exit $? done fi exit 0 ;; --link) shift progname=$1 shift echo $compiler $LDFLAGS $ldflags -o $progname $@ $libs $LIBS \ | $preformat | sed "$sedformat" $compiler \ $LDFLAGS $ldflags \ -o $progname $@ \ $libs $LIBS || exit $? case $host in *-darwin*) echo "$me: making Mac OS X application" mkdir $progname.app 2>/dev/null mkdir $progname.app/Contents 2>/dev/null mkdir $progname.app/Contents/MacOS 2>/dev/null if test -d $progname.app/Contents/MacOS && mv -f $progname $progname.app/Contents/MacOS/ && echo "APPL????" >$progname.app/Contents/PkgInfo; then : else echo >&2 "$me: failed to make Mac OS X application" echo >&2 " - problem is probably user permission or disk space related" exit 1 fi ;; esac exit 0 ;; --build) # FIXME: support -I and -framework in addition to -l and -L shift progname=$1 objs= extraldflags= extralibs= shift for arg in $@; do case $arg in *.c | *.cpp | *.cxx | *.cc | *.c++) basename=`echo "$arg" | sed -e 's/\.[^\.]*$//'` $program --alternate="$alternate" --compile $arg || exit $? objfile=`ls $basename.o $basename.obj 2>/dev/null` objs="$objs $objfile" ;; -L*) extraldflags="$extraldflags $arg" ;; -l*) extralibs="$extralibs $arg" ;; esac done echo $compiler $LDFLAGS $ldflags $extraldflags \ -o $progname $objs $extralibs $libs $LIBS \ | $preformat | sed "$sedformat" $compiler \ $CPPFLAGS $cppflags \ $CXXFLAGS $cxxflags \ $LDFLAGS $ldflags $extraldflags \ -o $progname $objs \ $extralibs $libs $LIBS || exit $? case $host in *-darwin*) echo "$me: making Mac OS X application" mkdir $progname.app 2>/dev/null mkdir $progname.app/Contents 2>/dev/null mkdir $progname.app/Contents/MacOS 2>/dev/null if test -d $progname.app/Contents/MacOS && mv -f $progname $progname.app/Contents/MacOS/ && echo "APPL????" >$progname.app/Contents/PkgInfo; then : else echo >&2 "$me: failed to make Mac OS X application" echo >&2 " - problem is probably user permission or disk space related" exit 1 fi ;; esac exit 0 ;; # ignore some options --alternate=*) ;; --debug) ;; *) echo >&2 "$me: Invalid option: \"$1\"" echo >&2 "$usage" exit 1 ;; esac shift done exit 0 dime/build-tmake/0040755017777301777730000000000007733212517012505 5ustar wwwwwwdime/build-tmake/common.pro0100644017777301777730000001077206774130357014530 0ustar wwwwwwTEMPLATE = lib unix:INCLUDEPATH = $(ZLIBDIR)/include;../include win32:INCLUDEPATH = $(ZLIBDIR);../include HEADERS = ../include/Basic.h \ ../include/Base.h \ ../include/Input.h \ ../include/Output.h \ ../include/Model.h \ ../include/RecordHolder.h \ ../include/Layer.h \ ../include/State.h \ ../include/util/Array.h \ ../include/util/Dict.h \ ../include/util/Linear.h \ ../include/util/MemHandler.h \ ../include/util/BSPTree.h \ ../include/util/Box.h \ ../include/records/Record.h \ ../include/records/StringRecord.h \ ../include/records/Int8Record.h \ ../include/records/Int16Record.h \ ../include/records/Int32Record.h \ ../include/records/DoubleRecord.h \ ../include/records/HexRecord.h \ ../include/records/FloatRecord.h \ ../include/sections/Section.h \ ../include/sections/UnknownSection.h \ ../include/sections/EntitiesSection.h \ ../include/sections/BlocksSection.h \ ../include/sections/TablesSection.h \ ../include/sections/HeaderSection.h \ ../include/sections/ClassesSection.h \ ../include/sections/ObjectsSection.h \ ../include/classes/Class.h \ ../include/classes/UnknownClass.h \ ../include/objects/Object.h \ ../include/objects/UnknownObject.h \ ../include/entities/Entity.h \ ../include/entities/UnknownEntity.h \ ../include/entities/FaceEntity.h \ ../include/entities/ExtrusionEntity.h \ ../include/entities/3DFace.h \ ../include/entities/Polyline.h \ ../include/entities/Vertex.h \ ../include/entities/Line.h \ ../include/entities/Point.h \ ../include/entities/Block.h \ ../include/entities/Insert.h \ ../include/entities/Solid.h \ ../include/entities/Trace.h \ ../include/entities/Circle.h \ ../include/entities/Ellipse.h \ ../include/entities/Arc.h \ ../include/entities/LWPolyline.h \ ../include/entities/Spline.h \ ../include/tables/Table.h \ ../include/tables/TableEntry.h \ ../include/tables/UnknownTable.h \ ../include/tables/UCSTable.h \ ../include/tables/LayerTable.h SOURCES = ../src/Base.cpp \ ../src/Input.cpp \ ../src/Output.cpp \ ../src/Model.cpp \ ../src/RecordHolder.cpp \ ../src/Layer.cpp \ ../src/State.cpp \ ../src/util/Array.cpp \ ../src/util/Dict.cpp \ ../src/util/Linear.cpp \ ../src/util/MemHandler.cpp \ ../src/util/BSPTree.cpp \ ../src/util/Box.cpp \ ../src/records/Record.cpp \ ../src/records/StringRecord.cpp \ ../src/records/Int8Record.cpp \ ../src/records/Int16Record.cpp \ ../src/records/Int32Record.cpp \ ../src/records/DoubleRecord.cpp \ ../src/records/HexRecord.cpp \ ../src/records/FloatRecord.cpp \ ../src/sections/Section.cpp \ ../src/sections/UnknownSection.cpp \ ../src/sections/EntitiesSection.cpp \ ../src/sections/BlocksSection.cpp \ ../src/sections/TablesSection.cpp \ ../src/sections/HeaderSection.cpp \ ../src/sections/ClassesSection.cpp \ ../src/sections/ObjectsSection.cpp \ ../src/classes/Class.cpp \ ../src/classes/UnknownClass.cpp \ ../src/objects/Object.cpp \ ../src/objects/UnknownObject.cpp \ ../src/entities/Entity.cpp \ ../src/entities/UnknownEntity.cpp \ ../src/entities/FaceEntity.cpp \ ../src/entities/ExtrusionEntity.cpp \ ../src/entities/3DFace.cpp \ ../src/entities/Polyline.cpp \ ../src/entities/Vertex.cpp \ ../src/entities/Line.cpp \ ../src/entities/Point.cpp \ ../src/entities/Block.cpp \ ../src/entities/Insert.cpp \ ../src/entities/Solid.cpp \ ../src/entities/Trace.cpp \ ../src/entities/Circle.cpp \ ../src/entities/Ellipse.cpp \ ../src/entities/Spline.cpp \ ../src/entities/Arc.cpp \ ../src/entities/LWPolyline.cpp \ ../src/tables/Table.cpp \ ../src/tables/TableEntry.cpp \ ../src/tables/UnknownTable.cpp \ ../src/tables/UCSTable.cpp \ ../src/tables/LayerTable.cpp dime/build-tmake/dime.pro0100644017777301777730000000014006763254773014151 0ustar wwwwwwTARGET = dime CONFIG = debug sharedlib DEFINES = # DIME_FIXBIG USE_GZFILE OBJECTS_DIR = objects dime/build-tmake/makefile0100644017777301777730000000347007452612156014207 0ustar wwwwww#*************************************************************************** # # Makefile for DIME: Dxf Import, Manipulation, and Export Library # # Usage: # make Makes Dime release version # make shared Makes Dime development version # #*************************************************************************** COPY = cp SYMLINK = ln -sf #*************************************************************************** all:: dime screen: @echo -e "\033[34m\n" \ "\t****************************************************************\n" \ "\t* Compiling DIME *\n" \ "\t****************************************************************\n" \ "\033[0m"; dime: static dime_mt: static_mt static: makefile.release .release static_mt: makefile.release_mt .release_mt shared: makefile.dime .dime shared_mt: makefile.dime_mt .dime_mt objects: mkdir $@ releaseobjects: mkdir $@ .dime: objects @$(MAKE) -f makefile.dime makefile.dime: dime.pro common.pro tmake -o makefile.dime dime.pro common.pro .dime_mt: objects @$(MAKE) -f makefile.dime_mt makefile.dime_mt: mt.pro dime.pro common.pro tmake -o makefile.dime_mt dime.pro mt.pro common.pro .release: releaseobjects @$(MAKE) -f makefile.release makefile.release: release.pro common.pro tmake -o makefile.release release.pro common.pro .release_mt: releaseobjects @$(MAKE) -f makefile.release_mt makefile.release_mt: mt.pro release.pro common.pro tmake -o makefile.release_mt release.pro mt.pro common.pro clean: makefile.dime makefile.release makefile.dime_mt makefile.release_mt @$(MAKE) -f makefile.dime clean @$(MAKE) -f makefile.release clean @$(MAKE) -f makefile.dime_mt clean @$(MAKE) -f makefile.release_mt clean @$(RM) makefile.dime @$(RM) makefile.release @$(RM) makefile.dime_mt @$(RM) makefile.release_mt dime/build-tmake/mt.pro0100644017777301777730000000003207146250462013636 0ustar wwwwwwCONFIG += win_crt_mt dime/build-tmake/release.pro0100644017777301777730000000012706763254773014660 0ustar wwwwwwTARGET = dime CONFIG = release staticlib DEFINES = NDEBUG OBJECTS_DIR = releaseobjects dime/cfg/0040755017777301777730000000000007733212517011046 5ustar wwwwwwdime/cfg/config.guess0100755017777301777730000011310607643247732013374 0ustar wwwwww#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-03-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., 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted 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. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 c99 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/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 arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-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 __ELF__ >/dev/null 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 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # 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 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 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 0 ;; *:AIX:*:[45]) 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 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:3*) echo i386-pc-interix3 exit 0 ;; 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 i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` rm -f $dummy.c test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*: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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; 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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; 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"); 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 $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: dime/cfg/config.sub0100755017777301777730000007054307643247732013046 0ustar wwwwww#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-03-07' # 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., 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. # Please send patches to . Submit a context # diff and a properly formatted 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. # 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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* | storm-chaos* | os2-emx* | windows32-* | 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) os= basic_machine=$1 ;; -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 ;; -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/'` ;; -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] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dsp16xx \ | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el | mips64vr4300 \ | mips64vr4300el | mips64vr5000 | mips64vr5000el \ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ | mipsisa32 | mipsisa64 \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # 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-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c54x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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 ;; 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 ;; 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 ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; 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 ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; 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 ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; 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 ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-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-*) basic_machine=i686-`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 ;; 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 ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; 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 ;; t3d) basic_machine=alpha-cray os=-unicos ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; 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 ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-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 ;; 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 ;; sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) 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 ;; c4x*) basic_machine=c4x-none os=-coff ;; *-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. -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* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -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 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -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 ;; -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 ;; -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 *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; # 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 ;; 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 ;; *-ibm) os=-aix ;; *-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 ;; -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 ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) 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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dime/cfg/depcomp0100644017777301777730000003033507643247732012430 0ustar wwwwww#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. # Originally written by Alexandre Oliva . 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 # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi 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 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. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" 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. 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. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$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" ;; 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. base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'` tmpdepfile1="$base.o.d" tmpdepfile2="$base.d" if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi 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 proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 dime/cfg/errors.txt0100644017777301777730000001030507643247732013126 0ustar wwwwwwThis file contains the textual explanations for errors that can occur when configure is run. The correct message is automatically extracted and dumped on the screen by the configure script. !too-old-qt Versions of the Qt library older than version 2.0.0 is not supported. !no-qt Could not find any way to build against the Qt library. If you are sure Qt is properly installed on your system, see the file config.log to find out what went wrong. Note that it is possible to override the combinations of Qt libraries configure tries to link against by setting up the environment variable CONFIG_QTLIBS. If you for instance know the correct set of libraries to be qt304.lib, qtmain.lib and gdi32.lib (on an MSWindows system), then set CONFIG_QTLIBS to the string "-lqt304 -lqtmain -lgdi32" before re-running configure. !no-qgl The configure script could not find any way to build code which uses Qt's OpenGL bindings (called "QGL"), neither as part of the main Qt library, nor as a stand-alone library. You must rebuild your local Qt library with OpenGL support to be able to resolve this problem. !no-msvc++ You need to have the Microsoft Visual C++ compiler suite accessible in the Cygwin environment. Look in README.WIN32. !c--inlinefor This C++ compiler (\"$CXX\") does not seem to be capable of compiling Coin, as it can't compile a simple test snippet with a for()-loop within an inline function. This check is primarily supposed to smoke out the useless gratis C++ compiler bundled by Hewlett-Packard along with HP-UX. If you get this error message for other compilers, there might be something very wrong with your local environment or compiler version. (We've had error reports with this for g++ 2.95.3 on SuSe Linux, which we have so far not been able to pin down to it's exact cause -- just that it causes g++ to exit due to an internal compiler error, which is of course a "should never happen" condition for any compiler. If you are hit by this problem, try upgrading to a later g++ version.) !c--vdest This C++ compiler (\"$CXX\") is not capable of compiling Coin. If you are using the Sun CC compiler, try upgrading to a new version, or even downgrading to an older version. !c--gcc296bug Your compiler contains a nasty bug which makes it unsuited for building this project. If this is the GCC 2.96.x compiler shipped with Red Hat Linux, Red Hat might provide updated RPMs of GCC without the bug. We strongly advise you to upgrade before building *any* software on your system. (gcc 2.96 was never really supported by the GCC team, as it was just a snapshot taken from the development CVS repository by RedHat, then branded as "version 2.96".) If you can not find or install any updated version of the compiler, you may try to re-run configure with the "--disable-optimization" option, which should take care of the problem. Note that this will have a negative impact on the Coin library's performance. Another possibility is to change to a higher optimization level, as only the default -O2 optimization level seems to exhibit this particular bug. Note that you do so on your own risk, as there might be gcc-bugs undetected by us for the higher optimization levels. If you still want to go ahead with increasing the optimization level, just set up the CPPFLAGS environment variable when invoking configure, like this: $ /configure [your-options] CPPFLAGS="-O3" !no-network-conversion Could not find network conversion functions like htonl() and its variants. !no-doxygen Could not find the doxygen tool. See http://www.doxygen.org for download information. !no-opengl Could not find an OpenGL software development kit. !no-cpp-quoting Couldn't figure out how to quote strings in CPP macros. !no-math-library Could not find a way to use the math library. !invalid-msvcrt Your choice for MSVC++ C library (the --with-msvcrt= option) was invalid. Use one of the following choices (aliases on the right): singlethread-static [ /ml | ml | libc ] singlethread-static-debug [ /mld | mld | libcd ] multithread-static [ /mt | mt | libcmt ] multithread-static-debug [ /mtd | mtd | libcmtd ] multithread-dynamic [ /md | md | msvcrt ] multithread-dynamic-debug [ /mdd | mdd | msvcrtd ] !end dime/cfg/gendsp.sh0100755017777301777730000004474207643260561012677 0ustar wwwwww#! /bin/sh # ************************************************************************** # This is a hack for generating a Microsoft Developer Studio project and # workspace files (.dsp/.dsw) for building Coin from the MSVC++ IDE. It # hooks into the Automake process as a fake compiler, building the project # file instead of the sources. # # TODO: # - Defines should be verified: # are WIN32 and _WINDOWS necessary? # should _DEBUG be defined? # - Wtf is "Package Owner <4>"? Want this to mean SIM if possible :), # not MS if <4> is some code for that... # - Indicate that the dsp file is *not* generated by Microsoft Developer # Studio? Will the MSVC++ IDE eat "foreign" dsp files? # - Ensure that thammer and preng put me in their wills... # # 20030220 larsa # # NOTES # * The large blocks of text were originally written as "cat >file <file blocks so it would work universally for all the projects. me=$0 # run this where needed: me=`echo $me | sed 's%^.*/%%g'` if test x"$1" = x"--register-public-header"; then # sourcedir=$2 # builddir=$3 studiofile=$4 headerfile=$5 # installpath=`CYGWIN= cygpath -w "$6" 2>/dev/null || echo "$6"` case $headerfile in [a-z]:* | /* ) # absolute path ;; * ) # relative path headerfile="`pwd`/$headerfile" ;; esac headerfile=`CYGWIN= cygpath -w "$headerfile" 2>/dev/null || echo "$headerfile"` echo "# Begin Source File" >>"$studiofile" echo "" >>"$studiofile" echo "SOURCE=$headerfile" >>"$studiofile" echo "# End Source File" >>"$studiofile" exit 0 fi # this variable should contain the list of variables we want to use in the # project file setup, instead of just having the values. reversevars="QTDIR COINDIR" sourcefile= objectfile= dependfile= studiofile= outputfile= LIBRARY= library= Library= for arg do if test x"$outputfile" = x"next"; then outputfile=$arg else case $arg in -c ) # -c only means _compile_ some file, not that the source file is # the next argument, hence we need to do it differently than for # the -o option sourcefile=get ;; -o ) outputfile=next ;; -MF | -MD | -MP ) # haven't investigated if one of these are defined to be last # before the dep-file, so i've done it this way. dependfile=get ;; -Wp,-MD,* ) dependfile=`echo $arg | cut -c9-` ;; -D*_INTERNAL ) LIBRARY=`echo $arg | cut -d_ -f1 | cut -c3-` library=`echo $LIBRARY | tr A-Z a-z` case $library in coin ) Library=Coin ;; soqt ) Library=SoQt ;; sowin ) Library=SoWin ;; * ) Library=$library ;; esac ;; -Ddspfile=* | -Wl,-Ddspfile=* ) # the build system is hacked to pass us the path to the .dsp file # this way. studiofile=`echo $arg | cut -d= -f2-` # FIXME: we don't get the -D*_INTERNAL flag when closing, so we # have to set up the variables here too. library=`echo "$studiofile" | sed -e 's%.*[\\/]%%g' -e 's%[0-9].*$%%'` LIBRARY=`echo $library | tr a-z A-Z` case $library in coin ) Library=Coin ;; soqt ) Library=SoQt ;; sowin ) Library=SoWin ;; * ) Library=$library ;; esac ;; -* ) ;; * ) if test x"$sourcefile" = x"get"; then sourcefile=$arg elif test x"$dependfile" = x"get"; then dependfile=$arg fi ;; esac fi done if test x"$studiofile" = x""; then exit 0 fi if test x"$sourcefile" = x""; then :; else if test x"$objectfile" = x""; then objectfile=`echo $sourcefile | sed -e 's%^.*[/\\\\]%%g' -e 's%\.\(cpp\|c\)$%.o%'` fi fi if test x"$objectfile" = x""; then :; else date >$objectfile fi if test x"$dependfile" = x""; then :; else echo "" >$dependfile fi if test -f "$studiofile"; then :; else # file does not exist yet echo "# Microsoft Developer Studio Project File - Name=\"${library}@${LIBRARY}_MAJOR_VERSION@\" - Package Owner=<4>" >>"$studiofile" echo "# Microsoft Developer Studio Generated Build File, Format Version 6.00" >>"$studiofile" echo "# ** DO NOT EDIT **" >>"$studiofile" echo "" >>"$studiofile" echo "# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102" >>"$studiofile" echo "" >>"$studiofile" echo "CFG=${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Debug" >>"$studiofile" echo "!MESSAGE This is not a valid makefile. To build this project using NMAKE," >>"$studiofile" echo "!MESSAGE use the Export Makefile command and run" >>"$studiofile" echo "!MESSAGE" >>"$studiofile" echo "!MESSAGE NMAKE /f \"${library}@${LIBRARY}_MAJOR_VERSION@.mak\"." >>"$studiofile" echo "!MESSAGE" >>"$studiofile" echo "!MESSAGE You can specify a configuration when running NMAKE" >>"$studiofile" echo "!MESSAGE by defining the macro CFG on the command line. For example:" >>"$studiofile" echo "!MESSAGE" >>"$studiofile" echo "!MESSAGE NMAKE /f \"${library}@${LIBRARY}_MAJOR_VERSION@.mak\" CFG=\"${library}@${LIBRARY}_MAJOR_VERSION@d - Win32 Debug\"" >>"$studiofile" echo "!MESSAGE" >>"$studiofile" echo "!MESSAGE Possible choices for configuration are:" >>"$studiofile" echo "!MESSAGE" >>"$studiofile" echo "!MESSAGE \"${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Release\" (based on \"Win32 (x86) Dynamic-Link Library\")" >>"$studiofile" echo "!MESSAGE \"${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Debug\" (based on \"Win32 (x86) Dynamic-Link Library\")" >>"$studiofile" echo "!MESSAGE" >>"$studiofile" echo "" >>"$studiofile" echo "# Begin Project" >>"$studiofile" echo "# PROP AllowPerConfigDependencies 0" >>"$studiofile" echo "# PROP Scc_ProjName \"\"" >>"$studiofile" echo "# PROP Scc_LocalPath \"\"" >>"$studiofile" echo "CPP=cl.exe" >>"$studiofile" echo "MTL=midl.exe" >>"$studiofile" echo "RSC=rc.exe" >>"$studiofile" echo "" >>"$studiofile" echo "!IF \"\$(CFG)\" == \"${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Release\"" >>"$studiofile" echo "" >>"$studiofile" echo "# PROP BASE Use_MFC 0" >>"$studiofile" echo "# PROP BASE Use_Debug_Libraries 0" >>"$studiofile" echo "# PROP BASE Output_Dir \"Release\"" >>"$studiofile" echo "# PROP BASE Intermediate_Dir \"Release\"" >>"$studiofile" echo "# PROP BASE Target_Dir \"\"" >>"$studiofile" echo "# PROP Use_MFC 0" >>"$studiofile" echo "# PROP Use_Debug_Libraries 0" >>"$studiofile" echo "# PROP Output_Dir \"Release\"" >>"$studiofile" echo "# PROP Intermediate_Dir \"Release\"" >>"$studiofile" echo "# PROP Ignore_Export_Lib 0" >>"$studiofile" echo "# PROP Target_Dir \"\"" >>"$studiofile" echo "# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"${LIBRARY}_DEBUG=0\" @${LIBRARY}_DSP_DEFS@ @${LIBRARY}_DSP_INCS@ /YX /FD /c" >>"$studiofile" echo "# ADD CPP /nologo /MD /W3 /GX /O1 /D \"WIN32\" /D \"NDEBUG\" /D \"_WINDOWS\" /D \"${LIBRARY}_DEBUG=0\" @${LIBRARY}_DSP_DEFS@ @${LIBRARY}_DSP_INCS@ /YX /FD /c" >>"$studiofile" echo "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32" >>"$studiofile" echo "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32" >>"$studiofile" echo "# ADD BASE RSC /l 0x409 /d \"NDEBUG\"" >>"$studiofile" echo "# ADD RSC /l 0x409 /d \"NDEBUG\"" >>"$studiofile" echo "BSC32=bscmake.exe" >>"$studiofile" echo "# ADD BASE BSC32 /nologo" >>"$studiofile" echo "# ADD BSC32 /nologo" >>"$studiofile" echo "LINK32=link.exe" >>"$studiofile" echo "# ADD BASE LINK32 @${LIBRARY}_DSP_LIBS@ /nologo /dll /machine:I386" >>"$studiofile" echo "# ADD LINK32 @${LIBRARY}_DSP_LIBS@ /nologo /dll /machine:I386 /out:\"${library}@${LIBRARY}_MAJOR_VERSION@.dll\" /opt:nowin98" >>"$studiofile" echo "# SUBTRACT LINK32 /pdb:none" >>"$studiofile" echo "" >>"$studiofile" echo "!ELSEIF \"\$(CFG)\" == \"${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Debug\"" >>"$studiofile" echo "" >>"$studiofile" echo "# PROP BASE Use_MFC 0" >>"$studiofile" echo "# PROP BASE Use_Debug_Libraries 1" >>"$studiofile" echo "# PROP BASE Output_Dir \"Debug\"" >>"$studiofile" echo "# PROP BASE Intermediate_Dir \"Debug\"" >>"$studiofile" echo "# PROP BASE Target_Dir \"\"" >>"$studiofile" echo "# PROP Use_MFC 0" >>"$studiofile" echo "# PROP Use_Debug_Libraries 1" >>"$studiofile" echo "# PROP Output_Dir \"Debug\"" >>"$studiofile" echo "# PROP Intermediate_Dir \"Debug\"" >>"$studiofile" echo "# PROP Target_Dir \"\"" >>"$studiofile" echo "# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"${LIBRARY}_DEBUG=1\" @${LIBRARY}_DSP_DEFS@ @${LIBRARY}_DSP_INCS@ /YX /FD /GZ /c" >>"$studiofile" echo "# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_WINDOWS\" /D \"${LIBRARY}_DEBUG=1\" @${LIBRARY}_DSP_DEFS@ @${LIBRARY}_DSP_INCS@ /YX /FD /GZ /c" >>"$studiofile" echo "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32" >>"$studiofile" echo "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32" >>"$studiofile" echo "# ADD BASE RSC /l 0x409 /d \"_DEBUG\"" >>"$studiofile" echo "# ADD RSC /l 0x409 /d \"_DEBUG\"" >>"$studiofile" echo "BSC32=bscmake.exe" >>"$studiofile" echo "# ADD BASE BSC32 /nologo" >>"$studiofile" echo "# ADD BSC32 /nologo" >>"$studiofile" echo "LINK32=link.exe" >>"$studiofile" echo "# ADD BASE LINK32 @${LIBRARY}_DSP_LIBS@ /nologo /dll /debug /machine:I386 /pdbtype:sept" >>"$studiofile" echo "# ADD LINK32 @${LIBRARY}_DSP_LIBS@ /nologo /dll /debug /machine:I386 /pdbtype:sept /out:\"${library}@${LIBRARY}_MAJOR_VERSION@d.dll\"" >>"$studiofile" echo "" >>"$studiofile" echo "!ENDIF" >>"$studiofile" echo "" >>"$studiofile" echo "# Begin Target" >>"$studiofile" echo "" >>"$studiofile" echo "# Name \"${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Release\"" >>"$studiofile" echo "# Name \"${library}@${LIBRARY}_MAJOR_VERSION@ - Win32 Debug\"" >>"$studiofile" echo "# Begin Group \"Source Files\"" >>"$studiofile" echo "" >>"$studiofile" echo "# PROP Default_Filter \"cpp;c;ic;icc\"" >>"$studiofile" fi if test `grep -c "# End Project" "$studiofile"` -gt 0; then me=`echo $me | sed 's%^.*/%%g'` echo >&2 "$me: error: project file is closed - you must start from scratch (make clean)" exit 1 fi if test x"$sourcefile" = x""; then :; else # set up section for the source file case $sourcefile in [a-zA-Z]:* | /* ) ;; * ) # this is a relative path sourcefile="`pwd`/$sourcefile" ;; esac echo "# Begin Source File" >>"$studiofile" echo "" >>"$studiofile" sourcefile=`CYGWIN= cygpath -w "$sourcefile" 2>/dev/null || echo "$sourcefile"` echo "SOURCE=$sourcefile" >>"$studiofile" echo "# End Source File" >>"$studiofile" fi case "$outputfile" in *.so.* ) # this is how we detect the last command in the build process date >>"$outputfile" # "close" the dsp file echo '# End Group' >>"$studiofile" # We need to know about the root build dir and source dir to trigger the # header installation rule, and to locate the additional source files we # should put in the .dsp file builddir=`echo "$studiofile" | sed -e 's%/[^/]*$%%'` builddir_unix=$builddir builddir=`CYGWIN= cygpath -w "$builddir" 2>/dev/null || echo "$builddir"` sourcedir=`echo "$0" | sed -e 's%/cfg/m4/gendsp.sh$%%'` sourcedir_unix=$sourcedir sourcedir=`CYGWIN= cygpath -w "$sourcedir" 2>/dev/null || echo "$sourcedir"` # PUBLIC HEADERS # To get the list of public header files, we run "make install" into a # temporary directory, while overriding the header-install program to be # this script with a magic option as the first argument. Afterwards we # clean out the temporary install dir. echo '# Begin Group "Public Headers"' >>"$studiofile" echo "" >>"$studiofile" echo '# PROP Default_Filter "h"' >>"$studiofile" ( cd $builddir_unix; make INSTALL_HEADER="$0 --register-public-header $sourcedir $builddir $studiofile" DESTDIR=/tmp/coin-dsp install-data ) rm -rf /tmp/coin-dsp echo '# End Group' >>"$studiofile" # PRIVATE HEADERS # I don't know how to properly construct a list of private headers yet, # but we can for sure assume that all .ic/.icc source files are includes # used from other source files. We also assume that header files that # check for _INTERNAL and emits a #error with a message containing # "private" or "internal" is an internal header file. echo '# Begin Group "Private Headers"' >>"$studiofile" echo "" >>"$studiofile" echo '# PROP Default_Filter "h;ic;icc"' >>"$studiofile" for file in `find $sourcedir_unix $builddir_unix -name "*.h" | xargs grep -l "_INTERNAL\$" | xargs grep -i -l "#error.*private"`; do echo "# Begin Source File" >>"$studiofile" echo "" >>"$studiofile" filepath=`CYGWIN= cygpath -w "$file" 2>/dev/null || echo "$file"` echo "SOURCE=$filepath" >>"$studiofile" echo "# PROP Exclude_From_Build 1" >>"$studiofile" echo "# End Source File" >>"$studiofile" done for file in `find $sourcedir_unix $builddir_unix -name "*.ic" -o -name "*.icc"`; do echo "# Begin Source File" >>"$studiofile" echo "" >>"$studiofile" filepath=`CYGWIN= cygpath -w "$file" 2>/dev/null || echo "$file"` echo "SOURCE=$filepath" >>"$studiofile" echo "# PROP Exclude_From_Build 1" >>"$studiofile" echo "# End Source File" >>"$studiofile" done echo '# End Group' >>"$studiofile" # close the .dsp file echo '# End Target' >>"$studiofile" echo '# End Project' >>"$studiofile" # create the .dsw file workspacefile=`echo "$studiofile" | sed 's/\.dsp/.dsw/'` echo "Microsoft Developer Studio Workspace File, Format Version 6.00" >>"$workspacefile.in" echo "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "###############################################################################" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "Project: \"${library}@${LIBRARY}_MAJOR_VERSION@\"=.\\${library}@${LIBRARY}_MAJOR_VERSION@.dsp - Package Owner=<4>" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "Package=<5>" >>"$workspacefile.in" echo "{{{" >>"$workspacefile.in" echo "}}}" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "Package=<4>" >>"$workspacefile.in" echo "{{{" >>"$workspacefile.in" echo "}}}" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "###############################################################################" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "Global:" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "Package=<5>" >>"$workspacefile.in" echo "{{{" >>"$workspacefile.in" echo "}}}" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "Package=<3>" >>"$workspacefile.in" echo "{{{" >>"$workspacefile.in" echo "}}}" >>"$workspacefile.in" echo "" >>"$workspacefile.in" echo "###############################################################################" >>"$workspacefile.in" echo "" >>"$workspacefile.in" # Make everything peachy for MS DOS mv "$studiofile" "$studiofile.in2" ( cd "$builddir_unix"; ./config.status --file="-:-" <"$workspacefile.in" >"$workspacefile.txt" ) ( cd "$builddir_unix"; ./config.status --file="-:-" <"$studiofile.in2" >"$studiofile.in" ) # If we are making the Win32 precompiled SDK installer, we need to make # the .dsp-file contain relative paths that works from where the sources and # build files are going to be installed... # The first two rules are for individual source files, the next two are for # the include directive settings... sed -e "s%^SOURCE=.:.*\\(${Library}-[0-9]\\.[^/\\\\]*\\)%SOURCE=..\\\\source\\\\\\1%" \ -e 's%^SOURCE=.:.*build-files%SOURCE=.%' \ -e "s%.:[^ ]*\\(${Library}-[0-9]\\.[^/\\\\\"]*\\)%..\\\\source\\\\\\1%" \ -e 's%.:[^ ]*build-files\([^"]*\)%.\1%g' \ <"$studiofile.in" >"$studiofile.txt2" sourcedirregexp=`echo "$sourcedir" | sed -e 's%\\\\%\\\\\\\\%g'` builddirregexp=`echo "$builddir" | sed -e 's%\\\\%\\\\\\\\%g'` # Transform paths to be relative paths for non-installer-builds too. # This should probably be configurable in some way though. if test x"$sourcedir" = x"$builddir"; then relsourcedir="." else num=1 while true; do presource=`echo $sourcedir | cut -d'\' -f1-$num` prebuild=`echo $builddir | cut -d'\' -f1-$num` if test x"$presource" = x"$prebuild"; then :; else break fi num=`expr $num + 1` done num=`expr $num - 1` if test $num -eq 0; then # relative path impossible relsourcedir=$sourcedirregexp else numplus=`expr $num + 1` # prefix=`echo $sourcedir | cut -d'\' -f1-$num` upfix=`echo "$builddir\\\\" | cut -d'\' -f$numplus- | sed -e 's%[^\\\\]*\\\\%..\\\\%g' -e 's%\\\\%\\\\\\\\%g'` postfix=`echo $sourcedir | cut -d'\' -f$numplus- | sed -e 's%\\\\%\\\\\\\\%g'` relsourcedir="$upfix$postfix" fi fi sed -e "s%$sourcedirregexp%$relsourcedir%g" \ -e "s%$builddirregexp\\\\%.\\\\%g" \ -e "s%$builddirregexp%.\\\\%g" \ <"$studiofile.txt2" >"$studiofile.txt" # here we try to reverse some environment variable values back to their # variable references, to make the project less system-dependent. for var in $reversevars; do eval varval="\$$var" varval=`CYGWIN= cygpath -w "$varval" 2>/dev/null || echo "$varval"` varval="`echo $varval | sed -e 's%\\\\%\\\\\\\\%g'`" if test x"$varval" = x""; then :; else mv "$studiofile.txt" "$studiofile.txt2" sed -e "s%$varval%\\\$($var)%g" <"$studiofile.txt2" >"$studiofile.txt" fi if test -f "$studiofile.txt"; then :; else echo "error doing substitutions" echo "cmd: s%$varval%\\\$($var)%g" exit 1 fi done # we want to link debug versions of this project with debug versions of the # libs they depend on. we only do this for our own known libraries though. debuglibs="coin[0-9] soqt[0-9] sowin[0-9]" for lib in $debuglibs; do mv "$studiofile.txt" "$studiofile.txt2" sed -e '/\/debug/ s%\<\('$lib'\)\.lib\>%\1d.lib%g' <"$studiofile.txt2" >"$studiofile.txt" if test -f "$studiofile.txt"; then :; else echo "error doing substitutions" echo "cmd: s%$varval%\\\$($var)%g" exit 1 fi done # do unix2dos conversion (\n -> \r\n) on the DevStudio files echo -e "s/\$/\r/;\np;" >unix2dos.sed sed -n -f unix2dos.sed "$studiofile.txt" >"$studiofile" sed -n -f unix2dos.sed "$workspacefile.txt" >"$workspacefile" # clean out temporary files rm -f "$studiofile.txt2" "$studiofile.txt" "$studiofile.in2" "$studiofile.in" "$workspacefile.txt" "$workspacefile.in" unix2dos.sed ;; esac dime/cfg/install-sh0100755017777301777730000001267107643247732013065 0ustar wwwwww#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 dime/cfg/ltmain.sh0100644017777301777730000041770007457035364012702 0ustar wwwwww# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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. # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" # Parse our command line options once, thoroughly. while test $# -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" exit 0 ;; --config) sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --debug) echo "$progname: enabling shell trace mode" set -x ;; --dry-run | -n) run=: ;; --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 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --quiet | --silent) show=: ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi # 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= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case $nonopt in *cc | *++ | gcc* | *-gcc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= prev= lastarg= srcfile="$nonopt" suppress_output= user_target=no for arg do case $prev in "") ;; xcompiler) # Aesthetically quote the previous argument. prev= lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi continue ;; esac # Accept any command-line options. case $arg in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi user_target=next ;; -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; -Xcompiler) prev=xcompiler continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi continue ;; esac case $user_target in next) # The next one is the -o target name user_target=yes continue ;; yes) # We got the output file user_target=set libobj="$arg" continue ;; esac # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" # Aesthetically quote the previous argument. # Backslashify any backslashes, double quotes, and dollar signs. # These are the only characters that are still specially # interpreted inside of double-quoted scrings. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $lastarg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi done case $user_target in set) ;; no) # Get the name of the library object. libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; *) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $libobj" else removelist="$libobj" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) 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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else 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 $run ln "$0" "$lockfile" 2>/dev/null; do $show "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." $run $rm $removelist exit 1 fi echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi # 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 # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" else # Don't build PIC code command="$base_compile $srcfile" fi if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$libobj"; then dir="$objdir" else dir="$dir/$objdir" fi libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` if test -d "$dir"; then $show "$rm $libobj" $run $rm $libobj else $show "$mkdir $dir" $run $mkdir $dir status=$? if test $status -ne 0 && test ! -d $dir; then exit $status fi fi fi if test "$compiler_o_lo" = yes; then output_obj="$libobj" command="$command -o $output_obj" elif test "$compiler_c_o" = yes; then output_obj="$obj" command="$command -o $output_obj" fi $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist exit 1 fi 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." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test x"$output_obj" != x"$libobj"; then $show "$mv $output_obj $libobj" if $run $mv $output_obj $libobj; then : else error=$? $run $rm $removelist exit $error fi fi # If we have no pic_flag, then copy the object into place and finish. if (test -z "$pic_flag" || test "$pic_mode" != default) && test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj $run $rm $obj fi $show "$mv $libobj $obj" if $run $mv $libobj $obj; then : else error=$? $run $rm $removelist exit $error fi xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file $show "(cd $xdir && $LN_S $baseobj $libobj)" if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then # Unlock the critical section if it was locked if test "$need_locks" != no; then $run $rm "$lockfile" fi exit 0 else error=$? $run $rm $removelist exit $error fi fi # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' 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 $srcfile" else # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else $run $rm $removelist exit 1 fi 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." $run $rm $removelist exit 1 fi # Just move the object if needed if test x"$output_obj" != x"$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Create an invalid libtool object if no PIC, so that we do not # accidentally link it into a program. if test "$build_libtool_libs" != yes; then $show "echo timestamp > $libobj" $run eval "echo timestamp > \$libobj" || exit $? else # Move the .lo from within objdir $show "$mv $libobj $lo_libobj" if $run $mv $libobj $lo_libobj; then : else error=$? $run $rm $removelist exit $error fi fi fi # Unlock the critical section if it was locked if test "$need_locks" != no; then $run $rm "$lockfile" fi exit 0 ;; # libtool link mode link | relink) modename="$modename: link" case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # 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 invokation. # 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" 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` avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= # We need to know -static, to get the right output filenames. for arg do case $arg in -all-static | -static) if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_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 case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$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 dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$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 compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes 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 $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi 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*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -o) prev=output ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # 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 ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.lo | *.$objext) # A library or standard object. if test "$prev" = dlfiles; then # This file was specified with -dlopen. if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $arg" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= else case $arg in *.lo) libobjs="$libobjs $arg" ;; *) objs="$objs $arg" ;; esac fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" 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. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'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\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d $output_objdir; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.$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 case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac libs="$libs $deplib" done 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 link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit 1 ;; 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 if test $linkmode = prog; then # Determine which files to process case $pass in dlopen) libs="$dlfiles" save_deplibs="$deplibs" # Collect dlpreopened libraries deplibs= ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi for deplib in $libs; do lib= found=no case $deplib in -l*) if test $linkmode = oldlib && test $linkmode = obj; then $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 continue fi if test $pass = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do # Search the libtool library lib="$searchdir/lib${name}.la" if test -f "$lib"; then found=yes break fi 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 fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test $pass = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test $pass = conv; then deplibs="$deplib $deplibs" continue fi if test $pass = scan; then deplibs="$deplib $deplibs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test $pass = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test $pass = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then echo echo "*** Warning: This library needs some functionality provided by $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." else echo echo "*** Warning: Linking the shared library $output against the" echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi 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 = 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. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test $found = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit 1 fi # Check to see that this really is a libtool archive. if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test $linkmode = oldlib && test $linkmode = obj; }; then # Add dl[pre]opened files of deplib test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$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 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac tmp_libs="$tmp_libs $deplib" done elif test $linkmode != prog && test $linkmode != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit 1 fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # This library was specified with -dlopen. if test $pass = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit 1 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. dlprefiles="$dlprefiles $lib" else newdlfiles="$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 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test $pass = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit 1 fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi 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" fi continue fi if test $linkmode = prog && test $pass != link; then newlib_search_path="$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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 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 case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # Link against this shared library if test "$linkmode,$pass" = "prog,link" || { 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 "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac if test $linkmode = prog; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi fi 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 if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; 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*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`echo $soroot | sed -e 's/^.*\///'` newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" 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 "$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" 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; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" 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 $echo "$modename: configuration error: unsupported hardcode properties" exit 1 fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$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:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test $linkmode = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; 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:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" 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 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 # Try to link the static library # 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 library needs some functionality provided by $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 "*** Therefore, libtool will create a static module, that should work " echo "*** as long as the dlopening 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 build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$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 "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac tmp_libs="$tmp_libs $deplib" done if test $link_all_deplibs != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="-L$absdir/$objdir" else eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="-L$absdir" fi ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $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 test $pass != scan && dependency_libs="$newdependency_libs" 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 "*) ;; *) lib_search_path="$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 case $deplib in -L*) new_libs="$deplib $new_libs" ;; *) 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 "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi if test "$pass" = "conv" && { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then libs="$deplibs" # reset libs deplibs= fi done # for pass if test $linkmode = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit 1 else echo echo "*** Warning: Linking the shared library $output against the non-libtool" echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. libext=al oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi current="$2" revision="$3" age="$4" # 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]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test $age -gt $current; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 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 major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix) major=`expr $current - $age + 1` verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="sgi$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test $loop != 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= verstring="0.0" 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 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs. $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` dependency_libs=`echo "$dependency_libs " | sed -e '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 temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$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 "*) ;; *) dlfiles="$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 "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd*) # Do not include libc due to us having libc/libc_r. ;; *) # Add libc to deplibs on all other systems if necessary. if test $build_libtool_need_lc = "yes"; then deplibs="$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 behaviour. 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. $rm conftest.c cat > conftest.c </dev/null` 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | sed 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: This library needs some functionality provided by $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." fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; 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 if eval echo \"$potent_lib\" 2>/dev/null \ | sed 10q \ | egrep "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: This library needs some functionality provided by $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." fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | grep . >/dev/null; then 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 fi ;; 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 is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; 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 # 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 "$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 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"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$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 "$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 library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi test -z "$dlname" && dlname=$soname lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Ensure that we have .o objects for linkers which dislike .lo # (e.g. aix) in case we are running --disable-static for obj in $libobjs; do xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` if test ! -f $xdir/$oldobj; then $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" # 20011008 larsa: # this hack removes redundant convenience libraries when the platform # is darwin case $host in *-*-darwin*) deplibs=`echo " $deplibs" | sed -e 's/ [0-9A-Za-z_.][0-9A-Za-z_\/.-]*\.al//g'` ;; esac else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit 0 fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run 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 "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $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 wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${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" $run eval "echo timestamp > $libobj" || exit $? exit 0 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" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" else # Just create a symlink. $show $rm $libobj $run $rm $libobj xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$libobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` $show "(cd $xdir && $LN_S $oldobj $baseobj)" $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 ;; prog) case $host in *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$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 "*) ;; *) finalize_rpath="$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"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; 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"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$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 "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`echo "$arg" | sed -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # 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" | sort +2 | 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/$dlsyms"' else echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= 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*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; 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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test $need_relink = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" 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 rpath="$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 rpath="$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 "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit 0 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" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e '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 "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="cd `pwd`; $relink_command" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe ;; *) exeext= ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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. Xsed='sed -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: 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 echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then echo >> $output "\ 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 >> $output "\ # 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 >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # win32 systems need to use the prog path for dll # lookup to work *-*-cygwin* | *-*-pw32*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 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\ " chmod +x $output fi exit 0 ;; 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" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else # Ensure that we have .o objects in place in case we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$oldobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` $show "(cd $xdir && ${LN_S} $obj $baseobj)" $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? fi done eval cmds=\"$old_archive_cmds\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "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}\" || 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 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` # Only create the output if not a dry run. if test -z "$run"; then 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) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # 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' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # 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 fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # 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. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; 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. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 continue fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$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 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then notinst_deplibs= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in /usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`echo $destfile | sed -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $0 --finish$current_libdirs' else exit 0 fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = ":" && exit 0 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" echo "more information, such as the ld(1) and ld.so(8) manual pages." echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 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 -*) ;; *) # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # 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 0 fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" 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) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi rmdirs= for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$objdir" else objdir="$dir/$objdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test $mode = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test $mode = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; 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 (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test $mode = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test $? != 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test $? != 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) if test "$build_old_libs" = yes; then oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi ;; *) # Do a test to see if this is a libtool program. if test $mode = clean && (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$file rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi fi ;; esac $show "$rm $rmfiles" $run $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 $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit 1 fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [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 --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --version print version information 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. Try \`$modename --help --mode=MODE' for a more detailed description of MODE." exit 0 ;; clean) $echo \ "Usage: $modename [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: $modename [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 -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [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 -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 -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 -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] 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: $modename [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." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: dime/cfg/missing0100755017777301777730000002405007643247732012452 0ustar wwwwww#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # 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 case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -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' 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]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 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' is missing on your system. 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 ${1+"$@"} && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar ${1+"$@"} && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" ${1+"$@"} && 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 you do not seem to have it handy on your system. 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 prerequirements 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 dime/cfg/mkinstalldirs0100755017777301777730000000341107643247732013657 0ustar wwwwww#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here dime/cfg/wrapmsvc.cpp0100644017777301777730000010045307402666663013424 0ustar wwwwww/* * A wrapper script for the Microsoft Visual C++ build tools (cl.exe, * lib.exe and link.exe) to make them grok UNIX-style arguments. * * This is written rather quick & dirty and should be overhauled with * clean-ups and robustifications. See particularly the "FIXME" * comments peppered throughout the sourcecode. * * Written by Morten Eriksen . * * This code is covered by the GNU GPL. * * Compiles with the Cygwin port of GCC's C++ compiler, you can simply * invoke it like this: ``g++ -s -o wrapmsvc.exe wrapmsvc.cpp''. */ /* * TODO: * * - Try to set up the cl.exe MSVC compiler even though it's not in * the PATH. (Get hold of the registry setting for %ProgramDir%, * then try to find it in the default MSVC installer location.) * Should then also set up the INCLUDE and LIB variables to include * the "system" directories. * * - Avoid generating dependency information for system-headers. * * - Kill the misc minor FIXME issues throughout the code. * * - Avoid using the standard C++ library if this means we get a much * smaller executable. * * - Look into including wrapping code for the Borland compiler aswell * (and other MSWindows compilers too?). * * - Clean up code by modularizing various mess into functions (and * new sourcecode files). */ // FIXME: this use of libstdc++ probably adds a lot to the final // exe. Could extract and use our SbString, SbList and SbDict classes // from libCoin instead. 20010627 mortene. #include #include #include #include #include #include #include #include #include #include #include #define BUFSIZE 4096 // Global flag, whether or not to output debug information for the // wrapper itself. static bool wrapdbg = false; static void errmsg_win32(BOOL fatal, const char * msg) { va_list args; DWORD lasterr; LPTSTR buffer; BOOL result; lasterr = GetLastError(); (void)fprintf(stderr, "Win32 API %s, %s", fatal ? "FATAL ERROR" : "error", msg); result = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, lasterr, 0, (LPTSTR)&buffer, 0, NULL); if (result) { (void)fprintf(stderr, ":\n\t%s", buffer); LocalFree(buffer); } if (fatal) exit(1); } #define ERRMSG_FWD(errmsg_fatal) \ va_list args; \ char msg[BUFSIZE]; \ va_start(args, text); \ vsprintf(msg, text, args); \ assert(strlen(msg) < BUFSIZE/2); /* just in case */ \ errmsg_win32(errmsg_fatal, msg); \ va_end(args) /*! Outputs on stderr the given text message and the last error as reported by the Win32 API call GetLastError(). The input arguments should typically indicate the call which failed. Example usage: if (!OpenPrinter(name, &handle, defaults)) { errorw32("OpenPrinter('%s', %p, %p)", name, &handle, defaults); } else { ... This will give an error message like this: Win32 API error, OpenPrinter('Brother HJ-100', 0x55555555, 0x7f7f7f7f): The printer name is invalid. */ void errorw32(const char * text, ...) { ERRMSG_FWD(0); } void fatalw32(const char * text, ...) { ERRMSG_FWD(1); } #undef ERRMSG_FWD /* Run an external process. @param cmd full command line of process to run. @param procstdout string which will get all output from child process on stdout attached to it. @param procstderr string which will get all output from child process on stderr attached to it. @return exit status of process. */ static DWORD run_process(const char * cmd, std::string & procstdout, std::string & procstderr) { if (wrapdbg) { (void)fprintf(stdout, "Invoking external process: ``%s''\n", cmd); } SECURITY_ATTRIBUTES securityattribs = { sizeof(SECURITY_ATTRIBUTES), NULL, // default permissions TRUE // child processes inherits handles }; // Create pipes for the child process. HANDLE childstdinread, childstdinwrite; HANDLE childstdoutread, childstdoutwrite; HANDLE childstderrread, childstderrwrite; if (!CreatePipe(&childstdinread, &childstdinwrite, &securityattribs, 0)) { fatalw32("CreatePipe()"); } if (!CreatePipe(&childstdoutread, &childstdoutwrite, &securityattribs, 0)) { fatalw32("CreatePipe()"); } if (!CreatePipe(&childstderrread, &childstderrwrite, &securityattribs, 0)) { fatalw32("CreatePipe()"); } // Now create the child process. PROCESS_INFORMATION childproc; ZeroMemory( &childproc, sizeof(PROCESS_INFORMATION) ); STARTUPINFO startupdata; ZeroMemory( &startupdata, sizeof(STARTUPINFO) ); startupdata.cb = sizeof(STARTUPINFO); startupdata.dwFlags = STARTF_USESTDHANDLES; startupdata.hStdInput = childstdinread; startupdata.hStdOutput = childstdoutwrite; startupdata.hStdError = childstderrwrite; // Create the child process. HLOCAL cmddup = (char *)LocalAlloc(0, strlen(cmd) + 1); if (!cmddup) { fatalw32("LocalAlloc()"); } (void)strcpy((char *)cmddup, cmd); BOOL result = CreateProcess(NULL, (LPTSTR)cmddup,// command line NULL, // process security attributes NULL, // primary thread security attributes TRUE, // handles are inherited 0, // creation flags NULL, // use parent's environment NULL, // use parent's current directory &startupdata, // STARTUPINFO pointer &childproc); // receives PROCESS_INFORMATION LocalFree(cmddup); if (!result) { fatalw32("CreateProcess(\"%s\", ...", cmd); } if (!CloseHandle(childstdinwrite)) { fatalw32("CloseHandle([handle])"); } if (!CloseHandle(childstdoutwrite)) { fatalw32("CloseHandle([handle])"); } if (!CloseHandle(childstderrwrite)) { fatalw32("CloseHandle([handle])"); } // Read output from the child process. DWORD dwRead; CHAR chBuf[BUFSIZE]; while (ReadFile(childstdoutread, chBuf, BUFSIZE-1, &dwRead, NULL) && (dwRead != 0)) { chBuf[dwRead] = '\0'; // FIXME: I have a nagging feeling that this is _slow_, especially // when trying to cope with the large amount of output when // running sourcecode files with many dependencies on header files // through ``cl.exe /E [...]''. Fixing this to use a larger tmp // buffer before concatening to the std::string instance would // probably have a noticable effect when compiling stuff like the // draggers in Coin, for instance. 20010823 mortene. procstdout += chBuf; } while (ReadFile(childstderrread, chBuf, BUFSIZE-1, &dwRead, NULL) && (dwRead != 0)) { chBuf[dwRead] = '\0'; procstderr += chBuf; } // Wait for child process to exit and get hold of it's exit code. DWORD exitcode; DWORD slept = 0; do { if (!GetExitCodeProcess(childproc.hProcess, &exitcode)) { fatalw32("GetExitCodeProcess()"); } if (exitcode == STILL_ACTIVE) { const DWORD SLEEPINTERVAL = 50; Sleep(SLEEPINTERVAL); slept += SLEEPINTERVAL; } } while (exitcode == STILL_ACTIVE); return exitcode; } /* @param s string to chop off end-of-line character from. @return true if a character was chomped, otherwise false. */ static bool chomp(std::string & s) { int len = s.length(); if (len == 0) { return false; } char lastchar = s.at(len - 1); int cut = 0; if (lastchar == '\n') { cut++; if ((len >= 2) && s.at(len - 2) == '\r') { cut++; } } else if (lastchar == '\r') { cut++; } if (cut > 0) { s.resize(len - cut); } return cut > 0; } static std::string dirprefix(const std::string arg) { int idx = arg.length() - 1; while (arg.at(idx)!='\\' && arg.at(idx)!='/' && idx > 0) { idx--; } return arg.substr(0, idx); } static std::string winpath(const std::string & s) { char buf[MAX_PATH]; // FIXME: what does this function return? 20010627 mortene. (void)cygwin32_conv_to_win32_path(s.c_str(), buf); return buf; } static std::string posixpath(const std::string & s) { char buf[MAX_PATH]; // FIXME: what does this function return? 20010627 mortene. (void)cygwin32_conv_to_posix_path(s.c_str(), buf); return buf; } static inline bool prefixmatch(const std::string s, const std::string prefix) { return s.length() >= prefix.length() && s.substr(0, prefix.length()).compare(prefix)==0; } static inline bool suffixmatch(const std::string s, const std::string suffix) { return s.length() >= suffix.length() && s.substr(s.length() - suffix.length()).compare(suffix)==0; } static bool match(const std::string ss, const char * cs, bool ignorecase = false) { if (!ignorecase) { return ss.compare(cs)==0; } int cslen = strlen(cs); if (ss.length() != cslen) { return false; } for (int i=0; i < cslen; i++) { if (tolower(ss.at(i)) != tolower(cs[i])) { return false; } } return true; } static std::string quotespaces(const std::string u) { int i; std::string s(u); for (i = 0; i < s.length(); i++) { if (s[i] == ' ') { s.insert(i, "\\"); i++; } } return s; } /**** Argument containers ********************************************/ struct DepTrackingArgs { DepTrackingArgs::DepTrackingArgs() : generate(false), phonytargets(false), targetobj(""), filename("") { } bool generate, phonytargets; std::string targetobj, filename; }; /** Generic data common for tools. ********/ struct Tool { typedef std::vector stringpvector; Tool::Tool() : objname(""), msvcppargs(""), pdbname(""), debugmode(false) { // Store the original $LIB, as we might need to set it up // repeatedly from scratch later on. int neededsize = GetEnvironmentVariable("LIB", NULL, 0); if (neededsize > 1) { char * tmpbuf = new char[neededsize + 1]; int resultsize = GetEnvironmentVariable("LIB", tmpbuf, neededsize); assert(resultsize == neededsize-1); Tool::original_LIB = new std::string(tmpbuf); delete tmpbuf; } } virtual const char * getToolName(void) = 0; virtual std::string constructArguments(void) = 0; // Traverse list of given -L paths and try to find absolute path of // .lib file (the MSVC++ linker doesn't have any "-L"-like option). void addLibFile(const std::string & name) { std::string * fullname = NULL; // Could be that the .lib file is given with full path already. struct stat buf; // debug // (void)fprintf(stdout, "*** TRYING: %s\n", name.c_str()); if (stat(name.c_str(), &buf)==0) { fullname = new std::string(name); } stringpvector::reverse_iterator i; for (i = this->linkpath.rbegin(); i != this->linkpath.rend() && !fullname; i++) { std::string compositename = **i; char lastchar = compositename.at(compositename.length() - 1); if (lastchar!='/' && lastchar!='\\') { compositename += '\\'; } compositename += name; // debug // (void)fprintf(stdout, "*** TRYING: %s\n", compositename.c_str()); struct stat buf; if (stat(compositename.c_str(), &buf)==0) { fullname = new std::string(compositename); } // debug // else (void)fprintf(stdout, "===> FAILED\n"); } // Assume library is in a default location (as given by envvar // LIB) if it couldn't be found. std::string * add = fullname ? fullname : new std::string(name); // debug // (void)fprintf(stdout, "** ADD-TO-LIST '%s'\n", add->c_str()); this->libfiles.push_back(add); } void addLinkPath(const std::string & name) { this->linkpath.push_back(new std::string(name)); } void addFileObj(const std::string & name) { this->objfiles.push_back(new std::string(name)); } std::string commonArgs(void) { std::string arg; stringpvector::iterator i; for (i = this->objfiles.begin(); i != this->objfiles.end(); i++) { arg += " " + (**i); } for (i = this->libfiles.begin(); i != this->libfiles.end(); i++) { arg += " " + (**i); } // Must also update LIB environment variable for the linker, in // case some of the .lib-files explicitly given have implicit // dependencies to other .lib-files in the same directory. std::string new_LIB(Tool::original_LIB ? Tool::original_LIB->c_str() : ""); for (i = this->linkpath.begin(); i != this->linkpath.end(); i++) { if (new_LIB.length() > 0) { new_LIB += ";"; } new_LIB += **i; } if (wrapdbg) { (void)fprintf(stdout, "LIB=='%s'\n", new_LIB.c_str()); } BOOL r = SetEnvironmentVariable("LIB", new_LIB.c_str()); assert(r && "SetEnvironmentVariable() failed -- investigate"); // All passthrough options -- that is, the MSVC++ style arguments // given that starts with a "/". for (i = this->passthrough.begin(); i != this->passthrough.end(); i++) { arg += " " + (**i); } return arg; } bool debugmode; std::string objname, msvcppargs, pdbname; stringpvector linkpath, libfiles, objfiles, passthrough; static std::string * original_LIB; }; std::string * Tool::original_LIB = NULL; /** Compiler-specifics. *******************/ struct CompilerArgs : public Tool { CompilerArgs::CompilerArgs() : aspreproc(false), cpuspec(""), optimizelevel(-1), compileobj(false) { } CompilerArgs::~CompilerArgs() { // FIXME: dealloc string* blocks in file vectors. 20010627 mortene. } const char * getToolName(void) { return "cl.exe"; } std::string constructArguments(void) { std::string arg; if (this->aspreproc) { arg += " /E"; } if (this->compileobj) { arg += " /c"; } if (this->optimizelevel >= 0) { arg += " /Ogityb2 /Gs"; } if (this->cpuspec.length() > 0) { arg += " /" + this->cpuspec; } if (this->debugmode) { arg += " /Zi"; } if (this->objname.length() > 0) { arg += (this->compileobj ? " /Fo" : " /Fe") + this->objname; } if (this->pdbname.length() > 0) { arg += " /Fd" + this->pdbname; } stringpvector::iterator i; for (i = this->preprocdefs.begin(); i != this->preprocdefs.end(); i++) { arg += " /D" + **i; } for (i = this->incpaths.begin(); i != this->incpaths.end(); i++) { arg += " /I" + **i; } for (i = this->c_files.begin(); i != this->c_files.end(); i++) { arg += " /Tc" + winpath(**i); } for (i = this->cpp_files.begin(); i != this->cpp_files.end(); i++) { arg += " /Tp" + winpath(**i); } for (i = this->h_files.begin(); i != this->h_files.end(); i++) { arg += " " + winpath(**i); } arg += this->commonArgs(); return arg; } void addFileC(const std::string & name) { this->c_files.push_back(new std::string(name)); } void addFileCPlusPlus(const std::string & name) { this->cpp_files.push_back(new std::string(name)); } void addHeaderFile(const std::string & name) { this->h_files.push_back(new std::string(name)); } void addPreProcDef(const std::string & name) { this->preprocdefs.push_back(new std::string(name)); } void addIncPath(const std::string & name) { this->incpaths.push_back(new std::string(name)); } stringpvector c_files, cpp_files, h_files, preprocdefs, incpaths; bool aspreproc, compileobj; int optimizelevel; std::string cpuspec; struct DepTrackingArgs deptracking; }; /** Dynamic linker specifics. *************/ struct LinkerArgs : public Tool { LinkerArgs::LinkerArgs() : linkdll(false), alternative_c_lib(""), releasemode(false), uselibexe(false) { } LinkerArgs::~LinkerArgs() { // FIXME: dealloc string* instances in stringpvectors. 20010627 mortene. } const char * getToolName(void) { return uselibexe ? "lib.exe" : "link.exe"; } std::string constructArguments(void) { std::string arg; if (linkdll) { arg += " /dll"; } if (this->objname.length() > 0) { arg += " /OUT:" + this->objname; } if (this->pdbname.length() > 0) { arg += " /PDB:" + this->pdbname; } if (this->debugmode) { arg += " /DEBUG"; } if (this->releasemode) { arg += " /RELEASE"; } if (!uselibexe) { // FIXME: should really not use /INCREMENTAL when making an // archive .lib file. So this is just a workaround for a bug in // the build setup for misc Coin modules (simage, at // least). 20010810 mortene. arg += std::string(" /INCREMENTAL:") + (this->incremental ? "YES" : "NO"); } if (this->alternative_c_lib.length() > 0) { arg += " " + this->alternative_c_lib; } stringpvector::iterator i; for (i = this->lstfiles.begin(); i != this->lstfiles.end(); i++) { const char * lstname = (**i).c_str(); std::string dir = dirprefix(**i); if (dir.length() > 0) { dir += "/"; } FILE * lst = fopen(lstname, "r"); if (!lst) { (void)fprintf(stderr, "Couldn't open file '%s'!!\n", lstname); exit(1); } char buffer[MAX_PATH]; while (fgets(buffer, MAX_PATH, lst)) { std::string lstobjname = buffer; while (chomp(lstobjname)) { } arg += " " + dir + lstobjname; } (void)fclose(lst); } arg += this->commonArgs(); return arg; } void addLstFile(const std::string & name) { this->lstfiles.push_back(new std::string(name)); } bool linkdll, incremental, releasemode, uselibexe; stringpvector lstfiles; std::string alternative_c_lib; }; /**** main() *********************************************************/ int main(int argc, char ** argv) { if (argc == 1) { std::string procstdout, procstderr; DWORD retcode = run_process("cl.exe", procstdout, procstderr); (void)fprintf(stdout, "%s", procstdout.c_str()); (void)fprintf(stderr, "%s", procstderr.c_str()); return retcode; } struct CompilerArgs compiler; struct LinkerArgs linker; struct Tool * tool = &compiler; /*** start of command-line parsing ************************************/ for (int i=1; i < argc; i++) { std::string arg = argv[i]; bool optarg = arg.at(0)=='-' || arg.at(0)=='/'; bool forcompiler = (tool == &compiler); if (match(arg, "--wrapdbg")) { wrapdbg = true; } else if (match(arg, "--wrapversion")) { (void)fprintf(stdout, "$Revision: 1.1 $\n"); exit(0); } // C srcfile? else if (suffixmatch(arg, ".c")) { tool = &compiler; compiler.addFileC(arg); } // C++ srcfile? else if (suffixmatch(arg, ".cpp") || suffixmatch(arg, ".cxx") || suffixmatch(arg, ".c++") || suffixmatch(arg, ".cc")) { tool = &compiler; compiler.addFileCPlusPlus(arg); } // header file? (can be specified explicitly when executed as preprocessor) else if (suffixmatch(arg, ".h")) { tool = &compiler; compiler.addHeaderFile(arg); } #if 0 // OBSOLETED: we're now using .lst-files listing the obj-files to // be linked in. 20010807 mortene. // libtool ".la" file? else if (suffixmatch(arg, ".la")) { tool = &linker; // FIXME: we just assume that all object files should be // extracted from the library, in case we're making a DLL // (passing the .lib-files to link.exe doesn't preserve the // exported symbols). 20001024 mortene. FILE * fp = fopen(winpath(arg).c_str(), "r"); if (!fp) { (void)fprintf(stderr, "Couldn't open file '%s'!!\n", arg.c_str()); exit(1); } const int TMPBUFFERSIZE = 1024; char buffer[TMPBUFFERSIZE]; const std::string laoption = "old_library="; std::string old_library = ""; while (fgets(buffer, TMPBUFFERSIZE, fp)) { if (strncmp(laoption.c_str(), buffer, laoption.length()) == 0) { old_library = &buffer[laoption.length()]; break; } } fclose(fp); if (old_library.length() == 0) { (void)fprintf(stderr, "Couldn't find \"old_library\" in %s file!!\n", arg.c_str()); exit(1); } int firstquote = old_library.find('\''); if (firstquote != std::string::npos) { int lastquote = old_library.find_last_of('\''); old_library = old_library.substr(firstquote + 1, lastquote - 1); } std::string libpath = dirprefix(winpath(arg)); bool trailingslash = libpath.at(libpath.length() - 1) == '\\'; // FIXME: ".libs" is just hardcoded. 20001024 mortene. std::string full_libname = libpath + (trailingslash ? "" : "\\") + ".libs\\" + old_library; // List objects in .lib archive. std::string cmd = "lib.exe /nologo /list " + full_libname; std::string procstdout, procstderr; DWORD exitcode = run_process(cmd.c_str(), procstdout, procstderr); if (exitcode != 0) { (void)fprintf(exitcode ? stderr : stdout, "%s", procstdout.c_str()); (void)fprintf(stderr, "%s", procstderr.c_str()); exit(1); } int nexteol; do { // FIXME: man, this is lousy code -- should use a proper tokenizer. 20010622 mortene. int nexteol_n = procstdout.find('\n'); int nexteol_r = procstdout.find('\r'); nexteol = nexteol_n <= nexteol_r ? nexteol_n : nexteol_r; if (nexteol != std::string::npos) { linker.addFileObj(libpath + (trailingslash ? "" : "\\") + procstdout.substr(0, nexteol)); procstdout.erase(0, nexteol); while (procstdout.length() && (procstdout.at(0)=='\n' || procstdout.at(0)=='\r')) { procstdout = procstdout.substr(1); } } } while (procstdout.length() && (nexteol != std::string::npos)); } #endif // OBSOLETED .la-file handling // Name the .lib output file (this must be executed before the // filename suffix detections). else if (optarg && prefixmatch(arg.substr(1), "OUT:")) { tool = &linker; linker.objname = arg.substr(5); } // Just pass along object files to the linker process. else if (suffixmatch(arg, ".obj") || suffixmatch(arg, ".o")) { compiler.addFileObj(winpath(arg)); linker.addFileObj(winpath(arg)); } else if (suffixmatch(arg, ".lib")) { compiler.addLibFile(winpath(arg)); linker.addLibFile(winpath(arg)); } // Handle our own invention of ".lst"-files, listing up the // obj-files which should be part of the final link. else if (suffixmatch(arg, ".lst")) { tool = &linker; linker.addLstFile(winpath(arg)); } // These checks must be kept before the -L* library linkfile match // to avoid -LINK or -LIB being interpreted as "link with library // INK" (ditto for -LIB). else if (optarg && match(arg.substr(1), "lib", true)) { tool = &linker; linker.uselibexe = true; } else if (optarg && match(arg.substr(1), "link", true)) { tool = &linker; } // This need to be kept before the -D* match to avoid -DLL being // interpreted as "set preprocessor define LL". else if (optarg && match(arg.substr(1), "dll", true)) { tool = &linker; linker.linkdll = true; } // Additional library path. else if (optarg && arg.at(1)=='L') { // FIXME: should check that the string trailing the 'L' actually // points to a valid path? 20010709 mortene. compiler.addLinkPath(winpath(arg.substr(2))); linker.addLinkPath(winpath(arg.substr(2))); } // Additional library for the compiler. else if (optarg && arg.at(1)=='l') { compiler.addLibFile(winpath(arg.substr(2)) + ".lib"); linker.addLibFile(winpath(arg.substr(2)) + ".lib"); } // Run in preprocessor mode. else if (optarg && match(arg.substr(1), "E")) { tool = &compiler; compiler.aspreproc = true; } // Option for the linker process, simply to be forwarded. else if (optarg && match(arg.substr(1), "RELEASE")) { tool = &linker; linker.releasemode = true; } // /DEBUG option for the linker process -- this must obviously go // before the '/D' check below. else if (optarg && match(arg.substr(1), "DEBUG")) { tool = &linker; linker.debugmode = true; } // A preprocessor define. else if (optarg && arg.at(1)=='D') { tool = &compiler; compiler.addPreProcDef(arg.substr(2)); } // Include debuginfo in object files. else if (optarg && match(arg.substr(1), "g")) { compiler.debugmode = true; linker.debugmode = true; } // An option for the linker this -- whether or not to build // incremental libraries (typically during debugging, trading // space for fast linking). This need to go before the '-I' // check right below, so we don't confuse this with an additional // include path setting. else if (optarg && prefixmatch(arg.substr(1), "INCREMENTAL:")) { tool = &linker; linker.incremental = suffixmatch(arg, "YES") ? true : false; } // Additional include path for the preprocessor. else if (optarg && arg.at(1)=='I') { tool = &compiler; compiler.addIncPath(winpath(arg.substr(2))); // FIXME: should check that the string trailing the 'I' actually // points to a valid path? 20010709 mortene. } // Compile for specific hardware. else if (optarg && forcompiler && arg.at(1)=='m') { std::string intelcpu = arg.substr(2); const char prefix[] = "cpu="; if (intelcpu.compare(prefix, strlen(prefix))==0) { intelcpu.erase(0, strlen(prefix)); } const char * cpuconv[] = { "i386", "G3", "i486", "G4", "pentium", "G5", "pentiumpro", "G6", NULL }; int i=0; while (cpuconv[i]) { if (intelcpu.compare(cpuconv[i])==0) { compiler.cpuspec = cpuconv[i+1]; break; } i += 2; } // Just ignores if unknown CPU type. Not sure if that's a good // strategy. } // Optimization (ie matching regexp "[-/]O[0-9]?"). else if (optarg && forcompiler && arg.at(1)=='O' && ((arg.length()==2) || (arg.length()==3 && isdigit(arg.at(2))))) { compiler.optimizelevel = arg.at(2) - 0x30; } // NOTE that we explicitly check for "-" as prefix for the GCC3 // options below, as they clash with the cl.exe options "/M?" for // specifying alternative C-libraries (MT-safe, debug-version, // etc). // GCC3-style "-MD" option for sending dependency tracking Make // rules to a file. The output file will have the same name as // srcfile, only with .d suffix instead of language-specific // suffix -- unless the "-MF" option is used. else if (optarg && match(arg.substr(0), "-MD")) { tool = &compiler; compiler.deptracking.generate = true; } // GCC3-style "-MT targetname" option for naming the target in a // dependency tracking Make rule. // // (ie: -MT 'name' ==> "name: ") else if (optarg && match(arg.substr(0), "-MT")) { tool = &compiler; compiler.deptracking.targetobj = argv[++i]; } // GCC3-style "-MF depfilename" option for naming the file to // write dependency tracking Make rules. else if (optarg && match(arg.substr(0), "-MF")) { tool = &compiler; compiler.deptracking.filename = argv[++i]; } // GCC3-style "-MP" option for including phony targets when // writing dependency tracking Make rules. else if (optarg && match(arg.substr(0), "-MP")) { tool = &compiler; compiler.deptracking.phonytargets = true; } // Alternative C-libraries. else if (optarg && (match(arg.substr(0), "/MD") || // MSVCRT.LIB match(arg.substr(0), "/ML") || // LIBC.LIB match(arg.substr(0), "/MT") || // LIBCMT.LIB match(arg.substr(0), "/MDd") || // MSVCRTD.LIB match(arg.substr(0), "/MLd") || // LIBCD.LIB match(arg.substr(0), "/MTd"))) { // LIBCMTD.LIB linker.alternative_c_lib = arg; } // Compile to object file else if (optarg && match(arg.substr(1), "c")) { tool = &compiler; compiler.compileobj = true; } // Name the objectfile / executable. else if (optarg && match(arg.substr(1), "o")) { std::string objname = argv[++i]; compiler.objname = objname; linker.objname = objname; } // Name the .pdb debug file. else if (optarg && prefixmatch(arg.substr(1), "Fd")) { tool = &compiler; tool->pdbname = arg.substr(3); } else if (optarg && prefixmatch(arg.substr(1), "PDB:")) { tool = &linker; tool->pdbname = arg.substr(5); } // Remaining MSVC-tool options are regarded as pass-through // information. else if (arg.at(0) == '/') { // "MSVC++ format" tool->passthrough.push_back(new std::string(arg)); } // Remaining options kills us. else { // Using a warning here and then continuing won't work, as then // for instance the configure script will believe the compiler // can handle all options which are tested. (void)fprintf(stderr, "%s ERROR: unknown option \"%s\"\n", argv[0], arg.c_str()); exit(1); } } /*** end of command-line parsing **************************************/ std::string cmd = compiler.getToolName(); if (compiler.deptracking.generate) { cmd = tool->getToolName() + (" /nologo /E " + tool->constructArguments()); std::string procstdout, procstderr; DWORD exitcode = run_process(cmd.c_str(), procstdout, procstderr); if (exitcode != 0) { // stdout should just get the preprocessor output, so we ignore // it and dump stderr only. (void)fprintf(stderr, "%s", procstderr.c_str()); exit(exitcode); } typedef std::set stringset_t; stringset_t includedeps; const char * p = procstdout.c_str(); const char * end = procstdout.c_str() + procstdout.length(); const char * HASHLINE = "#line"; const int HASHLINELEN = strlen(HASHLINE); while (p < (end - HASHLINELEN)) { // scan past whitespace while ((p < end) && ((*p == ' ') || (*p == '\t'))) { p++; } if ((*p == '#') && (strncmp(p, HASHLINE, HASHLINELEN)==0)) { p += HASHLINELEN; while ((p < end) && (*p != '"')) { p++; } p++; const char * e = p + 1; while ((e < end) && (*e != '"')) { e++; } assert(e > p); char buf[MAX_PATH]; int n = e - p; assert(n < MAX_PATH-1); (void)strncpy(buf, p, n); buf[n] = '\0'; includedeps.insert(std::string(buf)); } // scan past eol while ((p < end) && (*p != '\n')) { p++; } while ((p < end) && ((*p == '\n') || (*p == '\r'))) { p++; } } const char * depfilename = compiler.deptracking.filename.c_str(); // FIXME: handle compiler.deptracking.filename == "". 20010731 mortene. FILE * depfile = fopen(depfilename, "w"); if (!depfile) { (void)fprintf(stderr, "Couldn't write to ``%s'': %s\n", depfilename, strerror(errno)); exit(1); } // FIXME: handle compiler.deptracking.targetobj == "". 20010731 mortene. // FIXME: detect failure to write. 20010731 mortene. (void)fprintf(depfile, "%s:", compiler.deptracking.targetobj.c_str()); stringset_t::iterator i; for (i = includedeps.begin(); i != includedeps.end(); i++) { // FIXME: detect failure to write. 20010731 mortene. (void)fprintf(depfile, " \\\n\t%s", quotespaces(posixpath(*i)).c_str()); } // FIXME: detect failure to write. 20010731 mortene. (void)fprintf(depfile, "\n\n"); if (compiler.deptracking.phonytargets) { for (i = includedeps.begin(); i != includedeps.end(); i++) { // FIXME: detect failure to write. 20010731 mortene. (void)fprintf(depfile, "%s:\n", quotespaces(posixpath(*i)).c_str()); } } if (fclose(depfile) != 0) { (void)fprintf(stderr, "Couldn't close ``%s'': %s\n", depfilename, strerror(errno)); exit(1); } } cmd = tool->getToolName() + (" /nologo " + tool->constructArguments()); std::string procstdout, procstderr; DWORD exitcode = run_process(cmd.c_str(), procstdout, procstderr); // The geniuses at Microsoft push error messages from ``cl.exe'' out // on stdout -- _unless_ ``cl.exe'' is run in preprocessor modus // (with the /E option), then stdout will be occupied be the preproc // output, so errors must to go to stderr after all. bool printstdoutonstderr = exitcode != 0; if ((tool == &compiler) && compiler.aspreproc) { printstdoutonstderr = false; } (void)fprintf(printstdoutonstderr ? stderr : stdout, "%s", procstdout.c_str()); (void)fprintf(stderr, "%s", procstderr.c_str()); return exitcode; } dime/cfg/wrapmsvc.exe0100755017777301777730000037500007643247732013427 0ustar wwwwwwMZÿÿ¸@€º´ Í!¸LÍ!This program cannot be run in DOS mode. $PELÞ<à 8äö@0  ¸.text(ãä``.data¬  è@À.bssœ€À.idata¸ ò@ÀU‰åƒìƒ=BtÌÙ}þ·Eþ%Àðÿÿf‰Eþ·Eþ ?f‰EþÙmþƒÄôhÄ@è ‰ì]Ãvbad_allocFATAL ERRORerrorWin32 API %s, %s: %sU‰åƒìèÑ"‰À‰Eø‹E Pƒ}t ¸N@ëv¸Z@Ph`@¡B‹P Rè!ƒÄƒÄüjjEôPj‹EøPjhè‡"ƒÄ‰Eðƒ}ðt,ƒÄü‹EôPhq@¡B‹P RèI!ƒÄƒÄô‹EôPèZ"ƒÄ ƒ}t ƒÄôjè!ƒÄ‰ì]Ãstrlen(msg) < BUFSIZE/2wrapmsvc.cppvU‰å¸è[çE ‰EüƒÄü‹EüP‹EP…ðïÿÿPè¾ ƒÄƒÄô…ðïÿÿPèÜ ƒÄ‰À=ÿwë‰öƒÄüh$@jxh<@è€ ƒÄƒÄø…ðïÿÿPjè¸þÿÿƒÄ‰ì]ÃU‰å¸èßæE ‰EüƒÄü‹EüP‹EP…ðïÿÿPèB ƒÄƒÄô…ðïÿÿPè` ƒÄ‰À=ÿwë‰öƒÄüh$@jyh<@è ƒÄƒÄø…ðïÿÿPjè<þÿÿƒÄ‰ì]ÃInvoking external process: ``%s'' CreatePipe()LocalAlloc()CreateProcess("%s", ...CloseHandle([handle])GetExitCodeProcess()U‰å¸¸èãå€=BtƒÄü‹EPhD@¡B‹PRèPƒÄÇEðÇEôÇEøÇEð ÇEøjEðPEèPEìPè? ‰À…ÀuƒÄôhg@èˆþÿÿƒÄjEðPEàPEäPè ‰À…ÀuƒÄôhg@è_þÿÿƒÄjEðPEØPEÜPèí‰À…ÀuƒÄôhg@è6þÿÿƒÄƒÄüjjEÀP觃ăÄüjDj…pÿÿÿP葃ÄÇ…pÿÿÿDÇEœ‹Eì‰E¨‹Eà‰E¬‹E؉E°ƒÄøƒÄô‹EPètƒÄ‰ÀPRjètƒÄ‰…lÿÿÿƒ½lÿÿÿuƒÄôht@è©ýÿÿƒÄƒÄø‹EP‹…lÿÿÿPèïƒÄƒÄøEÀP…pÿÿÿPjjjjjj‹…lÿÿÿPjèƒÄ‰À‰…hÿÿÿƒÄô‹…lÿÿÿPèêƒÄ ƒ½hÿÿÿuƒÄø‹EPh@è1ýÿÿƒÄƒÄô‹EèPèÞƒÄ ‰À…ÀuƒÄôh™@è ýÿÿƒÄƒÄô‹EàPè¹ƒÄ ‰À…ÀuƒÄôh™@èçüÿÿƒÄƒÄô‹EØPè”ƒÄ ‰À…ÀuƒÄôh™@èÂüÿÿƒÄvƒÄôj…dÿÿÿPhÿ…`ïÿÿP‹EäPè_ƒÄ ‰À…Àtƒ½dÿÿÿu ëvë*‰ö…`ïÿÿ‹•dÿÿÿÆƒÄø…`ïÿÿP‹E Pè%rƒÄëœvƒÄôj…dÿÿÿPhÿ…`ïÿÿP‹EÜPè÷ƒÄ ‰À…Àtƒ½dÿÿÿu ëvë*‰ö…`ïÿÿ‹•dÿÿÿÆƒÄø…`ïÿÿP‹EPè½qƒÄëœÇ…Xïÿÿ‰öƒÄø…\ïÿÿP‹EÀPèƒÄ‰À…ÀuƒÄôh¯@è»ûÿÿƒÄ½\ïÿÿuÇ…Tïÿÿ2ƒÄôj2èlƒÄ ƒ…Xïÿÿ2½\ïÿÿtë뚉ö‹•\ïÿÿ‰Ðë‰ö‰ì]Ãpos >= length ()vU‰åƒìƒÄô‹EPèºÊƒÄ‰Eüƒ}üu °é‹vƒÄø‹EüHP‹EPè룃ĉÀŠˆUûÇEô€}û u,ÿEôƒ}ü~ ƒÄø‹EüƒÀþP‹EP踣ƒÄ‰À€8 uÿEôë €}û uÿEôƒ}ô~ƒÄø‹Eü‹Uô)ÐP‹EPè˜ÔƒÄƒ}ôŸÂˆÐë‰ö‰ì]ÃU‰åƒì,WVS‹]‹u è¬×‰À‰Â‰Ð‰ÇW‹ƒÀ‹‰UðÇEô¸AA‰uøUð‰ƒÄôVè×ɃĉÀPÿ‰UìƒÄø‹EìPVè¿¢ƒÄ‰À€8\t!ƒÄø‹EìPV訢ƒÄ‰À€8/t ƒ}ìë‰öë ‰öÿMìë¿v‹EìPjVSè§×ƒÄ ë‰öëW‹ƒÀ‹‹ ‰ƒÄøjVèÕ)ƒÄ‰ØeÈ[^_‰ì]ÂvU‰åì$S‹]ƒÄø…ðþÿÿPƒÄô‹E PèQ¤ƒÄ‰ÀPèîƒÄƒÄø…ðþÿÿPSè—yƒÄ‰Àë‰Ø‹Øþÿÿ‰ì]‰öU‰åì$S‹]ƒÄø…ðþÿÿPƒÄô‹E Pèù£ƒÄ‰ÀPèŽƒÄƒÄø…ðþÿÿPSè?yƒÄ‰Àë‰Ø‹Øþÿÿ‰ì]‰öU‰åƒì,WVS‹]è+Ö‰À‰Â‰Ð‰ÆV‹ƒÀ‹‰UðÇEô¸AA‰]øUð‰€}u!ƒÄüj‹E PSèꩃĉÀ…À”ÀˆEç阃Äô‹E PèTƒÄ‰EìƒÄôSèȃĉÀ;EìtÆEçëmÇEè‹Eè;Eì|ëR‰öƒÄôƒÄø‹EèPSè蠃ĉÀ¾R袃ĉǃÄô‹E ‹UèоR艃ĉÀ9ÇtÆEçë‰öÿEèë§vÆEçë‰öëV‹ƒÀ‹‹ ‰ƒÄøjSè(ƒÄŠEçeÈ[^_‰ì]Ã\vU‰åƒìLWVS‹]‹u èÕ‰À‰Â‰Ð‰ÇW‹ƒÀ‹‰UðÇEô¸AA‰uøUð‰ƒÄøVEÐPèûwƒÄW‹ƒÀ‹‰UÀÇEĸAAUЉUÈUÀ‰ÇEì‰öƒÄôEÐPèôƃĉÀ9Eìrë<ƒÄø‹EìPEÐP茌ƒÄ‰À€8 uƒÄühÇ@‹EìPEÐPèƒÄÿEìÿEì뮉öƒÄøEÐPSèowƒÄ‰ÀW‹ƒÀ‹‹ ‰ƒÄøjEÐPèú&ƒÄëëW‹ƒÀ‹‹ ‰ƒÄøjVèÙ&ƒÄ‰Øe¨[^_‰ì]ÂLIBresultsize == neededsize-1 ;LIB=='%s' t&r && "SetEnvironmentVariable() failed -- investigate"cl.exe /E /c /Ogityb2 /Gs / /Zi /Fo /Fe /Fd /D /I /Tc /Tplib.exelink.exe /dll /OUT: /PDB: /DEBUG /RELEASE /INCREMENTAL:YESNO/rCouldn't open file '%s'!! %s--wrapdbg--wrapversion$Revision: 1.45 $ .c.cpp.cxx.c++.cc.hOUT:.obj.o.lib.lstliblinkdllERELEASEDEBUGgINCREMENTAL:cpu=i386G3i486G4pentiumG5pentiumproG6›@ @£@¨@«@³@¶@Á@-MD-MT-MF-MP/MD/ML/MT/MDd/MLd/MTdcoFdPDB:t&%s ERROR: unknown option "%s" /nologo /E #linee > pn < MAX_PATH-1wCouldn't write to ``%s'': %s %s: \ %s %s: Couldn't close ``%s'': %s /nologo U‰åì\WVSèщÀ‰Â‰Ð‰…,úÿÿèÆƒ}…<ƒÄôEðPè¬sƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰UàÇEä¸AAUð‰UèMà‰ƒÄôEÐPèxsƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰UÀÇEĸAAUЉUÈMÀ‰ƒÄüEÐPEðPhZ@èWôÿÿƒÄ‰À‰E¼ƒÄüƒÄôEðPèèƒÄ‰ÀPh @¡B‹PR觃ăÄüƒÄôEÐP轃ĉÀPh @¡B‹P Rè|ƒÄ‹E¼‰…(úÿÿ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEÐPèÂ"ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPè"ƒÄ‹…(úÿÿé÷-vƒÄô…ÿÿÿPèA;ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰•ÿÿÿÇ…ÿÿÿl5A•ÿÿÿ‰•ÿÿÿÿÿÿ‰ƒÄô… þÿÿPèÿ4ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰•þÿÿÇ…”þÿÿ4A• þÿÿ‰•˜þÿÿþÿÿ‰…ÿÿÿ‰E¼Ç…Œþÿÿ‹…Œþÿÿ;E|éxƒÄø‹…Œþÿÿ…‹E ‹REÐPèÔqƒÄ‰À‹•,úÿÿƒÂ‹ƒÀ‹‰•€þÿÿÇ…„þÿÿ¸AAUЉ•ˆþÿÿ€þÿÿ‰Æ…'úÿÿƒÄøjEÐPèMšƒÄ‰À€8-tƒÄøjEÐPè5šƒÄ‰À€8/tëÆ…'úÿÿŠ…'úÿÿˆ…þÿÿ…ÿÿÿ9E¼”Àˆ…~þÿÿƒÄøEÐPEðPèkqƒÄ‰ÀƒÄüƒÄþfjh@EðPèë÷ÿÿƒÄˆÀ„ÀtÆBéR‰öƒÄøEÐPEðPè(qƒÄ‰ÀƒÄüƒÄþfjh@EðPè¨÷ÿÿƒÄˆÀ„Àt+ƒÄøh'@¡B‹PRè%ƒÄƒÄôjèƒÄéðƒÄøEÐPEðPèÈpƒÄ‰ÀƒÄøh:@…`þÿÿPèspƒÄ‰ÀƒÄø…`þÿÿPEðPè.ƒÄˆÀ„Àt&•ÿÿÿ‰U¼ƒÄøEÐP…ÿÿÿP臃Ä邉öÆ…&úÿÿƒÄøEÐPEðPèQpƒÄ‰ÀƒÄøh=@…`þÿÿPèüoƒÄ‰ÀƒÄø…`þÿÿPEðPè¨-ƒÄˆÀ„À…çƒÄøEÐPEðPèpƒÄ‰ÀƒÄøhB@…`þÿÿPè®oƒÄ‰ÀƒÄø…`þÿÿPEðPèZ-ƒÄˆÀ„À…™ƒÄøEÐPEðPèµoƒÄ‰ÀƒÄøhG@…`þÿÿPè`oƒÄ‰ÀƒÄø…`þÿÿPEðPè -ƒÄˆÀ„ÀuOƒÄøEÐPEðPèkoƒÄ‰ÀƒÄøhL@…`þÿÿPèoƒÄ‰ÀƒÄø…`þÿÿPEðPèÂ,ƒÄˆÀ„Àuë vÆ…&úÿÿ€½&úÿÿt$ÿÿÿ‰M¼ƒÄøEÐP…ÿÿÿP舄ƒÄéƒÄøEÐPEðPèènƒÄ‰ÀƒÄøhP@…`þÿÿPè“nƒÄ‰ÀƒÄø…`þÿÿPEðPè?,ƒÄˆÀ„Àt&…ÿÿÿ‰E¼ƒÄøEÐP…ÿÿÿPèb‡ƒÄ颉ö€½þÿÿ„ßEðjÿjUÐRPèÆËƒÄ ƒÄøhS@…`þÿÿPènƒÄ‰ÀƒÄø…`þÿÿPEðPè¿)ƒÄˆÀ„À„’• þÿÿ‰U¼EðjÿjUÐRPèpËƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•PþÿÿÇ…Tþÿÿ¸AAMð‰Xþÿÿ•Pþÿÿ‰EðƒÄøP… þÿÿPRè:dƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèQƒÄ鵯…%úÿÿƒÄøEÐPEðPè…mƒÄ‰ÀƒÄøhX@…`þÿÿPè0mƒÄ‰ÀƒÄø…`þÿÿPEðPèÜ*ƒÄˆÀ„ÀuOƒÄøEÐPEðPè;mƒÄ‰ÀƒÄøh]@…`þÿÿPèælƒÄ‰ÀƒÄø…`þÿÿPEðPè’*ƒÄˆÀ„Àuë vÆ…%úÿÿ€½%úÿÿ„EðƒÄøUÐRPèÄòÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•@þÿÿÇ…Dþÿÿ¸AAMð‰Hþÿÿ•@þÿÿ‰EðƒÄøP…ÿÿÿPèI„ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèƒÄEðƒÄøUÐRPèEòÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•0þÿÿÇ…4þÿÿ¸AAMð‰8þÿÿ•0þÿÿ‰EðƒÄøP… þÿÿPèʃƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðP虃ÄéýƒÄøEÐPEðPèÔkƒÄ‰ÀƒÄøh`@…`þÿÿPèkƒÄ‰ÀƒÄø…`þÿÿPEðPè+)ƒÄˆÀ„À„EðƒÄøUÐRPèrñÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰• þÿÿÇ…$þÿÿ¸AAMð‰(þÿÿ• þÿÿ‰EðƒÄøP…ÿÿÿPè?†ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèÆƒÄEðƒÄøUÐRPèóðÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•þÿÿÇ…þÿÿ¸AAMð‰þÿÿ•þÿÿ‰EðƒÄøP… þÿÿPèÀ…ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèGƒÄé«vƒÄøEÐPEðPè€jƒÄ‰ÀƒÄøhe@…`þÿÿPè+jƒÄ‰ÀƒÄø…`þÿÿPEðPè×'ƒÄˆÀ„À„Ž þÿÿ‰M¼EðƒÄøUÐRPèðÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•þÿÿÇ…þÿÿ¸AAUð‰•þÿÿþÿÿ‰EðƒÄøP… þÿÿPèÞ‹ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèiƒÄéÍ€½þÿÿtKEðjÿjUÐRPèöÆƒÄ ƒÄüƒÄþfjhj@EðPèðÿÿƒÄˆÀ„Àt… þÿÿ‰E¼Æ…ëþÿÿéz‰ö€½þÿÿtCEðjÿjUÐRPè¢ÆƒÄ ƒÄüƒÄþfjhn@EðPèÈïÿÿƒÄˆÀ„Àt• þÿÿ‰U¼é-€½þÿÿtKEðjÿjUÐRPèVÆƒÄ ƒÄüƒÄþfjhs@EðPè|ïÿÿƒÄˆÀ„Àt þÿÿ‰M¼Æ…èþÿÿéÚ‰ö€½þÿÿ„#ƒÄøjEÐPè-‘ƒÄ‰À€8L…Eð‰… úÿÿ…`þÿÿjÿjUÐRPèÖÅƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ðýÿÿÇ…ôýÿÿ¸AA•`þÿÿ‰•øýÿÿðýÿÿ‰…`þÿÿƒÄøP‹… úÿÿPèîÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•àýÿÿÇ…äýÿÿ¸AAUð‰•èýÿÿàýÿÿ‰EðƒÄøP…ÿÿÿPèʈƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèmƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…`þÿÿPèEƒÄEð‰…úÿÿ…`þÿÿjÿjUÐRPèÕÄƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ÐýÿÿÇ…Ôýÿÿ¸AA•`þÿÿ‰•ØýÿÿÐýÿÿ‰…`þÿÿƒÄøP‹…úÿÿPèíÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ÀýÿÿÇ…Äýÿÿ¸AAUð‰•ÈýÿÿÀýÿÿ‰EðƒÄøP… þÿÿPèɇƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèlƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…`þÿÿPèDƒÄ騀½þÿÿ„/ƒÄøjEÐPèýŽƒÄ‰À€8l…Eð‰…úÿÿ•`þÿÿ‰•úÿÿ…°ýÿÿjÿjUÐRPèšÃƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰• ýÿÿÇ…¤ýÿÿ¸AA°ýÿÿ‰¨ýÿÿ• ýÿÿ‰…°ýÿÿƒÄøP‹úÿÿQèÝëÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ýÿÿÇ…”ýÿÿ¸AA•`þÿÿ‰•˜ýÿÿýÿÿ‰…`þÿÿƒÄüh`@P‹…úÿÿPèŸbƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•€ýÿÿÇ…„ýÿÿ¸AAUð‰•ˆýÿÿ€ýÿÿ‰EðƒÄøP…ÿÿÿPèX€ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPè߃ċ•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…`þÿÿP跃ċ•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPèƒÄ…°ýÿÿ‰…úÿÿUð‰• úÿÿ…`þÿÿjÿjUÐRPèÂƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•pýÿÿÇ…týÿÿ¸AA`þÿÿ‰xýÿÿ•pýÿÿ‰…`þÿÿƒÄøP‹ úÿÿQèVêÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•`ýÿÿÇ…dýÿÿ¸AAUð‰•hýÿÿ`ýÿÿ‰EðƒÄüh`@P‹…úÿÿPèaƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•PýÿÿÇ…Týÿÿ¸AA•°ýÿÿ‰•XýÿÿPýÿÿ‰…°ýÿÿƒÄøP… þÿÿPèÑ~ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPèUƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPè0ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…`þÿÿPèƒÄél€½þÿÿtO…°ýÿÿjÿjUÐRPè“ÀƒÄ ƒÄüƒÄþfjhw@…°ýÿÿPè¶éÿÿƒÄˆÀ„Àt…ÿÿÿ‰E¼ÆE”év€½þÿÿtO…°ýÿÿjÿjUÐRPè;ÀƒÄ ƒÄüƒÄþfjhy@…°ýÿÿPè^éÿÿƒÄˆÀ„Àt• þÿÿ‰U¼Æ…êþÿÿé¼ €½þÿÿtO…°ýÿÿjÿjUÐRPèã¿ƒÄ ƒÄüƒÄþfjh@…°ýÿÿPèéÿÿƒÄˆÀ„Àt þÿÿ‰M¼Æ… þÿÿéd €½þÿÿ„·ƒÄøjEÐP蹊ƒÄ‰À€8D…›…ÿÿÿ‰E¼…°ýÿÿjÿjUÐRPèb¿ƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•@ýÿÿÇ…Dýÿÿ¸AA•°ýÿÿ‰•Hýÿÿ@ýÿÿ‰…°ýÿÿƒÄøP…ÿÿÿPèÍ„ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPè=ƒÄé¡ €½þÿÿtO…°ýÿÿjÿjUÐRPèǾƒÄ ƒÄüƒÄþfjh‡@…°ýÿÿPèêçÿÿƒÄˆÀ„ÀtÆ…ÿÿÿÆ… þÿÿéJ ‰ö€½þÿÿ„£…°ýÿÿjÿjUÐRPèk¾ƒÄ ƒÄøh‰@EðPè¿`ƒÄ‰ÀƒÄøEðP…°ýÿÿPègƒÄˆÀ„ÀtZ… þÿÿ‰E¼ƒÄøEÐP…°ýÿÿPè¾`ƒÄ‰ÀƒÄøhæ@EðPèl`ƒÄ‰ÀƒÄøEðP…°ýÿÿPèƒÄˆÀˆ…éþÿÿé˜ €½þÿÿ„+ƒÄøjEÐPè툃ĉÀ€8I…•ÿÿÿ‰U¼°ýÿÿ‰úÿÿEðjÿjUÐRPè½ƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•0ýÿÿÇ…4ýÿÿ¸AAUð‰•8ýÿÿ0ýÿÿ‰EðƒÄøP‹…úÿÿPèÖåÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰• ýÿÿÇ…$ýÿÿ¸AA•°ýÿÿ‰•(ýÿÿ ýÿÿ‰…°ýÿÿƒÄøP…ÿÿÿPè…yƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPè!ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèüƒÄé` €½þÿÿ„»€½~þÿÿ„®ƒÄøjEÐP訇ƒÄ‰À€8m…’…°ýÿÿjÿjUÐRPèZ¼ƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ýÿÿÇ…ýÿÿ¸AA•°ýÿÿ‰•ýÿÿýÿÿ‰¡–@‰Eð š@ˆEôƒÄüƒÄôEðPèÿƒÄ‰ÀPh–@…°ýÿÿPèaƒÄ‰À…Àu&ƒÄüƒÄôEðPèÑþƒÄ‰ÀPj…°ýÿÿPè]¥ƒÄ½àüÿÿ¾Ä@ü¹ ó¥Ç…Üüÿÿ‹…Üüÿÿ‰Â••àüÿÿƒ<uëwvƒÄüj‹…Üüÿÿ‰Â••àüÿÿ‹P…°ýÿÿPèÊŽƒÄ‰À…Àu5ƒÄø‹…Üüÿÿ@……àüÿÿ‹R…ÿÿÿŒRèTƒÄëvƒ…Üüÿÿélÿÿÿ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPè7 ƒÄé›v€½þÿÿ„Ÿ€½~þÿÿ„’ƒÄøjEÐPèà…ƒÄ‰À€8OuzƒÄôEÐPèr¬ƒÄ‰Àƒøt@ƒÄôEÐPè\¬ƒÄ‰ÀƒøuNƒÄôƒÄøjEÐPè™…ƒÄ‰À¾RèÓüƒÄ‰À…Àuë$ƒÄøjEÐPèr…ƒÄ‰À¾BЉE˜éïv€½þÿÿtO…°ýÿÿjÿjUÐRPèºƒÄ ƒÄüƒÄþfjhè@…°ýÿÿPè6ãÿÿƒÄˆÀ„Àt•ÿÿÿ‰U¼ÆE é—v€½þÿÿt{…°ýÿÿjÿjUÐRP軹ƒÄ ƒÄüƒÄþfjhì@…°ýÿÿPèÞâÿÿƒÄˆÀ„ÀtAÿÿÿ‰M¼ƒÄøÿ…Œþÿÿ‹…Œþÿÿ…‹E ‹R…ÿÿÿ”RèERƒÄ逽þÿÿt{…°ýÿÿjÿjUÐRPè7¹ƒÄ ƒÄüƒÄþfjhð@…°ýÿÿPèZâÿÿƒÄˆÀ„ÀtA…ÿÿÿ‰E¼ƒÄøÿ…Œþÿÿ‹…Œþÿÿ…‹E ‹R…ÿÿÿ˜RèÁQƒÄ逽þÿÿtO…°ýÿÿjÿjUÐRP賸ƒÄ ƒÄüƒÄþfjhô@…°ýÿÿPèÖáÿÿƒÄˆÀ„Àt•ÿÿÿ‰U¼ÆE¡é7v€½þÿÿ„»Æ…úÿÿ…°ýÿÿjÿjUÐRPèP¸ƒÄ ƒÄüƒÄþfjhø@…°ýÿÿPèsáÿÿƒÄˆÀ„À….…°ýÿÿjÿjUÐRPè¸ƒÄ ƒÄüƒÄþfjhü@…°ýÿÿPè5áÿÿƒÄˆÀ„À…ð…°ýÿÿjÿjUÐRPèÔ·ƒÄ ƒÄüƒÄþfjh@…°ýÿÿPè÷àÿÿƒÄˆÀ„À…²…°ýÿÿjÿjUÐRPè–·ƒÄ ƒÄüƒÄþfjh@…°ýÿÿPè¹àÿÿƒÄˆÀ„Àux…°ýÿÿjÿjUÐRPè\·ƒÄ ƒÄüƒÄþfjh @…°ýÿÿPèàÿÿƒÄˆÀ„Àu>…°ýÿÿjÿjUÐRPè"·ƒÄ ƒÄüƒÄþfjh@…°ýÿÿPèEàÿÿƒÄˆÀ„Àuë ‰öÆ…úÿÿ€½úÿÿt8ƒÄøEÐP…ÿÿÿP@RèæOƒÄƒÄøEÐP… þÿÿP@RèÍOƒÄém€½þÿÿtO…°ýÿÿjÿjUÐRPè“¶ƒÄ ƒÄüƒÄþfjh@…°ýÿÿPè¶ßÿÿƒÄˆÀ„Àtÿÿÿ‰M¼ÆE•év€½þÿÿ„…°ýÿÿjÿjUÐRPè7¶ƒÄ ƒÄüƒÄþfjh@…°ýÿÿPèZßÿÿƒÄˆÀ„À„ÉƒÄøÿ…Œþÿÿ‹…Œþÿÿ…‹E ‹R…°ýÿÿPèLXƒÄ‰À‹•,úÿÿƒÂ‹ƒÀ‹‰•ÐüÿÿÇ…Ôüÿÿ¸AA•°ýÿÿ‰•ØüÿÿÐüÿÿ‰ƒÄø…°ýÿÿP…ÿÿÿPRè¦NƒÄƒÄø…°ýÿÿP… þÿÿPRèŠNƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿP螃Äé‰ö€½þÿÿ„ç…°ýÿÿjÿjUÐRPè#µƒÄ ƒÄøh@EðPèwWƒÄ‰ÀƒÄøEðP…°ýÿÿPèƒÄˆÀ„À„š…ÿÿÿ‰E¼…°ýÿÿjÿjUÐRPèÍ´ƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ÀüÿÿÇ…Äüÿÿ¸AA•°ýÿÿ‰•ÈüÿÿÀüÿÿ‰…°ýÿÿƒÄøP‹E¼ƒÀ Pè”MƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿP訃Äé €½þÿÿ„ç…°ýÿÿjÿjUÐRPè/´ƒÄ ƒÄøh@EðPèƒVƒÄ‰ÀƒÄøEðP…°ýÿÿPè+ƒÄˆÀ„À„š… þÿÿ‰E¼…°ýÿÿjÿjUÐRPèÙ³ƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•°üÿÿÇ…´üÿÿ¸AA•°ýÿÿ‰•¸üÿÿ°üÿÿ‰…°ýÿÿƒÄøP‹E¼ƒÀ Pè LƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPè´ƒÄéƒÄøjEÐPèz~ƒÄ‰À€8/…ÀƒÄôjèZʃĉÀ‰…úÿÿÆ…ÿùÿÿ‹…,úÿÿƒÀ‹‰•üÿÿÇ…”üÿÿ•˜üÿÿ‰*¹¨L@‰J‰b•üÿÿ‰ƒÄøEÐP‹…úÿÿPèUƒÄ‰ÀÆ…ÿùÿÿ‰…¬üÿÿ…¬üÿÿƒÄøP‹E¼ƒÀ4PèS§ƒÄ‹…,úÿÿƒÀ‹‹ ‰€½ÿùÿÿtƒÄô‹•úÿÿRè¡ÍƒÄëë>‰öƒÄôEÐPèxƒÄ‰ÀP‹E ‹Rh$@¡B‹P Rè1õƒÄƒÄôjèõƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEÐPèrƒÄÿ…ŒþÿÿéxâÿÿƒÄøƒÄô…ÿÿÿPè>ƒÄ‰ÀP…°ýÿÿPèXTƒÄ‰À‹•,úÿÿƒÂ‹ƒÀ‹‰•€üÿÿÇ…„üÿÿ¸AA°ýÿÿ‰ˆüÿÿ•€üÿÿ‰€} „« MЉøùÿÿEð‰…ôùÿÿ…`þÿÿƒÄø‹U¼‹JDƒÁ‰ðùÿÿ‹ðùÿÿ¿‰ÑM¼QP‹…ðùÿÿ‹@‰…ìùÿÿ‹•ìùÿÿÿÒƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•püÿÿÇ…tüÿÿ¸AA`þÿÿ‰xüÿÿ•püÿÿ‰…`þÿÿƒÄüPhC@‹ôùÿÿQèPƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•`üÿÿÇ…düÿÿ¸AAUð‰•hüÿÿ`üÿÿ‰EðƒÄüPƒÄô‹E¼‹PDƒÂ‰•èùÿÿ‹èùÿÿ¿‰ÂU¼R‹…èùÿÿ‹@‰…äùÿÿ‹•äùÿÿÿ҃ĉÀP‹øùÿÿQèOƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•PüÿÿÇ…Tüÿÿ¸AAUЉ•XüÿÿPüÿÿ‰EÐƒÄøP…°ýÿÿPèRIƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEÐPèiƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèDƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…`þÿÿPèƒÄƒÄôEÐPèýQƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰•@üÿÿÇ…Düÿÿ¸AAUЉ•Hüÿÿ@üÿÿ‰ƒÄôEðPè½QƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰•0üÿÿÇ…4üÿÿ¸AAUð‰•8üÿÿ0üÿÿ‰ƒÄüEðPEÐPƒÄô…°ýÿÿPè3|ƒÄ‰ÀPè€ÒÿÿƒÄ‰À‰…Üüÿÿƒ½Üüÿÿt@ƒÄüƒÄôEðPè|ƒÄ‰ÀPh @¡B‹P RèÄñƒÄƒÄô‹…ÜüÿÿPèªñƒÄvƒÄô…`þÿÿPèùRƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰• üÿÿÇ…$üÿÿDBA•`þÿÿ‰•(üÿÿ üÿÿ‰ƒÄôEÐPè‚{ƒÄ‰À‰…üÿÿƒÄôEÐPèk{ƒÄ‰…àùÿÿƒÄôEÐPè& ƒÄ‰À‹•àùÿÿ‰•üÿÿÇ…üÿÿP@ƒÄô‹…üÿÿPè"ñƒÄ‰…Üùÿÿ‹Üùÿÿ‰üÿÿ‹…üÿÿ‹•üÿÿ)Ð9…üÿÿréy‹…üÿÿ;…üÿÿs‹…üÿÿ€8 t‹…üÿÿ€8 të‰öë ‰öÿ…üÿÿëÌ‹…üÿÿ€8#…˃Äü‹…üÿÿP‹…üÿÿP‹…üÿÿPèøïƒÄ‰À…À…¡‹…üÿÿ…üÿÿv‹…üÿÿ;…üÿÿs‹…üÿÿ€8"uëë ‰öÿ…üÿÿëØÿ…üÿÿ‹…üÿÿ@‰… üÿÿ‹… üÿÿ;…üÿÿs‹… üÿÿ€8"uëë ‰öÿ… üÿÿëØ‹… üÿÿ;…üÿÿvëƒÄühV@hÂh<@è±ïƒÄ‹… üÿÿ‹•üÿÿ‰Á)щìúÿÿ½ìúÿÿë‰öƒÄüh\@hÅh<@èqïƒÄƒÄü‹…ìúÿÿP‹…üÿÿP…ðúÿÿPèéîƒÄ…ðúÿÿ‹•ìúÿÿÆƒÄø…ðúÿÿP…àüÿÿPèÌNƒÄ‰À‹•,úÿÿƒÂ‹ƒÀ‹‰•àúÿÿÇ…äúÿÿ¸AA•àüÿÿ‰•èúÿÿàúÿÿ‰…àüÿÿƒÄøP…`þÿÿPè%šƒÄ‰À‰Ò‹,úÿÿƒÁ‹ƒÀ‹‹ ‰ƒÄøj…àüÿÿPè9þƒÄ‰ö‹…üÿÿ;…üÿÿs‹…üÿÿ€8 uëë ‰öÿ…üÿÿëØv‹…üÿÿ;…üÿÿs‹…üÿÿ€8 t‹…üÿÿ€8 të‰öë ‰öÿ…üÿÿëÌéoýÿÿvƒÄô…ÿÿÿ˜RèkxƒÄ‰À‰…ìúÿÿƒÄøhk@‹…ìúÿÿPèÔíƒÄ‰À‰… üÿÿƒ½ üÿÿuDƒÄôè€í‰À‹RèníƒÄ‰ÀP‹…ìúÿÿPhm@¡B‹P RèÞíƒÄƒÄôjèÉíƒÄ‰öƒÄüƒÄô…ÿÿÿ”RèÜwƒÄ‰ÀPh‹@‹… üÿÿPèíƒÄƒÄô…ÜúÿÿPèCNƒÄƒÄô…`þÿÿPèQvƒÄ‰…Øúÿÿ‹…Øúÿÿ‰…ÜúÿÿƒÄô…`þÿÿPèM“ƒÄ‰…Ôúÿÿ…ÔúÿÿƒÄøP…ÜúÿÿPè®GƒÄˆÀ„ÀuéüƒÄü…àüÿÿ‰…Øùÿÿ•ðüÿÿ‰•ÔùÿÿƒÄøƒÄô…ÜúÿÿPèïFƒÄ‰ÀP‹ÔùÿÿQèõÒÿÿƒÄ ƒÄø…ðüÿÿP‹…ØùÿÿPèXÔÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•ÀúÿÿÇ…Äúÿÿ¸AA•àüÿÿ‰•ÈúÿÿÀúÿÿ‰…àüÿÿƒÄôPè²vƒÄ‰ÀPh@‹… üÿÿPèsìƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…àüÿÿPè¿ûƒÄƒÄøj…ÜúÿÿPè›JƒÄ‰ÀéÉþÿÿƒÄøh–@‹… üÿÿPèìƒÄ€}¡„_ƒÄô…`þÿÿPèÔtƒÄ‰…¼úÿÿ‹…¼úÿÿ‰…ÜúÿÿvƒÄô…`þÿÿPèÍ‘ƒÄ‰…¸úÿÿ…¸úÿÿƒÄøP…ÜúÿÿPè.FƒÄˆÀ„ÀuéüƒÄü…ýÿÿ‰…Ðùÿÿ•ðüÿÿ‰•ÌùÿÿƒÄøƒÄô…ÜúÿÿPèoEƒÄ‰ÀP‹ÌùÿÿQèuÑÿÿƒÄ ƒÄø…ðüÿÿP‹…ÐùÿÿPèØÒÿÿƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰• úÿÿÇ…¤úÿÿ¸AA•ýÿÿ‰•¨úÿÿ úÿÿ‰…ýÿÿƒÄôPè2uƒÄ‰ÀPh™@‹… üÿÿPèóêƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…ýÿÿPè?úƒÄƒÄøj…ÜúÿÿPèIƒÄ‰ÀéÉþÿÿƒÄô‹… üÿÿPè=êƒÄ‰À…ÀtDƒÄôèê‰À‹RèòéƒÄ‰ÀP‹…ìúÿÿPhž@¡B‹P RèbêƒÄƒÄôjèMêƒÄ‰ö‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…`þÿÿPè+úƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEðPèzùƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøjEÐPèUùƒÄ…ýÿÿ‰…Èùÿÿ•ðüÿÿ‰•Äùÿÿ…àüÿÿƒÄø‹U¼‹JDƒÁ‰Àùÿÿ‹Àùÿÿ¿‰ÑM¼QP‹…Àùÿÿ‹@‰…¼ùÿÿ‹•¼ùÿÿÿÒƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•úÿÿÇ…”úÿÿ¸AAàüÿÿ‰˜úÿÿ•úÿÿ‰…àüÿÿƒÄüPh¹@‹ÄùÿÿQèUEƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•€úÿÿÇ…„úÿÿ¸AA•ðüÿÿ‰•ˆúÿÿ€úÿÿ‰…ðüÿÿƒÄüPƒÄô‹E¼‹PDƒÂ‰•¸ùÿÿ‹¸ùÿÿ¿‰ÂU¼R‹…¸ùÿÿ‹@‰…´ùÿÿ‹•´ùÿÿÿ҃ĉÀP‹ÈùÿÿQèÊDƒÄ ‹•,úÿÿƒÂ‹ƒÀ‹‰•púÿÿÇ…túÿÿ¸AA•ýÿÿ‰•xúÿÿpúÿÿ‰…ýÿÿƒÄøP…°ýÿÿPè•>ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…ýÿÿPè©÷ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…ðüÿÿPè÷ƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…àüÿÿPèY÷ƒÄƒÄô…ýÿÿPè7GƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰•`úÿÿÇ…dúÿÿ¸AA•ýÿÿ‰•húÿÿ`úÿÿ‰ƒÄô…ðüÿÿPèñFƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‰•PúÿÿÇ…Túÿÿ¸AA•ðüÿÿ‰•XúÿÿPúÿÿ‰ƒÄü…ðüÿÿP…ýÿÿPƒÄô…°ýÿÿPè^qƒÄ‰ÀPè«ÇÿÿƒÄ‰À‰…Üúÿÿƒ½Üúÿÿ•Àˆ…~þÿÿ…ÿÿÿ9E¼u €}”tÆ…~þÿÿƒÄüƒÄô…ýÿÿPèqƒÄ‰ÀPh @€½~þÿÿt‹B‹B ë v‹B‹BPèµæƒÄƒÄüƒÄô…ðüÿÿPèÈpƒÄ‰ÀPh @¡B‹P Rè‡æƒÄ‹…Üúÿÿ‰…°ùÿÿ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…ðüÿÿPèÇõƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…ýÿÿPèŸõƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…°ýÿÿPèwõƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj… þÿÿPè«çƒÄ‹•,úÿÿƒÂ‹ƒÀ‹‹ ‰ƒÄøj…ÿÿÿPèÛèƒÄ‹…°ùÿÿé1Àë}ë{ë‰í‹…,úÿÿƒÀ‹‰•0úÿÿÇ…4úÿÿ•8úÿÿ‰*¹M@‰J‰b•0úÿÿ‰€½ÿùÿÿtƒÄô‹•úÿÿR舽ƒÄëv‹…,úÿÿƒÀ‹‹ ‰èx¢ë‰ö‰íèA¡¥˜ùÿÿ[^_‰ì]Ãpos > lenlen - n1 > max_size () - n2n > max_size ()pos2 > len2pos > length ()out of memoryvU‰åìœWVSèC¡‰À‰Â‰Ð‰Eˆ‹UˆƒÂ‹ƒÀ‹‰UðÇEô¸AA‹U ‰UøUð‰‹UˆƒÂ‹ƒÀ‹‰UàÇEä¸AA‹U‰UèUà‰Ç…xÿÿÿ‹EˆƒÀ‹‰U°ÇE´U¸‰*¹ØN@‰J‰bU°‰ÆE‡ƒÄô‹EPè “ƒÄ‰E€ƒÄô‹U Rèû’ƒÄ‰À9E€rXEЉ…|ÿÿÿƒÄô‹U RèÜ’ƒÄ‰ÀPj‹EP‹•|ÿÿÿRèð ƒÄ Ç…xÿÿÿEÐjÿj‹U RPè>uƒÄ‰À…ÀuÆE‡‹EˆƒÀ‹‹ ‰ƒ½xÿÿÿtƒÄøjEÐPèòòƒÄëŠE‡ˆEëhëfë‰í‹EˆƒÀ‹‰UÇE”U˜‰*¹4O@‰J‰bU‰ƒ½xÿÿÿtƒÄøjEÐPè òƒÄëv‹EˆƒÀ‹‹ ‰è[ ë‰íè%Ÿë‹UˆƒÂ‹ƒÀ‹‹ ‰ƒÄøj‹URè[òƒÄ‹UˆƒÂ‹ƒÀ‹‹ ‰ƒÄøj‹E Pè9òƒÄŠE¥Xÿÿÿ[^_‰ì]ÉöU‰åìœWVSè?Ÿ‰À‰Â‰Ð‰Eˆ‹UˆƒÂ‹ƒÀ‹‰UðÇEô¸AA‹U ‰UøUð‰‹UˆƒÂ‹ƒÀ‹‰UàÇEä¸AA‹U‰UèUà‰Ç…tÿÿÿ‹EˆƒÀ‹‰U°ÇE´U¸‰*¹øP@‰J‰bU°‰ÆE‡ƒÄô‹EPè ‘ƒÄ‰E€ƒÄô‹U Rè÷ƒÄ‰À9E€ruEЉ…|ÿÿÿjÿƒÄô‹URèփĉ…xÿÿÿƒÄô‹E PèÁƒÄ‰À‹•xÿÿÿ)ÂR‹UR‹…|ÿÿÿPèÏžƒÄ Ç…tÿÿÿEÐjÿj‹U RPèsƒÄ‰À…ÀuÆE‡‹EˆƒÀ‹‹ ‰ƒ½tÿÿÿtƒÄøjEÐPèÑðƒÄëŠE‡ˆEëhëfë‰í‹EˆƒÀ‹‰UÇE”U˜‰*¹TQ@‰J‰bU‰ƒ½tÿÿÿtƒÄøjEÐPè€ðƒÄëv‹EˆƒÀ‹‹ ‰è;žë‰íèë‹UˆƒÂ‹ƒÀ‹‹ ‰ƒÄøj‹URè;ðƒÄ‹UˆƒÂ‹ƒÀ‹‹ ‰ƒÄøj‹E PèðƒÄŠE¥Xÿÿÿ[^_‰ì]Éö 12CompilerArgs10LinkerArgs4Tool´&U‰å‹U; Bu‰Ðëe‰ö…Òt,Ç´BBÇ0B`BÇpBÀBÇðBÀBë*‰öÇ´B,BÇ0BŒBÇpBìBÇðBìB¡ B‰ B‰ì]ÃU‰åƒìlWVSèvœ‰Ãƒ} tJ‹EƒÀ‹U‰Ç@ÔBÆ@Æ@ÇBÇ@Ç@fÇ@ Ç@ Ç@Ç@‹CMà‰Eà‹UÇEäEè‰mèÇ@S@‰`‰K‹Ç@¬Bƒ} u1}À¾¬Bü¹ó¥‹‹MUÀ‰P‰Ê‹ƒÀø)·´BÐf‰EÈ‹M‹ƒ}uÆBëÆBÆB‹E‰‹E‰BÇBfÇB ÇB ÇBÇB‹UÇB‹C‹‰C‰Ð[^_‰ì]ÃU‰åƒìS‹]‰öƒÄôSè3I‰ÂƒÄƒúÿt ¡\!BöDuá‹]è‰Ð‰ì]ÃU‰åƒìS‹]‹ŠP„Òt €ÊˆPëG‹H…Ét‹‹B9Bu ƒÄôQèƒÄ‹ƒÄô‹PèÎH‰Âƒúÿt‹E ˆÇCë‹€HÇC‰Ø‹]è‰ì]ÉöU‰åƒìV‹uS‹€xt ¸ÿÿÿÿëQ‰ö‹H…Ét‹‹B9Bu ƒÄôQ蒃ċ‹‹C9CrƒÄôSèú>ƒøÿt ‹C¶ë‰Âƒúÿu‹€H‰Ðeè[^‰ì]ÃU‰åƒì WVS‹]‹u ÇC‹ŠP„Òt €ÊˆPë]‹H…Ét‹‹B9Bu ƒÄôQèƒÄ‹‹8ƒ}ÿuƒÄøVWè&‰Cë&‰ö‹€HëNxƒÄôWè¸GƒÄƒøÿtäÿC;Euäeè‰Ø[^_‰ì]ÃU‰åƒìVS‹]‹u‹ŠP„Òt €ÊˆPëA‹H…Ét‹‹B9Bu ƒÄôQ芃ċƒÄü‹V‹E PRè‘@‰C9ðt‹€Hë ‰öÇCeè‰Ø[^‰ì]ÉöU‰åƒìS‹]‹‹…Ét ‹AHƒÄô¿PXÊR‹@\ÿÐ…Àu1Àë ‹€H¸ÿÿÿÿ‹]è‰ì]ÉöU‰åƒìS‹]ƒÄü‹E ‹‹jPRè×Gƒøÿu‹€H‰Ø‹]è‰ì]ÃvU‰åƒìS‹E‹U j‹]PR‹‹PèÚGƒøÿu‹€H‰Ø‹]è‰ì]ÉöU‰åƒìSj‹]jj‹‹PèªG‰Âƒúÿu‹€H‹]è‰Ð‰ì]ÃU‰åƒìS‹]‹ŠP„Òt €ÊˆPëZ‹@…Àt ƒÄôPèLƒÄ‹ö@ tƒÄôSèøƒÄëv¸…Àt$‹ƒÄô‹PèòE‰Âƒúÿu ‹€Hëv‹E ˆ‰Ø‹]è‰ì]ÉöU‰åƒìWV‹}S‹u ‰uü‹‹PÇ@‰Uø‹ŠP„Òt€ÊˆPév‹@…Àt ƒÄôP调ċö@ tƒÄôWè\ƒÄëv¸…ÀtU‹‹ë+¡\!BöDuƒ}øuƒÄø¾ÂPSèÑ%ë"vˆÿMøFƒÄôSè)E‰ÂƒÄƒúÿuË€H;uüu‹€HÆeØ[‰ø^_‰ì]ÃvU‰åƒìƒÄƒøÿtÖƒÄôVèM>ƒÄƒøÿuÝ‹€Heè‰Ø[^_‰ì]ÃvU‰åƒì$S‹]ŠE ˆEÿ‹€xuD‹@…Àt ƒÄôPè0 ƒÄ‹ƒÄø¾Uÿ‹PRè>ƒÄƒøÿu‹€H‹ö@ `t ƒÄôSèð ‰Ø‹]؉ì]Ã0123456789ABCDEF0X0123456789abcdef0xÍÌÌÌU‰åƒì\WMÐV}òS‹UÇEÌ_@ÇEÈ‹] ÇEÄ‹u‹‹P ‰Ð‰M´ƒàpƒø u9ˆØO$¬óÁîP0‰Øˆ ðué‹M‹€x À€ú0„·OÆ0鮃ø@uh¹_@öÆt¹_@‰ØOƒà¬óÁ‰Ø ðuè‹U‹€x }wƒÁÇEȉMÌëh‰öjj OVSè|¬0ƒÄˆjj VSèú®ƒÄ‰Ã‰Ö…öw׉ً,_@v‰ÈO÷ãÁê’À)Á€Á0ˆ‰Ñ…Éuæƒ}~‹U‹ö@ tÇEÄ‹UGÞ‹M´)Á‰MÀ‹‹PÇ@‰ÈEă}}@EÈ1ö9ЉÖ)Æ‹M‹‹P ‹ƒâ‰U¼Š@ˆE»…ö~#ƒútƒútƒÄü¾ÀVPSè•<ƒÄ9ðŒ¾ƒ}|ƒ}Ät"°+ƒ}}°-ƒÄø¾ÀSPè<ƒÄ…ÀŒƒ}ÈtƒÄü‹CH‹MÈQ‹UÌRS‹@4ÿЃÄ…Àtoƒ}¼u…ö~ƒÄüV¾E»PSè"<ƒÄ9ð|OƒÄü‹CH‹MÀQWS‹@4ÿЃÄ;EÀu6ƒ}¼u…ö~ƒÄüV¾E»PSèé;ƒÄ9ð|‹U‹ö@ `t%ƒÄôRèjë‹M‹€H‹ö@ `t ƒÄôQèNe˜[^_‰ì]ÃU‰åƒìS‹]‹€xu;‹@…Àt ƒÄôPè.ƒÄ¹‹U …Ò}‹ö@ `u÷Ú¹ÿÿÿÿ‰ÐQ1ÒRPSè;ýÿÿ‰Ø‹]è‰ì]ÉöU‰åƒìS‹]‹€xu"‹@…Àt ƒÄôPèÖƒÄj1Ò‹E RPSèüüÿÿ‰Ø‹]è‰ì]ÃvU‰åƒìS‹]‹€xu;‹@…Àt ƒÄôP薃Ĺ‹U …Ò}‹ö@ `u÷Ú¹ÿÿÿÿ‰ÐQ1ÒRPSè£üÿÿ‰Ø‹]è‰ì]ÉöU‰åƒìS‹]‹€xu"‹@…Àt ƒÄôPè>ƒÄj1Ò‹E RPSèdüÿÿ‰Ø‹]è‰ì]ÃvU‰åƒìWVS‹]‹u ‹}‹€xuD‹@…Àt ƒÄôPèöƒÄÇEü‰ò‰ù…É}‹ö@ `u÷ÚƒÑ÷ÙÇEüÿÿÿÿ‹EüPQRSèúûÿÿe؉Ø[^_‰ì]ÉöU‰åƒì WVS‹]‹u ‹}‹€xu‹@…Àt ƒÄôP芃ÄjWVSèµûÿÿeè‰Ø[^_‰ì]ÃU‰åƒì VS‹]ÝE Ý]ø‹€x…Ë@…Àt ƒÄôPèCƒÄ‹‹H ‰Êâúu¾fë+úu¾eöÅt¾Eëv¾göÅt¾G‹H…É ö@ u¹‹ƒÄô¿BP1ÀöB t¸+P‹B PQ‹BÇBPV‹‹Pÿuüÿuøèž!ƒÄ0…À}‹€H‹ö@ `t ƒÄôSè„e؉Ø[^‰ì]Ã(null)‰öU‰åƒìWV‹uS‹€x…‹@…Àt ƒÄôPèTƒÄƒ} uÇE sd@‹E 1ÿ‰Ãƒàtzƒøt8#t+C8#t&C8#t!C‹„Àt„ät©ÿt ƒÃ©ÿuåƒëCC‹+] ‹PÇ@‹ŠHˆMÿ‹‰Mø9Ú~‰×)ßö@ u…ÿ~ƒÄüW¾EÿP‹EøPè8ƒÄ9øu@‹UøƒÄü‹BHS‹M QR‹@4ÿЃÄ9Øu%‹ö@ t#…ÿ~ƒÄüW¾EÿP‹EøPèÚ7ƒÄ9øt‹€H‹ö@ `t ƒÄôVèXe؉ð[^_‰ì]ÃU‰åì W‹UVS‹€xtëwv‹U‹€HëU‹@…Àt ƒÄôPè ƒÄ‹U‹‹8µüÿÿë‰öƒÄü‹GHSVW‹@4ÿЃÄ9Øu»ƒÄühV‹E Pè0‰ÃƒÄ…ÛuЋU‹ö@ `t ƒÄôRè¼¥èûÿÿ‹E[^_‰ì]ÃU‰åƒìlWVSè–ˆ‰Ãƒ} tJ‹EƒÀ‹U‰Ç@ÔBÆ@Æ@ÇBÇ@Ç@fÇ@ Ç@ Ç@Ç@‹CMà‰Eà‹UÇEäEè‰mèÇ@Xg@‰`‰K‹Ç@ÄBƒ} u1}À¾ÄBü¹ó¥‹‹MUÀ‰P‰Ê‹ƒÀü)·ÌBÐf‰EÈ‹M‹ƒ}uÆBëÆBÆB‹E‰‹E‰BÇBfÇB ÇB ÇBÇB‹C‹‰C‹E[^_‰ì]ÃU‰åƒìS‹]ƒÄü‹E ‹‹jPRè_6ƒøÿu‹€H‰Ø‹]è‰ì]ÃvU‰åƒìS‹E‹U j‹]PR‹‹Pèb6ƒøÿu‹€H‰Ø‹]è‰ì]ÉöU‰åƒìSj‹]jj‹‹Pè26‰Âƒúÿu‹€H‹]è‰Ð‰ì]ÃU‰åƒìS‹]ƒÄô‹‹‹HH¿QXÐP‹A\ÿÐ…Àt‹€H‰Ø‹]è‰ì]ÃU‰åƒì‹EƒÄôPèºÿÿÿ‰ì]ÉöU‰åƒìS‹]‹ŠP„Òt €ÊˆPëN‹H…Ét‹‹B9Bu ƒÄôQè~ÿÿÿƒÄ‹ƒÄô‹PèþêÿÿƒÄƒøÿu ‹€Hë‰öƒÄø¾ÀP‹‹P跉؋]è‰ì]ÉöU‰åƒìS‹]ƒÄô‹‹Pè¹êÿÿƒÄƒøÿtƒÄø¾ÀP‹‹Pè|¸ë ‹€H1À‹]è‰ì]ÃU‰åƒìS‹]ƒÄø‹‹Pjèß3‰Ø‹]è‰ì]ÉöU‰åƒìS‹]ƒÄôƒÄø‹‹Pj è¸3ƒÄSèãþÿÿ‹]è‰ì]ÃU‰å‹E‰ì]ÉöU‰å‹E‰ì]ÉöU‰å‹E‰ì]ÉöU‰å‹E‰ì]ÉöU‰åƒìVS‹]‹u‹€xuH‹@…Àt ƒÄôPèRþÿÿƒÄ‹ƒÄü‹‹HHV‹E P‹P‹A4ÿЃÄ9ðt‹€H‹ö@ `t ƒÄôSèeè‰Ø[^‰ì]ÃvU‰åƒìS‹]‹ö@ t ƒÄôSèñýÿÿƒÄ‹ö@ @t"¡BƒÄô‹@PèQÈ¡BƒÄô‹@ Pè@È‹]è‰ì]ÃU‰åì¼WVSè—„‰Ã‰\þÿÿƒ} tM‹EƒÀ ‹U‰B‰Ç@ÔBÆ@Æ@ÇB Ç@Ç@fÇ@ Ç@ Ç@Ç@‹C‰Ú‰EàÇEäEè‰mè‹UÇ@Êl@MÀ‰`} EྫྷB‰C‰EÀÇEĉEÈÇEÌ6k@‰eЉK‹Ç@¬Bü¹ó¥‹‹MU ‰P‰Ê‹ƒÀø)·´BÐf‰E¨ÇA‹C‹‰C‹C`ÿÿÿ‰…`ÿÿÿ½ ÿÿÿÇ…dÿÿÿ…hÿÿÿ‰­hÿÿÿ¾ÄB‰`Ç@Êl@‰K‹•\þÿÿ‹B‰Hÿÿÿ‰…@ÿÿÿ@ÿÿÿÇ…DÿÿÿÇ…Lÿÿÿðk@‰¥Pÿÿÿ‰J‹M‹AÇ@ÄBü¹ó¥‹M‹A ÿÿÿ‰H‹E· ÌB+@ƒÀ Áf‰(ÿÿÿ‹B‹‰B‹C‰…àþÿÿ‹UÇ…äþÿÿ…èþÿÿ‰­èþÿÿÇ@Êl@‰`…àþÿÿ‰C‹Ç@üBƒ} u:½Àþÿÿ¾üBü¹ó¥‹‹M•Àþÿÿ‰P‰Ê‹ƒÀô)·BÐf‰…Èþÿÿ‹M‹ƒ}uÆBëÆBÆB‹E‰‹E‰BÇBfÇB ÇB ÇBÇB‹C‹‰C‹‰C‹‰C‹E[^_‰ì]ÃvU‰åƒìS‹]‹ öA tƒÄôQèÝëv…Ét‹AHƒÄô¿PXÊR‹@\ÿÐÇÆC‹]è‰ì]ÃU‰å‹E‹‹A ‰Âƒâƒ} t ë‰ö$þ‰A ‰ì‰Ð]Ã3iosŒB`7ostream7istream‰ö|B@œB@8iostream‰ö|B@22_IO_istream_withassignvœB@22_IO_ostream_withassign11_ios_fieldsvU‰åìLWVSèû€‰…Üþÿÿ‰…Äþÿÿ‹P‹B‰EàEðÇEä¤8A‰EèEà‰BUЉ•Øþÿÿ€=xBtƒÄôhlBèØOƒÄëvÿtB¸|B‹U‰EЉЃÄôƒâtzƒút80t-@80t(@80t#@‹„Òt„öt÷ÂÿtƒÀ÷Âÿuãƒè@@+EP‹EPjÿj‹•ØþÿÿRèx‹…ÜþÿÿƒÄ ‹P‹B‰EÀEÐÇEĸAA‰EÈEÀ‰B‹•ÄþÿÿÇEðÔB‰•Ôþÿÿ‰•Ðþÿÿ‹B‰E EÀÇE¤‰E¨E ÇE¬to@‰e°‰BUô‹EЉ•ÌþÿÿÇEð BPð€xütƒÄôRèßNƒÄë‰öÿ@ø‹•Ìþÿÿ‰‹•Ðþÿÿ‹B‰E€EÀÇE„‰EˆÇEŒto@E€‰e‰B‹E€‰B‹‰BëWvƒÅ@‹•Ðþÿÿ‹B‰…@ÿÿÿEÀÇ…Dÿÿÿ‰…HÿÿÿÇ…LÿÿÿÈo@…@ÿÿÿ‰¥Pÿÿÿ‰BÇEðÔB‹B‹‰BèÆ‰ö‹•Ôþÿÿ‹B‰… ÿÿÿEÀÇ…$ÿÿÿ‰…(ÿÿÿÇ…,ÿÿÿp@… ÿÿÿ‰¥0ÿÿÿ‰BÇEðÜB‹B‹‰B‹•Üþÿÿ‹B‹P‹‰P‹MиÿÿÿÿYðSðÁƒøu:‹QôB=€vƒÄôSèÌÁƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BƒÄôjèÞ‰…Èþÿÿ‹•Üþÿÿ‹B‰…àþÿÿÇ…äþÿÿ…èþÿÿ‰­èþÿÿ‰`Ç@lq@ƒÄø…àþÿÿ‰BEðP‹•ÈþÿÿRèü‹•ÜþÿÿƒÄ ‹B‹‹…Üþÿÿ‰P‹B‹‰B‹Mô¸ÿÿÿÿYðSðÁƒøu7‹QôB=€vƒÄôSèÁƒÄëBÁè…üÿÿÿ‹„B‰Qð‰˜„BƒÄüÇEðÔBh¤8A‹•Èþÿÿ‹‹@ÿÐP‹…ÈþÿÿPèƒè"~‰öèOŒvU‰åìLWVSè_}‰…Üþÿÿ‰…Äþÿÿ‹P‹B‰EàEðÇEä\7A‰EèEà‰BUЉ•Øþÿÿ€=xBtƒÄôhlBè‰ö‹UƒÄü÷‹BHV‹UÄR‹UR‹@4ÿЃÄ9ð…p‹]äƒÄü)óSßj0‹EPèZ‰öƒÄ9Ø…Mƒ}Ø„ÏƒÄø‹URj.è݃ąÀŒ*G‹Mä9ÎŽª‹E‰óƒÄü)Ëß‹PHS‹EÄÈP‹EP‹B4ÿЃÄ9Ø…ôë~‰öƒÄø‹URj0芃ąÀŒ×Gƒ}Øt\ƒÄø‹EPj.èjƒÄ…ÀŒ·‹]äƒÄü÷ÛS|;j0‹UR蟃Ä9Ø…”‹UƒÄü÷‹BHV‹UÄR‹UR‹@4ÿЃÄ9ðutƒÄü}Ì‹EÌPj0‹URè_ƒÄ;EÌuWƒ}Ðt%‹UƒÄü}ЋBH‹UÐR‹UÀR‹UR‹@4ÿЃÄ;EÐu,ƒ}àu"ƒ}È~‹EȃÄü}ÈP‹U(R‹EPè ;EÈu‰øë¸ÿÿÿÿeˆ[^_‰ì]ÃU‰åƒìS‹]‹ŠP„Òt €ÊˆPëI‹@…Àt ƒÄôPèlÜÿÿƒÄ‹ö@ tƒÄôSèÝÿÿƒÄëv¸…Àt‹ERP‹E P‹PèLP‰Ø‹]è‰ì]ÃvU‰åƒìS‹]‹ŠP„Òt €ÊˆPëI‹@…Àt ƒÄôPèüÛÿÿƒÄ‹ö@ tƒÄôSè¨ÜÿÿƒÄëv¸…Àt‹R‹EP‹E P‹PèÜO‰Ø‹]è‰ì]ÃU‰å‹M‹E 9ÈtM‹‹‹…Àu ÆBëvÆBÆB‰ÇBÇBfÇB ÇB ÇBÇBÇA‰ì‰È]ÃU‰å‹M‹E 9ÈtF‹‹‹…Àu ÆBëvÆBÆB‰ÇBÇBfÇB ÇB ÇBÇB‰ì‰È]ÃU‰åƒìWVS‹uŠ]ÇFƒ} ‹€HéÅ‹ŠP„Òt €ÊˆP锋H…Ét‹‹B9Bu ƒÄôQè¦ÚÿÿƒÄ‹ƒÄø‹8EüPjÿ¾ÃP‹EHP‹E PWè'O‰FƒÄ ƒ}üÿtƒÄôWèFƒÄ‰Eü‹Eüƒøÿuºƒ~uº‹¶ÛPë$‰ö¶Û9Øt‹ƒÄô€HWè¶ïÿÿë ÇEüÿÿÿÿ¶Û‹F‹U Æ9]üuÿF‰ðeØ[^_‰ì]ÃU‰åƒìWVSŠE‹]ˆEû‹} ‹uÇC…ö ‹€Hëi‹ŠP„Òt €ÊˆPëPv‹H…Ét‹‹B9Bu ƒÄôQèªÙÿÿƒÄ‹ƒÄø‹EüPjÿ¾EûPFÿPWRè.N‰C…Àu ƒ}üÿu‹€H‹CÆ8‰ØeØ[^_‰ì]ÃU‰åìW…üýÿÿVSƒÄøþÿÿPjÿ¾}WhS‹EPèÖM‰…øýÿÿƒÄ ƒ½üýÿÿÿtƒÄô‹URèì ƒÄ‰…üýÿÿ‹E ‹U ‹‰Æ‰…ôýÿÿµøýÿÿ‰2‹…üýÿÿƒøÿtL9øtHFƒÄü‰WR‹URèmÿÿÿ‰ÃƒÄ…Ûtn‹•ôýÿÿƒÄü‹•øýÿÿR•þÿÿRPè £Š…üýÿÿˆëC‹U ƒÄô‹@Pèùy‰ÃƒÄ…Ût*‹U ƒÄü‹Æ‰Ø‹•øýÿÿ+…øýÿÿR•þÿÿRPè¾¢‰Ø¥Øýÿÿ[^_‰ì]ÃvU‰åƒìWVS‹]ŠEˆEû‹} ‹ŠP„Òt €ÊˆPëf‰ö‹H…Ét‹‹B9Bu ƒÄôQèØÿÿƒÄ‹ÇEüƒÄü‹0¾EûPEüPVè‚þÿÿ‰1Ò…Àt‹Uü‰Söt$‹€Hƒ{u‹€HëvÇCÇe؉Ø[^_‰ì]ÃU‰åS‹M€9}5»8B¡8B…Àt$9Èu ‹A4£8Bë‹Z4‹B4…Àt 9Èuð‹A4‰B4€![‰ì]ÉöU‰å‹U€:|¡8B€ €‰B4‰8B‰ì]ÃU‰å‹E‹P ‹H)Ñ‹P0…Òtv‹B9È}‰Á‹…Òuñ‰ì‰È]ÃvU‰å‹E‰ì‹H‹P,‰P€`þ‰H,‹P$‹H ‰P‰P ‰H$]ÃvU‰åS‹E‹X‹H,‰X,‹P$‹X ‰H€H‰P ‰X$‰H[‰ì]ÃU‰åƒìS‹]‹C9Cv‹CHƒÄøjÿS‹@ÿЃøÿt2öCt ‹C(‰C ë‹C‰C ‹C;Cv‰C‹C€c÷‰C‰C‰C1À‹]è‰ì]ÉöU‰åƒìS‹]öCt ƒÄôSè/ÿÿÿƒÄƒÄô‹C$PèL ÇC$ÇC,ÇC(‹]è‰ì]ÃU‰åƒì‹MƒÄø‹E ‹QHPQ‹BÿЉì]ÃvU‰åƒìWVSƒÄô‹EPèŸþÿÿ‹U‰ÆƒÄ‹J,‹Z ‰È‹z)ß‹R$)÷)Ð9ÇާƒÄôÇEüdGdPè|Ÿ‰EøƒÄ…Àu ¸ÿÿÿÿéÿ…ö}<‹M‰ò‰ð‹]øƒÄü÷ÚA,ƒÃdRPSèÏŸ‰ØƒÄü)ð‹u‹N ‹V)ÊRQP赟ƒÄ ë‹EƒÄü‹]øƒÃdp WVS號ƒÄ‹U‹B$…Àt ƒÄôPèCŸ‹uøû‹M‰q$‰Y,ë\v)ø‰Eü…ö};‰ðƒÄü÷ØPP‹MüPèGŸ‹]ƒÄü‹Eü‹K ‹SC$)ÊR)ðQPè1Ÿëv…ÿ~UüƒÄüWPR蟋u‹EüF$‰F(‹V‹F )‹F0…Àt )P‹…Àu÷1ÀeØ[^_‰ì]ÃvU‰åƒìS‹]öCtƒÄôSè·ýÿÿƒÄƒøÿtm‹C;Cs¶ë`‰ööCtƒÄôSè9ýÿÿ‹CƒÄ;Cs¶ë?ƒ{0tƒÄôSè5þÿÿƒÄ…Àt¸ÿÿÿÿë!vƒ{$t ƒÄôSè±ýÿÿƒÄ‹CHƒÄôS‹@ÿЋ]è‰ì]ÃvU‰åƒìS‹]öCtƒÄôSèýÿÿƒÄƒøÿtu‹C;Cs ¶ÿCëevöCtƒÄôSèüÿÿ‹CƒÄ;Cs ¶ÿCë@‰öƒ{0tƒÄôSè•ýÿÿƒÄ…Àt¸ÿÿÿÿë!vƒ{$t ƒÄôSèýÿÿƒÄ‹CHƒÄôS‹@$ÿЋ]è‰ì]ÃvU‰åƒìS‹]‹C…Àtöu ƒÄôPèM‹E ‰C‹E‰C ƒ}t€#þë‰ö€ ‹]è‰ì]ÉöU‰åƒìS‹]ƒ{u)öu‹CHƒÄôS‹@dÿЃÄƒøÿujCHPCGPSèƒÿÿÿ‹]è‰ì]ÃU¸ÿÿÿÿ‰å‰ì]ÃU‰åƒìS‹]ƒÄô‹CHS‹@ÿЃøÿt ‹C¶ÿC‹]è‰ì]ÃU‰åƒì WVS‹u ‹}…ÿu 1À鄉ö‹U‹B‹Z)Ã…Û~J9ûv‰ûƒû~ƒÄüSVPÞè­œ‹EƒÄXë%‰ö…Û1Ûë‰ÂKÿ…É| vŠˆFBIy÷‹E‰P)ß…ÿtƒÄø¶PF‹URèöûÿÿƒÄƒøÿtOë‡v)}‹Eeè[^_‰ì]ÃU‰åƒìS‹MƒÄü‹] ‹E‹QHPSQ‹B<ÿЋ]è‰ì]ÃvU‰åƒì WVS‹}‹u ‹U‹B‹Z)Ã…Û~J9ûv‰ûƒû~ƒÄüSPVèë›Þ‹EƒÄXë%‰ö…Û1Ûë‰ÂKÿ…É| vŠˆBFIy÷‹E‰P)ß…ÿtƒÄô‹URèÃüÿÿƒÄƒøÿu)}eè[^‹E_‰ì]ÃvU‰åƒì WVS‹]ƒÄô‹u ‹}‹CHS‹@\ÿЃÄƒøÿu1Àë^‰ö…öt…ÿu€ CHjPCGPSè™ýÿÿëv€#ý7jPVSè„ýÿÿÇC‰ØÇCÇCÇCÇCÇC eè[^_‰ì]ÉöU‰åƒìS‹U‹E‹M ‹ZHPjQR‹CDÿЋ]è‰ì]ÃU‰åƒìS‹]ƒÄôhè5š‰ÂƒÄ…Òtj‚PRSèøüÿÿ¸ë¸ÿÿÿÿ‹]è‰ì]ÃU‰å‹E‹U Ê­ûÇ@‰‰ìÇ@ Ç@ Ç@Ç@Ç@Ç@Ç@Ç@4Ç@$Ç@(Ç@,Ç@0fÇ@D]ÉöU1À‰å‰ì]ÃvU‰åƒìS‹]‹C…ÀtöuƒÄôPè­™ÇC ƒÄÇC‹C0…ÀtÇ@‹…Àuó‹C$…ÀtƒÄôPèw™ÇC$ƒÄƒÄôSè ÷ÿÿ‹]è‰ì]ÃU¸ÿÿÿÿ‰å‰ì]ÃU‰åƒìS‹]‹U ‹C;C v8Pÿu H‰C¶Âë‹CHƒÄøRS‹@,ÿЃøÿt€#ï‹]è‰ì]ÃU‰åƒìS‹]‹C;C vPÿ‰S¶@ÿë‰ö‹CHƒÄøjÿS‹@,ÿЃøÿt€#ï‹]è‰ì]ÃvU‰åS‹M ‹] 9ÊvDÿ)Ð@J€: t 9Êwõ‹EØ[‰ì]ÃvU‰åƒìVS1ö‹8B…Ût'‹C9CvƒÄø‹CHjÿS‹@ÿЃÄƒøÿu‰Æ‹[4…ÛuÙeè‰ð[^‰ì]ÉöU‰åƒìS‹8B…Ût)v‹%=uƒÄø‹CHjÿS‹@ÿЃÄ‹[4…ÛuÚ‹]è‰ì]ÃvU‰åƒìS‹8B…Ût"vöuƒÄü‹CHjjS‹@TÿЃÄ‹[4…Ûuá‹]è‰ì]ÉöU‰åƒìè-ÿÿÿè´ÿÿÿ‰ì]ÃU‰åƒìVS‹u‹] ‰^öCt ƒÄôSèÐöÿÿöCt‹Cë‹C ‹S)‰V‹C0e艉s0[^‰ì]ÃU‰å‹M‹AP0ƒx0t‰ö‹9Èu‹‰ë‰Âƒ:uí‰ì]ÃU‰å‹E‹U ‰ì‹@‹R)Ð]ÃvU‰å‹M‹Q…Òu¸ÿÿÿÿëöBt‹Bë‹B ‹R)‰ЋI)Á‰È‰ì]ÃvU‰åƒìVS‹u ‹^;]t ¸ÿÿÿÿë<‰öƒ~|öCt ƒÄôSè£õÿÿ‹FC ëvöCu ƒÄôSèµõÿÿ‹FC‰C1Àeè[^‰ì]ÃU‰åƒì‹Eƒx0tÇ@0ƒx$t ƒÄôPèöÿÿ‰ì]ÃvU‰åƒìWVS‹u‹F 9F‡°ƒ~$töFu ƒÄôVèGõÿÿƒÄƒ~$u.ƒÄôh€è镃Ä…Àt@‰F$ƒÄôƒè€‰F,‰F(Vèõÿÿëgv‹F 9Fw\‹~ƒÄô)Ç?‰EüP謕‰EøƒÄ…Àu ¸ÿÿÿÿë[v‹]üƒÄü)û‹F ]øWPSè –‹F ƒÄôP辕‹Eø‰F ‰^Eü‰F‰^(‹VBÿ‰Fƒ} ÿt¾Bÿ;E tŠE ˆBÿ‹F¶eØ[^_‰ì]ÉöU¸ÿÿÿÿ‰å‰ì]ÃU¸ÿÿÿÿ‰å‰ì]ÃU¸ÿÿÿÿ‰å‰ì]ÃU1À‰å‰ì]ÃU‰åƒì‹U‹B;Br ƒÄôRè&÷ÿÿë¶ÿB‰ì]ÃU‰åƒìS‹M ‹]‹Q;QrƒÄø¶ÃPQèÒôÿÿë ˆˆØÿA¶À‹]è‰ì]à 0000000000000000U‰åƒìWVS1ö‹U ƒú u ¿0@ë"‰öƒú0u¿@@ëEð»‰Á‰öˆ Kyú‰Ç‹]ƒû~$‹UƒÄü‹BHjWR‹@4ÿÐƃăøuƒÃðƒûÜ…Û~‹UƒÄü‹BHSWR‹@4ÿÐƉðeØ[^_‰ì]ÃU‰åƒìS‹]ƒ{$t ƒÄôSè³óÿÿƒÄ‹EƒÄü‹SHP‹E PS‹BLÿЋ]è‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒ{$t#ƒÿuöCt ‹C‹S)‰Ð)ƃÄôSè\óÿÿƒÄ‹CH‹URWVS‹@DÿÐeè[^_‰ì]ÃU‰åƒìS‹]ƒÄôÇC@ÿÿÿÿ $SèòÿÿÇC8ÿÿÿÿ‹]è‰ì]ÉöU‰åƒì WVS‹]ƒ{8} ¸ÿÿÿÿé‹SƒÄü‹C)ÐPRSèmƒÄô‰ÇSèªüÿÿ‹CHƒÄ ƒÄôS‹€„ÿÐj‰ÆjjSè¾õÿÿƒÄ ÇC ÇCƒÄôÇCÇCÇCÇCSè0ñÿÿÇ $­û‰ðÇC8ÿÿÿÿÇC@ÿÿÿÿ…Àu‰øeè[^_‰ì]ÉöU‰åƒìS‹]ƒ{8|-‹SƒÄü‹C)ÐPRSèÁƒÄö@u‹CHƒÄôS‹€„ÿЃÄƒÄøjSè¸øÿÿ‹]è‰ì]ÃU‰åƒì WV1ÿS‹]‹Uƒ{8}XŠB‰öùÿÿ‰Ef‰p‹S1öƒÃ‰Uü“‰]øW‰Eô‰Uð‹GÁà‹}ЃÇ‰Eì‹Eø‹‹Eð‰Ú·ÒÁ닉ȃEð%ÿÿÁé)Â)˃Eø‰Æf‰Áþ‰Öf‰WÁþƒÇ‹Uì9Uðr¶‹Eô9Eøs=‰ö‹Eø‹‰ÐƒEø%ÿÿÁêð‰Æf‰Áþò‰Öf‰WÁþƒÇ‹Uô9UørÍëvÿMüƒÇüƒ?tõ‹Eü‹U‰B‹EeÈ[^_‰ì]ÃvU‰åƒì0VS‹E %ðˆÀü…É~‰Î1Û‰]è‰uìÝEèëRv÷ÙÁùƒù¸Óø‰EüÇEøÝEøë/ƒÁìÇEôƒùº¸)ʉÑÓàëv¸‰EðÝEð[^‰ì]ÃvU‰åƒìWVS‹EƒÄôP‹] ‰Uø‹@ÁàDü‰Eü‹8WèOùÿÿ‰Æ¸ )ð‰ƒþ ;¹ ‰û)ñÓëËð?‹Mø9Müv ‹Eü‹Püë‰ö1ÒN‰øÓ๠)ñÓê Ðëh‰ö‹Uø9Uüv ƒEüü‹Mü‹ë1ÒƒÆõtA‰ñ‰ûÓã‰Ð¹ )ñÓè ð? ËEø9Eüv ‹Mü‹yüë1ÿ‰ñ‰ÐÓ๠)ñÓï øë v‰û‰ÐËð?‰]ôe؉Eð[^ÝEð_‰ì]ÃvU‰åƒìó‰×9Ú~‰Ú;•\þÿÿ~‹•\þÿÿ…Ò~ )•\þÿÿ)Ó)׃½dþÿÿ~ZƒÄø‹•dþÿÿR‹(þÿÿQÛ½Àýÿÿèêÿÿ‰…(þÿÿƒÄü‹…4þÿÿP‹•(þÿÿR‹$þÿÿQèèÿÿÛ­ÀýÿÿƒÄ ‹•4þÿÿ‰•$þÿÿ‰…4þÿÿ…Û~%ƒÄøS‹4þÿÿQÛ½ÀýÿÿèêÿÿÛ­Àýÿÿ‰…4þÿÿƒÄƒ½`þÿÿ~+ƒÄø‹…`þÿÿP‹•0þÿÿRÛ½Àýÿÿè‡éÿÿÛ­Àýÿÿ‰…0þÿÿƒÄ…ÿ~%ƒÄøW‹0þÿÿQÛ½Àýÿÿè¶éÿÿÛ­Àýÿÿ‰…0þÿÿƒÄƒ½\þÿÿ~+ƒÄø‹…\þÿÿP‹•(þÿÿRÛ½Àýÿÿè‚éÿÿÛ­Àýÿÿ‰…(þÿÿƒÄƒÄü‹0þÿÿQ‹…4þÿÿP‹• þÿÿRÛ½Àýÿÿè¼êÿÿ‰… þÿÿƒÄø¿XfÇ@‹(þÿÿQ‹… þÿÿPè>êÿÿ‰ÂƒÄ Û­Àýÿÿ…ÒGøÿÿ…Ûu:ÙÀÝ•¨ýÿÿ‹…¨ýÿÿ‹•¬ýÿÿ…Àu ݨýÿÿ‹…¨ýÿÿ‹•¬ýÿÿ÷Âÿÿ„É÷ÿÿëÝØ‹…4þÿÿƒÄôPÛ½Àýÿÿè„ãÿÿ‹•0þÿÿƒÄôRèuãÿÿƒÄ ‹(þÿÿƒÄôQècãÿÿ‹…,þÿÿƒÄôPèTãÿÿƒÄ ‹• þÿÿƒÄôRèBãÿÿƒÄô‹$þÿÿQè3ãÿÿÛ­Àýÿÿƒ} t ‹•@þÿÿ‹E ‰ƒ½DþÿÿtÙैýÿÿ[^_‰ì]ÃU‰åƒìuëvÿMüƒÆü;uàvƒ>tð‹]ü‹U‰ZƒÄø‹E P‹URèCèÿÿ…ÀŒ°‹]äÇEø‹}àC‹E܉]ð‹uüÇEô‰EìÁæv‹]싃ÉЉ]ì%ÿÿ‹]ôÁê ‰ÈÁè·É‰]ôÁmô·Û‹‰Ð%ÿÿÁê)È)ÚEø‰EøÁ}øUø‰UøÁ}øf‰Wf‰ƒÇ‹Eè9Eìvšuàƒ>uëÿMüƒÆü;uàvƒ>tð‹]ü‹U‰Z‹Eðe¸[^_‰ì]ÃInfinityNaN0´&ø?aCoc§‡Ò?³È`‹(ŠÆ?ûyŸPDÓ?$@@@à?U‰åìÜWEÀVSÝEƒÄôÝ þÿÿ‹]Pè4àÿÿ‰…hþÿÿƒÄôE€Pè"àÿÿ‰…dþÿÿƒÄ ƒÄô…ÀþÿÿPè àÿÿ‰…`þÿÿƒÄÇ…\þÿÿÇ…Xþÿÿ‹B…Òt‹ $B¸Óà‰J‰BfÇB ‹… þÿÿ‹•¤þÿÿ…Ò}:Ç‹… þÿÿ‹•¤þÿÿÝ… þÿÿ‰ÑÝHþÿÿáÿÿÿ‰LþÿÿÝ…HþÿÿÝ þÿÿëÇ‹… þÿÿ‹•¤þÿÿ‰Ð%ð=ðuX‹EÇ'‹… þÿÿ‹•¤þÿÿ…Àu#÷ÂÿÿuÇ…Tþÿÿ’È@ƒ} t]‹U ÇšÈ@ëRÇ…Tþÿÿ›È@ƒ} tB‹M ÇžÈ@ë7ÙîÝ… þÿÿÚéßà€äD€ô@u0‹EÇÇ…TþÿÿŸÈ@ƒ} t ‹U Ç È@‹…TþÿÿéƒvƒÄô…¬þÿÿP…¨þÿÿPÿµ¤þÿÿÿµ þÿÿ‹dþÿÿQèèÿÿ‰…dþÿÿƒÄ ‹… þÿÿ‹•¤þÿÿ‰ÖÁîæÿt9Ý… þÿÿ‰ÐÝ@þÿÿ%ÿÿ ð?Æüÿÿ‰…DþÿÿÝ…@þÿÿÇ…lþÿÿ鳋¨þÿÿ¬þÿÿ³2ƒþ ~-‹… þÿÿ‹•¤þÿÿ¹@)ñ‰×ÓçÉÙÓè lj½4þÿÿë‰ö¹ ‹… þÿÿ‹•¤þÿÿ)ñÓà‰…4þÿÿ‹…4þÿÿ1Ò‰…¸þÿÿÆÍûÿÿ‰•¼þÿÿß­¸þÿÿÇ…lþÿÿÝ8þÿÿ‹…8þÿÿ‹•<þÿÿÂþ‰…8þÿÿ‰•<þÿÿÝ…8þÿÿ‰µ´þÿÿÛ…´þÿÿÙÉÜ%¨È@ÙÉÜ ÀÈ@ÙÉÜ °È@ܸÈ@ÞÁÙîÙÉÙ½²þÿÿf‹…²þÿÿf f‰…°þÿÿÙ­°þÿÿÛ•ŒþÿÿÙ­²þÿÿØÑßà€äE€üÝÙuÛ…ŒþÿÿÚéßà€äE€ü@t ÿŒþÿÿëÝØÇ…„þÿÿƒ½Œþÿÿw-Ý… þÿÿ‹…ŒþÿÿÜÅð´@ßà€äE€üuÿŒþÿÿÇ…„þÿÿ‹…¬þÿÿ)ðXÿ…Û|Ç…œþÿÿ‰xþÿÿë÷ÛÇ…xþÿÿ‰œþÿÿƒ½Œþÿÿ|!‹…ŒþÿÿÇ…˜þÿÿ‰…tþÿÿ…xþÿÿë%v‹•ŒþÿÿÇ…tþÿÿ)•œþÿÿ‰•˜þÿÿ÷˜þÿÿƒ} vÇE¿ƒ}~ƒEü1ÿÇ…€þÿÿƒ}‡›‹Mÿ$4Í@‰öLÍ@LÍ@pÍ@˜Í@zÍ@¢Í@Ç…”þÿÿÿÿÿÿ¾‹…”þÿÿÇE‰…þÿÿëSÇ…€þÿÿƒ}ÇE‹u‰µþÿÿ‰µ”þÿÿë+Ç…€þÿÿ‹E…Œþÿÿp‰…þÿÿ‰µ”þÿÿ…ö¾» Ç$Bƒþ3vºÛBC9ðvö‰$B‹B…Òt ‹B9$B~ƒÄôRè²ÛÿÿƒÄô¡$BPèTÛÿÿ£BƒÄ ‹B‰•Pþÿÿ‰•Tþÿÿƒ½”þÿÿ‡!…ÿ„‹Œþÿÿ1öÝ… þÿÿ‰ˆþÿÿ‹½”þÿÿº…É~V‰È‰ËƒàÁûÝÅð´@öÃtÙÁƒãºÜ5ȵ@Ý þÿÿ…Ût¸¨µ@öÃtÜ ðBÑûF…Ûuðܽ þÿÿÝ þÿÿëN‰ö‹Œþÿÿ÷ÙtB‰ÈÝ… þÿÿƒà‰ËÜ Åð´@ÁûÝ þÿÿt#¸¨µ@‰ööÃtÝ… þÿÿBÜ ðÝ þÿÿÑûF…Ûu䃽„þÿÿtJÙèÜ þÿÿßà€äEu;ƒ½”þÿÿ~2ƒ½þÿÿŽÝ… þÿÿBÜ ÈÈ@ÿŒþÿÿ‹þÿÿ‰”þÿÿÝ þÿÿ‰•´þÿÿÛ…´þÿÿÜ þÿÿÜÐÈ@Ý8þÿÿ‹…8þÿÿ‹•<þÿÿÂÀü‰…8þÿÿ‰•<þÿÿÝ…8þÿÿƒ½”þÿÿu6Ý… þÿÿÜ%ØÈ@Ý• þÿÿØÑßà€äE„´ÙÉÙàÞÙßà€äE„‘é]ƒ½€þÿÿ„_‹•”þÿÿÝàÈ@‹…PþÿÿÜ4Õè´@ÞáÝ… þÿÿÙ½²þÿÿf‹²þÿÿfÉ f‰°þÿÿÙ­°þÿÿÛ´þÿÿ‹´þÿÿÙ­²þÿÿ‰´þÿÿÛ…´þÿÿ€Ã0Ü­ þÿÿÝ• þÿÿˆ@‰…TþÿÿØÙßà€äE€ü„P ÙèÙÀÜ¥ þÿÿØÚßà€äE€ü„Ô¾9ÖžÝÈÈ@Ý… þÿÿÙËØÉÙËØÉ‹•TþÿÿÙ½²þÿÿf‹…²þÿÿf f‰…°þÿÿÙ­°þÿÿÛ•´þÿÿ‹´þÿÿÙ­²þÿÿÝ þÿÿ‰´þÿÿÛ…´þÿÿ€Ã0Ü­ þÿÿÝ• þÿÿˆB‰•TþÿÿØÛßà€äE€ü„¡ ÙÁÜ¥ þÿÿØÛßà€äE€ü„)F;µ”þÿÿŒ]ÿÿÿÝØéî‰ö‹•”þÿÿ¾ÝÈÈ@ÙÉÜ Õè´@‰öÝ… þÿÿÙ½²þÿÿf‹²þÿÿfÉ f‰°þÿÿÙ­°þÿÿÛ´þÿÿ‹´þÿÿÙ­²þÿÿ‹…Tþÿÿ‰´þÿÿÛ…´þÿÿ€Ã0Ü­ þÿÿÝ þÿÿˆ@‰…Tþÿÿ;µ”þÿÿuSÝÙÙÀÝàÈ@ÜÁÙÉÜ þÿÿßà€äE€ü„nÞáÜ þÿÿßà€äEu:ÝØÿTþÿÿ‹•Tþÿÿ€:0tïB‰•Tþÿÿé¦ vÝ… þÿÿFØÊÝ þÿÿé0ÿÿÿÝØÝØÝ þÿÿ‰½”þÿÿ‹…Pþÿÿ‹•ˆþÿÿ‰…Tþÿÿ‰•Œþÿÿ‹…¨þÿÿ…ÀŒfƒ½ŒþÿÿY‹ŒþÿÿÝÍð´@ƒ}}.ƒ½”þÿÿ%ŒÎÜ ØÈ@Ü þÿÿßà€ä„¹éËv¾vÝ… þÿÿØñ‹½TþÿÿÙ½²þÿÿf‹•²þÿÿfÊ f‰•°þÿÿÙ­°þÿÿÛ´þÿÿ‹´þÿÿÙ­²þÿÿ‰´þÿÿˆÙÛ…´þÿÿ€Á0ØÉÜ­ þÿÿÝ• þÿÿˆG‰½Tþÿÿ;µ”þÿÿumØÀÝ• þÿÿØÑßà€äEtÚéßà€äD€ô@…söÄjë ÝØÝØÝØÝØÿTþÿÿ‹•Tþÿÿ€:9u‹Pþÿÿ9Êuåÿ…ŒþÿÿÆ0‹½TþÿÿþG‰½Tþÿÿé'ÝØÝ… þÿÿÜ ÈÈ@Ý þÿÿÙîÝ… þÿÿÚéßà€äE€ü@„ùFéòþÿÿ‰ö‹•œþÿÿ‰•|þÿÿ‹½˜þÿÿƒ½€þÿÿ„©ƒ}#ƒ½lþÿÿt °3ë`‰ö¾6+µ¬þÿÿëQv‹”þÿÿK9˜þÿÿ| ‹½˜þÿÿ)ßëv+˜þÿÿ1ÿtþÿÿ˜þÿÿ‹µ”þÿÿ…ö}‹œþÿÿ‰|þÿÿ)µ|þÿÿ1öµœþÿÿƒÄøµxþÿÿ…@ÿÿÿjƒÄôPè¶ÔÿÿƒÄPèý×ÿÿ‰…\þÿÿƒÄƒ½|þÿÿ~/ƒ½xþÿÿ~&‹µxþÿÿ;µ|þÿÿ~‹µ|þÿÿ)µœþÿÿ)µ|þÿÿ)µxþÿÿƒ½˜þÿÿŽŠƒ½€þÿÿtb…ÿ~DƒÄøW‹…\þÿÿPè¦Ùÿÿ‰…\þÿÿƒÄü‹•dþÿÿ‰ÁRQ‹…hþÿÿPèŸ×ÿÿ‹•dþÿÿƒÄ ‰•hþÿÿ‰…dþÿÿ‹˜þÿÿ)ût/ƒÄøS‹dþÿÿQëvƒÄø‹½˜þÿÿW‹…dþÿÿPèBÙÿÿ‰…dþÿÿƒÄƒÄøj‹•`þÿÿRè×ÿÿ‰…`þÿÿƒÄƒ½tþÿÿ~ƒÄø‹tþÿÿQ‰ÇWèÙÿÿ‰…`þÿÿƒÄƒ}C‹… þÿÿ‹•¤þÿÿ…Àu)÷Âÿÿu!÷Âðtÿ…œþÿÿÇ…pþÿÿÿ…xþÿÿë Ç…pþÿÿƒ½tþÿÿt)‹•`þÿÿƒÄô‹BƒÂH‹‚Pè¨Õÿÿ‹µxþÿÿƒÄƒÆ )Æë‹µxþÿÿFƒæt ¸ )ð‰Æƒþ~ƒÆüë ƒþƒÆµœþÿÿµ|þÿÿµxþÿÿƒ½œþÿÿ~ƒÄø‹œþÿÿQ‹½dþÿÿWèØÿÿ‰…dþÿÿƒÄƒ½xþÿÿ~ƒÄø‹…xþÿÿP‹•`þÿÿRèWØÿÿ‰…`þÿÿƒÄƒ½„þÿÿtjƒÄø‹`þÿÿQ‹½dþÿÿWèCÙÿÿƒÄ…À}MƒÄüÿŒþÿÿjj Wè‰Óÿÿ‰…dþÿÿƒÄƒ½€þÿÿtƒÄüjj ‹…\þÿÿPèdÓÿÿ‰…\þÿÿƒÄ‹•þÿÿ‰•”þÿÿƒ½”þÿÿvƒ}~pƒ½”þÿÿ|4ƒÄøƒÄüjj‹`þÿÿQè!Óÿÿ‰…`þÿÿP‹½dþÿÿWè®ØÿÿƒÄ …ÀëÝØ‹E÷Љ…ŒþÿÿéÛÝØÝØÝØ‹•PþÿÿÆ1Bÿ…Œþÿÿ‰•Tþÿÿ鹃½€þÿÿ„£ƒ½|þÿÿ~ƒÄø‹|þÿÿQ‹½\þÿÿWè0×ÿÿ‰…\þÿÿƒÄƒ½pþÿÿt^‹•\þÿÿƒÄø‹BPƒÄô…ÿÿÿPèFÑÿÿƒÄPèÒÿÿ‰…XþÿÿƒÄø‹\þÿÿ‰ÇQWèÅÑÿÿƒÄ ƒÄøj‹…\þÿÿPèÍÖÿÿ‰…\þÿÿƒÄë‰ö‹•\þÿÿ‰•Xþÿÿ¾ëƒÄüjj ‹dþÿÿQè Òÿÿ‰…dþÿÿƒÄ‹½\þÿÿ9½XþÿÿuƒÄüjj WèéÑÿÿ‰…\þÿÿƒÄ‰…Xþÿÿë5ƒÄüjj ‹…XþÿÿPèÅÑÿÿƒÄü‰…Xþÿÿjj ‹•\þÿÿRè¬Ñÿÿ‰…\þÿÿƒÄ F‹`þÿÿƒÄøQ‹½dþÿÿWèÔíÿÿx0ƒÄø‹…XþÿÿP‹•dþÿÿRè×ÿÿƒÄ ‹\þÿÿƒÄü‰ÃQ‹…`þÿÿP‹•hþÿÿRèI×ÿÿ‰…hþÿÿƒÄfƒxuƒÄøP‹dþÿÿQèÑÖÿÿƒÄ‰Áë‰ö¹…Éu3ƒ}u-‹… þÿÿ‹•¤þÿÿ¨uƒÿ9„•…Û~G‹•Tþÿÿ‰øˆé³…Û|urƒ}ul‹… þÿÿ‹•¤þÿÿ¨u\…É~HƒÄøj‹dþÿÿQèGÕÿÿ‰…dþÿÿƒÄø‹…`þÿÿP‹•dþÿÿRè?Öÿÿ‰ÁƒÄ …É u÷Çt‰øGƒø9t‹…Tþÿÿ‰ùˆé$…É~0ƒÿ9u‹•TþÿÿÆ9B‰•Tþÿÿéʉö‰ù‹…TþÿÿþÁˆéòv‹Tþÿÿ‰úˆA‰Tþÿÿ;µ”þÿÿ…þÿÿë[¾ëƒÄüFjj ‹½dþÿÿWèÐÿÿ‰…dþÿÿƒÄƒÄø‹…`þÿÿP‹•dþÿÿRè-ìÿÿx0ƒÄ‹…Tþÿÿ‰ùˆ@‰…Tþÿÿ;µ”þÿÿ|®ƒÄøj‹•dþÿÿRèAÔÿÿƒÄø‰…dþÿÿ‹`þÿÿQPè?Õÿÿ‰ÃƒÄ …Û ud÷Çt\ÿTþÿÿ‹•Tþÿÿ€:9u"v‹Pþÿÿ9Tþÿÿt"ÿTþÿÿ‹½Tþÿÿ€?9tá‹…Tþÿÿþ@‰…Tþÿÿë0‹•Pþÿÿÿ…ŒþÿÿÆ1B‰•TþÿÿëÿTþÿÿ‹Tþÿÿ€90tïA‰TþÿÿƒÄô‹½hþÿÿWèUÎÿÿƒÄô‹…`þÿÿPèFÎÿÿƒÄ ƒ½\þÿÿtEƒ½Xþÿÿt ‹•\þÿÿ9•XþÿÿtƒÄô‹XþÿÿQèÎÿÿƒÄƒÄô‹½\þÿÿWèÎÿÿƒÄëÝØÝØÝØÝØƒÄô‹…dþÿÿPèæÍÿÿ‹•TþÿÿÆ‹½ŒþÿÿG‹M‰9ƒ} t‹E ‰‹…Pþÿÿ¥þÿÿ[^_‰ì]ÃU‰åƒì VEüS‹uÇEü‹M ‹UP‹]RQS襅ötŠUüVeØ[^‰ì]ÉöU‰åƒì‹U Ej‹MPRQèw‰ì]ÃU‰åƒìVS‹uƒÄø‹] ‹M‹U‹EjPRQSVè eè[^‰ì]ÃU‰åƒìWVS‹u ƒ}„½‹EÇé¯;Eu+ƒ}~ ˆFéÕƒ}ÊƒÄøP‹URèá»ÿÿ鸈FÿMëw;]r‹]ƒÄüS‹URPèÖU‰ÇƒÄ…ÿt9‹U‰uü‹E ‰û)Eü‹B)Ã}|Gƒ}~CƒÄüSPVèU‹E‰x‹EüØë]‹UƒÄü‹BSPVèûTÞ‹EƒÄX)]ƒ}t3‹U‹B‹Z)Ã…ÛpÿÿÿƒÄôRè¶ÿÿƒÄƒøÿ…#ÿÿÿƒ}t‹U‰+u ‰ðeØ[^_‰ì]ÃU‰åƒìƒÄôhDš@è!UÇB‰ì]ÃU‰åìœWVS‹E Ç…„ýÿÿ‰…˜ýÿÿÇ…€ýÿÿÇ…|ýÿÿÇ…ŒýÿÿÇ…ˆýÿÿ‹•˜ýÿÿ¶:B‰•˜ýÿÿ…ÿ„ ¡\!B‰ÂöD:tFëÿ…ˆýÿÿƒÄô‹MQèr¾ÿÿ‰ÇƒÄƒÿÿt ¡\!BöD8uØƒÄø‹EPW诃Ä랉öÿ…|ýÿÿ딃ÿ%…Ç…”ýÿÿÇ…ýÿÿ‹˜ýÿÿ¶9A‰˜ýÿÿƒÿx‡ÿ$½ÐÞ@vÄâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@´à@Ôâ@Ôâ@Ôâ@Ôâ@ðà@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@`á@`á@`á@`á@`á@`á@`á@`á@`á@`á@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ûâ@øá@øá@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@(á@Ôâ@Ôâ@°á@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@ìá@Ôâ@Ôâ@â@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@Ôâ@@â@ââ@øá@øá@øá@Dá@á@Ôâ@Ôâ@ á@Ôâ@xâ@·á@Pâ@Ôâ@Ôâ@â@Ôâ@Øá@Ôâ@Ôâ@ìá@ƒÄô‹EPè¼ÿÿ‰ÃƒÄƒûÿ„V 9ûtƒÄø‹URSèQ éY ÿ…ˆýÿÿé5ýÿÿƒ½ýÿÿ…@ Ç…ýÿÿé¡ýÿÿ÷…ýÿÿ·ÿÿÿ…! €ýÿÿé…ýÿÿ÷…ýÿÿ·ÿÿÿ… €ýÿÿéiýÿÿ÷…ýÿÿ·ÿÿÿ…é €ýÿÿéMýÿÿ÷…ýÿÿ·ÿÿÿ…Í ‹”ýÿÿ‰€ýÿÿ@|GЉ½”ýÿÿéýÿÿ¿Ç…€ýÿÿü2AÇ…„ýÿÿéM‰ö€ýÿÿ¿Ç…€ýÿÿô2AÇ…„ýÿÿé&v¿Ç…€ýÿÿô2A逑ýÿÿëev¿éù‰ö¿éí‰öƒÄø‹…˜ýÿÿP¿…ÿÿÿPèI ‰…˜ýÿÿ€ýÿÿ ƒÄ黀ýÿÿ 1ÿé­‰öýÿÿ¿Ç…€ýÿÿô2AÇ…„ýÿÿ郋•ýÿÿöÂ…ûÿÿöÂtƒE‹M‹•ˆýÿÿ‹Aüf‰é€ûÿÿ‹ýÿÿƒE‹U‹ˆýÿÿ‹Bü‰écûÿÿvÇ…Œýÿÿÿÿÿÿév öD:t€ýÿÿ¿Ç…€ýÿÿü2AÇ…„ýÿÿ ‹U‹B9BrƒÄôRèi°ÿÿƒÄƒøÿ„ ‹M‹A¶ƒúÿ„÷ ‹…ýÿÿ¨ u\¡\!BöDtP‹U‹BH‰J‰Èÿ…ˆýÿÿ;BrƒÄôRè°ÿÿƒÄƒøÿt‹U‹B¶ëv‰Ãƒûÿ„ ¡\!BöDu±ƒÿ‡ˆúÿÿÿ$½¤ã@¸ã@€ä@Øå@(ç@xê@ƒ½”ýÿÿu Ç…”ýÿÿ‹ýÿÿöÁt^1ö‹U‹B‹Z)Ã;”ýÿÿ}1)”ýÿÿ؃Äô‰BRÞèw¯ÿÿƒÄƒøÿuÏ…ö„ ÿ…|ýÿÿéþµ”ýÿÿ…”ýÿÿ‹M‰Aéç‹UƒÄü‹”ýÿÿ‹BHQƒE‹M‹QüR‹UR‹@<ÿЃÄ;…”ýÿÿ…½‹”ýÿÿˆýÿÿÿ…Œýÿÿé¦ùÿÿ‰öƒ½”ýÿÿu Ç…”ýÿÿÿÿÿÿ‹…ýÿÿ¨„‹U1Û‹J¶€¼*ÿÿÿtlA‹E»‰Hÿ”ýÿÿtX‰ö‹U‹B9BrƒÄôR蘮ÿÿƒÄƒøÿt‹M‹Q¶ƒøÿu…Û„&ÿ…|ýÿÿë‰ö€¼(ÿÿÿtB‹EC‰Pÿ”ýÿÿuª…Û„éE‹EƒE‹U‹H‹rü‰÷¶€¼*ÿÿÿtnŠˆ‹UFÿBÿ”ýÿÿt[‰ö‹M‹A9ArƒÄôQè®ÿÿƒÄƒøÿt‹U‹B¶ƒúÿu9þ„Žÿ…|ýÿÿë‰ö€¼*ÿÿÿtŠˆ‹MFÿAÿ”ýÿÿu§‰ó)û„vÆÿ…ŒýÿÿéŸvƒ½”ýÿÿu Ç…”ýÿÿÿÿÿÿ‹…ýÿÿ¨„‡‹U1Û¡\!B‹J¶öDudA‹E»‰Hÿ”ýÿÿtP‹U‹B9BrƒÄôRè@­ÿÿƒÄƒøÿt‹E‹H¶ƒúÿu ÿ…|ýÿÿë‰ö¡\!BöDuA‹UC‰Jÿ”ýÿÿu°ˆýÿÿé¥÷ÿÿƒE‹M‹E‹Œýÿÿ‹qüC‹H‰÷¡\!B¶öDugŠˆ‹UFÿBÿ”ýÿÿtT‹M‹A9ArƒÄôQ訬ÿÿƒÄƒøÿt‹E‹H¶ƒúÿu ÿ…|ýÿÿë!‰ö¡\!BöDuŠˆ‹UFÿBÿ”ýÿÿu­Æ)þ‰Œýÿÿµˆýÿÿéÿöÿÿv‹…”ýÿÿH=\v Ç…”ýÿÿ]µ ýÿÿýÿÿÀ‰óƒ½”ýÿÿ„e‹M‹A¶8GÕƒøM‡Oÿ$…|ç@<é@Äé@<é@Äé@Äé@´è@ìè@ìè@ìè@ìè@ìè@ìè@ìè@ é@ é@Äé@Äé@Äé@Äé@Äé@Äé@Äé@,é@,é@,é@,é@,é@,é@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Pé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@,é@,é@,é@,é@,é@,é@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Äé@Pé@ƒ½„ýÿÿu€‘ýÿÿÇ…„ýÿÿ‹…ýÿÿöÄt'%?ýÿÿ‰…ýÿÿév‹•„ýÿÿ¿U B‰•„ýÿÿ¥ýÿÿ?þÿÿël‹„ýÿÿ¿ M B‰„ýÿÿƒùŽ›ëÕƒ½„ýÿÿ Ž‹ëÅ‹…ýÿÿ¨@t~$¿‰…ýÿÿë(‹•ýÿÿöÆti…¡ýÿÿ9Æu_€æþÇ…„ýÿÿ‰•ýÿÿ‰ùˆ‹UF‹BH‰J‰È;BrƒÄôRèß©ÿÿƒÄƒøÿt‹U‹B¶ƒøÿu ÿ…|ýÿÿë ÿ”ýÿÿ…œýÿÿ€½ýÿÿ}9Þ†hƒÄø‹MQ¶FÿPèJéR¶~ÿƒÿxtƒÿXuƒÄø‹EPNWè(ƒÄ‹•ýÿÿö…ƃÄü‹„ýÿÿQjS‹•€ýÿÿÿ҉ƒÄ‹ýÿÿöÁu$‹…ýÿÿ¨tƒE‹M‹Aüf‰é¶‰ö‹…ýÿÿƒE‹M‹Aü‰é‹…”ýÿÿH=\v Ç…”ýÿÿ]µ ýÿÿýÿÿÀ‰óƒ½”ýÿÿ„µ‹U‹B¶8GÕƒø:‡Ÿÿ$…Ìê@Äë@dì@Äë@àë@dì@¸ë@¸ë@¸ë@¸ë@¸ë@¸ë@¸ë@¸ë@¸ë@¸ë@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@øë@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@dì@øë@€¥ýÿÿ?ëWv‹ýÿÿöÁ@„‘ƒá¿‰ýÿÿë:‰ö‹…ýÿÿöÄty%¿þÿÿ‰…ýÿÿë ‹…ýÿÿ%€=uZ€¥‘ýÿÿü€ýÿÿÀ‰úˆ‹MF‹AP‰Q‰Ð;ArƒÄôQè?§ÿÿƒÄƒøÿt‹M‹A¶ƒøÿu ÿ…|ýÿÿë ÿ”ýÿÿ…Lþÿÿ€½ýÿÿ}e‹…ýÿÿöÄt(9Þ†½ƒÄø‹URN¶P蟃Ä9Þwèé vN¶>ƒÿetƒÿEtƒÄø‹MQNWèt¶>ƒÄƒÄø‹EPWèaƒÄ‹•ýÿÿöÂu=ƒÄøÆjSè=ÉÿÿƒÄ‹ýÿÿöÁtƒE‹U‹BüÝë ƒE‹M‹AüÙÿ…Œýÿÿ)Þéùùÿÿvÿ…|ýÿÿƒ½Œýÿÿu Ç…Œýÿÿÿÿÿÿƒ}t‹E€ƒ}tƒ½|ýÿÿt‹U€ ¥Xýÿÿ‹…Œýÿÿ[^_‰ì]ÃvU‰åƒìWVS‹] ¶ Cƒù^u ¶ ¾Cë1ö‹Eºÿÿ‰Eü‰ö‹}ü‰ðˆO‰}üJyò…ÉuCÿëi¸)ð‰Æv‰ð‹Uˆ¶Cƒú-t …Òt ë?vƒú]t3ë5Cÿë3v¶ƒú]t9Ê}¹-ëÁCvA‰ð‹}ˆ99Ñ|ó뵉Øë‰Ñë¤[^_‰ì]ÃU‰åƒì‹EƒøÿtƒÄø¶ÀP‹E Pè~ªÿÿ‰ì]ÃU‰åƒìè­DU¡LB‰åƒìÿЉì]ÃvU‰åƒì‹UƒÄø‹E PRèzD…Àt1Àë‰ö‹E‰ì]ÃU‰å‰ì]ÃU‰åƒìWSƒÄôjèC‰ÃƒÄ…Ûuèœÿÿÿ‰ß1Àü¹ó«eèC‰C‰Ø[_‰ì]ÃvU¡PB‰åƒìÿЉì]ÃvU¡PB‰åƒìÿЉìƒÀ]ÃU‰åÇPB(ï@ƒìè‰ì]ÃvU‰åƒ=DBu8ÇDB¸4BÇ4BÇ@Ç@Ç@ Ç8BTB‰ì¸4B]ÃvU¡PB‰åƒìÿЉìƒÀ]ÃU‰åì\WVS¡PBÿЉ…¼ùÿÿ‹•¼ùÿÿƒÀ‰…¸ùÿÿ‹BX‰´ùÿÿƒx„—…Àùÿÿ‰…°ùÿÿÇ@‹B‰…Àùÿÿ…Èùÿÿ‰­ÈùÿÿÇ@ð@‰`ë‰öëZ‰ö‹°ùÿÿ‹•¸ùÿÿ‰‹…´ùÿÿƒ8t+v‹•´ùÿÿƒÄø‹´ùÿÿ‹‹H‹P‹‰jRÿуă;uØ‹•°ùÿÿ‹¸ùÿÿ‹‰ë‰öèÿýÿÿ‹…¼ùÿÿƒxt ‹•¸ùÿÿ‹ƒ8uèáýÿÿ‹¸ùÿÿ‹H‹‰‹h‹aÿaU¡PB‰åì\WVSÿЉÂB‰…¼ùÿÿ‹BH‰¸ùÿÿƒx„Àùÿÿ‰´ùÿÿÇC‹B‰…Àùÿÿ…Èùÿÿ‰­ÈùÿÿÇ@ñ@‰`ëëR‰ö‹•´ùÿÿ‹…¼ùÿÿ‰‹¸ùÿÿƒ9t%v‹¸ùÿÿƒÄø‹‹H‹P‹‰jRÿуă;uÞ‹•´ùÿÿ‹¼ùÿÿ‹‰ëèýÿÿ‹¼ùÿÿ‹‹‰è"þÿÿv¼'Internal Compiler Bug: No runtime type matcher. vU‰åƒìèEýÿÿ‹‹ …ÉtƒÄüj‹EPRÿÑ…À•À¶ÀëvƒÄüj0htñ@jèÇ@1À‰ì]ÃU‰å‹E‰ì]¿@ÉöU‰å‹E‰ì]¿@ÉöU‰åƒìWVS‹] …Ûth¿ÿÿÿÿÇEüƒ;ÿtG1ö‹ 3;Mw$‹T3;UvƒÿÿtÁà;Tw; r‹}üë …ÿ|‹E93w ƒÆ ÿEüƒ<3ÿu¼ƒÿÿt ‹Dƒë‰ö1À[^_‰ì]ÃvU‰åƒìWVSÇEü‹Eǃ} „¥‹] 1҃Ã}t#‹M‹U)Ú‹AÁúH‰E‰ÐÁàƒ<ÿtzBëvÿM‰ÖÁæƒ<3ÿtf‰÷‹U9;wQ9T3vK‹T3 …Òt6‹M‹…Àt:ƒÄü‹M QR‹URÿЃÄ…Àt%ƒ}üu‹t3‰uü‹MÇëƒ}üu‹t3‰uüƒÇ‰þƒ<;ÿuœeØ‹Eü[^_‰ì]ÃvU‰åƒìS‹] ‹UC\€<uKv‹‘€<t÷€|\u C‹ë ‰öèg?v[‰ì]ÃvU‰åƒì WVS‹]ƒÄü‹u‹E jPSèšÿÿÿƒÄü‰ÇjVSèŒÿÿÿƒÃôƒÄ ºƒûwº ƒÄüRWPè`>eè[^_‰ì]ÉöU‰åƒìVS‹]ƒÄø‹E‹u SPè­'‰ÃƒÄ…Ûu1Àë'·CX€|0\tƒÄüjVPè!ÿÿÿ‹ë‹‰‹C‰Øeè[^‰ì]ÃU‰å‰ì]ÃU‰åìœW… ÿÿÿVS‹M‰…¨þÿÿ‹U Ç…”þÿÿ‰•¤þÿÿ‹EÇ…Œþÿÿ‹u‹I]‰„þÿÿ‰ßƒx •ÀÇ…¬þÿÿ¶À‰…þÿÿü¹ó¥Ç… þÿÿév‹S…Òu1Àë ƒ:þ”À¶Àƒ½þÿÿtBÇ…þÿÿƒÄô…¬þÿÿPj‹…„þÿÿPR‹U‹B Pè`ýÿÿ‰… þÿÿ‹MÇA ƒÄ ëEv…Àt(ƒÄô…¬þÿÿPj‹…„þÿÿPR‹U Rè'ýÿÿ‰… þÿÿƒÄ ëƒÄøR‹M Qè‹üÿÿ‰… þÿÿƒÄƒ½ þÿÿtOƒ½¬þÿÿ„üƒ½Œþÿÿu9½°þÿÿ‰Þü¹󥋅 þÿÿÇ…Œþÿÿ‹U ‰…œþÿÿ‰•˜þÿÿÇ…”þÿÿƒÄü·CZ‹€þÿÿQSPèqýÿÿ‹ƒÄH‰E ‰€þÿÿƒÄü‹…¨þÿÿ‰ÚPR‹M Qèìýÿÿ‰ÃƒÄ‹…€þÿÿ‰…¨þÿÿ…Û…³þÿÿƒ½Œþÿÿt)‹•œþÿÿ°þÿÿ‹˜þÿÿ‰• þÿÿ‰M ƒ½”þÿÿtèùýÿÿƒ½ þÿÿuèë÷ÿÿ‹E‹• þÿÿ‰‹K ‰ˆþÿÿ‹…¤þÿÿ9E u‹]é±Ç…”þÿÿë‹u‰ß‹U ‹¤þÿÿ‰•|þÿÿ‰M ü¹󥋅|þÿÿ9E t{‰öƒÄü‹•¨þÿÿR‰ßW1ö‹M Qèýÿÿ‰Ã‰½¨þÿÿC\ƒÄ‰…xþÿÿ·CZ9Æt‹•xþÿÿ€<tƒÄü‹MQSVèŽüÿÿƒÄFƒþ~ÕƒÄü·CZWSPè.üÿÿ‹ƒÄH‹•|þÿÿ‰E 9Ðu‡‹M¥Xþÿÿ‹‹)‹E•ˆþÿÿ‰[^‹… þÿÿ_‰ì]ÃU‰åìŒWVS¡PBÿЉEˆUŒE‰U€‰E„‹Eˆƒxuè¼öÿÿƒÄø‹U„Rh¤÷@è$‰E„ƒÄ…Àuèœöÿÿ‹E„U‰‹E‹U€HR‹U„RP‹EˆPè†üÿÿ‰Â‹MŒ‹EˆÇEô÷@ëÌÿâ¥hÿÿÿ[^_‰ì]ÃvU‰åìŒWVS¡PBÿЉEˆE‹Uˆ‰E„ƒzuè.öÿÿ‹E‹Uˆ‰B EŒ‰E€ƒÄø‹U„RhAø@è~#‰E„ƒÄ…Àuèÿõÿÿ‹E„U‰‹E‹U€HR‹U„RP‹EˆPèéûÿÿ‰Â‹MŒ‹EˆÇEø@ëÌÿâ¥hÿÿÿ[^_‰ì]ÃQ‰áƒÁ=réƒ -ëé)Áƒ ‰à‰Ì‹‹@ÿàbad_alloc‰öU‰åƒì‹U‹E ÇB” B¨t ƒÄôRèp‰ì]ÃU‰åƒìS‹U‹E ³9Ðt‹ƒÄøP‹PèÏ9…Àu³ˆØ‹]è‰ì]ÃU‰åìôSè‘õÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEì~ù@‰eð‰B‹Eà‰B…Û„‰ÐÇC” B‹E ‰‹B‰E€E ÇE„‰EˆÇEŒÆù@E€‰e‰BÇCüB‹B‹‰B‹B‰…@ÿÿÿE Ç…Dÿÿÿ‰…HÿÿÿÇ…Lÿÿÿú@…@ÿÿÿ‰¥Pÿÿÿ‰BÇCTB‹E‰C‹E‰C ‹B‹‰B[‰ì]ÃU‰åìôSè¹ôÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEìVú@‰eð‰B‹Eà‰B…Û„ЉÐÇC” B‹E ‰‹B‰E€E ÇE„‰EˆÇEŒžú@E€‰e‰BÇCüB‹B‹‰B‹B‰…@ÿÿÿE Ç…Dÿÿÿ‰…HÿÿÿÇ…Lÿÿÿèú@…@ÿÿÿ‰¥Pÿÿÿ‰BÇC<B‹E‰C‹B‹‰B[‰ì]ÃvU‰åƒìtSèèóÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEì'û@‰eð‰B‹Eà‰B…Ût>ÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇEÌiû@EÀ‰eЉBÇCüB‹B‹‰B[‰ì]ÉöU‰åƒì‹E ƒÄø‹UPRèŽýÿÿ1Ò„Àt‹U‰ì‰Ð]ÃvU‰åƒì WVS‹uƒÄø‹} ‹]WVè`ýÿÿƒÄ„Àu%‹VƒÄø‹E‹JP‹EPS‹EPW¿AÂR‹AÿÐë‰Øeè[^_‰ì]ÃU‰åƒìW‹UVSƒÄø‹E PRèýÿÿƒÄ„Àt‹EéÇEü1ÿ‹Uü‹E;P ƒå‹E‹Hƒ}tŠDùÀè<…½‹Dù%ÿÿÿ‹]ÃöDù t‹‹ùƒÄø‹P‹EP‹EPS‹EP‹E P¿BùP‹BÿÐ‰ÃƒÄ …Ûtvƒ}ütf9]ütkƒ}ta‹E ƒÄø‹Pjj‹EüPj‹EP¿BE P‹BÿÐ‰ÆƒÄ ‹E ƒÄø‹PjjSj‹EP¿BE P‹BÿÐƒÄ 9Æt;ut;Eu‰]üë1ÀëG‹U;z ‚ÿÿÿ‹EüeØ[^_‰ì]Ã9type_info8bad_cast10bad_typeid16__user_type_info14__si_type_info17__class_type_info9exceptionpure virtual method called U‰åƒìƒÄüjh„ý@jèõ4è¤ðÿÿ‰ì]ÃU¡LB‰åƒìÿÐvU‰åƒìèåÿÿÿU‰å‹LB‹E£LB‰ì‰Ð]ÃU‰å‹TB‹E£TB‰ì‰Ð]ÃU¡TB‰åƒìÿÐvU‰åƒìèÑðÿÿ‹‰ìƒÀ]ÃU‰åƒìè½ðÿÿ‰ì‹]ÃvU‰åƒìè©ðÿÿ‹‰ìÆ@ÿ@]ÃU‰åƒìƒÄô‹EPèf3ƒÄ…ÀuèFÿÿÿ‰ö‰ì]ÃU‰åƒì‹EƒÄôPèŠ3‰ì]ÉöU‰åƒìS‹]‹U ‹E…Àt fƒxt1Àë)ƒúÿu‹Cë‰öÿ҉ƒÄü‹C P‹C PR诅Àt‰C‹]è‰ì]ÃU‰åƒì WVS‹] ƒÄô‹uj$è[ÿÿÿ‰Ç‹E‰_ ‰w‰GÇGÆG‰G ǘþ@fÇGfÇGèÄïÿÿ‰Âe苉G‰:[^_‰ì]ÃU‰åƒìS‹]è¡ïÿÿ‰Â‹CHÿ‰Kƒøuw‹9Ãu€{tk…Àt‹K9Øt‰ö‹P‹@…Àt9Øuð…Àuè'þÿÿv‰ ‹S…ÒtƒÄøj‹C Pÿ҃ăÄô‹C Pè#ƒÄ„ÀuƒÄô‹C Pè®þÿÿƒÄƒÄôSè¢þÿÿ‹]è‰ì]ÃvU‰åƒìèïÿÿ‹…ÀuèÂýÿÿ‰öÆ@‰ì]ÃU‰åìWVSèËîÿÿ‰…ÿÿÿ‰…üþÿÿèÎîÿÿ‹‰…ÿÿÿÇ…ÿÿÿ‹E9…ÿÿÿ}F‹•ÿÿÿƒÄü‹BP‹B P‹ÿÿÿ‹U ‹ŠPèƒÄ…Àt èqÿÿÿèïÿÿÿ…ÿÿÿ‹M9ÿÿÿ|»‹•ÿÿÿMà‹B‰EàÇEäEè‰mèÇ@¼A‰`‰JèQýÿÿèƒýÿÿ‰…ÿÿÿ‹•ÿÿÿMÀ‹B‰EÀÇEÄEȉmÈÇ@A‰`‰J‹…ÿÿÿ9…ÿÿÿtc‰…ÿÿÿ‹UÇ… ÿÿÿ9• ÿÿÿ}Hv‹ÿÿÿƒÄü‹AP‹A P‹• ÿÿÿ‹M ‹‘PèIƒÄ…Àt èþÿÿè<îÿÿÿ… ÿÿÿ‹E9… ÿÿÿ|»è›‰…ÿÿÿ‹UÇ…ÿÿÿ9•ÿÿÿŒv‹ÿÿÿƒÄü‹AP‹…ÿÿÿP‹•ÿÿÿ‹M ‹‘PèڃąÀ„C‹…ÿÿÿM°‹P‹B‰E ‰M¨E ÇE¤ 9AM ‰B‹…üþÿÿÇE°ÔB‰Â‹B‰E€ÇE„E€‰MˆÇEŒA‰e‰BÇE°üB‹B‹‰BƒÄôjè6üÿÿ‹•ÿÿÿ‰…ÿÿÿ@ÿÿÿ‹B‰…@ÿÿÿÇ…Dÿÿÿ…Hÿÿÿ‰­Hÿÿÿ‰`Ç@AƒÄ‰J‹•üþÿÿM ‹…ÿÿÿÇÔB‹B‰E€‰MˆE€ÇE„ÇEŒ°A‰e‰B‹ÿÿÿÇüB‹B‹‰B‹•ÿÿÿƒÄü‹ÿÿÿ‹B‹‰Q‹B‹‰BÇE°ÔBh 9A‹•ÿÿÿ‹‹@ÿÐP‹ÿÿÿQèóûÿÿè’ìÿÿ‰öÿ…ÿÿÿ‹E9…ÿÿÿŒwþÿÿèªúÿÿ‰ö‹•ÿÿÿ ÿÿÿ‹B‰… ÿÿÿÇ…$ÿÿÿ…(ÿÿÿ‰­(ÿÿÿ‰`Ç@xAƒÄô‰J‹…ÿÿÿPèéûÿÿ‹•ÿÿÿƒÄ‹B‹‰BèìÿÿvèãêÿÿvU‰åìœWVSèSëÿÿ‰…|ÿÿÿ‰…tÿÿÿ‹P‹B‰EàEðÇEä@A‰EèEà‰B‹…|ÿÿÿÇEðÔB‰Â‹B‰EÀEàÇEĉEÈÇEÌúAEÀ‰eЉBÇEðÜB‹B‹‰BƒÄôjèXúÿÿ‹•|ÿÿÿ‰…xÿÿÿ‹B‰E€ÇE„Eˆ‰mˆ‰`Ç@ÄAƒÄE€‰B‹•tÿÿÿ‹…xÿÿÿÇÔB‹B‰EÀEàÇEĉEÈÇEÌAEÀ‰eЉB‹…xÿÿÿÇÜB‹B‹‰B‹•|ÿÿÿƒÄü‹B‹‰B‹P‹‰PÇEðÔBh@A‹•xÿÿÿ‹‹@ÿÐP‹…xÿÿÿPè*úÿÿèÉêÿÿU‰åìœWVSèêÿÿ‰…|ÿÿÿ‰…tÿÿÿ‹P‹B‰EàEðÇEäP4A‰EèEà‰B‹…|ÿÿÿÇEðÔB‰Â‹B‰EÀEàÇEĉEÈÇEÌ>AEÀ‰eЉBÇEðìB‹B‹‰BƒÄôjèùÿÿ‹•|ÿÿÿ‰…xÿÿÿ‹B‰E€ÇE„Eˆ‰mˆ‰`Ç@AƒÄE€‰B‹•tÿÿÿ‹…xÿÿÿÇÔB‹B‰EÀEàÇEĉEÈÇEÌÃAEÀ‰eЉB‹…xÿÿÿÇìB‹B‹‰B‹•|ÿÿÿƒÄü‹B‹‰B‹P‹‰PÇEðÔBhP4A‹•xÿÿÿ‹‹@ÿÐP‹…xÿÿÿPèæøÿÿè…éÿÿU‰åƒìèåèÿÿ‹²…Àt€x”‰ìˆÐ]ÃU‰åƒì‹E…Àt ‹‹@ÿÐë ‰öèþÿÿ1À‰ì‹]Ã9exception13bad_exception8bad_cast10bad_typeidbad_alloc‰öU‰åì WVSèGèÿÿ‰…ÿÿÿ‰… ÿÿÿ‹@‰EàUàÇEäEè‰mèÇ@lA‰`‹…ÿÿÿ‰Pƒ}uÇEƒÄô‹MQéZ¡dB…À…C‹…ÿÿÿMЋP‹B‰EÀ‰MÈEÀÇEÄ AAMÀ‰B‹… ÿÿÿÇEÐÔB‰Â‹B‰E ÇE¤E ‰M¨ÇE¬\A‰e°‰BÇEдB‹B‹‰BƒÄôjèööÿÿ‹•ÿÿÿ‰…ÿÿÿ`ÿÿÿ‹B‰…`ÿÿÿÇ…dÿÿÿ…hÿÿÿ‰­hÿÿÿ‰`Ç@lAƒÄ‰J‹• ÿÿÿMÀ‹…ÿÿÿÇÔB‹B‰E ‰M¨E ÇE¤ÇE¬ðA‰e°‰B‹ÿÿÿÇ´B‹B‹‰B‹•ÿÿÿƒÄü‹ÿÿÿ‹B‹‰Q‹B‹‰BÇEÐÔBh AA‹•ÿÿÿ‹‹@ÿÐP‹ÿÿÿQè³öÿÿèRçÿÿ‰öÿЃÄô‹EPèŠ)‰ÂƒÄ…Ò„•þÿÿ‹ÿÿÿ‹A‹‰A‰ÐéÈèÓõÿÿ‰…ÿÿÿ‹•ÿÿÿ@ÿÿÿ‹B‰…@ÿÿÿÇ…Dÿÿÿ…Hÿÿÿ‰­HÿÿÿÇ@ÌA‰`‰Jè´œ‰…ÿÿÿƒÄø…ÿÿÿPjè=÷ÿÿ‹•ÿÿÿ ÿÿÿ‹B‰… ÿÿÿÇ…$ÿÿÿ…(ÿÿÿ‰­(ÿÿÿ‰`Ç@, AƒÄô‰J‹…ÿÿÿPè5öÿÿ‹•ÿÿÿƒÄ‹B‹‰Bècæÿÿvè/åÿÿv¥èþÿÿ[^_‰ì]Ã9exception9bad_allocbad_alloc‰öU‰åƒì|WVSèråÿÿ‰E˜‹@‰EàUàÇEäEè‰mèÇ@¼ A‰`‹E˜ƒÄô‰P‹MQèåüÿÿ‹M˜‰Â‹A‹‰A‰Ðé•èƒôÿÿ‰E”‹U˜MÀ‹B‰EÀÇEÄEȉmÈÇ@ A‰`‰Jèy›‰EœƒÄøEœPjèöÿÿ‹U˜M ‹B‰E ÇE¤E¨‰m¨‰`Ç@H AƒÄô‰J‹E”Pèõÿÿ‹U˜ƒÄ‹B‹‰BèGåÿÿvèäÿÿv¥xÿÿÿ[^_‰ì]Ã9bad_alloc9exceptionbad_alloc‰öU‰åƒì|WVSèVäÿÿ‰Eœ‹@‰EàUàÇEäEè‰mèÇ@Ü A‰`‹Eœ‰Pƒ}t ƒÄô‹EPèS'‹Uœ‹B‹‰Bévècóÿÿ‰E˜‹Uœ‹B‰EÀÇEÄEȉmȉ`Ç@ AƒÄøEÀ‰BPjèóôÿÿv‹Uœ‹B‰E ÇE¤E¨‰m¨‰`Ç@` AƒÄôE ‰B‹U˜Rèþóÿÿ‹UœƒÄ‹B‹‰Bè/äÿÿvèûâÿÿv¥xÿÿÿ[^_‰ì]ÃU‰åƒìLWVS‹U ‹M‰Uô‰MÌ‹E‹UMø‰Eð‰UÈ‹ẺMì‹Uð‹Mô‰Eè‹}ȉUä‰MÄ…ÀuD9Ïv‰Ð‰Ê÷÷ë!ƒ}Èu ¸1Ò÷÷‰Ç‹EÄ‹Uè÷÷‹Eä‰UÄ÷÷‰Uäƒ}ì„‹]ä‹Mì1öëX‹EÄ9Eèv‹]ð‰Æ‰]ø‰uüéå½Uèƒò‰Uàu@‹Mè9MÄw9}ärv‹UÄ‹Eä)øUè‰UĉEäƒ}ì„®‹]ä‹uÄ‹M쉉q雉ö‹EàÇEÜ ‰Á)EÜÓeè‰ø‹MÜÓè‹UÄ‹MàÓç Eè‹MÜÓê‹Eä‹MàÓeÄ‹MÜÓè EÄ‹EÄ÷uè‹Mà‰UÄ÷çÓeä‰EÈ;UÄw u‹Eä9EÈv ‹MÈ)ùUè‰Mȃ}ìt+‹MÄ‹Eä+EÈщMĉʋMÜÓâ‹uÄ‹MàÓè‰Ã Ó‹EìÓp[^‹Eø‹Uü_‰ì]ÃU‰åƒì,WVS‹E‹U ‰Eü‹M‰Uì‹]‰Î‰ß…ÿu=9Öv ÷ö1ɉÇ鱉ö…Éu ¹‰È1Ò÷ö‰Æ‹Eì‰ú÷ö‰Á‰Uì‹Eü÷ö‰Çé†v;}ìv1ÿëxv½ßƒóu9}ìw9uürç‰ö¿ëZ‰ÙÇEø Óç)]ø‰}è‹Mø‰÷‹EìÓï‹Uü‰Ù }èÓæ‹}ì‹MøÓï‰ÙÓà‹MøÓê Љىú‰Eä÷uèÓeü‰Ç‰Ñ÷æ‰Ã9Êwu;]üvO1ɉ}ð‰Mô‹Eð[^‹Uô_‰ì]Ãbad_alloc‰öU‰åƒì|WVSèÊÞÿÿ‰Eœ‹@‰EàUàÇEäEè‰mèÇ@hA‰`‹Eœ‰Pƒ}t ƒÄô‹EPèÇ!‹Uœ‹B‹‰Bévè×íÿÿ‰E˜‹Uœ‹B‰EÀÇEÄEȉmȉ`Ç@¤AƒÄøEÀ‰BPjègïÿÿv‹Uœ‹B‰E ÇE¤E¨‰m¨‰`Ç@ìAƒÄôE ‰B‹U˜Rèrîÿÿ‹UœƒÄ‹B‹‰Bè£ÞÿÿvèoÝÿÿv¥xÿÿÿ[^_‰ì]Ãbad_allocU‰å‹dB‹E£dB‰ì‰Ð]Ã9bad_alloc9exceptionU‰åWVS1ö‹}¶‰ÃGƒã„À}¶ƒÆ‰Ð‰ñƒàGÓà ÄÒ|ê‹E ‰[‰ø^_‰ì]ÃU‰åWVS1ö‹}1Ûv¶‰Ù‰ÐGƒàƒÃÓà Æ„Ò|êƒûwöÂ@t ¸ÿÿÿÿ‰ÙÓà Æ‹E ‰0[‰ø^_‰ì]ÃvU‰åWVS‹E ‹p…ötY‹U‹Z‰ö‹M N‹‹<°…Ût,ë‹M‹‹Lšü‰ ‚Kt‹U‹‹T˜ü‹G‹R)‰ЅÀ׋M‹‰<…öu¸‹U ‹BA[^_‰ì]ÃU‰åƒì}ìuèWV‹EàP‹PƒÃèÏþÿÿƒÄƒ;uçëEìPEèP‹UàR‹U‹BPè¬þÿÿƒÄ‹EäƒÄøP‹UàRèµüÿÿ‹UeȉB ‹E艋Eì‰B[^_‰ì]ÉöU‰åƒì WVS‹hBëv‹[…Ût!ƒ;u ƒÄôSè·þÿÿƒÄ‹E;rá;CsÜë‰ö1Àë11ÿ‹s9÷s&‹[ >Ñé‹‹‹P9Us‰Îë P 9Ur y9÷rÝ1Àeè[^_‰ì]ÃehU¹‰åƒì,WV¿AS‹E‹] ‹PƒÂü)ЉEøƒÀ ‰E쉋Uì‰Öü1Àó¦tÀ ÇEôA…Àt)‹}ô‰Ö¹ü1Àó¦tÀ …Àt‹Eø€x zt1À鲋3‰ð‰òƒàtzƒøt8"t+B8"t&B8"t!B‹„Àt„ät©ÿt ƒÂ©ÿuåƒêBB‹}ô‰Uè¸B‰Áü¨ó¦u‹uè‰òƒÂ‹F‰Cë ‰öÇCƒÄøCPRè4úÿÿ‰ÂƒÄøC PRèaúÿÿ‰ÂƒÄ ¶‰CB‹€8zuƒÄøEüPRèúÿÿ‰ÂUü‰ÐeÈ[^_‰ì]ÃU‰åƒìWVS‹]‹u‹U¶C¨@tƒà?¯Fé„À}ƒà?ƒÄø‰Eøé,‰ö¨Àtƒà?‹U ‰EøÆD\éíƒø/‡Ûÿ$…°AŒApAtA€AA AäAŒAŒAA¬AÐA@AlAŒA„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„A„AðA(ADA‹ë ¶Cé ·ƒÃéÿv‹‰ƒÃéî‰öƒÄøEøPSè“øÿÿ‰ÃƒÄøEüPSè„øÿÿ‹Mü‰Ã¯N ‹E ‰Mü‹UøÆD\‹E ƒÀ‰ é«vƒÄøEøPSèOøÿÿ‰Ã‹U ‹EøÆD\é‰ƒÄøEøPSè/øÿÿ‰ÃƒÄøEôPSè øÿÿ‰Ã‹Mø‹E ÆD\‰ÂƒÂ‹Eô‰ŠéOvƒÄøEøPSèó÷ÿÿ‰ÃƒÄøEüPSèä÷ÿÿ‰Ã‹U ‹Eøf‰BXë4‰öƒÄøEøPSèÇ÷ÿÿ‰Ã‹M ‹Eøf‰AXé‰öƒÄøEüPSè§÷ÿÿ‰Ã‹U ‹Eü‰BéãvƒÄôjtè‹u ‰Çü¹ó¥‹U ‰Bp龉ö‹M ƒÄô‰Ï‹Ap‰Æü¹ó¥Pè1霋u ÇEø‹M ¸ƒÆ\ƒÁÆ0‹Uø•Àÿÿÿ‰‘B‰Eøƒøväëf‰öƒÄøEüPSè ÷ÿÿ‰Ã‹U ‹Eü‰B ëJ‰öƒÄøEøPSèïöÿÿ‰ÃƒÄøEüPSèàöÿÿ‹Mü‰Ã¯N ‰Mü‹E ‹UøÆD\‹E ƒÀ÷Ù‰ ëèƒve؉Ø[^_‰ì]ÃU‰å‹E‹U ‰B‰ì¡hBÇBÇÇB ÇB‰B‰hB]ÃvU‰åƒìS‹]ƒÄôjèìƒÄøPSè¦ÿÿÿ‹]è‰ì]ÃvU‰å‹E‹U ‰B‰ì‰B ¡hBÇBÇÇB‰B‰hB]ÃvU‰åƒìS‹]ƒÄôjèŒƒÄøPSèªÿÿÿ‹]è‰ì]ÃvUºhB‰åƒìS‹Eƒ=hBt-‹9Cu‹C‰ƒ;t ƒÄô‹C P苉ØëvSƒ{uÓèf‰ö‹]è‰ì]ÃU‰åƒìƒÄô‹EƒÄôPè—ÿÿÿPèQ‰ì]ÃU‰åìÌWVSƒÄô‹EPè¸ùÿÿ‰…TÿÿÿƒÄ…Àt ƒÄø]àS‹•TÿÿÿRèúÿÿ‰…LÿÿÿƒÄ…Àu1Àé ½`ÿÿÿ1Àü¹ó«`ÿÿÿ‹Eðf‰Eº‹•Tÿÿÿ‹E䉅dÿÿÿ‹½Tÿÿÿ‹BƒÇƒÀü)Âr9µLÿÿÿs"‰öjMàQS‹…LÿÿÿPèÑúÿÿ‰…LÿÿÿƒÄ9ðrà‰½Lÿÿÿ‹Eà€8zu'ƒÄø…\ÿÿÿP‰úRè˜ôÿÿ‰…Lÿÿÿ‹\ÿÿÿLÿÿÿƒÄ‹…Tÿÿÿ‹•Tÿÿÿp‹B‰…Xÿÿÿ9µLÿÿÿs7;Ew2½Xÿÿÿ‰öWMàQS‹…LÿÿÿPèNúÿÿ‰…LÿÿÿƒÄ9ðs ‹U9•XÿÿÿvÖ‹} ‰Þü¹ó¥‹E ¥(ÿÿÿ[^_‰ì]ÃUºÿÿÿÿ‰åƒìWV1ÿS‹E‹@‰EüÁàÁèƒÀ%ðÿÿ?èTÛÿÿ‰eø;}üsm‰ÓG½‰Eô‰Uðë&‹U ‹ž‹J‹‰Š‹E ‹Uÿ@‹Ç˜‹Eø‹˜ƒûÿt‹E‹‰Ö‹ º‹š‹I‹@)Á‰È…À|º‹Uø‹Eð‰‰ú‹}ô;}ür“1ÿ1Û;]üs‰ö‹E‹‹º…Àt‰šCG;}ürê‹Ue؉Z[^_‰ì]Ãbad_alloc‰öU‰åƒìWVS‹EƒÄø‹]ÿЉNjwF‰EüS‹UÿÒP‹EP‹UR‹U ÿÒP¿FøP‹Uü‹BÿÐeØ[^_‰ì]ÃvU‰åƒì‹E ƒÄø‹U‹P‹P膉ìÁè]ÃvU‰åƒìWVSƒÄø‹u‹] SVèsÚÿÿƒÄ„Àt‹EéÇEü…ÛtMƒÄøSh¦A‹C¿ÚRjh¤ŸA‹@Pè7ÿÿÿƒÄ ‰Á…Ét"‹AƒÄøjj‹URjV¿PÊR‹@ÿÐ饅ۄ ƒÄøSh¦A‹C¿ÚRjht¡A‹@PèâþÿÿƒÄ ‰Ã…Û„q…ö„iƒÄøVh¦A‹F¿òRjht¡A‹@Pè«þÿÿƒÄ …À„<‹s‹x…öt6ƒÄøVh¦A‹F¿ðPjhdžA‹F‹@PèqþÿÿƒÄ …Àt ‹X ‹pë‰ö1Û…ÿt:ƒÄøWh¦A‹G¿øPjhdžA‹G‹@Pè5þÿÿƒÄ …Àt‹P ‰Uø‹xë vÇEø‰Ú‹Eøƒâƒà9¢‹Eøƒãƒà9ÑƒÄøVWèëØÿÿƒÄ„À…vƒÄøèÔPWèÑØÿÿƒÄ„Àt>…öt,ƒÄøVh¦A‹F¿ðPjh´žA‹F‹@Pè¡ýÿÿƒÄ …Àu‹U‰Uüé+v…ötPƒÄøVh¦A‹F¿ðPjh¤ŸA‹F‹@PècýÿÿƒÄ ‰Á…Ét"‹AƒÄøjj‹URjW¿PÊR‹@ÿÐéÑ…ö„ÌƒÄøVh¦A‹F¿ðPjht¡A‹F‹@Pè ýÿÿƒÄ ‰Æ…ö„š…ÿ„’ƒÄøWh¦A‹G¿øPjht¡A‹G‹@PèÑüÿÿƒÄ ‰Ã…Û„`ŠEø$ˆE÷é†v…ÿu1Ûë*ƒÄøWh¦A‹G¿øPjht¡A‹G‹@Pè‡üÿÿƒÄ ‰Ã…öu1öë,‰öƒÄøVh¦A‹F¿ðPjht¡A‹F‹@PèSüÿÿƒÄ ‰Æ…Û„â…ö„ÚŠEø4¨tÆE÷‹{‹v…öt7ƒÄøVh¦A‹F¿ðPjhdžA‹F‹@PèüÿÿƒÄ …Àt ‹X ‹pëv1Û…ÿt:ƒÄøWh¦A‹G¿øPjhdžA‹G‹@PèÅûÿÿƒÄ …Àt‹P ‰Uø‹xë vÇEø‰Ú‹Møƒâƒá9Ê6‹Eøƒãƒà9Ã)€}÷u9Ê|9Ã|ƒÄøVWèuÖÿÿƒÄ„À„¶þÿÿ‹E‰Eü‹EüeØ[^_‰ì]ÃvU‰åƒì‹M…Éu1Àë%vƒÄøQh¦A‹A¿ÊRjht¡A‹@Pèûÿÿ‰ì…À•À]ÃU‰åƒìtSèØËÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEì7#A‰eð‰B‹Eà‰B…ÛtDÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇEÌ#AEÀ‰eЉBÇCŒB‹E‰C‹B‹‰B[‰ì]ÃU‰åƒìtSèTËÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEì»#A‰eð‰B‹Eà‰B…ÛtJÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇEÌ $AEÀ‰eЉBÇCœB‹E‰C‹E‰C ‹B‹‰B[‰ì]ÉöU‰åƒìtSèÈÊÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEìG$A‰eð‰B‹Eà‰B…Ût>ÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇẺ$AEÀ‰eЉBÇC´B‹B‹‰B[‰ì]ÉöU‰åƒìtSèHÊÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEìÇ$A‰eð‰B‹Eà‰B…Ût>ÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇEÌ %AEÀ‰eЉBÇCäB‹B‹‰B[‰ì]ÉöU‰åƒìtSèÈÉÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEìG%A‰eð‰B‹Eà‰B…Ût>ÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇẺ%AEÀ‰eЉBÇCÌB‹B‹‰B[‰ì]ÉöU‰åƒìtSèHÉÿÿ‰Â‹]‹B‰EàÇEäEà‰mèÇEìÇ%A‰eð‰B‹Eà‰B…Ût>ÇC” B‹E ‰‹B‰EÀEàÇEĉEÈÇEÌ &AEÀ‰eЉBÇC<B‹B‹‰B[‰ì]ÃvU‰åƒìhèÉÈÿÿ‰Â¹xBƒ=xBui‹B‰EàÇEäEà‰mèÇEìQ&A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ&A‹B‰EÀEàÇEĉEÈÇEÌ”&AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸xB]ÃxU‰åƒìhè9Èÿÿ‰Â¹€Bƒ=€Bui‹B‰EàÇEäEà‰mèÇEìá&A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ&A‹B‰EÀEàÇEĉEÈÇEÌ$'AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸€B]ÃlU‰åƒìhè©Çÿÿ‰Â¹ˆBƒ=ˆBui‹B‰EàÇEäEà‰mèÇEìq'A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ-'A‹B‰EÀEàÇEĉEÈÇEÌ´'AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ˆB]ÃiU‰åƒìhèÇÿÿ‰Â¹Bƒ=Bui‹B‰EàÇEäEà‰mèÇEì(A‰eð‰B‹Eà‰B…Ét?ÇA” Bǽ'A‹B‰EÀEàÇEĉEÈÇEÌD(AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸B]ÃsU‰åƒìhè‰Æÿÿ‰Â¹˜Bƒ=˜Bui‹B‰EàÇEäEà‰mèÇEì‘(A‰eð‰B‹Eà‰B…Ét?ÇA” BÇM(A‹B‰EÀEàÇEĉEÈÇEÌÔ(AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸˜B]ÃbU‰åƒìhèùÅÿÿ‰Â¹ Bƒ= Bui‹B‰EàÇEäEà‰mèÇEì!)A‰eð‰B‹Eà‰B…Ét?ÇA” BÇÝ(A‹B‰EÀEàÇEĉEÈÇEÌd)AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ B]ÃcU‰åƒìhèiÅÿÿ‰Â¹¨Bƒ=¨Bui‹B‰EàÇEäEà‰mèÇEì±)A‰eð‰B‹Eà‰B…Ét?ÇA” BÇm)A‹B‰EÀEàÇEĉEÈÇEÌô)AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸¨B]ÃwU‰åƒìhèÙÄÿÿ‰Â¹°Bƒ=°Bui‹B‰EàÇEäEà‰mèÇEìA*A‰eð‰B‹Eà‰B…Ét?ÇA” BÇý)A‹B‰EÀEàÇEĉEÈÇEÌ„*AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸°B]ÃrU‰åƒìhèIÄÿÿ‰Â¹¸Bƒ=¸Bui‹B‰EàÇEäEà‰mèÇEìÑ*A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ*A‹B‰EÀEàÇEĉEÈÇEÌ+AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸¸B]ÃdU‰åƒìhè¹Ãÿÿ‰Â¹ÀBƒ=ÀBui‹B‰EàÇEäEà‰mèÇEìa+A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ+A‹B‰EÀEàÇEĉEÈÇE̤+AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ÀB]ÃfU‰åƒìhè)Ãÿÿ‰Â¹ÈBƒ=ÈBui‹B‰EàÇEäEà‰mèÇEìñ+A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ­+A‹B‰EÀEàÇEĉEÈÇEÌ4,AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ÈB]ÃUiU‰åƒìhè™Âÿÿ‰Â¹ÐBƒ=ÐBui‹B‰EàÇEäEà‰mèÇEì,A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ=,A‹B‰EÀEàÇEĉEÈÇEÌÄ,AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ÐB]ÃUlU‰åƒìhè Âÿÿ‰Â¹ØBƒ=ØBui‹B‰EàÇEäEà‰mèÇEì-A‰eð‰B‹Eà‰B…Ét?ÇA” BÇÍ,A‹B‰EÀEàÇEĉEÈÇEÌT-AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ØB]ÃUxU‰åƒìhèyÁÿÿ‰Â¹àBƒ=àBui‹B‰EàÇEäEà‰mèÇEì¡-A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ]-A‹B‰EÀEàÇEĉEÈÇEÌä-AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸àB]ÃUsU‰åƒìhèéÀÿÿ‰Â¹èBƒ=èBui‹B‰EàÇEäEà‰mèÇEì1.A‰eð‰B‹Eà‰B…Ét?ÇA” BÇí-A‹B‰EÀEàÇEĉEÈÇEÌt.AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸èB]ÃUcU‰åƒìhèYÀÿÿ‰Â¹ðBƒ=ðBui‹B‰EàÇEäEà‰mèÇEìÁ.A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ}.A‹B‰EÀEàÇEĉEÈÇEÌ/AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸ðB]ÃScU‰åƒìhèÉ¿ÿÿ‰Â¹øBƒ=øBui‹B‰EàÇEäEà‰mèÇEìQ/A‰eð‰B‹Eà‰B…Ét?ÇA” BÇ /A‹B‰EÀEàÇEĉEÈÇEÌ”/AEÀ‰eЉBÇAtB‹B‹‰B‰ì¸øB]Ã9type_info16__user_type_info19__pointer_type_info16__attr_type_info19__builtin_type_info16__func_type_info16__ptmf_type_info16__ptmd_type_info17__array_type_infoU‰åƒìVS‹uƒÄøjVè6ƒÄ…Àt1Ûëvì°‰ãÇ$ƒÄøSVèƒÄ¡|!BƒÄôSÿÐU‰åƒìS‹] …Ût1Àë%‰öƒÄôj蚃ăøÿu 1Àéáv‰Ã¸ÇC¨ÇCëÇC ǃ€Çƒ„.ÇC, óAÇC0óAÇCB…Àt‹ƒ¤£Bë ‰öÇCBÇCxƒÄô‹E‰C(ÇCHD3AÇCL<3AÇCP43AÇCT,3AÇC$B‹E‰ÇCÔ1AÇC2AÇC $3AÇCD3Ajè6‰C|ÇC4B¸ÇC8¬ BÇC<BÇC@œB‹]è‰ì]Âÿ%X!Bÿ%ð!Bÿ%P!Bÿ%ü!Bÿ%ø!Bÿ%À!Bÿ%¸!Bÿ%„!Bÿ%Œ!Bÿ%”!Bÿ%ä!Bÿ%"Bÿ%p!Bÿ%t!Bÿ% !Bÿ%ì!Bÿ%L!Bÿ% "Bÿ%€!Bÿ%˜!Bÿ%Ô!Bÿ%Ð!Bÿ%Ì!Bÿ%ô!Bÿ%È!Bÿ%ˆ!Bÿ%¤!Bÿ%¬!Bÿ%œ!Bÿ%°!Bÿ%!Bÿ%Ø!Bÿ%"Bÿ%l!Bÿ%¨!Bÿ%¼!Bÿ%Ü!Bÿ%´!Bÿ%T!Bÿ%Ä!Bÿ%d!Bÿ%"Bÿ%"Bÿ%è!Bÿ%`!Bÿ%|!Bÿ%h!Bÿ%à!BU‰å‰ì]ÃU‰å‰ì]ÃU‰å‰ì]ÃU‰å‰ì]Ãÿ%x!Bÿ%4"Bÿ%("Bÿ%@"Bÿ% "Bÿ%<"Bÿ%$"Bÿ%"Bÿ%D"Bÿ%0"Bÿ%L"Bÿ%,"Bÿ%H"Bÿ%8"BU‰å‹Eö@t‹@ ëv‹@$‰ì]ÃU‰å‹E‰ì]‹@(ÃU‰å‹Eö@t‹@$ëv‹@ ‰ì]ÃU‰å‹E‰ì]‹@$ÃU‰åƒìVS‹u‹] ÇFDÌBƒÄøjFLPèMƒÄƒÄøSVè ƒÄeè[^‰ì]ÃU‰åƒì‹U‹E ÇÔB¨t ƒÄôRèÖÿÿ‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSèpýÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèšÕÿÿeè[^‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSèôüÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèÕÿÿeè[^‰ì]ÃU‰åƒìVS‹u‹] ÇFDLBƒÄøj†PèÆƒÄƒÄøj†ŒPè ƒÄƒÄøjFxPèÍ ƒÄƒÄøjFlPè¼ ƒÄƒÄøjF`Pè« ƒÄƒÄøjFTPèš ƒÄƒÄøjFHPè‰ ƒÄƒÄøSVèDƒÄeè[^‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSèÐûÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèúÓÿÿeè[^‰ì]ÃU‰åƒìLWVS‹]‹Ç@ŒBƒ} u.}À¾ŒBü¹ó¥‹UÀ· ”B‰P‹‰ØƒÂ¨)ÐÁf‰MÈƒÄøCj}àP¾¬Bè™@ÿÿ‹ƒÄÇ@¬Bü¹ó¥‹Uà‰P‹ ‰ØQø)з´BÂf‰Uè‹E ¨tƒÄôÇAÔB‹APèÑØÿÿƒÄ‹U öÂt ƒÄôSè1Óÿÿe¨[^_‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSèˆúÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVè²Òÿÿeè[^‰ì]ÃU‰åƒìLWVS‹]‹Ç@ÄBƒ} u.}À¾ÄBü¹ó¥‹UÀ· ÌB‰P‹‰ØƒÂ¬)ÐÁf‰MÈƒÄøCj}àP¾ÄBèQ?ÿÿ‹ƒÄÇ@ÄBü¹ó¥‹Uà‰P‹ ‰ØQü)зÌBÂf‰Uè‹E ¨tƒÄôÇAÔB‹APè‰×ÿÿƒÄ‹U öÂt ƒÄôSèéÑÿÿe¨[^_‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSè@ùÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèjÑÿÿeè[^‰ì]ÃU‰åƒì‹U‹E ÇÔB¨t ƒÄôRèAÑÿÿ‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSè øÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèÊÐÿÿeè[^‰ì]ÃU‰åƒì‹E ƒÄø‹UPRè¿ÿÿ‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSèøÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVè2Ðÿÿeè[^‰ì]ÃU‰åƒìVS‹u‹] ƒÄøjFPèDƒÄƒÄøjFPè3ƒÄ‰Øƒà…ÀtƒÄôVèæÏÿÿƒÄëeè[^‰ì]ÃvU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSè8÷ÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèbÏÿÿeè[^‰ì]ÃU‰åƒì‹E ƒÄø‹UPRè²½ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRè–½ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRèz½ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRè^½ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRèB½ÿÿ‰ì]ÃU¸ÿÿÿÿ‰åƒìV‹uS‹NYðSðÁƒøu:‹QôB=€vƒÄôSè0öÿÿƒÄëvBÁè…üÿÿÿ‹„B‰Qð‰˜„BÇÔB‹E ¨t ƒÄôVèZÎÿÿeè[^‰ì]ÃU‰åƒì‹E ƒÄø‹UPR誼ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPR莼ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRèr¼ÿÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRèV¼ÿÿ‰ì]ÃU‰åƒìLWVS‹]‹Ç@¤Bƒ} u.}À¾¤Bü¹ó¥‹UÀ· ¬B‰P‹‰ØƒÂø)ÐÁf‰MÈ‹}àÇ@¬B¾¬Bü¹ó¥‹Uà‰P‹ ‰ØQø)з´BÂf‰Uè‹E ¨tƒÄôÇAÔB‹APèÒÒÿÿƒÄ‹U öÂt ƒÄôSè2Íÿÿe¨[^_‰ì]ÃU‰åƒìLWVS‹]‹Ç@¼Bƒ} u.}À¾¼Bü¹ó¥‹UÀ· ÄB‰P‹‰ØƒÂü)ÐÁf‰MÈ‹}àÇ@ÄB¾ÄBü¹ó¥‹Uà‰P‹ ‰ØQü)зÌBÂf‰Uè‹E ¨tƒÄôÇAÔB‹APèÒÿÿƒÄ‹U öÂt ƒÄôSèzÌÿÿe¨[^_‰ì]ÃU‰åƒìV‹uSƒÄôÇFÔB‹] ‹FPèÛÑÿÿƒÄöÃt ƒÄôVè>Ìÿÿeè[^‰ì]ÃU‰åƒìVS‹u‹] ƒÄøjF@PèPƒÄƒÄøjF4Pè ƒÄƒÄøjF(PèúƒÄƒÄøjFPèéƒÄƒÄøjFPèØƒÄƒÄøjF PèûƒÄƒÄøjFPèêƒÄƒÄøjFPèكĉ؃à…ÀtƒÄôVèŒËÿÿƒÄëveè[^‰ì]ÃvU‰åƒì,WVS‹]‹Ç@¬Bƒ} u.}ྫྷBü¹ó¥‹Uà· ´B‰P‹‰ØƒÂø)ÐÁf‰Mè‹E ¨t‹ƒÄôÇ@ÔB‹@PèŸÐÿÿƒÄ‹U öÂt ƒÄôSèÿÊÿÿeÈ[^_‰ì]ÃU‰åƒì,WVS‹]‹Ç@ÄBƒ} u.}à¾ÄBü¹ó¥‹Uà· ÌB‰P‹‰ØƒÂü)ÐÁf‰Mè‹E ¨t‹ƒÄôÇ@ÔB‹@PèÐÿÿƒÄ‹U öÂt ƒÄôSè{ÊÿÿeÈ[^_‰ì]ÃU‰åƒì‹U‹E ÇÔB¨t ƒÄôRèQÊÿÿ‰ì]ÃU‰åƒìLWVS‹]‹Ç@üBƒ} u.}À¾üBü¹ó¥‹UÀ· B‰P‹‰ØƒÂô)ÐÁf‰MÈ‹C}àÇ@ÄB¾ÄBü¹ó¥‹C¾¬BUà‰P‰×‰Ø· ÌB+@ƒÀ Áf‰Mè‹Ç@¬Bü¹ó¥‹‰P‹ ‰ØQø)з´BÂf‰Uè‹E ¨tƒÄôÇAÔB‹APè ÏÿÿƒÄ‹U öÂt ƒÄôSèjÉÿÿe¨[^_‰ì]ÃU‰åƒì‹U‹E ÇÔB¨t ƒÄôRèAÉÿÿ‰ì]ÃU‰åƒì‹U‹E ÇÔB¨t ƒÄôRèÉÿÿ‰ì]ÃU‰åƒìVS‹u‹] ƒÄü‹F‹)Љ‰ÐÁøP‹PVèƒÄ‰Øƒà…ÀtƒÄôVèÚÈÿÿƒÄëeè[^‰ì]ÃvU‰åƒìVS‹u‹] ƒÄôƒÄôV褃ĉÀPè;¤ƒÄ‰Øƒà…ÀtƒÄôVèŽÈÿÿƒÄëeè[^‰ì]ÃvU‰åƒìVS‹u‹] ƒÄø‹PVè¢ ƒÄ‰Øƒà…ÀtƒÄôVèMÈÿÿƒÄëeè[^‰ì]ÃvU‰åƒìVS‹u‹] ƒÄøjVè_ƒÄ‰Øƒà…ÀtƒÄôVèÈÿÿƒÄëeè[^‰ì]ÃvU‰åƒìVS‹u‹] ƒÄø‹FP‹Pè”ƒÄƒÄøSVèºþÿÿƒÄeè[^‰ì]ÉöU‰åƒìVS‹u‹] ƒÄôVè±zƒÄƒÄøSVè$ÿÿÿƒÄeè[^‰ì]ÃU‰åƒì|WVSèê«ÿÿ‰À‰Â‰Ð‰Eœ‹EœƒÀ‹‰UàÇEäUè‰*¹\CA‰J‰bUà‰‹E ƒà…ÀtƒÄô‹EPè@ÇÿÿƒÄëv‹EœƒÀ‹‹ ‰é§ë‰íèáºÿÿ‰À‰EÜ‹EœƒÀ‹‰UÀÇEÄUȉ*¹¬CA‰J‰bUÀ‰ƒÄøEÀPjèk¼ÿÿƒÄë²èå«ÿÿëv‰í‹EœƒÀ‹‰U ÇE¤U¨‰*¹øCA‰J‰bU ‰ƒÄô‹EÜPèg»ÿÿƒÄ‹EœƒÀ‹‹ ‰è—«ÿÿë‰íèaªÿÿ¥xÿÿÿ[^_‰ì]ÃvU‰åƒì|WVSèÆªÿÿ‰À‰Â‰Ð‰Eœ‹EœƒÀ‹‰UàÇEäUè‰*¹€DA‰J‰bUà‰‹E ƒà…ÀtƒÄô‹EPèÆÿÿƒÄëv‹EœƒÀ‹‹ ‰é§ë‰íè½¹ÿÿ‰À‰EÜ‹EœƒÀ‹‰UÀÇEÄUȉ*¹ÐDA‰J‰bUÀ‰ƒÄøEÀPjèG»ÿÿƒÄë²èÁªÿÿëv‰í‹EœƒÀ‹‰U ÇE¤U¨‰*¹EA‰J‰bU ‰ƒÄô‹EÜPèCºÿÿƒÄ‹EœƒÀ‹‹ ‰èsªÿÿë‰íè=©ÿÿ¥xÿÿÿ[^_‰ì]ÃvU‰åƒìVS‹]‹u ƒÄôVè½qƒÄ‰Â‰Ðëeè[^‰ì]ÃvU‰åƒì|WVSèv©ÿÿ‰À‰Â‰Ð‰EœƒÄô‹EP蹃ĉÀ‰Eü‹EœƒÀ‹‰UàÇEäUè‰*¹èEA‰J‰bUà‰ƒÄø‹E P‹EüƒÀP诃Ä‹EœƒÀ‹‹ ‰‹Uü‰Ðéºéµëv‰íèU¸ÿÿ‰À‰EÜ‹EœƒÀ‹‰UÀÇEÄUȉ*¹DFA‰J‰bUÀ‰ƒÄø‹EüP‹EP蕃Äèµ¹ÿÿèT©ÿÿëšèM©ÿÿëv‰í‹EœƒÀ‹‰U ÇE¤U¨‰*¹FA‰J‰bU ‰ƒÄô‹EÜPèϸÿÿƒÄ‹EœƒÀ‹‹ ‰èÿ¨ÿÿë‰íèɧÿÿ¥xÿÿÿ[^_‰ì]ÃvU‰åƒì WVS‹]‹u ‹}ƒÄøWVèTƒÄeè[^_‰ì]ÃvU‰åƒì‹E‹€:u‹‹J‹Q;u ‹‹J ‰ë\v‹ƒzt(‹‹J‰Mü‹Uüƒz uë ‹Uü‹J ‰Müëé‹Uü‰ë*‹‹J‰Mü‹Uü‹;Jtë‹Uü‰‹Uü‹J‰Müëä‹Uü‰‰ì]ÃvU‰åƒìWVS‹}ƒÄô‹PèÍ ƒÄ‰À‰ÃƃÄôWèvƒÄ‰À‰ÆÇƒÄôWèƒÄ‰À‰Eü‹‹Uü‰ƒÄôWè4ƒÄ‰À‰Eø‹‹Uø‰eØ[^_‰ì]ÃvU‰åƒì$S‹]‰öƒ} uëPƒÄøƒÄô‹E PèQ ƒÄ‰À‹RSèÏÿÿÿƒÄƒÄô‹E PèÐ ƒÄ‰À‹‰UüƒÄø‹E PSèQƒÄ‹Eü‰E 몉ö‹]؉ì]ÃU‰åƒìS‹]ƒÄôjèðnƒÄ‰Â‰Ðë‹]è‰ì]ÃU‰åƒì‹E‹ƒz t#‹‹J ‰‹ƒzuë‰ö‹‹J‰ëëvë5‰ö‹‹J‰Mü‹Uü‹;J të‹Uü‰‹Uü‹J‰Müëä‹‹J ;Müt‹Uü‰‰ì]ÃU‰åƒì3ƒÄ‹…\ýÿÿƒÀ‹‰•€þÿÿÇ…„þÿÿ•ˆþÿÿ‰*¹`A‰J‰b•€þÿÿ‰ƒÄô‹EPèPƒÄ‹…\ýÿÿƒÀ‹‰•`þÿÿÇ…dþÿÿ•hþÿÿ‰*¹œ_A‰J‰b•`þÿÿ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹…\ýÿÿƒÀ‹‹ ‰‹Eéézë‰í‹…\ýÿÿƒÀ‹‰•@þÿÿÇ…Dþÿÿ•Hþÿÿ‰*¹¸bA‰J‰b•@þÿÿ‰ƒÄøj‹EPèqÚÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰èŽÿÿë‰í‹…\ýÿÿƒÀ‹‰• þÿÿÇ…$þÿÿ•(þÿÿ‰*¹ÄbA‰J‰b• þÿÿ‰ƒÄøj‹EŒPèmáÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰è*ÿÿë‰í‹…\ýÿÿƒÀ‹‰•þÿÿÇ…þÿÿ•þÿÿ‰*¹ÐbA‰J‰b•þÿÿ‰ƒÄøj‹EƒÀxPè×áÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰èÈŽÿÿë‰ö‰í‹…\ýÿÿƒÀ‹‰•àýÿÿÇ…äýÿÿ•èýÿÿ‰*¹ÜbA‰J‰b•àýÿÿ‰ƒÄøj‹EƒÀlPèsáÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰èdŽÿÿë‰ö‰í‹…\ýÿÿƒÀ‹‰•ÀýÿÿÇ…Äýÿÿ•Èýÿÿ‰*¹èbA‰J‰b•Àýÿÿ‰ƒÄøj‹EƒÀ`PèáÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰èŽÿÿë‰ö‰í‹…\ýÿÿƒÀ‹‰• ýÿÿÇ…¤ýÿÿ•¨ýÿÿ‰*¹ôbA‰J‰b• ýÿÿ‰ƒÄøj‹EƒÀTPè«àÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰èœÿÿë‰ö‰í‹…\ýÿÿƒÀ‹‰•€ýÿÿÇ…„ýÿÿ•ˆýÿÿ‰*¹cA‰J‰b•€ýÿÿ‰ƒÄøj‹EƒÀHPèGàÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰è8ÿÿë‰ö‰í‹…\ýÿÿƒÀ‹‰•`ýÿÿÇ…dýÿÿ•hýÿÿ‰*¹ cA‰J‰b•`ýÿÿ‰ƒÄøj‹URè®ÛÿÿƒÄ‹…\ýÿÿƒÀ‹‹ ‰è׌ÿÿë‰íè¡‹ÿÿëv‰íè•‹ÿÿëv‰í艋ÿÿëv‰íè}‹ÿÿëv‰íèq‹ÿÿëv‰íèe‹ÿÿëv‰íèY‹ÿÿëv‰íèM‹ÿÿ¥8ýÿÿ[^_‰ì]ÃvU‰åìÜWVS诋ÿÿ‰…<ÿÿÿ‰…8ÿÿÿ‹EÇÔB‹•<ÿÿÿ‹B‰EàÇEäEà‰mèÇEìàcA‰eð‰B‹UÇ BƒÂ‰•4ÿÿÿ‹U ‹Pð€xütƒÄôRèoZƒÄë‰öÿ@ø‹•4ÿÿÿ‰‹•8ÿÿÿ‹B‰EÀÇEÄEÀ‰mÈÇEÌàcA‰eЉB‹EÀ‰B‹‰BëF‰ö‹•8ÿÿÿ‹B‰E€ÇE„E€‰mˆÇEŒ$dA‰e‰B‹UÇÔB‹•8ÿÿÿ‹B‹‰Bèj‹ÿÿ‰ö‹•<ÿÿÿ‹B‰…`ÿÿÿÇ…dÿÿÿ…hÿÿÿ‰­hÿÿÿÇ@vdA‰`…`ÿÿÿ‰B‹UÇlB‹•<ÿÿÿ‹B‹‰B‹E¥ÿÿÿ[^_‰ì]ÃU‰åì\WVSèOŠÿÿ‰…¼þÿÿƒ} tJ‹EƒÀX‹U‰Ç@ÔBÆ@Æ@ÇBXÇ@Ç@fÇ@ Ç@ Ç@Ç@‹¼þÿÿ} ¾¬B‹A‰EàÇEäEè‰mèÇ@PgA‰`Eà‰A‹•¼þÿÿ‰EÀ‰EÈ‹UÇEÄÇẺeAEÀ‰eЉA‹Ç@¬Bü¹ó¥‹‹MU ‰P‰Ê‹ƒÀø)·´BÐf‰E¨ÇA‹•¼þÿÿ‹B‹‰B‹¼þÿÿ‹U‹A‰…`ÿÿÿÇ…dÿÿÿ…hÿÿÿ‰­hÿÿÿÇ@ÈfA‰`…`ÿÿÿ‰A‹Ç@ŒBƒ} u:½@ÿÿÿ¾ŒBü¹ó¥‹‹M•@ÿÿÿ‰P‰Ê‹ƒÀ¨)·”BÐf‰…HÿÿÿƒÄø‹E‹UPƒÂ‰•¸þÿÿRè†ÿÿ‹¼þÿÿ‹U‹A‰… ÿÿÿÇ…$ÿÿÿ…(ÿÿÿ‰­(ÿÿÿÇ@ÈfA‰`… ÿÿÿ‰A‹‹•¸þÿÿ…ÒuÆ@ëÆ@‰Æ@Ç@Ç@fÇ@ Ç@ Ç@Ç@‹¼þÿÿ‹A‹‰A‹‰A‹‰A‹Eéý‹•¼þÿÿàþÿÿ}€¾¬B‹B‰…àþÿÿÇ…äþÿÿ…èþÿÿ‰­èþÿÿÇ@¼gA‰`‰J‹U‹Ç@¬Bü¹ó¥‹‹MU€‰P·´B‹ƒÀø)Á‰È‹¼þÿÿÂf‰Uˆ‹A‹‰Aè<ˆÿÿ‹•¼þÿÿÀþÿÿ‹B‰…ÀþÿÿÇ…Äþÿÿ…Èþÿÿ‰­ÈþÿÿÇ@¼gA‰`‰Jƒ} t‹UƒÄô‹Ç@ÔB‹@Pèf¨ÿÿƒÄ‹¼þÿÿ‹A‹‰AèЇÿÿ蟆ÿÿv¥˜þÿÿ[^_‰ì]ÃU‰åƒì\WVSè‡ÿÿ‰E¼ƒÄø‹E P‹URèÿîÿÿ‹U¼‹B‰EàÇEäEè‰mèÇ@2hA‰`Eà‰B‹UǤB‹U¼‹B‹‰B‹Ee˜[^_‰ì]ÃU‰åìÜWVSè—†ÿÿ‰…<ÿÿÿ‰…8ÿÿÿ‹EÇÔB‹•<ÿÿÿ‹B‰EàÇEäEà‰mèÇEìøhA‰eð‰B‹UÇ BƒÂ‰•4ÿÿÿ‹U ‹Pð€xütƒÄôRèWUƒÄë‰öÿ@ø‹•4ÿÿÿ‰‹•8ÿÿÿ‹B‰EÀÇEÄEÀ‰mÈÇEÌøhA‰eЉB‹EÀ‰B‹‰BëF‰ö‹•8ÿÿÿ‹B‰E€ÇE„E€‰mˆÇEŒƒ=ŒBuèöÿÿƒÄüh<BhCm@hŒBè”VÿÿƒÄjhHm@hYm@h|Bè£Uÿÿ‰ì¸|B]ÃU‰åƒìƒ=œBu>ƒ=ŒBuèÃõÿÿƒÄüh<BhCm@hŒBètƒÄøhÅ@EðPèûÀÿÿƒÄ€~JtƒÄøhÍ@EðPèáÀÿÿƒÄ€~K…ÚEЉ…ÜýÿÿƒÄøh×@E PèúÊÿÿƒÄ‰ÀW‹ƒÀ‹‰UÇE”¸AAU ‰U˜U‰E ƒÄü€~It ºæ@ëvºê@RP‹…ÜýÿÿPèéÇÿÿƒÄ W‹ƒÀ‹‰U€ÇE„¸AAUЉUˆU€‰EÐƒÄøPEðPègÀÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèDzÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjE Pè%zÿÿƒÄƒÄôFLPèîóÿÿƒÄ‰À‰…|ÿÿÿvƒÄôFLPèèƒÄ‰À9…|ÿÿÿuéî‰öƒÄô‹…|ÿÿÿ‹Rè‹ôÿÿƒÄ‰À‰…xÿÿÿE ‰…ØýÿÿƒÄø‹…|ÿÿÿ‹REÐPèÊÿÿƒÄ‰ÀƒÄøEÐP‹•ØýÿÿRèOþÿƒÄ W‹ƒÀ‹‰•`ÿÿÿÇ…dÿÿÿ¸AAU ‰•hÿÿÿ•`ÿÿÿ‰ƒÄôE PèàƒÄ‰À…ÀtƒÄøhí@E Pè¿ÿÿƒÄƒÄøhï@‹…xÿÿÿPègiÿÿƒÄ‰À‰…\ÿÿÿƒ½\ÿÿÿu/ƒÄü‹…xÿÿÿPhñ@¡B‹P Rè†iÿÿƒÄƒÄôjèqiÿÿƒÄ‰öƒÄü‹…\ÿÿÿPh…@þÿÿPèiÿÿƒÄ‰À…ÀuéƒvƒÄø…@þÿÿPEÐPèÁÈÿÿƒÄ‰ÀW‹ƒÀ‹‰•0þÿÿÇ…4þÿÿ¸AAUЉ•8þÿÿ•0þÿÿ‰ƒÄôEÐPè$MþÿƒÄˆÀ„Àuëëæ‰ö… þÿÿ‰…Ôýÿÿ…þÿÿƒÄüU Rh@PèäÄÿÿƒÄ W‹ƒÀ‹‰•þÿÿÇ…þÿÿ¸AA•þÿÿ‰•þÿÿ•þÿÿ‰…þÿÿƒÄüUÐRP‹…ÔýÿÿPèéÅÿÿƒÄ W‹ƒÀ‹‰•ðýÿÿÇ…ôýÿÿ¸AA• þÿÿ‰•øýÿÿ•ðýÿÿ‰… þÿÿƒÄøPEðPè­½ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøj… þÿÿPè‡wÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøj…þÿÿPèewÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèFwÿÿƒÄéVþÿÿ‰öƒÄô‹…\ÿÿÿPèYgÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjE PèwÿÿƒÄƒ…|ÿÿÿé÷üÿÿvE ƒÄøVPèŸóÿÿƒÄ W‹ƒÀ‹‰•àýÿÿÇ…äýÿÿ¸AAU ‰•èýÿÿ•àýÿÿ‰E ƒÄøPEðPèµ¼ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjE Pè’vÿÿƒÄƒÄøEðPSèÖÆÿÿƒÄ‰ÀW‹ƒÀ‹‹ ‰ƒÄøjEðPèavÿÿƒÄë‰Ø¥¸ýÿÿ[^_‰ì]ÂvU‰åìWVS‹]‹u è]#ÿÿ‰À‰Â‰Ð‰ÇƒÄôEðPè ÆÿÿƒÄW‹ƒÀ‹‰UàÇEä¸AAUð‰UèUà‰€¾„tƒÄøha@EðPè¹»ÿÿƒÄ€¾…tƒÄøhe@EðP蜻ÿÿƒÄƒ¾ˆ|ƒÄøhi@EðPè»ÿÿƒÄƒÄô†ŒPèƒÄ‰À…ÀtlEЃÄü–ŒRhw@Pè ÂÿÿƒÄ W‹ƒÀ‹‰UÀÇEĸAAUЉUÈUÀ‰EÐƒÄøPEðPèF»ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPè#uÿÿƒÄ€>tƒÄøhz@EðPèâºÿÿƒÄƒÄôFPèƒÄ‰À…ÀtzEЃÄüVR€¾…tº@뺄@RPèxÁÿÿƒÄ W‹ƒÀ‹‰U°ÇE´¸AAUЉU¸U°‰EÐƒÄøPEðP螺ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPè{tÿÿƒÄƒÄôF PèðƒÄ‰À…ÀtiEЃÄüV Rh‰@PèúÀÿÿƒÄ W‹ƒÀ‹‰U ÇE¤¸AAUЉU¨U ‰EÐƒÄøPEðPè ºÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèýsÿÿƒÄƒÄôFlPèÆíÿÿƒÄ‰À‰Eœ‰öƒÄôFlPèÄ ƒÄ‰À9EœuëtEЃÄü‹Uœ‹ QhŽ@PèaÀÿÿƒÄ W‹ƒÀ‹‰UÇE”¸AAUЉU˜U‰EÐƒÄøPEðP臹ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèdsÿÿƒÄƒEœétÿÿÿƒÄôFxPè$íÿÿƒÄ‰À‰EœƒÄôFxPè$ ƒÄ‰À9EœuëtEЃÄü‹Uœ‹ Qh’@PèÁ¿ÿÿƒÄ W‹ƒÀ‹‰U€ÇE„¸AAUЉUˆU€‰EÐƒÄøPEðPèç¸ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèÄrÿÿƒÄƒEœétÿÿÿƒÄôFHPè„ìÿÿƒÄ‰À‰EœƒÄôFHPè„ ƒÄ‰À9EœuéùEЉ…üþÿÿ…pÿÿÿƒÄø‹Uœ‹ QPèªHþÿƒÄ W‹ƒÀ‹‰•`ÿÿÿÇ…dÿÿÿ¸AA•pÿÿÿ‰•hÿÿÿ•`ÿÿÿ‰…pÿÿÿƒÄüPh–@‹…üþÿÿPèʾÿÿƒÄ W‹ƒÀ‹‰•PÿÿÿÇ…Tÿÿÿ¸AAUЉ•Xÿÿÿ•Pÿÿÿ‰EÐƒÄøPEðPèä·ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèÁqÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøj…pÿÿÿPèŸqÿÿƒÄƒEœéïþÿÿvƒÄôFTPè\ëÿÿƒÄ‰À‰EœƒÄôFTPè\ƒÄ‰À9Eœuéù…pÿÿÿ‰…øþÿÿEÐƒÄø‹Uœ‹ QPè‚GþÿƒÄ W‹ƒÀ‹‰•@ÿÿÿÇ…Dÿÿÿ¸AAUЉ•Hÿÿÿ•@ÿÿÿ‰EЃÄüPh›@‹…øþÿÿP訽ÿÿƒÄ W‹ƒÀ‹‰•0ÿÿÿÇ…4ÿÿÿ¸AA•pÿÿÿ‰•8ÿÿÿ•0ÿÿÿ‰…pÿÿÿƒÄøPEðPè¼¶ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøj…pÿÿÿPè–pÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèwpÿÿƒÄƒEœéïþÿÿvƒÄôF`Pè4êÿÿƒÄ‰À‰EœƒÄôF`Pè4ƒÄ‰À9Eœuéù…pÿÿÿ‰…ôþÿÿEÐƒÄø‹Uœ‹ QPèZFþÿƒÄ W‹ƒÀ‹‰• ÿÿÿÇ…$ÿÿÿ¸AAUЉ•(ÿÿÿ• ÿÿÿ‰EЃÄüPh@‹…ôþÿÿP耼ÿÿƒÄ W‹ƒÀ‹‰•ÿÿÿÇ…ÿÿÿ¸AA•pÿÿÿ‰•ÿÿÿ•ÿÿÿ‰…pÿÿÿƒÄøPEðP蔵ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøj…pÿÿÿPènoÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøjEÐPèOoÿÿƒÄƒEœéïþÿÿv…pÿÿÿƒÄøVPèàëÿÿƒÄ W‹ƒÀ‹‰•ÿÿÿÇ…ÿÿÿ¸AA•pÿÿÿ‰•ÿÿÿ•ÿÿÿ‰…pÿÿÿƒÄøPEðPèð´ÿÿƒÄW‹ƒÀ‹‹ ‰ƒÄøj…pÿÿÿPèÊnÿÿƒÄƒÄøEðPSè¿ÿÿƒÄ‰ÀW‹ƒÀ‹‹ ‰ƒÄøjEðPè™nÿÿƒÄë‰Ø¥Øþÿÿ[^_‰ì]ÂvU‰åƒì WVS‹]‹u ƒÄøSj讹ÿÿƒÄ‰À‰Â‰Ð…Òt‰×‹‰‰øeè[^_‰ì]ÃvU‰åƒì WVS‹]‹u ƒÄøSjèr¹ÿÿƒÄ‰Â‰Ð‰Ç…ÀtƒÄøVPèg¾ÿÿƒÄ‰Çeè[^_‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒÄüWVSèWƒÄ‰Â‰Ðëeè[^_‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒ}t"ƒÄü‹EPWƒÄôSè÷ƒÄ‰ÀRè=ƒÄeè[^_‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒÄüWVSèÏ´ÿÿƒÄ‰Â‰Ðëeè[^_‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒÄüWVSèç]ÿÿƒÄ‰Â‰Ðëëë‰öeè[^_‰ì]ÉöU‰åƒìWVS‹u‹] ‹}‰Ø)ð‰Eø‹Eø‰ÂÁú‰Uø‹Eø‰EüƒÄü‹Eü‰Â•PV‹Eü‰Â•‰ú)ÂRès]ÿÿƒÄ‹Eü‰Â•‰ú)‰ÐëeØ[^_‰ì]ÉöU‰åƒì WVS‹]‹u ‹}ƒÄüWVSèoÿÿÿƒÄ‰Â‰Ðëeè[^_‰ì]ÃU‰åƒì$S‹]ƒÄôCPèփĉÀ‰ÃƒÄøSjèÀ¸ÿÿƒÄ‰Eü‹Eü‰X‹EüÇ@‹EüÆ@ ‹Uü‰Ðë‹]؉ì]ÃU‰åS‹MöAt‹Y$ë‰ö‹Y ‹öÄt‹Q,ë‹Q9ÓtöÄt‹A$ëv‹Aëv‹A[‰ì]ÃU‰åƒìS‹]ƒÄôƒÄôS讃ĉÀPèƒÄ‰Â‰Ðë‹]è‰ì]ÃvU‰å‹UJ‰Èë‰ì]ÃvU‰åƒìVS‹]‹u …ötƒÄøµPSèiƒÄeè[^‰ì]ÃU‰åƒìVS‹]‹u …ötƒÄø‰ðÁàð…RSè2ƒÄeè[^‰ì]ÉöU‰åƒìVS‹u‹] ƒÄôVè…[ÿÿƒÄeè[^‰ì]ÃU‰åƒì VS‹]‹u ‰]üþ€vƒÄøVSè¹ÿÿÿƒÄë2ƒÄôVèw{ÿÿƒÄ‰À…¸„B ‰Mø‹Eü‹Uø‹ ‰‹Eø‹Uü‰eØ[^‰ì]ÃU‰å‹U‰ì‹B $ ‰B ‰Ð]ÃU‰åƒìS‹] ‹EƒÄüƒÄôEPèxÏÿÿƒÄ‰ÀPS‹EPè²ÿÿƒÄ‹]è‰ì]ÉöU‰åƒìS‹]ƒÄøjSèKjÿÿƒÄ‹]è‰ì]ÃU‰åƒìVS‹]‹u ƒÄôFPèÆÿÿÿƒÄƒÄøVSè!vÿÿƒÄeè[^‰ì]ÃU‰å‹Eö@t‹@ëv‹@,‰ì]ÃU‰å‹Eö@t‹@,ëv‹@‰ì]ÃU‰å‹E‰ì]‹@,ÃU‰å‹Eö@t‹@$ëv‹@ ‰ì]ÃU‰å‹E‰ì]‹@ ÃU‰å‹Eö@t‹@,ëv‹@‰ì]ÃU‰åƒì$S‹]ƒÄôSè)ƒÄ‰Eü‹Uü‰Ðë‹]؉ì]ÃU‰å‹U‹J‰Èë‰ì]ÃvU‰åƒì$S‹]ƒÄø‹PEüPèwºÿÿƒÄ‰À‹Uü‰Ðë‹]؉ì]ÃU‰å‹U‹J‰Èë‰ì]ÃvU‰å‹E‰ì]Š@$¶ÀÃU‰åƒìè ˆÀ¾Ð‰Ðë‰ì]ÃU‰å1Àëëë‰ì]ÃU‰å‹E‰ì]‹@ÃU‰åƒì WVS‹]‹u ‹}ƒÄôjjWVSèKƒÄ ‰Â‰Ðëeè[^_‰ì]ÃU‰å‹U‹E ˆB‰ì]ÃU‰å‹E‰ì]¶@ÃU‰åS‹U‹M ‰Ðƒøs¸9È’ÈØë‹]ü‰ì]ÃvU‰å‹E‰ì]Š@$¶ÀÃUºÿÿÿÿ‰å‹E‹@8…À|‰Â‰ì‰Ð]ÃU‰å‹Eö@t‹@,ëv‹@‰ì]ÃU‰å‹E‹U ‰ì¿Hf‰P‰È]ÃU‰å‹E‰ì]¿@ÃU‰å‹E‹U ‰ì‹H ‰P ‰È]ÃU‰å‹E‰ì]‹@ ÃU‰åƒì‹UÇEü9Uürë‹Eü‰Á ‰Eüëëv‹Mü‰Èë‰ì]ÃU‰å‹E‹U ö@tP$ëP‰ì]ÃU‰å‹E‰ì]‹@ÃU‰å‹U€zKt¸ @븨@‰Àë‰ì]ÃvU‰å‹U¸Z@ë‰ì]ÃvU‰åƒìS‹]‹ŠP„Òt €ÊˆP¸ÿÿÿÿë9‹H…Ét‹‹B9Bu ƒÄôQèþÿƒÄ‹ƒÄô‹PèÎÁþÿ‰Âƒúÿu‹€H‰Ð‹]è‰ì]ÃU‰åƒìS‹M ‹U¾EP‹]RQS迲þÿ‹]è‰ì]ÃU‰åƒìS‹M ‹U¾EP‹]RQS蛲þÿ‹]è‰ì]ÃU‰åƒì‹E ƒÄø‹UPRèFxþÿ‰ì]ÃU‰åƒì‹E ƒÄø‹UPRè*xþÿ‰ì]ÃU‰åƒìS‹M ‹U¾EP‹]RQSèG±þÿ‹]è‰ì]ÃU‰åƒìS‹M ‹U¾EP‹]RQSè#±þÿ‹]è‰ì]ÃU‰å‹E€x”À‰ì¶À]ÃU‰å‹Eö@t‹@$ëv‹@‰ì]ÃU‰åƒìS‹]€{ tƒÄôSèßáÿÿƒÄ‰Â‰Ðë‰öÿCƒÄôSèÄùÿÿƒÄ‰Â‰Ðë‹]è‰ì]ÃU‰å‹Eƒx$•À‰ì¶À]ÃU‰å‹Eƒx0•À‰ì¶À]ÃU‰å‹U‰ì‹B $ @‰B ‰Ð]ÃU‰å‹U‰ì]‹B‹R)‰ÐÃU‰å‹E‰ì]‹%ÃU‰å‹U‹E …ÀuÆBëÆBÆB‰‹E‰B‰ìÇBfÇB ÇB ÇBÇB]ÃU‰åƒì WVS‹]‹u ‹}ƒÄôWèEƒÄ‰ÀPWVSèƒÄ‰Â‰Ðëeè[^_‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒÄô‹EPWjVSèE ƒÄ ‰Â‰Ðëeè[^_‰ì]ÉöU‰åƒì@VS‹]‹u EðƒÄüVSPèTƒÄ ƒÄøEðPEäPèuµÿÿƒÄ‰ÂEäƒÄüUðJQPEèPè ·ÿÿƒÄ‰À‹Eè‹Uì‰E؉UÜ‹EØ‹UÜëe¸[^‰ì]ÃvU‰åƒì\WVS‹]‹u ‹‰EüƒÄôVè÷oÿÿƒÄ‰À‹‰UøÆE÷ƒ}øué‹Eø‰EüƒÄüƒÄô‹EøPèotÿÿƒÄ‰ÀPƒÄø‹EPÆEöEöP赪ÿÿƒÄ‰ÀPFPèvªÿÿƒÄˆÀˆE÷€}÷tƒÄô‹EøPèhtÿÿƒÄ‰À‹8ëvƒÄô‹EøPè´uÿÿƒÄ‰À‹8‰}øéuÿÿÿƒÄø‹EüPEàPè„´ÿÿƒÄ‰À€}÷txEÐƒÄøVPèØÜÿÿƒÄ EÐƒÄøPEàPèéªÿÿƒÄˆÀ„Àt@EÀƒÄô‹UR‹UüR‹UøRVPèÏiÿÿƒÄEÀƒÄüÆE¿U¿RPSèÛµÿÿƒÄ‰Àé©ëvƒÄôEàPè­ÿÿƒÄƒÄüƒÄø‹EPÆE¾E¾P躩ÿÿƒÄ‰ÀPƒÄô‹EàPè sÿÿƒÄ‰ÀPFPèi©ÿÿƒÄˆÀ„Àt8EÀƒÄô‹UR‹UüR‹UøRVPè?iÿÿƒÄEÀƒÄüÆE½U½RPSèKµÿÿƒÄ‰ÀëƒÄüÆE¼E¼PEàPSè/µÿÿƒÄ‰Àë‰Øe˜[^_‰ì]‰öU‰åƒìS‹]‹ŠP„Òt €ÊˆP1Àë0v‹@…Àt ƒÄôPèð‡þÿƒÄ‹ö@ t ƒÄôS蜈þÿë‰ö¸‹]è‰ì]ÃU‰åƒì‹E‹ŠP„Òt €ÊˆP1Àë‹H…Ét‹‹B9Bu ƒÄôQè–‡þÿ¸‰ì]ÃU‰åƒìV‹uS‹] ‹ŠP„Òt €ÊˆP1ÀëDv‹H…Ét…Ût‹‹P‹@)Ð9Ø} ƒÄôQèF‡þÿƒÄ…Ûu‹ö@ t ƒÄôVèî‡þÿë¸eè[^‰ì]ÃU‰å‹E‰ì]‹@8÷ÐÁèÃU‰å‹Eö@t‹P$ëv‹P ö@t‹@,ë‰ö‹@9•À‰ì¶À]ÃU‰å‰ì]ÃU‰å‹E‰ì]‹‹ÃU‰åƒìS‹]ƒÄôSèEƒÄ‰À‹‰Ðë‹]è‰ì]ÃvU‰åƒìS‹]ƒÄôSèíPÿÿƒÄ‰Â‰Ðëëë‹]è‰ì]ÃU‰å‹E;E t ‹E;Euë‰öë*‰ö‹E‹UŠ:}°ë0‹E‹UŠ:}°ë ÿEÿEëÀ°‹U;U u ‹U;Ut°ˆÀë‰ì]ÃU‰å‹E‰ì]‹Áè ƒàÃU‰å‹Eƒ} t€Hë‰ö€`ý‰ì]ÃU‰å‹U¸þÿÿÿë‰ì]ÃvU‰åƒì WVS‹]‹u ‹}ƒ}t"ƒÄü‹EPWƒÄôSè«óÿÿƒÄ‰ÀRè ƒÄeè[^_‰ì]ÃU‰åƒì WVS‹]‹u ‹}ƒÄüWVSèÃOÿÿƒÄ‰Â‰Ðëëë‰öeè[^_‰ì]ÉöU‰å‹E‰ì]‹ÃU‰å‹U‰ì‹B $ ‰B ‰Ð]ÃU‰åƒì‹E‹€xt1Àëv‹@…Àt ƒÄôPè…þÿ¸‰ì]ÃU‰åƒì‹U‹ö@ `t ƒÄôRèΆþÿ‰ì]ÃU‰å‹E‰ì]‹‹ÃU‰å‹U‰ì]‹B‹R)‰ÐÃU‰åƒì‹EƒÄüP‹U¾E PRèí¹þÿ‰ì]ÃU‰å‹E‰ì]‹@ÃU‰å‹U‹BE ‰B‰ì]ÃU‰å‹E‰ì]‹@ÃU‰å‹U·E ‰ì·J‰B‰È]ÃU‰å‹E‰ì]‹@ÃU‰åƒìS‹M ‹U‹EP‹]RQSè4ºþÿ‹]è‰ì]ÃU‰åƒì‹U ƒÄü‹EP‹MRQèÚ¹þÿ‰ì]ÃU‰åƒìVS‹u‹] ‹F;FtƒÄøS‹FPè ïÿÿƒÄƒFëƒÄüSƒÄôVècôÿÿƒÄ‰ÀPVè›fÿÿƒÄeè[^‰ì]ÃvU‰åƒìS‹]ƒÄø¾U ‹‹PR耸þÿ‰Ø‹]è‰ì]ÃU‰åƒìS‹]ƒÄø¾U ‹‹PRèX¸þÿ‰Ø‹]è‰ì]ÃU‰åƒìS‹]ƒÄø¾U ‹‹PRè0¸þÿ‰Ø‹]è‰ì]ÃU‰å‹E‰ì]‹%ÃU‰åƒìS‹]ŠE ‹€zuƒÄø¾ÀP‹PèX˜þÿƒøÿu‹Æ@‰Ø‹]è‰ì]ÃU‰åƒìVS‹]‹u ƒÄøƒÄôVèjóÿÿƒÄ‰ÀPS芭ÿÿƒÄ‰Àë‰Øeè[^‰ì]‰öU‰å‹E‰ìƒÀ]ÃU‰å‹E‰ìƒÀ]ÃU‰å‹E‹U ‰ì‹‰…Ò”ÂÀâˆP‰È]ÃU‰å‹E‰ì]‹ÃU‰å‹E‰ì]¶@ÃU‰åƒì‹U ƒÄü‹EP‹MRQèboþÿ‰ì]ÃU‰åƒì‹U ƒÄü‹EP‹MRQèBoþÿ‰ì]ÃU‰åƒì‹U ƒÄü‹EP‹MRQè"oþÿ‰ì]ÃU‰åƒì VS‹]¸ÿÿÿÿSðÁ‰Eøuø‹‰Eüƒ}üu ƒÄôSèW£ÿÿƒÄeØ[^‰ì]ÃvU‰åƒìVS‹]‹u ƒÄøƒÄôVèÕÿÿƒÄ‰ÀPSèR¬ÿÿƒÄ‰Àë‰Øeè[^‰ì]‰öU‰å‹U‹ ƒÁð‰Èë‰ì]ÃU‰åƒìWVS‹uƒÄôVèúÿÿƒÄ‰Ã‰]üv‹E ;EüvƒÄôh-M@èû†þÿƒÄë‰öëâ‰ö‹Eü‹U )Ð9Ev ‹Eü‹U ‰Á)щM‹Eü‹U‰Á)щMðƒÄôVèûÿÿƒÄ‰À‰Â+U9UðvƒÄôh7M@è>ŠþÿƒÄëëÆ‰ö‹Eü‹U)ЋU‰UøƒÄø‹EøPVèƒÕÿÿƒÄˆÀ„À„žƒÄô‹EøPè¾íÿÿƒÄ‰À‰Eô‹E PƒÄôVèEîÿÿƒÄ‰ÀPj‹EôPèHìÿÿƒÄ‹E ‹UЋUü)ÂRƒÄôVèîÿÿƒÄ‰À‰ÂU ‰ÐEP‹E ‹UÐP‹EôPè ìÿÿƒÄ‹EP‹EP‹E P‹EôPèôëÿÿƒÄƒÄø‹EôPVèdƒÄëmv‹E ‹UЋUü)ÂRƒÄôVè±íÿÿƒÄ‰À‰ÂU ‰ÐEP‹E ‹UÐPƒÄôVèSþÿÿƒÄ‰ÀPèäùÿÿƒÄ‹EP‹EP‹E PƒÄôVè0þÿÿƒÄ‰ÀPèuëÿÿƒÄƒÄôVèþÿÿƒÄ‰À‰Ç‹Eø‰‰ðëeØ[^_‰ì]ÃvU‰åƒì VS‹]ƒÄô‹EPèøÿÿƒÄ‰Æ‰uüƒ} u7ƒÄôSèvøÿÿƒÄ‰À9Er$ƒ}u‹E;EürƒÄø‹EPS葟ÿÿƒÄ‰Â‰Ðësv‹E;EüvƒÄôhcM@èË„þÿƒÄë‰öëâ‰ö‹Eü‹U)Ð9Ev ‹Eü‹U‰Á)щMƒÄô‹EPƒÄô‹EPè‹ìÿÿƒÄ‰À‰ÂUR‹EP‹E PSèJýÿÿƒÄ ‰Â‰ÐëeØ[^‰ì]ÃU‰åƒì,WVS‹]‹EˆEÿƒÄôSè±÷ÿÿƒÄ‰Æ‰uø‹E ;EøvƒÄôh-M@è/„þÿƒÄë‰öëâ‰ö‹Eø‹U )Ð9Ev ‹Eø‹U ‰Á)щM‹Eø‹U‰Á)щMìƒÄôSè6øÿÿƒÄ‰À‰Â+U9UìvƒÄôh7M@èr‡þÿƒÄëëÆ‰ö‹Eø‹U)ЋU‰UôƒÄø‹EôPSè·ÒÿÿƒÄˆÀ„À„žƒÄô‹EôPèòêÿÿƒÄ‰À‰Eð‹E PƒÄôSèyëÿÿƒÄ‰ÀPj‹EðPè|éÿÿƒÄ‹E ‹UЋUø)ÂRƒÄôSèNëÿÿƒÄ‰À‰ÂU ‰ÐEP‹E ‹UÐP‹EðPè@éÿÿƒÄ‹EP¾EÿP‹E P‹EðPèƒÄƒÄø‹EðPSè—ƒÄëm‰ö‹E ‹UЋUø)ÂRƒÄôSèåêÿÿƒÄ‰À‰ÂU ‰ÐEP‹E ‹UÐPƒÄôSè‡ûÿÿƒÄ‰ÀPè÷ÿÿƒÄ‹EP¾EÿP‹E PƒÄôSècûÿÿƒÄ‰ÀP蘃ăÄôSèLûÿÿƒÄ‰À‰Ç‹Eô‰‰ØëeÈ[^_‰ì]ÉöU‰åƒìVS‹u‹] ƒÄôƒÄôVèûÿÿƒÄ‰ÀPèúÿÿƒÄƒÄôSèoêÿÿƒÄ‰À‰eè[^‰ì]ÃvU‰åƒìVS‹]‹u ƒÄüèíÿÿˆÀ¾ÐRVSè ƒÄeè[^‰ì]ÃU‰åƒì$S‹]‹EˆEÿƒÄôSè+öÿÿƒÄ‰À9E vƒÄôhSM@èl…þÿƒÄëvëÖ‰öƒÄôSèõÿÿƒÄ‰À9E v)ƒÄü¾EÿPƒÄôSèõÿÿƒÄ‰À‹U )ÂRSèëÌÿÿƒÄë‰öƒÄüjÿ‹E PSè¥ìÿÿƒÄ‹]؉ì]ÃvU¸‰å‰ì]ÃU‰åƒì‹EƒÄôPèF°þÿ‰ì]ÃU‰åƒìVS‹]ƒÄôSèdƒÄƒÄôSèäùÿÿƒÄ‰À‰ÆÆF eè[^‰ì]ÃU‰å‹EŠU ‰ìP]ÃU‰åƒìWVS‹]‹u ‹}‰øˆEÿŠEÿƒÄü‹EPEÿPƒÄôSèéÿÿƒÄ‰ÀRèƒÄeØ[^_‰ì]ÃvU‰åƒì WVS‹]‹u ‹}ƒÄüW¾PSè EÿÿƒÄ‰Â‰Ðëëëveè[^_‰ì]ÉöU‰å‹U‹E ‰B‰ì]ÃU‰å‹E‹M ‰ì‹P щH ‰Ð]ÃU‰åS‹M‹U‰Ð‹Y ÷Ð#U !Ø Ð‰A ‰Ø[‰ì]ÃU‰åƒìS‹]öCt ƒÄôSèç£þÿ‹E ‰C ‹E‰C‹E‰C‹]è‰ì]ÃU‰å‹E‹U ‹M‰P‰ì‰P‰H]ÃU‰å‹EŠU ‰ìP]ÃU‰åƒìS‹]‹C9CrƒÄôSèU¥þÿƒøÿt‹C¶‹]è‰ì]ÃU‰åƒì‹U ƒÄü‹EP‹MRQè§þÿ‰ì]ÃU‰å‹E‰ìƒÀG]ÃU‰åƒìVS‹]ƒÄôSèèéÿÿƒÄ‰ÆƒÄôSèºÌÿÿƒÄ‰Â‰ð)Љ‰ÑÁù‰Èëeè[^‰ì]ÃU‰åƒìS‹]‹C9CrƒÄôS赤þÿƒÄƒøÿt$‹CP‰S‰Ð;CrƒÄôS蔤þÿƒøÿt‹C¶‹]è‰ì]ÃU‰åƒì‹U ƒÄø‹EPRèê­þÿ‰ì]ÃU‰åƒì‹US‹] ƒÄü‹E‹JHPS¿A0ÂR‹A4ÿЋ]è‰ì]ÃU‰å‹E‰ì]‹@LÃU‰å‹E‹P;PsB‰P‰ì]ÃU‰åƒì WVS‹]‹u ‹}‹EPWVSè¾¢ÿÿƒÄ‰Àë‰Øeè[^_‰ì]ÂU‰åƒìƒÄôjè8bþÿ‰ì]ÃU‰åƒì$S‹]ƒÄøè éÿÿˆEÿEÿPƒÄøƒÄôSègñÿÿƒÄ‰ÀPƒÄôSè°öÿÿƒÄ‰ÀPèÕ¶ÿÿƒÄ‰ÀPè*ÊÿÿƒÄ‹]؉ì]ÃU‰å‹E‹U ‰ì‹H‰P‰È]ÃU‰å‹E‰ì]‹@ÃU‰å‹E‰ì]‹ÑèƒàÃU‰å‹Eƒ} t€ëv€ ý‰ì]ÃU‰åƒìS‹]‹€xuƒÄô‹Pèþÿƒøÿu‹Æ@‰Ø‹]è‰ì]ÃU‰åƒìS‹]ŠE ‹€zuƒÄø¾ÀP‹Pè°Œþÿƒøÿu‹Æ@‰Ø‹]è‰ì]ÃU‰åƒìVS‹]‹u ‹EƒÄôEPèϵÿÿƒÄ‰ÀP‹EPVSèRµÿÿƒÄ‰Â‰Ðëeè[^‰ì]ÃU‰åƒìS‹]ƒÄôSèyõÿÿƒÄ‰Àƒxv!ƒÄüƒÄþfjƒÄôSèðÿÿƒÄ‰ÀPSèôÄÿÿƒÄ‹]è‰ì]ÉöU‰å‹UŠE öЉì B]ÃU‰å‹U‹E ÷Љì‹J !ȉB ‰È]ÃU‰å‹E‹H‹Qð…Òu¸Ôm@ëÆ ‹@‰ì]ÃU‰å‹E‹H‹Qð…Òu¸Ôm@ëÆ ‹@‰ì]ÃU‰åƒìlWVSèýþÿ‰Â‹B‰EàÇEäEè‰mèÇ@òA‰`Eà‰B‹Eà‰B¸€A[^_‰ì]ÃU‰å‹E‹U ‰ì‹H‰P‰È]ÃU‰å‹E‰ì]‹@ÃU‰åƒì‹U ƒÄü‹EP‹MRQè.wþÿ‰ì]ÃU‰åƒì‹U ƒÄü‹EP‹MRQèwþÿ‰ì]ÃU‰åƒì‹U ƒÄü‹EP‹MRQèîvþÿ‰ì]ÃU‰å‹E‰ìƒÀ4]ÃU‰å‹E‰ì]‹ÃU‰å‹E‹U ‰ì‹‰‰È]ÃU‰å‹E‹M ‰ì‹Pˆ ÿ@]ÃU‰å‹E‹U ‰ì ]ÃU‰å‹U‹M‰Ð÷Ð#U ‰ì# Љ]Ãÿÿÿÿv@°@ÿÿÿÿÌ@0B`B pBÀB,B ´BB,B ðBÀB,B ˆ ­û B„ ­û,B B† ­ûŒB BÀBPŸ@¬¢@ð¡@@•@¨›@H§@<–@8¤@d—@ð @´£@Œ¨@p¦@ô¦@”¦@ئ@¸¦@}q5 =¸Ý@  Tî@ ï@Ðý@™A€ÚAÅAT™AP4A(A¸™At4A€ñAšAð4A¤ñAxšA¤ÚApËA´šA6A€ñA¨ÿ$›A¨ÿ6A\›A\7A€ñA¬ÿÌ›A¬ÿØ7AœA¤8A€ñAtœA 9A(AÄœAD9A¤ñAAÀ9A˜û@„AÜ9A¤ñAôA¬:A¤ñAdžA(;A´žAD;AŸA`;ATŸA|;A¤ŸA˜;Apû@ôŸA´;A€ñAd A0Aì¢A ý@ ý@£A‚@\„@x„@´z@t{@„…@¤…@¨„@0|@$„@„@D„@ð„@0…@…@l…@P…@øÿT£Aøÿ?Aüÿ¬£AüÿŒ?A0¤A@A(Aôÿh¤Aôÿ4@A0¥Aˆw@Üx@x„@´z@t{@y@¤…@¨„@0|@$„@x@D„@Èw@x@Hx@lx@P…@h¥A AAÈñA¸¥ADAA(Aä¥Aø|@Ìz@¨z@´z@t{@Øz@øz@4}@0|@{@h{@ |@~@(~@4~@@~@~@¦Aðø@@ h&L!!¨&"T"`"l"|"ˆ"”"œ"¨"´"¼"Ü"ü"#,#4#@#L#T#`#h#t#|#„#Œ#”# #¨#´#À#È#Ô#à#ì#ø#$$$ $,$4$@$L$X$d$p$|$ˆ$”$ $¬$´$Ä$Ô$è$ü$%0%@%T%d%p%|%˜%T"`"l"|"ˆ"”"œ"¨"´"¼"Ü"ü"#,#4#@#L#T#`#h#t#|#„#Œ#”# #¨#´#À#È#Ô#à#ì#ø#$$$ $,$4$@$L$X$d$p$|$ˆ$”$ $¬$´$Ä$Ô$è$ü$%0%@%T%d%p%|%˜%__assert__errno__infinity__main^_ctype_abort/atexit;callocKclose^cygwin32_conv_to_posix_path_cygwin32_conv_to_win32_pathpcygwin_internal‚dll_crt0__FP11per_processŸexitªfclose²fflush¶fgets·fileno¿fopenÂfprintfÅfreadÆfreeÌfseekÎfstatÔfwriteÜgetc(isatty*isdigit[lseek]malloccmemchrdmemcmpememcpyfmemmovegmemset~open×readÛreallocSstatXstrcmpZstrcpy]strerror_strlencstrncmpdstrncpyostrtolqstrtoultolowerªvsprintf¶writeCloseHandleCCreatePipeDCreateProcessA³FormatMessageA GetEnvironmentVariableA GetExitCodeProcessGetLastError(GetModuleHandleAÎLocalAllocÒLocalFreeReadFileYSetEnvironmentVariableASleep                                                  cygwin1.dll             KERNEL32.dlldime/contrib/0040755017777301777730000000000007733212517011747 5ustar wwwwwwdime/contrib/README0100644017777301777730000000100707660413522012620 0ustar wwwwwwThis directory contains various contributions to dime. These files will not be maintained by us. Please contact the contributor if you have questins regarding these files. Dr. Thomas Krebs (old defunct email-address: Thomas_Krebs@redac.de): dime.dsw - VC++ 6.0 SP3 project file for dime dxf2vrml.dsw - VC++ 6.0 SP3 project file for dxf2vrml Michael Louka : dime.mcp - Metrowerks CodeWarrior project file for dime: dxf2vrml.mcp - Metrowerks CodeWarrior project file for dxf2vrml dime/contrib/dime.dsw0100644017777301777730000000500206763254773013412 0ustar wwwwwwMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! ############################################################################### Project: "classes"=".\classes\classes.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "dime"=".\dime.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ Begin Project Dependency Project_Dep_Name classes End Project Dependency Begin Project Dependency Project_Dep_Name entities End Project Dependency Begin Project Dependency Project_Dep_Name objects End Project Dependency Begin Project Dependency Project_Dep_Name records End Project Dependency Begin Project Dependency Project_Dep_Name sections End Project Dependency Begin Project Dependency Project_Dep_Name tables End Project Dependency Begin Project Dependency Project_Dep_Name util End Project Dependency }}} ############################################################################### Project: "entities"=".\entities\entities.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "objects"=".\objects\objects.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "records"=".\records\records.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "sections"=".\sections\sections.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "tables"=".\tables\tables.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Project: "util"=".\util\util.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### dime/contrib/dime.mcp0100644017777301777730000017735706763254773013423 0ustar wwwwwwcool(õö7¸]CodeWarrior Project~€z}‚ƒ„y|…†‡ˆ‰Š‹ŒŽ{¬­®¯¨«°±²§ª³´µ¶·¸¹º»¼½©•–—˜‘”™š›“œžŸ ¡¢£¤¥¦’ÃÄÅÆ¿ÂÇÈɾÁÊìíîËÌÍÎÏÐÑÒÓÔÀïðñòÚÛÜÝÖÙÞßàÕØáóôõâãäåæçèéêë×ö÷øù$%&' #()*"+,-./012345678!9:;<`abc\_def[^ghijklmnopqrst]uvwx  BCDE>AFGH=@IJKLMNOPQRSTUV?WXYZMNOPQGJRSTFKLIUVWXYZ[\e]^_`abcdEH =!"#$%@9:&A8B'();*+,C-.>/0123?45<D67ûÿþúý     üf€,h0fC D E˜  . ˜Pè wà`”ÿÿÿÿKVBC D EFWGH IXMNUOPQRS:?… JavaClasses.jarZIP MWZP Merge Out????APPLDLGXckidProjWSPC Std C++ Console CFM68K????APPLXÀ????U {__initialize__sta__start__ter__terminateLDLGXckidProjWSPCdime.lib????????????????APPLXÀ????U {LMNOPQRSTUAJavaClasses.zipJavaClasses.zipANSI Console MultiFirst Segment:a.outLib Import 68KMPW Import 68KBalloon HelpMW C/C++ 68KMW Pascal 68KRezPEF Import 68KANSI Console 68kHelloWorld.cMSL C.68K Fa(4i_8d).LibMSL Runtime68K.LibMathLib68K Fa(4i/8d).LibMSL C++.68K Fa(4i_8d).LibMacOS.libMSL SIOUX.68K.LibANSI Console PPC:ANSI Console PPC.outLib Import PPCMW C/C++ PPCMW Pascal PPCPPCAsmXCOFF Import PPCPEF Import PPCMSL C++.PPC.LibMSL C.PPC.LibInterfaceLibMathLibMSL RuntimePPC.LibMSL SIOUX.PPC.Lib:ANSI Console 68k.outANSI Console FAT:Merge Out:ANSI Console FAT.outANSI Console 68k.outANSI Console PPC.outMathLib68K Fa(4i_8d).Lib:ANSI C Console 68kANSI C Console 68k:ANSI C Console PPCANSI C Console PPC:ANSI C Console FATANSI C Console FATHelloWorld.cp:ANSI C++ Console 68kANSI C++ Console 68k:ANSI C++ Console PPCANSI C++ Console PPCMSL C++.PPC.DLLMSL RuntimePPC++.DLLMSL AppRuntime.Lib:ANSI C++ Console CFM68KGameCode ConverterFlex PreprocessorBison Preprocessor:Std C++ Console PPCStd C++ Console PPC:Std C++ Console CFM68KPPC Std C++ Console:HelloWorld.cp:Libraries:Runtime:Runtime PPC:MSL RuntimePPC++.DLL:Libraries:Runtime:Runtime PPC:MSL AppRuntime.LibMacOS PPC LinkerCustom KeywordsAccess PathsTarget SettingsFile MappingsBuild ExtrasDebugger TargetC/C++ CompilerC/C++ WarningsIR OptimizerPascal CompilerPascal WarningsPPC CodeGenPPC DisassemblerPPC LinkerPPC PEFPPC ProjectPPCAsm PanelRez CompilerFTP PanelPPC Global OptimizerSource TreesDebugger RuntimePerl PanelMW Perl:Dime.outBase.cppBasic.cppInput.cppLayer.cppModel.cppOutput.cppRecordHolder.cppState.cppClass.cppUnknownClass.cpp3DFace.cppArc.cppBlock.cppCircle.cppEllipse.cppEntity.cppExtrusionEntity.cppFaceEntity.cppInsert.cppLine.cppLWPolyline.cppPoint.cppPolyline.cppSolid.cppSpline.cppTrace.cppUnknownEntity.cppVertex.cppObject.cppUnknownObject.cppDoubleRecord.cppFloatRecord.cppHexRecord.cppInt16Record.cppInt32Record.cppInt8Record.cppRecord.cppStringRecord.cppBlocksSection.cppClassesSection.cppEntitiesSection.cppHeaderSection.cppObjectsSection.cppSection.cppTablesSection.cppUnknownSection.cppLayerTable.cppTable.cppTableEntry.cppUCSTable.cppUnknownTable.cppArray.cppBox.cppBSPTree.cppDict.cppLinear.cppMemHandler.cppDimeLibrarystrdup.c:DimeLib:dime.lib::dime.libd—'+).50 #–Y•=?>";9B(,*/1 $!%eZ[8f€ŽEGHgbAVF“xh‚ijkD7yS6ƒ -z\l{|}I]ˆm‘n@&’^42  3Xv„_JK WopLMTNOP<Q~`R…qUra:”‰Š†Cs‹ctw‡Œu__initialize__start__terminate NONAME.EXE@  ³èAbÿÿÒÏ JavaClasses.zipZIP JAVA !M\ ( J°7OlFS`lin r ’ Ÿ €·ÊþàdãbjdýÑÿÿÿ*objd@O\ÿÿj‡obqpt‚‘¡lace¯=g¼Ä× ÿé!ÿ"#½$$ÿÿôà1%F&ë ['t(¥0ˆ)@›*Jav¯+.zipÂ,Ö-é.ë÷/ 0ut"182M3]4r5APPL…6GXckž7PC±8 ¡Ã9 Ö:ë;½%°ÿ<ÿÿô¼=+>ë:?n@ A±BÁCÎDÞEìFùG HI'J4KDLTM`NqO|P„QRSªT´UÉVÖWçXòYúZ[ \]!^+_5`@aQb[cedvef‰g“hžiªjµkÉlØmãnìoûpqrs't1uCvNwYxky|zŒ{š|ª}º~ÉÔ€å÷‚ ƒ„0…C†O‡aˆt‰ƒŠ‹œŒ©ºŽÄÌØ‘á’ì“û” • – — #˜”˜³è=ÀÿÿÔRROOTGRUP DIME SourcesFILELFILEMFILENFILEOFILEPFILEQFILERFILESGRUPclassesFILETFILEUGRUPentitiesFILEVFILEWFILEXFILEYFILEZFILE[FILE\FILE]FILE^FILE_FILE`FILEaFILEbFILEcFILEdFILEeFILEfFILEgGRUPobjectsFILEhFILEiGRUPrecordsFILEjFILEkFILElFILEmFILEnFILEoFILEpFILEqGRUPsectionsFILErFILEsFILEtFILEuFILEvFILEwFILExFILEyGRUPtablesFILEzFILE{FILE|FILE}FILE~GRUPutilFILEFILE€FILEFILE‚FILEƒFILE„ap”¾ ßS?"> ">€(>’P  !"#$%&'()*+,-./0123456789LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…MSIEInternet ExplorerIexplore.exe NONAME.EXE@U {LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„ MacOS PPC LinkerDimeLibraryConsole::4JavaClasses.zipMSIEInternet ExplorerIexplore.exe a.out@U {MSIEInternet ExplorerIexplore.exe a.out@U {MSIEInternet ExplorerIexplore.exe a.out@U {#CshPf 0‡ Add§PinRÆaPoiêMIte tRes' MenuI tConk Cont… oseC¥illCÄShowäHideÿMove$GetCGetCRjzeCo‰lite­GetCËtCTiætlVainCt%Ctl Elue gl Se†Test¤DragÃTracÕ Draö!€"nded5#istT$ àr%&±'Í(ê)  **+ —B,d$`-}.›/shP´0 0×1 Addø2PinR3aPoi64MIteX5tRest6Menu7tConª8ContÈ9oseCæ:illC;Show#GetC}?etCR›@zeCo¼A€ÛBGetCùCtCTiDtlVa8EinCtTFCtl qGlue ‘Hl Se±ITestÉJDragçKTrac L Dra "M ;N ^O P  Q ½R ßS ûT U 1V OW mXKeys Y ªZImpo Æ[PW I ã\KBa ]lpM "^68K C_l 68 b`F Im €a€ bnded ¿cist ÛdTarg øect D fSett 8g Set PheSaf ni@ ‹j ©k Âl åm në` 'o L DpÒ%sÓ fqg: Ò ‚rë ›sANSI ¸t 68k ÖuKeyw ôvI Cowk:Ac1xhsAMyole jzet S{ANSI­| 68kÐ}ppinñ~ConsBuil0€ANSTr‚‘ƒ³„Յ4ˆW‰zŠ™‹½ŒÛöŽ5U‘x’˜“»”Ü•ü–—?˜]™|šž›ÀœÚúžŸB e¡„¢¨£Ƥᥦ §@¨c©ƒª¦«Ǭç­®*¯H°g±‰²«³Å´åµ ¶-·P¸o¹“º±»̼ë½ ¾+¿PÀrÁ—ºÃÜÄýÅ#ÆCÇdȈɬÊÈËêÌÍ6Î[Ï|ТÑÂÒßÓÔ"ÕDÖi׋ذÙÓÚõÛÜ<Ý\Þ}ß¡àÅááâã*äOåtæ•ç»èÛéøêë;ì]í~î ï½ðáñò"óCôdõ†ö£÷Çøèùú)ûMüný’þ´ÿÕõ  4 Y x ˜ » Þ ù ! !: ![ !w !!Á!å""*"I"e"…"¦"Ç"ê# #)#I#m#Ž#²#Ô#õ $!$:"$Y#$y$$œ%$¿&$Ú'$û(%)%<*%X+%~,%¢-%Æ.%æ/& 0&*1&F2&f3&‡4&¨5&Ë6&ë7' 8'*9'L:'p;'Ž<'²='Û>(?(-@(NA(sB(™C(ÁD(àE) F)"G)>H)WI)sJ)K)¦L)ÃM)ßN)÷O*P*5Q*LR*dS*T*šU*­V*ÃW*áX*ûY+Z+3[+L\+h]+†^+ž_+»`+Üa+ób,c,d,8e,Qf @ :ÿÿÿÿ@::src:ÿÿÿÿ@::include:ÿÿÿÿ:MSL:werks Standard Library:MSL Precompiled Header:ÿÿÿÿ@:MacOS Support:ÿÿÿÿ@§› §¤0§’ÀMSIEhttp://java.sun.com/products/jdk/1.1/docs/api/FILEFILEFILEFILEFILEFILEFILEFILEFILEFILEGRUPutilFILEEFILEFFILEGFILEHFILEIFILEJJñÀfÀPH§ÐßRàetrowerks:CWJñÀANSI Console Multi:Custom KeywordsANSI Console Multi:Access PathsANSI Console Multi:Target SettingsANSI Console Multi:File MappingsANSI Console Multi:Build ExtrasANSI Console Multi:68K CodeGenANSI Console Multi:68K DisassemblerANSI Console Multi:68K LinkerANSI Console Multi:68K ProjectANSI Console Multi:C/C++ CompilerANSI Console Multi:C/C++ WarningsANSI Console Multi:CFM68KANSI Console Multi:IR OptimizerANSI Console Multi:Java OutputANSI Console Multi:Java ProjectANSI Console Multi:Java VMANSI Console Multi:MacOS Merge PanelANSI Console Multi:Pascal CompilerANSI Console Multi:Pascal WarningsANSI Console Multi:PPC CodeGenANSI Console Multi:PPC DisassemblerANSI Console Multi:PPC LinkerANSI Console Multi:PPC PEFANSI Console Multi:PPC ProjectANSI Console Multi:PPCAsm PanelANSI Console Multi:Rez CompilerANSI Console Multi:WinRC CompilerANSI Console Multi:x86 CodeGenANSI Console Multi:x86 LinkerANSI Console Multi:x86 ProjectProject File ListANSI Console 68k:Custom KeywordsANSI Console 68k:Access PathsANSI Console 68k:Target SettingsANSI Console 68k:File MappingsANSI Console 68k:Build ExtrasANSI Console 68k:68K CodeGenANSI Console 68k:68K DisassemblerANSI Console 68k:68K LinkerANSI Console 68k:68K ProjectANSI Console 68k:C/C++ CompilerANSI Console 68k:C/C++ WarningsANSI Console 68k:CFM68KANSI Console 68k:IR OptimizerANSI Console 68k:Java OutputANSI Console 68k:Java ProjectANSI Console 68k:Java VMANSI Console 68k:MacOS Merge PanelANSI Console 68k:Pascal CompilerANSI Console 68k:Pascal WarningsANSI Console 68k:PPC CodeGenANSI Console 68k:PPC DisassemblerANSI Console 68k:PPC LinkerANSI Console 68k:PPC PEFANSI Console 68k:PPC ProjectANSI Console 68k:PPCAsm PanelANSI Console 68k:Rez CompilerANSI Console 68k:WinRC CompilerANSI Console 68k:x86 CodeGenANSI Console 68k:x86 LinkerANSI Console 68k:x86 ProjectANSI Console PPC:Custom KeywordsANSI Console PPC:Access PathsANSI Console PPC:Target SettingsANSI Console PPC:File MappingsANSI Console PPC:Build ExtrasANSI Console PPC:68K CodeGenANSI Console PPC:68K DisassemblerANSI Console PPC:68K LinkerANSI Console PPC:68K ProjectANSI Console PPC:C/C++ CompilerANSI Console PPC:C/C++ WarningsANSI Console PPC:CFM68KANSI Console PPC:IR OptimizerANSI Console PPC:Java OutputANSI Console PPC:Java ProjectANSI Console PPC:Java VMANSI Console PPC:MacOS Merge PanelANSI Console PPC:Pascal CompilerANSI Console PPC:Pascal WarningsANSI Console PPC:PPC CodeGenANSI Console PPC:PPC DisassemblerANSI Console PPC:PPC LinkerANSI Console PPC:PPC PEFANSI Console PPC:PPC ProjectANSI Console PPC:PPCAsm PanelANSI Console PPC:Rez CompilerANSI Console PPC:WinRC CompilerANSI Console PPC:x86 CodeGenANSI Console PPC:x86 LinkerANSI Console PPC:x86 ProjectANSI Console FAT:Custom KeywordsANSI Console FAT:Access PathsANSI Console FAT:Target SettingsANSI Console FAT:File MappingsANSI Console FAT:Build ExtrasANSI Console FAT:68K CodeGenANSI Console FAT:68K DisassemblerANSI Console FAT:68K LinkerANSI Console FAT:68K ProjectANSI Console FAT:C/C++ CompilerANSI Console FAT:C/C++ WarningsANSI Console FAT:CFM68KANSI Console FAT:IR OptimizerANSI Console FAT:Java OutputANSI Console FAT:Java ProjectANSI Console FAT:Java VMANSI Console FAT:MacOS Merge PanelANSI Console FAT:Pascal CompilerANSI Console FAT:Pascal WarningsANSI Console FAT:PPC CodeGenANSI Console FAT:PPC DisassemblerANSI Console FAT:PPC LinkerANSI Console FAT:PPC PEFANSI Console FAT:PPC ProjectANSI Console FAT:PPCAsm PanelANSI Console FAT:Rez CompilerANSI Console FAT:WinRC CompilerANSI Console FAT:x86 CodeGenANSI Console FAT:x86 LinkerANSI Console FAT:x86 ProjectANSI C Console 68k:Custom KeywordsANSI C Console 68k:Access PathsANSI C Console 68k:Target SettingsANSI C Console 68k:File MappingsANSI C Console 68k:Build ExtrasANSI C Console 68k:68K CodeGenANSI C Console 68k:68K DisassemblerANSI C Console 68k:68K LinkerANSI C Console 68k:68K ProjectANSI C Console 68k:C/C++ CompilerANSI C Console 68k:C/C++ WarningsANSI C Console 68k:CFM68KANSI C Console 68k:IR OptimizerANSI C Console 68k:MacOS Merge PanelANSI C Console 68k:Pascal CompilerANSI C Console 68k:Pascal WarningsANSI C Console 68k:PPC CodeGenANSI C Console 68k:PPC DisassemblerANSI C Console 68k:PPC LinkerANSI C Console 68k:PPC PEFANSI C Console 68k:PPC ProjectANSI C Console 68k:PPCAsm PanelANSI C Console 68k:Rez CompilerANSI C Console PPC:Custom KeywordsANSI C Console PPC:Access PathsANSI C Console PPC:Target SettingsANSI C Console PPC:File MappingsANSI C Console PPC:Build ExtrasANSI C Console PPC:68K CodeGenANSI C Console PPC:68K DisassemblerANSI C Console PPC:68K LinkerANSI C Console PPC:68K ProjectANSI C Console PPC:C/C++ CompilerANSI C Console PPC:C/C++ WarningsANSI C Console PPC:CFM68KANSI C Console PPC:IR OptimizerANSI C Console PPC:MacOS Merge PanelANSI C Console PPC:Pascal CompilerANSI C Console PPC:Pascal WarningsANSI C Console PPC:PPC CodeGenANSI C Console PPC:PPC DisassemblerANSI C Console PPC:PPC LinkerANSI C Console PPC:PPC PEFANSI C Console PPC:PPC ProjectANSI C Console PPC:PPCAsm PanelANSI C Console PPC:Rez CompilerANSI C Console FAT:Custom KeywordsANSI C Console FAT:Access PathsANSI C Console FAT:Target SettingsANSI C Console FAT:File MappingsANSI C Console FAT:Build ExtrasANSI C Console FAT:68K CodeGenANSI C Console FAT:68K DisassemblerANSI C Console FAT:68K LinkerANSI C Console FAT:68K ProjectANSI C Console FAT:C/C++ CompilerANSI C Console FAT:C/C++ WarningsANSI C Console FAT:CFM68KANSI C Console FAT:IR OptimizerANSI C Console FAT:MacOS Merge PanelANSI C Console FAT:Pascal CompilerANSI C Console FAT:Pascal WarningsANSI C Console FAT:PPC CodeGenANSI C Console FAT:PPC DisassemblerANSI C Console FAT:PPC LinkerANSI C Console FAT:PPC PEFANSI C Console FAT:PPC ProjectANSI C Console FAT:PPCAsm PanelANSI C Console FAT:Rez CompilerANSI C++ Console 68k:Custom KeywordsANSI C++ Console 68k:Access PathsANSI C++ Console 68k:Target SettingsANSI C++ Console 68k:File MappingsANSI C++ Console 68k:Build ExtrasANSI C++ Console 68k:68K CodeGenANSI C++ Console 68k:68K DisassemblerANSI C++ Console 68k:68K LinkerANSI C++ Console 68k:68K ProjectANSI C++ Console 68k:C/C++ CompilerANSI C++ Console 68k:C/C++ WarningsANSI C++ Console 68k:CFM68KANSI C++ Console 68k:IR OptimizerANSI C++ Console 68k:MacOS Merge PanelANSI C++ Console 68k:Pascal CompilerANSI C++ Console 68k:Pascal WarningsANSI C++ Console 68k:PPC CodeGenANSI C++ Console 68k:PPC DisassemblerANSI C++ Console 68k:PPC LinkerANSI C++ Console 68k:PPC PEFANSI C++ Console 68k:PPC ProjectANSI C++ Console 68k:PPCAsm PanelANSI C++ Console 68k:Rez CompilerANSI C++ Console PPC:Custom KeywordsANSI C++ Console PPC:Access PathsANSI C++ Console PPC:Target SettingsANSI C++ Console PPC:File MappingsANSI C++ Console PPC:Build ExtrasANSI C++ Console PPC:68K CodeGenANSI C++ Console PPC:68K DisassemblerANSI C++ Console PPC:68K LinkerANSI C++ Console PPC:68K ProjectANSI C++ Console PPC:C/C++ CompilerANSI C++ Console PPC:C/C++ WarningsANSI C++ Console PPC:CFM68KANSI C++ Console PPC:IR OptimizerANSI C++ Console PPC:MacOS Merge PanelANSI C++ Console PPC:Pascal CompilerANSI C++ Console PPC:Pascal WarningsANSI C++ Console PPC:PPC CodeGenANSI C++ Console PPC:PPC DisassemblerANSI C++ Console PPC:PPC LinkerANSI C++ Console PPC:PPC PEFANSI C++ Console PPC:PPC ProjectANSI C++ Console PPC:PPCAsm PanelANSI C++ Console PPC:Rez CompilerANSI C++ Console 68k:Java OutputANSI C++ Console 68k:Java ProjectANSI C++ Console 68k:Java VMANSI C++ Console 68k:WinRC CompilerANSI C++ Console 68k:x86 CodeGenANSI C++ Console 68k:x86 LinkerANSI C++ Console 68k:x86 ProjectANSI C++ Console PPC:Java OutputANSI C++ Console PPC:Java ProjectANSI C++ Console PPC:Java VMANSI C++ Console PPC:WinRC CompilerANSI C++ Console PPC:x86 CodeGenANSI C++ Console PPC:x86 LinkerANSI C++ Console PPC:x86 ProjectStd C++ Console PPC:Custom KeywordsStd C++ Console PPC:Access PathsStd C++ Console PPC:Target SettingsStd C++ Console PPC:File MappingsStd C++ Console PPC:Build ExtrasStd C++ Console PPC:Bison PanelStd C++ Console PPC:Flex PanelStd C++ Console PPC:68K CodeGenStd C++ Console PPC:68K DisassemblerStd C++ Console PPC:68K LinkerStd C++ Console PPC:68K ProjectStd C++ Console PPC:C/C++ CompilerStd C++ Console PPC:C/C++ WarningsStd C++ Console PPC:CFM68KStd C++ Console PPC:IR OptimizerStd C++ Console PPC:Java OutputStd C++ Console PPC:Java ProjectStd C++ Console PPC:Java VMStd C++ Console PPC:MacOS Merge PanelStd C++ Console PPC:Pascal CompilerStd C++ Console PPC:Pascal WarningsStd C++ Console PPC:PPC CodeGenStd C++ Console PPC:PPC DisassemblerStd C++ Console PPC:PPC LinkerStd C++ Console PPC:PPC PEFStd C++ Console PPC:PPC ProjectStd C++ Console PPC:PPCAsm PanelStd C++ Console PPC:Rez CompilerStd C++ Console PPC:WinRC CompilerStd C++ Console PPC:x86 CodeGenStd C++ Console PPC:x86 LinkerStd C++ Console PPC:x86 ProjectPPC Std C++ Console:Custom KeywordsPPC Std C++ Console:Access PathsPPC Std C++ Console:Target SettingsPPC Std C++ Console:File MappingsPPC Std C++ Console:Build ExtrasPPC Std C++ Console:68K CodeGenPPC Std C++ Console:68K DisassemblerPPC Std C++ Console:68K LinkerPPC Std C++ Console:68K ProjectPPC Std C++ Console:C/C++ CompilerPPC Std C++ Console:C/C++ WarningsPPC Std C++ Console:CFM68KPPC Std C++ Console:IR OptimizerPPC Std C++ Console:Java OutputPPC Std C++ Console:Java ProjectPPC Std C++ Console:Java VMPPC Std C++ Console:MacOS Merge PanelPPC Std C++ Console:Pascal CompilerPPC Std C++ Console:Pascal WarningsPPC Std C++ Console:PPC CodeGenPPC Std C++ Console:PPC DisassemblerPPC Std C++ Console:PPC LinkerPPC Std C++ Console:PPC PEFPPC Std C++ Console:PPC ProjectPPC Std C++ Console:PPCAsm PanelPPC Std C++ Console:Rez CompilerPPC Std C++ Console:WinRC CompilerPPC Std C++ Console:x86 CodeGenPPC Std C++ Console:x86 LinkerPPC Std C++ Console:x86 ProjectPPC Std C++ Console:Java LanguagePPC Std C++ Console:Debugger TargetPPC Std C++ Console:FTP PanelPPC Std C++ Console:JavaDoc ProjectPPC Std C++ Console:x86 Exceptions PanelPPC Std C++ Console:68K Global OptimizerPPC Std C++ Console:PPC Global OptimizerPPC Std C++ Console:Source TreesPPC Std C++ Console:Debugger RuntimePPC Std C++ Console:Java Command LinePPC Std C++ Console:Java MacOS SettingsPPC Std C++ Console:Perl PanelPPC Std C++ Console:x86 Global OptimizerDimeLibrary:Source TreesDimeLibrary:Custom KeywordsDimeLibrary:Access PathsDimeLibrary:Target SettingsDimeLibrary:File MappingsDimeLibrary:Build ExtrasDimeLibrary:Debugger RuntimeDimeLibrary:Debugger TargetDimeLibrary:68K CodeGenDimeLibrary:68K DisassemblerDimeLibrary:68K Global OptimizerDimeLibrary:68K LinkerDimeLibrary:68K ProjectDimeLibrary:C/C++ CompilerDimeLibrary:C/C++ WarningsDimeLibrary:CFM68KDimeLibrary:FTP PanelDimeLibrary:Java Command LineDimeLibrary:Java LanguageDimeLibrary:Java MacOS SettingsDimeLibrary:Java OutputDimeLibrary:Java ProjectDimeLibrary:JavaDoc ProjectDimeLibrary:MacOS Merge PanelDimeLibrary:PPC CodeGenDimeLibrary:PPC DisassemblerDimeLibrary:PPC Global OptimizerDimeLibrary:PPC LinkerDimeLibrary:PPC PEFDimeLibrary:PPC ProjectDimeLibrary:PPCAsm PanelDimeLibrary:Rez CompilerDimeLibrary:Perl Panel JBoundApp????ÿÿÿÿÿÿWINDnull MSIEInternet ExplorererIexplore.exeoreruJITP'CODE' 'DATA' 'PICT'è 3*È 36à 4G@ 5Ëà _0 3*ˆ 3*€ 4G` 5Ìk)"ð _0 3*P 3*H 36È 4G@ 3*0 36¸ 378 37 37 37 37 36ø 36ð 5ÎÔ 5Ìø*java_lang_Throwable!com_mw_tree_LocalMemberCopiedInlinel| 5ÌŽ 5Ìd<€>6 5Ìl 31 5̼ 3mX 3mh 3Lø 3m` 3 3Lè 3jà 3jØ 3jÐ 3jÈ 3jÀ 3˜ 3 30ø 3 3ˆ 3€ 3x 3p 3h 3` 3X 3P 3H 3@ 38 30 3( 3 3 3 3 3 3ø 30¸ 3è 3à 3Ø 3Ð 3È 3À 3¸ 3° 3¨ 3  3ˆ 3€ 3x 3p 3h 3` 3X 3P 3H 3@ 38 30 3( 3 3 3 3 3 3ø 3ð 3è 3à 3Ø 3Ð 3È 3À 3¸ 30è 30€ 30x 3˜ 3ˆ 3€ 31 30ð 30à 30Ø 30Ð 30È 30À 30° 30¨ 30  30˜ 31 30ˆ 30p 30h 30`com_mw_tree_LocalMember,| 5Îx 4øˆ8€>4 5Ìd 30X 5Θ 3mX 3mh 3Lø 3m` 3 3Lè 3jà 3jØ 3jÐ 3jÈ 3jÀ 3˜ 3 30ø 3 3ˆ 3€ 3x 3p 3h 3` 3X 3P 3H 3@ 38 30 3( 3 3 3 3 3 3ø 30¸ 3è 3à 3Ø 3Ð 3È 3À 3¸ 3° 3¨ 3  3ˆ 3€ 3x 3p 3h 3` 3X 3P 3H 3@ 38 30 3( 3 3 3 3 3 3ø 3ð 3è 3à 3Ø 3Ð 3ROOTGRUP DIME SourcesFILELFILEMFILENFILEOFILEPFILEQFILERFILESGRUPclassesFILETFILEUGRUPentitiesFILEVFILEWFILEXFILEYFILEZFILE[FILE\FILE]FILE^FILE_FILE`FILEaFILEbFILEcFILEdFILEeFILEfFILEgGRUPobjectsFILEhFILEiGRUPrecordsFILEjFILEkFILElFILEmFILEnFILEoFILEpFILEqGRUPsectionsFILErFILEsFILEtFILEuFILEvFILEwFILExFILEyGRUPtablesFILEzFILE{FILE|FILE}FILE~GRUPutilFILEFILE€FILEFILE‚FILEƒFILE„GRUPstrdupFILE…ÆÆ @ ÈèlÿÿüTT*Tÿû ƽÿTüüTT*Tÿûa.sun.com/products/jdk/1.1/docs/api/ЪPÐÃðÿÛàЪPÐÄk.† ÿÛÀЪPhttp://java.sun.com/products/jdk/1.1/docs/api/ )Aï"S0<ÄÐÀ.DÿÛÀaÿ%®0UOЪP<aÿ%š0UO/ Hx B'aÿ%ˆ0UO/ HxJ/ VÀDIÀ/aÿ&¶0UO/ HxJ/ VÀDIÀ/aÿ&š0UO/ HxJ/VÀDIÀ/aÿ&~0UO/ HxJ/VÀDIÀ/aÿ&b0UO/ HxJ/VÀDIÀ/aÿ&F0UO/ HxJ/VÀDIÀ/aÿ&*0UO/ Hx J/VÀDIÀ/aÿ&0HW//aÿ,|/ HxHoaÿ'b0/ Hx?/NºþVHÀTO/aÿ%Ô0HoHoaÿ+/ HxNoneMMPr@TEXT.cRunTSScriptTEXT.plMW Perl€Java Linker .auJAR Importer@ .gifJAR Importer@RSRC`TEXT.cRunTSScriptTEXT.htmlTEXT.javaMW JavaTEXT.mfTEXT.plMW Perl€rsrc`.classMW Java.zipMW JavaMacOS 68K LinkerAPPL`Appl`MMLBLib Import 68KMPLFLib Import 68KMWCD`OBJ MPW Import 68KPLob`RSRC`TEXT.bhBalloon HelpTEXT.cMW C/C++ 68KTEXT.c++MW C/C++ 68KTEXT.ccMW C/C++ 68KTEXT.cpMW C/C++ 68KTEXT.cppMW C/C++ 68KTEXT.expTEXT.hMW C/C++ 68KTEXT.pchMW C/C++ 68K€TEXT.pch++MW C/C++ 68K€TEXT.plMW Perl€TEXT.rRezTEXT.segdocu`rsrc`shlbPEF Import 68KstubPEF Import 68K.docP.oMPW Import 68K.ppob`.rsrc`MacOS Merge APPL`Appl`RSRC`TEXT.bhBalloon HelpTEXT.cRunTSScriptTEXT.plMW Perl€TEXT.rRezrsrc`shlbMacOS PPC LinkerAPPL`Appl`MMLBLib Import PPCMPLFLib Import PPCMWCD`RSRC`TEXT.arrTEXT.bhBalloon HelpTEXT.cMW C/C++ PPCTEXT.c++MW C/C++ PPCTEXT.ccMW C/C++ PPCTEXT.cpMW C/C++ PPCTEXT.cppMW C/C++ PPCTEXT.expTEXT.hMW C/C++ PPCTEXT.pchMW C/C++ PPC€TEXT.pch++MW C/C++ PPC€TEXT.plMW Perl€TEXT.rRezTEXT.sPPCAsmXCOFXCOFF Import PPCdocu`rsrc`shlbPEF Import PPCstubPEF Import PPC.docP.oXCOFF Import PPC.ppob`.rsrc`Win32 x86 Linker????Obj Import x86TEXT.cMW C/C++ x86TEXT.c++MW C/C++ x86TEXT.ccMW C/C++ x86TEXT.cpMW C/C++ x86TEXT.cppMW C/C++ x86TEXT.defTEXT.hMW C/C++ x86TEXT.h++MW C/C++ x86TEXT.hppMW C/C++ x86TEXT.ordTEXT.pchMW C/C++ x86€TEXT.pch++MW C/C++ x86€TEXT.plMW Perl€TEXT.rcMW WinRCTEXT.resWinRes ImportiLIBLib Import x86iOBJObj Import x86.aLib Import x86.docP.libLib Import x86.oObj Import x86.objObj Import x86L[M\N]O^P_Q`RaSbTcUdVeWfXgYhZi[j\k]l^m_n`oapbqcrdsetfugvhwixjykzl{m|n}o~pq€rs‚tƒu„v…w†x‡yˆz‰{Š|‹}Œ~Ž€‚‘ƒ’„“…•‚Y0mstrSmstl(mstn((msti´ mstrè&^€mstlè´€mstnèP(mstiè!Æ,mpsiè-ÞmtglèÅPLstí¬T.pref̹-I Ipref»A.pref±}/MT$prefÿ):Œ prefÛO;Mx’pref4Ú<N Jpref¨z= ô mtslì_ Ømtpl2ºümtpscmtpi3¶èmtloC†.prefËVKC´IprefnLGýpref¼ÎMH$prefëXH% pref`GYH/’prefôZHÁJprefT.[Ù.prefƒÑiNTIprefjÍpref~DkR$prefˆUvª prefVÄwRÁ’pref%hxSSJpref—cy%ž.pref Çí4ÎIpref‹0îÑpref‚ï!¢$preftð# prefïùñ%Ì’pref$Šò9Jpref&+ó Àpref3 pref°± ä prefOpref¡æS Òprefù³T4Úpref|¨Uu54prefú¯VxiprefÝW#òpref‘øX²Y\pref4¼Y ý2prefPUZ·µPpreföâ[}qpref\G\ /bpref9¾] ‘prefÞ ^ ¥ prefþß_ ¯ prefa` ÎÄpref•ßa€…prefX;b ,¨prefœ~c.pref8sd¿ prefù|eÁpref4´fdime/contrib/dxf2vrml.dsw0100644017777301777730000000107106763254773014242 0ustar wwwwwwMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! ############################################################################### Project: "dxf2vrml"=".\dxf2vrml.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### dime/contrib/dxf2vrml.mcp0100644017777301777730000022314406763254773014233 0ustar wwwwwwcool(ì PnCodeWarrior ProjectH`LXPHG€`!M\ ( J°7OlFS`lin r ’ Ÿ €·ÊþàdãbjdýÑÿÿÿ*objd@O\ÿÿj‡obqpt‚‘¡lace¯=g¼Ä× ÿé!ÿ"#½$$ÿÿôà1%F&ë ['t(¥0ˆ)@›*Jav¯+.zipÂ,Ö-é.ë÷/ 0ut"182M3c4x5APPL’6GXck«7PCÅ8 ¡Þ9 ø:;½%°)<ÿÿô¼A=T>ëf?y@’AªBÃCÛDôE F$G<HPIeJxKL MÅNåOP&QCRTSdTqUVWœX¬Y»ZÊ[Ô\á]ñ^_ `a)b1c=dJeWflgyhŠi•jk¦l¯m¼nÐoÙpãqòrýs tt€ t Ј0kЈ5@?¨‡UOo ÿÿÿÿ P ROOTGRUPSourcesFILEGRUP LibrariesFILE FILEFILEFILEFILE FILE FILE@ Èèlu want to re Æà the object code from this targe   JavaClasses.jarZIP MWZP Merge Out????APPLDLGXckidProjWSPCGR   DLGXckidProjWSPCJavaClasses.zipZIP JAVAJavaClasses.zip__sta__start   JavaClasses.zipZIP JAVAJavaClasses.zipEs'+).20486 #JKPorOLMN"?CAS(,*/31597 $!%>VXYRgWjnlqpU=Z< -[QG&HI  :;mi\] h^_e`abFcdf@DBkT  ³è?gÿÿøµot³è?U3ÿ Std C++ SIOUX-WASTE 68K????APPLXÀ????U {dxf2vrml97OUX-WASTE PPC????APPL@XÀ????JÃÔHÝŒ ˜` Àð §` ˜` à  ¡  ¡JavaClasses.zipZIP JAVAÂÃÄžÁÆÇȽÀÉÊËÌÍÎÏÐÑÒÓÔÕÖ¿×ØÙÚ~€z}‚ƒ„y|…†‡ˆ‰Š‹ŒŽ{¬­®¯¨«°±²§ª³úûü´µ¶·¸¹º»¼½©ýþÿ•–—˜‘”™š›“œžŸ ¡¢£¤¥¦’ÃÄÅÆ¿ÂÇÈɾÁÊìíîËÌÍÎÏÐÑÒÓÔÀïðñò     ÚÛÜÝÖÙÞßàÕØáóôõâãäåæçèéêë×ö÷øù !"#$%&'()*+,-.KLMNGJOPQFIRSTUVWXYZ[\H45670389:/2;<=>?@ABCDE1$%&' #()*"+,-./012345678!9:;<`abc\_def[^ghijklmnopqrst]uvwx  BCDE>AFGH=@IJKLMNOPQRSTUV?WXYZ/0123),456(-.+789:;<=>?@ABCDEFG'*     !"#$%& àáþâãÜßäåæÛúÞûçùèéêüëìíîïÿðñòóôÝõöý÷ødefg^bahij]`cklmnopqrstuvwx_yz{|¤¥¦§ž¢¡¨©ª £«¬­®¯°±²³´µ¶·¸Ÿ¹º»¼„…†‡~‚ˆ‰Š}€ƒ‹ŒŽ‘’“”•–—˜™š›œU { NONAME.EXE@U {   NONAME.EXE@U {MSIEInternet ExplorerIexplore.exe  NONAME.EXE@U {MSIEInternet ExplorerIexplore.exeMSIEInternet ExplorerIexplore.exe__startdxf2vrmlSIOUX-WASTE PPC????APPL@XÀ????34JavaClasses.zipMSIEInternet ExplorerIexplore.exe a.out@U {MSIEInternet ExplorerIexplore.exe a.out@U {   k mqebug‰ÿÿÿÿCPor­ortËap DæÿÿÿÿMap %ix NEisÿÿÿÿat C†t Pe¤BackÃÿÿÿÿetPiä eRGB!€#"ÿÿÿÿB#`$}% ÿÿÿÿ& »'Ø(øÿÿÿÿ*0+N,ÿÿÿÿk-@‰. ¢/ÿÿÿÿ0æ12ë$ÿÿÿÿF4b5@{6ÿÿÿÿ˜7¶8Ô9ÿÿÿÿ:k;-< àÿÿÿÿ ¡ëÿÿÿÿ ž@k §`ce NewGDevic àosÿÿÿÿvice SetGDevice GetGDevice Colorndÿÿÿÿndex2Color InvertColor RealColoretÿÿÿÿable UpdatePixMap MakeITable AddarÿÿÿÿddComp SetClientID ProtectEntry seÿÿÿÿntry SetEntriesQDError SetWinCor ÿÿÿÿuxWin SetCtlColo ¡Pë aÔ°ÿÿÿÿetNe à ¢Pë aÈ Qÿÿÿÿ ¢pkÀ §`~ÿ_34 ¡P`ÿÿÿÿ|}ÿa4{|}ÿb34ANSI Console MultiFirst Segment:a.outLib Import 68KMPW Import 68KBalloon HelpMW C/C++ 68KMW Pascal 68KRezPEF Import 68KANSI Console 68kHelloWorld.cMSL C.68K Fa(4i_8d).LibMSL Runtime68K.LibMathLib68K Fa(4i/8d).LibMSL C++.68K Fa(4i_8d).LibMacOS.libMSL SIOUX.68K.LibANSI Console PPC:ANSI Console PPC.outLib Import PPCMW C/C++ PPCMW Pascal PPCPPCAsmXCOFF Import PPCPEF Import PPCMSL C++.PPC.LibMSL C.PPC.LibInterfaceLibMathLibMSL RuntimePPC.LibMSL SIOUX.PPC.Lib:ANSI Console 68k.outANSI Console FAT:Merge Out:ANSI Console FAT.outANSI Console 68k.outANSI Console PPC.outMathLib68K Fa(4i_8d).Lib:ANSI C Console 68kANSI C Console 68k:ANSI C Console PPCANSI C Console PPC:ANSI C Console FATANSI C Console FATHelloWorld.cp:ANSI C++ Console 68kANSI C++ Console 68k:ANSI C++ Console PPCANSI C++ Console PPC:ANSI C++ Console FATANSI C++ Console FAT:ANSI C++ SIOUX-WASTE 68kANSI C++ SIOUX-WASTE 68k:ANSI C++ SIOUX-WASTE PPCANSI C++ SIOUX-WASTE PPC:ANSI C++ SIOUX-WASTE FATANSI C++ SIOUX-WASTE FATMSL SIOUX_WASTE.68K.LibMSL SIOUX_WASTE.PPC.LibGameCode ConverterFlex PreprocessorBison Preprocessor:Std C++ SIOUX-WASTE 68KStd C++ SIOUX-WASTE 68K:Std C++ SIOUX-WASTE PPCStd C++ SIOUX-WASTE PPC:Std C++ SIOUX-WASTE FATStd C++ SIOUX-WASTE FAT68K Std C++ SIOUX-WASTEPPC Std C++ SIOUX-WASTEMathLib68K (2i).LibMSL C++.68K (2i).LibMSL C.68K (2i).Lib:Bin:MSL C++.PPC.Lib:Bin:MSL C.PPC.Lib:Libraries:MacOS Common:InterfaceLib:Libraries:MacOS Common:MathLib:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib:HelloWorld.cp:Bin:MSL SIOUX_WASTE.PPC.LibMacOS PPC LinkerCustom KeywordsAccess PathsTarget SettingsFile MappingsBuild ExtrasDebugger TargetC/C++ CompilerC/C++ WarningsFTP PanelIR OptimizerPascal CompilerPascal WarningsPPC CodeGenPPC DisassemblerPPC LinkerPPC PEFPPC ProjectPPCAsm PanelRez CompilerPPC Global OptimizerSource TreesDebugger RuntimePerl PanelMW Perldime.libstrdup.cdxf2vrml.cppMSL StdCRuntime.Libdxf2vrml:dxf2vrmldxf2vrml97.cppdxf2vrml97:dxf2vrml97::dxf2vrml MacOS PPC Linkerdxf2vrml SIOUX-WASTE:: NONAME.EXE@JÃÔHÝŒ ˜` Àð §` ˜` à  ¡gST U VWhXY Zi_`fabcdeientID ProtectEntry seÿÿÿÿntry SetEntriesQDError SetWinCor ÿÿÿÿuxWin SetCtlColo ¡Pë aÔ°ÿÿÿÿetNe à ¢Pë aÈ Qÿÿÿÿ ¢pkÀ §`~ÿ_34 ¡P`ÿÿÿÿ|}ÿa4{|}ÿb34  @:ÿÿÿÿ@:::ments:Web Pages:VRML:Tools:dime-0.9.1:ÿÿÿÿ:::include:b Pages:VRML:Tools:dime-0.9.1:include:ÿÿÿÿ:MSL:werks Standard Library:MSL Precompiled Header:ÿÿÿÿ@:MacOS Support:ÿÿÿÿ@MSIEhttp://java.sun.com/products/jdk/1.1/docs/api/de@MSIEInternet ExplorerIexplore.exe a.out@U {ANSI Console Multi:Custom KeywordsANSI Console Multi:Access PathsANSI Console Multi:Target SettingsANSI Console Multi:File MappingsANSI Console Multi:Build ExtrasANSI Console Multi:68K CodeGenANSI Console Multi:68K DisassemblerANSI Console Multi:68K LinkerANSI Console Multi:68K ProjectANSI Console Multi:C/C++ CompilerANSI Console Multi:C/C++ WarningsANSI Console Multi:CFM68KANSI Console Multi:IR OptimizerANSI Console Multi:Java OutputANSI Console Multi:Java ProjectANSI Console Multi:Java VMANSI Console Multi:MacOS Merge PanelANSI Console Multi:Pascal CompilerANSI Console Multi:Pascal WarningsANSI Console Multi:PPC CodeGenANSI Console Multi:PPC DisassemblerANSI Console Multi:PPC LinkerANSI Console Multi:PPC PEFANSI Console Multi:PPC ProjectANSI Console Multi:PPCAsm PanelANSI Console Multi:Rez CompilerANSI Console Multi:WinRC CompilerANSI Console Multi:x86 CodeGenANSI Console Multi:x86 LinkerANSI Console Multi:x86 ProjectProject File ListANSI Console 68k:Custom KeywordsANSI Console 68k:Access PathsANSI Console 68k:Target SettingsANSI Console 68k:File MappingsANSI Console 68k:Build ExtrasANSI Console 68k:68K CodeGenANSI Console 68k:68K DisassemblerANSI Console 68k:68K LinkerANSI Console 68k:68K ProjectANSI Console 68k:C/C++ CompilerANSI Console 68k:C/C++ WarningsANSI Console 68k:CFM68KANSI Console 68k:IR OptimizerANSI Console 68k:Java OutputANSI Console 68k:Java ProjectANSI Console 68k:Java VMANSI Console 68k:MacOS Merge PanelANSI Console 68k:Pascal CompilerANSI Console 68k:Pascal WarningsANSI Console 68k:PPC CodeGenANSI Console 68k:PPC DisassemblerANSI Console 68k:PPC LinkerANSI Console 68k:PPC PEFANSI Console 68k:PPC ProjectANSI Console 68k:PPCAsm PanelANSI Console 68k:Rez CompilerANSI Console 68k:WinRC CompilerANSI Console 68k:x86 CodeGenANSI Console 68k:x86 LinkerANSI Console 68k:x86 ProjectANSI Console PPC:Custom KeywordsANSI Console PPC:Access PathsANSI Console PPC:Target SettingsANSI Console PPC:File MappingsANSI Console PPC:Build ExtrasANSI Console PPC:68K CodeGenANSI Console PPC:68K DisassemblerANSI Console PPC:68K LinkerANSI Console PPC:68K ProjectANSI Console PPC:C/C++ CompilerANSI Console PPC:C/C++ WarningsANSI Console PPC:CFM68KANSI Console PPC:IR OptimizerANSI Console PPC:Java OutputANSI Console PPC:Java ProjectANSI Console PPC:Java VMANSI Console PPC:MacOS Merge PanelANSI Console PPC:Pascal CompilerANSI Console PPC:Pascal WarningsANSI Console PPC:PPC CodeGenANSI Console PPC:PPC DisassemblerANSI Console PPC:PPC LinkerANSI Console PPC:PPC PEFANSI Console PPC:PPC ProjectANSI Console PPC:PPCAsm PanelANSI Console PPC:Rez CompilerANSI Console PPC:WinRC CompilerANSI Console PPC:x86 CodeGenANSI Console PPC:x86 LinkerANSI Console PPC:x86 ProjectANSI Console FAT:Custom KeywordsANSI Console FAT:Access PathsANSI Console FAT:Target SettingsANSI Console FAT:File MappingsANSI Console FAT:Build ExtrasANSI Console FAT:68K CodeGenANSI Console FAT:68K DisassemblerANSI Console FAT:68K LinkerANSI Console FAT:68K ProjectANSI Console FAT:C/C++ CompilerANSI Console FAT:C/C++ WarningsANSI Console FAT:CFM68KANSI Console FAT:IR OptimizerANSI Console FAT:Java OutputANSI Console FAT:Java ProjectANSI Console FAT:Java VMANSI Console FAT:MacOS Merge PanelANSI Console FAT:Pascal CompilerANSI Console FAT:Pascal WarningsANSI Console FAT:PPC CodeGenANSI Console FAT:PPC DisassemblerANSI Console FAT:PPC LinkerANSI Console FAT:PPC PEFANSI Console FAT:PPC ProjectANSI Console FAT:PPCAsm PanelANSI Console FAT:Rez CompilerANSI Console FAT:WinRC CompilerANSI Console FAT:x86 CodeGenANSI Console FAT:x86 LinkerANSI Console FAT:x86 ProjectANSI C Console 68k:Custom KeywordsANSI C Console 68k:Access PathsANSI C Console 68k:Target SettingsANSI C Console 68k:File MappingsANSI C Console 68k:Build ExtrasANSI C Console 68k:68K CodeGenANSI C Console 68k:68K DisassemblerANSI C Console 68k:68K LinkerANSI C Console 68k:68K ProjectANSI C Console 68k:C/C++ CompilerANSI C Console 68k:C/C++ WarningsANSI C Console 68k:CFM68KANSI C Console 68k:IR OptimizerANSI C Console 68k:MacOS Merge PanelANSI C Console 68k:Pascal CompilerANSI C Console 68k:Pascal WarningsANSI C Console 68k:PPC CodeGenANSI C Console 68k:PPC DisassemblerANSI C Console 68k:PPC LinkerANSI C Console 68k:PPC PEFANSI C Console 68k:PPC ProjectANSI C Console 68k:PPCAsm PanelANSI C Console 68k:Rez CompilerANSI C Console PPC:Custom KeywordsANSI C Console PPC:Access PathsANSI C Console PPC:Target SettingsANSI C Console PPC:File MappingsANSI C Console PPC:Build ExtrasANSI C Console PPC:68K CodeGenANSI C Console PPC:68K DisassemblerANSI C Console PPC:68K LinkerANSI C Console PPC:68K ProjectANSI C Console PPC:C/C++ CompilerANSI C Console PPC:C/C++ WarningsANSI C Console PPC:CFM68KANSI C Console PPC:IR OptimizerANSI C Console PPC:MacOS Merge PanelANSI C Console PPC:Pascal CompilerANSI C Console PPC:Pascal WarningsANSI C Console PPC:PPC CodeGenANSI C Console PPC:PPC DisassemblerANSI C Console PPC:PPC LinkerANSI C Console PPC:PPC PEFANSI C Console PPC:PPC ProjectANSI C Console PPC:PPCAsm PanelANSI C Console PPC:Rez CompilerANSI C Console FAT:Custom KeywordsANSI C Console FAT:Access PathsANSI C Console FAT:Target SettingsANSI C Console FAT:File MappingsANSI C Console FAT:Build ExtrasANSI C Console FAT:68K CodeGenANSI C Console FAT:68K DisassemblerANSI C Console FAT:68K LinkerANSI C Console FAT:68K ProjectANSI C Console FAT:C/C++ CompilerANSI C Console FAT:C/C++ WarningsANSI C Console FAT:CFM68KANSI C Console FAT:IR OptimizerANSI C Console FAT:MacOS Merge PanelANSI C Console FAT:Pascal CompilerANSI C Console FAT:Pascal WarningsANSI C Console FAT:PPC CodeGenANSI C Console FAT:PPC DisassemblerANSI C Console FAT:PPC LinkerANSI C Console FAT:PPC PEFANSI C Console FAT:PPC ProjectANSI C Console FAT:PPCAsm PanelANSI C Console FAT:Rez CompilerANSI C++ Console 68k:Custom KeywordsANSI C++ Console 68k:Access PathsANSI C++ Console 68k:Target SettingsANSI C++ Console 68k:File MappingsANSI C++ Console 68k:Build ExtrasANSI C++ Console 68k:68K CodeGenANSI C++ Console 68k:68K DisassemblerANSI C++ Console 68k:68K LinkerANSI C++ Console 68k:68K ProjectANSI C++ Console 68k:C/C++ CompilerANSI C++ Console 68k:C/C++ WarningsANSI C++ Console 68k:CFM68KANSI C++ Console 68k:IR OptimizerANSI C++ Console 68k:MacOS Merge PanelANSI C++ Console 68k:Pascal CompilerANSI C++ Console 68k:Pascal WarningsANSI C++ Console 68k:PPC CodeGenANSI C++ Console 68k:PPC DisassemblerANSI C++ Console 68k:PPC LinkerANSI C++ Console 68k:PPC PEFANSI C++ Console 68k:PPC ProjectANSI C++ Console 68k:PPCAsm PanelANSI C++ Console 68k:Rez CompilerANSI C++ Console PPC:Custom KeywordsANSI C++ Console PPC:Access PathsANSI C++ Console PPC:Target SettingsANSI C++ Console PPC:File MappingsANSI C++ Console PPC:Build ExtrasANSI C++ Console PPC:68K CodeGenANSI C++ Console PPC:68K DisassemblerANSI C++ Console PPC:68K LinkerANSI C++ Console PPC:68K ProjectANSI C++ Console PPC:C/C++ CompilerANSI C++ Console PPC:C/C++ WarningsANSI C++ Console PPC:CFM68KANSI C++ Console PPC:IR OptimizerANSI C++ Console PPC:MacOS Merge PanelANSI C++ Console PPC:Pascal CompilerANSI C++ Console PPC:Pascal WarningsANSI C++ Console PPC:PPC CodeGenANSI C++ Console PPC:PPC DisassemblerANSI C++ Console PPC:PPC LinkerANSI C++ Console PPC:PPC PEFANSI C++ Console PPC:PPC ProjectANSI C++ Console PPC:PPCAsm PanelANSI C++ Console PPC:Rez CompilerANSI C++ Console 68k:Java OutputANSI C++ Console 68k:Java ProjectANSI C++ Console 68k:Java VMANSI C++ Console 68k:WinRC CompilerANSI C++ Console 68k:x86 CodeGenANSI C++ Console 68k:x86 LinkerANSI C++ Console 68k:x86 ProjectANSI C++ Console PPC:Java OutputANSI C++ Console PPC:Java ProjectANSI C++ Console PPC:Java VMANSI C++ Console PPC:WinRC CompilerANSI C++ Console PPC:x86 CodeGenANSI C++ Console PPC:x86 LinkerANSI C++ Console PPC:x86 ProjectANSI C Console FAT:Java OutputANSI C Console FAT:Java ProjectANSI C Console FAT:Java VMANSI C Console FAT:WinRC CompilerANSI C Console FAT:x86 CodeGenANSI C Console FAT:x86 LinkerANSI C Console FAT:x86 ProjectANSI C++ Console FAT:Custom KeywordsANSI C++ Console FAT:Access PathsANSI C++ Console FAT:Target SettingsANSI C++ Console FAT:File MappingsANSI C++ Console FAT:Build ExtrasANSI C++ Console FAT:68K CodeGenANSI C++ Console FAT:68K DisassemblerANSI C++ Console FAT:68K LinkerANSI C++ Console FAT:68K ProjectANSI C++ Console FAT:C/C++ CompilerANSI C++ Console FAT:C/C++ WarningsANSI C++ Console FAT:CFM68KANSI C++ Console FAT:IR OptimizerANSI C++ Console FAT:MacOS Merge PanelANSI C++ Console FAT:Pascal CompilerANSI C++ Console FAT:Pascal WarningsANSI C++ Console FAT:PPC CodeGenANSI C++ Console FAT:PPC DisassemblerANSI C++ Console FAT:PPC LinkerANSI C++ Console FAT:PPC PEFANSI C++ Console FAT:PPC ProjectANSI C++ Console FAT:PPCAsm PanelANSI C++ Console FAT:Rez CompilerANSI C++ SIOUX-WASTE 68k:Custom KeywordsANSI C++ SIOUX-WASTE 68k:Access PathsANSI C++ SIOUX-WASTE 68k:Target SettingsANSI C++ SIOUX-WASTE 68k:File MappingsANSI C++ SIOUX-WASTE 68k:Build ExtrasANSI C++ SIOUX-WASTE 68k:68K CodeGenANSI C++ SIOUX-WASTE 68k:68K DisassemblerANSI C++ SIOUX-WASTE 68k:68K LinkerANSI C++ SIOUX-WASTE 68k:68K ProjectANSI C++ SIOUX-WASTE 68k:C/C++ CompilerANSI C++ SIOUX-WASTE 68k:C/C++ WarningsANSI C++ SIOUX-WASTE 68k:CFM68KANSI C++ SIOUX-WASTE 68k:IR OptimizerANSI C++ SIOUX-WASTE 68k:MacOS Merge PanelANSI C++ SIOUX-WASTE 68k:Pascal CompilerANSI C++ SIOUX-WASTE 68k:Pascal WarningsANSI C++ SIOUX-WASTE 68k:PPC CodeGenANSI C++ SIOUX-WASTE 68k:PPC DisassemblerANSI C++ SIOUX-WASTE 68k:PPC LinkerANSI C++ SIOUX-WASTE 68k:PPC PEFANSI C++ SIOUX-WASTE 68k:PPC ProjectANSI C++ SIOUX-WASTE 68k:PPCAsm PanelANSI C++ SIOUX-WASTE 68k:Rez CompilerANSI C++ SIOUX-WASTE PPC:Custom KeywordsANSI C++ SIOUX-WASTE PPC:Access PathsANSI C++ SIOUX-WASTE PPC:Target SettingsANSI C++ SIOUX-WASTE PPC:File MappingsANSI C++ SIOUX-WASTE PPC:Build ExtrasANSI C++ SIOUX-WASTE PPC:68K CodeGenANSI C++ SIOUX-WASTE PPC:68K DisassemblerANSI C++ SIOUX-WASTE PPC:68K LinkerANSI C++ SIOUX-WASTE PPC:68K ProjectANSI C++ SIOUX-WASTE PPC:C/C++ CompilerANSI C++ SIOUX-WASTE PPC:C/C++ WarningsANSI C++ SIOUX-WASTE PPC:CFM68KANSI C++ SIOUX-WASTE PPC:IR OptimizerANSI C++ SIOUX-WASTE PPC:MacOS Merge PanelANSI C++ SIOUX-WASTE PPC:Pascal CompilerANSI C++ SIOUX-WASTE PPC:Pascal WarningsANSI C++ SIOUX-WASTE PPC:PPC CodeGenANSI C++ SIOUX-WASTE PPC:PPC DisassemblerANSI C++ SIOUX-WASTE PPC:PPC LinkerANSI C++ SIOUX-WASTE PPC:PPC PEFANSI C++ SIOUX-WASTE PPC:PPC ProjectANSI C++ SIOUX-WASTE PPC:PPCAsm PanelANSI C++ SIOUX-WASTE PPC:Rez CompilerANSI C++ SIOUX-WASTE FAT:Custom KeywordsANSI C++ SIOUX-WASTE FAT:Access PathsANSI C++ SIOUX-WASTE FAT:Target SettingsANSI C++ SIOUX-WASTE FAT:File MappingsANSI C++ SIOUX-WASTE FAT:Build ExtrasANSI C++ SIOUX-WASTE FAT:68K CodeGenANSI C++ SIOUX-WASTE FAT:68K DisassemblerANSI C++ SIOUX-WASTE FAT:68K LinkerANSI C++ SIOUX-WASTE FAT:68K ProjectANSI C++ SIOUX-WASTE FAT:C/C++ CompilerANSI C++ SIOUX-WASTE FAT:C/C++ WarningsANSI C++ SIOUX-WASTE FAT:CFM68KANSI C++ SIOUX-WASTE FAT:IR OptimizerANSI C++ SIOUX-WASTE FAT:MacOS Merge PanelANSI C++ SIOUX-WASTE FAT:Pascal CompilerANSI C++ SIOUX-WASTE FAT:Pascal WarningsANSI C++ SIOUX-WASTE FAT:PPC CodeGenANSI C++ SIOUX-WASTE FAT:PPC DisassemblerANSI C++ SIOUX-WASTE FAT:PPC LinkerANSI C++ SIOUX-WASTE FAT:PPC PEFANSI C++ SIOUX-WASTE FAT:PPC ProjectANSI C++ SIOUX-WASTE FAT:PPCAsm PanelANSI C++ SIOUX-WASTE FAT:Rez CompilerStd C++ SIOUX-WASTE 68K:Custom KeywordsStd C++ SIOUX-WASTE 68K:Access PathsStd C++ SIOUX-WASTE 68K:Target SettingsStd C++ SIOUX-WASTE 68K:File MappingsStd C++ SIOUX-WASTE 68K:Build ExtrasStd C++ SIOUX-WASTE 68K:Bison PanelStd C++ SIOUX-WASTE 68K:Flex PanelStd C++ SIOUX-WASTE 68K:68K CodeGenStd C++ SIOUX-WASTE 68K:68K DisassemblerStd C++ SIOUX-WASTE 68K:68K LinkerStd C++ SIOUX-WASTE 68K:68K ProjectStd C++ SIOUX-WASTE 68K:C/C++ CompilerStd C++ SIOUX-WASTE 68K:C/C++ WarningsStd C++ SIOUX-WASTE 68K:CFM68KStd C++ SIOUX-WASTE 68K:IR OptimizerStd C++ SIOUX-WASTE 68K:Java OutputStd C++ SIOUX-WASTE 68K:Java ProjectStd C++ SIOUX-WASTE 68K:Java VMStd C++ SIOUX-WASTE 68K:MacOS Merge PanelStd C++ SIOUX-WASTE 68K:Pascal CompilerStd C++ SIOUX-WASTE 68K:Pascal WarningsStd C++ SIOUX-WASTE 68K:PPC CodeGenStd C++ SIOUX-WASTE 68K:PPC DisassemblerStd C++ SIOUX-WASTE 68K:PPC LinkerStd C++ SIOUX-WASTE 68K:PPC PEFStd C++ SIOUX-WASTE 68K:PPC ProjectStd C++ SIOUX-WASTE 68K:PPCAsm PanelStd C++ SIOUX-WASTE 68K:Rez CompilerStd C++ SIOUX-WASTE 68K:WinRC CompilerStd C++ SIOUX-WASTE 68K:x86 CodeGenStd C++ SIOUX-WASTE 68K:x86 LinkerStd C++ SIOUX-WASTE 68K:x86 ProjectStd C++ SIOUX-WASTE PPC:Custom KeywordsStd C++ SIOUX-WASTE PPC:Access PathsStd C++ SIOUX-WASTE PPC:Target SettingsStd C++ SIOUX-WASTE PPC:File MappingsStd C++ SIOUX-WASTE PPC:Build ExtrasStd C++ SIOUX-WASTE PPC:Bison PanelStd C++ SIOUX-WASTE PPC:Flex PanelStd C++ SIOUX-WASTE PPC:68K CodeGenStd C++ SIOUX-WASTE PPC:68K DisassemblerStd C++ SIOUX-WASTE PPC:68K LinkerStd C++ SIOUX-WASTE PPC:68K ProjectStd C++ SIOUX-WASTE PPC:C/C++ CompilerStd C++ SIOUX-WASTE PPC:C/C++ WarningsStd C++ SIOUX-WASTE PPC:CFM68KStd C++ SIOUX-WASTE PPC:IR OptimizerStd C++ SIOUX-WASTE PPC:Java OutputStd C++ SIOUX-WASTE PPC:Java ProjectStd C++ SIOUX-WASTE PPC:Java VMStd C++ SIOUX-WASTE PPC:MacOS Merge PanelStd C++ SIOUX-WASTE PPC:Pascal CompilerStd C++ SIOUX-WASTE PPC:Pascal WarningsStd C++ SIOUX-WASTE PPC:PPC CodeGenStd C++ SIOUX-WASTE PPC:PPC DisassemblerStd C++ SIOUX-WASTE PPC:PPC LinkerStd C++ SIOUX-WASTE PPC:PPC PEFStd C++ SIOUX-WASTE PPC:PPC ProjectStd C++ SIOUX-WASTE PPC:PPCAsm PanelStd C++ SIOUX-WASTE PPC:Rez CompilerStd C++ SIOUX-WASTE PPC:WinRC CompilerStd C++ SIOUX-WASTE PPC:x86 CodeGenStd C++ SIOUX-WASTE PPC:x86 LinkerStd C++ SIOUX-WASTE PPC:x86 ProjectStd C++ SIOUX-WASTE FAT:Custom KeywordsStd C++ SIOUX-WASTE FAT:Access PathsStd C++ SIOUX-WASTE FAT:Target SettingsStd C++ SIOUX-WASTE FAT:File MappingsStd C++ SIOUX-WASTE FAT:Build ExtrasStd C++ SIOUX-WASTE FAT:Bison PanelStd C++ SIOUX-WASTE FAT:Flex PanelStd C++ SIOUX-WASTE FAT:68K CodeGenStd C++ SIOUX-WASTE FAT:68K DisassemblerStd C++ SIOUX-WASTE FAT:68K LinkerStd C++ SIOUX-WASTE FAT:68K ProjectStd C++ SIOUX-WASTE FAT:C/C++ CompilerStd C++ SIOUX-WASTE FAT:C/C++ WarningsStd C++ SIOUX-WASTE FAT:CFM68KStd C++ SIOUX-WASTE FAT:IR OptimizerStd C++ SIOUX-WASTE FAT:Java OutputStd C++ SIOUX-WASTE FAT:Java ProjectStd C++ SIOUX-WASTE FAT:Java VMStd C++ SIOUX-WASTE FAT:MacOS Merge PanelStd C++ SIOUX-WASTE FAT:Pascal CompilerStd C++ SIOUX-WASTE FAT:Pascal WarningsStd C++ SIOUX-WASTE FAT:PPC CodeGenStd C++ SIOUX-WASTE FAT:PPC DisassemblerStd C++ SIOUX-WASTE FAT:PPC LinkerStd C++ SIOUX-WASTE FAT:PPC PEFStd C++ SIOUX-WASTE FAT:PPC ProjectStd C++ SIOUX-WASTE FAT:PPCAsm PanelStd C++ SIOUX-WASTE FAT:Rez CompilerStd C++ SIOUX-WASTE FAT:WinRC CompilerStd C++ SIOUX-WASTE FAT:x86 CodeGenStd C++ SIOUX-WASTE FAT:x86 LinkerStd C++ SIOUX-WASTE FAT:x86 Project68K Std C++ SIOUX-WASTE:Custom Keywords68K Std C++ SIOUX-WASTE:Access Paths68K Std C++ SIOUX-WASTE:Target Settings68K Std C++ SIOUX-WASTE:File Mappings68K Std C++ SIOUX-WASTE:Build Extras68K Std C++ SIOUX-WASTE:68K CodeGen68K Std C++ SIOUX-WASTE:68K Disassembler68K Std C++ SIOUX-WASTE:68K Linker68K Std C++ SIOUX-WASTE:68K Project68K Std C++ SIOUX-WASTE:C/C++ Compiler68K Std C++ SIOUX-WASTE:C/C++ Warnings68K Std C++ SIOUX-WASTE:CFM68K68K Std C++ SIOUX-WASTE:IR Optimizer68K Std C++ SIOUX-WASTE:Java Output68K Std C++ SIOUX-WASTE:Java Project68K Std C++ SIOUX-WASTE:Java VM68K Std C++ SIOUX-WASTE:MacOS Merge Panel68K Std C++ SIOUX-WASTE:Pascal Compiler68K Std C++ SIOUX-WASTE:Pascal Warnings68K Std C++ SIOUX-WASTE:PPC CodeGen68K Std C++ SIOUX-WASTE:PPC Disassembler68K Std C++ SIOUX-WASTE:PPC Linker68K Std C++ SIOUX-WASTE:PPC PEF68K Std C++ SIOUX-WASTE:PPC Project68K Std C++ SIOUX-WASTE:PPCAsm Panel68K Std C++ SIOUX-WASTE:Rez Compiler68K Std C++ SIOUX-WASTE:WinRC Compiler68K Std C++ SIOUX-WASTE:x86 CodeGen68K Std C++ SIOUX-WASTE:x86 Linker68K Std C++ SIOUX-WASTE:x86 ProjectPPC Std C++ SIOUX-WASTE:Custom KeywordsPPC Std C++ SIOUX-WASTE:Access PathsPPC Std C++ SIOUX-WASTE:Target SettingsPPC Std C++ SIOUX-WASTE:File MappingsPPC Std C++ SIOUX-WASTE:Build ExtrasPPC Std C++ SIOUX-WASTE:68K CodeGenPPC Std C++ SIOUX-WASTE:68K DisassemblerPPC Std C++ SIOUX-WASTE:68K LinkerPPC Std C++ SIOUX-WASTE:68K ProjectPPC Std C++ SIOUX-WASTE:C/C++ CompilerPPC Std C++ SIOUX-WASTE:C/C++ WarningsPPC Std C++ SIOUX-WASTE:CFM68KPPC Std C++ SIOUX-WASTE:IR OptimizerPPC Std C++ SIOUX-WASTE:Java OutputPPC Std C++ SIOUX-WASTE:Java ProjectPPC Std C++ SIOUX-WASTE:Java VMPPC Std C++ SIOUX-WASTE:MacOS Merge PanelPPC Std C++ SIOUX-WASTE:Pascal CompilerPPC Std C++ SIOUX-WASTE:Pascal WarningsPPC Std C++ SIOUX-WASTE:PPC CodeGenPPC Std C++ SIOUX-WASTE:PPC DisassemblerPPC Std C++ SIOUX-WASTE:PPC LinkerPPC Std C++ SIOUX-WASTE:PPC PEFPPC Std C++ SIOUX-WASTE:PPC ProjectPPC Std C++ SIOUX-WASTE:PPCAsm PanelPPC Std C++ SIOUX-WASTE:Rez CompilerPPC Std C++ SIOUX-WASTE:WinRC CompilerPPC Std C++ SIOUX-WASTE:x86 CodeGenPPC Std C++ SIOUX-WASTE:x86 LinkerPPC Std C++ SIOUX-WASTE:x86 ProjectPPC Std C++ SIOUX-WASTE:Java LanguagePPC Std C++ SIOUX-WASTE:Debugger TargetPPC Std C++ SIOUX-WASTE:FTP PanelPPC Std C++ SIOUX-WASTE:JavaDoc ProjectPPC Std C++ SIOUX-WASTE:x86 Exceptions PanelPPC Std C++ SIOUX-WASTE:68K Global OptimizerPPC Std C++ SIOUX-WASTE:PPC Global OptimizerPPC Std C++ SIOUX-WASTE:Source TreesPPC Std C++ SIOUX-WASTE:Debugger RuntimePPC Std C++ SIOUX-WASTE:Java Command LinePPC Std C++ SIOUX-WASTE:Java MacOS SettingsPPC Std C++ SIOUX-WASTE:Perl PanelPPC Std C++ SIOUX-WASTE:x86 Global Optimizerdxf2vrml:Source Treesdxf2vrml:Custom Keywordsdxf2vrml:Access Pathsdxf2vrml:Target Settingsdxf2vrml:File Mappingsdxf2vrml:Build Extrasdxf2vrml:Debugger Runtimedxf2vrml:Debugger Targetdxf2vrml:68K CodeGendxf2vrml:68K Disassemblerdxf2vrml:68K Global Optimizerdxf2vrml:68K Linkerdxf2vrml:68K Projectdxf2vrml:C/C++ Compilerdxf2vrml:C/C++ Warningsdxf2vrml:CFM68Kdxf2vrml:FTP Paneldxf2vrml:Java Command Linedxf2vrml:Java Languagedxf2vrml:Java MacOS Settingsdxf2vrml:Java Outputdxf2vrml:Java Projectdxf2vrml:JavaDoc Projectdxf2vrml:MacOS Merge Paneldxf2vrml:Perl Paneldxf2vrml:PPC CodeGendxf2vrml:PPC Disassemblerdxf2vrml:PPC Global Optimizerdxf2vrml:PPC Linkerdxf2vrml:PPC PEFdxf2vrml:PPC Projectdxf2vrml:PPCAsm Paneldxf2vrml:Rez Compilerdxf2vrml97:Source Treesdxf2vrml97:Custom Keywordsdxf2vrml97:Access Pathsdxf2vrml97:Target Settingsdxf2vrml97:File Mappingsdxf2vrml97:Build Extrasdxf2vrml97:Debugger Runtimedxf2vrml97:Debugger Targetdxf2vrml97:68K CodeGendxf2vrml97:68K Disassemblerdxf2vrml97:68K Global Optimizerdxf2vrml97:68K Linkerdxf2vrml97:68K Projectdxf2vrml97:C/C++ Compilerdxf2vrml97:C/C++ Warningsdxf2vrml97:CFM68Kdxf2vrml97:FTP Paneldxf2vrml97:Java Command Linedxf2vrml97:Java Languagedxf2vrml97:Java MacOS Settingsdxf2vrml97:Java Outputdxf2vrml97:Java Projectdxf2vrml97:JavaDoc Projectdxf2vrml97:MacOS Merge Paneldxf2vrml97:Perl Paneldxf2vrml97:PPC CodeGendxf2vrml97:PPC Disassemblerdxf2vrml97:PPC Global Optimizerdxf2vrml97:PPC Linkerdxf2vrml97:PPC PEFdxf2vrml97:PPC Projectdxf2vrml97:PPCAsm Paneldxf2vrml97:Rez Compiler#CshPf 0‡ Add§PinRÆaPoiêMIte tRes' MenuI tConk Cont… oseC¥illCÄShowäHideÿMove$GetCGetCRjzeCo‰lite­GetCËtCTiætlVainCt%Ctl Elue gl Se†Test¤DragÃTracÕ Draö!€"nded5#istT$ àr%&±'Í(ê)  **+ —B,d$`-}.›/shP´0 0×1 Addø2PinR3aPoi64MIteX5tRest6Menu7tConª8ContÈ9oseCæ:illC;Show#GetC}?etCR›@zeCo¼A€ÛBGetCùCtCTiDtlVa8EinCtTFCtl qGlue ‘Hl Se±ITestÉJDragçKTrac L Dra "M ;N ^O P  Q ½R ßS ûT U 1V OW mXKeys Y ªZImpo Æ[PW I ã\KBa ]lpM "^68K C_l 68 b`F Im €a€ bnded ¿cist ÛdTarg øect D fSett 8g Set PheSaf ni@ ‹j ©k Âl åm në` 'o L DpÒ%sÓ fqg: Ò ‚rë ›sANSI ¸t 68k ÖuKeyw ôvI Cowk:Ac1xhsAMyole jzet S{ANSI­| 68kÐ}ppinñ~ConsBuil0€ANSTr‚‘ƒ³„Յ4ˆW‰zŠ™‹½ŒÛöŽ5U‘x’˜“»”Ü•ü–—?˜]™|šž›ÀœÚúžŸB e¡„¢¨£Ƥᥦ §@¨c©ƒª¦«Ǭç­®*¯H°g±‰²«³Å´åµ ¶-·P¸o¹“º±»̼ë½ ¾+¿PÀrÁ—ºÃÜÄýÅ#ÆCÇdȈɬÊÈËêÌÍ6Î[Ï|ТÑÂÒßÓÔ"ÕDÖi׋ذÙÓÚõÛÜ<Ý\Þ}ß¡àÅááâã*äOåtæ•ç»èÛéøêë;ì]í~î ï½ðáñò"óCôdõ†ö£÷Çøèùú)ûHühýƒþ¥ÿÄâ  & H m  ² Ó ù ! !: !^ !‚ !ž!À!ç" "1"R"x"˜"µ"Ö"ø##C#i#’#¹#ß$$. $R!$w"$Ÿ#$Ç$$ç%% &%8'%a(%Š)%¯*%Ù+%ý,&-&C.&i/&0&¸1&Þ2'3'.4'T5'y6'£7'Ç8'ì9(:(<;(\<(‚=(­>(Ö?(ÿ@)$A)NB)rC)“D)¸E)ÞF*G*-H*SI*|J*£K*ÉL*îM+N+<O+aP+‰Q+±R+ÑS+÷T,"U,KV,tW,™X,ÃY,çZ-[--\-S]-y^-¡_-Æ`-îa.b.9c.]d.€e.¤f.Íg.ðh/i/;j/bk/l/¦m/Ên/ïo0p09q0ar0‰s0­t0Öu0ùv1w1=x1by1‡z1®{1Ò|1õ}2~2A2f€2Ž2´‚2Ùƒ2ý„3 …3D†3m‡3ˆ3´‰3ÛŠ4‹4!Œ4F4jŽ44¯4Ù‘5’5)“5M”5v•5™–5¹—5ݘ6™6'š6N›6rœ6•6¹ž6áŸ7 7.¡7T¢7y£7¤7À¥7ä¦8 §80¨8T©8{ª8¢«8Á¬8æ­9 ®9/¯9O°9y±9¡²9ɳ9í´:µ:9¶:Y·:}¸:¢¹:Ǻ:î»;¼;5½;Y¾;¿;¦À;ÎÁ;ôÂ<Ã<=Ä"Ñ>FÒ>oÓ>’Ô>²Õ>ÖÖ>û×? Ø?GÙ?kÚ?ŽÛ?²Ü?ÚÝ?ÿÞ@'ß@Mà@rá@–â@¿ã@âäAåA-æATçAsèA˜éA¼êAáëBìB+íBSîB{ïBŸðBÈñBëòC óC/ôCTõCyöC ÷CÄøCçùD úD1ûDYüD{ýD£þDÐÿDýE*EOExE¢EÎEñFF4FM Fc F| F“ F© FÃFÜFñG G)G=GRGjG‚G’G¥GÀG×GôH HH8HSHg H|!H–"H´#HÈ$HÙ%Hî&I'I(I2)IM*Ie+I€,I™-I±.IÍ/Iè0Iÿ1J2J;3JQ4Jh5J‚6Jœ7J®8JÃ9Jà:Jù;K<K/=KG>Kb?K@K•AK¬BKÈCKèDKþELFL(GL@HNoneMMPr@TEXT.cRunTSScriptTEXT.plMW Perl€Java Linker .auJAR Importer@ .gifJAR Importer@RSRC`TEXT.cRunTSScriptTEXT.htmlTEXT.javaMW JavaTEXT.mfTEXT.plMW Perl€rsrc`.classMW Java.zipMW JavaMacOS 68K LinkerAPPL`Appl`MMLBLib Import 68KMPLFLib Import 68KMWCD`OBJ MPW Import 68KPLob`RSRC`TEXT.bhBalloon HelpTEXT.cMW C/C++ 68KTEXT.c++MW C/C++ 68KTEXT.ccMW C/C++ 68KTEXT.cpMW C/C++ 68KTEXT.cppMW C/C++ 68KTEXT.expTEXT.hMW C/C++ 68KTEXT.pchMW C/C++ 68K€TEXT.pch++MW C/C++ 68K€TEXT.plMW Perl€TEXT.rRezTEXT.segdocu`rsrc`shlbPEF Import 68KstubPEF Import 68K.docP.oMPW Import 68K.ppob`.rsrc`MacOS Merge APPL`Appl`RSRC`TEXT.bhBalloon HelpTEXT.cRunTSScriptTEXT.plMW Perl€TEXT.rRezrsrc`shlbMacOS PPC LinkerAPPL`Appl`MMLBLib Import PPCMPLFLib Import PPCMWCD`RSRC`TEXT.arrTEXT.bhBalloon HelpTEXT.cMW C/C++ PPCTEXT.c++MW C/C++ PPCTEXT.ccMW C/C++ PPCTEXT.cpMW C/C++ PPCTEXT.cppMW C/C++ PPCTEXT.expTEXT.hMW C/C++ PPCTEXT.pchMW C/C++ PPC€TEXT.pch++MW C/C++ PPC€TEXT.plMW Perl€TEXT.rRezTEXT.sPPCAsmXCOFXCOFF Import PPCdocu`rsrc`shlbPEF Import PPCstubPEF Import PPC.docP.oXCOFF Import PPC.ppob`.rsrc`Win32 x86 Linker????Obj Import x86TEXT.cMW C/C++ x86TEXT.c++MW C/C++ x86TEXT.ccMW C/C++ x86TEXT.cpMW C/C++ x86TEXT.cppMW C/C++ x86TEXT.defTEXT.hMW C/C++ x86TEXT.h++MW C/C++ x86TEXT.hppMW C/C++ x86TEXT.ordTEXT.pchMW C/C++ x86€TEXT.pch++MW C/C++ x86€TEXT.plMW Perl€TEXT.rcMW WinRCTEXT.resWinRes ImportiLIBLib Import x86iOBJObj Import x86.aLib Import x86.docP.libLib Import x86.oObj Import x86.objObj Import x86ÈopÈx€Èg JBoundApp????ÿÿÿÿÿÿWINDnull MSIEInternet ExplorererIexplore.exeoreruJITé"pé<øH°é"pé<0k ûàøHé"phttp://java.sun.com/products/jdk/1.1/docs/api/ )Aï"S0<Äé;  ¹ÐøHaÿ%®0UOé"p<aÿ%š0UO/ Hx B'aÿ%ˆ0UO/ HxJ/ VÀDIÀ/aÿ&¶0UO/ HxJ/ VÀDIÀ/aÿ&š0UO/ HxJ/VÀDIÀ/aÿ&~0UO/ HxJ/VÀDIÀ/aÿ&b0UO/ HxJ/VÀDIÀ/aÿ&F0UO/ HxJ/VÀDIÀ/aÿ&*0UO/ Hx J/VÀDIÀ/aÿ&0HW//aÿ,|/ HxHoaÿ'b0/ Hx?/NºþVHÀTO/aÿ%Ô0HoHoaÿ+/ HxP'CODE' 'DATA' 'PICT't²PmstrIJ€mstl£ €mstn((mstiH) mstrèPmstlèmstnèP(mstiè,mpsiè­mtglèÞÀPLstí¬ .pref̹-=àIpref»A. ­pref±}/B)$prefÿ): ; prefÛO;BM’pref4Ú<BßJpref¨z=þ mtslC)mtplw€mtpsàmtpi ž mtlo8[.prefËVK8‰IprefnL<Òpref¼ÎM<Ö$prefëX<ú pref`GY=’prefôZ=–JprefT.[ ‰.prefƒÑioiIprefj ‡pref~Dks²$prefˆUvw prefVÄwsÖ’pref%hxthJpref—cy Õ.pref Çí*ÉIpref‹0îúpref‚ïS$preftð  prefïùñ$6’pref$Šò*Jpref&+óu.prefô%¤IprefÿxõÚprefÀröQ$pref²÷ 1 pref4ø)í’prefœù#ìJprefÿ/ú Q.pref&áû/Ipref¥üÒpref…@ý-$prefBšþÖ prefE÷ÿ$È’prefÈ›%ZJpref°`”prefçÒcœ prefId²pref2߃º prefë„|pref…£„ pref-«¤Æ prefO¬pèxprefP%ië í8prefP Ííl prefPX*î %"prefP*ö ±prefOê[÷`'’prefOôùøZ±jprefO´¨ùprefw‘þ ymall^·œmapl pref;’ø¨ motiðpref1opref1ó`¹ ˆpref0ÉO T)pref0Ü  á2pref0ÚÈ Epref1 Œ ÿBpref1‹G !#pref1v8pref1&ƒL pref1scV pref0¥½ypref1_gÉpref1~º‡>pref0üòÅpref0z3[Úpref0Ëh[4pref1b„Rpref0ÿt55pref1 ================================================== CONTENTS 1. Introduction 2. Features 3. Compatibility 4. Availability 5. Technical Support 1) INTRODUCTION Dime is a C++ class library for reading, constructing, manipulating, and writing AutoCAD DXF files. As should be obvious from the header, the name is an acronym for "DXF Import, Manipulation, and Export library". The dime class hierarchy structure is heavily based on the structure of the AutoCAD DXF file format. Dime is released publicly, open source, under the GNU General Public License, version 2 (not the GNU LGPL, mind you). An alternative commercial license can be acquired if so is desired. Only source code is distributed for now, but binary distributions will be available for selected platforms from dime v1.0 and onwards. 2) FEATURES You can at the moment use dime for doing the following: - load DXF files into a dime object hierarchy containing the DXF data - build dime object hierarchies from scratch - extract geometry data from dime object hierarchies - manipulate dime object hierarchies - traverse the dime object hierarchies while performing various tasks - save dime object hierarchies as files conforming to the DXF file format Some dime statistics (not to be mistaken for useful information): - 110 source files (50% header files) - 15000 lines of code (without the preamble comments) A small example program that converts DXF files to VRML files is included. Only polygon data is extracted from the DXF files, so it is not a full-blown converter, in case you are looking for one. 3) COMPATIBILITY The following platforms are known to be able to compile dime without any problems: - IRIX 6.2 (MIPS / DCC) [inhouse development platform] - Linux 2.0.* (Intel / gcc) [inhouse development platform] - BeOS (PowerPC / mwcc, Intel / gcc) - HPUX - MS Windows 9x/NT (MS Visual C++ 6.0) Compiling dime for other platforms / with other compilers should be fairly straight-forward. 4) AVAILABILITY You can download the dime source archive from the dime web page. The URL is http://www.sim.no/dime.html. You can also download the dime source archive from Systems In Motion's ftp server (ftp.sim.no) under /pub/dime/. The source code is available both as a gzip compressed tape archive (dime-0.9-src.tar.gz) and as a zip file (dime-0.9-src.zip). 5) TECHNICAL SUPPORT Systems In Motion (SIM) has no obligation to provide technical support for the GPL licensed version of dime. If resources permit, however, SIM will of course try to be as helpful as possible. Two mailing lists has been set up for dime support. dime-announce This mailing list is for announcements related to dime. The list is read-only. dime-discuss This mailing list is for discussions related to dime. The list is open for posting for everyone subscribed. To subscribe to either of the two mailing lists, send an email to with a subject line conforming to the format "subscribe ". To unsubscribe, use the complementary unsubscribe command. For general help with SIM's mailing list server, use "help" as the subject line. We encourage everyone to use the dime-discuss mailing list for technical support problems, but if you absolutely do not care to join the mailing list, send your emails to . ================================================== Lars J. Aas , Software developer at Systems In Motion dime/docs/dime.dox0100644017777301777730000011513507674276722012710 0ustar wwwwww# Doxyfile 1.2.18 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = DIME # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = ./ # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, # Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en # (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited # members of a class in the documentation of that class as if those members were # ordinary class members. Constructors, destructors and assignment operators of # the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../src \ ../include # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl FILE_PATTERNS = *.cpp \ *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = doxyheader.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = doxyfooter.html # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output dir. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non empty doxygen will try to run # the html help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, # or Internet explorer 4.0+). Note that for large projects the tree generation # can take a very long time. In such cases it is better to disable this feature. # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_XML = NO # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse the # parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yield more powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO # The CGI_NAME tag should be the name of the CGI script that # starts the search engine (doxysearch) with the correct parameters. # A script with this name will be generated by doxygen. CGI_NAME = search.cgi # The CGI_URL tag should be the absolute URL to the directory where the # cgi binaries are located. See the documentation of your http daemon for # details. CGI_URL = http://www.sim.no/cgi-bin/ # The DOC_URL tag should be the absolute URL to the directory where the # documentation is located. If left blank the absolute path to the # documentation, with file:// prepended to it, will be used. DOC_URL = # The DOC_ABSPATH tag should be the absolute path to the directory where the # documentation is located. If left blank the directory on the local machine # will be used. DOC_ABSPATH = # The BIN_ABSPATH tag must point to the directory where the doxysearch binary # is installed. BIN_ABSPATH = /usr/local/bin/ # The EXT_DOC_PATHS tag can be used to specify one or more paths to # documentation generated for other projects. This allows doxysearch to search # the documentation for these projects as well. EXT_DOC_PATHS = dime/docs/doxyfooter.html0100644017777301777730000000052706763254773014344 0ustar wwwwww
Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.
dime/docs/doxyheader.html0100644017777301777730000000031706763254773014273 0ustar wwwwww DIME Source Code Documentation dime/docs/todo.txt0100644017777301777730000000100707416265207012742 0ustar wwwwww* Request from Rob Campbell on dime-discuss: I know that ACIS SAT is a proprietary, unpublished format. But shouldn't it be possible to extract the SAT data from a DXF file created by AutoCAD and create a standalone SAT file from it? And, conversely, to split a SAT file into parts that can be put in a DXF file in the proper format? The specification of 7.0 is available at: http://www.spatial.com/services_support/support/Technical/docs.html?LV3=Ydime/dxf2vrml/0040755017777301777730000000000007733212517012053 5ustar wwwwwwdime/dxf2vrml/Makefile.am0100644017777301777730000000043407547257147014120 0ustar wwwwww## Process this file with automake to generate Makefile.in. INCLUDES = -I$(top_srcdir)/include noinst_PROGRAMS = dxf2vrml dxf2vrml_SOURCES = dxf2vrml.cpp if BUILD_WITH_MSVC dxf2vrml_LDADD = $(top_builddir)/src/dime0.lib else dxf2vrml_LDADD = $(top_builddir)/src/libdime.la endif dime/dxf2vrml/Makefile.in0100644017777301777730000002322707643247732014132 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ INCLUDES = -I$(top_srcdir)/include noinst_PROGRAMS = dxf2vrml dxf2vrml_SOURCES = dxf2vrml.cpp @BUILD_WITH_MSVC_TRUE@dxf2vrml_LDADD = $(top_builddir)/src/dime0.lib @BUILD_WITH_MSVC_FALSE@dxf2vrml_LDADD = $(top_builddir)/src/libdime.la subdir = dxf2vrml mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = noinst_PROGRAMS = dxf2vrml$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_dxf2vrml_OBJECTS = dxf2vrml.$(OBJEXT) dxf2vrml_OBJECTS = $(am_dxf2vrml_OBJECTS) @BUILD_WITH_MSVC_TRUE@dxf2vrml_DEPENDENCIES = \ @BUILD_WITH_MSVC_TRUE@ $(top_builddir)/src/dime0.lib @BUILD_WITH_MSVC_FALSE@dxf2vrml_DEPENDENCIES = \ @BUILD_WITH_MSVC_FALSE@ $(top_builddir)/src/libdime.la dxf2vrml_LDFLAGS = DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/dxf2vrml.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ DIST_SOURCES = $(dxf2vrml_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(dxf2vrml_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu dxf2vrml/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) dxf2vrml$(EXEEXT): $(dxf2vrml_OBJECTS) $(dxf2vrml_DEPENDENCIES) @rm -f dxf2vrml$(EXEEXT) $(CXXLINK) $(dxf2vrml_LDFLAGS) $(dxf2vrml_OBJECTS) $(dxf2vrml_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dxf2vrml.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS distclean distclean-compile \ distclean-depend distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ tags uninstall uninstall-am uninstall-info-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: dime/dxf2vrml/dxf2vrml.cpp0100644017777301777730000001136507676263052014334 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include #include #include #include #include #include #ifdef macintosh #include "console.h" #include "unix.h" #include "SIOUX.h" #endif // macintosh static int usage(char *progname) { fprintf(stderr, "Usage: %s [infile] [-o outfile] [-e maxerr] [-f] [-l]\n" "(default infile is stdin, default outfile is stdout)\n\n" "Options:\n" "-e Maximum error when tessellating curves\n" "-s Number of subdivisions for a curve (full circle)\n" "-f Respect the $FILLMODE header variable\n" "-vrml2 Write as vrml2. Default is vrml1\n" "-2d Set z-coordinate to 0 for all vertices\n" "-l Use layer color, ignore the color index\n\n", progname); return -1; } int main(int argc, char **argv) { #ifdef macintosh SIOUXSettings.asktosaveonclose = 0; argc = ccommand(&argv); _fcreator = 'CMPL'; _ftype = 'TEXT'; #endif // macintosh char *infile, *outfile; infile = outfile = NULL; float maxerr = 0.1f; int sub = -1; int i = 1; int fillmode = 0; int layercol = 0; bool vrml1 = true; bool only2d = false; while (i < argc) { if (argv[i][0] != '-') { if (infile != NULL) return usage(argv[0]); infile = argv[i]; i++; } else { switch (argv[i][1]) { case 'o': i++; if (i >= argc || outfile != NULL) return usage(argv[0]); outfile = argv[i]; i++; break; case 'e': i++; if (i >= argc) return usage(argv[0]); maxerr = atof(argv[i]); i++; break; case 's': i++; if (i >= argc) return usage(argv[0]); sub = atoi(argv[i]); i++; break; case 'f': i++; fillmode = 1; break; case 'l': i++; layercol = 1; break; case 'v': i++; vrml1 = false; break; case 'h': return usage(argv[0]); case '2': i++; only2d = true; break; default: return usage(argv[0]); } } } dimeInput in; // // open file for reading (or use stdin) // if (infile == NULL) { if (!in.setFileHandle(stdin)) { fprintf(stderr,"Unexpected error opening file from stdin\n"); return -1; } } else { if (!in.setFile(infile)) { fprintf(stderr,"Error opening file for reading: %s\n", infile); return -1; } } // // try reading the file // dimeModel model; if (!model.read(&in)) { fprintf(stderr,"DXF read error in line: %d\n", in.getFilePosition()); return -1; } // // open output file (or use stdout) // FILE *out = stdout; if (outfile != NULL) { out = fopen(outfile, "wb"); if (!out) { fprintf(stderr,"Error opening file for writing: %s\n", outfile); return -1; } } dxfConverter converter; converter.findHeaderVariables(model); converter.setMaxerr(maxerr); if (sub > 0) converter.setNumSub(sub); // // override $FILLMODE header variable unless user tells us not to. // The $FILLMODE variable just specifies if AutoCAD was in fillmode // when the user saved the DXF file, and may therefore not be what // we want when converting files. // if (fillmode == 0) converter.setFillmode(true); if (layercol) converter.setLayercol(true); if (!converter.doConvert(model)) { fprintf(stderr,"Error during conversion\n"); if (out && out != stdout) fclose(out); return -1; } converter.writeVrml(out, vrml1, only2d); if (out != stdout) fclose(out); return 0; // alles in ordnung :-) } dime/dxf2vrml/makefile.generic0100644017777301777730000000034506777114537015177 0ustar wwwwww CC = g++ -I../include -DNDEBUG LD = g++ -L../build # LD = g++ -L../build-tmake LIBS = -ldime .SUFFIXES: .cpp .o all:: dxf2vrml clean:: @rm *.o dxf2vrml .cpp.o: $(CC) -c $< dxf2vrml: dxf2vrml.o $(LD) -o $@ $^ $(LIBS) dime/dxfsphere/0040755017777301777730000000000007733212517012277 5ustar wwwwwwdime/dxfsphere/Makefile.am0100644017777301777730000000044107547257147014342 0ustar wwwwww## Process this file with automake to generate Makefile.in. INCLUDES = -I$(top_srcdir)/include noinst_PROGRAMS = dxfsphere dxfsphere_SOURCES = dxfsphere.cpp if BUILD_WITH_MSVC dxfsphere_LDADD = $(top_builddir)/src/dime0.lib else dxfsphere_LDADD = $(top_builddir)/src/libdime.la endif dime/dxfsphere/Makefile.in0100644017777301777730000002326107643247732014354 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ INCLUDES = -I$(top_srcdir)/include noinst_PROGRAMS = dxfsphere dxfsphere_SOURCES = dxfsphere.cpp @BUILD_WITH_MSVC_TRUE@dxfsphere_LDADD = $(top_builddir)/src/dime0.lib @BUILD_WITH_MSVC_FALSE@dxfsphere_LDADD = $(top_builddir)/src/libdime.la subdir = dxfsphere mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = noinst_PROGRAMS = dxfsphere$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_dxfsphere_OBJECTS = dxfsphere.$(OBJEXT) dxfsphere_OBJECTS = $(am_dxfsphere_OBJECTS) @BUILD_WITH_MSVC_TRUE@dxfsphere_DEPENDENCIES = \ @BUILD_WITH_MSVC_TRUE@ $(top_builddir)/src/dime0.lib @BUILD_WITH_MSVC_FALSE@dxfsphere_DEPENDENCIES = \ @BUILD_WITH_MSVC_FALSE@ $(top_builddir)/src/libdime.la dxfsphere_LDFLAGS = DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/dxfsphere.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ DIST_SOURCES = $(dxfsphere_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(dxfsphere_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu dxfsphere/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) dxfsphere$(EXEEXT): $(dxfsphere_OBJECTS) $(dxfsphere_DEPENDENCIES) @rm -f dxfsphere$(EXEEXT) $(CXXLINK) $(dxfsphere_LDFLAGS) $(dxfsphere_OBJECTS) $(dxfsphere_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dxfsphere.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS distclean distclean-compile \ distclean-depend distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ tags uninstall uninstall-am uninstall-info-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: dime/dxfsphere/dxfsphere.cpp0100644017777301777730000003450707704750436015006 0ustar wwwwww/* * sphere - generate a triangle mesh approximating a sphere by * recursive subdivision. First approximation is an platonic * solid; each level of refinement increases the number of * triangles by a factor of 4. * * Level 3 (128 triangles for an octahedron) is a good tradeoff if * gouraud shading is used to render the database. * * Usage: sphere [level] [-p] [-c] [-f] [-t] [-i] * level is an integer >= 1 setting the recursion level (default 1). * -c causes triangles to be generated with vertices in counterclockwise * order as viewed from the outside in a RHS coordinate system. * The default is clockwise order. * -t starts with a tetrahedron instead of an octahedron * -i starts with a icosahedron instead of an octahedron * * The subroutines print_object() and print_triangle() should * be changed to generate whatever the desired database format is. * * Jon Leech (leech @ cs.unc.edu) 3/24/89 * icosahedral code added by Jim Buddenhagen (jb1556@daditz.sbc.com) 5/93 * * C++ version and Dime output added by pederb@sim.no */ // define this to create dime3DFace, otherwise dimeLine will be used. #define DXFSPHERE_FILLED 1 // define this to use UnknownEntity instead of dime3DFace // #define DXFSPHERE_USE_UNKNOWNENTITY 1 #include #include #include #include // DIME: needed include files. #include #include #include #include #include #include #include #include #include #include #define LAYERNAME1 "MYLAYER1" // Layernames can't have spaces #define LAYERNAME2 "MYLAYER2" // Layernames can't have spaces class point { public: point() { } point(const point & p) : x(p.x), y(p.y), z(p.z) { } point(double x, double y, double z) : x(x), y(y), z(z) { } public: double x, y, z; }; class triangle { public: triangle(void) { } triangle(const point & p0, const point & p1, const point & p2, double area) { pt[0] = p0; pt[1] = p1; pt[2] = p2; area = area; } public: point pt[3]; /* Vertices of triangle */ double area; /* Unused; might be used for adaptive subdivision */ }; class object { public: object(void) : npoly(0), poly(NULL) { } object(int npoly, triangle * poly) : npoly(npoly), poly(poly) { } public: int npoly; /* # of triangles in object */ triangle *poly; /* Triangles */ }; /* Six equidistant points lying on the unit sphere */ #define XPLUS point(1, 0, 0) /* X */ #define XMIN point(-1, 0, 0) /* -X */ #define YPLUS point(0, 1, 0) /* Y */ #define YMIN point(0, -1, 0) /* -Y */ #define ZPLUS point(0, 0, 1) /* Z */ #define ZMIN point(0, 0, -1) /* -Z */ /* Vertices of a unit octahedron */ triangle octahedron[] = { triangle(XPLUS, ZPLUS, YPLUS, 0.0), triangle(YPLUS, ZPLUS, XMIN, 0.0), triangle(XMIN , ZPLUS, YMIN, 0.0), triangle(YMIN , ZPLUS, XPLUS, 0.0), triangle(XPLUS, YPLUS, ZMIN, 0.0), triangle(YPLUS, XMIN , ZMIN, 0.0), triangle(XMIN , YMIN , ZMIN, 0.0), triangle(YMIN , XPLUS, ZMIN, 0.0) }; /* A unit octahedron */ object oct(sizeof(octahedron) / sizeof(octahedron[0]), octahedron); /* Vertices of a tetrahedron */ #define sqrt_3 0.5773502692 #define PPP point(sqrt_3, sqrt_3, sqrt_3) /* +X, +Y, +Z */ #define MMP point(-sqrt_3, -sqrt_3, sqrt_3) /* -X, -Y, +Z */ #define MPM point(-sqrt_3, sqrt_3, -sqrt_3) /* -X, +Y, -Z */ #define PMM point(sqrt_3, -sqrt_3, -sqrt_3) /* +X, -Y, -Z */ /* Structure describing a tetrahedron */ triangle tetrahedron[] = { triangle(PPP, MMP, MPM, 0.0), triangle(PPP, PMM, MMP, 0.0), triangle(MPM, MMP, PMM, 0.0), triangle(PMM, PPP, MPM, 0.0) }; object tet( sizeof(tetrahedron) / sizeof(tetrahedron[0]), tetrahedron); /* Twelve vertices of icosahedron on unit sphere */ #define tau 0.8506508084 /* t=(1+sqrt(5))/2, tau=t/sqrt(1+t^2) */ #define one 0.5257311121 /* one=1/sqrt(1+t^2) , unit sphere */ #define ZA point(tau, one, 0) #define ZB point(-tau, one, 0) #define ZC point(-tau, -one, 0) #define ZD point( tau, -one, 0) #define YA point( one, 0 , tau) #define YB point( one, 0 , -tau) #define YC point(-one, 0 , -tau) #define YD point(-one, 0 , tau) #define XA point( 0 , tau, one) #define XB point( 0 , -tau, one) #define XC point( 0 , -tau, -one) #define XD point( 0 , tau, -one) /* Structure for unit icosahedron */ triangle icosahedron[] = { triangle(YA, XA, YD, 0.0), triangle(YA, YD, XB, 0.0), triangle(YB, YC, XD, 0.0), triangle(YB, XC, YC, 0.0), triangle(ZA, YA, ZD, 0.0), triangle(ZA, ZD, YB, 0.0), triangle(ZC, YD, ZB, 0.0), triangle(ZC, ZB, YC, 0.0), triangle(XA, ZA, XD, 0.0), triangle(XA, XD, ZB, 0.0), triangle(XB, XC, ZD, 0.0), triangle(XB, ZC, XC, 0.0), triangle(XA, YA, ZA, 0.0), triangle(XD, ZA, YB, 0.0), triangle(YA, XB, ZD, 0.0), triangle(YB, ZD, XC, 0.0), triangle(YD, XA, ZB, 0.0), triangle(YC, ZB, XD, 0.0), triangle(YD, ZC, XB, 0.0), triangle(YC, XC, ZC, 0.0) }; /* unit icosahedron */ object ico(sizeof(icosahedron) / sizeof(icosahedron[0]), icosahedron); /* Forward declarations */ point *normalize(point * p); point *midpoint(point * a, point * b); void flip_object(object * obj); void print_object(object * obj, int level, dimeModel & model, const char * layername); void print_triangle(triangle *t, dimeModel & model, const dimeLayer * layer); static void add_layer(const char * name, int colnum, dimeModel * model, dimeTable * layers) { dimeLayerTable * layer = new dimeLayerTable; layer->setLayerName(name, NULL); layer->setColorNumber(colnum); // the color numbers are defined in dime/Layer.cpp. // need to set some extra records so that AutoCAD will stop // complaining dimeParam param; param.string_data = "CONTINUOUS"; layer->setRecord(6, param); param.int16_data = 64; layer->setRecord(70, param); layer->registerLayer(model); // important, register layer in model layers->insertTableEntry(layer); } int main(int ac, char ** av) { object * old = &oct, /* Default is octahedron */ * newobj; int ccwflag = 1, /* Reverse vertex order if true */ i, level, /* Current subdivision level */ maxlevel = 0; /* Maximum subdivision level */ char * outfile = NULL; /* Parse arguments */ for (i = 1; i < ac; i++) { if (!strcmp(av[i], "-c")) ccwflag = 1; else if (!strcmp(av[i], "-t")) old = &tet; else if (!strcmp(av[i], "-i")) old = &ico; else if (!strcmp(av[i], "-o") && i < ac-1) { outfile = av[i+1]; i++; } else if (isdigit(av[i][0])) { if ((maxlevel = atoi(av[i])) < 1) { fprintf(stderr, "dxfsphere: # of levels must be >= 1\n"); exit(1); } } else { break; } } if (i < ac || ac == 1) { fprintf(stderr, "dxfsphere: [-c] [-t] [-i] [-o ] \n"); exit(1); } // DIME: initialize output file dimeOutput out; if (!outfile || !out.setFilename(outfile)) { out.setFileHandle(stdout); } // DIME: create dime model dimeModel model; // DIME: only needed if you need your object to be in a layer { // DIME: add tables section (needed for layers). dimeTablesSection * tables = new dimeTablesSection; model.insertSection(tables); // DIME: set up a layer table to store our layers dimeTable * layers = new dimeTable(NULL); // DIME: set up our layers add_layer(LAYERNAME1, 16, &model, layers); add_layer(LAYERNAME2, 8, &model, layers); // DIME: insert the layer in the table tables->insertTable(layers); } // DIME: add the entities section. dimeEntitiesSection * entities = new dimeEntitiesSection; model.insertSection(entities); if (ccwflag) flip_object(old); /* Subdivide each starting triangle (maxlevel - 1) times */ for (level = 1; level < maxlevel; level++) { /* Allocate a new object */ /* FIXME: Valgrind reports an 8-byte memory leak here. 20030404 mortene. */ newobj = (object *)malloc(sizeof(object)); if (newobj == NULL) { fprintf(stderr, "%s: Out of memory on subdivision level %d\n", av[0], level); exit(1); } newobj->npoly = old->npoly * 4; /* Allocate 4* the number of points in the current approximation */ newobj->poly = (triangle *)malloc(newobj->npoly * sizeof(triangle)); if (newobj->poly == NULL) { fprintf(stderr, "%s: Out of memory on subdivision level %d\n", av[0], level); exit(1); } /* Subdivide each triangle in the old approximation and normalize * the new points thus generated to lie on the surface of the unit * sphere. * Each input triangle with vertices labelled [0,1,2] as shown * below will be turned into four new triangles: * * Make new points * a = (0+2)/2 * b = (0+1)/2 * c = (1+2)/2 * 1 * /\ Normalize a, b, c * / \ * b/____\ c Construct new triangles * /\ /\ [0,b,a] * / \ / \ [b,1,c] * /____\/____\ [a,b,c] * 0 a 2 [a,c,2] */ for (i = 0; i < old->npoly; i++) { triangle *oldt = &old->poly[i], *newt = &newobj->poly[i*4]; point a, b, c; a = *normalize(midpoint(&oldt->pt[0], &oldt->pt[2])); b = *normalize(midpoint(&oldt->pt[0], &oldt->pt[1])); c = *normalize(midpoint(&oldt->pt[1], &oldt->pt[2])); newt->pt[0] = oldt->pt[0]; newt->pt[1] = b; newt->pt[2] = a; newt++; newt->pt[0] = b; newt->pt[1] = oldt->pt[1]; newt->pt[2] = c; newt++; newt->pt[0] = a; newt->pt[1] = b; newt->pt[2] = c; newt++; newt->pt[0] = a; newt->pt[1] = c; newt->pt[2] = oldt->pt[2]; } if (level > 1) { free(old->poly); free(old); } /* Continue subdividing new triangles */ old = newobj; } /* Print out resulting approximation */ print_object(old, maxlevel, model, LAYERNAME1); // DIME: write the model to file model.write(&out); return 0; } /* Normalize a point p */ point * normalize(point * p) { static point r; double mag; r = *p; mag = r.x * r.x + r.y * r.y + r.z * r.z; if (mag != 0.0) { mag = 1.0 / sqrt(mag); r.x *= mag; r.y *= mag; r.z *= mag; } return &r; } /* Return the midpoint on the line between two points */ point * midpoint(point * a, point * b) { static point r; r.x = (a->x + b->x) * 0.5; r.y = (a->y + b->y) * 0.5; r.z = (a->z + b->z) * 0.5; return &r; } /* Reverse order of points in each triangle */ void flip_object(object * obj) { int i; for (i = 0; i < obj->npoly; i++) { point tmp; tmp = obj->poly[i].pt[0]; obj->poly[i].pt[0] = obj->poly[i].pt[2]; obj->poly[i].pt[2] = tmp; } } /* Write out all triangles in an object */ void print_object(object * obj, int level, dimeModel & model, const char * layername) { int i; const dimeLayer * layer = model.getLayer(layername); for (i = 0; i < obj->npoly; i++) { print_triangle(&obj->poly[i], model, layer); } } /* Output a triangle */ void print_triangle(triangle * t, dimeModel & model, const dimeLayer * layer) { #if defined(DXFSPHERE_FILLED) && !defined(DXFSPHERE_USE_UNKNOWNENTITY) // filled, create dime3DFace int i; // DIME: create a 3DFACE entity, and set it to contain a triangle dime3DFace * face = new dime3DFace; if (layer) { face->setLayer(layer); } dimeVec3f v[3]; for (i = 0; i < 3; i++) { v[i].x = t->pt[i].x; v[i].y = t->pt[i].y; v[i].z = t->pt[i].z; } face->setTriangle(v[0], v[1], v[2]); // DIME: create a unique handle for this entity. const int BUFSIZE = 1024; char buf[BUFSIZE]; const char * handle = model.getUniqueHandle(buf, BUFSIZE); dimeParam param; param.string_data = handle; face->setRecord(5, param); // DIME: add entity to model model.addEntity(face); #elif defined(DXFSPHERE_USE_UNKNOWNENTITY) // DIME: create a dimeUnknownEntity, and set it to contain a triangle dimeUnknownEntity * face = new dimeUnknownEntity("3DFACE", NULL); if (layer) { face->setLayer(layer); } dimeParam param; // 10,20,30 is the first vertex // 11,21,31 is the second vertex // 12,22,32 is the third vertex for (int i = 0; i < 3; i++) { param.double_data = t->pt[i].x; face->setRecord(i + 10, param); param.double_data = t->pt[i].y; face->setRecord(i + 20, param); param.double_data = t->pt[i].z; face->setRecord(i + 30, param); } // to make 3DFACE contain a triangle and not a quad, the fourth // vertex must be equal to the third. We therefore iterate from 0 to // 4, but clamp the index when fetching the vertex from the triangle // structure. param.double_data = t->pt[2].x; face->setRecord(13, param); param.double_data = t->pt[2].y; face->setRecord(23, param); param.double_data = t->pt[2].z; face->setRecord(33, param); // DIME: create a unique handle for this entity. const int BUFSIZE = 1024; char buf[BUFSIZE]; const char * handle = model.getUniqueHandle(buf, BUFSIZE); param.string_data = handle; face->setRecord(5, param); // DIME: add entity to model model.addEntity(face); #else // create three dimeLine entities to represent the triangle int i; for (i = 0; i < 3; i++) { // DIME: create a LINE entity dimeLine * line = new dimeLine; if (layer) { line->setLayer(layer); } dimeVec3f v[2]; v[0].x = t->pt[i].x; v[0].y = t->pt[i].y; v[0].z = t->pt[i].z; v[1].x = t->pt[(i+1)%3].x; v[1].y = t->pt[(i+1)%3].y; v[1].z = t->pt[(i+1)%3].z; line->setCoords(0, v[0]); line->setCoords(1, v[1]); // DIME: create unique handle for the entity (needed to load the file into AutoCAD) const int BUFSIZE = 1024; char buf[BUFSIZE]; const char * handle = model.getUniqueHandle(buf, BUFSIZE); dimeParam param; param.string_data = handle; line->setRecord(5, param); // DIME: add entity to model model.addEntity(line); } #endif // ! DXFSPHERE_FILLED } dime/include/0040755017777301777730000000000007733212517011732 5ustar wwwwwwdime/include/config.h.in0100644017777301777730000000265707466757361014002 0ustar wwwwww/* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* 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 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION dime/include/stamp-h.in0100644017777301777730000000000007455303764013624 0ustar wwwwwwdime/include/dime/0040755017777301777730000000000007733212517012650 5ustar wwwwwwdime/include/dime/Base.h0100644017777301777730000000547207640532504013676 0ustar wwwwww/**************************************************************************\ * * FILE: Base.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_BASE_H #define DIME_BASE_H #include #include // for size_t class dimeMemHandler; class DIME_DLL_API dimeBase { public: enum { dimeBaseType = 1, dimeRecordType, dimeStringRecordType, dimeFloatRecordType, dimeDoubleRecordType, dimeInt8RecordType, dimeInt16RecordType, dimeInt32RecordType, dimeHexRecordType, dimeRecordHolderType, dimeClassType, dimeUnknownClassType, dimeObjectType, dimeUnknownObjectType, dimeEntityType, dimeUnknownEntityType, dimePolylineType, dimeVertexType, dimeFaceEntityType, dimeExtrusionEntityType, dime3DFaceType, dimeSolidType, dimeTraceType, dimeLineType, dimePointType, dimeBlockType, dimeInsertType, dimeCircleType, dimeArcType, dimeLWPolylineType, dimeEllipseType, dimeSplineType, dimeSectionType, dimeUnknownSectionType, dimeEntitiesSectionType, dimeBlocksSectionType, dimeTablesSectionType, dimeHeaderSectionType, dimeClassesSectionType, dimeObjectsSectionType, dimeTableType, dimeTableEntryType, dimeUnknownTableType, dimeUCSTableType, dimeLayerTableType, // this should be last dimeLastTypeTag }; dimeBase(void); virtual ~dimeBase(); virtual int typeId() const = 0; virtual bool isOfType(const int thetypeid) const; public: void *operator new(size_t size, dimeMemHandler *memhandler = NULL, const int alignment = 4); void operator delete(void *ptr); }; // class dimeBase #endif // ! DIME_BASE_H dime/include/dime/Basic.h0100644017777301777730000001361207674101744014045 0ustar wwwwww/**************************************************************************\ * * FILE: Basic.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_BASIC_H #define DIME_BASIC_H #include #include #include #include #include #include // we prefer to use floats to save mem. Applications needing // scientific calculations should typedef this to double typedef float dxfdouble; #ifdef _WIN32 #include "float.h" #define M_PI 3.14159265357989 #endif #define DXFABS(x) ((x)<0?-(x):(x)) #define DXFMAX(x,y) ((x)>(y)?(x):(y)) #define DXFMIN(x,y) ((x)<(y)?(x):(y)) #define DXFDEG2RAD(x) (M_PI*(x)/180.0) #define DXFRAD2DEG(x) (180.0*(x)/M_PI) #ifdef __sgi #define bool int #define true 1 #define false 0 #endif // __sgi template inline T DXFSQR(const T x) { return x*x; } #if defined(__BEOS__) #include #else // ! defined(__BEOS__) typedef signed char int8; typedef unsigned char uint8; typedef signed short int16; typedef unsigned short uint16; #ifdef _WIN32 typedef long int32; #else // ! defined(_WIN32) typedef signed int int32; #endif // ! defined(_WIN32) typedef unsigned int uint32; #endif // ! defined(__BEOS__) #ifdef macintosh char* strdup( const char* ); #endif #define ARRAY_NEW(memh, type, num) \ memh ? (type*) memh->allocMem((num)*sizeof(type)) : new type[num] #define DXF_STRCPY(mh, d, s) \ mh ? d = mh->stringAlloc(s) : d = new char[strlen(s)+1]; if (d) strcpy(d,s) typedef bool dimeCallbackFunc(const class dimeState * const, class dimeEntity *, void *); typedef dimeCallbackFunc * dimeCallback; typedef union { int8 int8_data; int16 int16_data; int32 int32_data; float float_data; dxfdouble double_data; const char *string_data; const char *hex_data; } dimeParam; /* ********************************************************************** */ /* Precaution to avoid an some errors easily made by the application programmer. */ #ifdef DIME_DLL_API # error Leave the internal DIME_DLL_API define alone. #endif /* DIME_DLL_API */ #ifdef DIME_INTERNAL # ifdef DIME_NOT_DLL # error The DIME_NOT_DLL define is not supposed to be used when building the library, only when building Win32 applications. # endif /* DIME_INTERNAL && DIME_NOT_DLL */ # ifdef DIME_DLL # error The DIME_DLL define is not supposed to be used when building the library, only when building Win32 applications. # endif /* DIME_INTERNAL && DIME_DLL */ #endif /* DIME_INTERNAL */ /* On MSWindows platforms, one of these defines must always be set when building application programs: - "DIME_DLL", when the application programmer is using the library in the form of a dynamic link library (DLL) - "DIME_NOT_DLL", when the application programmer is using the library in the form of a static object library (LIB) Note that either DIME_DLL or DIME_NOT_DLL _must_ be defined by the application programmer on MSWindows platforms, or else the #error statement will hit. Set up one or the other of these two defines in your compiler environment according to how the library was built -- as a DLL (use "DIME_DLL") or as a LIB (use "DIME_NOT_DLL"). (Setting up defines for the compiler is typically done by either adding something like "/DDIME_DLL" to the compiler's argument line (for command-line build processes), or by adding the define to the list of preprocessor symbols in your IDE GUI (in the MSVC IDE, this is done from the "Project"->"Settings" menu, choose the "C/C++" tab, then "Preprocessor" from the dropdown box and add the appropriate define)). It is extremely important that the application programmer uses the correct define, as using "DIME_NOT_DLL" when "DIME_DLL" is correct will cause mysterious crashes. */ /* FIXME: use a feature check to see if this is a platform which can recognize the __declspec keyword instead of the crap #if below. 20011201 mortene. */ #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) # ifdef DIME_INTERNAL # ifdef DIME_MAKE_DLL # define DIME_DLL_API __declspec(dllexport) # endif /* DIME_MAKE_DLL */ # else /* !DIME_INTERNAL */ # ifdef DIME_DLL # ifdef DIME_NOT_DLL # error Do not define both DIME_DLL and DIME_NOT_DLL at the same time # endif # define DIME_DLL_API __declspec(dllimport) # else /* !DIME_DLL */ # ifndef DIME_NOT_DLL # error Define either DIME_DLL or DIME_NOT_DLL as appropriate for your linkage! See dime/Basic.h for further instructions. # endif /* DIME_NOT_DLL */ # endif /* !DIME_DLL */ # endif /* !DIME_INTERNAL */ #endif /* Microsoft Windows */ /* Empty define to avoid errors when _not_ compiling an MSWindows DLL. */ #ifndef DIME_DLL_API # define DIME_DLL_API #endif /* !DIME_DLL_API */ /* ********************************************************************** */ #endif // !DIME_BASIC_H dime/include/dime/Input.h0100644017777301777730000000652407455302007014117 0ustar wwwwww/**************************************************************************\ * * FILE: Input.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_INPUT_H #define DIME_INPUT_H #include #include #define DXF_MAXLINELEN 4096 class DIME_DLL_API dimeInput { public: dimeInput(); ~dimeInput(); bool setFileHandle(FILE *fp); bool setFile(const char * const filename); bool setFilePointer(const int fd); bool eof() const; void setCallback(int (*cb)(float, void *), void *cbdata); float relativePosition(); void putBackGroupCode(const int32 code); bool readGroupCode(int32 &code); bool readInt8(int8 &val); bool readInt16(int16 &val); bool readInt32(int32 &val); bool readFloat(float &val); bool readDouble(dxfdouble &val); const char *readString(); class dimeModel *getModel(); class dimeMemHandler *getMemHandler(); int getFilePosition() const; bool isBinary() const; int getVersion() const; bool isAborted() const; private: friend class dimeModel; dimeModel *model; // set by the dimeModel class. int filePosition; bool binary; bool binary16bit; int version; int fd; #ifdef USE_GZFILE void *gzfp; // gzip file pointer bool gzeof; #else // ! USE_GZFILE FILE *fp; bool fpeof; #endif // ! USE_GZFILE long filesize; char *readbuf; int readbufIndex; int readbufLen; dimeArray backBuf; int backBufIndex; char lineBuf[DXF_MAXLINELEN]; int32 putBackCode; bool hasPutBack; int (*callback)(float, void*); void *callbackdata; float prevposition; int cbcnt; bool aborted; bool prevwashandle; bool didOpenFile; bool endianSwap; private: bool init(); bool doBufferRead(); void putBack(const char c); void putBack(const char * const string); bool get(char &c); bool read(char &c); bool skipWhiteSpace(); bool nextLine(); bool readInteger(long &l); bool readUnsignedInteger(unsigned long &l); bool readUnsignedIntegerString(char * const str); int readDigits(char * const string); int readHexDigits(char * const string); int readChar(char * const string, char charToRead); bool readReal(dxfdouble &d); bool checkBinary(); }; // class dimeInput #endif // ! DIME_INPUT_H dime/include/dime/Layer.h0100644017777301777730000000540307654443361014101 0ustar wwwwww/**************************************************************************\ * * FILE: Layer.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_LAYER_H #define DIME_LAYER_H #include class DIME_DLL_API dimeLayer { public: enum Flags { FROZEN = 0x1, FROZEN_NEW_VIEWPORTS = 0x2, LOCKED = 0x4 }; const char *getLayerName() const; int getLayerNum() const; int16 getColorNumber() const; void setColorNumber(const int16 num); int16 getFlags() const; void setFlags(const int16 &flags); bool isDefaultLayer() const; static const dimeLayer *getDefaultLayer(); static void colorToRGB(const int colornum, dxfdouble &r, dxfdouble &g, dxfdouble &b); private: friend class dimeModel; dimeLayer(); dimeLayer(const char * const name, const int num, const int16 colnum, const int16 flags); const char *layerName; int layerNum; int16 colorNum; int16 flags; static void cleanup_default_layer(void); static dimeLayer * defaultLayer; }; // class dimeLayer inline const char * dimeLayer::getLayerName() const { return layerName; } inline int dimeLayer::getLayerNum() const { return layerNum; } inline int16 dimeLayer::getColorNumber() const { return colorNum; } inline void dimeLayer::setColorNumber(const int16 num) { this->colorNum = num; } inline int16 dimeLayer::getFlags() const { return this->flags; } inline void dimeLayer::setFlags(const int16 &flags) { this->flags = flags; } inline bool dimeLayer::isDefaultLayer() const { return this == dimeLayer::getDefaultLayer(); } #endif // ! DIME_LAYER_H dime/include/dime/Model.h0100644017777301777730000000735007546561317014072 0ustar wwwwww/**************************************************************************\ * * FILE: Model.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_MODEL_H #define DIME_MODEL_H #include #include #include #include #include #include class dimeInput; class dimeOutput; class dimeDict; class dimeMemHandler; class dimeSection; class dimeEntitiesSection; class dimeBlocksSection; class dimeBlock; class dimeEntity; class dimeRecord; class DIME_DLL_API dimeModel { public: dimeModel(const bool usememhandler = false); ~dimeModel(); dimeModel *copy() const; bool init(); bool read(dimeInput * const in); bool write(dimeOutput * const out); int countRecords() const; bool traverseEntities(dimeCallback callback, void *userdata = NULL, bool traverseBlocksSection = false, bool explodeInserts = true, bool traversePolylineVertices = false); const char *addReference(const char * const name, void *id); void *findReference(const char * const name) const; const char *findRefStringPtr(const char * const name) const; void removeReference(const char * const name); class dimeMemHandler *getMemHandler(); int getNumLayers() const; const class dimeLayer *getLayer(const int idx) const; const class dimeLayer *getLayer(const char * const layername) const; const class dimeLayer *addLayer(const char * const layername, const int16 colnum = 7, const int16 flags = 0); const char * getDxfVersion() const; static const char *getVersionString(); static void getVersion(int &major, int &minor); const char *addBlock(const char * const blockname, dimeBlock * const block); class dimeBlock *findBlock(const char * const blockname); class dimeSection *findSection(const char * const sectionname); const class dimeSection *findSection(const char * const sectionname) const; int getNumSections() const; class dimeSection *getSection(const int idx); void insertSection(dimeSection * const section, const int idx = -1); void removeSection(const int idx); void registerHandle(const int handle); void registerHandle(const char * const handle); int getUniqueHandle(); const char *getUniqueHandle(char *buf, const int bufsize); void addEntity(dimeEntity *entity); private: class dimeDict *refDict; class dimeDict *layerDict; class dimeMemHandler *memoryHandler; dimeArray sections; dimeArray layers; dimeArray headerComments; int largestHandle; bool usememhandler; }; // class dimeModel #endif // ! DIME_MODEL_H dime/include/dime/Output.h0100644017777301777730000000437307636033352014325 0ustar wwwwww/**************************************************************************\ * * FILE: Output.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_OUTPUT_H #define DIME_OUTPUT_H #include #include class DIME_DLL_API dimeOutput { public: dimeOutput(); ~dimeOutput(); void setCallback(const int numrecords, int (*cb)(float, void *), void *cbdata); bool setFileHandle(FILE *fp); bool setFilename(const char * const filename); void setBinary(const bool state = true); bool isBinary() const; bool writeHeader() {return true;} bool writeGroupCode(const int groupcode); bool writeInt8(const int8 val); bool writeInt16(const int16 val); bool writeInt32(const int32 val); bool writeFloat(const float val); bool writeDouble(const dxfdouble val); bool writeString(const char * const str); int getUniqueHandleId(); private: friend class dimeModel; dimeModel *model; FILE *fp; bool binary; int (*callback)(float, void*); void *callbackdata; int numrecords; int numwrites; bool aborted; bool didOpenFile; }; // class dimeOutput #endif // ! DIME_OUTPUT_H dime/include/dime/RecordHolder.h0100644017777301777730000000605707455302007015375 0ustar wwwwww/**************************************************************************\ * * FILE: RecordHolder.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_RECORDHOLDER_H #define DIME_RECORDHOLDER_H #include class dimeInput; class dimeMemHandler; class dimeOutput; class dimeRecord; class DIME_DLL_API dimeRecordHolder : public dimeBase { public: dimeRecordHolder(const int separator); virtual ~dimeRecordHolder(); void setRecord(const int groupcode, const dimeParam &value, dimeMemHandler * const memhandler = NULL); void setRecords(const int * const groupcodes, const dimeParam * const params, const int numrecords, dimeMemHandler * const memhandler = NULL); void setIndexedRecord(const int groupcode, const dimeParam &value, const int index, dimeMemHandler * const memhandler = NULL); virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual bool isOfType(const int thetypeid) const; virtual int countRecords() const; dimeRecord *findRecord(const int groupcode, const int index = 0); int getNumRecordsInRecordHolder(void) const; dimeRecord * getRecordInRecordHolder(const int idx) const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); bool copyRecords(dimeRecordHolder * const rh, dimeMemHandler * const memhandler) const; virtual bool shouldWriteRecord(const int groupcode) const; protected: dimeRecord **records; int numRecords; // int separator; // not needed ? private: void setRecordCommon(const int groupcode, const dimeParam ¶m, const int index, dimeMemHandler * const memhandler); }; // class dimeRecordHolder #endif // ! DIME_RECORDHOLDER_H dime/include/dime/State.h0100644017777301777730000000506507455302007014077 0ustar wwwwww/**************************************************************************\ * * FILE: State.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_STATE_H #define DIME_STATE_H #include class dimeInsert; class DIME_DLL_API dimeState { public: dimeState(const bool traversePolylineVertices, const bool explodeInserts); dimeState(const dimeState &st); const dimeMatrix &getMatrix() const; const dimeMatrix &getInvMatrix() const; void getMatrix(dimeMatrix &m) const; void setMatrix(const dimeMatrix &matrix); enum { TRAVERSE_POLYLINE_VERTICES = 0x1, EXPLODE_INSERTS = 0x2, // private flags PUBLIC_MASK = 0x7fff, PRIVATE_MASK = 0x8000, INVMATRIX_DIRTY = 0x8000 }; void setFlags(const unsigned int flags); unsigned int getFlags() const; const dimeInsert *getCurrentInsert() const; private: friend class dimeInsert; dimeMatrix matrix; dimeMatrix invmatrix; // to speed up things... unsigned int flags; const dimeInsert *currentInsert; }; // class dimeState inline const dimeMatrix & dimeState::getMatrix() const { return this->matrix; } inline void dimeState::setFlags(const unsigned int flags) { this->flags = (this->flags & PRIVATE_MASK) | flags; } inline unsigned int dimeState::getFlags() const { return (this->flags & PUBLIC_MASK); } inline const dimeInsert * dimeState::getCurrentInsert() const { return this->currentInsert; } #endif // ! DIME_STATE_H dime/include/dime/classes/0040755017777301777730000000000007733212517014305 5ustar wwwwwwdime/include/dime/classes/Class.h0100644017777301777730000000703107455302007015514 0ustar wwwwww/**************************************************************************\ * * FILE: Class.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_CLASS_H #define DIME_CLASS_H #include #include #include #include #include class dimeInput; class dimeMemHandler; class dimeOutput; class DIME_DLL_API dimeClass : public dimeRecordHolder { friend class dimeClassesSection; friend class dimeModel; public: dimeClass(); virtual ~dimeClass(); virtual const char *getDxfClassName() const = 0; virtual dimeClass *copy(dimeModel * const model) const = 0; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual bool isOfType(const int thetypeid) const; virtual int countRecords() const; const char *getClassName() const; const char *getApplicationName() const; int32 getVersionNumber() const; int8 getFlag280() const; int8 getFlag281() const; void setClassName(const char * const classname, dimeMemHandler * const memhandler = NULL); void setApplicationName(const char * const appname, dimeMemHandler * const memhandler = NULL); void setVersionNumber(const int32 v); void setFlag280(const int8 flag); void setFlag281(const int8 flag); protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); public: static dimeClass *createClass(const char * const name, dimeMemHandler * const memhandler = NULL); protected: bool copyRecords(dimeClass * const newclass, dimeModel * const model) const; private: char *className; char *appName; int32 versionNumber; int8 flag1; int8 flag2; }; // class dimeClass inline const char * dimeClass::getClassName() const { return this->className; } inline const char * dimeClass::getApplicationName() const { return this->appName; } inline int32 dimeClass::getVersionNumber() const { return this->versionNumber; } inline int8 dimeClass::getFlag280() const { return this->flag1; } inline int8 dimeClass::getFlag281() const { return this->flag2; } inline void dimeClass::setVersionNumber(const int32 v) { this->versionNumber = v; } inline void dimeClass::setFlag280(const int8 flag) { this->flag1 = flag; } inline void dimeClass::setFlag281(const int8 flag) { this->flag2 = flag; } #endif // ! DIME_CLASS_H dime/include/dime/classes/UnknownClass.h0100644017777301777730000000355707455302007017105 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownClass.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_UNKNOWNCLASS_H #define DIME_UNKNOWNCLASS_H #include class dimeMemHandler; class DIME_DLL_API dimeUnknownClass : public dimeClass { public: dimeUnknownClass(const char * const name, dimeMemHandler * const memhandler); virtual ~dimeUnknownClass(); virtual dimeClass *copy(dimeModel * const model) const; virtual const char *getDxfClassName() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; private: char *dxfClassName; }; // class dimeUnknownClass #endif // ! DIME_UNKNOWNCLASS_H dime/include/dime/convert/0040755017777301777730000000000007733212517014330 5ustar wwwwwwdime/include/dime/convert/convert.h0100644017777301777730000000556307455302007016162 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #ifndef _DXF2VRML_CONVERT_H_ #define _DXF2VRML_CONVERT_H_ #include #include class dimeModel; class dxfLayerData; class dimeState; class dimeEntity; class DIME_DLL_API dxfConverter { public: dxfConverter(); ~dxfConverter(); void setMaxerr(const dxfdouble maxerr) { this->maxerr = maxerr; } void findHeaderVariables(dimeModel &model); bool doConvert(dimeModel &model); bool writeVrml(FILE *out, const bool vrml1 = false, const bool only2d = false); void setNumSub(const int num) { this->numsub = num; } int getNumSub() const { return numsub; } dxfdouble getMaxerr() const { return this->maxerr; } void setFillmode(const bool fill) { this->fillmode = fill; } bool getFillmode() const { return this->fillmode; } bool getLayercol() const { return this->layercol; } void setLayercol(const bool v) { this->layercol = v; } dxfLayerData *getLayerData(const int colidx); dxfLayerData *getLayerData(const dimeEntity *entity); dxfLayerData ** getLayerData(); int getColorIndex(const dimeEntity *entity); int getCurrentInsertColorIndex() const { return currentInsertColorIndex; } private: friend class dime2Profit; friend class dime2So; dxfLayerData *layerData[255]; int dummy[4]; dxfdouble maxerr; int currentInsertColorIndex; dimeEntity *currentPolyline; int numsub; bool fillmode; bool layercol; bool private_callback(const dimeState * const state, dimeEntity *entity); static bool dime_callback(const dimeState * const state, dimeEntity *entity, void *); }; #endif // _DXF2VRML_CONVERT_H_ dime/include/dime/convert/layerdata.h0100644017777301777730000000471207455302007016443 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #ifndef _DXF2VRML_LAYERDATA_H_ #define _DXF2VRML_LAYERDATA_H_ #include #include #include #include class DIME_DLL_API dxfLayerData { public: dxfLayerData(const int colidx); ~dxfLayerData(); void setFillmode(const bool fillmode); void addLine(const dimeVec3f &v0, const dimeVec3f &v1, const dimeMatrix * const matrix = NULL); void addPoint(const dimeVec3f &v, const dimeMatrix * const matrix = NULL); void addTriangle(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeMatrix * const matrix = NULL); void addQuad(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeVec3f &v3, const dimeMatrix * const matrix = NULL); void writeWrl(FILE *fp, int indent, const bool vrml1, const bool only2d); //private: public: // 20011001 thammer - please don't kill me for this ;-) friend class dime2So; friend class dime2Profit; bool fillmode; int colidx; dimeBSPTree facebsp; dimeArray faceindices; dimeBSPTree linebsp; dimeArray lineindices; dimeArray points; }; #endif // _DXF2VRML_LAYERDATA_H_ dime/include/dime/entities/0040755017777301777730000000000007733212517014474 5ustar wwwwwwdime/include/dime/entities/3DFace.h0100644017777301777730000000473407455302007015672 0ustar wwwwww/**************************************************************************\ * * FILE: 3DFace.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_3DFACE_H #define DIME_3DFACE_H #include #include #include class DIME_DLL_API dime3DFace : public dimeFaceEntity { friend class dimeEntitiesSection; friend class dimeBlock; friend class dimeModel; friend class dimeEntity; friend class dimeSolid; friend class dimeTrace; public: dime3DFace(); virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; enum Flags { EDGE1_INVISIBLE = 0x0001, EDGE2_INVISIBLE = 0x0002, EDGE3_INVISIBLE = 0x0004, EDGE4_INVISIBLE = 0x0008 }; void setFlags(const int16 flags); int16 getFlags() const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); int16 flags; public: #ifndef NO_RR_DATA class dimeBlock *block; // ugly, needed for RR #endif }; // class dime3DFace #endif // ! DIME_3DFACE_H dime/include/dime/entities/Arc.h0100644017777301777730000000632207455302007015345 0ustar wwwwww/**************************************************************************\ * * FILE: Arc.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_ARC_H #define DIME_ARC_H #include #include #include class DIME_DLL_API dimeArc : public dimeExtrusionEntity { public: dimeArc(); void setCenter(const dimeVec3f &c); void getCenter(dimeVec3f &c) const; void setRadius(const dxfdouble r); dxfdouble getRadius() const; void setStartAngle(const dxfdouble a); dxfdouble getStartAngle() const; void setEndAngle(const dxfdouble a); dxfdouble getEndAngle() const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual dimeEntity *copy(dimeModel * const model) const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f center; dxfdouble radius; dxfdouble startAngle; dxfdouble endAngle; }; // class dimeArc // // inline methods // inline void dimeArc::setCenter(const dimeVec3f &c) { this->center = c; } inline void dimeArc::getCenter(dimeVec3f &c) const { c = this->center; } inline void dimeArc::setRadius(const dxfdouble r) { this->radius = r; } inline dxfdouble dimeArc::getRadius() const { return this->radius; } inline void dimeArc::setStartAngle(const dxfdouble a) { this->startAngle = a; } inline dxfdouble dimeArc::getStartAngle() const { return this->startAngle; } inline void dimeArc::setEndAngle(const dxfdouble a) { this->endAngle = a; } inline dxfdouble dimeArc::getEndAngle() const { return this->endAngle; } #endif // ! DIME_ARC_H dime/include/dime/entities/Block.h0100644017777301777730000000703407455302007015673 0ustar wwwwww/**************************************************************************\ * * FILE: Block.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_BLOCK_H #define DIME_BLOCK_H #include #include #include class dimeInput; class dimeMemHandler; class dimeModel; class dimeOutput; class DIME_DLL_API dimeBlock : public dimeEntity { friend class dimeBlocksSection; friend class dimeEntitiesSection; friend class dimeInsert; friend class dimeModel; public: dimeBlock(dimeMemHandler * const memhandler); virtual ~dimeBlock(); const dimeVec3f &getBasePoint() const; void setBasePoint(const dimeVec3f &v); int getNumEntities() const; dimeEntity *getEntity(const int idx); void insertEntity(dimeEntity * const entity, const int idx = -1); void removeEntity(const int idx, const bool deleteIt = true); void fitEntities(); const char *getName() const; void setName(const char * const name); dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam & param, dimeMemHandler * const memhandler); virtual void fixReferences(dimeModel * const model); virtual bool traverse(const dimeState * const state, dimeCallback callback, void *userdata); private: int16 flags; const char *name; dimeVec3f basePoint; dimeArray entities; dimeEntity *endblock; dimeMemHandler *memHandler; }; // class dimeBlock inline const dimeVec3f & dimeBlock::getBasePoint() const { return this->basePoint; } inline void dimeBlock::setBasePoint(const dimeVec3f &v) { this->basePoint = v; } inline int dimeBlock::getNumEntities() const { return this->entities.count(); } inline dimeEntity * dimeBlock::getEntity(const int idx) { assert(idx >= 0 && idx < this->entities.count()); return this->entities[idx]; } inline const char * dimeBlock::getName() const { return this->name; } inline void dimeBlock::setName(const char * const name) { this->name = name; } #endif // ! DIME_BLOCK_H dime/include/dime/entities/Circle.h0100644017777301777730000000534407455302007016044 0ustar wwwwww/**************************************************************************\ * * FILE: Circle.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_CIRCLE_H #define DIME_CIRCLE_H #include #include #include class dimeModel; class dimeMemHandler; class DIME_DLL_API dimeCircle : public dimeExtrusionEntity { public: dimeCircle(); const dimeVec3f &getCenter() const; void setCenter(const dimeVec3f &c); void setRadius(const dxfdouble val); dxfdouble getRadius() const; virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f center; dxfdouble radius; }; // class dimeCircle inline const dimeVec3f & dimeCircle::getCenter() const { return this->center; } inline void dimeCircle::setCenter(const dimeVec3f &c) { this->center = c; } inline void dimeCircle::setRadius(const dxfdouble val) { this->radius = val; } inline dxfdouble dimeCircle::getRadius() const { return this->radius; } #endif // ! DIME_CIRCLE_H dime/include/dime/entities/Ellipse.h0100644017777301777730000000676707455302007016252 0ustar wwwwww/**************************************************************************\ * * FILE: Ellipse.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_ELLIPSE_H #define DIME_ELLIPSE_H #include #include #include // // please note that the thickness will always be 0.0 for this entity // class DIME_DLL_API dimeEllipse : public dimeExtrusionEntity { public: dimeEllipse(); void setCenter(const dimeVec3f &c); const dimeVec3f &getCenter() const; void setMajorAxisEndpoint(const dimeVec3f &v); const dimeVec3f &getMajorAxisEndpoint() const; void setMinorMajorRatio(const dxfdouble ratio); dxfdouble getMinorMajorRatio() const; void setStartParam(const dxfdouble p); dxfdouble getStartParam() const; void setEndParam(const dxfdouble p); dxfdouble getEndParam() const; virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f center; dimeVec3f majorAxisEndpoint; dxfdouble ratio; dxfdouble startParam; dxfdouble endParam; }; // class dimeEllipse inline const dimeVec3f & dimeEllipse::getCenter() const { return this->center; } inline void dimeEllipse::setCenter(const dimeVec3f &c) { this->center = c; } inline void dimeEllipse::setMajorAxisEndpoint(const dimeVec3f &v) { this->majorAxisEndpoint = v; } inline const dimeVec3f & dimeEllipse::getMajorAxisEndpoint() const { return this->majorAxisEndpoint; } inline void dimeEllipse::setMinorMajorRatio(const dxfdouble ratio) { this->ratio = ratio; } inline dxfdouble dimeEllipse::getMinorMajorRatio() const { return this->ratio; } inline void dimeEllipse::setStartParam(const dxfdouble p) { this->startParam = p; } inline dxfdouble dimeEllipse::getStartParam() const { return this->startParam; } inline void dimeEllipse::setEndParam(const dxfdouble p) { this->endParam = p; } inline dxfdouble dimeEllipse::getEndParam() const { return this->endParam; } #endif // ! DIME_ELLIPSE_H dime/include/dime/entities/Entity.h0100644017777301777730000001261407455302007016115 0ustar wwwwww/**************************************************************************\ * * FILE: Entity.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_ENTITY_H #define DIME_ENTITY_H #include #include #include #include #include // misc flag values used in entityFlags. #define FLAG_DELETED 0x0001 // used by dimeEntity #define FLAG_TMP_BUFFER_SET 0x0002 // see dimeEntity::read() #define FLAG_VERTICES_FOLLOW 0x0004 // used by dimePolyline #define FLAG_TAGGED 0x0008 // used by dimeEntity #define FLAG_COLOR_NUMBER 0x0010 // signals a color number was read #define FLAG_SUBCLASS_MARKER 0x0020 // will subclass marker need to be written #define FLAG_HANDLE 0x0040 // entity has handle in RecordHolder #define FLAG_ACAD_REACTORS 0x0080 // ACAD reactors in entity #define FLAG_ACAD_XDICTIONARY 0x0100 // ACAD xdictionary in entity #define FLAG_PAPERSPACE 0x0200 // entity is in paperspace #define FLAG_LINETYPE 0x0400 // linetype specified in entity #define FLAG_FIRST_FREE 0x0800 // use this if you want to define your own flags class dimeLayer; class DIME_DLL_API dimeEntity : public dimeRecordHolder { friend class dimeEntitiesSection; friend class dimeModel; friend class dimePolyline; friend class dimeBlock; friend class dimeInsert; public: dimeEntity(); virtual ~dimeEntity(); int16 getEntityFlags() const; void setEntityFlags(const int16 flags); int16 getColorNumber() const; void setColorNumber(const int16 c); virtual void setLayer(const dimeLayer * const layer); virtual const char *getEntityName() const = 0; const dimeLayer *getLayer() const; const char *getLayerName() const; virtual dimeEntity *copy(dimeModel * const model) const = 0; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual bool isOfType(const int thetypeid) const; virtual int countRecords() const; virtual void print() const {} bool isDeleted() const; void setDeleted(const bool onOff = true); bool isTagged() const; void setTagged(const bool onOff = true); virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; enum GeometryType { NONE, POLYGONS, LINES, POINTS }; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); protected: bool preWrite(dimeOutput * const file); virtual bool traverse(const dimeState * const state, dimeCallback callback, void *userdata); virtual void fixReferences(dimeModel * const model); virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); virtual bool shouldWriteRecord(const int groupcode) const; public: static dimeEntity *createEntity(const char * const name, dimeMemHandler * const memhandler = NULL); static bool readEntities(dimeInput * const file, dimeArray &array, const char * const stopat); static bool copyEntityArray(const dimeEntity *const*const array, const int nument, dimeModel * const model, dimeArray &destarray); static dimeEntity **copyEntityArray(const dimeEntity *const*const array, int &nument, dimeModel * const model); static void arbitraryAxis(const dimeVec3f &givenaxis, dimeVec3f &newaxis); static void generateUCS(const dimeVec3f &givenaxis, dimeMatrix &m); protected: bool copyRecords(dimeEntity * const entity, dimeModel * const model) const; private: const dimeLayer *layer; int16 entityFlags; int16 colorNumber; }; // class dimeEntity inline const dimeLayer * dimeEntity::getLayer() const { return this->layer; } inline int16 dimeEntity::getColorNumber() const { return this->colorNumber; } inline void dimeEntity::setColorNumber(const int16 c) { this->colorNumber = c; } inline int16 dimeEntity::getEntityFlags() const { return this->entityFlags; } inline void dimeEntity::setEntityFlags(const int16 flags) { this->entityFlags = flags; } #endif // ! DIME_ENTITY_H dime/include/dime/entities/ExtrusionEntity.h0100644017777301777730000000517607455302007020043 0ustar wwwwww/**************************************************************************\ * * FILE: ExtrusionEntity.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_EXTRUSIONENTITY_H #define DIME_EXTRUSIONENTITY_H #include class DIME_DLL_API dimeExtrusionEntity : public dimeEntity { public: dimeExtrusionEntity(); virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; void setExtrusionDir(const dimeVec3f &v); const dimeVec3f &getExtrusionDir() const; void setThickness(const dxfdouble val); dxfdouble getThickness() const; virtual int typeId() const; virtual bool isOfType(const int thtypeid) const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); void copyExtrusionData(const dimeExtrusionEntity * const entity); bool writeExtrusionData(dimeOutput * const out); protected: // should be private :-( dimeVec3f extrusionDir; dxfdouble thickness; }; // class dimeExtrusionEntity inline void dimeExtrusionEntity::setExtrusionDir(const dimeVec3f &v) { this->extrusionDir = v; } inline const dimeVec3f & dimeExtrusionEntity::getExtrusionDir() const { return this->extrusionDir; } inline void dimeExtrusionEntity::setThickness(const dxfdouble val) { this->thickness = val; } inline dxfdouble dimeExtrusionEntity::getThickness() const { return this->thickness; } #endif // ! DIME_EXTRUSIONENTITY_H dime/include/dime/entities/FaceEntity.h0100644017777301777730000000611107455302007016667 0ustar wwwwww/**************************************************************************\ * * FILE: FaceEntity.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_FACEENTITY_H #define DIME_FACEENTITY_H #include #include #include class DIME_DLL_API dimeFaceEntity : public dimeEntity { public: bool isQuad() const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; void setVertex(const int idx, const dimeVec3f &v); void setTriangle(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2); void setQuad(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeVec3f &v3); const dimeVec3f &getVertex(const int idx) const; void getVertices(dimeVec3f &v0, dimeVec3f &v1, dimeVec3f &v2, dimeVec3f &v3) const; virtual dxfdouble getThickness() const; virtual void getExtrusionDir(dimeVec3f &ed) const; GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); virtual int typeId() const; virtual bool isOfType(const int thetypeid) const; virtual int countRecords() const; protected: virtual bool swapQuadCoords() const; virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); void copyCoords(const dimeFaceEntity * const entity); bool writeCoords(dimeOutput * const file); dimeFaceEntity(); dimeVec3f coords[4]; }; // class dimeFaceEntity inline const dimeVec3f & dimeFaceEntity::getVertex(const int idx) const { assert(idx >= 0 && idx < 4); return this->coords[idx]; } inline bool dimeFaceEntity::isQuad() const { return (coords[2] != coords[3]); } inline void dimeFaceEntity::setVertex(const int idx, const dimeVec3f &v) { assert(idx >= 0 && idx < 4); this->coords[idx] = v; } #endif // ! DIME_FACEENTITY_H dime/include/dime/entities/Insert.h0100644017777301777730000000720407455302007016104 0ustar wwwwww/**************************************************************************\ * * FILE: Insert.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_INSERT_H #define DIME_INSERT_H #include #include #include class DIME_DLL_API dimeInsert : public dimeEntity { friend class dimeEntitiesSection; friend class dimeBlocksSection; public: dimeInsert(); virtual ~dimeInsert(); void setBlock(dimeBlock * const block); dimeBlock * getBlock() const; virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; void setInsertionPoint(const dimeVec3f &v); const dimeVec3f &getInsertionPoint() const; void setScale(const dimeVec3f &v); const dimeVec3f & getScale() const; void setRotAngle(dxfdouble angle); dxfdouble getRotAngle() const; // FIXME: more set and get methods protected: virtual void fixReferences(dimeModel * const model); virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); virtual bool traverse(const dimeState * const state, dimeCallback callback, void *userdata); private: void makeMatrix(dimeMatrix &m) const; int16 attributesFollow; const char *blockName; dimeVec3f insertionPoint; dimeVec3f extrusionDir; dimeVec3f scale; dxfdouble rotAngle; dimeEntity **entities; int numEntities; #ifdef DIME_FIXBIG int32 rowCount; #else int16 rowCount; #endif int16 columnCount; dxfdouble rowSpacing; dxfdouble columnSpacing; dimeEntity *seqend; dimeBlock *block; }; // class dimeInsert inline void dimeInsert::setInsertionPoint(const dimeVec3f &v) { this->insertionPoint = v; } inline const dimeVec3f & dimeInsert::getInsertionPoint() const { return this->insertionPoint; } inline dimeBlock * dimeInsert::getBlock() const { return this->block; } inline void dimeInsert::setScale(const dimeVec3f &v) { this->scale = v; } inline const dimeVec3f & dimeInsert::getScale() const { return this->scale; } inline void dimeInsert::setRotAngle(dxfdouble angle) { this->rotAngle = angle; } inline dxfdouble dimeInsert::getRotAngle() const { return this->rotAngle; } #endif // ! DIME_INSERT_H dime/include/dime/entities/LWPolyline.h0100644017777301777730000000712007455302007016673 0ustar wwwwww/**************************************************************************\ * * FILE: LWPolyline.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_LWPOLYLINE_H #define DIME_LWPOLYLINE_H #include class DIME_DLL_API dimeLWPolyline : public dimeExtrusionEntity { public: dimeLWPolyline(); virtual ~dimeLWPolyline(); virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index) const; virtual const char *getEntityName() const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); int getNumVertices() const; const dxfdouble *getXCoords() const; const dxfdouble *getYCoords() const; const dxfdouble *getStartingWidths() const; const dxfdouble *getEndWidths() const; const dxfdouble *getBulges() const; dxfdouble getElevation() const; dxfdouble getConstantWidth() const; int16 getFlags() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dxfdouble constantWidth; dxfdouble elevation; int16 flags; int32 numVertices; int16 tmpCounter; // used during loading only int16 tmpFlags; // "" dxfdouble *xcoord; dxfdouble *ycoord; dxfdouble *startingWidth; dxfdouble *endWidth; dxfdouble *bulge; }; // class dimeLWPolyLine inline int dimeLWPolyline::getNumVertices() const { return this->numVertices; } inline const dxfdouble * dimeLWPolyline::getXCoords() const { return this->xcoord; } inline const dxfdouble * dimeLWPolyline::getYCoords() const { return this->ycoord; } inline const dxfdouble * dimeLWPolyline::getStartingWidths() const { return this->startingWidth; } inline const dxfdouble * dimeLWPolyline::getEndWidths() const { return this->endWidth; } inline const dxfdouble * dimeLWPolyline::getBulges() const { return this->bulge; } inline dxfdouble dimeLWPolyline::getElevation() const { return this->elevation; } inline dxfdouble dimeLWPolyline::getConstantWidth() const { return this->constantWidth; } inline int16 dimeLWPolyline::getFlags() const { return this->flags; } #endif // ! DIME_LWPOLYLINE_H dime/include/dime/entities/Line.h0100644017777301777730000000511207455302007015523 0ustar wwwwww/**************************************************************************\ * * FILE: Line.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_LINE_H #define DIME_LINE_H #include #include #include class DIME_DLL_API dimeLine : public dimeExtrusionEntity { public: dimeLine(); const dimeVec3f &getCoords(const int idx) const; void setCoords(const int idx, const dimeVec3f &v); virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f coords[2]; }; // class dimeLine inline const dimeVec3f & dimeLine::getCoords(const int idx) const { assert(idx ==0 || idx == 1); return this->coords[idx]; } inline void dimeLine::setCoords(const int idx, const dimeVec3f &v) { assert(idx ==0 || idx == 1); this->coords[idx] = v; } #endif // ! DIME_LINE_H dime/include/dime/entities/Point.h0100644017777301777730000000465307455302007015736 0ustar wwwwww/**************************************************************************\ * * FILE: Point.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_POINT_H #define DIME_POINT_H #include #include #include class DIME_DLL_API dimePoint : public dimeExtrusionEntity { public: dimePoint(); const dimeVec3f &getCoords() const; void setCoords(const dimeVec3f &v); virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f coords; }; // class dimePoint inline const dimeVec3f & dimePoint::getCoords() const { return coords; } inline void dimePoint::setCoords(const dimeVec3f &v) { this->coords = v; } #endif // ! DIME_POINT_H dime/include/dime/entities/Polyline.h0100644017777301777730000001407507455302007016437 0ustar wwwwww/**************************************************************************\ * * FILE: Polyline.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_POLYLINE_H #define DIME_POLYLINE_H #include #include #include #include class dimeVertex; class DIME_DLL_API dimePolyline : public dimeExtrusionEntity { public: dimePolyline(); virtual ~dimePolyline(); enum Type { POLYLINE, POLYFACE_MESH, POLYGON_MESH }; enum Flags { CLOSED = 0x01, POLYMESH_CLOSED_M = 0x01, CURVE_FIT = 0x02, SPLINE_FIT = 0x04, IS_POLYLINE_3D = 0x08, IS_POLYMESH_3D = 0x10, POLYMESH_CLOSED_N = 0x20, IS_POLYFACE_MESH = 0x40, CONTINOUS_PATTERN = 0x80 }; enum SurfaceType { NONE = 0, QUADRIC_BSPLINE = 5, CUBIC_BSPLINE = 6, BEZIER = 8 }; int16 getFlags() const; void setFlags(const int16 flags); int getType() const; const dimeVec3f &getElevation() const; void setElevation(const dimeVec3f &e); int16 getPolymeshCountN() const; int16 getPolymeshCountM() const; int16 getSmoothSurfaceMdensity() const; int16 getSmoothSurfaceNdensity() const; int getNumCoordVertices() const; int getNumIndexVertices() const; int getNumSplineFrameControlPoints() const; int16 getSurfaceType() const; void setSurfaceType(const int16 type); dimeVertex *getCoordVertex(const int index); dimeVertex *getIndexVertex(const int index); dimeVertex *getSplineFrameControlPoint(const int index); void setCoordVertices(dimeVertex **vertices, const int num, dimeMemHandler * const memhandler = NULL); void setIndexVertices(dimeVertex **vertices, const int num, dimeMemHandler * const memhandler = NULL); void setSplineFrameControlPoints(dimeVertex **vertices, const int num, dimeMemHandler * const memhandler = NULL); virtual dimeEntity *copy(dimeModel *const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual void setLayer(const dimeLayer * const layer); virtual const char *getEntityName() const; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; virtual GeometryType extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness); void clearSurfaceData(); protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); virtual bool traverse(const dimeState * const state, dimeCallback callback, void *userdata); private: int numCoordVertices() const; int numIndexVertices() const; int16 flags; #ifdef DIME_FIXBIG int32 countM; int32 countN; int32 smoothCountM; int32 smoothCountN; #else int16 countM; int16 countN; int16 smoothCountM; int16 smoothCountN; #endif int16 surfaceType; #ifdef DIME_FIXBIG int32 coordCnt; // real # of coordinate vertices int32 indexCnt; // real # of index vertices int32 frameCnt; #else int16 coordCnt; // real # of coordinate vertices int16 indexCnt; // real # of index vertices int16 frameCnt; #endif dimeVertex **coordVertices; dimeVertex **indexVertices; dimeVertex **frameVertices; dimeEntity *seqend; dimeVec3f elevation; }; // class dimePolyline inline int16 dimePolyline::getFlags() const { return this->flags; } inline void dimePolyline::setFlags(const int16 flags) { this->flags = flags; } inline const dimeVec3f & dimePolyline::getElevation() const { return elevation; } inline void dimePolyline::setElevation(const dimeVec3f &e) { this->elevation = e; } inline int16 dimePolyline::getPolymeshCountN() const { return this->countN; } inline int16 dimePolyline::getPolymeshCountM() const { return this->countM; } inline int16 dimePolyline::getSmoothSurfaceMdensity() const { return this->smoothCountM; } inline int16 dimePolyline::getSmoothSurfaceNdensity() const { return this->smoothCountN; } inline int dimePolyline::getNumCoordVertices() const { return this->coordCnt; } inline int dimePolyline::getNumIndexVertices() const { return this->indexCnt; } inline int dimePolyline::getNumSplineFrameControlPoints() const { return this->frameCnt; } inline dimeVertex * dimePolyline::getCoordVertex(const int index) { return this->coordVertices[index]; } inline dimeVertex * dimePolyline::getIndexVertex(const int index) { return this->indexVertices[index]; } inline dimeVertex * dimePolyline::getSplineFrameControlPoint(const int index) { return this->frameVertices[index]; } inline int16 dimePolyline::getSurfaceType() const { return this->surfaceType; } inline void dimePolyline::setSurfaceType(const int16 type) { this->surfaceType = type; } #endif // ! DIME_POLYLINE_H dime/include/dime/entities/Solid.h0100644017777301777730000000436707455302007015721 0ustar wwwwww/**************************************************************************\ * * FILE: Solid.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_SOLID_H #define DIME_SOLID_H #include #include class DIME_DLL_API dimeSolid : public dimeFaceEntity { public: dimeSolid(); virtual dxfdouble getThickness() const; virtual void getExtrusionDir(dimeVec3f &ed) const; void setThickness(const dxfdouble &thickness); void setExtrusionDir(const dimeVec3f &ed); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual int countRecords() const; protected: virtual bool swapQuadCoords() const; virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f extrusionDir; dxfdouble thickness; }; // class dimeSolid #endif // ! DIME_SOLID_H dime/include/dime/entities/Spline.h0100644017777301777730000001441607455302007016075 0ustar wwwwww/**************************************************************************\ * * FILE: Spline.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_SPLINE_H #define DIME_SPLINE_H #include #include class DIME_DLL_API dimeSpline : public dimeEntity { public: dimeSpline(); virtual ~dimeSpline(); enum Flags { CLOSED = 0x01, PERIODIC = 0x02, RATIONAL = 0x04, PLANAR = 0x08, LINEAR = 0x10 }; bool hasWeights() const; int16 getFlags() const; void setFlags(const int16 flags); int16 getDegree() const; void setDegree(const int16 degree); dxfdouble getControlPointTolerance() const; void setControlPointTolerance(const dxfdouble tol); dxfdouble getFitPointTolerance() const; void setFitPointTolerance(const dxfdouble tol); dxfdouble getKnotTolerance() const; void setKnotTolerance(const dxfdouble tol); int getNumKnots() const; dxfdouble getKnotValue(const int idx) const; void setKnotValue(const int idx, const dxfdouble value); void setKnotValues(const dxfdouble * const values, const int numvalues, dimeMemHandler * const memhandler = NULL); int getNumControlPoints() const; const dimeVec3f &getControlPoint(const int idx) const; void setControlPoint(const int idx, const dimeVec3f &v); void setControlPoints(const dimeVec3f * const pts, const int numpts, dimeMemHandler * const memhandler = NULL); int getNumWeights() const; dxfdouble getWeight(const int idx) const; void setWeight(const int idx, const dxfdouble w, dimeMemHandler * const memhandler = NULL); int getNumFitPoints() const; const dimeVec3f &getFitPoint(const int idx) const; void setFitPoint(const int idx, const dimeVec3f &pt); void setFitPoints(const dimeVec3f * const pts, const int numpts, dimeMemHandler * const memhandler = NULL); virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index) const; virtual const char *getEntityName() const; virtual void print() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: int16 flags; #ifdef DIME_FIXBIG int32 degree; int32 numKnots; int32 numControlPoints; int32 numFitPoints; #else int16 degree; int16 numKnots; int16 numControlPoints; int16 numFitPoints; #endif dxfdouble knotTolerance; dxfdouble fitTolerance; dxfdouble cpTolerance; dxfdouble *knots; dxfdouble *weights; dimeVec3f *controlPoints; dimeVec3f *fitPoints; // read/handle counters int16 knotCnt; int16 fitCnt; int16 cpCnt; int16 weightCnt; }; // class dimeSpline inline int16 dimeSpline::getFlags() const { return this->flags; } inline void dimeSpline::setFlags(const int16 flags) { this->flags = flags; } inline int16 dimeSpline::getDegree() const { return this->degree; } inline void dimeSpline::setDegree(const int16 degree) { this->degree = degree; } inline dxfdouble dimeSpline::getControlPointTolerance() const { return this->cpTolerance; } inline void dimeSpline::setControlPointTolerance(const dxfdouble tol) { this->cpTolerance = tol; } inline dxfdouble dimeSpline::getFitPointTolerance() const { return this->fitTolerance; } inline void dimeSpline::setFitPointTolerance(const dxfdouble tol) { this->fitTolerance = tol; } inline dxfdouble dimeSpline::getKnotTolerance() const { return this->knotTolerance; } inline void dimeSpline::setKnotTolerance(const dxfdouble tol) { this->knotTolerance = tol; } inline int dimeSpline::getNumKnots() const { return this->numKnots; } inline dxfdouble dimeSpline::getKnotValue(const int idx) const { assert(idx >= 0 && idx < this->numKnots); return this->knots[idx]; } inline void dimeSpline::setKnotValue(const int idx, const dxfdouble value) { assert(idx >= 0 && idx < this->numKnots); this->knots[idx] = value; } inline int dimeSpline::getNumControlPoints() const { return this->numControlPoints; } inline const dimeVec3f & dimeSpline::getControlPoint(const int idx) const { assert(idx >= 0 && idx < this->numControlPoints); return this->controlPoints[idx]; } inline void dimeSpline::setControlPoint(const int idx, const dimeVec3f &v) { assert(idx >= 0 && idx < this->numControlPoints); this->controlPoints[idx] = v; } inline int dimeSpline::getNumWeights() const { return this->getNumControlPoints(); } inline dxfdouble dimeSpline::getWeight(const int idx) const { if (this->hasWeights()) { assert(idx >= 0 && idx < this->numControlPoints); return this->weights[idx]; } return 1.0; } inline int dimeSpline::getNumFitPoints() const { return this->numFitPoints; } inline const dimeVec3f & dimeSpline::getFitPoint(const int idx) const { assert(idx >= 0 && idx < this->numFitPoints); return this->fitPoints[idx]; } inline void dimeSpline::setFitPoint(const int idx, const dimeVec3f &pt) { assert(idx >= 0 && idx < this->numFitPoints); this->fitPoints[idx] = pt; } #endif // ! DIME_SPLINE_H dime/include/dime/entities/Trace.h0100644017777301777730000000437207455302007015701 0ustar wwwwww/**************************************************************************\ * * FILE: Trace.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_TRACE_H #define DIME_TRACE_H #include #include class DIME_DLL_API dimeTrace : public dimeFaceEntity { public: dimeTrace(); virtual dxfdouble getThickness() const; virtual void getExtrusionDir(dimeVec3f &ed) const; void setThickness(const dxfdouble &thickness); void setExtrusionDir(const dimeVec3f &ed); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; virtual int countRecords() const; protected: virtual bool swapQuadCoords() const; virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f extrusionDir; dxfdouble thickness; }; // class dimeTrace #endif // ! DIME_TRACE_H dime/include/dime/entities/UnknownEntity.h0100644017777301777730000000354007455302007017473 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownEntity.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_UNKNOWNENTITY_H #define DIME_UNKNOWNENTITY_H #include class DIME_DLL_API dimeUnknownEntity : public dimeEntity { public: dimeUnknownEntity(const char * const name, dimeMemHandler * const memhandler); virtual ~dimeUnknownEntity(); virtual dimeEntity *copy(dimeModel * const model) const; virtual const char *getEntityName() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; private: char *entityName; }; // class dimeUnknownEntity #endif // ! DIME_UNKNOWNENTITY_H dime/include/dime/entities/Vertex.h0100644017777301777730000000622107455302007016113 0ustar wwwwww/**************************************************************************\ * * FILE: Vertex.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_VERTEX_H #define DIME_VERTEX_H #include #include #include class DIME_DLL_API dimeVertex : public dimeEntity { friend class dimePolyline; friend class dimeEntity; public: dimeVertex(); enum Flags { CURVE_FITTING_VERTEX = 0x01, HAS_CURVE_FIT_TANGENT = 0x02, SPLINE_VERTEX = 0x08, FRAME_CONTROL_POINT = 0x10, POLYLINE_3D_VERTEX = 0x20, POLYGON_MESH_VERTEX = 0x40, POLYFACE_MESH_VERTEX = 0x80 }; virtual dimeEntity *copy(dimeModel * const model) const; virtual bool getRecord(const int groupcode, dimeParam ¶m, const int index = 0) const; virtual const char *getEntityName() const; int16 getFlags() const; void setFlags(const int16 flags); void setCoords(const dimeVec3f &v); const dimeVec3f &getCoords() const; int numIndices() const; int getIndex(const int idx) const; void setIndex(const int idx, const int val); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: int16 flags; #ifdef DIME_FIXBIG int32 indices[4]; #else int16 indices[4]; #endif dimeVec3f coords; dimePolyline *polyline; // link back to polyline... }; // class dimeVertex inline void dimeVertex::setCoords(const dimeVec3f &v) { this->coords = v; } inline const dimeVec3f & dimeVertex::getCoords() const { return this->coords; } inline void dimeVertex::setIndex(const int idx, const int val) { assert(idx >= 0 && idx < 4); this->indices[idx] = val; } inline int16 dimeVertex::getFlags() const { return this->flags; } inline void dimeVertex::setFlags(const int16 flags) { this->flags = flags; } #endif // ! DIME_VERTEX_H dime/include/dime/objects/0040755017777301777730000000000007733212517014301 5ustar wwwwwwdime/include/dime/objects/Object.h0100644017777301777730000000454707455302007015662 0ustar wwwwww/**************************************************************************\ * * FILE: Object.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_OBJECT_H #define DIME_OBJECT_H #include #include #include #include #include class DIME_DLL_API dimeObject : public dimeRecordHolder { friend class dimeObjectesSection; friend class dimeModel; public: dimeObject(); virtual ~dimeObject(); virtual const char *getObjectName() const = 0; virtual dimeObject *copy(dimeModel * const model) const = 0; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual bool isOfType(const int thetypeid) const; virtual int typeId() const = 0; virtual int countRecords() const; virtual void print() const {} protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); public: static dimeObject *createObject(const char * const name, dimeMemHandler * const memhandler = NULL); protected: bool copyRecords(dimeObject * const newobject, dimeModel * const model) const; }; // class dimeObject #endif // ! DIME_OBJECT_H dime/include/dime/objects/UnknownObject.h0100644017777301777730000000356607455302007017242 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownObject.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_UNKNOWNOBJECT_H #define DIME_UNKNOWNOBJECT_H #include class dimeMemHandler; class DIME_DLL_API dimeUnknownObject : public dimeObject { public: dimeUnknownObject(const char * const name, dimeMemHandler * const memhandler); virtual ~dimeUnknownObject(); virtual dimeObject *copy(dimeModel * const model) const; virtual const char *getObjectName() const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; private: char *objectName; }; // class dimeUnknownObject #endif // ! DIME_UNKNOWNOBJECT_H dime/include/dime/records/0040755017777301777730000000000007733212517014311 5ustar wwwwwwdime/include/dime/records/DoubleRecord.h0100644017777301777730000000371207455302007017026 0ustar wwwwww/**************************************************************************\ * * FILE: DoubleRecord.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_DOUBLERECORD_H #define DIME_DOUBLERECORD_H #include class DIME_DLL_API dimeDoubleRecord : public dimeRecord { public: dimeDoubleRecord(const int group_code = 10, const dxfdouble val = 0.0f); virtual dimeRecord *copy(dimeMemHandler * const mh) const; virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL); virtual void getValue(dimeParam ¶m) const; dxfdouble getValue() const; void setValue(const dxfdouble val); public: int typeId() const; bool read(dimeInput * const in); bool write(dimeOutput * const out); private: dxfdouble value; }; // class dimeDoubleRecord #endif // ! DIME_DOUBLERECORD_H dime/include/dime/records/FloatRecord.h0100644017777301777730000000366307455302007016666 0ustar wwwwww/**************************************************************************\ * * FILE: FloatRecord.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_FLOATRECORD_H #define DIME_FLOATRECORD_H #include class DIME_DLL_API dimeFloatRecord : public dimeRecord { public: dimeFloatRecord(const int group_code = 10, const float val = 0.0f); virtual dimeRecord *copy(dimeMemHandler * const mh) const; virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL); virtual void getValue(dimeParam ¶m) const; float getValue() const; void setValue(const float val); public: int typeId() const; bool read(dimeInput * const in); bool write(dimeOutput * const out); private: float value; }; // class dimeFloatRecord #endif // ! DIME_FLOATRECORD_H dime/include/dime/records/HexRecord.h0100644017777301777730000000305707455302007016342 0ustar wwwwww/**************************************************************************\ * * FILE: HexRecord.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_HEXRECORD_H #define DIME_HEXRECORD_H #include class DIME_DLL_API dimeHexRecord : public dimeStringRecord { public: dimeHexRecord(const int group_code = 0); public: int typeId() const; }; // class dimeHexRecord #endif // ! DIME_HEXRECORD_H dime/include/dime/records/Int16Record.h0100644017777301777730000000366207455302007016521 0ustar wwwwww/**************************************************************************\ * * FILE: Int16Record.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_INT16RECORD_H #define DIME_INT16RECORD_H #include class DIME_DLL_API dimeInt16Record : public dimeRecord { public: dimeInt16Record(const int group_code = 60, const int16 val = 0); virtual dimeRecord *copy(dimeMemHandler * const mh) const; virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL); virtual void getValue(dimeParam ¶m) const; int16 getValue() const; void setValue(const int16 val); public: int typeId() const; bool read(dimeInput * const in); bool write(dimeOutput * const out); private: int16 value; }; // class dimeInt16Record #endif // ! DIME_INT16RECORD_H dime/include/dime/records/Int32Record.h0100644017777301777730000000366407455302007016521 0ustar wwwwww/**************************************************************************\ * * FILE: Int32Record.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_INT32RECORD_H #define DIME_INT32RECORD_H #include class DIME_DLL_API dimeInt32Record : public dimeRecord { public: dimeInt32Record(const int group_code = 90, const int32 val = 0); virtual dimeRecord *copy(dimeMemHandler * const mh) const; virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL); virtual void getValue(dimeParam ¶m) const; int32 getValue() const; void setValue(const int32 val); public: int typeId() const; bool read(dimeInput * const in); bool write(dimeOutput * const out); private: int32 value; }; // class dimeInt32Record #endif // ! DIME_INT32RECORD_H dime/include/dime/records/Int8Record.h0100644017777301777730000000364607455302007016444 0ustar wwwwww/**************************************************************************\ * * FILE: Int8Record.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_INT8RECORD_H #define DIME_INT8RECORD_H #include class DIME_DLL_API dimeInt8Record : public dimeRecord { public: dimeInt8Record(const int group_code = 270, const int8 val = 0); virtual dimeRecord *copy(dimeMemHandler * const mh) const; virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL); virtual void getValue(dimeParam ¶m) const; int8 getValue() const; void setValue(const int8 val); public: int typeId() const; bool read(dimeInput * const in); bool write(dimeOutput * const out); private: int8 value; }; // class dimeInt8Record #endif // ! DIME_INT8RECORD_H dime/include/dime/records/Record.h0100644017777301777730000000516307455302007015675 0ustar wwwwww/**************************************************************************\ * * FILE: Record.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_RECORD_H #define DIME_RECORD_H #include #include #include class dimeInput; class dimeOutput; class DIME_DLL_API dimeRecord : public dimeBase { public: dimeRecord(const int group_code); virtual ~dimeRecord(); virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL) = 0; virtual void getValue(dimeParam ¶m) const = 0; virtual dimeRecord *copy(dimeMemHandler * const memhandler) const = 0; void setGroupCode(const int group_code); int getGroupCode() const; public: virtual bool isEndOfSectionRecord() const; virtual bool isEndOfFileRecord() const; virtual int typeId() const = 0; virtual bool read(dimeInput * const in) = 0; virtual bool write(dimeOutput * const out); virtual void print() const {fprintf(stderr, "rec: %d\n", groupCode);} public: static bool readRecordData(dimeInput * const in, const int group_code, dimeParam ¶m); static dimeRecord *readRecord(dimeInput * const in); static dimeRecord *createRecord(const int group_code, dimeMemHandler * const memhandler); static dimeRecord *createRecord(const int group_code, const dimeParam ¶m, dimeMemHandler * const memhandler); static int getRecordType(const int group_code); protected: int groupCode; }; // class dimeRecord #endif // ! DIME_RECORD_H dime/include/dime/records/StringRecord.h0100644017777301777730000000416007455302007017060 0ustar wwwwww/**************************************************************************\ * * FILE: StringRecord.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_STRINGRECORD_H #define DIME_STRINGRECORD_H #include class DIME_DLL_API dimeStringRecord : public dimeRecord { public: dimeStringRecord(const int group_code = 0); virtual ~dimeStringRecord(); virtual dimeRecord *copy(dimeMemHandler * const mh) const; virtual void setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL); virtual void getValue(dimeParam ¶m) const; void setStringPointer(char * const s); bool setString(const char * const s, dimeMemHandler * const memhandler = NULL); char *getString(); public: bool isEndOfSectionRecord() const; bool isEndOfFileRecord() const; int typeId() const; bool read(dimeInput * const in); bool write(dimeOutput * const out); protected: char *string; }; // class dimeStringRecord #endif // ! DIME_STRINGRECORD_H dime/include/dime/sections/0040755017777301777730000000000007733212517014477 5ustar wwwwwwdime/include/dime/sections/BlocksSection.h0100644017777301777730000000422007455302007017400 0ustar wwwwww/**************************************************************************\ * * FILE: BlocksSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_BLOCKSSECTION_H #define DIME_BLOCKSSECTION_H #include #include class DIME_DLL_API dimeBlocksSection : public dimeSection { public: dimeBlocksSection(dimeMemHandler * const memhandler = NULL); virtual ~dimeBlocksSection(); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; public: virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; void fixReferences(dimeModel * const model); int getNumBlocks() const; class dimeBlock *getBlock(const int idx); void removeBlock(const int idx); void insertBlock(dimeBlock * const block, const int idx = -1); private: dimeArray blocks; }; // class dimeBlocksSection #endif // ! DIME_BLOCKSSECTION_H dime/include/dime/sections/ClassesSection.h0100644017777301777730000000417507455302007017571 0ustar wwwwww/**************************************************************************\ * * FILE: ClassesSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_CLASSESSECTION_H #define DIME_CLASSESSECTION_H #include #include class DIME_DLL_API dimeClassesSection : public dimeSection { friend class dimeModel; public: dimeClassesSection(dimeMemHandler * const memhandler = NULL); virtual ~dimeClassesSection(); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; int getNumClasses() const; class dimeClass *getClass(const int idx); void removeClass(const int idx); void insertClass(dimeClass * const myclass, const int idx = -1); private: dimeArray classes; }; // class dimeClassesSection #endif // ! DIME_CLASSESSECTION_H dime/include/dime/sections/EntitiesSection.h0100644017777301777730000000427007455302007017754 0ustar wwwwww/**************************************************************************\ * * FILE: EntitiesSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_ENTITIESSECTION_H #define DIME_ENTITIESSECTION_H #include #include class DIME_DLL_API dimeEntitiesSection : public dimeSection { friend class dimeModel; public: dimeEntitiesSection(dimeMemHandler * const memhandler = NULL); virtual ~dimeEntitiesSection(); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; void fixReferences(dimeModel * const model); int getNumEntities() const; dimeEntity *getEntity(const int idx); void removeEntity(const int idx); void insertEntity(dimeEntity * const entity, const int idx = -1); private: dimeArray entities; }; // class dimeEntitiesSection #endif // ! DIME_ENTITIESSECTION_H dime/include/dime/sections/HeaderSection.h0100644017777301777730000000445407455302007017364 0ustar wwwwww/**************************************************************************\ * * FILE: HeaderSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_HEADERSECTION_H #define DIME_HEADERSECTION_H #include #include class DIME_DLL_API dimeHeaderSection : public dimeSection { public: dimeHeaderSection(dimeMemHandler * const memhandler); virtual ~dimeHeaderSection(); int getVariable(const char * const variableName, int * const groupcodes, dimeParam * const params, const int maxparams) const; int setVariable(const char * const variableName, const int * const groupcodes, const dimeParam * const params, const int numparams, dimeMemHandler * const memhandler = NULL); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; private: int findVariable(const char * const name) const; dimeArray records; }; // class dimeHeaderSection #endif // ! DIME_HEADERSECTION_H dime/include/dime/sections/ObjectsSection.h0100644017777301777730000000420207455302007017554 0ustar wwwwww/**************************************************************************\ * * FILE: ObjectsSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_OBJECTSSECTION_H #define DIME_OBJECTSSECTION_H #include #include class DIME_DLL_API dimeObjectsSection : public dimeSection { friend class dimeModel; public: dimeObjectsSection(dimeMemHandler * const memhandler = NULL); virtual ~dimeObjectsSection(); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; int getNumObjects() const; class dimeObject *getObject(const int idx); void removeObject(const int idx); void insertObject(dimeObject * const object, const int idx = -1); private: dimeArray objects; }; // class dimeObjectsSection #endif // ! DIME_OBJECTSSECTION_H dime/include/dime/sections/Section.h0100644017777301777730000000411307455302007016243 0ustar wwwwww/**************************************************************************\ * * FILE: Section.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_SECTION_H #define DIME_SECTION_H #include #include class dimeInput; class dimeModel; class dimeOutput; class DIME_DLL_API dimeSection : public dimeBase { public: dimeSection(dimeMemHandler * const memhandler); virtual ~dimeSection(); virtual const char *getSectionName() const = 0; virtual dimeSection *copy(dimeModel * const model) const = 0; virtual bool read(dimeInput * const file) = 0; virtual bool write(dimeOutput * const file) = 0; virtual int typeId() const = 0; virtual bool isOfType(const int thetypeid) const; virtual int countRecords() const = 0; public: static dimeSection *createSection(const char * const sectionname, dimeMemHandler *memhandler); protected: dimeMemHandler *memHandler; }; // class dimeSection #endif // ! DIME_SECTION_H dime/include/dime/sections/TablesSection.h0100644017777301777730000000413407455302007017401 0ustar wwwwww/**************************************************************************\ * * FILE: TablesSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_TABLESSECTION_H #define DIME_TABLESSECTION_H #include #include class DIME_DLL_API dimeTablesSection : public dimeSection { public: dimeTablesSection(dimeMemHandler * const memhandler = NULL); virtual ~dimeTablesSection(); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; public: virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; int getNumTables() const; class dimeTable *getTable(const int idx); void removeTable(const int idx); void insertTable(dimeTable * const table, const int idx = -1); private: dimeArray tables; }; // class dimeTablesSection #endif // ! DIME_TABLESSECTION_H dime/include/dime/sections/UnknownSection.h0100644017777301777730000000403107455302007017622 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownSection.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_UNKNOWNSECTION_H #define DIME_UNKNOWNSECTION_H #include #include class DIME_DLL_API dimeUnknownSection : public dimeSection { friend class dimeModel; public: dimeUnknownSection(const char * const sectionname, dimeMemHandler *memhandler = NULL); virtual ~dimeUnknownSection(); virtual const char *getSectionName() const; virtual dimeSection *copy(dimeModel * const model) const; public: virtual bool read(dimeInput * const file); virtual bool write(dimeOutput * const file); virtual int typeId() const; virtual int countRecords() const; private: char *sectionName; class dimeRecord **records; int numRecords; }; // class dimeUnknownSection #endif // ! DIME_UNKNOWNSECTION_H dime/include/dime/tables/0040755017777301777730000000000007733212517014122 5ustar wwwwwwdime/include/dime/tables/LayerTable.h0100644017777301777730000000435307455302007016314 0ustar wwwwww/**************************************************************************\ * * FILE: LayerTable.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_LAYERTABLE_H #define DIME_LAYERTABLE_H #include class DIME_DLL_API dimeLayerTable : public dimeTableEntry { public: dimeLayerTable(); virtual ~dimeLayerTable(); void setLayerName(const char * name, dimeMemHandler * const memhandler); const char * getLayerName(void) const; void setColorNumber(const int16 colnum); int16 getColorNumber(void) const; void registerLayer(dimeModel * model); virtual dimeTableEntry *copy(dimeModel * const model) const; virtual const char *getTableName() const; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); private: int16 colorNumber; char * layerName; class dimeLayer * layerInfo; }; // class dimeLayerTable #endif // ! DIME_LAYERTABLE_H dime/include/dime/tables/Table.h0100644017777301777730000000472707510263132015321 0ustar wwwwww/**************************************************************************\ * * FILE: Table.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_TABLE_H #define DIME_TABLE_H #include #include class dimeInput; class dimeModel; class dimeOutput; class dimeTableEntry; class dimeRecord; class DIME_DLL_API dimeTable : public dimeBase { public: dimeTable(dimeMemHandler * const memhandler); virtual ~dimeTable(); bool read(dimeInput * const in); bool write(dimeOutput * const out); dimeTable *copy(dimeModel * const model) const; int typeId() const; int countRecords() const; int tableType() const; void setTableName(const char * name); const char * tableName() const; int getNumTableEntries() const; dimeTableEntry *getTableEntry(const int idx); void insertTableEntry(dimeTableEntry * const tableEntry, const int idx = -1); void removeTableEntry(const int idx); int getNumTableRecords() const; dimeRecord *getTableRecord(const int idx); void insertTableRecord(dimeRecord * const record, const int idx = -1); void removeTableRecord(const int idx); private: int16 maxEntries; // dummy variable read from file char * tablename; dimeArray tableEntries; dimeArray records; dimeMemHandler *memHandler; }; // class dimeTable #endif // ! DIME_TABLE_H dime/include/dime/tables/TableEntry.h0100644017777301777730000000450407455302007016337 0ustar wwwwww/**************************************************************************\ * * FILE: TableEntry.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_TABLEENTRY_H #define DIME_TABLEENTRY_H #include #include class dimeModel; class DIME_DLL_API dimeTableEntry : public dimeRecordHolder { friend class dimeUnknownTable; friend class dimeLayerTable; public: dimeTableEntry(); virtual ~dimeTableEntry(); virtual const char *getTableName() const = 0; virtual bool read(dimeInput * const in); virtual bool write(dimeOutput * const out); virtual dimeTableEntry *copy(dimeModel * const model) const = 0; virtual int typeId() const = 0; virtual bool isOfType(const int thetypeid) const; virtual int countRecords() const; static dimeTableEntry *createTableEntry(const char * const name, dimeMemHandler * const memhandler = NULL); protected: bool preWrite(dimeOutput * const output); virtual bool handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler); bool copyRecords(dimeTableEntry * const table, dimeModel * const model) const; }; // class dimeTableEntry #endif // ! DIME_TABLEENTRY_H dime/include/dime/tables/UCSTable.h0100644017777301777730000000521107455302007015664 0ustar wwwwww/**************************************************************************\ * * FILE: UCSTable.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_UCSTABLE_H #define DIME_UCSTABLE_H #include #include class DIME_DLL_API dimeUCSTable : public dimeTableEntry { public: dimeUCSTable(); virtual dimeTableEntry *copy(dimeModel * const model) const; virtual const char *getTableName() const; const dimeVec3f &getOrigin() const; const dimeVec3f &getXaxis() const; const dimeVec3f &getYaxis() const; void setOrigin(const dimeVec3f &v); void setXaxis(const dimeVec3f &v); void setYaxis(const dimeVec3f &v); virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; protected: virtual bool handleRecord(const int groupcodes, const dimeParam ¶m, dimeMemHandler * const memhandler); private: dimeVec3f origin; dimeVec3f xaxis; dimeVec3f yaxis; }; // class dimeUCSTable inline const dimeVec3f & dimeUCSTable::getOrigin() const { return this->origin; } inline const dimeVec3f & dimeUCSTable::getXaxis() const { return this->xaxis; } inline const dimeVec3f & dimeUCSTable::getYaxis() const { return this->yaxis; } inline void dimeUCSTable::setOrigin(const dimeVec3f &v) { this->origin = v; } inline void dimeUCSTable::setXaxis(const dimeVec3f &v) { this->origin = v; } inline void dimeUCSTable::setYaxis(const dimeVec3f &v) { this->origin = v; } #endif // ! DIME_UCSTABLE_H dime/include/dime/tables/UnknownTable.h0100644017777301777730000000353107455302007016674 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownTable.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_UNKNOWNTABLE_H #define DIME_UNKNOWNTABLE_H #include class DIME_DLL_API dimeUnknownTable : public dimeTableEntry { public: dimeUnknownTable(const char * const name, dimeMemHandler * const memhandler); virtual ~dimeUnknownTable(); virtual const char *getTableName() const; virtual dimeTableEntry *copy(dimeModel * const model) const; virtual bool write(dimeOutput * const out); virtual int typeId() const; virtual int countRecords() const; private: char *tableName; }; // class dimeUnknownTable #endif // ! DIME_UNKNOWNTABLE_H dime/include/dime/util/0040755017777301777730000000000007733212517013625 5ustar wwwwwwdime/include/dime/util/Array.h0100644017777301777730000001710207674111507015053 0ustar wwwwww/**************************************************************************\ * * FILE: Array.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_ARRAY_H #define DIME_ARRAY_H #include #include // FIXME: the #pragmas below is just a quick hack to avoid heaps of // irritating warning messages from the compiler for client code // compiled under MSVC++. Should try to find the real reason for the // warnings and fix the cause of the problem instead. 20020730 mortene. // // UPDATE 20030617 mortene: there is a Microsoft Knowledge Base // article at which is related to // this problem. It's article number KB168958. // // In short, the general solution is that classes that exposes usage // of dimeArray needs to declare the specific template instance // with "extern" and __declspec(dllimport/export). // // That is a lot of work to change, tho'. Another possibility which // might be better is to simply avoid using (exposing) dimeArray from // any of the other public classes. Judging from a quick look, this // seems feasible, and just a couple of hours or so of work. // #ifdef _MSC_VER // Microsoft Visual C++ #pragma warning(disable:4251) #pragma warning(disable:4275) #endif // _MSC_VER template class dimeArray { public: dimeArray(const int initsize = 4); ~dimeArray(); void append(const T &value); void append(const dimeArray &array); void prepend(const dimeArray &array); void insertElem(const int idx, const T &value); void setElem(const int index, const T &value); T getElem(const int index) const; void getElem(const int index, T &elem) const; T getLastElem() const; void getLastElem(T &elem) const; T &operator [](const int index); T operator [](const int index) const; void removeElem(const int index); void removeElemFast(const int index); void reverse(); void setCount(const int count); void makeEmpty(const int initsize = 4); void freeMemory(); int count() const; int allocSize() const; T *arrayPointer(); const T *constArrayPointer() const; void shrinkToFit(); private: void growArray(); T *array; int num; int size; }; // class dimeArray<> template inline dimeArray::dimeArray(const int size) { this->array = new T[size]; this->size = size; this->num = 0; } template inline dimeArray::~dimeArray() { delete [] this->array; } template inline void dimeArray::growArray() { int oldsize = this->size; T *oldarray = this->array; this->size <<= 1; this->array = new T[this->size]; for (int i = 0; i < oldsize; i++) this->array[i] = oldarray[i]; delete [] oldarray; } template inline void dimeArray::append(const T &elem) { if (this->num >= this->size) growArray(); this->array[this->num++] = elem; } template inline void dimeArray::append(const dimeArray &array) { while (this->size <= this->num+array.count()) growArray(); for (int i=0;iarray[this->num++] = array[i]; } template inline void dimeArray::prepend(const dimeArray &array) { int newsize=this->num+array.count(); int i; if (this->size<=newsize) { T *oldarray=this->array; this->array=new T[newsize]; this->size=newsize; for (i=0;iarray[i] = array[i]; for (i=0;inum;i++) this->array[i+array.count()] = oldarray[i]; delete[] oldarray; } else { for (i=0;inum;i++) this->array[array.count()+i]=this->array[i]; for (i=0;iarray[i] = array[i]; } this->num+=array.count(); } template inline void dimeArray::insertElem(const int idx, const T &elem) { int n = this->num; this->append(elem); // make room for one more if (idx < n) { for (int i = n; i > idx; i--) { this->array[i] = this->array[i-1]; } this->array[idx] = elem; } } template inline void dimeArray::setElem(const int index, const T &elem) { while (index >= this->size) growArray(); if (this->num <= index) this->num = index+1; this->array[index] = elem; } template inline T dimeArray::getElem(const int index) const { return this->array[index]; } template inline void dimeArray::getElem(const int index, T &elem) const { elem = this->array[index]; } template inline T dimeArray::getLastElem() const { return this->array[this->num-1]; } template inline void dimeArray::getLastElem(T &elem) const { elem = this->array[this->num-1]; } template inline T & dimeArray::operator [](const int index) { while (index >= this->size) growArray(); if (this->num <= index) this->num = index + 1; return this->array[index]; } template inline T dimeArray::operator [](const int index) const { return this->array[index]; } template inline void dimeArray::removeElem(const int index) { if (this->num <= 0 || index >= this->num) return; for (int i = index; i < this->num-1; i++) this->array[i] = this->array[i+1]; this->num--; } template inline void dimeArray::removeElemFast(const int index) { this->array[index] = this->array[--this->num]; } template inline void dimeArray::reverse() { T tmp; for (int i=0;inum/2;i++) { tmp=this->array[i]; this->array[i]=this->array[this->num-1-i]; this->array[this->num-1-i]=tmp; } } template inline void dimeArray::setCount(const int count) { if (count < this->num) this->num = count; } template inline int dimeArray::count() const { return this->num; } template inline int dimeArray::allocSize() const { return this->size; } template inline T * dimeArray::arrayPointer() { return this->array; } template inline const T * dimeArray::constArrayPointer() const { return this->array; } template inline void dimeArray::makeEmpty(const int initsize) { delete [] this->array; this->array = new T[initsize]; this->size = initsize; this->num = 0; } template inline void dimeArray::freeMemory() { delete [] this->array; this->array = NULL; this->size = 0; this->num = 0; } template inline void dimeArray::shrinkToFit() { T *oldarray = this->array; this->array = new T[this->num]; for (int i = 0; i < this->num; i++) this->array[i] = oldarray[i]; this->size = this->num; delete [] oldarray; } #endif // ! DIME_ARRAY_H dime/include/dime/util/BSPTree.h0100644017777301777730000000431607455302007015236 0ustar wwwwww/**************************************************************************\ * * FILE: BSPTree.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_BSPTREE_H #define DIME_BSPTREE_H #include #include #include class dimeBox; class dime_bspnode; class DIME_DLL_API dimeBSPTree { public: dimeBSPTree(const int maxnodepts = 64, const int initsize = 4); ~dimeBSPTree(); int numPoints() const; void getPoint(const int idx, dimeVec3f &pt); void *getUserData(const int idx) const; void setUserData(const int idx, void * const data); int addPoint(const dimeVec3f &pt, void * const userdata = NULL); int removePoint(const dimeVec3f &pt); void removePoint(const int idx); int findPoint(const dimeVec3f &pos) const; void clear(const int initsize = 4); const dimeBox *getBBox() const; private: friend class dime_bspnode; dimeArray pointsArray; dimeArray userdataArray; dime_bspnode *topnode; int maxnodepoints; dimeBox *boundingBox; }; // class dimeBSPTree #endif // ! DIME_BSPTREE_H dime/include/dime/util/Box.h0100644017777301777730000000471107455302007014521 0ustar wwwwww/**************************************************************************\ * * FILE: Box.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_BOX_H #define DIME_BOX_H #include #include class DIME_DLL_API dimeBox { public: dimeVec3f min, max; public: dimeBox(); dimeBox(const dxfdouble x0, const dxfdouble y0, const dxfdouble z0, const dxfdouble x1, const dxfdouble y1, const dxfdouble z1); void set(const dxfdouble x0, const dxfdouble y0, const dxfdouble z0, const dxfdouble x1, const dxfdouble y1, const dxfdouble z1); void get(dxfdouble &x0, dxfdouble &y0, dxfdouble &z0, dxfdouble &x1, dxfdouble &y1, dxfdouble &z1) const; bool operator & (const dimeBox &box) const; bool pointInside(const dimeVec3f &pt) const; dimeVec3f center() const; void makeEmpty(); void grow(const dimeVec3f &pt); dxfdouble size() const; bool hasExtent() const; }; // class dimeBox inline bool dimeBox::pointInside(const dimeVec3f &pt) const { return ! (pt[0] < this->min[0] || pt[0] >= this->max[0] || pt[1] < this->min[1] || pt[1] >= this->max[1] || pt[2] < this->min[2] || pt[2] >= this->max[2]); } inline dimeVec3f dimeBox::center() const { return dimeVec3f((min[0]+max[0])*0.5f, (min[1]+max[1])*0.5f, (min[2]+max[2])*0.5f); } #endif // ! DIME_BOX_H dime/include/dime/util/Dict.h0100644017777301777730000000433307455302007014654 0ustar wwwwww/**************************************************************************\ * * FILE: Dict.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_DICT_H #define DIME_DICT_H #include #include class DIME_DLL_API dimeDictEntry { friend class dimeDict; private: dimeDictEntry *next; dimeDictEntry(const char * const k, void *v) {key = strdup(k); value = v; }; ~dimeDictEntry() {free(key);} char *key; void *value; }; // class dimeDictEntry class DIME_DLL_API dimeDict { public: dimeDict(const int entries = 17989); ~dimeDict(); void clear(); bool enter(const char * const key, char *&ptr, void *value); const char *enter(const char * const key, void *value); const char *find(const char * const key) const; bool find(const char * const key, void *&value) const; bool remove(const char * const key); void dump(void); private: int tableSize; dimeDictEntry **buckets; dimeDictEntry *&findEntry(const char * const key) const; unsigned int bucketNr(const char *key) const; public: void print_info(); }; // class dimeDict #endif // ! DIME_DICT_H dime/include/dime/util/Linear.h0100644017777301777730000001717507455302007015213 0ustar wwwwww/**************************************************************************\ * * FILE: Linear.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_LINEAR_H #define DIME_LINEAR_H #include #include #include #include class DIME_DLL_API dimeVec2f { public: dimeVec2f() {} dimeVec2f(const dimeVec2f &vec) {x = vec.x; y = vec.y;} dimeVec2f(dxfdouble _x, dxfdouble _y) {x = _x; y = _y;} void setValue(const dxfdouble _x, const dxfdouble _y) {x = _x; y = _y;} //dxfdouble operator [] (const int i) const //{ return (i==0?x:y); } // dxfdouble & operator [] (const int i) //{ return(i==0?x:y);} void print() const { printf("Coord2: (%.3f, %.3f)\n", x,y);} void print(const char *s) {printf("%s: (%.3f, %.3f)\n", s,x,y);} dxfdouble x,y; }; // class dimeVec2f class DIME_DLL_API dimeVec3f { public: dxfdouble x, y, z; dimeVec3f(void) {}; dimeVec3f(const dxfdouble X, const dxfdouble Y, const dxfdouble Z) { x=X; y=Y; z=Z; }; dimeVec3f(const dxfdouble *xyz) { x = xyz[0]; y = xyz[1]; z = xyz[2]; } dimeVec3f (const dimeVec3f& v) { x=v.x; y=v.y; z=v.z; }; dimeVec3f cross(const dimeVec3f &v) const { return dimeVec3f(y*v.z-z*v.y, z*v.x-x*v.z, x*v.y-y*v.x); } dxfdouble dot(const dimeVec3f &v) const { return x*v.x+y*v.y+z*v.z; } bool equals(const dimeVec3f &v) { return (x == v.x && y == v.y && z == v.z); } bool equals(const dimeVec3f &v, dxfdouble tol) { return (fabs(x-v.x) <= tol && fabs(y-v.y) <= tol && fabs(z-v.z) <= tol); } operator dxfdouble *() { return &x; } const dxfdouble *getValue() const { return &x; } void getValue(dxfdouble &_x, dxfdouble &_y, dxfdouble &_z) const { _x = x; _y = y; _z = z;} dxfdouble length() const { return (dxfdouble) sqrt(x*x+y*y+z*z); } dxfdouble sqrLength(void) const { return x*x+y*y+z*z; } void negate(void) { x = -x; y = -y; z = -z; } void setValue(const dxfdouble *v) { x = v[0]; y = v[1]; z = v[2]; } void setValue(const dxfdouble X, const dxfdouble Y, const dxfdouble Z) { x=X; y=Y; z=Z; } dxfdouble operator [] (const int i) const { return( (i==0)?x:((i==1)?y:z) ); }; dxfdouble & operator [] (const int i) { return( (i==0)?x:((i==1)?y:z) ); }; dimeVec3f &operator *= (const dxfdouble s) { x*=s; y*=s; z*=s; return *this; } dimeVec3f &operator /= (const dxfdouble s) { x/=s; y/=s; z/=s; return *this; } dimeVec3f &operator += (const dimeVec3f &v) { x+=v.x; y+=v.y; z+=v.z; return *this; } dimeVec3f &operator -= (const dimeVec3f &v) { x-=v.x; y-=v.y; z-=v.z; return *this;} dimeVec3f operator -() const { return dimeVec3f(-x, -y, -z); } friend dimeVec3f operator *(const dimeVec3f &v, dxfdouble s) { return dimeVec3f(v.x*s, v.y*s, v.z*s); } friend dimeVec3f operator *(dxfdouble s, const dimeVec3f &v) { return dimeVec3f(v.x*s, v.y*s, v.z*s); } friend dimeVec3f operator / (const dimeVec3f &v, dxfdouble s) { return dimeVec3f(v.x/s, v.y/s, v.z/s); } friend dimeVec3f operator + (const dimeVec3f &v1, const dimeVec3f &v2) { return dimeVec3f(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z); } friend dimeVec3f operator - (const dimeVec3f &v1, const dimeVec3f &v2) { return dimeVec3f(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z); } friend bool operator ==(const dimeVec3f &v1, const dimeVec3f &v2) { return (v1.x == v2.x && v1.y == v2.y && v1.z == v2.z); } friend bool operator !=(const dimeVec3f &v1, const dimeVec3f &v2) { return (v1.x != v2.x || v1.y != v2.y || v1.z != v2.z); } dimeVec3f& operator = (const dimeVec3f &v) // extra { x=v.x; y=v.y; z=v.z; return *this; } void multMatrix(dxfdouble *matrix) // extra { dxfdouble tx, ty, tz; tx = ty = tz = 0.0f; tx = matrix[0]*x+matrix[1]*y+matrix[2]*z; ty = matrix[4]*x+matrix[5]*y+matrix[6]*z; tz = matrix[8]*x+matrix[9]*y+matrix[10]*z; x = tx, y = ty, z = tz; } void print() const // extra { printf("dimeVec3f: (%.3f, %.3f, %.3f)\n",x, y, z); } void print(const char *s) const { printf("%s: (%.3f, %.3f, %.3f)\n",s, x, y, z); } dimeVec3f multComponents(const dimeVec3f &v) const { return dimeVec3f(x*v.x, y*v.y, z*v.z); } dxfdouble angle(const dimeVec3f &v2); void normalize(); }; // class dimeVec3f class DIME_DLL_API dimeMatrix { public: dimeMatrix() {} dimeMatrix(const dimeMatrix &matrix); // Constructor given all 16 elements in row-major order dimeMatrix(dxfdouble a11, dxfdouble a12, dxfdouble a13, dxfdouble a14, dxfdouble a21, dxfdouble a22, dxfdouble a23, dxfdouble a24, dxfdouble a31, dxfdouble a32, dxfdouble a33, dxfdouble a34, dxfdouble a41, dxfdouble a42, dxfdouble a43, dxfdouble a44); void transpose(); void makeIdentity(); bool isIdentity() const; void setTransform(const dimeVec3f &translation, const dimeVec3f &scalefactor, const dimeVec3f &rotAngles); dimeMatrix &multRight(const dimeMatrix &m); // this = this * m dimeMatrix &multLeft(const dimeMatrix &m); // this = m * this // Sets matrix to rotate by given rotation void setRotate(const dimeVec3f &rot); void setRotate(const dimeVec3f &x, const dimeVec3f &y, const dimeVec3f &z); // sets matrix to rotate around given vector void setRotation(const dimeVec3f &u, const dxfdouble angle); // Sets matrix to scale by given uniform factor void setScale(const dxfdouble s); // Sets matrix to scale by given vector void setScale(const dimeVec3f &s); // Sets matrix to translate by given vector void setTranslate(const dimeVec3f &t); // Multiplies matrix by given column vector, giving vector result void multMatrixVec(const dimeVec3f &src, dimeVec3f &dst) const; // transforms vector void multMatrixVec(dimeVec3f &vec) const; // Multiplies given row vector by matrix, giving vector result //void multVecMatrix(const dimeVec3f &src, dimeVec3f &dst) const; // Cast: returns pointer to storage of first element operator dxfdouble *() { return &matrix[0][0]; } // Make it look like a usual matrix (so you can do m[3][2]) dxfdouble *operator [](int i) { return &matrix[i][0]; } const dxfdouble * operator [](int i) const { return &matrix[i][0];} dimeMatrix &operator =(const dimeMatrix &m); // Performs right multiplication with another matrix dimeMatrix &operator *=(const dimeMatrix &m) { return multRight(m); } static dimeMatrix identity(); bool inverse(); bool inverse2(); dxfdouble determinant(const int i=-2, const int j=-1); void operator *=(const dxfdouble val); private: dxfdouble matrix[4][4]; }; // class dimeMatrix #endif // ! DIME_LINEAR_H dime/include/dime/util/MemHandler.h0100644017777301777730000000340007455302007015777 0ustar wwwwww/**************************************************************************\ * * FILE: MemHandler.h * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #ifndef DIME_MEMHANDLER_H #define DIME_MEMHANDLER_H #include class DIME_DLL_API dimeMemHandler { public: dimeMemHandler(); ~dimeMemHandler(); bool initOk() const; char *stringAlloc(const char * const string); void *allocMem(const int size, const int alignment = 4); private: class dimeMemNode *bigmemnode; // linked list of big memory chunks class dimeMemNode *memnode; // linked list of memory nodes. }; // class dimeMemHandler #endif // ! DIME_MEMHANDLER_H dime/src/0040755017777301777730000000000007733212517011076 5ustar wwwwwwdime/src/Base.cpp0100644017777301777730000000540007640532504012446 0ustar wwwwww/**************************************************************************\ * * FILE: Base.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeBase dime/Base.h \brief The dimeBase class is the superclass for most classes in Dime. dimeBase implements the \e new operator to enable use of the special-purpose memory manager class, dimeMemHandler. It also implements a simple run-time type checking system. */ #include #include #include /*! \fn int dimeBase::typeId() const Must be implemented by all subclasses, and should return an unique id for that class. */ /*! Constructor. */ dimeBase::dimeBase(void) { } /*! virtual destructor. */ dimeBase::~dimeBase() { } /*! Returns \e true if the object is of type \a typeid or is inherited from it. Function in base class checks whether \a thetypeid equals the virtual dimeBase::typeId() value or equals \e dimeBaseType. Must be implemented by all subclasses that are superclasses of other classes, and should check if \a thetypeid equals its typeId, and then call its parent's isOfType function. Leaf-classes do not have to implement this method. */ bool dimeBase::isOfType(const int thetypeid) const { return this->typeId() == thetypeid || thetypeid == dimeBaseType; } void * dimeBase::operator new(size_t size, dimeMemHandler *memhandler, const int alignment) { if (memhandler) return memhandler->allocMem(size, alignment); else return ::operator new(size); } void dimeBase::operator delete(void * ptr) { // will only get here if we don't use a memory handler ::operator delete(ptr); } dime/src/Basic.cpp0100644017777301777730000000313606776622121012625 0ustar wwwwww/**************************************************************************\ * * FILE: Basic.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeParam dime/Basic.h \brief The dimeParam class is a union of the different parameter types. */ #ifdef macintosh char *strdup(const char *istr) { int len; char* rstr; len = strlen( istr ) + 1; rstr = (char*)malloc( (sizeof(char) * len) ); strcpy(rstr, istr); rstr[len]='\0'; return rstr; } #endif // macintosh dime/src/Input.cpp0100644017777301777730000004312207142512100012661 0ustar wwwwww/**************************************************************************\ * * FILE: Input.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeInput dime/Input.h \brief The dimeInput class offers transparent file I/O for DXF and DXB */ #ifdef _WIN32 #include #else #include #endif #include #include #include #include #include #include #ifdef macintosh #include "unix.h" #endif #ifdef USE_GZFILE #include #endif #include #include #define READBUFSIZE 65536 #define TMPBUFSIZE 512 // temporary buffer used to read floats or integers /*! Constructor. */ dimeInput::dimeInput() : model( NULL ), version( 12 ), fd( -1 ), readbuf( NULL ), callback( NULL ), callbackdata( NULL ) { #ifdef USE_GZFILE this->gzfp = NULL; #else this->fp = NULL; this->didOpenFile = false; #endif this->prevwashandle = false; } /*! Destructor. */ dimeInput::~dimeInput() { delete [] this->readbuf; #ifdef USE_GZFILE if (this->gzfp) gzclose(this->gzfp); #else if (this->fp && this->didOpenFile) fclose(this->fp); #endif } bool dimeInput::init() { this->aborted = false; this->hasPutBack = false; this->putBackCode = 0; this->filePosition = 0; this->binary = false; this->binary16bit = false; this->fd = -1; #ifdef USE_GZFILE if (this->gzfp) gzclose(this->gzfp); this->gzfp = NULL; this->gzeof = true; #else if (this->fp && this->didOpenFile) fclose(this->fp); this->fp = NULL; this->didOpenFile = false; this->fpeof = true; #endif this->filesize = 0; if (this->readbuf == NULL) { this->readbuf = new char[READBUFSIZE]; // create buffer if (!this->readbuf) return false; } this->readbufIndex = 0; this->readbufLen = 0; this->backBufIndex = -1; this->backBuf.setCount(0); this->prevposition = 0.0f; this->cbcnt = 0; this->prevwashandle = false; this->endianSwap = false; return true; } /*! This method returns wether file input was aborted or not. */ bool dimeInput::isAborted() const { return this->aborted; } /*! This method sets a progress callback that will be called with a float in the range between 0 and 1, and void * \a cbdata as arguments. */ void dimeInput::setCallback(int (*cb)(float, void *), void *cbdata) { this->callback = cb; this->callbackdata = cbdata; this->prevposition = 0.0f; this->cbcnt = 0; } /*! Returns the relative file position. 0.0 means beginning of file, 1.0 is at end of file. */ float dimeInput::relativePosition() { assert(this->didOpenFile); if (!this->filesize) return 0.0f; return (((float)(lseek(this->fd, 0, SEEK_CUR)-(readbufLen-readbufIndex)))/ ((float)(this->filesize))); } /*! Opens the file 'filename' for reading. True is returned if the file is opened correctly. File will be closed in destructor. */ bool dimeInput::setFile(const char * const filename) { #ifdef _WIN32 int fd = open(filename, O_RDONLY | O_BINARY); #else int fd = open(filename, O_RDONLY); #endif if (fd < 0) { return false; } return setFilePointer(fd); } /*! Sets the input data to the stream \a fp. \fp must be a valid file/stream, and will \e not be closed in the destuctor. No progress information will be avilable during loading if this method is used. */ bool dimeInput::setFileHandle(FILE *fp) { if (!this->init()) return false; this->fp = fp; this->fpeof = false; this->didOpenFile = false; this->filesize = 1; this->binary = this->checkBinary(); return true; } /*! Sets the file pointer for this instance. \a newfd is a file opened with the unistd open() function. */ bool dimeInput::setFilePointer(const int newfd) { if (!this->init()) return false; this->fd = newfd; #if USE_GZFILE this->gzfp = gzdopen(this->fd, "rb"); this->gzeof = false; #else this->fp = fdopen(this->fd, "rb"); this->didOpenFile = true; this->fpeof = false; #endif long startpos = lseek(fd, 0, SEEK_CUR); this->filesize = lseek(fd, 0, SEEK_END); lseek(fd, startpos, SEEK_SET); this->binary = this->checkBinary(); return this->filesize > 0; } /*! Returns true if end of file is encountered. */ bool dimeInput::eof() const { #if USE_GZFILE return this->gzeof; #else return this->fpeof; #endif } /*! Reads a group code from the file. In binary files, group codes are represented as a single byte, with the exception of extended data which has 255 as the first byte, and then the actual group code following as a 16-bit integer. */ bool dimeInput::readGroupCode(int32 &code) { bool ret; if (this->hasPutBack) { this->hasPutBack = false; code = this->putBackCode; ret = true; } else { if (this->didOpenFile && this->callback && this->cbcnt++ > 100) { this->cbcnt = 0; float pos = this->relativePosition(); if (pos > this->prevposition + 0.01f) { this->prevposition = pos; if (!this->callback(pos, this->callbackdata)) { this->aborted = true; return false; } } } if (this->binary) { if (this->binary16bit) { uint16 uval; int16 *ptr = (int16*)&uval; ret = this->readInt16(*ptr); code = (int32)uval; } else { unsigned char uval; // group code is unsigned int8 char *ptr = (char*) &uval; ret = this->get(*ptr); code = (int32) uval; } if (code == 255) { int16 val16; ret = this->readInt16(val16); code = (int32) val16; } } else { // // quick fix to ignore comments // ret = readInt32(code); while (ret && code == 999) { readString(); ret = readInt32(code); } } } if (code == 5) this->prevwashandle = true; else this->prevwashandle = false; return ret; } /*! This function is needed when a loader snoops for future group codes. It is possible to put back a single group code so that the next time dimeInput::readGroupCode() is called, the putback value will be returned. */ void dimeInput::putBackGroupCode(const int32 code) { this->putBackCode = code; this->hasPutBack = true; } /*! Reads an 8 bit integer from the file. */ bool dimeInput::readInt8(int8 &val) { if (this->binary) { char *ptr = (char*)&val; return get(*ptr); } long tmp; bool ok = skipWhiteSpace(); if (ok && readInteger(tmp) && tmp >= -128 && tmp <= 127) { val = (int8) tmp; return nextLine(); } return false; } /*! Reads a 16 bit integer from the file. */ bool dimeInput::readInt16(int16 &val) { if (this->binary) { bool ret; char *ptr = (char*)&val; if (this->endianSwap) { this->get(ptr[1]); ret = this->get(ptr[0]); } else { this->get(ptr[0]); ret = this->get(ptr[1]); } return ret; } long tmp; bool ok = skipWhiteSpace(); if (ok && readInteger(tmp) && tmp >= -32768 && tmp <= 32767) { val = (int16) tmp; return nextLine(); } return false; } /*! Reads a 32 bit integer from the file. */ bool dimeInput::readInt32(int32 &val) { if (this->binary) { bool ret; char *ptr = (char*)&val; if (this->endianSwap) { this->get(ptr[3]); this->get(ptr[2]); this->get(ptr[1]); ret = this->get(ptr[0]); } else { this->get(ptr[0]); this->get(ptr[1]); this->get(ptr[2]); ret = this->get(ptr[3]); } return ret; } long tmp; if (skipWhiteSpace() && readInteger(tmp)) { val = tmp; return nextLine(); } return false; } /*! Reads a single precision floating point number from the file. */ bool dimeInput::readFloat(float &val) { if (this->binary) { // binary files only contains doubles dxfdouble tmp; bool ret = readDouble(tmp); val = (float) tmp; return ret; } dxfdouble tmp; bool ok = skipWhiteSpace(); if (ok && readReal(tmp) && tmp >= -FLT_MAX && tmp <= FLT_MAX) { val = (float) tmp; return nextLine(); } return false; } /*! Reads a dxfdouble precision floating point number from the file. */ bool dimeInput::readDouble(dxfdouble &val) { if (this->binary) { bool ret; double tmp; assert(sizeof(tmp) == 8); char *ptr = (char*)&tmp; if (this->endianSwap) { this->get(ptr[7]); this->get(ptr[6]); this->get(ptr[5]); this->get(ptr[4]); this->get(ptr[3]); this->get(ptr[2]); this->get(ptr[1]); ret = this->get(ptr[0]); val = (dxfdouble) tmp; } else { this->get(ptr[0]); this->get(ptr[1]); this->get(ptr[2]); this->get(ptr[3]); this->get(ptr[4]); this->get(ptr[5]); this->get(ptr[6]); ret = this->get(ptr[7]); val = (dxfdouble) tmp; } return ret; } return skipWhiteSpace() && readReal(val) && nextLine(); } /*! Returns a null-terminated string read from the file. The string is valid only until the next read operation, so you'd better copy it somewhere if you need it. */ const char * dimeInput::readString() { bool ok = skipWhiteSpace(); if (ok) { char c; int idx = 0; #if 0 if (this->binary) { if (!get(c)) return NULL; if (c != 0) lineBuf[idx++] = c; } #endif while (get(c) && c != 0xa && c != 0xd && c != 0 && idx < DXF_MAXLINELEN) { lineBuf[idx++] = c; } if (c == 0xa) this->putBack(c); else if (c == 0xd) this->putBack(c); this->nextLine(); this->lineBuf[idx] = '\0'; if (this->prevwashandle) { this->prevwashandle = false; if (this->model) { this->model->registerHandle(this->lineBuf); } } return this->lineBuf; } return NULL; } /*! Returns the memory handler used in this model. */ dimeMemHandler * dimeInput::getMemHandler() { if (model) return model->getMemHandler(); return NULL; } /*! Returns the model for this file. */ dimeModel * dimeInput::getModel() { return model; } /*! For ASCII files, it returns the current line number. For binary files the file position is returned. */ int dimeInput::getFilePosition() const { return filePosition; } /*! Returns true if this is a binary (DXB) file. */ bool dimeInput::isBinary() const { return binary; } /*! Returns the version of this file (10, 12, 13 or 14). */ int dimeInput::getVersion() const { return version; } // private funcs *********************************************************** // // Reads a relatively big block from the file into local memory. // stdio caching is not fast enough... // bool dimeInput::doBufferRead() { #if USE_GZFILE if (!this->gzfp) return false; int len = gzread(this->gzfp, this->readbuf, READBUFSIZE); if (len <= 0) { this->gzeof = true; this->readbufIndex = 0; this->readbufLen = 0; return false; } else { this->readbufIndex = 0; this->readbufLen = len; return true; } #else // ! USE_GZFILE if (!this->fp) return false; int len = fread(this->readbuf, 1, READBUFSIZE, this->fp); if (len <= 0) { this->fpeof = true; this->readbufIndex = 0; this->readbufLen = 0; return false; } else { this->readbufIndex = 0; this->readbufLen = len; return true; } #endif // ! USE_GZFILE } // // puts a character back in the stream // void dimeInput::putBack(const char c) { if (readbufIndex > 0 && backBufIndex < 0) readbufIndex--; else backBuf[++backBufIndex] = c; } // // puts back a string // void dimeInput::putBack(const char * const string) { int n = strlen(string); if (n <= readbufIndex && backBufIndex < 0) readbufIndex -= n; else { for (int i = n - 1; i >= 0; i--) backBuf[++backBufIndex] = string[i]; } } // // returns the first non white-space char // bool dimeInput::read(char &c) { return (skipWhiteSpace() && get(c)); } // // returns the next char in the stream // bool dimeInput::get(char &c) { if(backBufIndex >= 0) { c = backBuf[backBufIndex--]; return true; } if (readbufIndex >= readbufLen) { if (!doBufferRead()) { return false; } } c = readbuf[readbufIndex++]; #if 0 if (c == 0) { #if USE_GZFILE this->gzeof = true; #else // ! USE_GZFILE this->fpeof = true; #endif return false; } #endif if (this->binary) { this->filePosition++; } return true; } // // skip all white spaces // bool dimeInput::skipWhiteSpace() { if (this->binary) return true; char c; register bool gotChar; register char endline = 0xa; register char endline2 = 0xd; while((gotChar = get(c)) && isspace(c) && c != endline && c != endline2); if (!gotChar) return false; // step one char back putBack(c); return true; } bool dimeInput::nextLine() { if (this->binary) return true; char c; register bool gotChar; register char endline = 0xa; register char endline2 = 0xd; while((gotChar = get(c)) && c != endline && c != endline2); if (!gotChar) return false; while (c == endline2) { // try to read one more gotChar = get(c); if (!gotChar) return false; } if (c != endline && c != endline2) this->putBack(c); this->filePosition++; return true; } // // read an integer // bool dimeInput::readInteger(long &l) { assert(!this->binary); char str[TMPBUFSIZE]; char *s = str; if(readChar(s, '-') || readChar(s, '+')) s++; if(! readUnsignedIntegerString(s)) return false; l = strtol(str, NULL, 0); return true; } // // read an unsigned integer // bool dimeInput::readUnsignedInteger(unsigned long &l) { assert(!this->binary); char str[TMPBUFSIZE]; if(! readUnsignedIntegerString(str)) return false; l = strtoul(str, NULL, 0); return true; } bool dimeInput::readUnsignedIntegerString(char * const str) { assert(!this->binary); int minSize = 1; char *s = str; if(readChar(s, '0')) { if(readChar(s + 1, 'x')) { s += 2 + readHexDigits(s + 2); minSize = 3; } else s += 1 + readDigits(s + 1); } else s += readDigits(s); if(s - str < minSize) return false; *s = '\0'; return true; } int dimeInput::readDigits(char * const string) { assert(!this->binary); char c, *s = string; while (get(c)) { if(isdigit(c)) *s++ = c; else { putBack(c); break; } } return s - string; } // // check if a character is next in stream. Writes character into // string if found, puts character back otherwise. // int dimeInput::readChar(char * const string, char charToRead) { assert(!this->binary); char c; int ret; if(!get(c)) ret = 0; else if(c == charToRead) { *string = c; ret = 1; } else { putBack(c); ret = 0; } return ret; } int dimeInput::readHexDigits(char * const string) { assert(!this->binary); char c, *s = string; while (get(c)) { if(isxdigit(c)) *s++ = c; else { putBack(c); break; } } return s - string; } // // reads a floating point number // bool dimeInput::readReal(dxfdouble &d) { assert(!this->binary); char str[TMPBUFSIZE]; int n; char *s = str; bool gotNum = false; n = readChar(s, '-'); if(n == 0) n = readChar(s, '+'); s += n; if((n = readDigits(s)) > 0) { gotNum = true; s += n; } if(readChar(s, '.') > 0) { s++; if((n = readDigits(s)) > 0) { gotNum = true; s += n; } } if(!gotNum) return false; n = readChar(s, 'e'); if(n == 0) n = readChar(s, 'E'); if(n > 0) { s += n; n = readChar(s, '-'); if(n == 0) n = readChar(s, '+'); s += n; if((n = readDigits(s)) > 0) s += n; else return false; } *s = '\0'; d = atof(str); return true; } bool dimeInput::checkBinary() { { // perform endian-test uint16 val; char *ptr = (char*)&val; ptr[0] = 1; ptr[1] = 0; if (val == 0x0001) this->endianSwap = false; else { assert(val == 0x0100); this->endianSwap = true; } } static char binaryid[] = "AutoCAD Binary DXF"; char buf[64]; int i; int n = strlen(binaryid); for (i = 0; i < n; i++) { if (!this->get(buf[i])) break; if (buf[i] != binaryid[i]) break; } if (i < n) { // probably ascii this->readbufIndex = 0; // assumes READBUFSIZE > 22, should be safe this->filePosition = 0; return false; } else { // skip next 4 bytes for (i = 0; i < 4; i++) this->get(buf[0]); this->filePosition = 22; // byte position in file char test16; this->get(test16); assert(test16 == 0); this->get(test16); if (test16 == 0) { this->binary16bit = true; this->putBack((char)0); this->putBack((char)0); } else { this->binary16bit = false; this->putBack(test16); this->putBack((char)0); } return true; } } dime/src/Layer.cpp0100644017777301777730000002037007672031035012651 0ustar wwwwww/**************************************************************************\ * * FILE: Layer.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeLayer dime/Layer.h \brief The dimeLayer class handles layers. Each entity will have a pointer to a dimeLayer class. If no layer is specified by the user, a pointer to a default layer will be used. An instance of this class can only be constructed by the dimeModel class. To add new layers to your model, you must use the dimeLayerTable class, and add them to a dimeTablesSection. \sa dimeModel::addLayer() */ #include #include // palette for color indices 1-255 static dxfdouble colortable[] = { 1,0,0, // 1 1,1,0, 0,1,0, 0,1,1, 0,0,1, 1,0,1, 1,1,1, 0.5,0.5,0.5, //0.5,0.5,0.5, 0.75,0.75,0.75, //0.75,0.75,0.75, 1,0,0, 1,0.5,0.5, 0.65,0,0, 0.65,0.325,0.325, 0.5,0,0, 0.5,0.25,0.25, 0.3,0,0, 0.3,0.15,0.15, 0.15,0,0, 0.15,0.075,0.075, 1,0.25,0, // 20 1,0.625,0.5, 0.65,0.1625,0, 0.65,0.4063,0.325, 0.5,0.125,0, 0.5,0.3125,0.25, 0.3,0.075,0, 0.3,0.1875,0.15, 0.15,0.0375,0, 0.15,0.0938,0.075, 1,0.5,0, 1,0.75,0.5, 0.65,0.325,0, 0.65,0.4875,0.325, 0.5,0.25,0, 0.5,0.375,0.25, 0.3,0.15,0, 0.3,0.225,0.15, 0.15,0.075,0, 0.15,0.1125,0.075, 1,0.75,0, 1,0.875,0.5, 0.65,0.4875,0, 0.65,0.5688,0.325, 0.5,0.375,0, 0.5,0.4375,0.25, 0.3,0.225,0, 0.3,0.2625,0.15, 0.15,0.1125,0, 0.15,0.1313,0.075, 1,1,0, 1,1,0.5, 0.65,0.65,0, 0.65,0.65,0.325, 0.5,0.5,0, 0.5,0.5,0.25, 0.3,0.3,0, 0.3,0.3,0.15, 0.15,0.15,0, 0.15,0.15,0.075, 0.75,1,0, 0.875,1,0.5, 0.4875,0.65,0, 0.5688,0.65,0.325, 0.375,0.5,0, 0.4375,0.5,0.25, 0.225,0.3,0, 0.2625,0.3,0.15, 0.1125,0.15,0, 0.1313,0.15,0.075, 0.5,1,0, 0.75,1,0.5, 0.325,0.65,0, 0.4875,0.65,0.325, 0.25,0.5,0, 0.375,0.5,0.25, 0.15,0.3,0, 0.225,0.3,0.15, 0.075,0.15,0, 0.1125,0.15,0.075, 0.25,1,0, 0.625,1,0.5, 0.1625,0.65,0, 0.4063,0.65,0.325, 0.125,0.5,0, 0.3125,0.5,0.25, 0.075,0.3,0, 0.1875,0.3,0.15, 0.0375,0.15,0, 0.0938,0.15,0.075, 0,1,0, 0.5,1,0.5, 0,0.65,0, 0.325,0.65,0.325, 0,0.5,0, 0.25,0.5,0.25, 0,0.3,0, 0.15,0.3,0.15, 0,0.15,0, 0.075,0.15,0.075, 0,1,0.25, 0.5,1,0.625, 0,0.65,0.1625, 0.325,0.65,0.4063, 0,0.5,0.125, 0.25,0.5,0.3125, 0,0.3,0.075, 0.15,0.3,0.1875, 0,0.15,0.0375, 0.075,0.15,0.0938, 0,1,0.5, 0.5,1,0.75, 0,0.65,0.325, 0.325,0.65,0.4875, 0,0.5,0.25, 0.25,0.5,0.375, 0,0.3,0.15, 0.15,0.3,0.225, 0,0.15,0.075, 0.075,0.15,0.1125, 0,1,0.75, 0.5,1,0.875, 0,0.65,0.4875, 0.325,0.65,0.5688, 0,0.5,0.375, 0.25,0.5,0.4375, 0,0.3,0.225, 0.15,0.3,0.2625, 0,0.15,0.1125, 0.075,0.15,0.1313, 0,1,1, 0.5,1,1, 0,0.65,0.65, 0.325,0.65,0.65, 0,0.5,0.5, 0.25,0.5,0.5, 0,0.3,0.3, 0.15,0.3,0.3, 0,0.15,0.15, 0.075,0.15,0.15, 0,0.75,1, 0.5,0.875,1, 0,0.4875,0.65, 0.325,0.5688,0.65, 0,0.375,0.5, 0.25,0.4375,0.5, 0,0.225,0.3, 0.15,0.2625,0.3, 0,0.1125,0.15, 0.075,0.1313,0.15, 0,0.5,1, 0.5,0.75,1, 0,0.325,0.65, 0.325,0.4875,0.65, 0,0.25,0.5, 0.25,0.375,0.5, 0,0.15,0.3, 0.15,0.225,0.3, 0,0.075,0.15, 0.075,0.1125,0.15, 0,0.25,1, 0.5,0.625,1, 0,0.1625,0.65, 0.325,0.4063,0.65, 0,0.125,0.5, 0.25,0.3125,0.5, 0,0.075,0.3, 0.15,0.1875,0.3, 0,0.0375,0.15, 0.075,0.0938,0.15, 0,0,1, 0.5,0.5,1, 0,0,0.65, 0.325,0.325,0.65, 0,0,0.5, 0.25,0.25,0.5, 0,0,0.3, 0.15,0.15,0.3, 0,0,0.15, 0.075,0.075,0.15, 0.25,0,1, 0.625,0.5,1, 0.1625,0,0.65, 0.4063,0.325,0.65, 0.125,0,0.5, 0.3125,0.25,0.5, 0.075,0,0.3, 0.1875,0.15,0.3, 0.0375,0,0.15, 0.0938,0.075,0.15, 0.5,0,1, 0.75,0.5,1, 0.325,0,0.65, 0.4875,0.325,0.65, 0.25,0,0.5, 0.375,0.25,0.5, 0.15,0,0.3, 0.225,0.15,0.3, 0.075,0,0.15, 0.1125,0.075,0.15, 0.75,0,1, 0.875,0.5,1, 0.4875,0,0.65, 0.5688,0.325,0.65, 0.375,0,0.5, 0.4375,0.25,0.5, 0.225,0,0.3, 0.2625,0.15,0.3, 0.1125,0,0.15, 0.1313,0.075,0.15, 1,0,1, 1,0.5,1, 0.65,0,0.65, 0.65,0.325,0.65, 0.5,0,0.5, 0.5,0.25,0.5, 0.3,0,0.3, 0.3,0.15,0.3, 0.15,0,0.15, 0.15,0.075,0.15, 1,0,0.75, 1,0.5,0.875, 0.65,0,0.4875, 0.65,0.325,0.5688, 0.5,0,0.375, 0.5,0.25,0.4375, 0.3,0,0.225, 0.3,0.15,0.2625, 0.15,0,0.1125, 0.15,0.075,0.1313, 1,0,0.5, 1,0.5,0.75, 0.65,0,0.325, 0.65,0.325,0.4875, 0.5,0,0.25, 0.5,0.25,0.375, 0.3,0,0.15, 0.3,0.15,0.225, 0.15,0,0.075, 0.15,0.075,0.1125, 1,0,0.25, 1,0.5,0.625, 0.65,0,0.1625, 0.65,0.325,0.4063, 0.5,0,0.125, 0.5,0.25,0.3125, 0.3,0,0.075, 0.3,0.15,0.1875, 0.15,0,0.0375, 0.15,0.075,0.0938, 0.33,0.33,0.33, 0.464,0.464,0.464, 0.598,0.598,0.598, 0.732,0.732,0.732, 0.866,0.866,0.866, 1,1,1}; dimeLayer * dimeLayer::defaultLayer; // 0 seems to be the default layer name in AutoCAD static char defaultName[] = "0"; dimeLayer::dimeLayer() : layerName( NULL ), layerNum( -1 ), colorNum( -1 ), flags( 0 ) { } dimeLayer::dimeLayer(const char * const name, const int num, const int16 colnum, const int16 flagmask) : layerName( name ), layerNum( num ), colorNum( colnum ), flags( flagmask ) { } /*! \fn static void colorToRGB(const int colornum, float &r, float &g, float &b) Returns the RGB values based on the color index. Legal color numbers range from 1 through 255. */ void dimeLayer::colorToRGB(const int colornum, dxfdouble &r, dxfdouble &g, dxfdouble &b) { int idx = 7*3; // default white if (colornum >= 1 && colornum <= 255) idx = colornum*3; idx -= 3; r = colortable[idx]; g = colortable[idx+1]; b = colortable[idx+2]; } /*! \fn const char *dimeLayer::getLayerName() const Returns the layer name. */ /*! \fn int dimeLayer::getLayerNum() const Returns the layer number. This will be a unique number for this layer. The default layer will have number 0, and all other layer will get running number from 1 and up. This can be useful when extracting geometry from a DXF model, and you need to group the geometry by layer. \sa dimeModel::getNumLayers(). */ /*! \fn int16 dimeLayer::getColorNumber() const Returns the color number for this layer. A negative value means that this layer is off. \sa dimeLayer::setColorNumber() */ /*! \fn void dimeLayer::setColorNumber(const int16 num) Sets the color number for this layer. \sa dimeLayer::getColorNumber() */ /*! \fn int16 dimeLayer::getFlags() const Returns the flags for this layer. */ /*! \fn void dimeLayer::setFlags(const int16 &flags) Sets the flags for this layer. */ /*! \fn bool dimeLayer::isDefaultLayer() const Returns true if this is the default layer. */ void dimeLayer::cleanup_default_layer(void) { delete defaultLayer; defaultLayer = NULL; } /*! Returns a pointer to the default layer. */ const dimeLayer * dimeLayer::getDefaultLayer() { if (defaultLayer == NULL) { defaultLayer = new dimeLayer; defaultLayer->layerName = defaultName; defaultLayer->layerNum = 0; defaultLayer->colorNum = 7; // white... atexit(cleanup_default_layer); } return defaultLayer; } dime/src/Makefile.am0100644017777301777730000001061607466761604013144 0ustar wwwwww## Process this file with automake to generate Makefile.in. CLEANFILES = \ dime@DIME_MAJOR_VERSION@@SUFFIX@.dll \ dime@DIME_MAJOR_VERSION@@SUFFIX@.pdb \ dime@DIME_MAJOR_VERSION@@SUFFIX@.exp DISTCLEANFILES = \ ii_files/*.ii SUBDIRS = classes entities objects records sections tables util convert . INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC lib_LIBRARIES = dime@DIME_MAJOR_VERSION@@SUFFIX@.lib else lib_LTLIBRARIES = libdime@SUFFIX@.la endif DimeSources = \ Base.cpp Base.h \ Basic.cpp Basic.h \ Input.cpp Input.h \ Layer.cpp Layer.h \ Model.cpp Model.h \ Output.cpp Output.h \ RecordHolder.cpp RecordHolder.h \ State.cpp State.h libdime@SUFFIX@_la_LIBADD = \ classes/libclasses.la entities/libentities.la objects/libobjects.la \ records/librecords.la sections/libsections.la tables/libtables.la \ util/libutil.la convert/libconvert.la libdime@SUFFIX@_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_LIBADD = \ classes/classes.lst entities/entities.lst objects/objects.lst \ records/records.lst sections/sections.lst tables/tables.lst \ util/util.lst convert/convert.lst ## All source files from the base directory used when building the ## library, including all headers. libdime@SUFFIX@_la_SOURCES = \ $(DimeSources) dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_SOURCES = \ $(DimeSources) libdimeincdir = $(includedir)/dime libdimeinc_HEADERS = \ ../include/dime/Base.h \ ../include/dime/Basic.h \ ../include/dime/Input.h \ ../include/dime/Layer.h \ ../include/dime/Model.h \ ../include/dime/Output.h \ ../include/dime/RecordHolder.h \ ../include/dime/State.h # Custom rule for linking a Visual C++ (MS Windows) library. dime@DIME_MAJOR_VERSION@@SUFFIX@.lib: Makefile \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_DEPENDENCIES) @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ rm -f "$$basename.dll" "$$basename.lib"; \ echo "Linking $$basename.lib..."; \ echo $(CC) $(LDFLAGS) $(LIBFLAGS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_LIBADD) $(LIBS); \ $(CC) $(LDFLAGS) $(LIBFLAGS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_LIBADD) $(LIBS); install-data-local: @$(NORMAL_INSTALL) @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ for ext in lib; do \ file="$$basename.$$ext"; \ if test -f "$$file"; then \ $(mkinstalldirs) "$(DESTDIR)$(libdir)"; \ echo " $(INSTALL_DATA)" "$$file" "$(DESTDIR)$(libdir)/$$file"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(libdir)/$$file"; \ fi \ done; install-exec-local: @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ for ext in dll pdb; do \ file="$$basename.$$ext"; \ if test -f "$$file"; then \ $(mkinstalldirs) "$(DESTDIR)$(bindir)"; \ echo " $(INSTALL_PROGRAM)" "$$file" "$(DESTDIR)$(bindir)/$$file"; \ $(INSTALL_PROGRAM) "$$file" "$(DESTDIR)$(bindir)/$$file"; \ fi \ done install-libdimeincHEADERS: $(libdimeinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdimeincdir) @list='$(libdimeinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libdimeincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libdimeincdir)/$$f; \ done uninstall-libdimeincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libdimeinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libdimeincdir)/$$f"; \ rm -f $(DESTDIR)$(libdimeincdir)/$$f; \ done uninstall-local: @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ for file in \ "$(DESTDIR)$(bindir)/$$basename.dll" \ "$(DESTDIR)$(bindir)/$$basename.pdb" \ "$(DESTDIR)$(libdir)/$$basename.lib"; do \ if test -f "$$file"; then \ echo " rm -f" "$$file"; \ rm -f "$$file"; \ fi \ done; \ baseincdir="$(DESTDIR)$(libdimeincdir)"; \ for dir in \ "$$baseincdir/VRMLnodes" \ "$$baseincdir/actions" \ "$$baseincdir/classes" \ "$$baseincdir/convert" \ "$$baseincdir/entities" \ "$$baseincdir/objects" \ "$$baseincdir/records" \ "$$baseincdir/sections" \ "$$baseincdir/tables" \ "$$baseincdir/util" \ "$$baseincdir"; do \ if test -d "$$dir"; then \ echo " rmdir $$dir"; \ rmdir "$$dir" || exit 1; \ fi \ done; \ : dime/src/Makefile.in0100644017777301777730000005316607643247732013162 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ CLEANFILES = \ dime@DIME_MAJOR_VERSION@@SUFFIX@.dll \ dime@DIME_MAJOR_VERSION@@SUFFIX@.pdb \ dime@DIME_MAJOR_VERSION@@SUFFIX@.exp DISTCLEANFILES = \ ii_files/*.ii SUBDIRS = classes entities objects records sections tables util convert . INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@lib_LIBRARIES = dime@DIME_MAJOR_VERSION@@SUFFIX@.lib @BUILD_WITH_MSVC_FALSE@lib_LTLIBRARIES = libdime@SUFFIX@.la DimeSources = \ Base.cpp Base.h \ Basic.cpp Basic.h \ Input.cpp Input.h \ Layer.cpp Layer.h \ Model.cpp Model.h \ Output.cpp Output.h \ RecordHolder.cpp RecordHolder.h \ State.cpp State.h libdime@SUFFIX@_la_LIBADD = \ classes/libclasses.la entities/libentities.la objects/libobjects.la \ records/librecords.la sections/libsections.la tables/libtables.la \ util/libutil.la convert/libconvert.la libdime@SUFFIX@_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_LIBADD = \ classes/classes.lst entities/entities.lst objects/objects.lst \ records/records.lst sections/sections.lst tables/tables.lst \ util/util.lst convert/convert.lst libdime@SUFFIX@_la_SOURCES = \ $(DimeSources) dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_SOURCES = \ $(DimeSources) libdimeincdir = $(includedir)/dime libdimeinc_HEADERS = \ ../include/dime/Base.h \ ../include/dime/Basic.h \ ../include/dime/Input.h \ ../include/dime/Layer.h \ ../include/dime/Model.h \ ../include/dime/Output.h \ ../include/dime/RecordHolder.h \ ../include/dime/State.h subdir = src mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(lib_LIBRARIES) dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_AR = $(AR) cru dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_DEPENDENCIES = classes/classes.lst \ entities/entities.lst objects/objects.lst records/records.lst \ sections/sections.lst tables/tables.lst util/util.lst \ convert/convert.lst am_dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS = Base.$(OBJEXT) \ Basic.$(OBJEXT) Input.$(OBJEXT) Layer.$(OBJEXT) Model.$(OBJEXT) \ Output.$(OBJEXT) RecordHolder.$(OBJEXT) State.$(OBJEXT) dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS = \ $(am_dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) LTLIBRARIES = $(lib_LTLIBRARIES) libdime@SUFFIX@_la_DEPENDENCIES = classes/libclasses.la \ entities/libentities.la objects/libobjects.la \ records/librecords.la sections/libsections.la \ tables/libtables.la util/libutil.la convert/libconvert.la am_libdime@SUFFIX@_la_OBJECTS = Base.lo Basic.lo Input.lo Layer.lo \ Model.lo Output.lo RecordHolder.lo State.lo libdime@SUFFIX@_la_OBJECTS = $(am_libdime@SUFFIX@_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/Base.Plo $(DEPDIR)/Base.Po \ @AMDEP_TRUE@ $(DEPDIR)/Basic.Plo $(DEPDIR)/Basic.Po \ @AMDEP_TRUE@ $(DEPDIR)/Input.Plo $(DEPDIR)/Input.Po \ @AMDEP_TRUE@ $(DEPDIR)/Layer.Plo $(DEPDIR)/Layer.Po \ @AMDEP_TRUE@ $(DEPDIR)/Model.Plo $(DEPDIR)/Model.Po \ @AMDEP_TRUE@ $(DEPDIR)/Output.Plo $(DEPDIR)/Output.Po \ @AMDEP_TRUE@ $(DEPDIR)/RecordHolder.Plo \ @AMDEP_TRUE@ $(DEPDIR)/RecordHolder.Po $(DEPDIR)/State.Plo \ @AMDEP_TRUE@ $(DEPDIR)/State.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_SOURCES) \ $(libdime@SUFFIX@_la_SOURCES) HEADERS = $(libdimeinc_HEADERS) RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ uninstall-info-recursive all-recursive install-data-recursive \ install-exec-recursive installdirs-recursive install-recursive \ uninstall-recursive check-recursive installcheck-recursive DIST_COMMON = $(libdimeinc_HEADERS) Makefile.am Makefile.in DIST_SUBDIRS = $(SUBDIRS) SOURCES = $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_SOURCES) $(libdime@SUFFIX@_la_SOURCES) all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; for p in $$list; do \ echo " rm -f $(DESTDIR)$(libdir)/$$p"; \ rm -f $(DESTDIR)$(libdir)/$$p; \ done clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) libdime@SUFFIX@.la: $(libdime@SUFFIX@_la_OBJECTS) $(libdime@SUFFIX@_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libdime@SUFFIX@_la_LDFLAGS) $(libdime@SUFFIX@_la_OBJECTS) $(libdime@SUFFIX@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Base.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Basic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Basic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Layer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Layer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Model.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Output.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/RecordHolder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/RecordHolder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/State.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/State.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: # 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): @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../include/dime @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(libdir) $(DESTDIR)$(libdimeincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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-libLIBRARIES clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-recursive distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-data-local install-libdimeincHEADERS install-exec-am: install-exec-local install-libLIBRARIES \ install-libLTLIBRARIES install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libLIBRARIES \ uninstall-libLTLIBRARIES uninstall-libdimeincHEADERS \ uninstall-local uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ clean-libtool clean-recursive distclean distclean-compile \ distclean-depend distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am \ dvi-recursive info info-am info-recursive install install-am \ install-data install-data-am install-data-local \ install-data-recursive install-exec install-exec-am \ install-exec-local install-exec-recursive install-info \ install-info-am install-info-recursive install-libLIBRARIES \ install-libLTLIBRARIES install-libdimeincHEADERS install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ tags tags-recursive uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-libLIBRARIES \ uninstall-libLTLIBRARIES uninstall-libdimeincHEADERS \ uninstall-local uninstall-recursive # Custom rule for linking a Visual C++ (MS Windows) library. dime@DIME_MAJOR_VERSION@@SUFFIX@.lib: Makefile \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_DEPENDENCIES) @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ rm -f "$$basename.dll" "$$basename.lib"; \ echo "Linking $$basename.lib..."; \ echo $(CC) $(LDFLAGS) $(LIBFLAGS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_LIBADD) $(LIBS); \ $(CC) $(LDFLAGS) $(LIBFLAGS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_OBJECTS) \ $(dime@DIME_MAJOR_VERSION@@SUFFIX@_lib_LIBADD) $(LIBS); install-data-local: @$(NORMAL_INSTALL) @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ for ext in lib; do \ file="$$basename.$$ext"; \ if test -f "$$file"; then \ $(mkinstalldirs) "$(DESTDIR)$(libdir)"; \ echo " $(INSTALL_DATA)" "$$file" "$(DESTDIR)$(libdir)/$$file"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(libdir)/$$file"; \ fi \ done; install-exec-local: @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ for ext in dll pdb; do \ file="$$basename.$$ext"; \ if test -f "$$file"; then \ $(mkinstalldirs) "$(DESTDIR)$(bindir)"; \ echo " $(INSTALL_PROGRAM)" "$$file" "$(DESTDIR)$(bindir)/$$file"; \ $(INSTALL_PROGRAM) "$$file" "$(DESTDIR)$(bindir)/$$file"; \ fi \ done install-libdimeincHEADERS: $(libdimeinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdimeincdir) @list='$(libdimeinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libdimeincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libdimeincdir)/$$f; \ done uninstall-libdimeincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libdimeinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libdimeincdir)/$$f"; \ rm -f $(DESTDIR)$(libdimeincdir)/$$f; \ done uninstall-local: @basename="dime@DIME_MAJOR_VERSION@@SUFFIX@"; \ for file in \ "$(DESTDIR)$(bindir)/$$basename.dll" \ "$(DESTDIR)$(bindir)/$$basename.pdb" \ "$(DESTDIR)$(libdir)/$$basename.lib"; do \ if test -f "$$file"; then \ echo " rm -f" "$$file"; \ rm -f "$$file"; \ fi \ done; \ baseincdir="$(DESTDIR)$(libdimeincdir)"; \ for dir in \ "$$baseincdir/VRMLnodes" \ "$$baseincdir/actions" \ "$$baseincdir/classes" \ "$$baseincdir/convert" \ "$$baseincdir/entities" \ "$$baseincdir/objects" \ "$$baseincdir/records" \ "$$baseincdir/sections" \ "$$baseincdir/tables" \ "$$baseincdir/util" \ "$$baseincdir"; do \ if test -d "$$dir"; then \ echo " rmdir $$dir"; \ rmdir "$$dir" || exit 1; \ fi \ done; \ : # 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: dime/src/Model.cpp0100644017777301777730000004033507505602432012640 0ustar wwwwww/**************************************************************************\ * * FILE: Model.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeModel dime/Model.h \brief The dimeModel class organizes a model. The constructor accepts a boolean value which specifies whether or not a memory handler should be used. The special purpose memory handler used in Coin can be used if you're just going to read a file and write the file, and not do too much dynamic work on the model. The memory handler yields very fast allocation/deallocation, and has virtually no overhead when allocating. This is important if you have large files with millions of records. The disadvantage is that memory will not be freed until the model is destructed, so if you modify your model, e.g. remove or replace an entity, the memory for the now unused entity will not be freed until the model is destructed. Then all used memory will be freed at once. Also, if you plan to implement your own entities, it takes a bit of extra care to support the memory handler. In short, you should always check if a memory allocator should be used before allocating memory, since the destructor for entities will never be called when a memory handler is used. See the documentation in dimeEntity for more information about how to create your own entities and how to support the memory handler. */ #include /*! This method returns a string saying which version of DIME is used.j */ const char * dimeModel::getVersionString() { static char versionstring[] = "DIME v0.9"; return versionstring; } void dimeModel::getVersion(int &major, int &minor) { major = 0; minor = 9; } #include #include #include #include #include #include #include #include #include #include #include #include #include #define SECTIONID "SECTION" #define EOFID "EOF" /*! Constructor. If \a usememhandler is \e TRUE, the dimeMemHandler will be used to allocate entities and records. */ dimeModel::dimeModel(const bool usememhandler) : refDict( NULL ), layerDict( NULL ), memoryHandler( NULL ), largestHandle(0), usememhandler(usememhandler) { this->init(); } /*! Destructor. */ dimeModel::~dimeModel() { int i; delete this->refDict; delete this->layerDict; for (i = 0; i < this->layers.count(); i++) delete this->layers[i]; for (i = 0; i < this->sections.count(); i++) delete this->sections[i]; delete this->memoryHandler; // free memory :) } /*! Returns a copy of the model. */ dimeModel * dimeModel::copy() const { dimeModel *newmodel = new dimeModel(this->usememhandler); if (!newmodel || !newmodel->init()) return NULL; newmodel->largestHandle = this->largestHandle; int i; int n = this->sections.count(); // refDict and layerDict will be updated during the copy operations for (i = 0; i < n; i++) newmodel->sections.append(sections[i]->copy(newmodel)); // fix forward references dimeBlocksSection *bs = (dimeBlocksSection*) newmodel->findSection("BLOCKS"); dimeEntitiesSection *es = (dimeEntitiesSection*) newmodel->findSection("ENTITIES"); if (bs) bs->fixReferences(newmodel); if (es) es->fixReferences(newmodel); return newmodel; } /*! Should be called before you start working with the model. Will be called by read() so if you're reading a model from a file you will not have to worry about this. The method cleans up the old data structures and creates new data structures for the new model. */ bool dimeModel::init() { this->sections.setCount(0); this->layers.setCount(0); delete this->refDict; delete this->layerDict; delete this->memoryHandler; // set all to NULL first to support exceptions. this->refDict = NULL; this->layerDict = NULL; this->memoryHandler = NULL; this->refDict = new dimeDict; this->layerDict = new dimeDict(101); // relatively small if (this->usememhandler) this->memoryHandler = new dimeMemHandler; return true; } /*! Reads the model file into the internal structures. */ bool dimeModel::read(dimeInput * const in) { in->model = this; // _very_ important this->init(); int32 groupcode; const char *string; bool ok = true; dimeSection *section; while (true) { ok = false; if (!in->readGroupCode(groupcode)) break; if (groupcode != 0 && groupcode != 999) break; string = in->readString(); if (string == NULL) break; if (groupcode == 999) { ok = true; dimeParam param; param.string_data = string; this->headerComments.append(dimeRecord::createRecord(groupcode, param, memoryHandler)); continue; } if (!strcmp(string, SECTIONID)) { ok = in->readGroupCode(groupcode); string = in->readString(); ok = ok && string != NULL && groupcode == 2; if (!ok) break; section = dimeSection::createSection(string, in->getMemHandler()); ok = section != NULL && section->read(in); if (!ok) break; this->sections.append(section); } else if (!strcmp(string, EOFID)) { ok = true; break; } else break; // something unexpected has happened } if (!ok) { if (in->aborted) { #ifndef NDEBUG fprintf(stderr,"DXF read aborted by user.\n"); #endif } else { #ifndef NDEBUG fprintf( stderr, "DXF loading failed at line: %d\n", in->getFilePosition()); #endif } } else { dimeBlocksSection *bs = (dimeBlocksSection*)this->findSection("BLOCKS"); dimeEntitiesSection *es = (dimeEntitiesSection*)this->findSection("ENTITIES"); if (bs) bs->fixReferences(this); if (es) es->fixReferences(this); #ifndef NDEBUG fprintf(stderr,"dimeModel::largestHandle: %d\n", this->largestHandle); #endif } return ok; } /*! Writes the model to file. Currently only DXF files are supported, but hopefullt DWG will be supported soon. */ bool dimeModel::write(dimeOutput * const out) { if (largestHandle > 0) { dimeHeaderSection *hs = (dimeHeaderSection*) this->findSection("HEADER"); if (hs) { dimeParam param; int groupcode; if (hs->getVariable("$HANDSEED", &groupcode, ¶m, 1) == 1) { char buf[512]; this->getUniqueHandle(buf, 512); this->largestHandle--; // ok to use this handle next time param.string_data = buf; hs->setVariable("$HANDSEED", &groupcode, ¶m, 1, this->getMemHandler()); } } } out->writeHeader(); int i, n = this->headerComments.count(); for (i = 0; i < n; i++) { this->headerComments[i]->write(out); } n = sections.count(); for (i = 0; i < n; i++) { out->writeGroupCode(0); out->writeString(SECTIONID); if (!sections[i]->write(out)) break; } if (i == n) { return out->writeGroupCode(0) && out->writeString(EOFID); } return false; } /*! Adds a reference in this model's dictionary. Used by BLOCK and INSERT entities to resolve references, but can also be used for other purposes. */ const char * dimeModel::addReference(const char * const name, void *id) { char *ptr = NULL; refDict->enter(name, ptr, id); return (const char*) ptr; } /*! Finds a reference from the dictionary. */ void * dimeModel::findReference(const char * const name) const { void *id; if (refDict->find(name, id)) return id; return NULL; } /*! Finds a pointer to a string in the dictionary. */ const char * dimeModel::findRefStringPtr(const char * const name) const { return refDict->find(name); } /*! Removes a reference from the dictionary. */ void dimeModel::removeReference(const char * const name) { refDict->remove(name); } /*! Returns a pointer to the memory handler used for this model. */ dimeMemHandler * dimeModel::getMemHandler() { return this->memoryHandler; } /*! Adds a layer to the list of layers. If the layer allready exists, a pointer to the existing layer will be returned. */ const dimeLayer * dimeModel::addLayer(const char * const name, const int16 colnum, const int16 flags) { void *temp = NULL; if (!this->layerDict->find(name, temp)) { // default layer has layer-num = 0, hence the + 1 dimeLayer *layer = new dimeLayer(name, this->layers.count()+1, colnum, flags); char *ptr; layerDict->enter(name, ptr, layer); // this is a little hack... layer->layerName = ptr; // need a pointer that won't disappear this->layers.append(layer); return layer; } return (dimeLayer*) temp; } /*! Returns the layer at index \a idx. \sa dimeModel::getNumLayers() */ const dimeLayer * dimeModel::getLayer(const int idx) const { assert(idx >= 0 && idx <= this->layers.count()); return this->layers[idx]; } /*! Returns the layer with name \a layername. Returns \e NULL if no layer by that name is found. */ const dimeLayer * dimeModel::getLayer(const char * const layername) const { void *ptr = NULL; this->layerDict->find(layername, ptr); return (const dimeLayer*) ptr; } /*! Returns the number of layers in the model. A default layer will always be created. It is called "Default DIME layer", and it has layer id number 0. All other layers are assigned running numbers from 1. \sa dimeLayer::getLayerNum() \sa dimeModel::getLayer() */ int dimeModel::getNumLayers() const { return layers.count(); } /*! Use this to add a block to the model. Make sure you also add it in the BLOCKS section. */ const char * dimeModel::addBlock(const char * const blockname, dimeBlock * const block) { char *ptr = NULL; refDict->enter(blockname, ptr, block); return (const char*) ptr; } /*! Returns a pointer to the block with name \a blockname, or \e NULL if no block with that name exists. */ dimeBlock * dimeModel::findBlock(const char * const blockname) { void *tmp = NULL; this->refDict->find(blockname, tmp); return (dimeBlock*)tmp; } /*! Returns the AutoCAD drawing database version number. This function return \e NULL if no version number is found in the file. Currently (directly) supported versions are: r10, r11/r12, r13 and r14. */ const char * dimeModel::getDxfVersion() const { const dimeHeaderSection *header = (const dimeHeaderSection*) this->findSection("HEADER"); if (!header) { return NULL; } int groupcode; dimeParam param; if (header->getVariable("$ACADVER", &groupcode, ¶m, 1) != 1 || groupcode != 1) { return NULL; } if (!strcmp(param.string_data, "AC1006")) return "r10"; if (!strcmp(param.string_data, "AC1009")) return "r11/r12"; if (!strcmp(param.string_data, "AC1012")) return "r13"; if (!strcmp(param.string_data, "AC1013")) return "r14"; return NULL; } /*! Counts the number of records in the file. Useful if you need progress information while writing the file to disk. \sa dimeOutput::setCallback() */ int dimeModel::countRecords() const { int cnt = 0; int i, n = sections.count(); for (i = 0; i < n; i++) { cnt += 1 + this->sections[i]->countRecords(); } cnt++; // EOF return cnt; } /* Stupid function to reset the z-value of some rare DXF files that have some of their z-coordinates set to -999999. I have no clue what this is all about... Somebody FIXME please! */ // void // dimeModel::fixDxfCoords(dimeVec3f &c) // { // const dxfdouble dummy_dxf_val = -999998.0; // if (c[0] <= dummy_dxf_val) c[0] = 0.0; // if (c[1] <= dummy_dxf_val) c[1] = 0.0; // if (c[2] <= dummy_dxf_val) c[2] = 0.0; // } /*! Traverses all entities in the model. */ bool dimeModel::traverseEntities(dimeCallback callback, void *userdata, bool traverseBlocksSection, bool explodeInserts, bool traversePolylineVertices) { int i, n; dimeState state(traversePolylineVertices, explodeInserts); if (traverseBlocksSection) { dimeBlocksSection *bs = (dimeBlocksSection*) this->findSection("BLOCKS"); if (bs) { n = bs->getNumBlocks(); for (i = 0; i < n; i++) { if (!bs->getBlock(i)->traverse(&state, callback, userdata)) return false; } } } dimeEntitiesSection *es = (dimeEntitiesSection*) this->findSection("ENTITIES"); if (es) { n = es->getNumEntities(); for (i = 0; i < n; i++) { if (!es->getEntity(i)->traverse(&state, callback, userdata)) return false; } } return true; } /*! Finds the section with section \a sectionname. Currently (directly) supported sections are HEADER, CLASSES, TABLES, BLOCKS, ENTITIES and OBJECTS. */ const dimeSection * dimeModel::findSection(const char * const sectionname) const { int i, n = this->sections.count(); for (i = 0; i < n; i++) { if (strcmp(this->sections[i]->getSectionName(), sectionname) == 0) return this->sections[i]; } return NULL; } /*! \overload */ dimeSection * dimeModel::findSection(const char * const sectionname) { int i, n = this->sections.count(); for (i = 0; i < n; i++) { if (strcmp(this->sections[i]->getSectionName(), sectionname) == 0) return this->sections[i]; } return NULL; } /*! Returns the number of sections in the model. \sa dimeModel::getSection() */ int dimeModel::getNumSections() const { return this->sections.count(); } /*! Returns the section at index \a idx. \sa dimeModel::getNumSections() */ dimeSection * dimeModel::getSection(const int idx) { assert(idx >= 0 && idx < this->sections.count()); return this->sections[idx]; } /*! Inserts a new section to the list of sections. The argument \a idx, specifies the target position of the new section in the list of sections. If \a idx is negative, the section will be placed at the end of the list. Sections shold never be allocated on the stack. Use the new/delete operators to create/destroy section instances. */ void dimeModel::insertSection(dimeSection * const section, const int idx) { if (idx < 0) this->sections.append(section); else { assert(idx <= this->sections.count()); this->sections.insertElem(idx, section); } } /*! Removes a section from the list of sections. */ void dimeModel::removeSection(const int idx) { assert(idx >= 0 && idx < this->sections.count()); delete this->sections[idx]; this->sections.removeElem(idx); } /*! Newer DXF files has stupid handles (groupcode 5) for all entities, tables etc. I can't undestand they have no real purpose, but all handles must be unique when the file is loaded back into AutoCAD... */ void dimeModel::registerHandle(const int handle) { if (handle >= this->largestHandle) { this->largestHandle = handle; } } /*! \overload */ void dimeModel::registerHandle(const char * const handle) { int num; if (sscanf(handle, "%x", &num)) { this->registerHandle(num); } } int dimeModel::getUniqueHandle() { return ++this->largestHandle; } const char * dimeModel::getUniqueHandle(char *buf, const int) { sprintf(buf,"%x", getUniqueHandle()); return buf; } /*! Convenience function */ void dimeModel::addEntity(dimeEntity *entity) { dimeEntitiesSection *es = (dimeEntitiesSection*) this->findSection("ENTITIES"); if (es) { es->insertEntity(entity); } } dime/src/Output.cpp0100644017777301777730000001120707045266157013105 0ustar wwwwww/**************************************************************************\ * * FILE: Output.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeOutput dime/Output.h \brief The dimeOutput class handles writing of DXF and DXB files. */ #include #include /*! \fn bool dimeOutput::writeHeader() This method does nothing now, but if binary files are supported in the future, it must be called. */ /*! Constructor. */ dimeOutput::dimeOutput() : fp( NULL ), binary( false ), callback( NULL ), callbackdata( NULL ), aborted( false ), didOpenFile(false) { } /*! Destructor. */ dimeOutput::~dimeOutput() { if (this->fp && this->didOpenFile) fclose(this->fp); } /*! This method sets a callback function that is called with progress information. The first argument of the callback is a float in the range between 0 and 1. The second argument of the callback is the void * \a cbdata argument. */ void dimeOutput::setCallback(const int num_records, int (*cb)(float, void *), void *cbdata) { this->callback = cb; this->callbackdata = cbdata; this->numwrites = 0; this->numrecords = num_records; } /*! Sets the filename for the output file. The file will be opened, and \e true is returned if all was ok. The file is closed in the destructor. */ bool dimeOutput::setFilename(const char * const filename) { if (this->fp && this->didOpenFile) fclose(this->fp); this->fp = fopen(filename, "wb"); this->didOpenFile = true; return (this->fp != NULL); } /*! Sets the output stream. \fp should be a valid file/stream, and it will not be closed in the destructor. */ bool dimeOutput::setFileHandle(FILE *fp) { if (this->fp && this->didOpenFile) fclose(this->fp); assert(fp); this->fp = fp; this->didOpenFile = false; return true; } /*! Sets binary (DXB) or ASCII (DXF) format. Currently only ASCII is supported. */ void dimeOutput::setBinary(const bool state) { this->binary = state; } /*! Returns if binary or ASCII will be used when writing. */ bool dimeOutput::isBinary() const { return this->binary; } /*! Writes a record group code to the file. */ bool dimeOutput::writeGroupCode(const int groupcode) { if (this->aborted) return false; if (this->callback && this->numrecords) { if ((this->numwrites & 255) == 0) { float val = float(this->numwrites) / float(this->numrecords); if (val > 1.0f) val = 1.0f; this->aborted = !(bool) callback(val, this->callbackdata); } this->numwrites++; } return fprintf(this->fp, "%3d\n", groupcode) > 0; } /*! Writes an 8 bit integer to the file. */ bool dimeOutput::writeInt8(const int8 val) { return fprintf(this->fp,"%6d\n", (int)val) > 0; } /*! Writes a 16 bit integer to the file. */ bool dimeOutput::writeInt16(const int16 val) { return fprintf(this->fp,"%6d\n", (int)val) > 0; } /*! Writes a 32 bit integer to the file. */ bool dimeOutput::writeInt32(const int32 val) { return fprintf(this->fp,"%6d\n", val) > 0; } /*! Writes a single precision floating point number to the file. */ bool dimeOutput::writeFloat(const float val) { return fprintf(this->fp, "%g\n", val); } /*! Writes a double precision floating point number to the file. */ bool dimeOutput::writeDouble(const dxfdouble val) { return fprintf(this->fp,"%g\n", val) > 0; } /*! Writes a nul-terminated string to the file. */ bool dimeOutput::writeString(const char * const str) { return fprintf(this->fp, "%s\n", str) > 0; } int dimeOutput::getUniqueHandleId() { // FIXME return 1; } dime/src/RecordHolder.cpp0100644017777301777730000003111007131053263014140 0ustar wwwwww/**************************************************************************\ * * FILE: RecordHolder.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeRecordHolder dime/RecordHolder.h \brief The dimeRecordHolder class is a superclass for objects that store records. This class makes it very easy to add new classes to dime, as it handles all of the reading, error checking and storing of records of no use to the subclass. Subclasses will only need to implement the dimeRecordHolder::handleRecord() and dimeRecordHolder::getRecord() methods. */ #include #include #include #include #include /*! Constructor. \a separator is the group code that will separate objects, to enable the record holder to stop reading the object at the correct time. For instance, entities are separated by group code 0 (a group code 0 signals a new entity is about to start). */ dimeRecordHolder::dimeRecordHolder(const int sep) : records( NULL ), numRecords( 0 ) { if (sep) assert(false); // this->separator = sep; } /*! Destructor. */ dimeRecordHolder::~dimeRecordHolder() { int i, n = this->numRecords; for (i = 0; i < n; i++) delete this->records[i]; delete [] records; } //! bool dimeRecordHolder::isOfType(const int thetypeid) const { return thetypeid == dimeRecordHolderType || dimeBase::isOfType(thetypeid); } /*! Copies the stored records into \a rh. */ bool dimeRecordHolder::copyRecords(dimeRecordHolder * const rh, dimeMemHandler * const memh) const { bool ok = true; if (this->numRecords) { rh->records = ARRAY_NEW(memh, dimeRecord*, this->numRecords); if (rh->records) { rh->numRecords = this->numRecords; for (int i = 0; i < this->numRecords; i++) rh->records[i] = this->records[i]->copy(memh); } else ok = false; } else { rh->records = NULL; rh->numRecords = 0; } return ok; } /*! Reads records from \a in until the separator groupcode (specified in constructor) is found. Can be overloaded by subclasses, but in most cases this will not be necessary as dimeRecordHolder::handleRecord() is called for each record found in the stream. \sa dimeEntity::handleRecord(). */ bool dimeRecordHolder::read(dimeInput * const file) { dimeRecord *record; bool ok = true; int32 groupcode; dimeArray array(256); // temporary array dimeMemHandler *memhandler = file->getMemHandler(); while (true) { if (!file->readGroupCode(groupcode)) { ok = false; break; } if (groupcode == 0 /*this->separator*/) { file->putBackGroupCode(groupcode); break; } else { // check if subclass will handle this record dimeParam param; ok = dimeRecord::readRecordData(file, groupcode, param); if (!ok) { fprintf( stderr, "Unable to read record data for groupcode: %d\n",groupcode); // sim_warning("Unable to read record data for groupcode: %d\n", // groupcode); break; } if (!this->handleRecord(groupcode, param, memhandler)) { record = dimeRecord::createRecord(groupcode, param, memhandler); if (!record) { fprintf( stderr, "Could not create record for group code: %d\n", groupcode ); // sim_warning("could not create record for group code: %d\n", // groupcode); ok = false; break; } array.append(record); } } } int num = array.count(); if (ok && num) { this->records = ARRAY_NEW(memhandler, dimeRecord*, num); this->numRecords = num; for (int i = 0; i < num; i++) { this->records[i] = array[i]; } } return ok; } /*! Will write the records to \a file. */ bool dimeRecordHolder::write(dimeOutput * const file) { int i, n = this->numRecords; for (i = 0; i < n; i++) { if (this->shouldWriteRecord(this->records[i]->getGroupCode())) { if (!this->records[i]->write(file)) break; } } if (i == n) return true; return false; } /*! Must be overloaded by entities that directly supports a record type. During dimeRecordHolder::read(), dimeRecordHolder::setRecord and dimeRecordHolder::setRecords, this function is called for every record found, and it is up to the subclass if the record should be stored internally, or if a generic record should be created and stored in this superclass. A subclass should return \e \true when it will handle the record, \e false otherwise. Default function does nothing, and returns \e false. For entities, records with group codes 8 (layer name) and 62 (color number) are automatically handled by the dimeEntity class. \sa dimeRecordHolder::read() \sa dimeRecordHolder::setRecord() */ bool dimeRecordHolder::handleRecord(const int, const dimeParam &, dimeMemHandler * const) { return false; } /*! Sets the data for the record with group code \a groupcode. If the record already exists, it's value will simply be overwritten, otherwise a new record will be created. If the record is handled by a subclass, \a param will be passed on to the subclass (using dimeRecordHolder::handleRecord()), and will be ignored by dimeRecordHolder. For entities, you cannot use this method to set the layer name. Use dimeEntity::setLayer() to do that. Also, you should not use this function to set the block name for a dimeInsert entity; use dimeInsert::setBlock() instead. \sa dimeRecordHolder::handleRecord() \sa dimeRecordHolder::getRecord() \sa dimeRecordHolder::setRecords() */ void dimeRecordHolder::setRecord(const int groupcode, const dimeParam &value, dimeMemHandler * const memhandler) { this->setRecordCommon(groupcode, value, 0, memhandler); } /*! Basically the same function as setRecord(), but also allows you to specify an index for the record. This is useful if you're going to set several records with the same group code. \sa dimeRecordHolder::setRecord() */ void dimeRecordHolder::setIndexedRecord(const int groupcode, const dimeParam &value, const int index, dimeMemHandler * const memhandler) { this->setRecordCommon(groupcode, value, index, memhandler); } /*! Will return the value of the record with group code \a groupcode. \e false is returned if the record could not be found. Subclasses should overload this method if one or several records are stored in the class. If the groupcode queried is not stored internally, the subclass should call its parent's method. */ bool dimeRecordHolder::getRecord(const int groupcode, dimeParam ¶m, const int index) const { int i, n = this->numRecords; int cnt = 0; for (i = 0; i < n; i++) { if (this->records[i]->getGroupCode() == groupcode) { if (cnt++ == index) { this->records[i]->getValue(param); return true; } } } return false; } /*! Sets an array of entities. It is much more efficient to use this than using dimeRecordHolder::setRecord() several times if you are going to set the value of more than one record. Otherwise behaves exactly as dimeRecordHolder::setRecord(). */ void dimeRecordHolder::setRecords(const int * const groupcodes, const dimeParam * const params, const int numrecords, dimeMemHandler * const memhandler) { int i; dimeArray newrecords(64); for (i = 0; i < numrecords; i++) { const int groupcode = groupcodes[i]; const dimeParam ¶m = params[i]; if (groupcode == 8) { fprintf( stderr, "Cannot set layer name in setRecords()!\n"); // sim_warning("Cannot set layer name in setRecords()!\n"); assert(0); } else if (groupcode == 2 && this->typeId() == dimeBase::dimeInsertType) { fprintf( stderr, "Cannot set block name for INSERT entities using setRecords()\n"); // sim_warning("Cannot set block name for INSERT entities using setRecords()\n"); assert(0); } else if (!this->handleRecord(groupcode, param, memhandler)) { dimeRecord *record = this->findRecord(groupcode); if (record) { record->setValue(param); } else { dimeRecord *record = dimeRecord::createRecord(groupcode, param, memhandler); newrecords.append(record); } } } if (newrecords.count()) { // don't forget the old records... for (i = 0; i < this->numRecords; i++) { newrecords.append(this->records[i]); } int n = newrecords.count(); if (!memhandler) delete [] this->records; this->numRecords = 0; this->records = ARRAY_NEW(memhandler, dimeRecord*, n); if (this->records) { this->numRecords = n; for (i = 0; i < n; i++) { this->records[i] = newrecords[i]; } } } } /*! Returns the number of records in the record holder. Should be overloaded by subclasses which should count their records, and then call the parent's method. This method is used to precalculate the number of records to be written. Very useful when progress information is needed during write(). */ int dimeRecordHolder::countRecords() const { return this->numRecords; } /*! Returns the record with group code \a groupcode. If \a index > 0, the index'th record with group code \a groupcode will be returned. Returns \e NULL if the record is not found or \a index is out of bounds. */ dimeRecord * dimeRecordHolder::findRecord(const int groupcode, const int index) { int i, n = this->numRecords; int cnt = 0; for (i = 0; i < n; i++) { if (this->records[i]->getGroupCode() == groupcode) { if (cnt == index) return this->records[i]; cnt++; } } return NULL; } /*! Can be overloaded by subclasses that want the record holder to store a record, but handles writing themselves. Default method returns \a true for all group codes. */ bool dimeRecordHolder::shouldWriteRecord(const int /*groupcode*/) const { return true; } void dimeRecordHolder::setRecordCommon(const int groupcode, const dimeParam ¶m, const int index, dimeMemHandler * const memhandler) { // some safety checks if (groupcode == 8 && this->isOfType(dimeBase::dimeEntityType)) { fprintf( stderr, "Cannot set layer name in setRecord()!\n"); assert(0); return; } else if (groupcode == 2 && this->typeId() == dimeBase::dimeInsertType) { fprintf( stderr, "Cannot set block name for INSERT entities using setRecord()\n"); assert(0); return; } if (!this->handleRecord(groupcode, param, memhandler)) { dimeRecord *record = this->findRecord(groupcode, index); if (!record) { // create new record record = dimeRecord::createRecord(groupcode, memhandler); if (!record) { fprintf( stderr, "Could not create record for group code: %d\n", groupcode); return; } dimeRecord **newarray = ARRAY_NEW(memhandler, dimeRecord*, this->numRecords+1); memcpy(newarray, this->records, this->numRecords*sizeof(dimeRecord*)); if (!memhandler) delete [] this->records; this->records = newarray; this->records[this->numRecords++] = record; } record->setValue(param); } } /*! Returns the number of records stored in this record holder. */ int dimeRecordHolder::getNumRecordsInRecordHolder(void) const { return this->numRecords; } /*! Returns the \a idx'th record in the record holder. \sa getNumRecordsInRecordHolder(). */ dimeRecord * dimeRecordHolder::getRecordInRecordHolder(const int idx) const { assert(idx < this->numRecords); return this->records[idx]; } dime/src/State.cpp0100644017777301777730000000466406776622122012674 0ustar wwwwww/**************************************************************************\ * * FILE: State.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeState dime/State.h \brief The dimeState class manages various state variables while the model is traversed. */ #include /*! Constructor. */ dimeState::dimeState(const bool traversePolylineVertices, const bool explodeInserts) { this->matrix.makeIdentity(); this->invmatrix.makeIdentity(); this->currentInsert = NULL; this->flags = 0; if (traversePolylineVertices) { this->flags |= TRAVERSE_POLYLINE_VERTICES; } if (explodeInserts) { this->flags |= EXPLODE_INSERTS; } } /*! Constructor. */ dimeState::dimeState(const dimeState &st) { this->matrix = st.matrix; this->invmatrix = st.invmatrix; this->flags = st.flags; this->currentInsert = st.currentInsert; } void dimeState::setMatrix(const dimeMatrix &m) { this->matrix = m; this->flags |= INVMATRIX_DIRTY; } const dimeMatrix & dimeState::getInvMatrix() const { if (this->flags & INVMATRIX_DIRTY) { dimeState *thisp = (dimeState*)this; thisp->invmatrix = thisp->matrix; thisp->invmatrix.inverse(); thisp->flags ^= INVMATRIX_DIRTY; } return this->invmatrix; } void dimeState::getMatrix(dimeMatrix &m) const { m = this->matrix; } dime/src/classes/0040755017777301777730000000000007733212517012533 5ustar wwwwwwdime/src/classes/Class.cpp0100644017777301777730000001353606776622122014314 0ustar wwwwww/**************************************************************************\ * * FILE: Class.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeClass dime/classes/Class.h \brief The dimeClass class is the superclass for all the \e class classes. */ #include #include #include #include #include #include #include /*! \fn const char *dimeClass::getDxfClassName() const = 0 Must be implemented by subclasses to return the dxf name of the class. */ /*! \fn dimeClass *dimeClass::copy(dimeModel * const model) const = 0 Must be implemented by subclasses to return a copy of the class. */ /*! \fn const char *dimeClass::getClassName() const Returns the C++ class name. */ /*! \fn const char *dimeClass::getApplicationName() const Returns the class application name. */ /*! \fn int32 dimeClass::getVersionNumber() const Returns the version number of this class. */ /*! \fn int8 dimeClass::getFlag280() const Returns the flag with group code 280. */ /*! \fn int8 dimeClass::getFlag281() const Returns the flag with group code 281. */ /*! \fn void dimeClass::setVersionNumber(const int32 v) Sets the version number for this class. */ /*! \fn void dimeClass::setFlag280(const int8 flag) Sets the flag for the flag with group code 280. */ /*! \fn void dimeClass::setFlag281(const int8 flag) Sets the group code for the flag with group code 281. */ /*! Constructor. */ dimeClass::dimeClass() : dimeRecordHolder( 0 ), // classes are separated by group code 0 className( NULL ), appName( NULL ), versionNumber( 0 ), flag1( 0 ), flag2( 0 ) { } /*! Destructor. */ dimeClass::~dimeClass() { delete this->className; delete this->appName; } /*! Copies the common and unclassified records. */ bool dimeClass::copyRecords(dimeClass * const myclass, dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); bool ok = dimeRecordHolder::copyRecords(myclass, memh); if (ok && this->className) { DXF_STRCPY(memh, myclass->className, this->className); ok = myclass->className != NULL; } if (ok && this->appName) { DXF_STRCPY(memh, myclass->appName, this->appName); ok = myclass->className != NULL; } if (ok) { myclass->versionNumber = this->versionNumber; myclass->flag1 = this->flag1; myclass->flag2 = this->flag2; } return ok; } /*! Writes common and unknown class records to file. */ bool dimeClass::write(dimeOutput * const file) { file->writeGroupCode(1); file->writeString(this->className ? this->className : "Default class name"); file->writeGroupCode(2); file->writeString(this->appName ? this->appName : "Default app name"); file->writeGroupCode(90); file->writeInt32(this->versionNumber); file->writeGroupCode(280); file->writeInt8(this->flag1); file->writeGroupCode(281); file->writeInt8(this->flag2); return dimeRecordHolder::write(file); } /*! Static function which creates an class based on its name. */ dimeClass * dimeClass::createClass(const char * const name, dimeMemHandler * const memhandler) { return new(memhandler) dimeUnknownClass(name, memhandler); } //! int dimeClass::countRecords() const { return 5 + dimeRecordHolder::countRecords(); } //! bool dimeClass::isOfType(const int thetypeid) const { return thetypeid == dimeClassType || dimeRecordHolder::isOfType(thetypeid); } /*! Reads a class from \a in. Can be overloaded by subclasses, but in most cases this will not be necessary. \sa dimeClass::handleRecord(). */ bool dimeClass::read(dimeInput * const file) { return dimeRecordHolder::read(file); } //! bool dimeClass::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch (groupcode) { case 1: DXF_STRCPY(memhandler, this->className, param.string_data); return true; case 2: DXF_STRCPY(memhandler, this->appName, param.string_data); return true; case 90: this->versionNumber = param.int32_data; return true; case 280: this->flag1 = param.int8_data; return true; case 281: this->flag2 = param.int8_data; return true; } return false; } /*! Sets the C++ class name for this class. */ void dimeClass::setClassName(const char * const classname, dimeMemHandler * const memhandler) { if (!memhandler) delete this->className; DXF_STRCPY(memhandler, this->className, classname); } /*! Sets the application name for this class. */ void dimeClass::setApplicationName(const char * const appname, dimeMemHandler * const memhandler) { if (!memhandler) delete this->appName; DXF_STRCPY(memhandler, this->appName, appname); } dime/src/classes/Makefile.am0100644017777301777730000000244207402666663014576 0ustar wwwwww## Process this file with automake to generate Makefile.in. INCLUDES = -I$(top_srcdir)/include LIBS = if BUILD_WITH_MSVC noinst_LIBRARIES = classes.lst else noinst_LTLIBRARIES = libclasses.la endif ClassesSources = \ Class.cpp Class.h \ UnknownClass.cpp UnknownClass.h libclasses_la_SOURCES = \ $(ClassesSources) classes_lst_SOURCES = \ $(ClassesSources) classes.lst: Makefile $(classes_lst_OBJECTS) @echo "Linking classes.lst..."; \ rm -f $@; \ for i in $(classes_lst_OBJECTS); do echo $$i >>$@; done classesincdir = $(includedir)/dime/classes classesinc_HEADERS = \ ../../include/dime/classes/Class.h \ ../../include/dime/classes/UnknownClass.h install-classesincHEADERS: $(classesinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(classesincdir) @list='$(classesinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(classesincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(classesincdir)/$$f; \ done uninstall-classesincHEADERS: @$(NORMAL_UNINSTALL) @list='$(classesinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(classesincdir)/$$f"; \ rm -f $(DESTDIR)$(classesincdir)/$$f; \ done dime/src/classes/Makefile.in0100644017777301777730000002751007643247732014611 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ INCLUDES = -I$(top_srcdir)/include LIBS = @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = classes.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libclasses.la ClassesSources = \ Class.cpp Class.h \ UnknownClass.cpp UnknownClass.h libclasses_la_SOURCES = \ $(ClassesSources) classes_lst_SOURCES = \ $(ClassesSources) classesincdir = $(includedir)/dime/classes classesinc_HEADERS = \ ../../include/dime/classes/Class.h \ ../../include/dime/classes/UnknownClass.h subdir = src/classes mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) classes_lst_AR = $(AR) cru classes_lst_LIBADD = am_classes_lst_OBJECTS = Class.$(OBJEXT) UnknownClass.$(OBJEXT) classes_lst_OBJECTS = $(am_classes_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libclasses_la_LDFLAGS = libclasses_la_LIBADD = am_libclasses_la_OBJECTS = Class.lo UnknownClass.lo libclasses_la_OBJECTS = $(am_libclasses_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/Class.Plo $(DEPDIR)/Class.Po \ @AMDEP_TRUE@ $(DEPDIR)/UnknownClass.Plo \ @AMDEP_TRUE@ $(DEPDIR)/UnknownClass.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(classes_lst_SOURCES) $(libclasses_la_SOURCES) HEADERS = $(classesinc_HEADERS) DIST_COMMON = $(classesinc_HEADERS) Makefile.am Makefile.in SOURCES = $(classes_lst_SOURCES) $(libclasses_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/classes/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libclasses.la: $(libclasses_la_OBJECTS) $(libclasses_la_DEPENDENCIES) $(CXXLINK) $(libclasses_la_LDFLAGS) $(libclasses_la_OBJECTS) $(libclasses_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Class.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownClass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownClass.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/classes @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(classesincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-classesincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-classesincHEADERS uninstall-info-am .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-classesincHEADERS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-classesincHEADERS uninstall-info-am classes.lst: Makefile $(classes_lst_OBJECTS) @echo "Linking classes.lst..."; \ rm -f $@; \ for i in $(classes_lst_OBJECTS); do echo $$i >>$@; done install-classesincHEADERS: $(classesinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(classesincdir) @list='$(classesinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(classesincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(classesincdir)/$$f; \ done uninstall-classesincHEADERS: @$(NORMAL_UNINSTALL) @list='$(classesinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(classesincdir)/$$f"; \ rm -f $(DESTDIR)$(classesincdir)/$$f; \ done # 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: dime/src/classes/UnknownClass.cpp0100644017777301777730000000522506776622122015670 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownClass.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeUnknownClass dime/classes/UnknownClass.h \brief The dimeUnknownClass class reads and writes undefined classes. */ #include #include #include #include #include #include /*! Constructor. */ dimeUnknownClass::dimeUnknownClass(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->dxfClassName, name); } /*! Destructor. Should only be called if no memhandler is used. */ dimeUnknownClass::~dimeUnknownClass() { delete this->dxfClassName; } //! dimeClass * dimeUnknownClass::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeUnknownClass *u = new(memh) dimeUnknownClass(this->dxfClassName, memh); if (!this->copyRecords(u, model)) { // check if allocated on heap. if (!memh) delete u; u = NULL; } return u; } //! bool dimeUnknownClass::write(dimeOutput * const file) { if (file->writeGroupCode(9) && file->writeString(this->dxfClassName)) return dimeClass::write(file); return false; } //! int dimeUnknownClass::typeId() const { return dimeBase::dimeUnknownClassType; } //! int dimeUnknownClass::countRecords() const { return 1 + dimeClass::countRecords(); } //! const char * dimeUnknownClass::getDxfClassName() const { return this->dxfClassName; } dime/src/convert/0040755017777301777730000000000007733212517012556 5ustar wwwwwwdime/src/convert/3dfaceconvert.cpp0100644017777301777730000000345107643262673016020 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include void convert_3dface(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *) { dimeMatrix matrix; state->getMatrix(matrix); dime3DFace *face = (dime3DFace*)entity; dimeVec3f v0, v1, v2, v3; face->getVertices(v0, v1, v2, v3); if (v2 == v3) { layerData->addTriangle(v0, v1, v2, &matrix); } else { layerData->addQuad(v0, v1, v2, v3, &matrix); } } dime/src/convert/Makefile.am0100644017777301777730000000326507643262673014625 0ustar wwwwww## Process this file with automake to generate Makefile.in. INCLUDES = -I$(top_srcdir)/include LIBS = if BUILD_WITH_MSVC noinst_LIBRARIES = convert.lst else noinst_LTLIBRARIES = libconvert.la endif ## All source files used when building this submodule, including all ## headers. ConvertSources = \ 3dfaceconvert.cpp \ arcconvert.cpp \ circleconvert.cpp \ convert.cpp \ convert_funcs.h \ ellipseconvert.cpp \ layerdata.cpp \ lineconvert.cpp \ linesegment.cpp \ linesegment.h \ lwpolylineconvert.cpp \ pointconvert.cpp \ polylineconvert.cpp \ solidconvert.cpp \ traceconvert.cpp libconvert_la_SOURCES = \ $(ConvertSources) convert_lst_SOURCES = \ $(ConvertSources) convert.lst: Makefile $(convert_lst_OBJECTS) @echo "Linking convert.lst..."; \ rm -f $@; \ for i in $(convert_lst_OBJECTS); do echo $$i >>$@; done ## Installation information. libconvertincdir = $(includedir)/dime/convert libconvertinc_HEADERS = \ $(top_srcdir)/include/dime/convert/convert.h \ $(top_srcdir)/include/dime/convert/layerdata.h install-libconvertincHEADERS: $(libconvertinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libconvertincdir) @list='$(libconvertinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libconvertincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libconvertincdir)/$$f; \ done uninstall-libconvertincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libconvertinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libconvertincdir)/$$f"; \ rm -f $(DESTDIR)$(libconvertincdir)/$$f; \ done dime/src/convert/Makefile.in0100644017777301777730000003603307643262764014636 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ INCLUDES = -I$(top_srcdir)/include LIBS = @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = convert.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libconvert.la ConvertSources = \ 3dfaceconvert.cpp \ arcconvert.cpp \ circleconvert.cpp \ convert.cpp \ convert_funcs.h \ ellipseconvert.cpp \ layerdata.cpp \ lineconvert.cpp \ linesegment.cpp \ linesegment.h \ lwpolylineconvert.cpp \ pointconvert.cpp \ polylineconvert.cpp \ solidconvert.cpp \ traceconvert.cpp libconvert_la_SOURCES = \ $(ConvertSources) convert_lst_SOURCES = \ $(ConvertSources) libconvertincdir = $(includedir)/dime/convert libconvertinc_HEADERS = \ $(top_srcdir)/include/dime/convert/convert.h \ $(top_srcdir)/include/dime/convert/layerdata.h subdir = src/convert mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) convert_lst_AR = $(AR) cru convert_lst_LIBADD = am_convert_lst_OBJECTS = 3dfaceconvert.$(OBJEXT) arcconvert.$(OBJEXT) \ circleconvert.$(OBJEXT) convert.$(OBJEXT) \ ellipseconvert.$(OBJEXT) layerdata.$(OBJEXT) \ lineconvert.$(OBJEXT) linesegment.$(OBJEXT) \ lwpolylineconvert.$(OBJEXT) pointconvert.$(OBJEXT) \ polylineconvert.$(OBJEXT) solidconvert.$(OBJEXT) \ traceconvert.$(OBJEXT) convert_lst_OBJECTS = $(am_convert_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libconvert_la_LDFLAGS = libconvert_la_LIBADD = am_libconvert_la_OBJECTS = 3dfaceconvert.lo arcconvert.lo \ circleconvert.lo convert.lo ellipseconvert.lo layerdata.lo \ lineconvert.lo linesegment.lo lwpolylineconvert.lo \ pointconvert.lo polylineconvert.lo solidconvert.lo \ traceconvert.lo libconvert_la_OBJECTS = $(am_libconvert_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/3dfaceconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/3dfaceconvert.Po $(DEPDIR)/arcconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/arcconvert.Po $(DEPDIR)/circleconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/circleconvert.Po $(DEPDIR)/convert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/convert.Po $(DEPDIR)/ellipseconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/ellipseconvert.Po $(DEPDIR)/layerdata.Plo \ @AMDEP_TRUE@ $(DEPDIR)/layerdata.Po $(DEPDIR)/lineconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/lineconvert.Po $(DEPDIR)/linesegment.Plo \ @AMDEP_TRUE@ $(DEPDIR)/linesegment.Po \ @AMDEP_TRUE@ $(DEPDIR)/lwpolylineconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/lwpolylineconvert.Po \ @AMDEP_TRUE@ $(DEPDIR)/pointconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/pointconvert.Po \ @AMDEP_TRUE@ $(DEPDIR)/polylineconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/polylineconvert.Po \ @AMDEP_TRUE@ $(DEPDIR)/solidconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/solidconvert.Po \ @AMDEP_TRUE@ $(DEPDIR)/traceconvert.Plo \ @AMDEP_TRUE@ $(DEPDIR)/traceconvert.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(convert_lst_SOURCES) $(libconvert_la_SOURCES) HEADERS = $(libconvertinc_HEADERS) DIST_COMMON = $(libconvertinc_HEADERS) Makefile.am Makefile.in SOURCES = $(convert_lst_SOURCES) $(libconvert_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/convert/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libconvert.la: $(libconvert_la_OBJECTS) $(libconvert_la_DEPENDENCIES) $(CXXLINK) $(libconvert_la_LDFLAGS) $(libconvert_la_OBJECTS) $(libconvert_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/3dfaceconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/3dfaceconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/arcconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/arcconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/circleconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/circleconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/convert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ellipseconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ellipseconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/layerdata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/layerdata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lineconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lineconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/linesegment.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/linesegment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lwpolylineconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lwpolylineconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pointconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pointconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/polylineconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/polylineconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/solidconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/solidconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/traceconvert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/traceconvert.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/$(top_srcdir)/include/dime/convert @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libconvertincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-libconvertincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libconvertincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libconvertincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libconvertincHEADERS convert.lst: Makefile $(convert_lst_OBJECTS) @echo "Linking convert.lst..."; \ rm -f $@; \ for i in $(convert_lst_OBJECTS); do echo $$i >>$@; done install-libconvertincHEADERS: $(libconvertinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libconvertincdir) @list='$(libconvertinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libconvertincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libconvertincdir)/$$f; \ done uninstall-libconvertincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libconvertinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libconvertincdir)/$$f"; \ rm -f $(DESTDIR)$(libconvertincdir)/$$f; \ done # 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: dime/src/convert/arcconvert.cpp0100644017777301777730000001007607643262673015441 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include #include // // find intersection between circle and the line x=r-maxerr, // and return the number of circle subdivisions necessary // to respect the maxerr parameter. // static int calc_num_sub(dxfdouble maxerr, dxfdouble radius) { radius = fabs(radius); if (maxerr >= radius || maxerr <= 0.0) maxerr = radius/40.0f; dxfdouble x = radius - maxerr; dxfdouble y = sqrt(radius*radius - x*x); dxfdouble rad = atan(y/x); return int(M_PI/fabs(rad)) + 1; } void convert_arc(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { dimeArc *arc = (dimeArc*) entity; dimeMatrix matrix; state->getMatrix(matrix); dimeVec3f e = arc->getExtrusionDir(); dxfdouble thickness = arc->getThickness(); if (e != dimeVec3f(0,0,1)) { dimeMatrix m; dimeEntity::generateUCS(e, m); matrix.multRight(m); } e = dimeVec3f(0,0,1); dimeVec3f center; arc->getCenter(center); dimeParam param; if (arc->getRecord(38, param)) { center[2] = param.double_data; } dxfdouble radius = arc->getRadius(); double end = arc->getEndAngle(); while (end < arc->getStartAngle()) { end += 360.0; } double delta = DXFDEG2RAD(end - arc->getStartAngle()); if (delta == 0.0) { #ifndef NDEBUG fprintf(stderr,"ARC with startAngle == endAngle!\n"); #endif end += 2*M_PI; delta = DXFDEG2RAD(end - arc->getStartAngle()); } int ARC_NUMPTS = converter->getNumSub(); if (ARC_NUMPTS <= 0) { // use maxerr ARC_NUMPTS = calc_num_sub(converter->getMaxerr(), radius); } // find the number of this ARC that fits inside 2PI int parts = (int) DXFABS((2*M_PI) / delta); // find # pts to use for arc // add one to avoid arcs with 0 line segments int numpts = ARC_NUMPTS / parts + 1; if (numpts > ARC_NUMPTS) numpts = ARC_NUMPTS; double inc = delta / numpts; double rad = DXFDEG2RAD(arc->getStartAngle()); int i; dimeVec3f v; dimeVec3f prev(center[0] + radius * cos(rad), center[1] + radius * sin(rad), center[2]); rad += inc; for (i = 1; i < numpts; i++) { v = dimeVec3f(center[0] + radius * cos(rad), center[1] + radius * sin(rad), center[2]); if (thickness == 0.0) { layerData->addLine(prev, v, &matrix); } else { layerData->addQuad(prev, v, v + e * thickness, prev + e * thickness, &matrix); } prev = v; rad += inc; } rad = DXFDEG2RAD(end); v = dimeVec3f(center[0] + radius * cos(rad), center[1] + radius * sin(rad), center[2]); if (thickness == 0.0) { layerData->addLine(prev, v, &matrix); } else { layerData->addQuad(prev, v, v + e * thickness, prev + e * thickness, &matrix); } } dime/src/convert/circleconvert.cpp0100644017777301777730000000654207643262673016140 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include #include // // find intersection between circle and the line x=r-maxerr, // and return the number of circle subdivisions necessary // to respect the maxerr parameter. // static int calc_num_sub(dxfdouble maxerr, dxfdouble radius) { if (maxerr >= radius || maxerr <= 0.0) maxerr = radius/40.0f; dxfdouble x = radius - maxerr; dxfdouble y = sqrt(radius*radius - x*x); dxfdouble rad = atan(y/x); return int(M_PI/fabs(rad)) + 1; } void convert_circle(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { dimeCircle *circle = (dimeCircle*) entity; dimeMatrix matrix; state->getMatrix(matrix); dimeVec3f e = circle->getExtrusionDir(); dxfdouble thickness = circle->getThickness(); if (e != dimeVec3f(0,0,1)) { dimeMatrix m; dimeEntity::generateUCS(e, m); matrix.multRight(m); } e = dimeVec3f(0,0,1) * thickness; dimeVec3f center = circle->getCenter(); dxfdouble radius = circle->getRadius(); dimeParam param; if (circle->getRecord(38, param)) { center[2] = param.double_data; } int numpts = converter->getNumSub(); if (numpts <= 0) { // use maxerr numpts = calc_num_sub(converter->getMaxerr(), radius); } dxfdouble inc = (2*M_PI) / numpts; dxfdouble rad = inc; int i; dimeVec3f v; dimeVec3f prev(center[0] + radius, center[1], center[2]); for (i = 1; i < numpts; i++) { v = dimeVec3f(center[0] + radius * cos(rad), center[1] + radius * sin(rad), center[2]); if (thickness == 0.0) { layerData->addLine(prev, v, &matrix); } else { layerData->addQuad(prev, v, v + e, prev + e, &matrix); } prev = v; rad += inc; } v = dimeVec3f(center[0] + radius, center[1], center[2]); if (thickness == 0.0) { layerData->addLine(prev, v, &matrix); } else { layerData->addQuad(prev, v, v + e, prev + e, &matrix); } // FIXME: code to close cylinder? } dime/src/convert/convert.cpp0100644017777301777730000002130007421034517014727 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include #include #include "convert_funcs.h" #include #include #include #include #include /*! \class dxfConverter convert.h \brief The dxfConverter class offers a simple interface for dxf converting. It makes it possible to extract all geometry from dxf files, and store it in internal geometry sturctures, which again can be exported as vrml. */ /*! \fn void dxfConverter::setNumSub(const int num) Sets the number of subdivisions for a circle or ellipse. This overrides the value set in dxfConverter::setMaxerr() and should normally not be used \sa dxfConverter::getNumSub() */ /*! \fn int dxfConverter::getNumSub() const Returns the numner of subdivisions set by dxfConverter::setNumSub() */ /*! \fn void dxfConverter::setMaxerr(const dxfdouble maxerr) Sets the maximum error allowed when converting circles, arcs and ellipses into lines/polygons. */ /*! \fn dxfdouble dxfConverter::getMaxerr() const Returns the maximum allowed error when converting circles, arcs ellipses. */ /*! \fn void dxfConverter::setFillmode(const bool fill) Sets whether polylines with width and SOLID and TRACE should be filled. */ /*! \fn bool dxfConverter::getFillmode() const Returns whether polylines with width and SOLID and TRACE should be filled. */ /*! \fn bool dxfConverter::getLayercol() const Returns whether only layers should be used (and not color index) when converting */ /*! \fn void dxfConverter::setLayercol(const bool v) Sets whether only layer (and not color index) should be used when converting. This method should normally no be used. */ /*! \fn int dxfConverter::getCurrentInsertColorIndex() const Returns the color index of the current INSERT entity. If no INSERT entity is current, the color index 7 (white) will be returned. */ /*! Constructor */ dxfConverter::dxfConverter() { this->maxerr = 0.1f; this->numsub = -1; this->fillmode = true; this->layercol = false; this->currentInsertColorIndex = 7; this->currentPolyline = NULL; for (int i = 0; i < 255; i++) layerData[i] = NULL; } /*! Destructor */ dxfConverter::~dxfConverter() { for (int i = 0; i < 255; i++) { delete layerData[i]; } } /*! Returns a dxfLayerData instance for the color with color index \a colidx. */ dxfLayerData * dxfConverter::getLayerData(const int colidx) { assert(colidx >= 1 && colidx <= 255); if (layerData[colidx-1] == NULL) { layerData[colidx-1] = new dxfLayerData(colidx); } return layerData[colidx-1]; } /*! Finds the color index for \a entity, and returns the dxfLayerData for it. */ dxfLayerData * dxfConverter::getLayerData(const dimeEntity *entity) { // special case for VERTEX if (this->currentPolyline && entity->typeId() == dimeBase::dimeVertexType) { if (!(entity->getEntityFlags() & FLAG_COLOR_NUMBER)) return getLayerData(this->currentPolyline); } int colidx = getColorIndex(entity); if (colidx == 0) { // BYBLOCK colidx = this->currentInsertColorIndex; } // we don't care if layer is turned off (negative color) if (colidx < 0) colidx = -colidx; if (colidx < 1 || colidx > 255) { // just in case fprintf(stderr,"Illegal color number %d. Changed to 7 (white)\n", colidx); colidx = 7; } return getLayerData(colidx); } /*! Returns a pointer to the dxfLayerData array. */ dxfLayerData ** dxfConverter::getLayerData() { return layerData; } /*! Converts \a model to the internal geometry structures. \sa dxfConverter::writeWrl() */ bool dxfConverter::doConvert(dimeModel &model) { // // remove these 6 lines, and you may merge several dxf // files into a single vrml file by calling doConvert() several // times before calling writeVrml // for (int i = 0; i < 255; i++) { if (layerData[i]) { delete layerData[i]; layerData[i] = NULL; } } return model.traverseEntities(dime_callback, this, false, true, false); } /*! Writes the internal geometry structures to \a out. */ bool dxfConverter::writeVrml(FILE *out, const bool vrml1, const bool only2d) { #ifndef NOWRLEXPORT // // write header // if (vrml1) { fprintf(out, "#VRML V1.0 ascii\n\n"); } else { fprintf(out, "#VRML V2.0 utf8\n\n"); } // // write each used layer/color // for (int i = 0; i < 255; i++) { if (layerData[i] != NULL) { layerData[i]->writeWrl(out, 0, vrml1, only2d); delete layerData[i]; layerData[i] = NULL; } } #endif // NOWRLEXPORT return true; } /*! Finds the correct color index for \a entity. Handles the BYLAYER case. */ int dxfConverter::getColorIndex(const dimeEntity *entity) { int colnum = entity->getColorNumber(); if (this->layercol || colnum == 256) { const dimeLayer *layer = entity->getLayer(); colnum = layer->getColorNumber(); } return colnum; } // // forward the call to the correct class instance // bool dxfConverter::dime_callback(const dimeState * const state, dimeEntity *entity, void *data) { return ((dxfConverter*)data)->private_callback(state, entity); } // // handles the callback from the dime-library // bool dxfConverter::private_callback(const dimeState * const state, dimeEntity *entity) { if (entity->typeId() == dimeBase::dimePolylineType) { this->currentPolyline = entity; } if (state->getCurrentInsert()) { this->currentInsertColorIndex = getColorIndex((dimeEntity*)state->getCurrentInsert()); } else { this->currentInsertColorIndex = 7; } dxfLayerData *ld = getLayerData(entity); // fillmode on by default. entities which will not fill its polygons // should turn it off (layerData::addQuad() will create polygons, // not lines) // ld->setFillmode(true); switch (entity->typeId()) { case dimeBase::dime3DFaceType: convert_3dface(entity, state, ld, this); break; case dimeBase::dimeSolidType: convert_solid(entity, state, ld, this); break; case dimeBase::dimeTraceType: convert_solid(entity, state, ld, this); break; case dimeBase::dimeArcType: convert_arc(entity, state, ld, this); break; case dimeBase::dimeCircleType: convert_circle(entity, state, ld, this); break; case dimeBase::dimeEllipseType: convert_ellipse(entity, state, ld, this); break; case dimeBase::dimeInsertType: // handled in traverseEntities break; case dimeBase::dimeBlockType: // handled in traverseEntities break; case dimeBase::dimeLineType: convert_line(entity, state, ld, this); break; case dimeBase::dimeLWPolylineType: convert_lwpolyline(entity, state, ld, this); break; case dimeBase::dimePointType: convert_point(entity, state, ld, this); break; case dimeBase::dimePolylineType: convert_polyline(entity, state, ld, this); break; case dimeBase::dimeSplineType: // go for it Raphael! :-) break; default: break; } return true; } /*! Finds the state of supported header variables in \a model. This method should be called before dxfxConverter::doConvert() */ void dxfConverter::findHeaderVariables(dimeModel &model) { dimeHeaderSection *hs = (dimeHeaderSection*) model.findSection("HEADER"); if (hs) { dimeParam param; int groupcode; if (hs->getVariable("$FILLMODE", &groupcode, ¶m, 1) == 1) { if (groupcode == 70) this->fillmode = (bool) param.int16_data; } } } dime/src/convert/convert_funcs.h0100644017777301777730000000467607640535604015621 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #ifndef _DXF2VRML_CONVERT_FUNCS_H_ #define _DXF2VRML_CONVERT_FUNCS_H_ class dimeEntity; class dimeState; class dxfLayerData; class dxfConverter; #ifndef M_PI #define M_PI 3.14159265358979323846 #endif // M_PI void convert_3dface(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_line(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_point(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_circle(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_ellipse(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_arc(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_solid(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_trace(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_polyline(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); void convert_lwpolyline(const dimeEntity *, const dimeState *, dxfLayerData *, dxfConverter *); #endif // _DXF2VRML_CONVERT_FUNCS_H_ dime/src/convert/ellipseconvert.cpp0100644017777301777730000001107207676271306016325 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include #include // // find intersection between ellipse and the line x=r-maxerr, // and return the number of subdivisions necessary // to respect the maxerr parameter. // static int calc_num_sub(dxfdouble maxerr, dxfdouble a, dxfdouble b) { dxfdouble minrad = a < b ? a : b; if (maxerr >= minrad) maxerr = minrad / 40.0f; dxfdouble x,y; if (a >= b) { x = a-maxerr; y = sqrt((1.0-(x*x)/(a*a))*b*b); } else { x = b-maxerr; y = sqrt((1.0-(x*x)/(b*b))*a*a); } dxfdouble rad = atan(y/x); return int(M_PI/fabs(rad)) + 1; } void convert_ellipse(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { dimeEllipse *ellipse = (dimeEllipse*) entity; dimeMatrix matrix; state->getMatrix(matrix); dimeVec3f e = ellipse->getExtrusionDir(); dxfdouble thickness = ellipse->getThickness(); // According to the DXF Intern, Ellipse has no Element coordinate // system, so this code is disabled // if (e != dimeVec3f(0,0,1) && e != dimeVec3f(0,0,-1)) { // dimeMatrix m; // dimeEntity::generateUCS(e, m); // matrix.multRight(m); // } e *= thickness; dimeVec3f center = ellipse->getCenter(); // do some cross product magic to calculate minor axis dimeVec3f xaxis = ellipse->getMajorAxisEndpoint(); dimeParam param; if (ellipse->getRecord(38, param)) { center[2] = param.double_data; xaxis[2] = param.double_data; } dxfdouble xlen = xaxis.length() * 0.5; xaxis.normalize(); dimeVec3f yaxis = dimeVec3f(0,0,1).cross(xaxis); yaxis.normalize(); dimeVec3f zaxis = xaxis.cross(yaxis); zaxis.normalize(); yaxis = zaxis.cross(xaxis); yaxis.normalize(); yaxis *= ellipse->getMinorMajorRatio() * xlen; xaxis *= xlen; dxfdouble numpts = (dxfdouble) converter->getNumSub(); if (numpts <= 0.0) { // use maxerr numpts = calc_num_sub(converter->getMaxerr(), xlen, xlen*ellipse->getMinorMajorRatio()); } dxfdouble rad = ellipse->getStartParam(); dxfdouble end = ellipse->getEndParam(); while (end <= rad) end += M_PI*2.0; dxfdouble size = (2*M_PI) / (end-rad); dxfdouble inc = (end-rad) / (numpts * size); int i; dimeVec3f v; dimeVec3f prev(center[0] + xaxis[0] * cos(rad) + yaxis[0] * sin(rad), center[1] + xaxis[1] * cos(rad) + yaxis[1] * sin(rad), center[2] + xaxis[2] * cos(rad) + yaxis[2] * sin(rad)); rad += inc; for (; rad < end; rad += inc) { v = dimeVec3f(center[0] + xaxis[0] * cos(rad) + yaxis[0] * sin(rad), center[1] + xaxis[1] * cos(rad) + yaxis[1] * sin(rad), center[2] + xaxis[2] * cos(rad) + yaxis[2] * sin(rad)); if (thickness == 0.0) { layerData->addLine(prev, v, &matrix); } else { layerData->addQuad(prev, v, v + e, prev + e, &matrix); } prev = v; rad += inc; } rad = end; v = dimeVec3f(center[0] + xaxis[0] * cos(rad) + yaxis[0] * sin(rad), center[1] + xaxis[1] * cos(rad) + yaxis[1] * sin(rad), center[2] + xaxis[2] * cos(rad) + yaxis[2] * sin(rad)); if (thickness == 0.0) { layerData->addLine(prev, v, &matrix); } else { layerData->addQuad(prev, v, v + e, prev + e, &matrix); } } dime/src/convert/layerdata.cpp0100644017777301777730000002535207421034517015230 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include #include /*! \class dxfLayerData layerdata.h \brief The dxfLayerData class handles all geometry for a given color index. DXF geometry is grouped into different colors, as this is a normal way to group geometry data, and especially vrml data. The geometry can be either points, lines or polygons. */ /*! Constructor */ dxfLayerData::dxfLayerData(const int colidx) { this->fillmode = true; this->colidx = colidx; } /*! Destructor. */ dxfLayerData::~dxfLayerData() { } /*! Sets the fillmode for this layer. If fillmode is set (the default) polylines with width and/or height will be converter to polygons and not lines. The same goes for the SOLID and TRACE entities. */ void dxfLayerData::setFillmode(const bool fillmode) { this->fillmode = fillmode; } /*! Adds a line to this layer's geometry. If \a matrix != NULL, the points will be transformed by this matrix before they are added. */ void dxfLayerData::addLine(const dimeVec3f &v0, const dimeVec3f &v1, const dimeMatrix * const matrix) { int i0, i1; if (matrix) { dimeVec3f t0, t1; matrix->multMatrixVec(v0, t0); matrix->multMatrixVec(v1, t1); i0 = linebsp.addPoint(t0); i1 = linebsp.addPoint(t1); } else { i0 = linebsp.addPoint(v0); i1 = linebsp.addPoint(v1); } // // take care of line strips (more effective than single lines) // if (lineindices.count() && lineindices[lineindices.count()-1] == i0) { lineindices.append(i1); } else { if (lineindices.count()) lineindices.append(-1); lineindices.append(i0); lineindices.append(i1); } } /*! Adds a point to this layer's geometry. If \a matrix != NULL, the point will be transformed by this matrix before they are added. */ void dxfLayerData::addPoint(const dimeVec3f &v, const dimeMatrix * const matrix) { if (matrix) { dimeVec3f t; matrix->multMatrixVec(v, t); points.append(t); } else { points.append(v); } } /*! Adds a triangle to this layer's geometry. If \a matrix != NULL, the points will be transformed by this matrix before they are added. */ void dxfLayerData::addTriangle(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeMatrix * const matrix) { if (this->fillmode) { if (matrix) { dimeVec3f t0, t1, t2; matrix->multMatrixVec(v0, t0); matrix->multMatrixVec(v1, t1); matrix->multMatrixVec(v2, t2); faceindices.append(facebsp.addPoint(t0)); faceindices.append(facebsp.addPoint(t1)); faceindices.append(facebsp.addPoint(t2)); faceindices.append(-1); } else { faceindices.append(facebsp.addPoint(v0)); faceindices.append(facebsp.addPoint(v1)); faceindices.append(facebsp.addPoint(v2)); faceindices.append(-1); } } else { this->addLine(v0, v1, matrix); this->addLine(v1, v2, matrix); this->addLine(v2, v0, matrix); } } /*! Adds a quad to this layer's geometry. If \a matrix != NULL, the points will be transformed by this matrix before they are added. */ void dxfLayerData::addQuad(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeVec3f &v3, const dimeMatrix * const matrix) { if (this->fillmode) { if (matrix) { dimeVec3f t0, t1, t2, t3; matrix->multMatrixVec(v0, t0); matrix->multMatrixVec(v1, t1); matrix->multMatrixVec(v2, t2); matrix->multMatrixVec(v3, t3); faceindices.append(facebsp.addPoint(t0)); faceindices.append(facebsp.addPoint(t1)); faceindices.append(facebsp.addPoint(t2)); faceindices.append(facebsp.addPoint(t3)); faceindices.append(-1); } else { faceindices.append(facebsp.addPoint(v0)); faceindices.append(facebsp.addPoint(v1)); faceindices.append(facebsp.addPoint(v2)); faceindices.append(facebsp.addPoint(v3)); faceindices.append(-1); } } else { this->addLine(v0, v1, matrix); this->addLine(v1, v2, matrix); this->addLine(v2, v3, matrix); this->addLine(v3, v0, matrix); } } /*! Exports this layer's geometry as vrml nodes. */ void dxfLayerData::writeWrl(FILE *fp, int indent, const bool vrml1, const bool only2d) { #ifndef NOWRLEXPORT if (!faceindices.count() && !lineindices.count() && !points.count()) return; int i, n; float r,g,b; dimeLayer::colorToRGB(this->colidx, r, g, b); if (vrml1) { fprintf(fp, "Separator {\n"); } else { fprintf(fp, "Group {\n" " children [\n"); } if (faceindices.count()) { if (vrml1) { fprintf(fp, " Separator {\n" " Material {\n" " diffuseColor %g %g %g\n" " }\n" " ShapeHints {\n" " creaseAngle 0.5\n" " vertexOrdering COUNTERCLOCKWISE\n" " shapeType UNKNOWN_SHAPE_TYPE\n" " faceType UNKNOWN_FACE_TYPE\n" " }\n" " Coordinate3 {\n" " point [\n", r, g, b); } else { fprintf(fp, " Shape {\n" " appearance Appearance {\n" " material Material {\n" " diffuseColor %g %g %g\n" " }\n" " }\n" " geometry IndexedFaceSet {\n" " convex FALSE\n" " solid FALSE\n" " creaseAngle 0.5\n" // a good value for most cases " coord Coordinate {\n" " point [\n", r, g, b); } dimeVec3f v; n = facebsp.numPoints(); for (i = 0; i < n ; i++) { facebsp.getPoint(i, v); if (only2d) v[2] = 0.0f; if (i < n-1) fprintf(fp, " %.8g %.8g %.8g,\n", v[0], v[1], v[2]); else fprintf(fp, " %.8g %.8g %.8g\n", v[0], v[1], v[2]); } fprintf(fp, " ]\n" " }\n"); if (vrml1) { fprintf(fp, " IndexedFaceSet {\n" " coordIndex [\n "); } else { fprintf(fp, " coordIndex [\n "); } n = faceindices.count(); int cnt = 1; for (i = 0; i < n; i++) { if ((cnt & 7) && i < n-1) // typical case fprintf(fp, "%d,", faceindices[i]); else if (!(cnt & 7) && i < n-1) fprintf(fp, "%d,\n ", faceindices[i]); else fprintf(fp, "%d\n", faceindices[i]); cnt++; } fprintf(fp, " ]\n" " }\n" " }\n"); } if (lineindices.count()) { // make sure line indices has a -1 at the end if (lineindices[lineindices.count()-1] != -1) { lineindices.append(-1); } if (vrml1) { fprintf(fp, " Separator {\n" " Material {\n" " diffuseColor %g %g %g\n" " }\n" " Coordinate3 {\n" " point [\n", r, g, b); } else { fprintf(fp, " Shape {\n" " geometry IndexedLineSet {\n" " color Color { color %g %g %g }\n" " coord Coordinate {\n" " point [\n", r, g, b); } dimeVec3f v; n = linebsp.numPoints(); for (i = 0; i < n ; i++) { linebsp.getPoint(i, v); if (only2d) v[2] = 0.0f; if (i < n-1) fprintf(fp, " %.8g %.8g %.8g,\n", v[0], v[1], v[2]); else fprintf(fp, " %.8g %.8g %.8g\n", v[0], v[1], v[2]); } fprintf(fp, " ]\n" " }\n"); if (vrml1) { fprintf(fp, " IndexedLineSet {\n" " coordIndex [\n "); } else { fprintf(fp, " coordIndex [\n "); } n = lineindices.count(); int cnt = 1; for (i = 0; i < n; i++) { if ((cnt & 7) && i < n-1) // typical case fprintf(fp, "%d,", lineindices[i]); else if (!(cnt & 7) && i < n-1) fprintf(fp, "%d,\n ", lineindices[i]); else fprintf(fp, "%d\n", lineindices[i]); cnt++; } fprintf(fp, " ]\n" " }\n" " }\n"); } if (points.count() && 0) { // FIXME disabled, suspect bug. pederb, 2001-12-11 if (vrml1) { fprintf(fp, " Separator {\n" " Material {\n" " diffuseColor %g %g %g\n" " }\n" " Coordinate3 {\n" " point [\n", r, g, b); } else { fprintf(fp, " Shape {\n" " geometry PointSet {\n" " color Color { color %g %g %g }\n" " coord Coordinate {\n" " point [\n", r, g, b); } dimeVec3f v; n = points.count(); for (i = 0; i < n ; i++) { v = points[i]; if (only2d) v[2] = 0.0f; if (i < n-1) fprintf(fp, " %g %g %g,\n", v[0], v[1], v[2]); else fprintf(fp, " %g %g %g\n", v[0], v[1], v[2]); } fprintf(fp, " ]\n" " }\n"); if (vrml1) { fprintf(fp, " PointSet {\n" " numPoints %d\n" " }\n" " }\n", points.count()); } else { fprintf(fp, " }\n" " }\n"); } } if (vrml1) { fprintf(fp, "}\n"); } else { fprintf(fp, " ]\n" "}\n"); } #endif // NOWRLEXPORT } dime/src/convert/lineconvert.cpp0100644017777301777730000000413507643262673015622 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include void convert_line(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *) { dimeLine *line = (dimeLine*)entity; dxfdouble thickness; dimeVec3f v0, v1; dimeMatrix matrix; state->getMatrix(matrix); v0 = line->getCoords(0); v1 = line->getCoords(1); dimeParam param; if (line->getRecord(38, param)) { v0[2] = param.double_data; v1[2] = param.double_data; } thickness = line->getThickness(); if (thickness != 0.0) { dimeVec3f v2, v3; dimeVec3f e = line->getExtrusionDir(); v2 = v0 + e * thickness; v3 = v1 + e * thickness; layerData->addQuad(v0, v1, v3, v2, &matrix); } else { layerData->addLine(v0, v1, &matrix); } } dime/src/convert/linesegment.cpp0100644017777301777730000001514107375765041015602 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "linesegment.h" #include #define FLAG_V_CALCULATED 0x1 #define FLAG_CONNECT_CALCULATED 0x2 #ifdef _WIN32 #define M_PI 3.14159265358979323846 #endif // // line_intersection. bounds are not checked, // just unlimited lines // bool intersect_line(const dimeVec3f &v0, // first line const dimeVec3f &v1, // "" const dimeVec3f &v2, // second line const dimeVec3f &v3, // "" dimeVec3f &isect) { dxfdouble x1 = v0[0]; dxfdouble y1 = v0[1]; dxfdouble x2 = v1[0]; dxfdouble y2 = v1[1]; dxfdouble x3 = v2[0]; dxfdouble y3 = v2[1]; dxfdouble x4 = v3[0]; dxfdouble y4 = v3[1]; dxfdouble Ax,Bx,Cx,Ay,By,Cy,d,f,num; Ax = x2-x1; Bx = x3-x4; Ay = y2-y1; By = y3-y4; Cx = x1-x3; Cy = y1-y3; d = By*Cx - Bx*Cy; // alpha numerator f = Ay*Bx - Ax*By; // both denominator // compute intersection coordinates // check if lines are colinear if (f==0.0) { // should never happen isect = v1; // just set some value return false; } num = d*Ax; isect[0] = x1 + num / f; num = d*Ay; isect[1] = y1 + num / f; isect[2] = v0[2]; return true; } /*! \class dxfLineSegment linesegment.h \brief The dxfLineSegment class handles lines with width and/or height. This class support several connected line segments. The line segments will then be converted to a continous mesh, without cracks, as specified in the DXF specification. */ /*! Sets the data for this line segment. \a startwidth is the width at \a p0, \a endwidth is the width at \a p1. \a thickness is the height of the line segment. */ void dxfLineSegment::set(const dimeVec3f &p0, const dimeVec3f &p1, const dxfdouble startwidth, const dxfdouble endwidth, const dxfdouble thickness) { this->flags = 0; this->p[0] = p0; this->p[1] = p1; this->w[0] = startwidth; this->w[1] = endwidth; this->thickness = thickness; this->e = dimeVec3f(0,0,1) * thickness; this->dir = p[1]-p[0]; this->dir.normalize(); this->wdir = dimeVec3f(0,0,1).cross(dir); this->wdir.normalize(); } /*! Converts the line segment to geometry, and puts the geometry into \a layerData. */ void dxfLineSegment::convert(dxfLineSegment *prev, dxfLineSegment *next, dxfLayerData *layerData, dimeMatrix *matrix) { this->calculate_v(); if (this->w[0] > 0.0 || this->w[1] > 0.0) { /* fixme: check cases where connect[0] != connect[3] ++ */ dimeVec3f v0,v1,v2,v3; if (prev) { prev->calculate_connect(this); v0 = prev->connect[2]; v2 = prev->connect[3]; } else { v0 = this->v[0]; v2 = this->v[2]; } if (next) { this->calculate_connect(next); v1 = this->connect[0]; v3 = this->connect[1]; } else { v1 = this->v[1]; v3 = this->v[3]; } layerData->addQuad(v0, v1, v3, v2, matrix); if (thickness != 0.0) { layerData->addQuad(v0+e, v1+e, v3+e, v2+e, matrix); layerData->addQuad(v0, v1, v1+e, v0+e, matrix); if (!next) layerData->addQuad(v1, v3, v3+e, v1+e, matrix); layerData->addQuad(v3, v2, v2+e, v3+e, matrix); if (!prev) layerData->addQuad(v2, v0, v0+e, v2+e, matrix); } } else { if (thickness != 0.0) { layerData->addQuad(p[0], p[1], p[1]+e, p[0]+e, matrix); } else { layerData->addLine(p[0], p[1], matrix); } } } // // private method which calculates the 4 resulting points for this // line segment (considering width). // void dxfLineSegment::calculate_v() { if (!(this->flags & FLAG_V_CALCULATED)) { this->v[0] = p[0]; this->v[1] = p[1]; dimeVec3f vec = dimeVec3f(0,0,1).cross(this->dir); vec.normalize(); this->v[2] = this->v[0] - vec*this->w[0]; this->v[3] = this->v[1] - vec*this->w[1]; this->v[0] += vec*this->w[0]; this->v[1] += vec*this->w[1]; this->flags |= FLAG_V_CALCULATED; } } // // private method that calculates the intersection points between // line segments. // void dxfLineSegment::calculate_connect(dxfLineSegment *next) { if (!(this->flags & FLAG_CONNECT_CALCULATED)) { this->calculate_v(); /* make sure these are caluclated */ next->calculate_v(); dxfdouble angle = this->dir.angle(next->dir); // // from the dxf specification. If angle > 28, use line // intersection even if widths are unequal // if ((this->w[1] == next->w[0]) || (DXFRAD2DEG(angle) > 28)) { // connect where lines intersect. common intersection points dimeVec3f isect; intersect_line(this->v[0], this->v[1], next->v[0], next->v[1], isect); this->connect[0] = this->connect[2] = isect; intersect_line(this->v[2], this->v[3], next->v[2], next->v[3], isect); this->connect[1] = this->connect[3] = isect; } else { dimeVec3f vec = this->wdir + next->wdir + this->p[1]; dimeVec3f isect; intersect_line(this->v[0], this->v[1], this->p[1], vec, isect); this->connect[0] = isect; intersect_line(next->v[0], next->v[1], this->p[1], vec, isect); this->connect[2] = isect; intersect_line(this->v[2], this->v[3], this->p[1], vec, isect); this->connect[1] = isect; intersect_line(next->v[2], next->v[3], this->p[1], vec, isect); this->connect[3] = isect; } this->flags |= FLAG_CONNECT_CALCULATED; } } dime/src/convert/linesegment.h0100644017777301777730000000371407375765041015252 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #ifndef _DXF2VRML_LINE_SEGMENT_ #define _DXF2VRML_LINE_SEGMENT_ #include class dxfLayerData; class dxfLineSegment { public: void set(const dimeVec3f &p0, const dimeVec3f &p1, const dxfdouble startWidth, const dxfdouble endwidth, const dxfdouble thickness); void convert(dxfLineSegment *prev, dxfLineSegment *next, dxfLayerData *data, dimeMatrix *matrix); private: void calculate_v(); void calculate_connect(dxfLineSegment *next); dimeVec3f p[2]; dxfdouble w[2]; dxfdouble thickness; dxfLineSegment *prev; dimeVec3f e; dimeVec3f dir; dimeVec3f wdir; // calculated pts int flags; dimeVec3f v[4]; dimeVec3f connect[4]; }; #endif // _DXF2VRML_LINE_SEGMENT_ dime/src/convert/lwpolylineconvert.cpp0100644017777301777730000000600507643262673017067 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include "linesegment.h" #include #include #include void convert_lwpolyline(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *) { dimeLWPolyline *pline = (dimeLWPolyline*)entity; dimeMatrix matrix; state->getMatrix(matrix); dimeVec3f e = pline->getExtrusionDir(); dxfdouble thickness = pline->getThickness(); if (e != dimeVec3f(0,0,1)) { dimeMatrix m; dimeEntity::generateUCS(e, m); matrix.multRight(m); } e = dimeVec3f(0,0,1) * thickness; float elev = pline->getElevation(); int n = pline->getNumVertices(); if (n <= 0) return; dxfdouble constantWidth = pline->getConstantWidth(); const dxfdouble *x = pline->getXCoords(); const dxfdouble *y = pline->getYCoords(); const dxfdouble *sw = pline->getStartingWidths(); const dxfdouble *ew = pline->getEndWidths(); dimeVec3f v0, v1; #define SET_SEGMENT(s, i0, i1) \ s.set(dimeVec3f(x[i0], y[i0], elev), \ dimeVec3f(x[i1], y[i1], elev), \ sw ? sw[i0] : constantWidth, \ ew ? ew[i0] : constantWidth, \ thickness) dxfLineSegment segment, nextseg, prevseg; bool closed = pline->getFlags() & 1; int stop = closed ? n : n-1; int next, next2; for (int i = 0; i < stop; i++) { next = (i+1) % n; if (i == 0) { SET_SEGMENT(segment, i, next); if (closed) { SET_SEGMENT(prevseg, n-1, 0); } } next2 = (i+2) % n; SET_SEGMENT(nextseg, next, next2); segment.convert(i > 0 || closed ? &prevseg : NULL, i < (stop-1) ? &nextseg : NULL, layerData, &matrix); prevseg = segment; segment = nextseg; } #undef SET_SEGMENT } dime/src/convert/pointconvert.cpp0100644017777301777730000000370607643262673016027 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include void convert_point(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *) { dimePoint *point = (dimePoint*)entity; dimeVec3f v0 = point->getCoords(); dimeParam param; if (point->getRecord(38, param)) { v0[2] = param.double_data; } dimeMatrix matrix; state->getMatrix(matrix); dxfdouble thickness = point->getThickness(); if (thickness != 0.0) { // line dimeVec3f e = point->getExtrusionDir(); layerData->addLine(v0, v0 + thickness * e); } else { // point layerData->addPoint(v0); } } dime/src/convert/polylineconvert.cpp0100644017777301777730000002371107643262673016527 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include "linesegment.h" #include #include #include #include #include static void convert_line_3d(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *); static void convert_line(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *); static void convert_mesh(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *); static void convert_face(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *); void convert_polyline(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { dimePolyline *pline = (dimePolyline*) entity; if (pline->getFlags() & 16) convert_mesh(pline, state, layerData, converter); else if (pline->getFlags() & 64) convert_face(pline, state, layerData, converter); else if (pline->getFlags() & 8) convert_line_3d(pline, state, layerData, converter); else convert_line(pline, state, layerData, converter); } static void set_segment_data(dxfLineSegment* segment, dimeVertex *v, dimeVertex *next, dimePolyline *pline) { dimeParam param; dxfdouble w0, w1; if (v->getRecord(40, param)) w0 = param.double_data; else if (pline->getRecord(40, param)) w0 = param.double_data; else w0 = 0.0; if (v->getRecord(41, param)) w1 = param.double_data; else if (pline->getRecord(41, param)) w1 = param.double_data; else w1 = 0.0; dimeVec3f v0,v1; v0 = v->getCoords(); if (next) v1 = next->getCoords(); else v1 = v0 + dimeVec3f(1,0,0); // just set a dummy value v0[2] = pline->getElevation()[2]; v1[2] = pline->getElevation()[2]; segment->set(v0, v1, w0, w1, pline->getThickness()); } static void convert_line(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { // respect the value in the $FILLMODE header variable layerData->setFillmode(converter->getFillmode()); int i, n = pline->getNumCoordVertices(); if (n == 0) return; dimeMatrix matrix; state->getMatrix(matrix); dimeVec3f e = pline->getExtrusionDir(); dxfdouble thickness = pline->getThickness(); if (e != dimeVec3f(0,0,1)) { dimeMatrix m; dimeEntity::generateUCS(e, m); matrix.multRight(m); } e = dimeVec3f(0,0,1) * thickness; float elev = pline->getElevation()[2]; dxfLineSegment prevseg, nextseg, segment; dimeVertex *v = NULL; dimeVertex *next = NULL; dimeVec3f v0, v1; bool closed = pline->getFlags() & 1; if (n <= 2) closed = false; int stop = closed ? n : n-1; for (i = 0; i < stop; i++) { v = pline->getCoordVertex(i); next = pline->getCoordVertex((i+1)%n); if (i == 0) { set_segment_data(&segment, v, next, pline); if (closed) { set_segment_data(&prevseg, pline->getCoordVertex(n-1), v, pline); } } dimeVertex *next2 = pline->getCoordVertex((i+2)%n); set_segment_data(&nextseg, next, next2, pline); dimeParam param; // // FIXME: need to figure out what to do if elev != 0 and the bulge // factor != 0. Right now we don't bulge those line segments. // Maybe we should push the state, and make a new matrix??? if (elev == 0.0f && v->getRecord(42, param) && param.double_data != 0.0) { dxfdouble A = param.double_data; dxfdouble alpha = 4.0*atan(A); dimeVec3f dir = next->getCoords() - v->getCoords(); dxfdouble L = dir.length(); dir.normalize(); dxfdouble H = A*L/2.0; dxfdouble R = L / (2.0*sin(alpha/2.0)); dimeVec3f rdir = A > 0.0 ? dir.cross(dimeVec3f(0,0,1)) : dir.cross(dimeVec3f(0,0,-1)); rdir.normalize(); dimeVec3f center = v->getCoords() + dir*(L/2.0) - rdir*(R-H); #if 0 fprintf(stderr,"A: %g, L: %g, H: %g, R:%g\n", A, L, H, R); #endif #if 0 fprintf(stderr,"dir: %g %g %g, rdir: %g %g %g\n", dir[0], dir[1], dir[2], rdir[0], rdir[1], rdir[2]); #endif dimeVec3f t = v->getCoords() - center; t.normalize(); dxfdouble a0 = dimeVec3f(1,0,0).angle(t); if (t[1] < 0.0) a0 = 2*M_PI-a0; t = next->getCoords() - center; t.normalize(); dxfdouble a1 = dimeVec3f(1,0,0).angle(t); if (t[1] < 0.0) a1 = 2*M_PI-a1; dimeArc arc; arc.setLayer(v->getLayer()); arc.setColorNumber(v->getColorNumber()); arc.setExtrusionDir(pline->getExtrusionDir()); arc.setCenter(center); arc.setRadius(R); arc.setStartAngle(DXFRAD2DEG(a0)); arc.setEndAngle(DXFRAD2DEG(a1)); // if (elev != 0.0f) { // dimeParam param; // param.double_data = elev; // arc.setRecord(38, param); // } convert_arc(&arc, state, converter->getLayerData(v), converter); } else { segment.convert(i > 0 || closed ? &prevseg : NULL, i < (stop-1) ? &nextseg : NULL, converter->getLayerData(v), &matrix); } // prepare for next iteration prevseg = segment; segment = nextseg; } } static void convert_line_3d(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { int i, n = pline->getNumCoordVertices(); if (n == 0) return; dimeMatrix matrix; state->getMatrix(matrix); dimeVertex *v = NULL; dimeVertex *next = NULL; dimeVec3f v0, v1; int stop = pline->getFlags() & 1 ? n : n-1; for (i = 0; i < stop; i++) { v = pline->getCoordVertex(i); layerData = converter->getLayerData(v); next = i+1 >= n ? pline->getCoordVertex(0) : pline->getCoordVertex(i+1); v0 = v->getCoords(); v1 = next->getCoords(); layerData->addLine(v0, v1, &matrix); } } static void convert_mesh(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *) { int i; int m = pline->getPolymeshCountM(); int n = pline->getPolymeshCountN(); int m2 = 0; int n2 = 0; int coordCnt = pline->getNumCoordVertices(); if (pline->getSurfaceType() && pline->getSmoothSurfaceMdensity() && pline->getSmoothSurfaceNdensity()) { m2 = pline->getSmoothSurfaceMdensity(); n2 = pline->getSmoothSurfaceNdensity(); } if (m*n + m2*n2 != coordCnt) { // FIXME: quick bugfix for stehlen.dxf... file is probably invalid... if ((m-1)*n + m2*n2 == coordCnt) m--; else { if (m*n == coordCnt) { m2 = n2 = 0; } else if (m2*n2 == coordCnt) { m = n = 0; } else { // give up... can't find the dimensions fprintf(stderr,"Error: Unable to find polymesh dimensions.\n"); return; } } } int idx; int idxadd = m2*n2; int nexti, nextj; int endm = (pline->getFlags() & 1) ? m : m-1; int endn = (pline->getFlags() & 32) ? n : n-1; dimeMatrix matrix; state->getMatrix(matrix); for (i = 0; i < endm; i++) { nexti = i+1; if (nexti == m) nexti = 0; for (int j = 0; j < endn; j++) { nextj = j+1; if (nextj == n) nextj = 0; layerData->addQuad(pline->getCoordVertex(idxadd+i*n+j)->getCoords(), pline->getCoordVertex(idxadd+i*n+nextj)->getCoords(), pline->getCoordVertex(idxadd+nexti*n+nextj)->getCoords(), pline->getCoordVertex(idxadd+nexti*n+j)->getCoords(), &matrix); } } idxadd = 0; // copied code from above. I'm too lazy to write a loop or // a separate function :) m = m2; n = n2; endm = (pline->getFlags() & 1) ? m : m-1; endn = (pline->getFlags() & 32) ? n : n-1; for (i = 0; i < endm; i++) { nexti = i+1; if (nexti == m) nexti = 0; for (int j = 0; j < endn; j++) { nextj = j+1; if (nextj == n) nextj = 0; layerData->addQuad(pline->getCoordVertex(idxadd+i*n+j)->getCoords(), pline->getCoordVertex(idxadd+i*n+nextj)->getCoords(), pline->getCoordVertex(idxadd+nexti*n+nextj)->getCoords(), pline->getCoordVertex(idxadd+nexti*n+j)->getCoords(), &matrix); } } } static void convert_face(dimePolyline *pline, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { dimeMatrix matrix; state->getMatrix(matrix); int i, n = pline->getNumIndexVertices(); for (i = 0; i < n; i++) { dimeVertex *v = pline->getIndexVertex(i); layerData = converter->getLayerData(v); dimeVec3f c[4]; int num = v->numIndices(); int idx; for (int j = 0; j < num; j++) { idx = v->getIndex(j); if (idx < 0) { // negative means hidden edge idx = -idx; } c[j] = pline->getCoordVertex(idx-1)->getCoords(); } if (num == 3) layerData->addTriangle(c[0], c[1], c[2], &matrix); else layerData->addQuad(c[0], c[1], c[2], c[3], &matrix); } } dime/src/convert/solidconvert.cpp0100644017777301777730000000765507643262673016017 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include #include void convert_solid_data(dimeVec3f *v, dimeVec3f &e, dxfdouble thickness, const dimeState *state, dxfLayerData *layerData) { dimeMatrix matrix; state->getMatrix(matrix); if (e != dimeVec3f(0,0,1)) { dimeMatrix m; dimeEntity::generateUCS(e, m); matrix.multRight(m); } e = dimeVec3f(0,0,1) * thickness; int numunique = 0; dimeVec3f u[4]; int i,j; for (i = 0; i < 4; i++) { for (j = 0; j < numunique; j++) { if (u[j] == v[i]) break; } if (j == numunique) { u[numunique++] = v[i]; } } switch (numunique) { case 1: if (thickness != 0.0) { layerData->addLine(u[0], u[0]+e, &matrix); } else { layerData->addPoint(u[0], &matrix); } break; case 2: if (thickness != 0.0) { layerData->addQuad(u[0], u[1], u[1]+e, u[0]+e, &matrix); } else { layerData->addLine(u[0], u[1], &matrix); } break; case 3: // FIXME: check fillmode layerData->addTriangle(u[0], u[1], u[2], &matrix); if (thickness != 0.0) { layerData->addTriangle(u[0]+e, u[1]+e, u[2]+e, &matrix); layerData->addQuad(u[0], u[1], u[1]+e, u[0]+e, &matrix); layerData->addQuad(u[1], u[2], u[2]+e, u[1]+e, &matrix); layerData->addQuad(u[2], u[0], u[0]+e, u[2]+e, &matrix); } break; case 4: // FIXME: check fillmode layerData->addQuad(u[0], u[1], u[3], u[2], &matrix); if (thickness != 0) { layerData->addQuad(u[0]+e, u[1]+e, u[3]+e, u[2]+e, &matrix); layerData->addQuad(u[0], u[1], u[1]+e, u[0]+e, &matrix); layerData->addQuad(u[1], u[3], u[3]+e, u[1]+e, &matrix); layerData->addQuad(u[3], u[2], u[2]+e, u[3]+e, &matrix); layerData->addQuad(u[2], u[0], u[0]+e, u[2]+e, &matrix); } break; default: fprintf(stderr,"Unexpected error converting SOLID\n"); break; } } void convert_solid(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { // respect the value in the $FILLMODE header variable layerData->setFillmode(converter->getFillmode()); dimeSolid *solid = (dimeSolid*)entity; dimeVec3f v[4]; solid->getVertices(v[0], v[1], v[2], v[3]); dimeParam param; if (solid->getRecord(38, param)) { v[0][2] = param.double_data; v[1][2] = param.double_data; v[2][2] = param.double_data; v[3][2] = param.double_data; } dimeVec3f e; solid->getExtrusionDir(e); dxfdouble thickness = solid->getThickness(); convert_solid_data(v, e, thickness, state, layerData); } dime/src/convert/traceconvert.cpp0100644017777301777730000000442607643262673015774 0ustar wwwwww/**************************************************************************\ * * This source file is part of DIME. * Copyright (C) 1998-2001 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 22207097 * \**************************************************************************/ #include "convert_funcs.h" #include #include #include #include #include // // implementation in solid.cpp // extern void convert_solid_data(dimeVec3f *v, dimeVec3f &e, dxfdouble thickness, const dimeState *state, dxfLayerData *layerData); void convert_trace(const dimeEntity *entity, const dimeState *state, dxfLayerData *layerData, dxfConverter *converter) { dimeTrace *trace = (dimeTrace*)entity; // respect the value in the $FILLMODE header variable layerData->setFillmode(converter->getFillmode()); dimeVec3f v[4]; trace->getVertices(v[0], v[1], v[2], v[3]); dimeParam param; if (trace->getRecord(38, param)) { v[0][2] = param.double_data; v[1][2] = param.double_data; v[2][2] = param.double_data; v[3][2] = param.double_data; } dimeVec3f e; trace->getExtrusionDir(e); dxfdouble thickness = trace->getThickness(); convert_solid_data(v, e, thickness, state, layerData); } dime/src/entities/0040755017777301777730000000000007733212517012722 5ustar wwwwwwdime/src/entities/3DFace.cpp0100644017777301777730000000714006776622122014455 0ustar wwwwww/**************************************************************************\ * * FILE: 3DFace.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dime3DFace dime/entities/3DFace.h \brief The dime3DFace class handles a 3DFACE \e entity. */ #include #include #include #include #include #include static char entityName[] = "3DFACE"; /*! Constructor. */ dime3DFace::dime3DFace() : flags( 0 ) { #ifndef NO_RR_DATA this->block = NULL; #endif } //! dimeEntity * dime3DFace::copy(dimeModel * const model) const { dime3DFace *f = new(model->getMemHandler()) dime3DFace; if (!f) return NULL; f->copyCoords(this); f->flags = this->flags; if (!this->copyRecords(f, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete f; f = NULL; } return f; } //! const char * dime3DFace::getEntityName() const { return entityName; } //! bool dime3DFace::write(dimeOutput * const file) { bool ret = true; if (!this->isDeleted()) { this->preWrite(file); this->writeCoords(file); if (flags != 0) { file->writeGroupCode(70); file->writeInt16(flags); } ret = dimeEntity::write(file); } return ret; } //! int dime3DFace::typeId() const { return dimeBase::dime3DFaceType; } //! bool dime3DFace::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { if (groupcode == 70) { this->flags = param.int16_data; return true; } else { return dimeFaceEntity::handleRecord(groupcode, param, memhandler); } } //! bool dime3DFace::getRecord(const int groupcode, dimeParam ¶m, const int index) const { if (groupcode == 70) { param.int16_data = this->flags; return true; } return dimeFaceEntity::getRecord(groupcode, param, index); } //! void dime3DFace::print() const { fprintf(stderr,"3DFACE:\n"); int stop = this->isQuad() ? 4 : 3; for (int i = 0; i < stop; i++) { fprintf(stderr,"coord: %f %f %f\n", coords[i][0], coords[i][1], coords[i][2]); } } //! int dime3DFace::countRecords() const { int cnt = 0; if (!this->isDeleted()) { cnt++; // header if (this->flags != 0) cnt++; cnt += dimeFaceEntity::countRecords(); } return cnt; } void dime3DFace::setFlags(const int16 flags) { this->flags = flags; } int16 dime3DFace::getFlags() const { return this->flags; } dime/src/entities/Arc.cpp0100644017777301777730000001367307142512101014124 0ustar wwwwww/**************************************************************************\ * * FILE: Arc.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeArc dime/entities/Arc.h \brief The dimeArc class handles an ARC \e entity. */ #include #include #include #include #include #include #include #ifdef _WIN32 #define M_PI 3.14159265357989 #endif #ifdef macintosh #define M_PI 3.14159265357989 #endif static char entityName[] = "ARC"; // FIXME: should be configurable #define ARC_NUMPTS 20 // num pts for a 2PI arc /*! Constructor. */ dimeArc::dimeArc() : center( 0, 0, 0 ), radius( 0.0 ), startAngle( 0.0 ), endAngle( 2*M_PI ) { } //! dimeEntity * dimeArc::copy(dimeModel * const model) const { dimeArc *a = new(model->getMemHandler()) dimeArc; if (!a) return NULL; if (!this->copyRecords(a, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete a; a = NULL; } else { a->center = this->center; a->radius = this->radius; a->startAngle = this->startAngle; a->endAngle = this->endAngle; a->copyExtrusionData(this); } return a; } //! bool dimeArc::write(dimeOutput * const file) { this->preWrite(file); file->writeGroupCode(10); file->writeDouble(this->center[0]); file->writeGroupCode(20); file->writeDouble(this->center[1]); file->writeGroupCode(30); file->writeDouble(this->center[2]); file->writeGroupCode(40); file->writeDouble(this->radius); file->writeGroupCode(50); file->writeDouble(this->startAngle); file->writeGroupCode(51); file->writeDouble(this->endAngle); return this->writeExtrusionData(file) && dimeEntity::write(file); } //! int dimeArc::typeId() const { return dimeBase::dimeArcType; } //! bool dimeArc::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 10: case 20: case 30: this->center[groupcode / 10 - 1] = param.double_data; return true; case 40: this->radius = param.double_data; return true; case 50: this->startAngle = param.double_data; return true; case 51: this->endAngle = param.double_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeArc::getEntityName() const { return entityName; } //! bool dimeArc::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 10: case 20: case 30: param.double_data = this->center[groupcode / 10 - 1]; return true; case 40: param.double_data = this->radius; return true; case 50: param.double_data = this->startAngle; return true; case 51: param.double_data = this->endAngle; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } //! void dimeArc::print() const { fprintf(stderr,"ARC:\n"); fprintf(stderr, " center: %.3f %.3f %.3f\n", center[0], center[1], center[2]); fprintf(stderr, " radius: %f\n", radius); fprintf(stderr, " start: %f, end: %f\n", startAngle, endAngle); fprintf(stderr, " extrusionDir: %f %f %f\n", extrusionDir[0], extrusionDir[1], extrusionDir[2]); fprintf(stderr, " thickness: %f\n", thickness); } //! dimeEntity::GeometryType dimeArc::extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness) { verts.setCount(0); indices.setCount(0); thickness = this->thickness; extrusionDir = this->extrusionDir; // split the arc into lines double end = this->endAngle; if (end < this->startAngle) end += 360.0; double delta = DXFDEG2RAD(end - this->startAngle); if (delta == 0.0) { #ifndef NDEBUG fprintf(stderr,"ARC with startAngle == endAngle!\n"); #endif end += 2*M_PI; //return dimeEntity::NONE; } // find the number of this ARC that fits inside 2PI int parts = (int) DXFABS((2*M_PI)/delta); // find # pts to use for arc // add one to avoid arcs with 0 line segments int numpts = ARC_NUMPTS / parts + 1; if (numpts > ARC_NUMPTS) numpts = ARC_NUMPTS; double inc = delta / numpts; double rad = DXFDEG2RAD(this->startAngle); int i; for (i = 0; i < numpts; i++) { verts.append(dimeVec3f(this->center.x + this->radius * cos(rad), this->center.y + this->radius * sin(rad), this->center.z)); rad += inc; } rad = DXFDEG2RAD(end); verts.append(dimeVec3f(this->center.x + this->radius * cos(rad), this->center.y + this->radius * sin(rad), this->center.z)); return dimeEntity::LINES; } //! int dimeArc::countRecords() const { int cnt = 1 + 3 + 1 + 2; // header + center point + radius + angles return cnt + dimeExtrusionEntity::countRecords(); } dime/src/entities/Block.cpp0100644017777301777730000002175507225351742014467 0ustar wwwwww/**************************************************************************\ * * FILE: Block.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeBlock dime/entities/Block.h \brief The dimeBlock class handles a BLOCK \e entity. It cannot strictly be called an entity, as you will only find BLOCKs in the BLOCKS section, not in the ENTITIES section. But BLOCKs share a lot of attributes and functionality with "real" entities, so in DXFLIB, a BLOCK is called an entity. */ #include #include #include #include #include #include static char entityName[] = "BLOCK"; /*! \fn const dimeVec3f &dimeBlock::getBasePoint() const Returns the base point of this block. */ /*! \fn void dimeBlock::setBasePoint(const dimeVec3f &v) Sets the base point of this entity. */ /*! \fn int dimeBlock::getNumEntities() const Returns the number of entities in this block. */ /*! \fn dimeEntity *dimeBlock::getEntity(const int idx) Returns the entity at index \a idx. \sa dimeBlock::getNumEntities() */ /*! \fn const char *dimeBlock::getName() const Returns the name of this block (used by INSERT to reference the block). */ /*! \fn void dimeBlock::setName(const char * const name) Sets the name of this block. \a name Must be a static char pointer, or some pointer that will not be deleted before the block, as the text string will not be copied. It is best to avoid using this method. Use dimeModel::addBlock() instead. */ /*! Constructor. */ dimeBlock::dimeBlock(dimeMemHandler * const memhandler) : flags( 0 ), name( NULL ), basePoint( 0, 0, 0 ), endblock( NULL ), memHandler( memhandler ) { } /*! Destructor. */ dimeBlock::~dimeBlock() { if (!this->memHandler) { for (int i = 0; i < this->entities.count(); i++) { delete this->entities[i]; } delete this->endblock; } } //! dimeEntity * dimeBlock::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeBlock *bl = new dimeBlock(memh); bool ok = true; int n = this->entities.count(); if (n) { ok = dimeEntity::copyEntityArray((const dimeEntity**) this->entities.constArrayPointer(), n, model, bl->entities); } if (ok) { bl->basePoint = this->basePoint; bl->flags = this->flags; if (this->endblock) bl->endblock = this->endblock->copy(model); if (this->name) { bl->name = (char*)model->addBlock(this->name, bl); if (!bl->name) ok = false; } } if (!ok || !this->copyRecords(bl, model)) { if (!memh) delete bl; // delete if allocated on heap bl = NULL; // just return NULL } return bl; } /*! This method reads a BLOCK entity from \a file. */ bool dimeBlock::read(dimeInput * const file) { this->name = NULL; bool ret = dimeEntity::read(file); if (ret && this->name) { // see handleRecord() to understand this code. Yup, ugly :) char *tmp = (char*)this->name; this->name = file->getModel()->addBlock(tmp, this); delete [] tmp; } // got to do some reading to get all entities in the block if (ret) { dimeMemHandler *memhandler = file->getMemHandler(); this->entities.makeEmpty(1024); // begin with a fairly large array ret = dimeEntity::readEntities(file, this->entities, "ENDBLK"); if (ret) { this->endblock = dimeEntity::createEntity("ENDBLK", memhandler); // read the ENDBLOCK entity if (!this->endblock || !this->endblock->read(file)) ret = false; } this->entities.shrinkToFit(); // don't waste too much memory } #ifndef NDEBUG dimeParam param; if (getRecord(67, param) && param.int16_data == 1) { fprintf(stderr,"paperspace block name: %s\n", ((dimeBlock*)this)->getName()); } #endif return ret; } /*! This methods writes a BLOCK entity to \a file. */ bool dimeBlock::write(dimeOutput * const file) { this->preWrite(file); file->writeGroupCode(2); file->writeString(this->name); file->writeGroupCode(70); file->writeInt16(this->flags); file->writeGroupCode(10); file->writeDouble(this->basePoint[0]); file->writeGroupCode(20); file->writeDouble(this->basePoint[1]); file->writeGroupCode(30); file->writeDouble(this->basePoint[2]); // write unknown records. bool ret = dimeEntity::write(file); if (ret) { int i, n = this->entities.count(); for (i = 0; i < n; i++) { if (!this->entities[i]->write(file)) break; } if (i == n) { if (this->endblock) { ret = this->endblock->write(file); } else { // just put a minimal ENDBLK there file->writeGroupCode(0); file->writeString("ENDBLK"); file->writeGroupCode(8); ret = file->writeString(this->getLayerName()); } } else ret = false; } return ret; } //! int dimeBlock::typeId() const { return dimeBase::dimeBlockType; } //! bool dimeBlock::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 2: { const char *str = param.string_data; if (str) { // this->name is used as a temporary storage space... // see read() to see what is done later. this->name = new char[strlen(str)+1]; if (this->name) { strcpy((char*)this->name, str); } } return true; } case 70: this->flags = param.int16_data; return true; case 10: case 20: case 30: this->basePoint[groupcode/10-1] = param.double_data; return true; } return dimeEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeBlock::getEntityName() const { return entityName; } //! bool dimeBlock::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 2: param.string_data = this->name; return true; case 70: param.int16_data = this->flags; return true; case 10: case 20: case 30: param.double_data = this->basePoint[groupcode/10-1]; return true; } return dimeEntity::getRecord(groupcode, param, index); } //! void dimeBlock::fixReferences(dimeModel * const model) { int i, n = this->entities.count(); for (i = 0; i < n; i++) this->entities[i]->fixReferences(model); } //! int dimeBlock::countRecords() const { int cnt = 0; cnt += 3; // header cnt += 3; // basePoint int n = this->entities.count(); for (int i = 0; i < n; i++) cnt += this->entities[i]->countRecords(); return cnt + dimeEntity::countRecords(); } /*! Inserts an entity in this block at position \a idx. */ void dimeBlock::insertEntity(dimeEntity * const entity, const int idx) { if (idx < 0) this->entities.append(entity); else { assert(idx <= this->entities.count()); this->entities.insertElem(idx, entity); } } /*! Removes the entity at position \a idx. If \a deleteIt is \e true, and no memory handler is used, the entity will be deleted before returing from this method. */ void dimeBlock::removeEntity(const int idx, const bool deleteIt) { assert(idx >= 0 && idx < this->entities.count()); if (!this->memHandler && deleteIt) delete this->entities[idx]; this->entities.removeElem(idx); } //! bool dimeBlock::traverse(const dimeState * const state, dimeCallback callback, void *userdata) { if (callback(state, this, userdata)) { //FIXME: what to do with basePoint? const int n = this->entities.count(); for (int i = 0; i < n; i++) { if (!entities[i]->traverse(state, callback, userdata)) return false; } } if (this->endblock) return callback(state, this->endblock, userdata); return true; } /*! Since a growable array is used to hold the entities, it might sometimes use more memory than absolutely needed. Call this method after you have finished modifying a block if you want to free that overhead memory. */ void dimeBlock::fitEntities() { this->entities.shrinkToFit(); } dime/src/entities/Circle.cpp0100644017777301777730000001136707142512101014616 0ustar wwwwww/**************************************************************************\ * * FILE: Circle.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeCircle dime/entities/Circle.h \brief The dimeCircle class handles a CIRCLE \e entity. */ #include #include #include #include #include #include #include #ifdef _WIN32 #define M_PI 3.14159265357989 #endif #ifdef macintosh #define M_PI 3.14159265357989 #endif static char entityName[] = "CIRCLE"; // FIXME: configurable #define CIRCLE_NUMPTS 16 /*! Constructor. */ dimeCircle::dimeCircle() : center(0,0,0), radius( 0.0 ) { } //! dimeEntity * dimeCircle::copy(dimeModel * const model) const { dimeCircle *c = new(model->getMemHandler()) dimeCircle; if (!c) return NULL; if (!this->copyRecords(c, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete c; c = NULL; } else { c->copyExtrusionData(this); c->center = this->center; c->radius = this->radius; } return c; } /*! This method writes a DXF \e Circle entity to \a file. */ bool dimeCircle::write(dimeOutput * const file) { dimeEntity::preWrite(file); file->writeGroupCode(10); file->writeDouble(this->center[0]); file->writeGroupCode(20); file->writeDouble(this->center[1]); file->writeGroupCode(30); file->writeDouble(this->center[2]); file->writeGroupCode(40); file->writeDouble(this->radius); this->writeExtrusionData(file); return dimeEntity::write(file); // write unknown records. } //! int dimeCircle::typeId() const { return dimeBase::dimeCircleType; } /*! Handles the callback from dimeEntity::readRecords(). */ bool dimeCircle::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 10: case 20: case 30: this->center[groupcode/10-1] = param.double_data; return true; case 40: this->radius = param.double_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeCircle::getEntityName() const { return entityName; } //! bool dimeCircle::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 10: case 20: case 30: param.double_data = this->center[groupcode/10-1]; return true; case 40: param.double_data = this->radius; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } //! void dimeCircle::print() const { fprintf(stderr,"CIRCLE:\n"); fprintf(stderr, " center: %.3f %.3f %.3f\n", center[0], center[1], center[2]); fprintf(stderr, " radius: %f\n", radius); } //! dimeEntity::GeometryType dimeCircle::extractGeometry(dimeArray &verts, dimeArray &/*indices*/, dimeVec3f &extrusionDir, dxfdouble &thickness) { thickness = this->thickness; extrusionDir = this->extrusionDir; // tessellate the circle/cylinder dxfdouble inc = (2*M_PI) / CIRCLE_NUMPTS; dxfdouble rad = 0.0f; int i; for (i = 0; i < CIRCLE_NUMPTS; i++) { verts.append(dimeVec3f(this->center.x + this->radius * cos(rad), this->center.y + this->radius * sin(rad), this->center.z)); rad += inc; } dimeVec3f tmp = verts[0]; verts.append(tmp); // closed line/polygon if (this->thickness == 0.0) return dimeEntity::LINES; else return dimeEntity::POLYGONS; } //! int dimeCircle::countRecords() const { // header + center point + radius return 5 + dimeExtrusionEntity::countRecords(); } dime/src/entities/Ellipse.cpp0100644017777301777730000001444006776622122015026 0ustar wwwwww/**************************************************************************\ * * FILE: Ellipse.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeEllipse dime/entities/Ellipse.h \brief The dimeEllipse class handles an ELLIPSE \e entity. */ #include #include #include #include #include #include #include #ifdef _WIN32 #define M_PI 3.14159265357989 #endif #ifdef macintosh #define M_PI 3.14159265357989 #endif /*! \fn void dimeEllipse::setCenter(const dimeVec3f &c) Sets the center coordinates of the ellipse. */ /*! \fn const dimeVec3f &dimeEllipse::getCenter() const Returns the center coordinates of the ellipse. */ /*! \fn void dimeEllipse::setMajorAxisEndpoint(const dimeVec3f &v) Sets the major axis endpoint of the ellipse. \sa dimeEllipse::setRatio() */ /*! \fn const dimeVec3f &dimeEllipse::getMajorAxisEndpoint() const Returns the major axis endpoint of this ellipse. */ /*! \fn void dimeEllipse::setMinorMajorRatio(const dxfdouble ratio) Sets the ratio of the minor axis to the major axis. */ /*! \fn dxfdouble dimeEllipse::getMinorMajorRatio() const Returns the ratio of the minor axis to the major axis. */ /*! \fn void dimeEllipse::setStartParam(const dxfdouble p) Sets the start parameter for this ellipse. Possible values range from 0 to 2pi. Default value is 0. */ /*! \fn dxfdouble dimeEllipse::getStartParam() const Returns the start parameter for this ellipse. \sa dimeEllipse::setStartParam() */ /*! \fn void dimeEllipse::setEndParam(const dxfdouble p) Sets the end parameter for this ellipse. Possible values range from 0 to 2pi, but this value should be bigger than the start parameter. Default value is 2pi. \sa dimeEllipse::setStartParam() */ /*! \fn dxfdouble dimeEllipse::getEndParam() const Returns the end parameter for this ellipse. \sa dimeEllipse::setEndParam() */ static char entityName[] = "ELLIPSE"; // FIXME: should be configurable #define ELLIPSE_NUMPTS 16 /*! Constructor. */ dimeEllipse::dimeEllipse() : center(0,0,0), majorAxisEndpoint(0,0,1), ratio(1.0), startParam(0.0), endParam(M_PI*2) { } //! dimeEntity * dimeEllipse::copy(dimeModel * const model) const { dimeEllipse *e = new(model->getMemHandler()) dimeEllipse; if (!e) return NULL; if (!this->copyRecords(e, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete e; e = NULL; } else { e->copyExtrusionData(this); e->center = this->center; e->ratio = this->ratio; e->majorAxisEndpoint = this->majorAxisEndpoint; e->startParam = this->startParam; e->endParam = this->endParam; } return e; } //! bool dimeEllipse::write(dimeOutput * const file) { dimeEntity::preWrite(file); file->writeGroupCode(10); file->writeDouble(this->center[0]); file->writeGroupCode(20); file->writeDouble(this->center[1]); file->writeGroupCode(30); file->writeDouble(this->center[2]); file->writeGroupCode(11); file->writeDouble(this->majorAxisEndpoint[0]); file->writeGroupCode(21); file->writeDouble(this->majorAxisEndpoint[1]); file->writeGroupCode(31); file->writeDouble(this->majorAxisEndpoint[2]); file->writeGroupCode(40); file->writeDouble(this->ratio); file->writeGroupCode(41); file->writeDouble(this->startParam); file->writeGroupCode(42); file->writeDouble(this->endParam); this->writeExtrusionData(file); return dimeExtrusionEntity::write(file); } //! int dimeEllipse::typeId() const { return dimeBase::dimeEllipseType; } //! bool dimeEllipse::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 10: case 20: case 30: this->center[groupcode/10-1] = param.double_data; return true; case 11: case 21: case 31: this->majorAxisEndpoint[groupcode/10-1] = param.double_data; return true; case 40: this->ratio = param.double_data; return true; case 41: this->startParam = param.double_data; return true; case 42: this->endParam = param.double_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeEllipse::getEntityName() const { return entityName; } //! bool dimeEllipse::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 10: case 20: case 30: param.double_data = this->center[groupcode/10-1]; return true; case 11: case 21: case 31: param.double_data = this->majorAxisEndpoint[groupcode/10-1]; return true; case 40: param.double_data = this->ratio; return true; case 41: param.double_data = this->startParam; return true; case 42: param.double_data = this->endParam; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } //! void dimeEllipse::print() const { fprintf(stderr,"ELLIPSE:\n"); } //! int dimeEllipse::countRecords() const { // header + center point + major endpoint + ratio + start + end return 10 + dimeExtrusionEntity::countRecords(); } dime/src/entities/Entity.cpp0100644017777301777730000005464407362555667014732 0ustar wwwwww/**************************************************************************\ * * FILE: Entity.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeEntity dime/entities/Entity.h \brief The dimeEntity class is the superclass of all \e entity classes. If you plan to implement your own entity you should inherit this class. There are some method you need to implement to create an entity, and some steps need to be taken if it's going to work 100% with the rest of the library. I recommend looking at the code for the dimeArc entity when you read this documentation and before you implement your own record. This is a very simple entity. It inherits the dimeExtrusionEntity class. The dimeExtrusionEntity class is used to store extrusion information for an entity, and you should inherit this class if your entity needs all of the following group codes: 39 (thickness), 210, 220, 230 (extrusion direction vector). The getRecord() method should be implemented to enable records to be queried using the group code of the record. Usually when you implement an entity you store some of the records in class members, and let the dimeRecordHolder class store the records you're not interested in. So, this method should check if the group code parameter matches one of the records stored in one of your class members, and then return the value of that member. If the requested group code isn't store by your class, you should return with a call to your parent's class getRecord() method, usually dimeEntity::getRecord() or dimeExtrusionEntity::getRecord(). The getEntityName() should simply return the DXF name of the entitiy. The copy() method should make an exact copy of the entity and return this. The dimeModel argument to copy() is the model the copied entity will be a part of. First you should create a new instance of your entitiy. The model'l memory handler should be passed as an argument to new(). Then you should call the copyRecords() method to copy records stored by dimeRecordHolder (dimeEntity inherits dimeRecordHolder). Then you should copy your data members into the new instance. If you inherit the dimeExtrusionEntity you should class copyExtrusionData() before returning. The write() method should write your entiy using the dimeOutput parameter. Fist your should call the preWrite() method. This will take care of writing the entity name, and handle ugly stuff such as entity handles and ACAD REACTORS data. Then you should write your data members. If you inherit from dimeExtrusionEntity method you should call writeExtrusionData(). The last thing to do before returning is to call dimeEntity::write() to write records not handled by your class. The typeId() method should be implemented if your entity is not an abstract class. Now you have to edit the include/dime/Base.h, and add a unique type name id for your entity. The typeId() method should simply return this enum value. The countRecords() method is not critical to implement. It should return the number of records that will be written by your entity. It can be used to create a progress bar while writing a DXF file. It is really only useful for _very_ large DXF files. But you should implement it since it's not too much work. Implement the extractGeometry() method if you feel like it. This is just a convenience method so you don't have to do this. The handleRecord() should be implemented to support reading entities from a file, and to let users set records based on group codes. When reading, the handleRecord() method will be called for every record found in the entity. If some group code is not supported by you, you should call the parent's handleRecord() and it will be stored there. If you need to allocate memory to store the data you should check if the dimeMemHandler parameter != NULL and then use it to allocate memory. There is a convenience macro defines in include/dime/Basic.h that copies a string, using the memory handler if != NULL. Well, that's about it I think. Good luck :) Don't hesitate to contact us (dime-support@sim.no) if you have questions about how to create entities. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // misc defines #define TMP_BUFFER_LEN 1024 /*! \fn dimeEntity *dimeEntity::copy(dimeModel * const model) const = 0 Must be implemented by subclasses to return a copy of the entity. \a model is the model the new entity should belong to. */ /*! \fn const dimeLayer *dimeEntity::getLayer() const Returns the layer of this entity. */ /*! \fn const char *dimeEntity::getEntityName() const = 0 Must be implemented by subclasses to return the entity name; e.g. POLYLINE, 3DFACE, etc. */ /*! \fn void dimeEntity::setColorNumber(const int16 c) Sets the color number for this entity. Zero indicates the BYBLOCK (floating) color. 256 indicates BYLAYER. A negative value indicates that the layer is turned off. */ /*! \fn int16 dimeEntity::getColorNumber() const Returns the color number for this entity. \sa dimeEntity::setColorNumber() */ /*! \fn void dimeEntity::print() const */ /*! Constructor. */ dimeEntity::dimeEntity() : dimeRecordHolder(0), entityFlags(0), colorNumber(256) { this->layer = dimeLayer::getDefaultLayer(); } /*! Destructor. */ dimeEntity::~dimeEntity() { } /*! Copies the common and unclassified records. */ bool dimeEntity::copyRecords(dimeEntity * const entity, dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); bool ok = dimeRecordHolder::copyRecords(entity, memh); if (ok && this->layer) { entity->layer = model->addLayer(this->layer->getLayerName()); if (!entity->layer) ok = false; } entity->entityFlags = this->entityFlags; entity->colorNumber = this->colorNumber; return ok; } /*! Returns if this entity is marked as deleted or not. \sa dimeEntity::setDeleted(). */ bool dimeEntity::isDeleted() const { return this->entityFlags & FLAG_DELETED; } /*! Sets the deleted state of this entity to \a onOff. \sa dimeEntity::isDeleted(). */ void dimeEntity::setDeleted(const bool onOff) { if (onOff) { this->entityFlags |= FLAG_DELETED; } else { this->entityFlags &= ~FLAG_DELETED; } } /*! Useful for developers (at least for me :-). \sa dimeEntity::setTagged() */ bool dimeEntity::isTagged() const { return this->entityFlags & FLAG_TAGGED ? true : false; } /*! Useful for developers. \sa dimeEntity::isTagged() */ void dimeEntity::setTagged(const bool onOff) { if (onOff) { this->entityFlags |= FLAG_TAGGED; } else { this->entityFlags &= ~FLAG_TAGGED; } } //! bool dimeEntity::write(dimeOutput * const file) { return dimeRecordHolder::write(file); } /*! Static function which creates an entity based on its name. */ dimeEntity * dimeEntity::createEntity(const char * const name, dimeMemHandler * const memhandler) { #ifndef NDEBUG //fprintf(stderr,"Entity: %s\n", name); #endif // // TODO: optimize // // right now, I just check for the most common (for 3D gfx) // entities first. // // Could be quite easily solved by using a hash list with // pointers to static methods that returns a new instance // of the correct type. // if (!strcmp(name, "3DFACE")) return new(memhandler) dime3DFace; if (!strcmp(name, "VERTEX")) return new(memhandler) dimeVertex; if (!strcmp(name, "POLYLINE")) return new(memhandler) dimePolyline; if (!strcmp(name, "LINE")) return new(memhandler) dimeLine; if (!strcmp(name, "INSERT")) return new(memhandler) dimeInsert; if (!strcmp(name, "BLOCK")) return new(memhandler) dimeBlock(memhandler); if (!strcmp(name, "SOLID")) return new(memhandler) dimeSolid; if (!strcmp(name, "TRACE")) return new(memhandler) dimeTrace; if (!strcmp(name, "POINT")) return new(memhandler) dimePoint; if (!strcmp(name, "CIRCLE")) return new(memhandler) dimeCircle; if (!strcmp(name, "LWPOLYLINE")) return new(memhandler) dimeLWPolyline; if (!strcmp(name, "SPLINE")) return new(memhandler) dimeSpline; if (!strcmp(name, "ELLIPSE")) return new(memhandler) dimeEllipse; if (!strcmp(name, "ARC")) return new(memhandler) dimeArc; return new(memhandler) dimeUnknownEntity(name, memhandler); } /*! Static function that reads all entities until an entity of type \a stopat is found. Returns \e true if all entities were read OK. When reading stops, the group code 0 and the entity name (\a stopat) will already have been read. */ bool dimeEntity::readEntities(dimeInput * const file, dimeArray &array, const char * const stopat) { int32 groupcode; const char *string; bool ok = true; dimeEntity *entity = NULL; dimeMemHandler *memhandler = file->getMemHandler(); while (true) { if (!file->readGroupCode(groupcode) || groupcode != 0) { fprintf(stderr,"Error reading groupcode: %d\n", groupcode); ok = false; break; } string = file->readString(); if (!strcmp(string, stopat)) break; entity = dimeEntity::createEntity(string, memhandler); if (entity == NULL) { fprintf(stderr,"error creating entity: %s\n", string); ok = false; break; } if (!entity->read(file)) { fprintf(stderr,"error reading entity: %s.\n", string); ok = false; break; } array.append(entity); } return ok; } /*! Static function which copies all non-deleted entites from \a array of length \a nument into a new array. Will return the number of copied entities in \a nument. This function returns \e NULL either when out of memory, or if there was no non-deleted entities. */ dimeEntity ** dimeEntity::copyEntityArray(const dimeEntity *const*const array, int &nument, dimeModel * const model) { int i; int num = nument; dimeMemHandler *memh = model->getMemHandler(); nument = 0; for (i = 0; i < num; i++) { if (!array[i]->isDeleted()) nument++; } if (nument == 0) return NULL; dimeEntity **newarr = ARRAY_NEW(memh, dimeEntity*, nument); bool ok = newarr != NULL; if (ok) { int cnt = 0; for (i = 0; i < num && ok; i++) { if (!array[i]->isDeleted()) { newarr[cnt] = array[i]->copy(model); if (newarr[cnt] == NULL) { // sim_trace("failed to copy entity: %d\n", array[i]->typeId()); } ok = newarr[cnt++] != NULL; } } if (!ok && !memh) { // free memory for (i = 0; i < cnt; i++) delete newarr[i]; delete [] newarr; } } return ok ? newarr : (dimeEntity**)NULL; } /*! Static function which copies all non-deleted entites from \a array of length \a nument into \a destarray. */ bool dimeEntity::copyEntityArray(const dimeEntity *const*const array, const int nument, dimeModel * const model, dimeArray &destarray) { int i; // dimeMemHandler *memh = model->getMemHandler(); int num = 0; for (i = 0; i < nument; i++) { if (!array[i]->isDeleted()) num++; } if (num == 0) { destarray.setCount(0); return true; } destarray.makeEmpty(num); for (i = 0; i < nument; i++) { if (!array[i]->isDeleted()) { dimeEntity *entity = array[i]->copy(model); if (entity == NULL) { destarray.setCount(0); return false; } destarray.append(entity); } } return true; } /*! Convenience function which returns the layer name of this entity. */ const char * dimeEntity::getLayerName() const { if (this->layer) return this->layer->getLayerName(); return NULL; } /*! Used to find all forward references. \sa dimeEntitiesSection::fixReferences(). */ void dimeEntity::fixReferences(dimeModel * const) { } #define ARBBOUND 0.015625 /* aka "1/64" */ /*! Will return an "arbitrary" axis, based on \a givenaxis. Based on code from DXF Parser R10, from Autodesk Inc. Is used to find the x-axis bases on the given z-axis. \sa dimeEntity::generateUCS() */ void dimeEntity::arbitraryAxis(const dimeVec3f &givenaxis, dimeVec3f &newaxis) { dimeVec3f yaxis(0.0, 1.0, 0.0); dimeVec3f zaxis(0.0, 0.0, 1.0); if (fabs(givenaxis[0]) < ARBBOUND && fabs(givenaxis[1]) < ARBBOUND) newaxis = yaxis.cross(givenaxis); else newaxis = zaxis.cross(givenaxis); newaxis.normalize(); } /*! Will generate a coordinate system, based on \a givenaxis, which will be the z-axis in the new coordinate system. \sa dimeEntity::arbitraryAxis() */ void dimeEntity::generateUCS(const dimeVec3f &givenaxis, dimeMatrix &m) { dimeVec3f newaxis; dimeEntity::arbitraryAxis(givenaxis, newaxis); newaxis.normalize(); dimeVec3f yaxis = givenaxis.cross(newaxis); yaxis.normalize(); m.setRotate(newaxis, yaxis, givenaxis); } //! int dimeEntity::countRecords() const { int cnt = 0; if (this->layer) cnt++; if (this->colorNumber != 256) cnt++; return cnt + dimeRecordHolder::countRecords(); } /*! The traversal function used when dimeModel::traverseEntities() is called. Most entities use this default method, but some entities (INSERT, BUILD) will need to overload it. */ bool dimeEntity::traverse(const dimeState * const state, dimeCallback callback, void *userdata) { if (this->isDeleted()) return true; return callback(state, this, userdata); } /*! A special convenience function, included for your pleasure. Enables the user to ignore the type of entity, and just call this method when extracting geometry. Very useful for 3D viewers that need DXF support. Check out the dxf2vrml directory for an example on how to convert a DXF file to VRML. Should be overloaded by all subclasses that have geometry, default function returns no geometry. Don't forget to transform vertices by the current transformation matrix if used in a callback from dimeEntity::traverse(). If there are coordinates, but no indices, this means running indices for the entire vertex array. Different faces and/or line segments are separated by a \e -1 in the indices array, just as in VRML files. If \a thickness != 0.0, the data should, before transformation, be extruded by that length along the extrusion direction. Hence, a point becomes a line, a line becomes a quad, and a polygon becomes an object with a volume. If \a thickness == 0.0 and \a extrusionDir != (0,0,1) all the vertices should be transformed by a matrix that can be created using dimeEntity::generateUCS(). If you are using dimeModel::traverseEntities() to extract the geometry, simply right-multiply the UCS matrix with the matrix found in dimeState to get the correct transformation. */ dimeEntity::GeometryType dimeEntity::extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness) { extrusionDir = dimeVec3f(0,0,1); verts.setCount(0); indices.setCount(0); thickness = 0.0f; return NONE; } //! bool dimeEntity::isOfType(const int thetypeid) const { return thetypeid == dimeEntityType || dimeRecordHolder::isOfType(thetypeid); } /*! Reads an entity from \a in. Can be overloaded by subclasses, but in most cases this will not be necessary. \sa dimeEntity::handleRecord(). */ bool dimeEntity::read(dimeInput * const file) { // a little hack to avoid storing a useless extra pointer in the class. // this->layer is used as a temporary char * pointer which will // be used in handleRecord(). // could have used a static buffer, but then the library would not // not have been thread safe anymore. // As an extra precaution, a flag is set in this->entityFlags to signal to // handleRecord() that it is safe to treat this->layer as a char * // pointer. char tmpbuffer[TMP_BUFFER_LEN+1]; tmpbuffer[0] = 0; const dimeLayer *tmplayer = this->layer; this->layer = (const dimeLayer*) tmpbuffer; this->entityFlags |= FLAG_TMP_BUFFER_SET; bool ok = dimeRecordHolder::read(file); // handleRecord() will change tmpbuffer... this->entityFlags &= ~FLAG_TMP_BUFFER_SET; this->layer = tmplayer; // reset pointer and flag immediately if (ok) { // this is a hack. See handleRecord() to understand what happens if (tmpbuffer[0] != 0) { this->layer = file->getModel()->addLayer(tmpbuffer); } else this->layer = dimeLayer::getDefaultLayer(); } return ok; } /*! Sets the layer for this entity. This will change the record with group code 8. If \a layer equals \e NULL, the layer will be set to the default layer. */ void dimeEntity::setLayer(const dimeLayer * const layer) { if (layer == NULL) this->layer = dimeLayer::getDefaultLayer(); else this->layer = layer; } //! bool dimeEntity::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { if (groupcode == 8) { // Should only arrive her during read(). this->layer is then used // as a temporary storage for the character string. // Checking flag just to be safe... if (this->entityFlags & FLAG_TMP_BUFFER_SET) { strncpy((char*)this->layer, param.string_data, TMP_BUFFER_LEN); } else assert(0); return true; } else if (groupcode == 62) { this->entityFlags |= FLAG_COLOR_NUMBER; this->colorNumber = param.int16_data; return true; } else if (groupcode == 67) { this->entityFlags |= FLAG_PAPERSPACE; return true; } else if (groupcode == 100) { this->entityFlags |= FLAG_SUBCLASS_MARKER; if (strcmp(param.string_data, "AcDbEntity") != 0) { return false; // store in record-holder } return true; } else if (groupcode == 102) { // ignore these, don't store return true; } else if (groupcode == 330) { this->entityFlags |= FLAG_ACAD_REACTORS; return false; // store in recordholder } else if (groupcode == 360) { this->entityFlags |= FLAG_ACAD_XDICTIONARY; return false; // store in recordholder } else if (groupcode == 5) { this->entityFlags |= FLAG_HANDLE; return false; // store in recordholder } else if (groupcode == 6) { this->entityFlags |= FLAG_LINETYPE; return false; // store in recordholder } return false; } //! bool dimeEntity::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch (groupcode) { case 8: param.string_data = this->layer->getLayerName(); return true; case 62: param.int16_data = this->colorNumber; return true; } return dimeRecordHolder::getRecord(groupcode, param, index); } // // FIXME: getRecord // /*! Writes the group code 0, layer name, and some other stuff. */ bool dimeEntity::preWrite(dimeOutput * const file) { file->writeGroupCode(0); bool ret = file->writeString(this->getEntityName()) ; // write stupid handle? if (this->entityFlags & FLAG_HANDLE) { dimeParam param; if (this->getRecord(5, param)) { file->writeGroupCode(5); file->writeString(param.string_data); } } #if 1 if (this->entityFlags & FLAG_ACAD_REACTORS) { file->writeGroupCode(102); file->writeString("{ACAD_REACTORS"); dimeParam param; if (this->getRecord(330, param)) { file->writeGroupCode(330); file->writeString(param.string_data); } file->writeGroupCode(102); file->writeString("}"); } if (this->entityFlags & FLAG_ACAD_XDICTIONARY) { file->writeGroupCode(102); file->writeString("{ACAD_XDICTIONARY"); dimeParam param; if (this->getRecord(360, param)) { file->writeGroupCode(360); file->writeString(param.string_data); } file->writeGroupCode(102); file->writeString("}"); } #endif // write stupid subclass marker data? if (this->entityFlags & FLAG_SUBCLASS_MARKER) { file->writeGroupCode(100); file->writeString("AcDbEntity"); } if (this->entityFlags & FLAG_PAPERSPACE) { file->writeGroupCode(67); file->writeInt16(1); } // write layer file->writeGroupCode(8); ret = file->writeString(this->layer->getLayerName()); // write linetype if (this->entityFlags & FLAG_LINETYPE) { dimeParam param; if (this->getRecord(6, param)) { file->writeGroupCode(6); file->writeString(param.string_data); } } // write color number if (this->colorNumber != 256) { file->writeGroupCode(62); ret = file->writeInt16(this->colorNumber); } #if 1 if ((this->entityFlags & FLAG_SUBCLASS_MARKER)) { dimeParam param; int idx = 0; while (this->getRecord(100, param, idx)) { file->writeGroupCode(100); file->writeString(param.string_data); idx++; } } #endif return ret; } //! bool dimeEntity::shouldWriteRecord(const int groupcode) const { switch (groupcode) { case 5: case 6: case 100: case 330: case 360: return false; default: return true; } } dime/src/entities/ExtrusionEntity.cpp0100644017777301777730000001024306776622122016623 0ustar wwwwww/**************************************************************************\ * * FILE: ExtrusionEntity.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeExtrusionEntity dime/entities/ExtrusionEntity.h \brief The dimeExtrusionEntity class is the superclass of all \e entity classes with extrusion data. */ #include #include /*! \fn void dimeExtrusionEntity::setExtrusionDir(const dimeVec3f &v) Sets the extrusion direction. Default value is \e (0,0,1). */ /*! \fn const dimeVec3f &dimeExtrusionEntity::getExtrusionDir() const Returns the extrusion direction. */ /*! \fn void dimeExtrusionEntity::setThickness(const dxfdouble val) Sets the extrusion thickness. Default value is \e 0.0. */ /*! \fn dxfdouble dimeExtrusionEntity::getThickness() const Returns the extrusion thickness. */ /*! Constructor. Will initialize the extrusion direction to \e (0,0,1) and the thickness to \e 0.0. */ dimeExtrusionEntity::dimeExtrusionEntity() : extrusionDir(0,0,1), thickness( 0.0 ) { } /*! Will write the extrusion and thickness records. */ bool dimeExtrusionEntity::writeExtrusionData(dimeOutput * const file) { if (this->thickness != 0.0) { file->writeGroupCode(39); file->writeDouble(this->thickness); } if (this->extrusionDir != dimeVec3f(0,0,1)) { file->writeGroupCode(210); file->writeDouble(this->extrusionDir[0]); file->writeGroupCode(220); file->writeDouble(this->extrusionDir[1]); file->writeGroupCode(230); file->writeDouble(this->extrusionDir[2]); } return true; } //! int dimeExtrusionEntity::typeId() const { return dimeBase::dimeExtrusionEntityType; } //! bool dimeExtrusionEntity::isOfType(const int thetypeid) const { return thetypeid == dimeExtrusionEntityType || dimeEntity::isOfType(thetypeid); } //! int dimeExtrusionEntity::countRecords() const { int cnt = 0; if (this->thickness != 0.0) cnt++; if (this->extrusionDir != dimeVec3f(0,0,1)) cnt+=3; return cnt + dimeEntity::countRecords(); } /*! Copies all extrusion data from \a entity. */ void dimeExtrusionEntity::copyExtrusionData(const dimeExtrusionEntity * const entity) { this->extrusionDir = entity->extrusionDir; this->thickness = entity->thickness; } //! bool dimeExtrusionEntity::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 39: this->thickness = param.double_data; return true; case 210: case 220: case 230: this->extrusionDir[(groupcode-210)/10] = param.double_data; return true; } return dimeEntity::handleRecord(groupcode, param, memhandler); } //! bool dimeExtrusionEntity::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 39: param.double_data = this->thickness; return true; case 210: case 220: case 230: param.double_data = this->extrusionDir[(groupcode-210)/10]; return true; } return dimeEntity::getRecord(groupcode, param, index); } dime/src/entities/FaceEntity.cpp0100644017777301777730000001340407142512101015442 0ustar wwwwww/**************************************************************************\ * * FILE: FaceEntity.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeFaceEntity dime/entities/FaceEntity.h \brief The dimeFaceEntity class is an abstract class that handles one-face \e entity classes. */ #include #include dimeFaceEntity::dimeFaceEntity() { for (int i = 0; i < 4; i++) this->coords[i].setValue(0.0, 0.0, 0.0); } /*! Sets vertices to create a triangle. */ void dimeFaceEntity::setTriangle(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2) { this->coords[0] = v0; this->coords[1] = v1; this->coords[2] = coords[3] = v2; } /*! Sets vertices to create a quad. */ void dimeFaceEntity::setQuad(const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeVec3f &v3) { this->coords[0] = v0; this->coords[1] = v1; this->coords[2] = v2; this->coords[3] = v3; } /*! \fn const dimeVec3f &dimeFaceEntity::getVertex(const int idx) const Returns vertex nr \a idx. */ /*! Returns all four vertices. */ void dimeFaceEntity::getVertices(dimeVec3f &v0, dimeVec3f &v1, dimeVec3f &v2, dimeVec3f &v3) const { v0 = this->coords[0]; v1 = this->coords[1]; v2 = this->coords[2]; v3 = this->coords[3]; } /*! Copies the coordinates from \a entity. */ void dimeFaceEntity::copyCoords(const dimeFaceEntity * const entity) { this->coords[0] = entity->coords[0]; this->coords[1] = entity->coords[1]; this->coords[2] = entity->coords[2]; this->coords[3] = entity->coords[3]; } //! int dimeFaceEntity::typeId() const { return dimeFaceEntityType; } //! bool dimeFaceEntity::isOfType(const int thetypeid) const { return thetypeid == dimeFaceEntityType || dimeEntity::isOfType(thetypeid); } //! int dimeFaceEntity::countRecords() const { return 12 + dimeEntity::countRecords(); } /*! Will write the coordinate data to \a out. Should be called by subclasses at some time during write. */ bool dimeFaceEntity::writeCoords(dimeOutput * const file) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { file->writeGroupCode((j+1)*10+i); file->writeDouble(coords[i][j]); } } return true; // bah, who cares... } //! bool dimeFaceEntity::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { if (groupcode == 10 || groupcode == 11 || groupcode == 12 || groupcode == 13 || groupcode == 20 || groupcode == 21 || groupcode == 22 || groupcode == 23 || groupcode == 30 || groupcode == 31 || groupcode == 32 || groupcode == 33) { this->coords[groupcode % 10][groupcode / 10 - 1] = param.double_data; return true; } return dimeEntity::handleRecord(groupcode, param, memhandler); } //! bool dimeFaceEntity::getRecord(const int groupcode, dimeParam ¶m, const int index) const { if (groupcode == 10 || groupcode == 11 || groupcode == 12 || groupcode == 13 || groupcode == 20 || groupcode == 21 || groupcode == 22 || groupcode == 23 || groupcode == 30 || groupcode == 31 || groupcode == 32 || groupcode == 33) { param.double_data = this->coords[groupcode % 10][groupcode / 10 - 1]; return true; } return dimeEntity::getRecord(groupcode, param, index); } //! dimeEntity::GeometryType dimeFaceEntity::extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness) { verts.setCount(0); indices.setCount(0); verts.append(this->coords[0]); verts.append(this->coords[1]); if (this->isQuad()) { if (this->swapQuadCoords()) { verts.append(this->coords[3]); verts.append(this->coords[2]); } else { verts.append(this->coords[2]); verts.append(this->coords[3]); } } else { verts.append(this->coords[2]); } thickness = getThickness(); getExtrusionDir(extrusionDir); return dimeEntity::POLYGONS; } /*! Default method return 0.0. Should be overloaded if this is not correct for all cases. */ dxfdouble dimeFaceEntity::getThickness() const { return 0.0f; } /*! Default method returns (0,0,1). Should be overloaded if this is not correct for all cases. */ void dimeFaceEntity::getExtrusionDir(dimeVec3f &ed) const { ed.setValue(0,0,1); } /*! Default function returns \e false. If \e true is returned, the last two vertices will be swapped before returning geometry in extractGeometry(). */ bool dimeFaceEntity::swapQuadCoords() const { return false; } dime/src/entities/Insert.cpp0100644017777301777730000003115007430200664014661 0ustar wwwwww/**************************************************************************\ * * FILE: Insert.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeInsert dime/entities/Insert.h \brief The dimeInsert class handles an INSERT \e entity. */ #include #include #include #include #include #include #include #include static char entityName[] = "INSERT"; /*! Constructor. */ dimeInsert::dimeInsert() { this->attributesFollow = 0; this->blockName = NULL; this->insertionPoint.setValue(0, 0, 0); this->extrusionDir.setValue(0,0,1); this->scale.setValue(1, 1, 1); this->rotAngle = 0.0; this->entities = NULL; this->numEntities = 0; this->seqend = NULL; this->block = NULL; this->rowCount = 1; this->columnCount = 1; this->rowSpacing = 0.0; this->columnSpacing = 0.0; } /*! Destructor. */ dimeInsert::~dimeInsert() { delete this->seqend; for (int i = 0; i < this->numEntities; i++) delete this->entities[i]; delete [] this->entities; } //! dimeEntity * dimeInsert::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeInsert *inst = new(memh) dimeInsert; bool ok = true; if (this->numEntities) { int realnum = this->numEntities; inst->entities = dimeEntity::copyEntityArray((const dimeEntity**) this->entities, realnum, model); if (realnum > 0 && inst->entities == NULL) { ok = false; } else inst->numEntities = realnum; } inst->attributesFollow = this->attributesFollow; inst->insertionPoint = this->insertionPoint; inst->scale = this->scale; inst->rotAngle = this->rotAngle; inst->rowCount = this->rowCount; inst->columnCount = this->columnCount; inst->rowSpacing = this->rowSpacing; inst->columnSpacing = this->columnSpacing; inst->extrusionDir = this->extrusionDir; if (ok && this->seqend) { inst->seqend = this->seqend->copy(model); if (!inst->seqend) ok = false; } if (ok && this->blockName) { inst->blockName = model->findRefStringPtr(this->blockName); if (inst->blockName) { inst->block = (dimeBlock*) model->findReference(inst->blockName); } else { // probably a forward reference, fixed during fixReferences() inst->blockName = (char*)model->addReference(this->blockName, NULL); inst->block = NULL; } } if (!ok || !this->copyRecords(inst, model)) { if (!memh) delete inst; // delete if allocated on heap inst = NULL; // just return NULL } return inst; } /*! Reads an INSERT entity. */ bool dimeInsert::read(dimeInput * const file) { // see handleRecord() to understand what is done with // blockName here... Ugly code, but who cares :-) this->blockName = NULL; bool ret = dimeEntity::read(file); if (ret && this->blockName) { char *tmp = (char*)this->blockName; this->blockName = file->getModel()->findRefStringPtr(tmp); if (this->blockName) { this->block = (dimeBlock*)file->getModel()->findReference(tmp); } else { // probably a forward reference, just add as reference this->blockName = file->getModel()->addReference(tmp, NULL); } delete [] tmp; } if (ret && this->attributesFollow) { dimeMemHandler *memhandler = file->getMemHandler(); // read following entities. dimeArray array; ret = dimeEntity::readEntities(file, array, "SEQEND"); if (ret) { this->seqend = dimeEntity::createEntity("SEQEND", memhandler); // read the SEQEND entity if (!this->seqend || !this->seqend->read(file)) ret = false; } int n = array.count(); if (ret && n) { this->entities = ARRAY_NEW(memhandler, dimeEntity*, n); if (this->entities) { this->numEntities = n; for (int i = 0; i < n; i++) { this->entities[i] = array[i]; } } else ret = false; } } return ret; } /*! Writes an INSERT entity. */ bool dimeInsert::write(dimeOutput * const file) { this->preWrite(file); if (this->attributesFollow) { file->writeGroupCode(66); file->writeInt16(1); } file->writeGroupCode(2); file->writeString(this->blockName); file->writeGroupCode(10); file->writeDouble(insertionPoint[0]); file->writeGroupCode(20); file->writeDouble(insertionPoint[1]); file->writeGroupCode(30); file->writeDouble(insertionPoint[2]); if (this->scale != dimeVec3f(1, 1, 1)) { file->writeGroupCode(41); file->writeDouble(this->scale[0]); file->writeGroupCode(42); file->writeDouble(this->scale[1]); file->writeGroupCode(43); file->writeDouble(this->scale[2]); } if (this->rotAngle != 0.0) { file->writeGroupCode(50); file->writeDouble(this->rotAngle); } if (this->columnCount != 1) { file->writeGroupCode(70); file->writeInt16(this->columnCount); } if (this->rowCount != 1) { file->writeGroupCode(71); #ifdef DIME_FIXBIG file->writeInt32(this->rowCount); #else file->writeInt16(this->rowCount); #endif } if (this->columnSpacing != 0.0) { file->writeGroupCode(44); file->writeDouble(this->columnSpacing); } if (this->rowSpacing != 0.0) { file->writeGroupCode(45); file->writeDouble(this->rowSpacing); } bool ret = dimeEntity::write(file); // write unknown records if (this->extrusionDir != dimeVec3f(0,0,1)) { file->writeGroupCode(210); file->writeDouble(this->extrusionDir[0]); file->writeGroupCode(220); file->writeDouble(this->extrusionDir[1]); file->writeGroupCode(230); ret = file->writeDouble(this->extrusionDir[2]); } if (this->attributesFollow && this->numEntities) { int i; for (i = 0; i < this->numEntities; i++) { if (!this->entities[i]->write(file)) break; } if (this->seqend) ret = this->seqend->write(file); else { file->writeGroupCode(0); ret = file->writeString("SEQEND"); } } return ret; } //! int dimeInsert::typeId() const { return dimeBase::dimeInsertType; } //! bool dimeInsert::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch (groupcode) { case 66: this->attributesFollow = param.int16_data; return true; case 2: { // will only arrive here during read(). Allocate a temporary buffer // to store the blockname. Will be deleted in dimeInsert::read() const char *str = param.string_data; if (str) { this->blockName = new char[strlen(str)+1]; if (this->blockName) { strcpy((char*)this->blockName, str); } } return true; } case 10: case 20: case 30: this->insertionPoint[groupcode/10-1] = param.double_data; return true; case 210: case 220: case 230: this->extrusionDir[(groupcode-210)/10] = param.double_data; return true; case 41: case 42: case 43: this->scale[groupcode-41] = param.double_data; return true; case 44: this->columnSpacing = param.double_data; return true; case 45: this->rowSpacing = param.double_data; return true; case 50: this->rotAngle = param.double_data; return true; case 70: this->columnCount = param.int16_data; return true; case 71: #ifdef DIME_FIXBIG this->rowCount = param.int32_data; #else this->rowCount = param.int16_data; #endif return true; } return dimeEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeInsert::getEntityName() const { return entityName; } //! bool dimeInsert::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch (groupcode) { case 66: param.int16_data = this->attributesFollow; return true; case 2: param.string_data = this->blockName; return true; case 10: case 20: case 30: param.double_data = this->insertionPoint[groupcode/10-1]; return true; case 210: case 220: case 230: param.double_data = this->extrusionDir[(groupcode-210)/10]; return true; case 41: case 42: case 43: param.double_data = this->scale[groupcode-41]; return true; case 44: param.double_data = this->columnSpacing; return true; case 45: param.double_data = this->rowSpacing; return true; case 50: param.double_data = this->rotAngle; return true; case 70: param.int16_data = this->columnCount; return true; case 71: #ifdef DIME_FIXBIG param.int32_data = this->rowCount; #else param.int16_data = this->rowCount; #endif return true; } return dimeEntity::getRecord(groupcode, param, index); } //! bool dimeInsert::traverse(const dimeState * const state, dimeCallback callback, void *userdata) { dimeState newstate = *state; newstate.currentInsert = this; if (this->block && (state->getFlags() & dimeState::EXPLODE_INSERTS)) { for (int i = 0; i < this->rowCount; i++) { for (int j = 0; j < this->columnCount; j++) { dimeMatrix m = state->getMatrix(); dimeMatrix m2 = dimeMatrix::identity(); m2.setTranslate(dimeVec3f(j*this->columnSpacing, i*this->rowSpacing, 0)); m.multRight(m2); this->makeMatrix(m); newstate.setMatrix(m); if (!block->traverse(&newstate, callback, userdata)) return false; } } } else if (!this->isDeleted()) { if (!callback(state, this, userdata)) return false; } dimeMatrix m = state->getMatrix(); this->makeMatrix(m); newstate.setMatrix(m); // extract internal INSERT entities for (int i = 0; i < this->numEntities; i++) { if (!this->entities[i]->traverse(&newstate, callback, userdata)) return false; } return true; } //! void dimeInsert::fixReferences(dimeModel * const model) { if (this->block == NULL && this->blockName) { this->block = (dimeBlock*)model->findReference(this->blockName); if (this->block == NULL) { fprintf(stderr,"BLOCK %s not found!\n", blockName); } } for (int i = 0; i < this->numEntities; i++) this->entities[i]->fixReferences(model); } //! void dimeInsert::makeMatrix(dimeMatrix &m) const { if (!this->block) { m.makeIdentity(); return; } dimeMatrix m2; if (this->extrusionDir != dimeVec3f(0,0,1)) { // this block has its own coordinate system // generated from one vector (the z-vector) dimeEntity::generateUCS(this->extrusionDir, m2); m.multRight(m2); } m2.makeIdentity(); dimeVec3f tmp = this->insertionPoint; // disabled for the moment // dimeModel::fixDxfCoords(tmp); m2.setTranslate(tmp); m.multRight(m2); m2.setTransform(dimeVec3f(0,0,0), this->scale, dimeVec3f(0, 0, this->rotAngle)); m.multRight(m2); m2.makeIdentity(); m2.setTranslate(-block->getBasePoint()); m.multRight(m2); } //! int dimeInsert::countRecords() const { int cnt = 5; // header + blockName + insertionPoint if (this->attributesFollow) cnt++; if (this->scale != dimeVec3f(1.0, 1.0, 1.0)) cnt += 3; if (this->rotAngle != 0.0) cnt++; if (this->columnCount != 1) cnt++; if (this->rowCount != 1) cnt++; if (this->columnSpacing != 0.0) cnt++; if (this->rowSpacing != 0.0) cnt++; if (this->extrusionDir != dimeVec3f(0,0,1)) cnt += 3; if (this->attributesFollow && this->numEntities) { int i, n = this->numEntities; for (i = 0; i < n; i++) { cnt += this->entities[i]->countRecords(); } cnt++; // seqend } return cnt + dimeEntity::countRecords(); } /*! Sets the block for this INSERT entity. This will change the record with group code 2. */ void dimeInsert::setBlock(dimeBlock * const block) { this->block = block; this->blockName = block->getName(); } dime/src/entities/LWPolyline.cpp0100644017777301777730000002353407142512101015452 0ustar wwwwww/**************************************************************************\ * * FILE: LWPolyline.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeLWPolyline dime/entities/LWPolyline.h \brief The dimeLWPolyline class handles an LWPOLYLINE \e entity. */ #include #include #include #include #include static char entityName[] = "LWPOLYLINE"; // // FIXME: after the first vertex is found, I should make sure no more // unknown records are found. If unknown records are found, the LWPOLYLINE // will be illegal upon writing. The current code will work for releases // up to r14, but might not work for r15+ if additional per-vertex data // is added for those future file formats. // /*! Constructor. */ dimeLWPolyline::dimeLWPolyline() : constantWidth( 0.0 ), elevation( 0.0 ), flags( 0 ), numVertices( 0 ), xcoord( NULL ), ycoord( NULL ), startingWidth( NULL ), endWidth( NULL ), bulge( NULL ) { } /*! Destructor. */ dimeLWPolyline::~dimeLWPolyline() { } //! dimeEntity * dimeLWPolyline::copy(dimeModel * const model) const { dimeLWPolyline *l = new(model->getMemHandler()) dimeLWPolyline; if (!l) return NULL; dimeMemHandler *mh = model->getMemHandler(); if (!this->copyRecords(l, model)) { // check if allocated on heap. if (!mh) delete l; l = NULL; } else { const int num = this->numVertices; if (num > 0) { l->xcoord = ARRAY_NEW(mh, dxfdouble, num); l->ycoord = ARRAY_NEW(mh, dxfdouble, num); l->bulge = ARRAY_NEW(mh, dxfdouble, num); if (this->startingWidth) { l->startingWidth = ARRAY_NEW(mh, dxfdouble, num); l->endWidth = ARRAY_NEW(mh, dxfdouble, num); } for (int i = 0; i < num; i++) { l->xcoord[i] = this->xcoord[i]; l->ycoord[i] = this->ycoord[i]; l->bulge[i] = this->bulge[i]; if (this->startingWidth) { l->startingWidth[i] = this->startingWidth[i]; l->endWidth[i] = this->endWidth[i]; } } } l->flags = this->flags; l->numVertices = this->numVertices; l->constantWidth = this->constantWidth; l->elevation = this->elevation; l->copyExtrusionData(this); } return l; } //! bool dimeLWPolyline::write(dimeOutput * const file) { this->preWrite(file); bool ret = true; file->writeGroupCode(90); ret = file->writeInt16((int16)this->numVertices); if (ret && this->flags != 0) { file->writeGroupCode(70); ret = file->writeInt16(this->flags); } if (ret && this->elevation != 0.0) { file->writeGroupCode(38); ret = file->writeDouble(this->elevation); } if (ret && this->constantWidth != 0.0) { file->writeGroupCode(43); ret = file->writeDouble(this->constantWidth); } if (!ret) return false; // write extrusion data and unksnown records ret = this->writeExtrusionData(file) && dimeEntity::write(file); if (ret) { const int num = this->numVertices; for (int i = 0; ret && i < num; i++) { file->writeGroupCode(10); file->writeDouble(this->xcoord[i]); file->writeGroupCode(20); ret = file->writeDouble(this->ycoord[i]); if (ret && this->startingWidth && this->endWidth) { if (this->startingWidth[i] != 0.0) { file->writeGroupCode(40); file->writeDouble(this->startingWidth[i]); } if (this->endWidth[i] != 0.0) { file->writeGroupCode(41); ret = file->writeDouble(this->endWidth[i]); } } if (ret && this->bulge[i] != 0.0) { file->writeGroupCode(42); ret = file->writeDouble(this->bulge[i]); } } } return ret; } //! int dimeLWPolyline::typeId() const { return dimeBase::dimeLWPolylineType; } /*! Handles the callback from dimeEntity::readRecords(). */ bool dimeLWPolyline::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const mh) { switch (groupcode) { case 10: case 20: case 40: case 41: case 42: { if (this->xcoord == NULL) { // allocate arrays when first vertex is found const int num = this->numVertices; if (num <= 0) { fprintf(stderr,"LWPOLYLINE shouldn't have any vertices, but still found one!\n"); return true; // data is "handled" so... } this->xcoord = ARRAY_NEW(mh, dxfdouble, num); this->ycoord = ARRAY_NEW(mh, dxfdouble, num); this->bulge = ARRAY_NEW(mh, dxfdouble, num); if (this->constantWidth == 0.0) { this->startingWidth = ARRAY_NEW(mh, dxfdouble, num); this->endWidth = ARRAY_NEW(mh, dxfdouble, num); } // must initialize arrays to default values for (int i = 0; i < num; i++) { this->bulge[i] = 0.0; if (this->startingWidth) { this->startingWidth[i] = 0.0; this->endWidth[i] = 0.0; } } this->tmpCounter = 0; // reset counters before going any further this->tmpFlags = 0; } int flagmask; dxfdouble *arrayptr; switch (groupcode) { case 10: flagmask = 0x1; arrayptr = this->xcoord; break; case 20: flagmask = 0x2; arrayptr = this->ycoord; break; case 40: flagmask = 0x4; arrayptr = this->startingWidth; break; case 41: flagmask = 0x8; arrayptr = this->endWidth; break; case 42: flagmask = 0x10; arrayptr = this->bulge; break; default: flagmask = 0; arrayptr = NULL; assert(0); break; } if (this->tmpFlags & flagmask) { this->tmpFlags = 0; this->tmpCounter++; } if (this->tmpCounter >= this->numVertices) { fprintf(stderr,"too many vertices in LWPOLYLINE!\n"); return true; } if (arrayptr == NULL) { fprintf(stderr,"illegal data found in LWPOLYLINE.\n"); return true; } this->tmpFlags |= flagmask; arrayptr[this->tmpCounter] = param.double_data; return true; } case 38: this->elevation = param.double_data; return true; case 43: this->constantWidth = param.double_data; return true; case 70: this->flags = param.int16_data; return true; case 90: this->numVertices = param.int32_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, mh); } //! const char * dimeLWPolyline::getEntityName() const { return entityName; } //! bool dimeLWPolyline::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 10: if (this->xcoord && index >= 0 && index < this->numVertices) { param.double_data = this->xcoord[index]; return true; } return false; case 20: if (this->ycoord && index >= 0 && index < this->numVertices) { param.double_data = this->ycoord[index]; return true; } return false; case 40: if (this->startingWidth && index >= 0 && index < this->numVertices) { param.double_data = this->startingWidth[index]; return true; } return false; case 41: if (this->endWidth && index >= 0 && index < this->numVertices) { param.double_data = this->endWidth[index]; return true; } return false; case 42: if (this->bulge && index >= 0 && index < this->numVertices) { param.double_data = this->bulge[index]; return true; } return false; case 38: param.double_data = this->elevation; return true; case 43: param.double_data = this->constantWidth; return true; case 70: param.int16_data = this->flags ; return true; case 90: param.int32_data = this->numVertices; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } //! void dimeLWPolyline::print() const { fprintf(stderr,"LWPOLYLINE:\n"); for (int i = 0; i < this->numVertices; i++) { fprintf(stderr,"coord: %f %f\n", xcoord[i], ycoord[i]); } } //! dimeEntity::GeometryType dimeLWPolyline::extractGeometry(dimeArray &verts, dimeArray &/*indices*/, dimeVec3f &extrusionDir, dxfdouble &thickness) { thickness = this->thickness; extrusionDir = this->extrusionDir; const int num = this->numVertices; for (int i = 0; i < num; i++) { verts.append(dimeVec3f(this->xcoord[i], this->ycoord[i], this->elevation)); } // is POLYLINE closed? if (this->flags & 1) { verts.append(dimeVec3f(this->xcoord[0], this->ycoord[0], this->elevation)); } return dimeEntity::LINES; } //! int dimeLWPolyline::countRecords() const { int cnt = 2; // header + numVertices if (this->elevation != 0.0) cnt++; if (this->constantWidth != 0.0) cnt++; if (this->flags != 0) cnt++; cnt += this->numVertices * 2; // x and y coordinates // count optional per-vertex records for (int i = 0; i < this->numVertices; i++) { if (this->bulge[i] != 0.0) cnt++; if (this->startingWidth && this->startingWidth[i] != 0.0) cnt++; if (this->endWidth && this->endWidth[i] != 0.0) cnt++; } return cnt + dimeExtrusionEntity::countRecords(); } dime/src/entities/Line.cpp0100644017777301777730000000775307142512101014310 0ustar wwwwww/**************************************************************************\ * * FILE: Line.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeLine dime/entities/Line.h \brief The dimeLine class handles a LINE \e entity. */ #include #include #include #include #include static char entityName[] = "LINE"; /*! Constructor. */ dimeLine::dimeLine() { coords[0].setValue(0,0,0); coords[1].setValue(0,0,0); } //! dimeEntity * dimeLine::copy(dimeModel * const model) const { dimeLine *l = new(model->getMemHandler()) dimeLine; if (!l) return NULL; for (int i = 0; i < 2; i++) l->coords[i] = this->coords[i]; if (!this->copyRecords(l, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete l; l = NULL; } else { l->copyExtrusionData(this); } return l; } /*! Writes a \e Line entity. */ bool dimeLine::write(dimeOutput * const file) { this->preWrite(file); for (int i = 0; i < 2; i++) { for (int j = 0; j < 3; j++) { file->writeGroupCode((j+1)*10+i); file->writeDouble(this->coords[i][j]); } } return this->writeExtrusionData(file) && dimeEntity::write(file); } //! int dimeLine::typeId() const { return dimeBase::dimeLineType; } /*! Handles the callback from dimeEntity::readRecords(). */ bool dimeLine::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 10: case 20: case 30: case 11: case 21: case 31: this->coords[groupcode % 10][groupcode / 10 - 1] = param.double_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeLine::getEntityName() const { return entityName; } //! bool dimeLine::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 10: case 20: case 30: case 11: case 21: case 31: param.double_data = this->coords[groupcode % 10][groupcode / 10 - 1]; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } //! void dimeLine::print() const { fprintf(stderr,"LINE:\n"); for (int i = 0; i < 2; i++) { fprintf(stderr,"coord: %f %f %f\n", coords[i][0], coords[i][1], coords[i][2]); } } //! dimeEntity::GeometryType dimeLine::extractGeometry(dimeArray &verts, dimeArray &/*indices*/, dimeVec3f &extrusionDir, dxfdouble &thickness) { thickness = this->thickness; extrusionDir = this->extrusionDir; verts.append(coords[0]); verts.append(coords[1]); return dimeEntity::LINES; } //! int dimeLine::countRecords() const { int cnt = 1; // header cnt += 6; // coordinates return cnt + dimeExtrusionEntity::countRecords(); } dime/src/entities/Makefile.am0100644017777301777730000000475007402704623014756 0ustar wwwwww## Process this file with automake to generate Makefile.in. LIBS = INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC noinst_LIBRARIES = entities.lst else noinst_LTLIBRARIES = libentities.la endif ## All source files used when building this submodule, including all ## headers. EntitiesSources = \ 3DFace.cpp 3DFace.h \ Arc.cpp Arc.h \ Block.cpp Block.h \ Circle.cpp Circle.h \ Ellipse.cpp Ellipse.h \ Entity.cpp Entity.h \ ExtrusionEntity.cpp ExtrusionEntity.h \ FaceEntity.cpp FaceEntity.h \ Insert.cpp Insert.h \ LWPolyline.cpp LWPolyline.h \ Line.cpp Line.h \ Point.cpp Point.h \ Polyline.cpp Polyline.h \ Solid.cpp Solid.h \ Spline.cpp Spline.h \ Trace.cpp Trace.h \ UnknownEntity.cpp UnknownEntity.h \ Vertex.cpp Vertex.h libentities_la_SOURCES = \ $(EntitiesSources) entities_lst_SOURCES = \ $(EntitiesSources) entities.lst: Makefile $(entities_lst_OBJECTS) @echo "Linking entities.lst..."; \ rm -f $@; \ for i in $(entities_lst_OBJECTS); do echo $$i >>$@; done ## Installation information. libentitiesincdir = $(includedir)/dime/entities libentitiesinc_HEADERS = \ ../../include/dime/entities/3DFace.h \ ../../include/dime/entities/Arc.h \ ../../include/dime/entities/Block.h \ ../../include/dime/entities/Circle.h \ ../../include/dime/entities/Ellipse.h \ ../../include/dime/entities/Entity.h \ ../../include/dime/entities/ExtrusionEntity.h \ ../../include/dime/entities/FaceEntity.h \ ../../include/dime/entities/Insert.h \ ../../include/dime/entities/LWPolyline.h \ ../../include/dime/entities/Line.h \ ../../include/dime/entities/Point.h \ ../../include/dime/entities/Polyline.h \ ../../include/dime/entities/Solid.h \ ../../include/dime/entities/Spline.h \ ../../include/dime/entities/Trace.h \ ../../include/dime/entities/UnknownEntity.h \ ../../include/dime/entities/Vertex.h install-libentitiesincHEADERS: $(libentitiesinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libentitiesincdir) @list='$(libentitiesinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libentitiesincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libentitiesincdir)/$$f; \ done uninstall-libentitiesincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libentitiesinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libentitiesincdir)/$$f"; \ rm -f $(DESTDIR)$(libentitiesincdir)/$$f; \ done dime/src/entities/Makefile.in0100644017777301777730000004100607643247732014774 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ LIBS = INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = entities.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libentities.la EntitiesSources = \ 3DFace.cpp 3DFace.h \ Arc.cpp Arc.h \ Block.cpp Block.h \ Circle.cpp Circle.h \ Ellipse.cpp Ellipse.h \ Entity.cpp Entity.h \ ExtrusionEntity.cpp ExtrusionEntity.h \ FaceEntity.cpp FaceEntity.h \ Insert.cpp Insert.h \ LWPolyline.cpp LWPolyline.h \ Line.cpp Line.h \ Point.cpp Point.h \ Polyline.cpp Polyline.h \ Solid.cpp Solid.h \ Spline.cpp Spline.h \ Trace.cpp Trace.h \ UnknownEntity.cpp UnknownEntity.h \ Vertex.cpp Vertex.h libentities_la_SOURCES = \ $(EntitiesSources) entities_lst_SOURCES = \ $(EntitiesSources) libentitiesincdir = $(includedir)/dime/entities libentitiesinc_HEADERS = \ ../../include/dime/entities/3DFace.h \ ../../include/dime/entities/Arc.h \ ../../include/dime/entities/Block.h \ ../../include/dime/entities/Circle.h \ ../../include/dime/entities/Ellipse.h \ ../../include/dime/entities/Entity.h \ ../../include/dime/entities/ExtrusionEntity.h \ ../../include/dime/entities/FaceEntity.h \ ../../include/dime/entities/Insert.h \ ../../include/dime/entities/LWPolyline.h \ ../../include/dime/entities/Line.h \ ../../include/dime/entities/Point.h \ ../../include/dime/entities/Polyline.h \ ../../include/dime/entities/Solid.h \ ../../include/dime/entities/Spline.h \ ../../include/dime/entities/Trace.h \ ../../include/dime/entities/UnknownEntity.h \ ../../include/dime/entities/Vertex.h subdir = src/entities mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) entities_lst_AR = $(AR) cru entities_lst_LIBADD = am_entities_lst_OBJECTS = 3DFace.$(OBJEXT) Arc.$(OBJEXT) Block.$(OBJEXT) \ Circle.$(OBJEXT) Ellipse.$(OBJEXT) Entity.$(OBJEXT) \ ExtrusionEntity.$(OBJEXT) FaceEntity.$(OBJEXT) Insert.$(OBJEXT) \ LWPolyline.$(OBJEXT) Line.$(OBJEXT) Point.$(OBJEXT) \ Polyline.$(OBJEXT) Solid.$(OBJEXT) Spline.$(OBJEXT) \ Trace.$(OBJEXT) UnknownEntity.$(OBJEXT) Vertex.$(OBJEXT) entities_lst_OBJECTS = $(am_entities_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libentities_la_LDFLAGS = libentities_la_LIBADD = am_libentities_la_OBJECTS = 3DFace.lo Arc.lo Block.lo Circle.lo \ Ellipse.lo Entity.lo ExtrusionEntity.lo FaceEntity.lo Insert.lo \ LWPolyline.lo Line.lo Point.lo Polyline.lo Solid.lo Spline.lo \ Trace.lo UnknownEntity.lo Vertex.lo libentities_la_OBJECTS = $(am_libentities_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/3DFace.Plo $(DEPDIR)/3DFace.Po \ @AMDEP_TRUE@ $(DEPDIR)/Arc.Plo $(DEPDIR)/Arc.Po \ @AMDEP_TRUE@ $(DEPDIR)/Block.Plo $(DEPDIR)/Block.Po \ @AMDEP_TRUE@ $(DEPDIR)/Circle.Plo $(DEPDIR)/Circle.Po \ @AMDEP_TRUE@ $(DEPDIR)/Ellipse.Plo $(DEPDIR)/Ellipse.Po \ @AMDEP_TRUE@ $(DEPDIR)/Entity.Plo $(DEPDIR)/Entity.Po \ @AMDEP_TRUE@ $(DEPDIR)/ExtrusionEntity.Plo \ @AMDEP_TRUE@ $(DEPDIR)/ExtrusionEntity.Po \ @AMDEP_TRUE@ $(DEPDIR)/FaceEntity.Plo $(DEPDIR)/FaceEntity.Po \ @AMDEP_TRUE@ $(DEPDIR)/Insert.Plo $(DEPDIR)/Insert.Po \ @AMDEP_TRUE@ $(DEPDIR)/LWPolyline.Plo $(DEPDIR)/LWPolyline.Po \ @AMDEP_TRUE@ $(DEPDIR)/Line.Plo $(DEPDIR)/Line.Po \ @AMDEP_TRUE@ $(DEPDIR)/Point.Plo $(DEPDIR)/Point.Po \ @AMDEP_TRUE@ $(DEPDIR)/Polyline.Plo $(DEPDIR)/Polyline.Po \ @AMDEP_TRUE@ $(DEPDIR)/Solid.Plo $(DEPDIR)/Solid.Po \ @AMDEP_TRUE@ $(DEPDIR)/Spline.Plo $(DEPDIR)/Spline.Po \ @AMDEP_TRUE@ $(DEPDIR)/Trace.Plo $(DEPDIR)/Trace.Po \ @AMDEP_TRUE@ $(DEPDIR)/UnknownEntity.Plo \ @AMDEP_TRUE@ $(DEPDIR)/UnknownEntity.Po $(DEPDIR)/Vertex.Plo \ @AMDEP_TRUE@ $(DEPDIR)/Vertex.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(entities_lst_SOURCES) $(libentities_la_SOURCES) HEADERS = $(libentitiesinc_HEADERS) DIST_COMMON = $(libentitiesinc_HEADERS) Makefile.am Makefile.in SOURCES = $(entities_lst_SOURCES) $(libentities_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/entities/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libentities.la: $(libentities_la_OBJECTS) $(libentities_la_DEPENDENCIES) $(CXXLINK) $(libentities_la_LDFLAGS) $(libentities_la_OBJECTS) $(libentities_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/3DFace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/3DFace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Arc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Arc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Block.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Circle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Circle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Ellipse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Ellipse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Entity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Entity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ExtrusionEntity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ExtrusionEntity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/FaceEntity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/FaceEntity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Insert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Insert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LWPolyline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LWPolyline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Line.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Point.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Polyline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Polyline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Solid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Solid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Spline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Spline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Trace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Trace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownEntity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownEntity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Vertex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Vertex.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/entities @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libentitiesincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-libentitiesincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libentitiesincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libentitiesincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libentitiesincHEADERS entities.lst: Makefile $(entities_lst_OBJECTS) @echo "Linking entities.lst..."; \ rm -f $@; \ for i in $(entities_lst_OBJECTS); do echo $$i >>$@; done install-libentitiesincHEADERS: $(libentitiesinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libentitiesincdir) @list='$(libentitiesinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libentitiesincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libentitiesincdir)/$$f; \ done uninstall-libentitiesincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libentitiesinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libentitiesincdir)/$$f"; \ rm -f $(DESTDIR)$(libentitiesincdir)/$$f; \ done # 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: dime/src/entities/Point.cpp0100644017777301777730000000717007142512101014503 0ustar wwwwww/**************************************************************************\ * * FILE: Point.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimePoint dime/entities/Point.h \brief The dimePoint class handles a POINT \e entity. */ #include #include #include #include #include #include static char entityName[] = "POINT"; /*! Constructor. */ dimePoint::dimePoint() : coords(0, 0, 0) { } //! dimeEntity * dimePoint::copy(dimeModel * const model) const { dimePoint *p = new(model->getMemHandler()) dimePoint; p->coords = this->coords; p->copyExtrusionData(this); if (!this->copyRecords(p, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete p; p = NULL; } return p; } //! bool dimePoint::write(dimeOutput * const file) { bool ret = true; if (!this->isDeleted()) { this->preWrite(file); file->writeGroupCode(10); file->writeDouble(this->coords[0]); file->writeGroupCode(20); file->writeDouble(this->coords[1]); file->writeGroupCode(30); file->writeDouble(this->coords[2]); ret = this->writeExtrusionData(file) && dimeEntity::write(file); } return ret; } //! int dimePoint::typeId() const { return dimeBase::dimePointType; } //! bool dimePoint::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 10: case 20: case 30: this->coords[groupcode/10-1] = param.double_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimePoint::getEntityName() const { return entityName; } //! bool dimePoint::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 10: case 20: case 30: param.double_data = this->coords[groupcode/10-1]; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } //! dimeEntity::GeometryType dimePoint::extractGeometry(dimeArray &verts, dimeArray &/*indices*/, dimeVec3f &extrusionDir, dxfdouble &thickness) { thickness = this->thickness; extrusionDir = this->extrusionDir; verts.append(this->coords); return dimeEntity::POINTS; } //! int dimePoint::countRecords() const { int cnt = 0; cnt += 4; // header + coordinates return cnt + dimeExtrusionEntity::countRecords(); } dime/src/entities/Polyline.cpp0100644017777301777730000005140307142512101015203 0ustar wwwwww/**************************************************************************\ * * FILE: Polyline.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimePolyline dime/entities/Polyline.h \brief The dimePolyline class handles a POLYLINE \e entity. */ #include #include #include #include #include #include #include #include #include static char entityName[] = "POLYLINE"; /*! Constructor. */ dimePolyline::dimePolyline() : flags( 0 ), countM( 0 ), countN( 0 ), smoothCountM( 0 ), smoothCountN( 0 ), surfaceType( 0 ), coordCnt( 0 ), indexCnt( 0 ), frameCnt(0), coordVertices( NULL ), indexVertices( NULL ), frameVertices( NULL), seqend( NULL ), elevation(0,0,0) { } /*! Destructor. */ dimePolyline::~dimePolyline() { int i; delete this->seqend; for (i = 0; i < this->coordCnt; i++) delete this->coordVertices[i]; for (i = 0; i < this->indexCnt; i++) delete this->indexVertices[i]; for (i = 0; i < this->frameCnt; i++) delete this->frameVertices[i]; delete [] this->coordVertices; delete [] this->indexVertices; delete [] this->frameVertices; } //! dimeEntity * dimePolyline::copy(dimeModel * const model) const { int i; dimeMemHandler *memh = model->getMemHandler(); dimePolyline *pl = new(memh) dimePolyline; bool ok = pl != NULL; if (ok && this->indexCnt) { int num = this->indexCnt; pl->indexVertices = (dimeVertex**) dimeEntity::copyEntityArray((const dimeEntity**)this->indexVertices, num, model); if (num > 0 && pl->indexVertices == NULL) { ok = false; } else { pl->indexCnt = num; for (i = 0; i < num; i++) pl->indexVertices[i]->polyline = pl; } } if (ok && this->coordCnt) { int num = this->coordCnt; pl->coordVertices = (dimeVertex**) dimeEntity::copyEntityArray((const dimeEntity**)this->coordVertices, num, model); if (num > 0 && pl->coordVertices == NULL) { ok = false; } else { pl->coordCnt = num; for (i = 0; i < num; i++) pl->coordVertices[i]->polyline = pl; } } if (ok && this->frameCnt) { int num = this->frameCnt; pl->frameVertices = (dimeVertex**) dimeEntity::copyEntityArray((const dimeEntity**)this->frameVertices, num, model); if (num > 0 && pl->frameVertices == NULL) { ok = false; } else { pl->frameCnt = num; for (i = 0; i < num; i++) pl->frameVertices[i]->polyline = pl; } } if (ok) { // set polyline for each vertex (each vertex needs a pointer). for (i = 0; i < pl->coordCnt; i++) pl->coordVertices[i]->polyline = pl; for (i = 0; i < pl->indexCnt; i++) pl->indexVertices[i]->polyline = pl; pl->countM = this->countM; pl->countN = this->countN; pl->smoothCountM = this->smoothCountM; pl->smoothCountN = this->smoothCountN; pl->surfaceType = this->surfaceType; pl->flags = this->flags; pl->elevation = this->elevation; pl->copyExtrusionData(this); pl->seqend = this->seqend->copy(model); if (!pl->seqend) ok = false; } if (!ok || !this->copyRecords(pl, model)) { if (!memh) delete pl; // delete if allocated on heap pl = NULL; // just return NULL } return pl; } /*! Reads a POLYLINE entity. */ bool dimePolyline::read(dimeInput * const file) { bool ret = dimeEntity::read(file); if (ret && this->entityFlags & FLAG_VERTICES_FOLLOW) { // read all vertices. dimeArray array(1024); int32 groupcode; const char *string; dimeVertex *vertex; dimeMemHandler *memhandler = file->getMemHandler(); int idxcnt = 0; int vcnt = 0; int framecnt = 0; while (true) { if (!file->readGroupCode(groupcode) || groupcode != 0) { fprintf(stderr,"Error reading groupcode: %d\n", groupcode); // sim_warning("Error reading groupcode: %d\n", groupcode); ret = false; break; } string = file->readString(); if (!strcmp(string, "SEQEND")) { this->seqend = (dimeEntity*) dimeEntity::createEntity(string, memhandler); ret = this->seqend && this->seqend->read(file); break; // ok, no more vertices. } if (strcmp(string, "VERTEX")) {ret = false; break;} vertex = (dimeVertex*) dimeEntity::createEntity(string, memhandler); if (vertex == NULL) { fprintf(stderr,"error creating vertex\n"); // sim_warning("error creating vertex\n"); ret = false; break; } if (!vertex->read(file)) { fprintf(stderr,"error reading vertex.\n"); // sim_warning("error reading vertex.\n"); ret = false; break; } if (vertex->getFlags() & 16) framecnt++; if (vertex->numIndices()) idxcnt++; else vcnt++; vertex->polyline = this; array.append(vertex); } int n = array.count(); if (ret && n) { if (idxcnt) { this->indexVertices = ARRAY_NEW(memhandler, dimeVertex*, idxcnt); if (!this->indexVertices) ret = false; } if (vcnt && ret) { this->coordVertices = ARRAY_NEW(memhandler, dimeVertex*, vcnt); ret = this->coordVertices != NULL; } if (framecnt && ret) { this->frameVertices = ARRAY_NEW(memhandler, dimeVertex*, framecnt); ret = this->frameVertices != NULL; } if (ret) { this->coordCnt = 0; this->indexCnt = 0; this->frameCnt = 0; for (int i = 0; i < n; i++) { vertex = array[i]; if (vertex->getFlags() & 16) this->frameVertices[this->frameCnt++] = vertex; else if (vertex->numIndices()) this->indexVertices[this->indexCnt++] = vertex; else this->coordVertices[this->coordCnt++] = vertex; } } } } return ret; } /*! Writes POLYLINE data to \a file. */ bool dimePolyline::write(dimeOutput * const file) { if (this->isDeleted()) return true; #if 0 static int dummycnt = -1; dummycnt++; if (dummycnt != 70) return true; #endif dimeEntity::preWrite(file); assert(this->coordCnt == this->numCoordVertices()); assert(this->indexCnt == this->numIndexVertices()); if (this->coordCnt || this->indexCnt || this->frameCnt) { file->writeGroupCode(66); // vertices follow flag file->writeInt16(1); } file->writeGroupCode(10); file->writeDouble(elevation[0]); file->writeGroupCode(20); file->writeDouble(elevation[1]); file->writeGroupCode(30); file->writeDouble(elevation[2]); file->writeGroupCode(70); file->writeInt16(flags); this->writeExtrusionData(file); if (this->flags & 64) { // FIXME: is this necessary? file->writeGroupCode(71); #ifdef DIME_FIXBIG file->writeInt32(this->numCoordVertices()); #else file->writeInt16((int16)this->numCoordVertices()); #endif file->writeGroupCode(72); #ifdef DIME_FIXBIG file->writeInt32(this->numIndexVertices()); #else file->writeInt16((int16)this->numIndexVertices()); #endif } else { if (this->countM != 0) { file->writeGroupCode(71); #ifdef DIME_FIXBIG file->writeInt32(this->countM); #else file->writeInt16(this->countM); #endif } if (this->countN != 0) { file->writeGroupCode(72); #ifdef DIME_FIXBIG file->writeInt32(this->countN); #else file->writeInt16(this->countN); #endif } if (this->smoothCountM != 0) { file->writeGroupCode(73); #ifdef DIME_FIXBIG file->writeInt32(this->smoothCountM); #else file->writeInt16(this->smoothCountM); #endif } if (this->smoothCountN != 0) { file->writeGroupCode(74); #ifdef DIME_FIXBIG file->writeInt32(this->smoothCountN); #else file->writeInt16(this->smoothCountN); #endif } if (this->surfaceType != 0) { file->writeGroupCode(75); file->writeInt16(this->surfaceType); } } bool ret = dimeEntity::write(file); // write unknown records if (!ret) return false; // too lazy to check every write int i; // write all spline frame control points for (i = 0; i < this->frameCnt; i++) { this->frameVertices[i]->write(file); } // write all coord vertices for (i = 0; i < this->coordCnt; i++) { this->coordVertices[i]->write(file); } // write all index vertices for (i = 0; i < this->indexCnt; i++) { this->indexVertices[i]->write(file); } // write end-of-vertex signature... if (this->seqend) return this->seqend->write(file); // ... or just put one there! file->writeGroupCode(0); file->writeString("SEQEND"); file->writeGroupCode(8); return file->writeString(this->getLayerName()); } //! int dimePolyline::typeId() const { return dimeBase::dimePolylineType; } //! bool dimePolyline::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 66: this->entityFlags |= FLAG_VERTICES_FOLLOW; return true; case 70: this->flags = param.int16_data; return true; case 71: #ifdef DIME_FIXBIG this->countM = param.int32_data; #else this->countM = param.int16_data; #endif return true; case 72: #ifdef DIME_FIXBIG this->countN = param.int32_data; #else this->countN = param.int16_data; #endif return true; case 73: #ifdef DIME_FIXBIG this->smoothCountM = param.int32_data; #else this->smoothCountM = param.int16_data; #endif return true; case 74: #ifdef DIME_FIXBIG this->smoothCountN = param.int32_data; #else this->smoothCountN = param.int16_data; #endif return true; case 75: this->surfaceType = param.int16_data; return true; case 10: case 20: case 30: this->elevation[groupcode / 10 - 1] = param.double_data; return true; } return dimeExtrusionEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimePolyline::getEntityName() const { return entityName; } //! bool dimePolyline::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 66: param.int16_data = (this->coordCnt || this->indexCnt) ? 1 : 0; case 70: param.int16_data = this->flags; return true; case 71: #ifdef DIME_FIXBIG param.int32_data = this->countM; #else param.int16_data = this->countM; #endif return true; case 72: #ifdef DIME_FIXBIG param.int32_data = this->countN; #else param.int16_data = this->countN; #endif return true; case 73: #ifdef DIME_FIXBIG param.int32_data = this->smoothCountM; #else param.int16_data = this->smoothCountM; #endif return true; case 74: #ifdef DIME_FIXBIG param.int32_data = this->smoothCountN; #else param.int16_data = this->smoothCountN; #endif return true; case 75: param.int16_data = this->surfaceType; return true; case 10: case 20: case 30: param.double_data = this->elevation[groupcode / 10 - 1]; return true; } return dimeExtrusionEntity::getRecord(groupcode, param, index); } /*! Convenience function that returns the type of the polyline. */ int dimePolyline::getType() const { if (this->flags & IS_POLYLINE_3D) return POLYLINE; if (this->flags & IS_POLYFACE_MESH) return POLYFACE_MESH; if (this->flags & IS_POLYMESH_3D) return POLYGON_MESH; return this->POLYLINE; // no type flags set => (2D?) POLYLINE } //! dimeEntity::GeometryType dimePolyline::extractGeometry(dimeArray &verts, dimeArray &indices, dimeVec3f &extrusionDir, dxfdouble &thickness) { int i; verts.setCount(0); indices.setCount(0); thickness = this->thickness; extrusionDir = this->extrusionDir; if ((((this->flags & 0x58) == 0) || (this->flags & 0x8)) && this->coordCnt > 1) { // this is a polyline for (i = 0; i < this->coordCnt; i++) { verts.append(this->coordVertices[i]->coords); } if (this->flags & 0x1) { // closed polyline dimeVec3f tmp = verts[0]; verts.append(tmp); } return dimeEntity::LINES; } // now we know POLYLINE contains polygonal data for (i = 0; i < this->coordCnt; i++) { verts.append(this->coordVertices[i]->coords); } if ((this->flags & 0x10) && this->coordCnt > 1) { // this is a polygon mesh int m = this->countM; int n = this->countN; int m2 = 0; int n2 = 0; if (this->surfaceType && this->smoothCountM && this->smoothCountN) { m2 = this->smoothCountM; n2 = this->smoothCountN; } if (m*n + m2*n2 != this->coordCnt) { // FIXME: quick bugfix for stehlen.dxf... weird ! if ((m-1)*n + m2*n2 == this->coordCnt) m--; else { if (m*n == this->coordCnt) { m2 = n2 = 0; } else if (m2*n2 == this->coordCnt) { m = n = 0; } else { // give up fprintf(stderr,"vertices and faces do no add up: %d * %d + %d * %d != %d.\n", m, n, m2, n2, this->coordCnt); fprintf(stderr,"polyline: %d %d\n", flags, surfaceType); verts.setCount(0); return dimeEntity::NONE; } } } int idx; int idxadd = m2*n2; int nexti, nextj; int endm = (this->flags & 1) ? m : m-1; int endn = (this->flags & 32) ? n : n-1; for (i = 0; i < endm; i++) { nexti = i+1; if (nexti == m) nexti = 0; for (int j = 0; j < endn; j++) { nextj = j+1; if (nextj == n) nextj = 0; idx = i*n + j; indices.append(idxadd+idx); idx = i*n + nextj; indices.append(idxadd+idx); idx = nexti*n + nextj; indices.append(idxadd+idx); idx = nexti*n + j; indices.append(idxadd+idx); indices.append(-1); } } idxadd = 0; // copied code from above. I'm too lazy to write a loop or // a separate function :) m = m2; n = n2; endm = (this->flags & 1) ? m : m-1; endn = (this->flags & 32) ? n : n-1; for (i = 0; i < endm; i++) { nexti = i+1; if (nexti == m) nexti = 0; for (int j = 0; j < endn; j++) { nextj = j+1; if (nextj == n) nextj = 0; idx = i*n + j; indices.append(idxadd+idx); idx = i*n + nextj; indices.append(idxadd+idx); idx = nexti*n + nextj; indices.append(idxadd+idx); idx = nexti*n + j; indices.append(idxadd+idx); indices.append(-1); } } return dimeEntity::POLYGONS; } // this must be a polyface mesh if (!this->indexCnt || !this->coordCnt) { verts.setCount(0); return dimeEntity::NONE; } for (i = 0; i < this->indexCnt; i++) { dimeVertex *v = this->indexVertices[i]; if (!v->isDeleted()) { int num = v->numIndices(); int idx; for (int j = 0; j < num; j++) { idx = v->getIndex(j); if (idx < 0) { // negative means hidden edge idx = -idx; } indices.append(idx-1); } indices.append(-1); } } return dimeEntity::POLYGONS; // phew, should probably have spilt this function into several // smaller ones, but I'm not a coward so... } /*! Returns the number of coordinate vertices. */ int dimePolyline::numCoordVertices() const { int cnt = 0; for (int i = 0; i < this->coordCnt; i++) { dimeVertex *v = this->coordVertices[i]; if (!v->isDeleted()) cnt++; } return cnt; } /*! Returns the number of index vertices. */ int dimePolyline::numIndexVertices() const { int cnt = 0; for (int i = 0; i < this->indexCnt; i++) { dimeVertex *v = this->indexVertices[i]; if (!v->isDeleted()) cnt++; } return cnt; } //! int dimePolyline::countRecords() const { int cnt = 5; // header + elevation + flags if (this->coordCnt || this->indexCnt) cnt++; // vertices follow flag if (this->flags & 64) cnt += 2; else { if (this->countM != 0) cnt++; if (this->countN != 0) cnt++; if (this->smoothCountM != 0) cnt++; if (this->smoothCountN != 0) cnt++; if (this->surfaceType != 0) cnt++; } int i, n = this->coordCnt; for (i = 0; i < n; i++) { if (!this->coordVertices[i]->isDeleted()) cnt += this->coordVertices[i]->countRecords(); } n = this->indexCnt; for (i = 0; i < n; i++) { if (!this->indexVertices[i]->isDeleted()) cnt += this->indexVertices[i]->countRecords(); } n = this->frameCnt; for (i = 0; i < n; i++) { if (!this->frameVertices[i]->isDeleted()) cnt += this->frameVertices[i]->countRecords(); } if (this->seqend) cnt+= this->seqend->countRecords(); else cnt++; // endseq return cnt; } /*! Sets the coordinate vertices for this polyline. Old vertices will be deleted. */ void dimePolyline::setCoordVertices(dimeVertex **vertices, const int num, dimeMemHandler * const memhandler) { int i; if (!memhandler) { for (i = 0; i < this->coordCnt; i++) { delete this->coordVertices[i]; } delete [] this->coordVertices; } if (vertices && num) { if (!memhandler || num > this->coordCnt) { this->coordVertices = ARRAY_NEW(memhandler, dimeVertex*, num); } if (this->coordVertices) { for (i = 0; i < num; i++) { this->coordVertices[i] = vertices[i]; this->coordVertices[i]->polyline = this; } } this->coordCnt = num; } else { this->coordVertices = NULL; this->coordCnt = 0; } } /*! Sets the spline frame control point vertices for this polyline. Old control points will be deleted. */ void dimePolyline::setSplineFrameControlPoints(dimeVertex **vertices, const int num, dimeMemHandler * const memhandler) { int i; if (!memhandler) { for (i = 0; i < this->frameCnt; i++) { delete this->frameVertices[i]; } delete [] this->frameVertices; } if (vertices && num) { if (!memhandler || num > this->frameCnt) { this->frameVertices = ARRAY_NEW(memhandler, dimeVertex*, num); } if (this->frameVertices) { for (i = 0; i < num; i++) { this->frameVertices[i] = vertices[i]; this->frameVertices[i]->polyline = this; } } this->frameCnt = num; } else { this->frameVertices = NULL; this->frameCnt = 0; } } /*! Sets the index vertices for this polyline. Old vertices will be deleted. */ void dimePolyline::setIndexVertices(dimeVertex **vertices, const int num, dimeMemHandler * const memhandler) { int i; if (!memhandler) { for (i = 0; i < this->indexCnt; i++) { delete this->indexVertices[i]; } delete [] this->indexVertices; } if (vertices && num) { if (!memhandler || num > this->indexCnt) { this->indexVertices = ARRAY_NEW(memhandler, dimeVertex*, num); } if (this->indexVertices) { for (i = 0; i < num; i++) { this->indexVertices[i] = vertices[i]; this->indexVertices[i]->polyline = this; } } this->indexCnt = num; } else { this->indexVertices = NULL; this->indexCnt = 0; } } /*! Overloaded from dimeEntity. Will first do a callback for this entity, then for all vertices. Each vertex will have a pointer to its polyline "parent". */ bool dimePolyline::traverse(const dimeState * const state, dimeCallback callback, void *userdata) { if (this->isDeleted()) return true; callback(state, this, userdata); int i, n; if (state->getFlags() & dimeState::TRAVERSE_POLYLINE_VERTICES) { n = this->frameCnt; for (i = 0; i < n; i++) { if (!this->frameVertices[i]->traverse(state, callback, userdata)) return false; } n = this->coordCnt; for (i = 0; i < n; i++) { if (!this->coordVertices[i]->traverse(state, callback, userdata)) return false; } n = this->indexCnt; for (i = 0; i < n; i++) { if (!this->indexVertices[i]->traverse(state, callback, userdata)) return false; } } return true; } //! void dimePolyline::setLayer(const dimeLayer * const layer) { dimeEntity::setLayer(layer); int i; for (i = 0; i < this->frameCnt; i++) { this->frameVertices[i]->setLayer(layer); } for (i = 0; i < this->coordCnt; i++) { this->coordVertices[i]->setLayer(layer); } for (i = 0; i < this->indexCnt; i++) { this->indexVertices[i]->setLayer(layer); } } void dimePolyline::clearSurfaceData() { this->smoothCountN = this->smoothCountM = 0; this->surfaceType = 0; } dime/src/entities/Solid.cpp0100644017777301777730000001050707142512101014462 0ustar wwwwww/**************************************************************************\ * * FILE: Solid.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeSolid dime/entities/Solid.h \brief The dimeSolid class handles a SOLID \e entity. */ #include #include #include #include #include #include #include static char entityName[] = "SOLID"; /*! Constructor. */ dimeSolid::dimeSolid() : extrusionDir( 0, 0, 1 ), thickness( 0 ) { } //! dimeEntity * dimeSolid::copy(dimeModel * const model) const { dimeSolid *f = new(model->getMemHandler())dimeSolid; if (!f) return NULL; f->copyCoords(this); f->thickness = this->thickness; f->extrusionDir = this->extrusionDir; if (!this->copyRecords(f, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete f; f = NULL; } return f; } /*! Writes a SOLID entity. */ bool dimeSolid::write(dimeOutput * const file) { bool ret = true; if (!this->isDeleted()) { this->preWrite(file); this->writeCoords(file); if (this->thickness != 0.0) { file->writeGroupCode(39); file->writeDouble(this->thickness); } if (this->extrusionDir != dimeVec3f(0,0,1)) { file->writeGroupCode(210); file->writeDouble(this->extrusionDir[0]); file->writeGroupCode(220); file->writeDouble(this->extrusionDir[1]); file->writeGroupCode(230); file->writeDouble(this->extrusionDir[2]); } ret = dimeEntity::write(file); } return ret; } //! bool dimeSolid::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 210: case 220: case 230: this->extrusionDir[(groupcode-210)/10] = param.double_data; return true; case 39: this->thickness = param.double_data; return true; } return dimeFaceEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeSolid::getEntityName() const { return entityName; } //! bool dimeSolid::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 210: case 220: case 230: param.double_data = this->extrusionDir[(groupcode-210)/10]; return true; case 39: param.double_data = this->thickness; return true; } return dimeFaceEntity::getRecord(groupcode, param, index); } //! int dimeSolid::typeId() const { return dimeBase::dimeSolidType; } //! dxfdouble dimeSolid::getThickness() const { return this->thickness; } //! void dimeSolid::getExtrusionDir(dimeVec3f &ed) const { ed = this->extrusionDir; } //! bool dimeSolid::swapQuadCoords() const { return true; } //! void dimeSolid::setThickness(const dxfdouble &thickness) { this->thickness = thickness; } //! void dimeSolid::setExtrusionDir(const dimeVec3f &ed) { this->extrusionDir = ed; } //! int dimeSolid::countRecords() const { int cnt = 0; if (!this->isDeleted()) { cnt++; // header if (this->thickness != 0.0) cnt++; if (this->extrusionDir != dimeVec3f(0,0,1)) cnt += 3; cnt += dimeFaceEntity::countRecords(); } return cnt; } dime/src/entities/Spline.cpp0100644017777301777730000003370306776622122014666 0ustar wwwwww/**************************************************************************\ * * FILE: Spline.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeSpline dime/entities/Spline.h \brief The dimeSpline class handles a SPLINE \e entity. */ #include #include #include #include #include #include #define DEFAULT_CP_TOLERANCE 1e-7 // 0.0000001 #define DEFAULT_FIT_TOLERANCE 1e-10 // 0.0000000001 #define DEFAULT_KNOT_TOLERANCE 1e-7 // 0.0000001 static char entityName[] = "SPLINE"; /*! Constructor. */ dimeSpline::dimeSpline() { this->flags = dimeSpline::PLANAR; this->degree = 3; // FIXME: is this a correct default value this->numKnots = 0; this->numControlPoints = 0; this->numFitPoints = 0; this->knotTolerance = DEFAULT_KNOT_TOLERANCE; this->fitTolerance = DEFAULT_CP_TOLERANCE; this->cpTolerance = DEFAULT_CP_TOLERANCE; this->knots = NULL; this->weights = NULL; this->controlPoints = NULL; this->fitPoints = NULL; } /*! Destructor. */ dimeSpline::~dimeSpline() { delete [] this->knots; delete [] this->weights; delete [] this->controlPoints; delete [] this->fitPoints; } /*! Returns \e true if the spline has control point weights. */ bool dimeSpline::hasWeights() const { if (weights == NULL) return false; int i, n = this->numControlPoints; for (i = 0; i < n; i++) { if (this->weights[i] != 1.0) break; } return i < n; } //! dimeEntity * dimeSpline::copy(dimeModel * const model) const { dimeMemHandler *mh = model->getMemHandler(); dimeSpline *s = new(mh) dimeSpline; if (!s) return NULL; if (!this->copyRecords(s, model)) { // check if allocated on heap. if (!mh) delete s; s = NULL; } else { int i,n; s->flags = this->flags; s->degree = this->degree; s->numKnots = this->numKnots; s->numControlPoints = this->numControlPoints; s->numFitPoints = this->numFitPoints; s->knotTolerance = this->knotTolerance; s->fitTolerance = this->fitTolerance; s->cpTolerance = this->cpTolerance; s->knots = ARRAY_NEW(mh, dxfdouble, this->numKnots); if (this->knots) { n = this->numKnots; for (i = 0; i < n; i++) { s->knots[i] = this->knots[i]; } } if (this->weights) { s->weights = ARRAY_NEW(mh, dxfdouble, this->numControlPoints); n = this->numControlPoints; for (i = 0; i < n; i++) { s->weights[i] = this->weights[i]; } } if (this->controlPoints) { s->controlPoints = ARRAY_NEW(mh, dimeVec3f, this->numControlPoints); n = this->numControlPoints; for (i = 0; i < n; i++) { s->controlPoints[i] = this->controlPoints[i]; } } if (this->fitPoints) { s->fitPoints = ARRAY_NEW(mh, dimeVec3f, this->numFitPoints); n = this->numFitPoints; for (i = 0; i < n; i++) { s->fitPoints[i] = this->fitPoints[i]; } } } return s; } //! bool dimeSpline::write(dimeOutput * const file) { int i; dimeEntity::preWrite(file); bool ret = dimeEntity::write(file); // write counters first file->writeGroupCode(70); file->writeInt16(this->flags); #ifdef DIME_FIXBIG file->writeGroupCode(71); file->writeInt32(this->degree); file->writeGroupCode(72); file->writeInt32(this->numKnots); file->writeGroupCode(73); file->writeInt32(this->numControlPoints); file->writeGroupCode(74); file->writeInt32(this->numFitPoints); #else file->writeGroupCode(71); file->writeInt16(this->degree); file->writeGroupCode(72); file->writeInt16(this->numKnots); file->writeGroupCode(73); file->writeInt16(this->numControlPoints); file->writeGroupCode(74); file->writeInt16(this->numFitPoints); #endif file->writeGroupCode(42); file->writeDouble(this->knotTolerance); file->writeGroupCode(43); file->writeDouble(this->cpTolerance); if (this->numFitPoints) { file->writeGroupCode(44); file->writeDouble(this->fitTolerance); } for (i = 0; i < this->numKnots; i++) { file->writeGroupCode(40); file->writeDouble(this->knots[i]); } if (this->hasWeights()) { for (i = 0; i < this->numControlPoints; i++) { file->writeGroupCode(41); file->writeDouble(this->weights[i]); } } for (i = 0; i < this->numControlPoints; i++) { file->writeGroupCode(10); file->writeDouble(this->controlPoints[i][0]); file->writeGroupCode(20); file->writeDouble(this->controlPoints[i][1]); file->writeGroupCode(30); file->writeDouble(this->controlPoints[i][2]); } for (i = 0; i < this->numFitPoints; i++) { file->writeGroupCode(11); file->writeDouble(this->fitPoints[i][0]); file->writeGroupCode(21); file->writeDouble(this->fitPoints[i][1]); file->writeGroupCode(31); file->writeDouble(this->fitPoints[i][2]); } return ret; } //! int dimeSpline::typeId() const { return dimeBase::dimeSplineType; } //! bool dimeSpline::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const mh) { switch (groupcode) { case 10: // control points case 20: case 30: if (this->controlPoints == NULL && this->numControlPoints) { this->cpCnt = 0; this->controlPoints = ARRAY_NEW(mh, dimeVec3f, this->numControlPoints); } if (this->controlPoints && this->cpCnt < this->numControlPoints) { this->controlPoints[this->cpCnt][groupcode/10-1] = param.double_data; } if (groupcode == 30) cpCnt++; return true; case 11: // fit points case 21: case 31: if (this->fitPoints == NULL && this->numFitPoints) { this->fitCnt = 0; this->fitPoints = ARRAY_NEW(mh, dimeVec3f, this->numFitPoints); } if (this->fitPoints && this->fitCnt < this->numFitPoints) { this->fitPoints[this->fitCnt][groupcode/10-1] = param.double_data; } if (groupcode == 31) fitCnt++; return true; case 40: // knot value, multiple values if (this->knots == NULL && this->numKnots) { this->knotCnt = 0; this->knots = ARRAY_NEW(mh, dxfdouble, this->numKnots); } if (this->knots && this->knotCnt < this->numKnots) { this->knots[this->knotCnt] = param.double_data; } this->knotCnt++; return true; case 41: // weight, multiple values, prersent if not all 1 if (this->weights == NULL && this->numControlPoints) { this->weights = ARRAY_NEW(mh, dxfdouble, this->numControlPoints); this->weightCnt = 0; } if (this->weights && this->weightCnt < this->numControlPoints) { this->weights[this->weightCnt] = param.double_data; } this->weightCnt++; return true; case 42: // knot tol this->knotTolerance = param.double_data; return true; case 43: // cp tol this->cpTolerance = param.double_data; return true; case 44: // fit tol this->fitTolerance = param.double_data; return true; case 70: // flags this->flags = param.int16_data; return true; case 71: // degree #ifdef DIME_FIXBIG this->degree = param.int32_data; #else this->degree = param.int16_data; #endif return true; case 72: // num knots #ifdef DIME_FIXBIG this->numKnots = param.int32_data; #else this->numKnots = param.int16_data; #endif return true; case 73: // num ctrl points #ifdef DIME_FIXBIG this->numControlPoints = param.int32_data; #else this->numControlPoints = param.int16_data; #endif return true; case 74: // num fit points #ifdef DIME_FIXBIG this->numFitPoints = param.int32_data; #else this->numFitPoints = param.int16_data; #endif return true; } return dimeEntity::handleRecord(groupcode, param, mh); } //! const char * dimeSpline::getEntityName() const { return entityName; } //! bool dimeSpline::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch (groupcode) { case 10: // control points case 20: case 30: if (this->controlPoints != NULL && index < this->numControlPoints) { param.double_data = this->controlPoints[index][groupcode/10-1]; } return true; case 11: // fit points case 21: case 31: if (this->fitPoints != NULL && index < this->numFitPoints) { param.double_data = this->fitPoints[index][groupcode/10-1]; } return true; case 40: // knot value, multiple values if (this->knots != NULL && index < this->numKnots) { param.double_data = this->knots[index]; } return true; case 41: // weight, multiple values, present if not all 1 if (this->weights != NULL && this->numControlPoints) { param.double_data = this->weights[index]; } else param.double_data = 1.0; // default return true; case 42: // knot tol param.double_data = this->knotTolerance; return true; case 43: // cp tol param.double_data = this->cpTolerance; return true; case 44: // fit tol param.double_data = this->fitTolerance; return true; case 70: // flags param.int16_data= this->flags; return true; case 71: // degree #ifdef DIME_FIXBIG param.int32_data = this->degree; #else param.int16_data = this->degree; #endif return true; case 72: // num knots #ifdef DIME_FIXBIG param.int32_data = this->numKnots; #else param.int16_data = this->numKnots; #endif return true; case 73: // num ctrl points #ifdef DIME_FIXBIG param.int32_data = this->numControlPoints; #else param.int32_data = this->numControlPoints; #endif return true; case 74: // num fit points #ifdef DIME_FIXBIG param.int32_data = this->numFitPoints; #else param.int16_data = this->numFitPoints; #endif return true; } return dimeEntity::getRecord(groupcode, param, index); } //! void dimeSpline::print() const { fprintf(stderr,"SPLINE:\n"); // FIXME } //! int dimeSpline::countRecords() const { int cnt = 7; // name + flags + degree + numKnots + numCP + knotTol + cpTol cnt += this->numControlPoints*3; if (this->hasWeights()) cnt += this->numControlPoints; cnt += this->numFitPoints*3; if (this->numFitPoints) cnt++; // fitTolerance cnt += this->numKnots; return cnt + dimeEntity::countRecords(); } void dimeSpline::setKnotValues(const dxfdouble * const values, const int numvalues, dimeMemHandler * const memhandler) { if (memhandler == NULL && this->numKnots != numvalues) { delete [] this->knots; this->knots = NULL; } if (this->knots == NULL || numvalues > this->numKnots) { this->knots = ARRAY_NEW(memhandler, dxfdouble, numvalues); } memcpy(this->knots, values, numvalues*sizeof(dxfdouble)); this->numKnots = numvalues; } /*! Sets new control points for this spline. It is the user's responsibility to update the weights whenever the control point are changed. */ void dimeSpline::setControlPoints(const dimeVec3f * const pts, const int numpts, dimeMemHandler * const memhandler) { // update weights array (if present) if (this->hasWeights()) { if (memhandler == NULL && this->numControlPoints != numpts) { dxfdouble *newweights = ARRAY_NEW(memhandler, dxfdouble, numpts); memcpy(newweights, this->weights, sizeof(dxfdouble)*DXFMIN(numpts, this->numControlPoints)); for (int i = this->numControlPoints; i < numpts; i++) { newweights[i] = 1.0; } delete [] this->weights; this->weights = newweights; } else if (numpts > this->numControlPoints) { dxfdouble *newweights = ARRAY_NEW(memhandler, dxfdouble, numpts); memcpy(newweights, this->weights, this->numControlPoints); for (int i = this->numControlPoints; i < numpts; i++) { newweights[i] = 1.0; } this->weights = newweights; } } if (memhandler == NULL && this->numControlPoints != numpts) { delete [] this->controlPoints; delete [] this->weights; this->controlPoints = NULL; this->weights = NULL; } if (this->controlPoints == NULL || numpts > this->numControlPoints) { this->controlPoints = ARRAY_NEW(memhandler, dimeVec3f, numpts); } memcpy(this->controlPoints, pts, sizeof(dimeVec3f)*numpts); this->numControlPoints = numpts; } /*! Sets the weight of control point \a idx. */ void dimeSpline::setWeight(const int idx, const dxfdouble w, dimeMemHandler * const memhandler) { if (!this->hasWeights() && w != 1.0) { this->weights = ARRAY_NEW(memhandler, dxfdouble, this->numControlPoints); for (int i = 0; i < this->numControlPoints; i++) { this->weights[i] = 1.0; } } assert(idx >= 0 && idx < this->numControlPoints); if (w != 1.0) { this->weights[idx] = w; } } void dimeSpline::setFitPoints(const dimeVec3f * const pts, const int numpts, dimeMemHandler * const memhandler) { if (memhandler == NULL && this->numFitPoints != numpts) { delete [] this->fitPoints; this->fitPoints = NULL; } if (this->fitPoints == NULL || numpts > this->numFitPoints) { this->fitPoints = ARRAY_NEW(memhandler, dimeVec3f, numpts); } memcpy(this->fitPoints, pts, numpts*sizeof(dimeVec3f)); this->numFitPoints = numpts; } dime/src/entities/Trace.cpp0100644017777301777730000001040707142512101014445 0ustar wwwwww/**************************************************************************\ * * FILE: Trace.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeTrace dime/entities/Trace.h \brief The dimeTrace class handles a TRACE \e entity. */ #include #include #include #include #include #include #include static char entityName[] = "TRACE"; /*! Constructor. */ dimeTrace::dimeTrace() : extrusionDir( 0, 0, 1 ), thickness( 0 ) { } //! dimeEntity * dimeTrace::copy(dimeModel * const model) const { dimeTrace *f = new(model->getMemHandler())dimeTrace; if (!f) return NULL; f->copyCoords(this); f->thickness = this->thickness; f->extrusionDir = this->extrusionDir; if (!this->copyRecords(f, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete f; f = NULL; } return f; } //! bool dimeTrace::write(dimeOutput * const file) { bool ret = true; if (!this->isDeleted()) { this->preWrite(file); this->writeCoords(file); if (this->thickness != 0.0f) { file->writeGroupCode(39); file->writeDouble(this->thickness); } if (this->extrusionDir != dimeVec3f(0,0,1)) { file->writeGroupCode(210); file->writeDouble(this->extrusionDir[0]); file->writeGroupCode(220); file->writeDouble(this->extrusionDir[1]); file->writeGroupCode(230); file->writeDouble(this->extrusionDir[2]); } ret = dimeEntity::write(file); } return ret; } //! bool dimeTrace::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 210: case 220: case 230: this->extrusionDir[(groupcode-210)/10] = param.double_data; return true; case 39: this->thickness = param.double_data; return true; } return dimeFaceEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeTrace::getEntityName() const { return entityName; } //! bool dimeTrace::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 210: case 220: case 230: param.double_data = this->extrusionDir[(groupcode-210)/10]; return true; case 39: param.double_data = this->thickness; return true; } return dimeFaceEntity::getRecord(groupcode, param, index); } //! int dimeTrace::typeId() const { return dimeBase::dimeTraceType; } dxfdouble dimeTrace::getThickness() const { return this->thickness; } void dimeTrace::getExtrusionDir(dimeVec3f &ed) const { ed = this->extrusionDir; } bool dimeTrace::swapQuadCoords() const { return true; } void dimeTrace::setThickness(const dxfdouble &thickness) { this->thickness = thickness; } void dimeTrace::setExtrusionDir(const dimeVec3f &ed) { this->extrusionDir = ed; } //! int dimeTrace::countRecords() const { int cnt = 0; if (!this->isDeleted()) { cnt++; // header if (this->thickness != 0.0) cnt++; if (this->extrusionDir != dimeVec3f(0,0,1)) cnt += 3; cnt += dimeFaceEntity::countRecords(); } return cnt; } dime/src/entities/UnknownEntity.cpp0100644017777301777730000000522606776622122016267 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownEntity.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeUnknownEntity dime/entities/UnknownEntity.h \brief The dimeUnknownEntity class reads and writes undefined \e entity classes. */ #include #include #include #include #include #include #include /*! Constructor. */ dimeUnknownEntity::dimeUnknownEntity(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->entityName, name); } /*! Destructor. Should only be called if no memhandler is used. */ dimeUnknownEntity::~dimeUnknownEntity() { delete this->entityName; } //! dimeEntity * dimeUnknownEntity::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeUnknownEntity *u = new(memh) dimeUnknownEntity(this->entityName, memh); if (!this->copyRecords(u, model)) { // check if allocated on heap. if (!memh) delete u; u = NULL; } return u; } //! bool dimeUnknownEntity::write(dimeOutput * const file) { dimeEntity::preWrite(file); return dimeEntity::write(file); } //! int dimeUnknownEntity::typeId() const { return dimeBase::dimeUnknownEntityType; } //! int dimeUnknownEntity::countRecords() const { return 1 + dimeEntity::countRecords(); } //! const char * dimeUnknownEntity::getEntityName() const { return this->entityName; } dime/src/entities/Vertex.cpp0100644017777301777730000001150607045266157014710 0ustar wwwwww/**************************************************************************\ * * FILE: Vertex.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeVertex dime/entities/Vertex.h \brief The dimeVertex class handles a VERTEX \e entity. */ #include #include #include #include #include #include static char entityName[] = "VERTEX"; /*! Constructor. */ dimeVertex::dimeVertex() { this->polyline = NULL; this->flags = 0; this->indices[0] = 0; this->indices[1] = 0; this->indices[2] = 0; this->indices[3] = 0; this->coords.setValue(0.0f, 0.0f, 0.0f); } //! dimeEntity * dimeVertex::copy(dimeModel * const model) const { dimeVertex *v = new(model->getMemHandler()) dimeVertex; v->flags = this->flags; v->indices[0] = this->indices[0]; v->indices[1] = this->indices[1]; v->indices[2] = this->indices[2]; v->indices[3] = this->indices[3]; v->coords = this->coords; v->polyline = this->polyline; if (!this->copyRecords(v, model)) { // check if allocated on heap. if (!model->getMemHandler()) delete v; v = NULL; } return v; } //! bool dimeVertex::write(dimeOutput * const file) { bool ret = true; if (!this->isDeleted()) { this->preWrite(file); file->writeGroupCode(70); file->writeInt16(this->flags); file->writeGroupCode(10); file->writeDouble(this->coords[0]); file->writeGroupCode(20); file->writeDouble(this->coords[1]); file->writeGroupCode(30); file->writeDouble(this->coords[2]); for (int i = 0; i < this->numIndices(); i++) { file->writeGroupCode(i+71); #ifdef DIME_FIXBIG file->writeInt32(this->indices[i]); #else file->writeInt16(this->indices[i]); #endif } ret = dimeEntity::write(file); } return ret; } /*! Returns the number of indices stored in this vertex; */ int dimeVertex::numIndices() const { int cnt = 0; if ((flags & 128) && !(flags & 64)) { // does vertex store indices? for (int i = 0; this->indices[i] && i < 4; i++, cnt++); } return cnt; } /*! Returns index number \a num; */ int dimeVertex::getIndex(const int num) const { return this->indices[num]; } //! int dimeVertex::typeId() const { return dimeBase::dimeVertexType; } //! bool dimeVertex::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 70: this->flags = param.int16_data; return true; case 10: case 20: case 30: this->coords[groupcode/10-1] = param.double_data; return true; case 71: case 72: case 73: case 74: #ifdef DIME_FIXBIG this->indices[groupcode-71] = param.int32_data; #else this->indices[groupcode-71] = param.int16_data; #endif return true; } return dimeEntity::handleRecord(groupcode, param, memhandler); } //! const char * dimeVertex::getEntityName() const { return entityName; } //! bool dimeVertex::getRecord(const int groupcode, dimeParam ¶m, const int index) const { switch(groupcode) { case 70: param.int16_data = this->flags; return true; case 10: case 20: case 30: param.double_data = this->coords[groupcode/10-1]; return true; case 71: case 72: case 73: case 74: #ifdef DIME_FIXBIG param.int16_data = this->indices[groupcode-71]; #else param.int32_data = this->indices[groupcode-71]; #endif return true; } return dimeEntity::getRecord(groupcode, param, index); } //! int dimeVertex::countRecords() const { int cnt = 0; if (!this->isDeleted()) { cnt += 5; // header + flags + coords cnt += this->numIndices(); cnt += dimeEntity::countRecords(); } return cnt; } dime/src/objects/0040755017777301777730000000000007733212517012527 5ustar wwwwwwdime/src/objects/Makefile.am0100644017777301777730000000267507402666664014603 0ustar wwwwww## Process this file with automake to generate Makefile.in. LIBS = INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC noinst_LIBRARIES = objects.lst else noinst_LTLIBRARIES = libobjects.la endif ## All source files used when building this submodule, including all ## headers. ObjectsSources = \ Object.cpp Object.h \ UnknownObject.cpp UnknownObject.h libobjects_la_SOURCES = \ $(ObjectsSources) objects_lst_SOURCES = \ $(ObjectsSources) objects.lst: Makefile $(objects_lst_OBJECTS) @echo "Linking objects.lst..."; \ rm -f $@; \ for i in $(objects_lst_OBJECTS); do echo $$i >>$@; done ## Installation information. libobjectsincdir = $(includedir)/dime/objects libobjectsinc_HEADERS = \ ../../include/dime/objects/Object.h \ ../../include/dime/objects/UnknownObject.h install-libobjectsincHEADERS: $(libobjectsinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libobjectsincdir) @list='$(libobjectsinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libobjectsincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libobjectsincdir)/$$f; \ done uninstall-libobjectsincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libobjectsinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libobjectsincdir)/$$f"; \ rm -f $(DESTDIR)$(libobjectsincdir)/$$f; \ done dime/src/objects/Makefile.in0100644017777301777730000002762307643247732014612 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ LIBS = INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = objects.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libobjects.la ObjectsSources = \ Object.cpp Object.h \ UnknownObject.cpp UnknownObject.h libobjects_la_SOURCES = \ $(ObjectsSources) objects_lst_SOURCES = \ $(ObjectsSources) libobjectsincdir = $(includedir)/dime/objects libobjectsinc_HEADERS = \ ../../include/dime/objects/Object.h \ ../../include/dime/objects/UnknownObject.h subdir = src/objects mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) objects_lst_AR = $(AR) cru objects_lst_LIBADD = am_objects_lst_OBJECTS = Object.$(OBJEXT) UnknownObject.$(OBJEXT) objects_lst_OBJECTS = $(am_objects_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libobjects_la_LDFLAGS = libobjects_la_LIBADD = am_libobjects_la_OBJECTS = Object.lo UnknownObject.lo libobjects_la_OBJECTS = $(am_libobjects_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/Object.Plo $(DEPDIR)/Object.Po \ @AMDEP_TRUE@ $(DEPDIR)/UnknownObject.Plo \ @AMDEP_TRUE@ $(DEPDIR)/UnknownObject.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(objects_lst_SOURCES) $(libobjects_la_SOURCES) HEADERS = $(libobjectsinc_HEADERS) DIST_COMMON = $(libobjectsinc_HEADERS) Makefile.am Makefile.in SOURCES = $(objects_lst_SOURCES) $(libobjects_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/objects/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libobjects.la: $(libobjects_la_OBJECTS) $(libobjects_la_DEPENDENCIES) $(CXXLINK) $(libobjects_la_LDFLAGS) $(libobjects_la_OBJECTS) $(libobjects_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Object.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownObject.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/objects @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libobjectsincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-libobjectsincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libobjectsincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libobjectsincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libobjectsincHEADERS objects.lst: Makefile $(objects_lst_OBJECTS) @echo "Linking objects.lst..."; \ rm -f $@; \ for i in $(objects_lst_OBJECTS); do echo $$i >>$@; done install-libobjectsincHEADERS: $(libobjectsinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libobjectsincdir) @list='$(libobjectsinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libobjectsincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libobjectsincdir)/$$f; \ done uninstall-libobjectsincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libobjectsinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libobjectsincdir)/$$f"; \ rm -f $(DESTDIR)$(libobjectsincdir)/$$f; \ done # 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: dime/src/objects/Object.cpp0100644017777301777730000000644706776622122014454 0ustar wwwwww/**************************************************************************\ * * FILE: Object.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeObject dime/objects/Object.h \brief The dimeObject class is the superclass for the \e object classes. */ #include #include #include #include #include #include #include /*! \fn const char * dimeObject::getObjectName() const = 0 */ /*! \fn dimeObject * dimeObject::copy(dimeModel * const model) const = 0 */ /*! \fn int dimeObject::typeId() const = 0 */ /*! Constructor. */ dimeObject::dimeObject() : dimeRecordHolder(0) // objects are separated by group code 0 { } /*! Destructor. */ dimeObject::~dimeObject() { } /*! Copies the common and unobjectified records. */ bool dimeObject::copyRecords(dimeObject * const myobject, dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); bool ok = dimeRecordHolder::copyRecords(myobject, memh); return ok; } /*! Writes common and unknown object records to file. */ bool dimeObject::write(dimeOutput * const file) { return dimeRecordHolder::write(file); } /*! Static function which creates an object based on its name. */ dimeObject * dimeObject::createObject(const char * const name, dimeMemHandler * const memhandler) { return new(memhandler) dimeUnknownObject(name, memhandler); } //! int dimeObject::countRecords() const { return dimeRecordHolder::countRecords(); } //! bool dimeObject::isOfType(const int thetypeid) const { return thetypeid == dimeObjectType || dimeRecordHolder::isOfType(thetypeid); } /*! Reads an object from \a in. Can be overloaded by subobjects, but in most cases this will not be necessary. \sa dimeObject::handleRecord(). */ bool dimeObject::read(dimeInput * const file) { return dimeRecordHolder::read(file); } //! bool dimeObject::handleRecord(const int /*groupcode*/, const dimeParam &/*param*/, dimeMemHandler * const /*memhandler*/) { // no groupcodes supported yet... return false; } /*! \fn void dimeObject::print() const */ dime/src/objects/UnknownObject.cpp0100644017777301777730000000524206776622122016024 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownObject.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeUnknownObject dime/objects/UnknownObject.h \brief The dimeUnknownObject class reads and writes undefined objects. */ #include #include #include #include #include #include /*! Constructor. */ dimeUnknownObject::dimeUnknownObject(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->objectName, name); } /*! Destructor. Should only be called if no memhandler is used. */ dimeUnknownObject::~dimeUnknownObject() { delete this->objectName; } //! dimeObject * dimeUnknownObject::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeUnknownObject *u = new(memh) dimeUnknownObject(this->objectName, memh); if (!this->copyRecords(u, model)) { // check if allocated on heap. if (!memh) delete u; u = NULL; } return u; } //! bool dimeUnknownObject::write(dimeOutput * const file) { if (file->writeGroupCode(0) && file->writeString(this->objectName)) return dimeObject::write(file); return false; } //! int dimeUnknownObject::typeId() const { return dimeBase::dimeUnknownObjectType; } //! int dimeUnknownObject::countRecords() const { return 1 + dimeObject::countRecords(); } //! const char * dimeUnknownObject::getObjectName() const { return this->objectName; } dime/src/records/0040755017777301777730000000000007733212517012537 5ustar wwwwwwdime/src/records/DoubleRecord.cpp0100644017777301777730000000521506776622122015617 0ustar wwwwww/**************************************************************************\ * * FILE: DoubleRecord.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeDoubleRecord dime/records/DoubleRecord.h \brief The dimeDoubleRecord class is a container class for double records. */ #include #include #include #include #include /*! Constructor. */ dimeDoubleRecord::dimeDoubleRecord(const int group_code, const dxfdouble val) : dimeRecord(group_code) { this->setValue(val); } //! dimeRecord * dimeDoubleRecord::copy(dimeMemHandler * const mh) const { return new(mh) dimeDoubleRecord(this->groupCode, this->value); } /*! Sets the floating point value. */ void dimeDoubleRecord::setValue(const dxfdouble val) { this->value = val; } /*! Returns the floating point value of this record. */ dxfdouble dimeDoubleRecord::getValue() const { return this->value; } //! int dimeDoubleRecord::typeId() const { return dimeBase::dimeDoubleRecordType; } //! bool dimeDoubleRecord::read(dimeInput * const in) { return in->readDouble(this->value); } //! bool dimeDoubleRecord::write(dimeOutput * const out) { if (dimeRecord::write(out)) { return out->writeDouble(this->value); } return false; } //! void dimeDoubleRecord::setValue(const dimeParam ¶m, dimeMemHandler * const) { this->value = param.double_data; } //! void dimeDoubleRecord::getValue(dimeParam ¶m) const { param.double_data = this->value; } dime/src/records/FloatRecord.cpp0100644017777301777730000000503006776622122015445 0ustar wwwwww/**************************************************************************\ * * FILE: FloatRecord.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeFloatRecord dime/records/FloatRecord.h \brief The dimeFloatRecord class is a container class for float records. */ #include #include #include #include /*! Constructor */ dimeFloatRecord::dimeFloatRecord(const int group_code, const float val) : dimeRecord(group_code) { this->setValue(val); } //! dimeRecord * dimeFloatRecord::copy(dimeMemHandler * const mh) const { return new(mh) dimeFloatRecord(this->groupCode, this->value); } /*! Sets the float value. */ void dimeFloatRecord::setValue(const float val) { this->value = val; } //! float dimeFloatRecord::getValue() const { return this->value; } //! int dimeFloatRecord::typeId() const { return dimeBase::dimeFloatRecordType; } //! bool dimeFloatRecord::read(dimeInput * const in) { return in->readFloat(this->value); } //! bool dimeFloatRecord::write(dimeOutput * const out) { if (dimeRecord::write(out)) { return out->writeFloat(this->value); } return false; } //! void dimeFloatRecord::setValue(const dimeParam ¶m, dimeMemHandler * const) { this->value = param.float_data; } //! void dimeFloatRecord::getValue(dimeParam ¶m) const { param.float_data = this->value; } dime/src/records/HexRecord.cpp0100644017777301777730000000333206776622122015127 0ustar wwwwww/**************************************************************************\ * * FILE: HexRecord.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeHexRecord dime/records/HexRecord.h \brief The dimeHexRecord class is a container class for hex records. */ #include #include #include #include #include /*! Constructor. */ dimeHexRecord::dimeHexRecord(const int group_code) : dimeStringRecord(group_code) { } //! int dimeHexRecord::typeId() const { return dimeBase::dimeHexRecordType; } dime/src/records/Int16Record.cpp0100644017777301777730000000507706776622122015314 0ustar wwwwww/**************************************************************************\ * * FILE: Int16Record.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeInt16Record dime/records/Int16Record.h \brief The dimeInt16Record class is a container class for 16-bit integer records. */ #include #include #include #include /*! Constructor */ dimeInt16Record::dimeInt16Record(const int group_code, const int16 val) :dimeRecord(group_code) { this->setValue(val); } //! dimeRecord * dimeInt16Record::copy(dimeMemHandler * const mh) const { return new(mh) dimeInt16Record(this->groupCode, this->value); } /*! Sets the int16 value. */ void dimeInt16Record::setValue(const int16 val) { this->value = val; } /*! Returns the int16 value. */ int16 dimeInt16Record::getValue() const { return this->value; } //! int dimeInt16Record::typeId() const { return dimeBase::dimeInt16RecordType; } //! bool dimeInt16Record::read(dimeInput * const in) { return in->readInt16(this->value); } //! bool dimeInt16Record::write(dimeOutput * const out) { if (dimeRecord::write(out)) { return out->writeInt16(this->value); } return false; } //! void dimeInt16Record::setValue(const dimeParam ¶m, dimeMemHandler * const ) { this->value = param.int16_data; } //! void dimeInt16Record::getValue(dimeParam ¶m) const { param.int16_data = this->value; } dime/src/records/Int32Record.cpp0100644017777301777730000000505006776622122015301 0ustar wwwwww/**************************************************************************\ * * FILE: Int32Record.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeInt32Record dime/records/Int32Record.h \brief The dimeInt32Record class is a container class for 32-bit integer records. */ #include #include #include /*! Constructor */ dimeInt32Record::dimeInt32Record(const int group_code, const int32 val) : dimeRecord(group_code) { this->setValue(val); } //! dimeRecord * dimeInt32Record::copy(dimeMemHandler * const mh) const { return new(mh) dimeInt32Record(this->groupCode, this->value); } /*! Sets the int32 value to \a val. */ void dimeInt32Record::setValue(const int32 val) { this->value = val; } /*! Returns the int32 value. */ int32 dimeInt32Record::getValue() const { return this->value; } //! int dimeInt32Record::typeId() const { return dimeBase::dimeInt32RecordType; } //! bool dimeInt32Record::read(dimeInput * const in) { return in->readInt32(this->value); } //! bool dimeInt32Record::write(dimeOutput * const out) { if (dimeRecord::write(out)) { return out->writeInt32(this->value); } return false; } //! void dimeInt32Record::setValue(const dimeParam ¶m, dimeMemHandler * const ) { this->value = param.int32_data; } //! void dimeInt32Record::getValue(dimeParam ¶m) const { param.int32_data = this->value; } dime/src/records/Int8Record.cpp0100644017777301777730000000504006776622122015223 0ustar wwwwww/**************************************************************************\ * * FILE: Int8Record.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeInt8Record dime/records/Int8Record.h \brief The dimeInt8Record class is a container class for 8-bit integer records. */ #include #include #include #include /*! Constructor */ dimeInt8Record::dimeInt8Record(const int group_code, const int8 val) : dimeRecord(group_code) { this->setValue(val); } //! dimeRecord * dimeInt8Record::copy(dimeMemHandler * const mh) const { return new(mh) dimeInt8Record(this->groupCode, this->value); } /*! Sets the value. */ void dimeInt8Record::setValue(const int8 val) { this->value = val; } /*! Returns the int8 value. */ int8 dimeInt8Record::getValue() const { return this->value; } //! int dimeInt8Record::typeId() const { return dimeBase::dimeInt8RecordType; } //! bool dimeInt8Record::read(dimeInput * const in) { return in->readInt8(this->value); } //! bool dimeInt8Record::write(dimeOutput * const out) { if (dimeRecord::write(out)) { return out->writeInt8(this->value); } return false; } //! void dimeInt8Record::setValue(const dimeParam ¶m, dimeMemHandler * const ) { this->value = param.int8_data; } //! void dimeInt8Record::getValue(dimeParam ¶m) const { param.int8_data = this->value; } dime/src/records/Makefile.am0100644017777301777730000000346007402666664014604 0ustar wwwwww## Process this file with automake to generate Makefile.in. LIBS = INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC noinst_LIBRARIES = records.lst else noinst_LTLIBRARIES = librecords.la endif RecordsSources = \ DoubleRecord.cpp DoubleRecord.h \ FloatRecord.cpp FloatRecord.h \ HexRecord.cpp HexRecord.h \ Int16Record.cpp Int16Record.h \ Int32Record.cpp Int32Record.h \ Int8Record.cpp Int8Record.h \ Record.cpp Record.h \ StringRecord.cpp StringRecord.h librecords_la_SOURCES = \ $(RecordsSources) records_lst_SOURCES = \ $(RecordsSources) records.lst: Makefile $(records_lst_OBJECTS) @echo "Linking records.lst..."; \ rm -f $@; \ for i in $(records_lst_OBJECTS); do echo $$i >>$@; done ## Installation information. librecordsincdir = $(includedir)/dime/records librecordsinc_HEADERS = \ ../../include/dime/records/DoubleRecord.h \ ../../include/dime/records/FloatRecord.h \ ../../include/dime/records/HexRecord.h \ ../../include/dime/records/Int16Record.h \ ../../include/dime/records/Int32Record.h \ ../../include/dime/records/Int8Record.h \ ../../include/dime/records/Record.h \ ../../include/dime/records/StringRecord.h install-librecordsincHEADERS: $(librecordsinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(librecordsincdir) @list='$(librecordsinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(librecordsincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(librecordsincdir)/$$f; \ done uninstall-librecordsincHEADERS: @$(NORMAL_UNINSTALL) @list='$(librecordsinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(librecordsincdir)/$$f"; \ rm -f $(DESTDIR)$(librecordsincdir)/$$f; \ done dime/src/records/Makefile.in0100644017777301777730000003345607643247732014623 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ LIBS = INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = records.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = librecords.la RecordsSources = \ DoubleRecord.cpp DoubleRecord.h \ FloatRecord.cpp FloatRecord.h \ HexRecord.cpp HexRecord.h \ Int16Record.cpp Int16Record.h \ Int32Record.cpp Int32Record.h \ Int8Record.cpp Int8Record.h \ Record.cpp Record.h \ StringRecord.cpp StringRecord.h librecords_la_SOURCES = \ $(RecordsSources) records_lst_SOURCES = \ $(RecordsSources) librecordsincdir = $(includedir)/dime/records librecordsinc_HEADERS = \ ../../include/dime/records/DoubleRecord.h \ ../../include/dime/records/FloatRecord.h \ ../../include/dime/records/HexRecord.h \ ../../include/dime/records/Int16Record.h \ ../../include/dime/records/Int32Record.h \ ../../include/dime/records/Int8Record.h \ ../../include/dime/records/Record.h \ ../../include/dime/records/StringRecord.h subdir = src/records mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) records_lst_AR = $(AR) cru records_lst_LIBADD = am_records_lst_OBJECTS = DoubleRecord.$(OBJEXT) FloatRecord.$(OBJEXT) \ HexRecord.$(OBJEXT) Int16Record.$(OBJEXT) Int32Record.$(OBJEXT) \ Int8Record.$(OBJEXT) Record.$(OBJEXT) StringRecord.$(OBJEXT) records_lst_OBJECTS = $(am_records_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) librecords_la_LDFLAGS = librecords_la_LIBADD = am_librecords_la_OBJECTS = DoubleRecord.lo FloatRecord.lo HexRecord.lo \ Int16Record.lo Int32Record.lo Int8Record.lo Record.lo \ StringRecord.lo librecords_la_OBJECTS = $(am_librecords_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/DoubleRecord.Plo \ @AMDEP_TRUE@ $(DEPDIR)/DoubleRecord.Po $(DEPDIR)/FloatRecord.Plo \ @AMDEP_TRUE@ $(DEPDIR)/FloatRecord.Po $(DEPDIR)/HexRecord.Plo \ @AMDEP_TRUE@ $(DEPDIR)/HexRecord.Po $(DEPDIR)/Int16Record.Plo \ @AMDEP_TRUE@ $(DEPDIR)/Int16Record.Po $(DEPDIR)/Int32Record.Plo \ @AMDEP_TRUE@ $(DEPDIR)/Int32Record.Po $(DEPDIR)/Int8Record.Plo \ @AMDEP_TRUE@ $(DEPDIR)/Int8Record.Po $(DEPDIR)/Record.Plo \ @AMDEP_TRUE@ $(DEPDIR)/Record.Po $(DEPDIR)/StringRecord.Plo \ @AMDEP_TRUE@ $(DEPDIR)/StringRecord.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(records_lst_SOURCES) $(librecords_la_SOURCES) HEADERS = $(librecordsinc_HEADERS) DIST_COMMON = $(librecordsinc_HEADERS) Makefile.am Makefile.in SOURCES = $(records_lst_SOURCES) $(librecords_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/records/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) librecords.la: $(librecords_la_OBJECTS) $(librecords_la_DEPENDENCIES) $(CXXLINK) $(librecords_la_LDFLAGS) $(librecords_la_OBJECTS) $(librecords_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/DoubleRecord.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/DoubleRecord.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/FloatRecord.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/FloatRecord.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/HexRecord.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/HexRecord.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Int16Record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Int16Record.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Int32Record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Int32Record.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Int8Record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Int8Record.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Record.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/StringRecord.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/StringRecord.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/records @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(librecordsincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-librecordsincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-librecordsincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-librecordsincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-librecordsincHEADERS records.lst: Makefile $(records_lst_OBJECTS) @echo "Linking records.lst..."; \ rm -f $@; \ for i in $(records_lst_OBJECTS); do echo $$i >>$@; done install-librecordsincHEADERS: $(librecordsinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(librecordsincdir) @list='$(librecordsinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(librecordsincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(librecordsincdir)/$$f; \ done uninstall-librecordsincHEADERS: @$(NORMAL_UNINSTALL) @list='$(librecordsinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(librecordsincdir)/$$f"; \ rm -f $(DESTDIR)$(librecordsincdir)/$$f; \ done # 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: dime/src/records/Record.cpp0100644017777301777730000002355606776622122014474 0ustar wwwwww/**************************************************************************\ * * FILE: Record.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeRecord dime/records/Record.h \brief The dimeRecord class is the superclass of all \e record classes. */ #include #include #include #include #include #include #include #include #include #include #include /*! \fn dimeRecord::print() const Prints information about this record to \e stderr. */ /*! \fn dimeRecord *dimeRecord::copy(dimeMemHandler * const memhandler) const = 0 Returns a copy of this record. */ /*! \fn void dimeRecord::setValue(const dimeParam ¶m, dimeMemHandler * const memhandler = NULL) = 0 Sets the value of this record. The memory handler is needed by dimeStringRecord. */ /*! \fn void dimeRecord::getValue(dimeParam ¶m) const = 0 Returns the value of this record. */ /*! Constructor which sets the group code. */ dimeRecord::dimeRecord(const int group_code) : groupCode( group_code ) { } /*! Destructor. */ dimeRecord::~dimeRecord() { } /*! Sets the group code of this record. */ void dimeRecord::setGroupCode(const int group_code) { this->groupCode = group_code; } /*! Returns the group code for this record. */ int dimeRecord::getGroupCode() const { return this->groupCode; } /*! Returns \e true if this record is an end of section record. */ bool dimeRecord::isEndOfSectionRecord() const { return false; } /*! Returns \e true if this records is an end of file record. */ bool dimeRecord::isEndOfFileRecord() const { return false; } /*! \fn int dimeRecord::typeId() const This virtual function will return the type of the record. */ /*! \fn bool dimeRecord::read(dimeInput * const in) This function will read the record from the dimeInput file. */ /*! This function will write the record to the dimeOutput file. */ bool dimeRecord::write(dimeOutput * const out) { return out->writeGroupCode(groupCode); } // * static methods ******************************************************* /*! Reads and returns the next record int file \a in. */ dimeRecord * dimeRecord::readRecord(dimeInput * const in) { int32 groupcode; dimeRecord *rec = NULL; if (in->readGroupCode(groupcode)) { rec = dimeRecord::createRecord(groupcode, in->getMemHandler()); if (rec) rec->read(in); } return rec; } /*! Static function that creates a record based on the group code. if \a memhandler != NULL, it will be used to allocate the other, otherwise the default memory handler will be used. */ dimeRecord * dimeRecord::createRecord(const int group_code, dimeMemHandler * const memhandler) { int type = getRecordType(group_code); dimeRecord *record = NULL; switch (type) { case dimeBase::dimeStringRecordType: record = new(memhandler) dimeStringRecord(group_code); break; case dimeBase::dimeFloatRecordType: record = new(memhandler) dimeFloatRecord(group_code); break; case dimeBase::dimeDoubleRecordType: record = new(memhandler, sizeof(dxfdouble)) dimeDoubleRecord(group_code); break; case dimeBase::dimeInt8RecordType: record = new(memhandler) dimeInt8Record(group_code); break; case dimeBase::dimeInt16RecordType: record = new(memhandler) dimeInt16Record(group_code); break; case dimeBase::dimeInt32RecordType: record = new(memhandler) dimeInt32Record(group_code); break; case dimeBase::dimeHexRecordType: record = new(memhandler) dimeHexRecord(group_code); break; default: assert(0); break; } return record; } //! dimeRecord * dimeRecord::createRecord(const int group_code, const dimeParam ¶m, dimeMemHandler * const memhandler) { dimeRecord *record = createRecord(group_code, memhandler); if (record) record->setValue(param, memhandler); return record; } // // local function that returns the type based on the group code // used to build a look-up table // static int get_record_type(const int group_code) { int type = dimeBase::dimeStringRecordType; if (group_code < 0) { // not normally used in DXF files, but return string record to // ensure correct read & write type = dimeBase::dimeStringRecordType; } else if (group_code <= 9) { type = dimeBase::dimeStringRecordType; } else if (group_code <= 59) { // double precision floating point values. type = dimeBase::dimeDoubleRecordType; } // FIXME: this is a fix for some illegal files !!!! #ifdef DIME_FIXBIG else if (group_code <= 70) { return dimeBase::dimeInt16RecordType; } else if (group_code <= 74) { return dimeBase::dimeInt32RecordType; } #endif // DIME_FIXBIG else if (group_code <= 79) { type = dimeBase::dimeInt16RecordType; } else if (group_code <= 89) { // not defined yet. Use string. type = dimeBase::dimeStringRecordType; } else if (group_code <= 99) { type = dimeBase::dimeInt32RecordType; } else if (group_code < 140) { // only 100, 102 and 105 are defined. But use string for the rest also. type = dimeBase::dimeStringRecordType; } else if (group_code <= 147) { type = dimeBase::dimeDoubleRecordType; } else if (group_code < 170) { // not defined. Use string. type = dimeBase::dimeStringRecordType; } else if (group_code <= 178) { type = dimeBase::dimeInt16RecordType; } // XXX: this is not specified in the spec., but... else if (group_code == 210 || group_code == 220 || group_code == 230) { type = dimeBase::dimeDoubleRecordType; } else if (group_code < 270) { // not defined. Use string. type = dimeBase::dimeStringRecordType; } else if (group_code <= 275) { type = dimeBase::dimeInt8RecordType; } else if (group_code < 280) { // not defined. type = dimeBase::dimeStringRecordType; } else if (group_code <= 289) { type = dimeBase::dimeInt8RecordType; } else if (group_code < 300) { // not defined. type = dimeBase::dimeStringRecordType; } else if (group_code <= 309) { type = dimeBase::dimeStringRecordType; } else if (group_code <= 319) { // binary chunk of data type = dimeBase::dimeHexRecordType; } else if (group_code <= 329) { // hex handle value type = dimeBase::dimeHexRecordType; } else if (group_code <= 369) { // hexvalue for object ID type = dimeBase::dimeHexRecordType; } else if (group_code < 999) { // not defined. type = dimeBase::dimeStringRecordType; } else if (group_code == 999) { // comment type = dimeBase::dimeStringRecordType; } else if (group_code <= 1009) { // 255 character max string. type = dimeBase::dimeStringRecordType; } else if (group_code <= 1059) { type = dimeBase::dimeStringRecordType; // should be float according to spec, but I have found // _huge_ numbers here that do not fit into a float. // type = dimeBase::dimeFloatRecordType; } else if (group_code <= 1070) { type = dimeBase::dimeInt16RecordType; } else if (group_code == 1071) { type = dimeBase::dimeInt32RecordType; } else type = dimeBase::dimeStringRecordType; return type; } /*! Static function that returns the record type based on the group code. */ int dimeRecord::getRecordType(const int group_code) { static int first = 1; static int translation[1072]; if (first) { first = 0; for (int i = 0; i < 1072; i++) { translation[i] = get_record_type(i); } } if (group_code < 0 || group_code >= 1072) return dimeBase::dimeStringRecordType; else return translation[group_code]; } /*! Will read the next item from \a in, and store result in \a param, based on the \a group_code. */ bool dimeRecord::readRecordData(dimeInput * const in, const int group_code, dimeParam ¶m) { bool ret; int type = getRecordType(group_code); switch(type) { case dimeBase::dimeInt8RecordType: ret = in->readInt8(param.int8_data); break; case dimeBase::dimeInt16RecordType: ret = in->readInt16(param.int16_data); break; case dimeBase::dimeInt32RecordType: ret = in->readInt32(param.int32_data); break; case dimeBase::dimeFloatRecordType: ret = in->readFloat(param.float_data); break; case dimeBase::dimeDoubleRecordType: ret = in->readDouble(param.double_data); break; case dimeBase::dimeStringRecordType: param.string_data = in->readString(); ret = param.string_data != NULL; break; case dimeBase::dimeHexRecordType: param.hex_data = in->readString(); ret = param.hex_data != NULL; break; default: assert(0); ret = false; break; } return ret; } dime/src/records/StringRecord.cpp0100644017777301777730000000750307643247363015661 0ustar wwwwww/**************************************************************************\ * * FILE: StringRecord.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeStringRecord dime/records/StringRecord.h \brief The dimeStringRecord class is a container class for string records. */ #include #include #include #include #include /*! Constructor. */ dimeStringRecord::dimeStringRecord(const int group_code) : dimeRecord(group_code) { this->string = NULL; } /*! Destructor. */ dimeStringRecord::~dimeStringRecord() { delete[] this->string; } //! dimeRecord * dimeStringRecord::copy(dimeMemHandler * const mh) const { dimeStringRecord *s= new(mh) dimeStringRecord(this->groupCode); if (s) { s->setString(this->string, mh); } return s; } /*! Will store a copy of string \a s. If \a memhandler != NULL, it will be used to allocate the needed memory. If \a memhandler == NULL, the memory will be allocated from the heap. */ bool dimeStringRecord::setString(const char * const s, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->string, s); return this->string != NULL; } /*! Sets the objects string pointer to point to 's'. Be aware that if the destructor is called for this object, the object will attempt to delete the string. \sa dimeStringRecord::setString(). */ void dimeStringRecord::setStringPointer(char * const s) { this->string = s; } /*! Returns a pointer to the string. */ char * dimeStringRecord::getString() { return string; } //! bool dimeStringRecord::isEndOfSectionRecord() const { return (this->groupCode == 0) && !strcmp(string, "ENDSEC"); } //! bool dimeStringRecord::isEndOfFileRecord() const { return (this->groupCode == 0) && !strcmp(string, "EOF"); } //! int dimeStringRecord::typeId() const { return dimeBase::dimeStringRecordType; } //! bool dimeStringRecord::read(dimeInput * const in) { this->string = NULL; const char *ptr = in->readString(); if (ptr) return this->setString(ptr, in->getMemHandler()); else return false; } //! bool dimeStringRecord::write(dimeOutput * const out) { if (dimeRecord::write(out)) { // write group code return out->writeString(this->string); } return false; } //! void dimeStringRecord::setValue(const dimeParam ¶m, dimeMemHandler * const memhandler) { if (memhandler) { this->string = memhandler->stringAlloc(param.string_data); } else { this->string = new char[strlen(param.string_data)+1]; if (this->string) strcpy(this->string, param.string_data); } } //! void dimeStringRecord::getValue(dimeParam ¶m) const { param.string_data = this->string; } dime/src/sections/0040755017777301777730000000000007733212517012725 5ustar wwwwwwdime/src/sections/BlocksSection.cpp0100644017777301777730000001250707046277045016201 0ustar wwwwww/**************************************************************************\ * * FILE: BlocksSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeBlocksSection dime/sections/BlocksSection.h \brief The dimeBlocksSection class handles a BLOCKS \e section. */ #include #include #include #include #include #include #include #include static const char sectionName[] = "BLOCKS"; /*! Constructor which stores the sectioname. */ dimeBlocksSection::dimeBlocksSection(dimeMemHandler * const memhandler) : dimeSection(memhandler) { } /*! Destructor. Should only be called when no memhandler is used. */ dimeBlocksSection::~dimeBlocksSection() { if (!this->memHandler) { for (int i = 0; i < this->blocks.count(); i++) delete this->blocks[i]; } } //! dimeSection * dimeBlocksSection::copy(dimeModel * const model) const { dimeBlocksSection *bs = new dimeBlocksSection(model->getMemHandler()); for (int i = 0; i < this->blocks.count(); i++) { bs->blocks.append((dimeBlock*)this->blocks[i]->copy(model)); } return bs; } /*! This method reads a DXF BLOCKS section. */ bool dimeBlocksSection::read(dimeInput * const file) { int32 groupcode; const char *string; bool ok = true; dimeBlock *block = NULL; dimeMemHandler *memhandler = file->getMemHandler(); while (true) { if (!file->readGroupCode(groupcode) || groupcode != 0) { fprintf( stderr, "Error reading groupcode: %d\n", groupcode); ok = false; break; } string = file->readString(); if (!strcmp(string, "ENDSEC")) break; if (strcmp(string, "BLOCK")) { fprintf( stderr, "Unexpected string.\n"); ok = false; break; } block = (dimeBlock*)dimeEntity::createEntity(string, memhandler); if (block == NULL) { fprintf(stderr, "error creating block: %s\n", string); ok = false; break; } if (!block->read(file)) { fprintf(stderr,"error reading block: %s.\n", string); ok = false; break; } this->blocks.append(block); } return ok; } /*! This method writes a DXF BLOCKS section. */ bool dimeBlocksSection::write(dimeOutput * const file) { if (file->writeGroupCode(2) && file->writeString(sectionName)) { int i; for (i = 0; i < this->blocks.count(); i++) { if (!this->blocks[i]->write(file)) break; } if (i == this->blocks.count()) { return file->writeGroupCode(0) && file->writeString("ENDSEC"); } } return false; } //! int dimeBlocksSection::typeId() const { return dimeBase::dimeBlocksSectionType; } /*! This function should be called after loading has ended, and will find all forward BLOCK references. */ void dimeBlocksSection::fixReferences(dimeModel * const model) { int i, n = this->blocks.count(); for (i = 0; i < n; i++) { this->blocks[i]->fixReferences(model); } } //! int dimeBlocksSection::countRecords() const { int cnt = 0; int i, n = this->blocks.count(); for (i = 0; i < n; i++) cnt += this->blocks[i]->countRecords(); return cnt + 2; // two records are written in write() } //! const char * dimeBlocksSection::getSectionName() const { return sectionName; } /*! Returns the number of blocks in this section. */ int dimeBlocksSection::getNumBlocks() const { return this->blocks.count(); } /*! Returns the block at index \a idx. */ dimeBlock * dimeBlocksSection::getBlock(const int idx) { assert(idx >= 0 && idx < this->blocks.count()); return this->blocks[idx]; } /*! Removes (and deletes if no memhandler is used) the block at index \a idx. */ void dimeBlocksSection::removeBlock(const int idx) { assert(idx >= 0 && idx < this->blocks.count()); if (!this->memHandler) delete this->blocks[idx]; this->blocks.removeElem(idx); } /*! Inserts a new block at index \a idx. If \a idx is negative, the block will be inserted at the end of the list of blocks. */ void dimeBlocksSection::insertBlock(dimeBlock * const block, const int idx) { if (idx < 0) this->blocks.append(block); else { assert(idx <= this->blocks.count()); this->blocks.insertElem(idx, block); } } dime/src/sections/ClassesSection.cpp0100644017777301777730000001264206776622122016360 0ustar wwwwww/**************************************************************************\ * * FILE: ClassesSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeClassesSection dime/sections/ClassesSection.h \brief The dimeClassesSection class handles a CLASSES \e section. */ #include #include #include #include #include #include #include #include static const char sectionName[] = "CLASSES"; /*! Constructor. */ dimeClassesSection::dimeClassesSection(dimeMemHandler * const memhandler) : dimeSection(memhandler) { } /*! Destructor. */ dimeClassesSection::~dimeClassesSection() { if (!this->memHandler) { for (int i = 0; i < this->classes.count(); i++) delete this->classes[i]; } } //! dimeSection * dimeClassesSection::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeClassesSection *cs = new dimeClassesSection(memh); bool ok = cs != NULL; int num = this->classes.count(); if (ok && num) { cs->classes.makeEmpty(num); for (int i = 0; i < num; i++) { cs->classes.append(this->classes[i]->copy(model)); if (cs->classes[i] == NULL) { ok = false; break; } } } if (!ok) { if (!memh) delete cs; cs = NULL; } // sim_trace("classes section copy: %p\n", cs); return cs; } //! bool dimeClassesSection::read(dimeInput * const file) { int32 groupcode; const char *string; bool ok = true; dimeClass *myclass = NULL; dimeMemHandler *memhandler = file->getMemHandler(); this->classes.makeEmpty(64); // sim_trace("Reading section: CLASSES\n"); while (true) { if (!file->readGroupCode(groupcode) || (groupcode != 9 && groupcode != 0)) { fprintf(stderr,"Error reading classes groupcode: %d.\n", groupcode); // sim_warning("Error reading classes groupcode: %d.\n", groupcode); ok = false; break; } string = file->readString(); if (!strcmp(string, "ENDSEC")) break; myclass = dimeClass::createClass(string, memhandler); if (myclass == NULL) { fprintf(stderr,"error creating class: %s.\n", string); // sim_warning("error creating class: %s.\n", string); ok = false; break; } if (!myclass->read(file)) { fprintf(stderr,"error reading class: %s.\n", string); // sim_warning("error reading class: %s.\n", string); ok = false; break; } this->classes.append(myclass); } return ok; } //! bool dimeClassesSection::write(dimeOutput * const file) { // sim_trace("Writing section: CLASSES\n"); file->writeGroupCode(2); file->writeString(sectionName); int i, n = this->classes.count(); for (i = 0; i < n; i++) { if (!this->classes[i]->write(file)) break; } if (i == n) { file->writeGroupCode(0); file->writeString("ENDSEC"); return true; } return false; } //! int dimeClassesSection::typeId() const { return dimeBase::dimeClassesSectionType; } //! int dimeClassesSection::countRecords() const { int cnt = 0; int n = this->classes.count(); for (int i = 0; i < n; i++) cnt += this->classes[i]->countRecords(); return cnt + 2; // two additional records are written in write() } //! const char * dimeClassesSection::getSectionName() const { return sectionName; } /*! Returns the number of classes in this section. */ int dimeClassesSection::getNumClasses() const { return this->classes.count(); } /*! Returns the class at index \a idx. */ dimeClass * dimeClassesSection::getClass(const int idx) { assert(idx >= 0 && idx < this->classes.count()); return this->classes[idx]; } /*! Removes (and deletes if no memhandler is used) the class at index \a idx. */ void dimeClassesSection::removeClass(const int idx) { assert(idx >= 0 && idx < this->classes.count()); if (!this->memHandler) delete this->classes[idx]; this->classes.removeElem(idx); } /*! Inserts a new class at index \a idx. If \a idx is negative, the class will be inserted at the end of the list of classes. */ void dimeClassesSection::insertClass(dimeClass * const myclass, const int idx) { if (idx < 0) this->classes.append(myclass); else { assert(idx <= this->classes.count()); this->classes.insertElem(idx, myclass); } } dime/src/sections/EntitiesSection.cpp0100644017777301777730000001345707362555667016567 0ustar wwwwww/**************************************************************************\ * * FILE: EntitiesSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeEntitiesSection dime/sections/EntitiesSection.h \brief The dimeEntitiesSection class handles an ENTITIES \e section. */ #include #include #include #include #include #include #include #include #include #include #include #include static const char sectionName[] = "ENTITIES"; /*! Constructor. */ dimeEntitiesSection::dimeEntitiesSection(dimeMemHandler * const memhandler) : dimeSection(memhandler) { } /*! Destructor. */ dimeEntitiesSection::~dimeEntitiesSection() { if (!this->memHandler) { for (int i = 0; i < this->entities.count(); i++) delete this->entities[i]; } } //! dimeSection * dimeEntitiesSection::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeEntitiesSection *es = new dimeEntitiesSection(memh); bool ok = es != NULL; int num = this->entities.count(); if (ok && num) { ok = dimeEntity::copyEntityArray((const dimeEntity**) this->entities.constArrayPointer(), num, model, es->entities); if (!ok) { // sim_trace("copy entities array failed\n"); } } if (!ok) { if (!memh) delete es; es = NULL; } return es; } //! bool dimeEntitiesSection::read(dimeInput * const file) { int32 groupcode; const char *string; bool ok = true; dimeEntity *entity = NULL; dimeMemHandler *memhandler = file->getMemHandler(); this->entities.makeEmpty(1024); while (true) { if (!file->readGroupCode(groupcode) || groupcode != 0) { fprintf( stderr, "Error reading groupcode: %d.\n", groupcode); ok = false; break; } string = file->readString(); if (!strcmp(string, "ENDSEC")) break; entity = dimeEntity::createEntity(string, memhandler); if (entity == NULL) { fprintf( stderr, "Error creating entity: %s.\n", string); ok = false; break; } if (!entity->read(file)) { fprintf( stderr, "Error reading entity: %s.\n", string); ok = false; break; } this->entities.append(entity); } return ok; } //! bool dimeEntitiesSection::write(dimeOutput * const file) { // sim_trace("Writing section: ENTITIES\n"); file->writeGroupCode(2); file->writeString(sectionName); int i, n = this->entities.count(); for (i = 0; i < n; i++) { if (!this->entities[i]->write(file)) break; } if (i == n) { file->writeGroupCode(0); file->writeString("ENDSEC"); return true; } return false; } //! int dimeEntitiesSection::typeId() const { return dimeBase::dimeEntitiesSectionType; } /*! This function should be called after loading has ended, and will find all forward BLOCK references. */ void dimeEntitiesSection::fixReferences(dimeModel * const model) { int i, n = this->entities.count(); for (i = 0; i < n; i++) this->entities[i]->fixReferences(model); } //! int dimeEntitiesSection::countRecords() const { int cnt = 0; int n = this->entities.count(); for (int i = 0; i < n; i++) cnt += this->entities[i]->countRecords(); return cnt + 2; // two records are written in write() } //! const char * dimeEntitiesSection::getSectionName() const { return sectionName; } /*! Returns the number of entities in this section. Be aware that a POLYLINE entity with attached VERTEX entities will count as a single entity. */ int dimeEntitiesSection::getNumEntities() const { return this->entities.count(); } /*! Returns the entity at index \a idx. */ dimeEntity * dimeEntitiesSection::getEntity(const int idx) { assert(idx >= 0 && idx < this->entities.count()); return this->entities[idx]; } /*! Removes (and deletes if no memhandler is used) the entity at index \a idx. */ void dimeEntitiesSection::removeEntity(const int idx) { assert(idx >= 0 && idx < this->entities.count()); if (!this->memHandler) delete this->entities[idx]; this->entities.removeElem(idx); } /*! Inserts a new entity at index \a idx. If \a idx is negative, the entity will be inserted at the end of the list of entities. Entities should never be allocated on the stack. Use the new and delete operators to create/destroy entities. */ void dimeEntitiesSection::insertEntity(dimeEntity * const entity, const int idx) { if (idx < 0) this->entities.append(entity); else { assert(idx <= this->entities.count()); this->entities.insertElem(idx, entity); } } dime/src/sections/HeaderSection.cpp0100644017777301777730000001372306776622122016154 0ustar wwwwww/**************************************************************************\ * * FILE: HeaderSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeHeaderSection dime/sections/HeaderSection.h \brief The dimeHeaderSection class handles the HEADER \e section. */ #include #include #include #include #include #include #include // FIXME: use a dimeDict to speed up findVariable() static const char sectionName[] = "HEADER"; /*! Constructor */ dimeHeaderSection::dimeHeaderSection(dimeMemHandler * const memhandler) : dimeSection(memhandler) { } /*! Destructor */ dimeHeaderSection::~dimeHeaderSection() { if (!this->memHandler) { int i, n = this->records.count(); for (i = 0; i < n; i++) delete this->records[i]; } } /*! Returns a header variable. The variable attributes are copied into the \a groupcodes and \a params arrays. No more than \a maxparams attributes are copied. This method returns the number of attributes copied into the arrays, or -1 if the variable could not be found. */ int dimeHeaderSection::getVariable(const char * const variableName, int * const groupcodes, dimeParam * const params, const int maxparams) const { int i = this->findVariable(variableName); if (i >= 0) { // yup, found it! i++; int cnt = 0; int n = this->records.count(); while (i < n && cnt < maxparams && this->records[i]->getGroupCode() != 9) { groupcodes[cnt] = this->records[i]->getGroupCode(); this->records[i]->getValue(params[cnt]); cnt++; i++; } return cnt; } return -1; } /*! Sets a header variable. If the variable already exists in the header section, its value is overwritten. Otherwise, a new variable is created and appended to the existing variables. */ int dimeHeaderSection::setVariable(const char * const variableName, const int * const groupcodes, const dimeParam * const params, const int numparams, dimeMemHandler * const memhandler) { int i = findVariable(variableName); if (i < 0) { i = this->records.count(); dimeStringRecord *sr = (dimeStringRecord*)dimeRecord::createRecord(9, memhandler); if (!sr) return false; sr->setString(variableName, memhandler); this->records.append(sr); for (int j = 0; j < numparams; j++) { this->records.append(dimeRecord::createRecord(groupcodes[j], memhandler)); } } i++; int cnt = 0; for (int j = 0; j < numparams; j++) { int k = i; int n = this->records.count(); while (k < n && this->records[k]->getGroupCode() != groupcodes[j] && this->records[k]->getGroupCode() != 9) { k++; } if (k < n && this->records[k]->getGroupCode() == groupcodes[j]) { cnt++; this->records[k]->setValue(params[j]); } } return cnt; } //! const char * dimeHeaderSection::getSectionName() const { return sectionName; } //! dimeSection * dimeHeaderSection::copy(dimeModel * const model) const { dimeMemHandler *mh = model->getMemHandler(); dimeHeaderSection *hs = new dimeHeaderSection(mh); if (hs) { int i, n = this->records.count(); hs->records.makeEmpty(n); for (i = 0; i < n; i++) hs->records.append(this->records[i]->copy(mh)); } return hs; } //! bool dimeHeaderSection::read(dimeInput * const file) { dimeRecord *record; bool ok = true; this->records.makeEmpty(512); while (true) { record = dimeRecord::readRecord(file); if (record == NULL) { ok = false; break; } if (record->isEndOfSectionRecord()) { if (!file->getMemHandler()) delete record; // just delete EOS record break; } this->records.append(record); } this->records.shrinkToFit(); return ok; } //! bool dimeHeaderSection::write(dimeOutput * const file) { if (file->writeGroupCode(2) && file->writeString(sectionName)) { int i, n = this->records.count(); for (i = 0; i < n; i++) { if (!this->records[i]->write(file)) return false; } // don't forget to write EOS record file->writeGroupCode(0); return file->writeString("ENDSEC"); } return false; } //! int dimeHeaderSection::typeId() const { return dimeBase::dimeHeaderSectionType; } //! int dimeHeaderSection::countRecords() const { return this->records.count() + 2; // numrecords + SECTIONNAME + EOS } // // returns the index of the variable, or -1 if variable isn't found. // int dimeHeaderSection::findVariable(const char * const variableName) const { const int n = this->records.count(); int i; for (i = 0; i < n; i++) { if (this->records[i]->getGroupCode() == 9 && !strcmp(((dimeStringRecord*)this->records[i])->getString(), variableName)) break; } if (i < n) return i; return -1; } dime/src/sections/Makefile.am0100644017777301777730000000374007402677164014770 0ustar wwwwww## Process this file with automake to generate Makefile.in. LIBS = INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC noinst_LIBRARIES = sections.lst else noinst_LTLIBRARIES = libsections.la endif ## All source files used when building this submodule, including all ## headers. SectionsSources = \ BlocksSection.cpp BlocksSection.h \ ClassesSection.cpp ClassesSection.h \ EntitiesSection.cpp EntitiesSection.h \ HeaderSection.cpp HeaderSection.h \ ObjectsSection.cpp ObjectsSection.h \ Section.cpp Section.h \ TablesSection.cpp TablesSection.h \ UnknownSection.cpp UnknownSection.h libsections_la_SOURCES = \ $(SectionsSources) sections_lst_SOURCES = \ $(SectionsSources) sections.lst: Makefile $(sections_lst_OBJECTS) @echo "Linking sections.lst..."; \ rm -f $@; \ for i in $(sections_lst_OBJECTS); do echo $$i >>$@; done ## Installation information. libsectionsincdir = $(includedir)/dime/sections libsectionsinc_HEADERS = \ ../../include/dime/sections/BlocksSection.h \ ../../include/dime/sections/ClassesSection.h \ ../../include/dime/sections/EntitiesSection.h \ ../../include/dime/sections/HeaderSection.h \ ../../include/dime/sections/ObjectsSection.h \ ../../include/dime/sections/Section.h \ ../../include/dime/sections/TablesSection.h \ ../../include/dime/sections/UnknownSection.h install-libsectionsincHEADERS: $(libsectionsinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libsectionsincdir) @list='$(libsectionsinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libsectionsincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libsectionsincdir)/$$f; \ done uninstall-libsectionsincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libsectionsinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libsectionsincdir)/$$f"; \ rm -f $(DESTDIR)$(libsectionsincdir)/$$f; \ done dime/src/sections/Makefile.in0100644017777301777730000003417207643247732015005 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ LIBS = INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = sections.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libsections.la SectionsSources = \ BlocksSection.cpp BlocksSection.h \ ClassesSection.cpp ClassesSection.h \ EntitiesSection.cpp EntitiesSection.h \ HeaderSection.cpp HeaderSection.h \ ObjectsSection.cpp ObjectsSection.h \ Section.cpp Section.h \ TablesSection.cpp TablesSection.h \ UnknownSection.cpp UnknownSection.h libsections_la_SOURCES = \ $(SectionsSources) sections_lst_SOURCES = \ $(SectionsSources) libsectionsincdir = $(includedir)/dime/sections libsectionsinc_HEADERS = \ ../../include/dime/sections/BlocksSection.h \ ../../include/dime/sections/ClassesSection.h \ ../../include/dime/sections/EntitiesSection.h \ ../../include/dime/sections/HeaderSection.h \ ../../include/dime/sections/ObjectsSection.h \ ../../include/dime/sections/Section.h \ ../../include/dime/sections/TablesSection.h \ ../../include/dime/sections/UnknownSection.h subdir = src/sections mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) sections_lst_AR = $(AR) cru sections_lst_LIBADD = am_sections_lst_OBJECTS = BlocksSection.$(OBJEXT) \ ClassesSection.$(OBJEXT) EntitiesSection.$(OBJEXT) \ HeaderSection.$(OBJEXT) ObjectsSection.$(OBJEXT) \ Section.$(OBJEXT) TablesSection.$(OBJEXT) \ UnknownSection.$(OBJEXT) sections_lst_OBJECTS = $(am_sections_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libsections_la_LDFLAGS = libsections_la_LIBADD = am_libsections_la_OBJECTS = BlocksSection.lo ClassesSection.lo \ EntitiesSection.lo HeaderSection.lo ObjectsSection.lo \ Section.lo TablesSection.lo UnknownSection.lo libsections_la_OBJECTS = $(am_libsections_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/BlocksSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/BlocksSection.Po \ @AMDEP_TRUE@ $(DEPDIR)/ClassesSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/ClassesSection.Po \ @AMDEP_TRUE@ $(DEPDIR)/EntitiesSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/EntitiesSection.Po \ @AMDEP_TRUE@ $(DEPDIR)/HeaderSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/HeaderSection.Po \ @AMDEP_TRUE@ $(DEPDIR)/ObjectsSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/ObjectsSection.Po $(DEPDIR)/Section.Plo \ @AMDEP_TRUE@ $(DEPDIR)/Section.Po $(DEPDIR)/TablesSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/TablesSection.Po \ @AMDEP_TRUE@ $(DEPDIR)/UnknownSection.Plo \ @AMDEP_TRUE@ $(DEPDIR)/UnknownSection.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(sections_lst_SOURCES) $(libsections_la_SOURCES) HEADERS = $(libsectionsinc_HEADERS) DIST_COMMON = $(libsectionsinc_HEADERS) Makefile.am Makefile.in SOURCES = $(sections_lst_SOURCES) $(libsections_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/sections/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libsections.la: $(libsections_la_OBJECTS) $(libsections_la_DEPENDENCIES) $(CXXLINK) $(libsections_la_LDFLAGS) $(libsections_la_OBJECTS) $(libsections_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/BlocksSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/BlocksSection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ClassesSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ClassesSection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/EntitiesSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/EntitiesSection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/HeaderSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/HeaderSection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ObjectsSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ObjectsSection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Section.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/TablesSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/TablesSection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownSection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownSection.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/sections @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libsectionsincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-libsectionsincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libsectionsincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libsectionsincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libsectionsincHEADERS sections.lst: Makefile $(sections_lst_OBJECTS) @echo "Linking sections.lst..."; \ rm -f $@; \ for i in $(sections_lst_OBJECTS); do echo $$i >>$@; done install-libsectionsincHEADERS: $(libsectionsinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libsectionsincdir) @list='$(libsectionsinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libsectionsincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libsectionsincdir)/$$f; \ done uninstall-libsectionsincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libsectionsinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libsectionsincdir)/$$f"; \ rm -f $(DESTDIR)$(libsectionsincdir)/$$f; \ done # 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: dime/src/sections/ObjectsSection.cpp0100644017777301777730000001262706776622122016357 0ustar wwwwww/**************************************************************************\ * * FILE: ObjectsSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeObjectsSection dime/sections/ObjectsSection.h \brief The dimeObjectsSection object handles an OBJECTS \e section. */ #include #include #include #include #include #include #include #include static const char sectionName[] = "OBJECTS"; /*! Constructor. */ dimeObjectsSection::dimeObjectsSection(dimeMemHandler * const memhandler) : dimeSection(memhandler) { } /*! Destructor. */ dimeObjectsSection::~dimeObjectsSection() { if (!this->memHandler) { for (int i = 0; i < this->objects.count(); i++) delete this->objects[i]; } } //! dimeSection * dimeObjectsSection::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeObjectsSection *os = new dimeObjectsSection(memh); bool ok = os != NULL; int num = this->objects.count(); if (ok && num) { os->objects.makeEmpty(num); for (int i = 0; i < num; i++) { os->objects.append(this->objects[i]->copy(model)); if (os->objects[i] == NULL) { ok = false; break; } } } if (!ok) { if (!memh) delete os; os = NULL; } // sim_trace("objects section copy: %p\n", os); return os; } //! bool dimeObjectsSection::read(dimeInput * const file) { int32 groupcode; const char *string; bool ok = true; dimeObject *object = NULL; dimeMemHandler *memhandler = file->getMemHandler(); this->objects.makeEmpty(64); // sim_trace("Reading section: OBJECTS\n"); while (true) { if (!file->readGroupCode(groupcode) || groupcode != 0) { fprintf(stderr,"Error reading objects groupcode: %d.\n", groupcode); // sim_warning("Error reading objects groupcode: %d.\n", groupcode); ok = false; break; } string = file->readString(); if (!strcmp(string, "ENDSEC")) break; object = dimeObject::createObject(string, memhandler); if (object == NULL) { fprintf(stderr,"error creating object: %s.\n", string); // sim_warning("error creating object: %s.\n", string); ok = false; break; } if (!object->read(file)) { fprintf(stderr,"error reading object: %s.\n", string); // sim_warning("error reading object: %s.\n", string); ok = false; break; } this->objects.append(object); } return ok; } //! bool dimeObjectsSection::write(dimeOutput * const file) { // sim_trace("Writing section: OBJECTS\n"); file->writeGroupCode(2); file->writeString(sectionName); int i, n = this->objects.count(); for (i = 0; i < n; i++) { if (!this->objects[i]->write(file)) break; } if (i == n) { file->writeGroupCode(0); file->writeString("ENDSEC"); return true; } return false; } //! int dimeObjectsSection::typeId() const { return dimeBase::dimeObjectsSectionType; } //! int dimeObjectsSection::countRecords() const { int cnt = 0; int n = this->objects.count(); for (int i = 0; i < n; i++) cnt += this->objects[i]->countRecords(); return cnt + 2; // two additional records are written in write() } //! const char * dimeObjectsSection::getSectionName() const { return sectionName; } /*! Returns the number of objects in this section. */ int dimeObjectsSection::getNumObjects() const { return this->objects.count(); } /*! Returns the object at index \a idx. */ dimeObject * dimeObjectsSection::getObject(const int idx) { assert(idx >= 0 && idx < this->objects.count()); return this->objects[idx]; } /*! Removes (and deletes if no memhandler is used) the object at index \a idx. */ void dimeObjectsSection::removeObject(const int idx) { assert(idx >= 0 && idx < this->objects.count()); if (!this->memHandler) delete this->objects[idx]; this->objects.removeElem(idx); } /*! Inserts a new object at index \a idx. If \a idx is negative, the object will be inserted at the end of the list of objects. */ void dimeObjectsSection::insertObject(dimeObject * const object, const int idx) { if (idx < 0) this->objects.append(object); else { assert(idx <= this->objects.count()); this->objects.insertElem(idx, object); } } dime/src/sections/Section.cpp0100644017777301777730000000710207045266160015031 0ustar wwwwww/**************************************************************************\ * * FILE: Section.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeSection dime/sections/Section.h \brief The dimeSection class is the superclass for all \e section classes. Currently supported sections are: - Header (dimeHeaderSection) - Classes (dimeClassSection) - Tables (dimeTableSection) - Blocks (dimeBlockSection) - Entities (dimeEntititySection) - Objects (dimeObjectSection) */ #include #include #include #include #include #include #include #include #include #include /*! \fn int dimeSection::countRecords() const Returns the number of records in this section. */ /*! Constructor */ dimeSection::dimeSection(dimeMemHandler * const memhandler) : memHandler( memhandler ) { } /*! Empty virtual destructor. */ dimeSection::~dimeSection() { } /*! Static function used to create the correct section object from a text string. */ dimeSection * dimeSection::createSection(const char * const sectionname, dimeMemHandler *memhandler) { if (!strcmp(sectionname, "HEADER")) return new dimeHeaderSection(memhandler); #if 0 // passthrough for the moment. I can't imaging anybody is using them if (!strcmp(sectionname, "CLASSES")) return new dimeClassesSection(memhandler); if (!strcmp(sectionname, "OBJECTS")) return new dimeObjectsSection(memhandler); #endif if (!strcmp(sectionname, "TABLES")) return new dimeTablesSection(memhandler); if (!strcmp(sectionname, "BLOCKS")) return new dimeBlocksSection(memhandler); if (!strcmp(sectionname, "ENTITIES")) return new dimeEntitiesSection(memhandler); return new dimeUnknownSection(sectionname, memhandler); } //! bool dimeSection::isOfType(const int thetypeid) const { return thetypeid == dimeSectionType || dimeBase::isOfType(thetypeid); } /*! \fn const char * dimeSection::getSectionName() const = 0 */ /*! \fn dimeSection * dimeSection::copy(dimeModel * const model) const = 0 */ /*! \fn bool dimeSection::read(dimeInput * const file) = 0 */ /*! \fn bool dimeSection::write(dimeOutput * const file) = 0 */ /*! \fn int dimeSection::typeId() const = 0 */ dime/src/sections/TablesSection.cpp0100644017777301777730000001275406776622122016201 0ustar wwwwww/**************************************************************************\ * * FILE: TablesSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeTablesSection dime/sections/TablesSection.h \brief The dimeTablesSection class handles a TABLES \e section. */ #include #include #include #include #include #include #include static const char sectionName[] = "TABLES"; /*! Constructor. */ dimeTablesSection::dimeTablesSection(dimeMemHandler * const memhandler) : dimeSection( memhandler ) { } /*! Destructor. */ dimeTablesSection::~dimeTablesSection() { for (int i = 0; i < this->tables.count(); i++) delete this->tables[i]; } //! dimeSection * dimeTablesSection::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeTablesSection *ts = new dimeTablesSection(memh); int n = this->tables.count(); if (n) { int i; ts->tables.makeEmpty(n); for (i = 0; i < n; i++) { dimeTable *cp = this->tables[i]->copy(model); if (!cp) break; ts->tables.append(cp); } if (i < n) { fprintf(stderr,"Error copying TABLES section.\n"); // sim_warning("Error copying TABLES section.\n"); return NULL; } } return ts; } /*! Will read a dxf TABLES section. */ bool dimeTablesSection::read(dimeInput * const file) { int32 groupcode; const char *string; bool ok = true; dimeTable *table = NULL; dimeMemHandler *memhandler = file->getMemHandler(); // sim_trace("Reading section: TABLES\n"); while (true) { if (!file->readGroupCode(groupcode) || groupcode != 0) { fprintf(stderr,"Error reading groupcode: %d\n", groupcode); // sim_warning("Error reading groupcode: %d\n", groupcode); ok = false; break; } string = file->readString(); if (!strcmp(string, "ENDSEC")) break; if (strcmp(string, "TABLE")) { fprintf(stderr,"unexpected string.\n"); // sim_warning("unexpected string.\n"); ok = false; break; } table = new dimeTable(memhandler); if (table == NULL) { fprintf(stderr,"error creating table: %s\n", string); // sim_warning("error creating table: %s\n", string); ok = false; break; } if (!table->read(file)) { fprintf(stderr,"error reading table: %s.\n", string); // sim_warning("error reading table: %s.\n", string); ok = false; break; } this->tables.append(table); } return ok; } //! bool dimeTablesSection::write(dimeOutput * const file) { if (file->writeGroupCode(2) && file->writeString(sectionName)) { int i, n = this->tables.count(); for (i = 0; i < n; i++) { if (!this->tables[i]->write(file)) break; } if (i == n) { return file->writeGroupCode(0) && file->writeString("ENDSEC"); } } return false; } //! int dimeTablesSection::typeId() const { return dimeBase::dimeTablesSectionType; } //! int dimeTablesSection::countRecords() const { int cnt = 0; int i, n = this->tables.count(); for (i = 0; i < n; i++) cnt += this->tables[i]->countRecords(); return cnt + 2; // two records are written in write() } //! const char * dimeTablesSection::getSectionName() const { return sectionName; } /*! Returns the number of tables in this section. */ int dimeTablesSection::getNumTables() const { return this->tables.count(); } /*! Returns the table at index \a idx. */ dimeTable * dimeTablesSection::getTable(const int idx) { assert(idx >= 0 && idx < this->tables.count()); return this->tables[idx]; } /*! Removes (and deletes if no memhandler is used) the table at index \a idx. */ void dimeTablesSection::removeTable(const int idx) { assert(idx >= 0 && idx < this->tables.count()); if (!this->memHandler) delete this->tables[idx]; this->tables.removeElem(idx); } /*! Inserts a new table at index \a idx. If \a idx is negative, the table will be inserted at the end of the list of tables. Be aware that the order of the tables might be important. For instance, the LTYPE table should always precede the LAYER table. */ void dimeTablesSection::insertTable(dimeTable * const table, const int idx) { if (idx < 0) this->tables.append(table); else { assert(idx <= this->tables.count()); this->tables.insertElem(idx, table); } } dime/src/sections/UnknownSection.cpp0100644017777301777730000001061607046277045016422 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownSection.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeUnknownSection dime/sections/UnknownSection.h \brief The dimeUnknownSection class is used to support unknown sections. */ #include #include #include #include #include #include #include #include #include /*! Constructor which stores the sectioname. */ dimeUnknownSection::dimeUnknownSection(const char * const sectionname, dimeMemHandler *memhandler) : dimeSection(memhandler), records( NULL ), numRecords( 0 ) { this->sectionName = new char[strlen(sectionname)+1]; if (this->sectionName) strcpy(this->sectionName, sectionname); } /*! Destructor. */ dimeUnknownSection::~dimeUnknownSection() { delete [] this->sectionName; if (!this->memHandler) { for (int i = 0; i < this->numRecords; i++) delete this->records[i]; delete [] this->records; } } //! dimeSection * dimeUnknownSection::copy(dimeModel * const model) const { int i; dimeMemHandler *memh = model->getMemHandler(); dimeUnknownSection *us = new dimeUnknownSection(this->sectionName, memh); bool ok = us != NULL; if (ok && this->numRecords) { us->records = ARRAY_NEW(memh, dimeRecord*, this->numRecords); bool ok = us->records != NULL; if (ok) { for (i = 0; i < this->numRecords && ok; i++) { us->records[i] = this->records[i]->copy(memh); ok = us->records[i] != NULL; } us->numRecords = i; } } if (!ok) { if (!memh) delete us; us = NULL; } // sim_trace("unknown section copy: %p\n", us); return us; } //! bool dimeUnknownSection::read(dimeInput * const file) { dimeRecord *record; bool ok = true; dimeArray array(512); dimeMemHandler *memhandler = file->getMemHandler(); while (true) { record = dimeRecord::readRecord(file); if (record == NULL) { fprintf(stderr,"could not create/read record (dimeUnknownSection.cpp)" "line: %d\n", file->getFilePosition()); ok = false; break; } array.append(record); if (record->isEndOfSectionRecord()) break; } if (ok && array.count()) { if (memhandler) { this->records = (dimeRecord**) memhandler->allocMem(array.count()*sizeof(dimeRecord*)); } else { this->records = new dimeRecord*[array.count()]; } if (this->records) { int n = this->numRecords = array.count(); for (int i = 0; i < n; i++) this->records[i] = array[i]; } } return ok; } //! bool dimeUnknownSection::write(dimeOutput * const file) { if (file->writeGroupCode(2) && file->writeString(this->sectionName)) { int i; for (i = 0; i < this->numRecords; i++) { if (!this->records[i]->write(file)) break; } if (i == this->numRecords) return true; } return false; } //! int dimeUnknownSection::typeId() const { return dimeBase::dimeUnknownSectionType; } //! int dimeUnknownSection::countRecords() const { return this->numRecords + 1; // onw record is written in write() } //! const char * dimeUnknownSection::getSectionName() const { return this->sectionName; } dime/src/tables/0040755017777301777730000000000007733212517012350 5ustar wwwwwwdime/src/tables/LayerTable.cpp0100644017777301777730000001150307115233254015070 0ustar wwwwww/**************************************************************************\ * * FILE: LayerTable.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeLayerTable dime/tables/LayerTable.h \brief The dimeLayerTable class reads and writes LAYER \e tables. */ #include #include #include #include #include #include #include static const char tableName[] = "LAYER"; /*! Constructor. */ dimeLayerTable::dimeLayerTable() : colorNumber( 0 ), layerName( NULL ), layerInfo( NULL ) { } dimeLayerTable::~dimeLayerTable() { delete [] this->layerName; } //! dimeTableEntry * dimeLayerTable::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeLayerTable *l = new(memh) dimeLayerTable; l->colorNumber = this->colorNumber; if (this->layerName) { DXF_STRCPY(memh, l->layerName, this->layerName); } if (this->layerInfo) { l->layerInfo = (dimeLayer*)model->addLayer(this->layerInfo->getLayerName(), DXFABS(this->colorNumber)); } if (!copyRecords(l, model)) { // check if allocated on heap. if (!memh) delete l; l = NULL; } return l; } //! const char * dimeLayerTable::getTableName() const { return tableName; } //! bool dimeLayerTable::read(dimeInput * const file) { bool ret = dimeTableEntry::read(file); if (ret) { this->registerLayer(file->getModel()); } return ret; } //! bool dimeLayerTable::write(dimeOutput * const file) { bool ret = dimeTableEntry::preWrite(file); if (this->layerName) { ret = file->writeGroupCode(2); file->writeString(this->layerName); } file->writeGroupCode(62); file->writeInt16(this->colorNumber); ret = dimeTableEntry::write(file); return ret; } //! int dimeLayerTable::typeId() const { return dimeBase::dimeLayerTableType; } //! bool dimeLayerTable::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 2: this->setLayerName(param.string_data, memhandler); return true; case 62: this->setColorNumber(param.int16_data); return true; } return dimeTableEntry::handleRecord(groupcode, param, memhandler); } //! int dimeLayerTable::countRecords() const { int cnt = 1; // header if (this->layerInfo) cnt++; cnt++; // colorNumber return cnt + dimeTableEntry::countRecords(); } /*! Sets the layer name. */ void dimeLayerTable::setLayerName(const char * name, dimeMemHandler * const memhandler) { if (this->layerName && memhandler == NULL) { delete this->layerName; } DXF_STRCPY(memhandler, this->layerName, name); } /*! Returns the layer name. */ const char * dimeLayerTable::getLayerName(void) const { return this->layerName; } /*! Sets the color number. */ void dimeLayerTable::setColorNumber(const int16 colnum) { this->colorNumber = colnum; if (this->layerInfo) this->layerInfo->setColorNumber(DXFABS(this->colorNumber)); } /*! Returns the color number. */ int16 dimeLayerTable::getColorNumber(void) const { return this->colorNumber; } /*! Should be called _once_ after you've finished setting up your layer (name and color number). Calling this method more than once for a layer might lead to hard-to-find bugs. After calling this method, the layer information (color number) will be available to entities using this layer. */ void dimeLayerTable::registerLayer(dimeModel * model) { if (this->layerInfo == NULL && this->layerName != NULL) { this->layerInfo = (dimeLayer*) model->addLayer(this->layerName, DXFABS(this->colorNumber)); } } dime/src/tables/Makefile.am0100644017777301777730000000312307402701334014371 0ustar wwwwww## Process this file with automake to generate Makefile.in. LIBS = INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC noinst_LIBRARIES = tables.lst else noinst_LTLIBRARIES = libtables.la endif ## All source files used when building this submodule, including all ## headers. TablesSources = \ LayerTable.cpp LayerTable.h \ Table.cpp Table.h \ TableEntry.cpp TableEntry.h \ UCSTable.cpp UCSTable.h \ UnknownTable.cpp UnknownTable.h libtables_la_SOURCES = \ $(TablesSources) tables_lst_SOURCES = \ $(TablesSources) tables.lst: Makefile $(tables_lst_OBJECTS) @echo "Linking tables.lst..."; \ rm -f $@; \ for i in $(tables_lst_OBJECTS); do echo $$i >>$@; done libtablesincdir = $(includedir)/dime/tables libtablesinc_HEADERS = \ ../../include/dime/tables/LayerTable.h \ ../../include/dime/tables/Table.h \ ../../include/dime/tables/TableEntry.h \ ../../include/dime/tables/UCSTable.h \ ../../include/dime/tables/UnknownTable.h install-libtablesincHEADERS: $(libtablesinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libtablesincdir) @list='$(libtablesinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libtablesincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libtablesincdir)/$$f; \ done uninstall-libtablesincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libtablesinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libtablesincdir)/$$f"; \ rm -f $(DESTDIR)$(libtablesincdir)/$$f; \ done dime/src/tables/Makefile.in0100644017777301777730000003136407643247733014431 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ LIBS = INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = tables.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libtables.la TablesSources = \ LayerTable.cpp LayerTable.h \ Table.cpp Table.h \ TableEntry.cpp TableEntry.h \ UCSTable.cpp UCSTable.h \ UnknownTable.cpp UnknownTable.h libtables_la_SOURCES = \ $(TablesSources) tables_lst_SOURCES = \ $(TablesSources) libtablesincdir = $(includedir)/dime/tables libtablesinc_HEADERS = \ ../../include/dime/tables/LayerTable.h \ ../../include/dime/tables/Table.h \ ../../include/dime/tables/TableEntry.h \ ../../include/dime/tables/UCSTable.h \ ../../include/dime/tables/UnknownTable.h subdir = src/tables mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) tables_lst_AR = $(AR) cru tables_lst_LIBADD = am_tables_lst_OBJECTS = LayerTable.$(OBJEXT) Table.$(OBJEXT) \ TableEntry.$(OBJEXT) UCSTable.$(OBJEXT) UnknownTable.$(OBJEXT) tables_lst_OBJECTS = $(am_tables_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libtables_la_LDFLAGS = libtables_la_LIBADD = am_libtables_la_OBJECTS = LayerTable.lo Table.lo TableEntry.lo \ UCSTable.lo UnknownTable.lo libtables_la_OBJECTS = $(am_libtables_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/LayerTable.Plo $(DEPDIR)/LayerTable.Po \ @AMDEP_TRUE@ $(DEPDIR)/Table.Plo $(DEPDIR)/Table.Po \ @AMDEP_TRUE@ $(DEPDIR)/TableEntry.Plo $(DEPDIR)/TableEntry.Po \ @AMDEP_TRUE@ $(DEPDIR)/UCSTable.Plo $(DEPDIR)/UCSTable.Po \ @AMDEP_TRUE@ $(DEPDIR)/UnknownTable.Plo \ @AMDEP_TRUE@ $(DEPDIR)/UnknownTable.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(tables_lst_SOURCES) $(libtables_la_SOURCES) HEADERS = $(libtablesinc_HEADERS) DIST_COMMON = $(libtablesinc_HEADERS) Makefile.am Makefile.in SOURCES = $(tables_lst_SOURCES) $(libtables_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tables/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libtables.la: $(libtables_la_OBJECTS) $(libtables_la_DEPENDENCIES) $(CXXLINK) $(libtables_la_LDFLAGS) $(libtables_la_OBJECTS) $(libtables_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LayerTable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LayerTable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/TableEntry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/TableEntry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UCSTable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UCSTable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownTable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/UnknownTable.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/tables @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libtablesincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-libtablesincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libtablesincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libtablesincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libtablesincHEADERS tables.lst: Makefile $(tables_lst_OBJECTS) @echo "Linking tables.lst..."; \ rm -f $@; \ for i in $(tables_lst_OBJECTS); do echo $$i >>$@; done install-libtablesincHEADERS: $(libtablesinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libtablesincdir) @list='$(libtablesinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libtablesincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libtablesincdir)/$$f; \ done uninstall-libtablesincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libtablesinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libtablesincdir)/$$f"; \ rm -f $(DESTDIR)$(libtablesincdir)/$$f; \ done # 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: dime/src/tables/Table.cpp0100644017777301777730000002004407510263132014070 0ustar wwwwww/**************************************************************************\ * * FILE: Table.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeTable dime/tables/Table.h \brief The dimeTable class stores table entries. This class will not be allocated by the memory handler, but it will store a pointer to the memory handler, and it will be used to allocate table entries and records. */ #include #include #include #include #include #include #include #include #include /*! Constructor. */ dimeTable::dimeTable(dimeMemHandler * const memhandler) : maxEntries( 0 ), tablename(NULL), memHandler( memhandler ) { } /*! Destructor. */ dimeTable::~dimeTable() { int i; if (!this->memHandler) { for (i = 0; i < this->tableEntries.count(); i++) { delete this->tableEntries[i]; } for (i = 0; i < this->records.count(); i++) { delete this->records[i]; } delete[] this->tablename; } } //! dimeTable * dimeTable::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); int i; dimeTable * t = new dimeTable(memh); int n = this->records.count(); if (n) { t->records.makeEmpty(n); for (i = 0; i < n; i++) { t->records.append(this->records[i]->copy(memh)); } } n = this->tableEntries.count(); if (n) { t->tableEntries.makeEmpty(n); for (i = 0; i < n; i++) { t->tableEntries.append(this->tableEntries[i]->copy(model)); } } return t; } /*! Reads a table. */ bool dimeTable::read(dimeInput * const file) { int32 groupcode; dimeRecord *record = NULL; bool ok = true; dimeMemHandler *memh = file->getMemHandler(); do { if (!file->readGroupCode(groupcode)) {ok = false; break;} if (groupcode == 70) { if (!file->readInt16(this->maxEntries)) {ok = false; break;} } else if (groupcode == 2) { const char * s = file->readString(); if (!s) { ok = false; break; } this->setTableName(s); } else if (groupcode != 0) { record = dimeRecord::createRecord(groupcode, memh); if (!record || !record->read(file)) {ok = false; break;} records.append(record); } } while (groupcode != 0); if (ok) { if (this->maxEntries) this->tableEntries.makeEmpty(this->maxEntries); const char *string; dimeTableEntry *entry; while (ok) { if (groupcode != 0) {ok = false; break;} string = file->readString(); if (!string) {ok = false; break;} if (!strcmp(string, "ENDTAB")) break; // end of table entry = dimeTableEntry::createTableEntry(string, memh); if (!entry->read(file)) {ok = false; break;} this->tableEntries.append(entry); ok = file->readGroupCode(groupcode); } this->tableEntries.shrinkToFit(); } return ok; } /*! Writes the table to \a file. */ bool dimeTable::write(dimeOutput * const file) { bool ret = true; file->writeGroupCode(0); file->writeString("TABLE"); int i; file->writeGroupCode(2); ret = file->writeString(this->tableName()); if (ret) { for (i = 0; i < this->records.count(); i++) { if (!this->records[i]->write(file)) break; } if (i < this->records.count()) ret = false; } if (ret) { file->writeGroupCode(70); ret = file->writeInt16(this->tableEntries.count()); } if (ret) { for (i = 0; i < this->tableEntries.count(); i++) if (!this->tableEntries[i]->write(file)) break; if (i < this->tableEntries.count()) ret = false; if (ret) { file->writeGroupCode(0); file->writeString("ENDTAB"); } } return ret; } //! int dimeTable::typeId() const { return dimeBase::dimeTableType; } //! int dimeTable::tableType() const { if (this->tableEntries.count()) return this->tableEntries[0]->typeId(); return -1; } //! const char * dimeTable::tableName() const { if (this->tablename) return this->tablename; if (this->tableEntries.count()) return this->tableEntries[0]->getTableName(); return NULL; } void dimeTable::setTableName(const char * name) { if (!this->memHandler) { delete[] this->tablename; } DXF_STRCPY(this->memHandler, this->tablename, name); } /*! Counts the number of records in this table. */ int dimeTable::countRecords() const { int cnt = 2; // header + maxEntries cnt += this->records.count(); int i, n = this->tableEntries.count(); for (i = 0; i < n; i++) { cnt += this->tableEntries[i]->countRecords(); } cnt++; // ENDTAB return cnt; } /*! Returns the number of table enties in this table. */ int dimeTable::getNumTableEntries() const { return this->tableEntries.count(); } /*! Returns the table entry at index \a idx. */ dimeTableEntry * dimeTable::getTableEntry(const int idx) { assert(idx >= 0 && idx < this->tableEntries.count()); return this->tableEntries[idx]; } /*! Removes (and deletes if no memhandler is used) the table entry at index \a idx. */ void dimeTable::removeTableEntry(const int idx) { assert(idx >= 0 && idx < this->tableEntries.count()); if (!this->memHandler) delete this->tableEntries[idx]; this->tableEntries.removeElem(idx); } /*! Inserts a new table entry at index \a idx. If \a idx is negative, the table entry will be inserted at the end of the list of tableEntries. */ void dimeTable::insertTableEntry(dimeTableEntry * const tableEntry, const int idx) { if (idx < 0) this->tableEntries.append(tableEntry); else { assert(idx <= this->tableEntries.count()); this->tableEntries.insertElem(idx, tableEntry); } } /*! Returns the number of table records in this table. Table records precedes the table entries, and contain som information about this table. The max. entries record (group code 70), is handled automatically by this class, and should not be set by the user. */ int dimeTable::getNumTableRecords() const { return this->records.count(); } /*! Returns the table record at index \a idx. */ dimeRecord * dimeTable::getTableRecord(const int idx) { assert(idx >= 0 && idx < this->records.count()); return this->records[idx]; } /*! Removes (and deletes if no memhandler is used) the record at index \a idx. */ void dimeTable::removeTableRecord(const int idx) { assert(idx >= 0 && idx < this->records.count()); if (!this->memHandler) delete this->records[idx]; this->records.removeElem(idx); } /*! Inserts a new record at index \a idx. If \a idx is negative, the record will be inserted at the end of the list of records. */ void dimeTable::insertTableRecord(dimeRecord * const record, const int idx) { assert(record->getGroupCode() != 70); if (record->getGroupCode() == 2) { dimeStringRecord * rec = (dimeStringRecord*) record; this->setTableName(rec->getString()); } int i = idx >= 0 ? idx : this->records.count(); assert(i <= this->records.count()); this->records.insertElem(i, record); } dime/src/tables/TableEntry.cpp0100644017777301777730000000745007004041512015112 0ustar wwwwww/**************************************************************************\ * * FILE: TableEntry.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeTableEntry dime/tables/TableEntry.h \brief The dimeTableEntry class is the superclass for all table classes. */ #include #include #include #include #include #include #include #include #include #include #include /*! Constructor. */ dimeTableEntry::dimeTableEntry() : dimeRecordHolder(0) // table entries are separated by group code 0 { } /*! Destructor. */ dimeTableEntry::~dimeTableEntry() { } /*! Copies the unclassified records. */ bool dimeTableEntry::copyRecords(dimeTableEntry * const table, dimeModel * const model) const { return dimeRecordHolder::copyRecords(table, model->getMemHandler()); } //! bool dimeTableEntry::write(dimeOutput * const /* file */) { // moved to preWrite() //return dimeRecordHolder::write(file); return true; } //! bool dimeTableEntry::read(dimeInput * const file) { return dimeRecordHolder::read(file); } /*! Static function that creates a table based on its name. */ dimeTableEntry * dimeTableEntry::createTableEntry(const char * const name, dimeMemHandler * const memhandler) { if (!strcmp(name, "LAYER")) { return new(memhandler) dimeLayerTable; } //if (!strcmp(name, "UCS")) // UCS is not used for the moment // return new(memhandler) dimeUCSTable; return new(memhandler) dimeUnknownTable(name, memhandler); } /*! Returns the number of records for this table. Tables overloading this function should first count the number of records they will write, then add the return value of this function to get the total number of records. */ int dimeTableEntry::countRecords() const { return dimeRecordHolder::countRecords(); } //! bool dimeTableEntry::handleRecord(const int, const dimeParam &, dimeMemHandler * const) { return false; } //! bool dimeTableEntry::isOfType(const int thetypeid) const { return thetypeid == dimeBase::dimeTableEntryType || dimeRecordHolder::isOfType(thetypeid); } //! bool dimeTableEntry::preWrite(dimeOutput * const file) { return file->writeGroupCode(0) && file->writeString(this->getTableName()) && dimeRecordHolder::write(file); } /*! \fn const char * dimeTableEntry::getTableName() const = 0 */ /*! \fn dimeTableEntry * dimeTableEntry::copy(dimeModel * const model) const = 0 */ /*! \fn int dimeTableEntry::typeId() const = 0 */ dime/src/tables/UCSTable.cpp0100644017777301777730000000726406776622123014470 0ustar wwwwww/**************************************************************************\ * * FILE: UCSTable.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeUCSTable dime/tables/UCSTable.h \brief The dimeUCSTable class reads and writes UCS tables. */ #include #include #include #include #include #include #include static const char tableName[] = "UCS"; /*! Constructor. */ dimeUCSTable::dimeUCSTable() : origin(0,0,0), xaxis(1,0,0), yaxis(0,1,0) { } //! dimeTableEntry * dimeUCSTable::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeUCSTable *u = new(memh) dimeUCSTable; u->xaxis = this->xaxis; u->yaxis = this->yaxis; u->origin = this->origin; if (!this->copyRecords(u, model)) { // check if allocated on heap. if (!memh) delete u; u = NULL; } return u; } //! const char * dimeUCSTable::getTableName() const { return tableName; } //! bool dimeUCSTable::write(dimeOutput * const file) { bool ret = true; file->writeGroupCode(0); file->writeString(tableName); file->writeGroupCode(10); file->writeDouble(this->origin[0]); file->writeGroupCode(20); file->writeDouble(this->origin[1]); file->writeGroupCode(30); file->writeDouble(this->origin[2]); file->writeGroupCode(11); file->writeDouble(this->xaxis[0]); file->writeGroupCode(21); file->writeDouble(this->xaxis[1]); file->writeGroupCode(31); file->writeDouble(this->xaxis[2]); file->writeGroupCode(12); file->writeDouble(this->yaxis[0]); file->writeGroupCode(22); file->writeDouble(this->yaxis[1]); file->writeGroupCode(32); file->writeDouble(this->yaxis[2]); ret = dimeTableEntry::write(file); return ret; } //! int dimeUCSTable::typeId() const { return dimeBase::dimeUCSTableType; } //! bool dimeUCSTable::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch(groupcode) { case 10: case 20: case 30: this->origin[(groupcode/10)-1] = param.double_data; return true; case 11: case 21: case 31: this->xaxis[(groupcode/10)-1] = param.double_data; return true; case 12: case 22: case 32: this->yaxis[(groupcode/10)-1] = param.double_data; return true; } return dimeTableEntry::handleRecord(groupcode, param, memhandler); } //! int dimeUCSTable::countRecords() const { int cnt = 1 + 3 + 3 + 3; // header + origin + xaxis + yaxis return cnt + dimeTableEntry::countRecords(); } dime/src/tables/UnknownTable.cpp0100644017777301777730000000525406776622123015472 0ustar wwwwww/**************************************************************************\ * * FILE: UnknownTable.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeUnknownTable dime/tables/UnknownTable.h \brief The dimeUnknownTable class reads and writes undefined tables. */ #include #include #include #include #include #include #include /*! Constructor. */ dimeUnknownTable::dimeUnknownTable(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->tableName, name); } /*! Destructor. Should only be called if no memhandler is used. */ dimeUnknownTable::~dimeUnknownTable() { delete this->tableName; } //! dimeTableEntry * dimeUnknownTable::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeUnknownTable *u = new(memh) dimeUnknownTable(this->tableName, memh); if (!this->copyRecords(u, model)) { // check if allocated on heap. if (!memh) delete u; u = NULL; } return u; } //! bool dimeUnknownTable::write(dimeOutput * const file) { bool ret = dimeTableEntry::preWrite(file); if (ret) { ret = dimeTableEntry::write(file); } return ret; } //! int dimeUnknownTable::typeId() const { return dimeBase::dimeUnknownTableType; } //! int dimeUnknownTable::countRecords() const { return 1 + dimeTableEntry::countRecords(); } //! const char * dimeUnknownTable::getTableName() const { return this->tableName; } dime/src/util/0040755017777301777730000000000007733212517012053 5ustar wwwwwwdime/src/util/Array.cpp0100644017777301777730000000660606776622123013646 0ustar wwwwww/**************************************************************************\ * * FILE: Array.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeArray dime/util/Array.h \brief The dimeArray class is internal / private. The dimeArray class is a container class for a growable array. Whenever the allocated space for the array becomes too small, the array is moved to a memory block that is twice as large. This class is dangerous to use, because it does not check for bounds and other things for efficiency reasons. Inspect the source code - don't assume anything... */ /*! \fn void dimeArray::removeElem( const int index ) This method removes an element from the array, moving all subsequent elements one position up. */ /*! \fn void dimeArray::removeElemFast( const int index ) This method removes an element from the array, and moves the last element into its place at the same index. The order of the elements is distorted, in other words. */ /*! \fn void dimeArray::setCount( const int count ) This method sets the logical size of the array to \a count without changing the size of the array. Do not increase the array size with this function! This method is useful for reusing an array that will grow to approximately the same size each time it is used. */ /*! \fn void dimeArray::makeEmpty( const int initsize = 4 ) This method makes the logical array empty, and deallocates the memory used by it, only allocating space for a small array of size \a initsize. */ /*! \fn int dimeArray::count() const This method returns the number of elements in the array. */ /*! \fn int dimeArray::allocSize() const This method returns the size allocated for the array. */ /*! \fn void dimeArray::freeMemory() This method frees all the memory used by the class. The dimeArray class is probably unusable afterwards. */ /*! \fn T * dimeArray::arrayPointer() This method returns a pointer to the allocated array. */ /*! \fn const T * dimeArray::constArrayPointer() const This method returns a pointer to the allocated array. */ /*! \fn void dimeArray::shrinkToFit() This method moves the array into a memory block exactly the same size of the array. This will free up any overhead caused by the array doubling mechanism. */ dime/src/util/BSPTree.cpp0100644017777301777730000002256407676263206014040 0ustar wwwwww/**************************************************************************\ * * FILE: BSPTree.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #include #include #include #include #include #include /*! \class dimeBSPTree \brief The dimeBSPTree class is a simple BSP tree implementation. */ // define this to do a sorted split (slower, but more efficient?) // #define BSP_SORTED_SPLIT class dime_bspnode { public: dime_bspnode(dimeArray *array); ~dime_bspnode(); int addPoint(const dimeVec3f &pt, const int maxpts); int findPoint(const dimeVec3f &pt) const; int removePoint(const dimeVec3f &pt); private: void sort(); void split(); bool leftOf(const dimeVec3f &pt) const; enum { // do not change these values! DIM_YZ = 0, DIM_XZ = 1, DIM_XY = 2, DIM_NONE }; dime_bspnode *left; dime_bspnode *right; int dimension; // which dimension? // position in dimension (use double to avoid floating point // precision problems) double position; dimeArray indices; dimeArray *pointsArray; }; dime_bspnode::dime_bspnode(dimeArray *ptsarray) : indices(4) { this->left = this->right = NULL; this->pointsArray = ptsarray; this->dimension = DIM_NONE; } dime_bspnode::~dime_bspnode() { delete left; delete right; } inline bool dime_bspnode::leftOf(const dimeVec3f &pt) const { return double(pt[this->dimension]) < this->position; } int dime_bspnode::addPoint(const dimeVec3f &pt, const int maxpts) { if (this->left) { // node has been split if (this->leftOf(pt)) return this->left->addPoint(pt, maxpts); else return this->right->addPoint(pt, maxpts); } else if (this->indices.count() >= maxpts) { split(); return this->addPoint(pt, maxpts); } else { int n = this->indices.count(); int i; dimeVec3f tmp; for (i = 0; i < n; i++) { pointsArray->getElem(this->indices[i], tmp); if (pt == tmp) break; } if (i == n) { int idx = this->pointsArray->count(); this->pointsArray->append(pt); this->indices.append(idx); return idx; } return this->indices[i]; } } int dime_bspnode::findPoint(const dimeVec3f &pt) const { if (this->left) { if (this->leftOf(pt)) return this->left->findPoint(pt); else return this->right->findPoint(pt); } else { int i, n = this->indices.count(); for (i = 0; i < n; i++) { dimeVec3f arrpt; this->pointsArray->getElem(this->indices[i], arrpt); if (pt == arrpt) return this->indices[i]; } } return -1; } int dime_bspnode::removePoint(const dimeVec3f &pt) { if (this->left) { if (this->leftOf(pt)) return this->left->removePoint(pt); else return this->right->removePoint(pt); } else { int i, n = this->indices.count(); for (i = 0; i < n; i++) { dimeVec3f arrpt; this->pointsArray->getElem(this->indices[i], arrpt); if (pt == arrpt) { int idx = this->indices[i]; this->indices.removeElemFast(i); return idx; } } } return -1; } void dime_bspnode::split() { assert(this->left == NULL && this->right == NULL); this->left = new dime_bspnode(this->pointsArray); this->right = new dime_bspnode(this->pointsArray); dimeBox box; int i, n = this->indices.count(); for (i = 0; i < n; i++) { box.grow(this->pointsArray->getElem(this->indices[i])); } dimeVec3f diag = box.max - box.min; int dim; double pos; if (diag[0] > diag[1]) { if (diag[0] > diag[2]) dim = DIM_YZ; else dim = DIM_XY; } else { if (diag[1] > diag[2]) dim = DIM_XZ; else dim = DIM_XY; } this->dimension = dim; // set the dimension dxfdouble mid = (box.min[dim] + box.max[dim]) / 2.0f; #ifdef BSP_SORTED_SPLIT this->sort(); // sort vertices on ascending dimension values int splitidx = n / 2; pos = (this->pointsArray->getElem(this->indices[splitidx-1])[dim]+ this->pointsArray->getElem(this->indices[splitidx])[dim])/ 2.0f; // got to check and adjust for special cases if (pos == box.min[dim] || pos == box.max[dim]) { pos = (pos + mid) / 2.0f; } #else pos = (double(box.min[this->dimension])+double(box.max[this->dimension])) / 2.0; #endif // BSP_SORTED_SPLIT this->position = pos; for (i = 0; i < n; i++) { int idx = this->indices[i]; if (this->leftOf(this->pointsArray->getElem(idx))) this->left->indices.append(idx); else this->right->indices.append(idx); } assert(this->left->indices.count() && this->right->indices.count()); // will never be used anymore this->indices.freeMemory(); } // // an implementation of the shellsort algorithm // void dime_bspnode::sort() { int *idxarray = this->indices.arrayPointer(); int num = this->indices.count(); int dim = this->dimension; dimeVec3f *points = this->pointsArray->arrayPointer(); int i, j, distance; int idx; for (distance = 1; distance <= num/9; distance = 3*distance + 1); for (; distance > 0; distance /= 3) { for (i = distance; i < num; i++) { idx = idxarray[i]; j = i; while (j >= distance && points[idxarray[j-distance]][dim] > points[idx][dim]) { idxarray[j] = idxarray[j-distance]; j -= distance; } idxarray[j] = idx; } } } /*! Constructor. Will create an empty BSP tree with one node. \a maxnodepts is the maximume number of points in a BSP node. \a initsize is the initial size of the arrays that holds the coordinates and userdata. */ dimeBSPTree::dimeBSPTree(const int maxnodepts, const int initsize) : pointsArray(initsize), userdataArray(initsize) { this->boundingBox = new dimeBox; this->topnode = new dime_bspnode(&this->pointsArray); this->maxnodepoints = maxnodepts; } /*! Destructor. Will free all memory used. */ dimeBSPTree::~dimeBSPTree() { delete this->topnode; delete this->boundingBox; } /*! Returns the number of points in the BSP tree. */ int dimeBSPTree::numPoints() const { return this->pointsArray.count(); } /*! Returns the coordinates for the point at index \a idx. \sa dimeBSPTree::numPoints() */ void dimeBSPTree::getPoint(const int idx, dimeVec3f &pt) { assert(idx < this->pointsArray.count()); this->pointsArray.getElem(idx, pt); } /*! Returns the user data for the point at index \a idx. */ void * dimeBSPTree::getUserData(const int idx) const { assert(idx < this->userdataArray.count()); return this->userdataArray[idx]; } /*! Sets the user data for the point with index \a idx. */ void dimeBSPTree::setUserData(const int idx, void * const data) { assert(idx < this->userdataArray.count()); this->userdataArray[idx] = data; } /*! Attempts to add a new point into the BSP tree. If a point with the same coordinates as \a pt already is in the tree, the index to that point will be returned. Otherwise, the point is appended at the end of the list of points, the userdata is set, and the new index is returned. */ int dimeBSPTree::addPoint(const dimeVec3f &pt, void * const data) { this->boundingBox->grow(pt); int ret = this->topnode->addPoint(pt, this->maxnodepoints); if (ret == this->userdataArray.count()) { this->userdataArray.append(data); } return ret; } /*! \overload */ int dimeBSPTree::removePoint(const dimeVec3f &pt) { return this->topnode->removePoint(pt); } /*! Removes the point at \a index. The BSP tree will not be restructured, no matter how many points you remove. */ void dimeBSPTree::removePoint(const int idx) { assert(idx < this->pointsArray.count()); this->removePoint(this->pointsArray[idx]); } /*! Searches for a point with coordinates \a pos. Returns the index if found, -1 otherwise */ int dimeBSPTree::findPoint(const dimeVec3f &pos) const { return topnode->findPoint(pos); } /*! Frees the memory used by the BSP tree. Do not use the BSP tree after this method has been called. */ void dimeBSPTree::clear(const int initsize) { delete this->topnode; this->topnode = NULL; this->pointsArray.makeEmpty(initsize); this->userdataArray.makeEmpty(initsize); this->topnode = new dime_bspnode(&this->pointsArray); this->boundingBox->makeEmpty(); } /*! Returns the bounding box for all points in the BSP tree. */ const dimeBox * dimeBSPTree::getBBox() const { return this->boundingBox; } dime/src/util/Box.cpp0100644017777301777730000000606406776622123013316 0ustar wwwwww/**************************************************************************\ * * FILE: Box.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ #include #include template inline Type SIMSQR(const Type val) { return val*val; } dimeBox::dimeBox() { makeEmpty(); } dimeBox::dimeBox(const dxfdouble x0, const dxfdouble y0, const dxfdouble z0, const dxfdouble x1, const dxfdouble y1, const dxfdouble z1) { this->min.setValue(x0, y0, z0); this->max.setValue(x1, y1, z1); } void dimeBox::set(const dxfdouble x0, const dxfdouble y0, const dxfdouble z0, const dxfdouble x1, const dxfdouble y1, const dxfdouble z1) { this->min.setValue(x0, y0, z0); this->max.setValue(x1, y1, z1); } void dimeBox::get(dxfdouble &x0, dxfdouble &y0, dxfdouble &z0, dxfdouble &x1, dxfdouble &y1, dxfdouble &z1) const { this->min.getValue(x0, y0, z0); this->max.getValue(x1, y1, z1); } bool dimeBox::operator & (const dimeBox &box) const { return ! (box.min[0] >= this->max[0] || box.max[0] < this->min[0] || box.min[1] >= this->max[1] || box.max[1] < this->min[1] || box.min[2] >= this->max[2] || box.max[2] < this->min[2]); } void dimeBox::grow(const dimeVec3f &pt) { if (min[0] > pt[0]) min[0] = pt[0]; if (max[0] < pt[0]) max[0] = pt[0]; if (min[1] > pt[1]) min[1] = pt[1]; if (max[1] < pt[1]) max[1] = pt[1]; if (min[2] > pt[2]) min[2] = pt[2]; if (max[2] < pt[2]) max[2] = pt[2]; } dxfdouble dimeBox::size() const { dxfdouble dx = max[0] - min[0]; dxfdouble dy = max[1] - min[1]; dxfdouble dz = max[2] - min[2]; return (dxfdouble) sqrt(dx*dx+dy*dy+dz*dz); } bool dimeBox::hasExtent() const { return !(min[0] == FLT_MAX || min[1] == FLT_MAX || min[2] == FLT_MAX || max[0] == -FLT_MAX || max[1] == -FLT_MAX || max[2] == -FLT_MAX); } void dimeBox::makeEmpty() { this->min.setValue(FLT_MAX, FLT_MAX, FLT_MAX); this->max.setValue(-FLT_MAX, -FLT_MAX, -FLT_MAX); } dime/src/util/Dict.cpp0100644017777301777730000001237606776622123013454 0ustar wwwwww/**************************************************************************\ * * FILE: Dict.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeDict dime/util/Dict.h \brief The dimeDict class is internal / private. It offers quick (hashing) lookup for strings. */ /*! \class dimeDictEntry dime/util/Dict.h \brief The dimeDictEntry class is internal / private. */ #include #include /*! Constructor. Creates \a entries buckets. */ dimeDict::dimeDict(const int entries) { this->tableSize = entries; this->buckets = new dimeDictEntry *[tableSize]; for (int i = 0; i < tableSize; i++) buckets[i] = NULL; } /*! Destructor. */ dimeDict::~dimeDict() { clear(); delete [] buckets; } /*! Clear all entries in the dictionary. */ void dimeDict::clear() { int i; dimeDictEntry *entry, *nextEntry; for(i = 0; i < tableSize; i++) { for(entry = buckets[i]; entry != NULL; entry = nextEntry) { nextEntry = entry->next; delete entry; } buckets[i] = NULL; } } /*! Insert a new string \a key in the dictionary, and associates a id (= \a value) to it. Returns a pointer to the string. If the string is already in the dictionary, the old id is replaced with \a value; */ const char * dimeDict::enter(const char * const key, void *value) { dimeDictEntry *&entry = findEntry(key); if(entry == NULL) { entry = new dimeDictEntry(key, value); if (entry == NULL) return NULL; entry->next = NULL; return entry->key; } else { entry->value = value; return entry->key; } } /*! Inserts a new string \a key in the dictionary. This function returns \e true if the string was not already in the dictionary, \e false otherwise. The string pointer is returned in \a ptr. */ bool dimeDict::enter(const char * const key, char *&ptr, void *value) { dimeDictEntry *&entry = findEntry(key); if(entry == NULL) { entry = new dimeDictEntry(key, value); if (entry == NULL) { ptr = NULL; return false; } entry->next = NULL; ptr = entry->key; return true; } else { entry->value = value; ptr = entry->key; return false; } } /*! Finds if \a key is in the dictionary. Returns the string pointer if found, NULL otherwise. */ const char * dimeDict::find(const char * const key) const { dimeDictEntry *&entry = findEntry(key); if (entry) return entry->key; return NULL; } /*! Finds if \a key is in the dictionary. Returns true if found. */ bool dimeDict::find(const char * const key, void *&value) const { dimeDictEntry *&entry = findEntry(key); if(entry == NULL) { value = NULL; return false; } else { value = entry->value; return true; } } /*! Remove \a key from the dictionary. */ bool dimeDict::remove(const char * const key) { dimeDictEntry *&entry = findEntry(key); dimeDictEntry *tmp; if(entry == NULL) return false; else { tmp = entry; entry = entry->next; delete tmp; return true; } } // private funcs dimeDictEntry *& dimeDict::findEntry(const char * const key) const { dimeDictEntry **entry; entry = &buckets[bucketNr(key) % tableSize]; while(*entry != NULL) { if(strcmp((*entry)->key, key) == 0) break; entry = &(*entry)->next; } return *entry; } unsigned int dimeDict::bucketNr(const char *s) const { unsigned int total, shift; total = shift = 0; while (*s) { total = total ^ ((*s) << shift); shift+=5; if (shift>24) shift -= 24; s++; } return total % tableSize; } /* For debugging */ void dimeDict::dump(void) { int i; dimeDictEntry *entry, *nextEntry; for(i = 0; i < tableSize; i++) { for(entry = buckets[i]; entry != NULL; entry = nextEntry) { nextEntry = entry->next; printf("entry: '%s' %p\n", entry->key, entry->value); } } } void dimeDict::print_info() { int i, cnt; dimeDictEntry *entry; printf("---------- dict info ------------------\n"); for (i = 0; i < tableSize; i++) { entry = buckets[i]; cnt = 0; while(entry) { entry = entry->next; cnt++; } printf(" bucket: %d, cnt: %d\n",i, cnt); } printf("\n\n\n"); } dime/src/util/Linear.cpp0100644017777301777730000003036307445414576014004 0ustar wwwwww/**************************************************************************\ * * FILE: Linear.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeVec2f dime/util/Linear.h \brief The dimeVec2f class is for containing and operating on a 2D vector / coordinate. */ /*! \class dimeVec3f dime/util/Linear.h \brief The dimeVec3f class is for containing and operating on a 3D vector / coordinate. */ /*! \class dimeMatrix dime/util/Linear.h \brief The dimeMatrix class is for containing and operating on a four-by-four matrix. */ #include #include #if 0 // OBSOLETED, was needed for old inverse() method #if defined(__sgi) || defined (__sparc) #include #endif #ifdef _WIN32 #include "float.h" #define fpclass _fpclass #define FP_NZERO _FPCLASS_NZ #define FP_PZERO _FPCLASS_PZ #define M_PI 3.14159265357989 #elif defined(__hpux) #define fpclass fpclassify #define FP_NZERO FP_MINUS_ZERO #define FP_PZERO FP_PLUS_ZERO #endif #ifdef macintosh #include "float.h" #define M_PI 3.14159265357989 #endif #endif // OBSOLETED void dimeVec3f::normalize(void) { dxfdouble dot = x*x + y*y + z*z; if (dot > 0.0) { dot = 1.0 / sqrt(dot); x *= dot; y *= dot; z *= dot; } } dxfdouble dimeVec3f::angle(const dimeVec3f &v2) { dxfdouble cos,len; if ((len=length()*v2.length())==0.0f) return 0.0; cos = this->dot(v2) / len; if (cos > 1.0) cos = 1.0; if (cos < -1.0) cos = -1.0; return acos(cos); } dimeMatrix::dimeMatrix(const dimeMatrix &m) { dxfdouble *p1 = &this->matrix[0][0]; const dxfdouble *p2 = &m.matrix[0][0]; int n = 16; while (n--) *p1++ = *p2++; } dimeMatrix::dimeMatrix(dxfdouble a11, dxfdouble a12, dxfdouble a13, dxfdouble a14, dxfdouble a21, dxfdouble a22, dxfdouble a23, dxfdouble a24, dxfdouble a31, dxfdouble a32, dxfdouble a33, dxfdouble a34, dxfdouble a41, dxfdouble a42, dxfdouble a43, dxfdouble a44) { this->matrix[0][0] = a11; this->matrix[0][1] = a12; this->matrix[0][2] = a13; this->matrix[0][3] = a14; this->matrix[1][0] = a21; this->matrix[1][1] = a22; this->matrix[1][2] = a23; this->matrix[1][3] = a24; this->matrix[2][0] = a31; this->matrix[2][1] = a32; this->matrix[2][2] = a33; this->matrix[2][3] = a34; this->matrix[3][0] = a41; this->matrix[3][1] = a42; this->matrix[3][2] = a43; this->matrix[3][3] = a44; } void dimeMatrix::transpose() { dxfdouble tmp; for (int i = 0; i < 3; i++) { for (int j = i+1; j < 4; j++) { tmp = this->matrix[i][j]; this->matrix[i][j] = this->matrix[j][i]; this->matrix[j][i] = tmp; } } } void dimeMatrix::makeIdentity() { matrix[0][0]=matrix[1][1]=matrix[2][2]=matrix[3][3]=1.0f; matrix[0][1]=matrix[0][2]=matrix[0][3]= matrix[1][0]=matrix[1][2]=matrix[1][3]= matrix[2][0]=matrix[2][1]=matrix[2][3]= matrix[3][0]=matrix[3][1]=matrix[3][2]=0.0f; } bool dimeMatrix::isIdentity() const { return matrix[0][0] == 1.0f && matrix[1][1] == 1.0f && matrix[2][2] == 1.0f && matrix[3][3] == 1.0f && matrix[0][1] == 0.0f && matrix[0][2] == 0.0f && matrix[0][3] == 0.0f && matrix[1][0] == 0.0f && matrix[1][2] == 0.0f && matrix[1][3] == 0.0f && matrix[2][0] == 0.0f && matrix[2][1] == 0.0f && matrix[2][3] == 0.0f && matrix[3][0] == 0.0f && matrix[3][1] == 0.0f && matrix[3][2] == 0.0f; } // FIXME: only 2D rotation is supported void dimeMatrix::setTransform(const dimeVec3f &translation, const dimeVec3f &scalefactor, const dimeVec3f &rotAngles) { /* fprintf(stderr,"set transform: %.3f %.3f %.3f - %.3f %.3f %.3f - %.3f\n", translation[0], translation[1], translation[2], scalefactor[0], scalefactor[1], scalefactor[2], rotAngles[0]);*/ this->makeIdentity(); this->setTranslate(translation); dimeMatrix m2, m3; m2.makeIdentity(); m2.setRotate(rotAngles); this->multRight(m2); // do rotate before translate m3.makeIdentity(); m3.setScale(scalefactor); this->multRight(m3); // do scale before rotate /* fprintf(stderr, "%.3f %.3f %.3f %.3f\n" "%.3f %.3f %.3f %.3f\n" "%.3f %.3f %.3f %.3f\n" "%.3f %.3f %.3f %.3f\n", matrix[0][0], matrix[0][1], matrix[0][2], matrix[0][3], matrix[1][0], matrix[1][1], matrix[1][2], matrix[1][3], matrix[2][0], matrix[2][1], matrix[2][2], matrix[2][3], matrix[3][0], matrix[3][1], matrix[3][2], matrix[3][3]); */ } dimeMatrix & dimeMatrix::multRight(const dimeMatrix &m) // this = this * m { dimeMatrix copy = *this; dxfdouble (*mat1)[4] = (dxfdouble (*)[4])copy.matrix; dxfdouble (*mat2)[4] = (dxfdouble (*)[4])m.matrix; int i, j, n; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { matrix[i][j] = 0.0f; for (n = 0; n < 4; n++) matrix[i][j] += mat1[i][n] * mat2[n][j]; } } return *this; } dimeMatrix & dimeMatrix::multLeft(const dimeMatrix &m) // this = m * this { dimeMatrix copy = *this; dxfdouble (*mat1)[4] = (dxfdouble (*)[4])m.matrix; dxfdouble (*mat2)[4] = (dxfdouble (*)[4])copy.matrix; int i, j, n; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { matrix[i][j] = 0.0f; for (n = 0; n < 4; n++) matrix[i][j] += mat1[i][n] * mat2[n][j]; } } return *this; } // FIXME: only XY rotation supported void dimeMatrix::setRotate(const dimeVec3f &rot) { dxfdouble s = sin(DXFDEG2RAD(rot.z)); dxfdouble c = cos(DXFDEG2RAD(rot.z)); this->matrix[0][0] = c; this->matrix[0][1] = -s; this->matrix[1][0] = s; this->matrix[1][1] = c; } void dimeMatrix::setRotate(const dimeVec3f &x, const dimeVec3f &y, const dimeVec3f &z) { this->matrix[0][0] = x.x; this->matrix[1][0] = x.y; this->matrix[2][0] = x.z; this->matrix[3][0] = 0.0f; this->matrix[0][1] = y.x; this->matrix[1][1] = y.y; this->matrix[2][1] = y.z; this->matrix[3][1] = 0.0f; this->matrix[0][2] = z.x; this->matrix[1][2] = z.y; this->matrix[2][2] = z.z; this->matrix[3][2] = 0.0f; this->matrix[0][3] = this->matrix[1][3] = this->matrix[2][3] = 0.0f; this->matrix[3][3] = 1.0f; } void dimeMatrix::setRotation(const dimeVec3f &u, const dxfdouble angle) { dxfdouble cost,sint; cost=cos(angle); sint=sin(angle); matrix[3][0]=matrix[3][1]=matrix[3][2]= matrix[0][3]=matrix[1][3]=matrix[2][3]=0.0f; matrix[3][3]=1.0f; matrix[0][0]=u[0]*u[0]+cost*(1-u[0]*u[0]); matrix[0][1]=u[0]*u[1]*(1-cost)-u[2]*sint; matrix[0][2]=u[2]*u[0]*(1-cost)+u[1]*sint; matrix[1][0]=u[0]*u[1]*(1-cost)+u[2]*sint; matrix[1][1]=u[1]*u[1]+cost*(1-u[1]*u[1]); matrix[1][2]=u[1]*u[2]*(1-cost)-u[0]*sint; matrix[2][0]=u[2]*u[0]*(1-cost)-u[1]*sint; matrix[2][1]=u[1]*u[2]*(1-cost)+u[0]*sint; matrix[2][2]=u[2]*u[2]+cost*(1-u[2]*u[2]); } void dimeMatrix::setScale(const dxfdouble s) { this->matrix[0][0] = this->matrix[1][1] = this->matrix[2][2] = s; } void dimeMatrix::setScale(const dimeVec3f &s) { this->matrix[0][0] = s.x; this->matrix[1][1] = s.y; this->matrix[2][2] = s.z; } void dimeMatrix::setTranslate(const dimeVec3f &t) { this->matrix[0][3] = t.x; this->matrix[1][3] = t.y; this->matrix[2][3] = t.z; } void dimeMatrix::multMatrixVec(dimeVec3f &vec) const { dimeVec3f copy = vec; multMatrixVec(copy, vec); } // Multiplies matrix by given column vector, giving vector result void dimeMatrix::multMatrixVec(const dimeVec3f &src, dimeVec3f &dst) const { dxfdouble W = src.x*matrix[3][0]+ src.y*matrix[3][1]+ src.z*matrix[3][2]+ matrix[3][3]; dst.x = (src.x*matrix[0][0]+ src.y*matrix[0][1]+ src.z*matrix[0][2]+ matrix[0][3])/W; dst.y = (src.x*matrix[1][0]+ src.y*matrix[1][1]+ src.z*matrix[1][2]+ matrix[1][3])/W; dst.z = (src.x*matrix[2][0]+ src.y*matrix[2][1]+ src.z*matrix[2][2]+ matrix[2][3])/W; } dimeMatrix & dimeMatrix::operator =(const dimeMatrix &m) { dxfdouble *p1 = &this->matrix[0][0]; const dxfdouble *p2 = &m.matrix[0][0]; int n = 16; while (n--) *p1++ = *p2++; return *this; } dimeMatrix dimeMatrix::identity() { return dimeMatrix(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f ,0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); } void dimeMatrix::operator*=(const dxfdouble s) { dxfdouble *ptr = &this->matrix[0][0]; int n = 16; while (n--) *ptr++ *= s; } bool dimeMatrix::inverse2() { #if 0 // OBSOLETED dimeMatrix A_; dxfdouble detA; A_.matrix[0][0]=determinant(0,0); A_.matrix[1][0]=-determinant(0,1); A_.matrix[2][0]=determinant(0,2); A_.matrix[3][0]=-determinant(0,3); A_.matrix[0][1]=-determinant(1,0); A_.matrix[1][1]=determinant(1,1); A_.matrix[2][1]=-determinant(1,2); A_.matrix[3][1]=determinant(1,3); A_.matrix[0][2]=determinant(2,0); A_.matrix[1][2]=-determinant(2,1); A_.matrix[2][2]=determinant(2,2); A_.matrix[3][2]=-determinant(2,3); A_.matrix[0][3]=-determinant(3,0); A_.matrix[1][3]=determinant(3,1); A_.matrix[2][3]=-determinant(3,2); A_.matrix[3][3]=determinant(3,3); detA=determinant(); #if defined(__linux__) if(isinf(1.0f/detA)) return false; #elif defined(macintosh) if(isinf(1.0f/detA)) return false; #elif !defined(__BEOS__) if(fpclass(detA) == FP_NZERO || fpclass(detA) == FP_PZERO) return false; #endif A_*= 1 / detA; *this = A_; return true; #else // OBSOLETED return false; #endif // OBSOLETED } dxfdouble dimeMatrix::determinant(const int i, const int j) { int a,t; dxfdouble det=0.0f; if (i==-1 && j==-1) { //4x4 determinant det+=matrix[0][0]*determinant(0,0); det-=matrix[1][0]*determinant(1,0); det+=matrix[2][0]*determinant(2,0); det-=matrix[3][0]*determinant(3,0); return det; } else { //3x3 determinant int x[3],y[3]; for (a=0,t=0;a<3;a++) if (t!=i) x[a]=t++;else {t++;x[a]=t++;} for (a=0,t=0;a<3;a++) if (t!=j) y[a]=t++;else {t++;y[a]=t++;} det += matrix[x[0]][y[0]]*(matrix[x[1]][y[1]]*matrix[x[2]][y[2]] - matrix[x[2]][y[1]]*matrix[x[1]][y[2]]); det -= matrix[x[1]][y[0]]*(matrix[x[0]][y[1]]*matrix[x[2]][y[2]] - matrix[x[2]][y[1]]*matrix[x[0]][y[2]]); det += matrix[x[2]][y[0]]*(matrix[x[0]][y[1]]*matrix[x[1]][y[2]] - matrix[x[1]][y[1]]*matrix[x[0]][y[2]]); } return det; } bool dimeMatrix::inverse() { int n = 4; dxfdouble (*a)[4]; a = (dxfdouble (*)[4])&this->matrix[0][0]; dxfdouble max, s, h, q, pivot; int p[4]; int i, j, k; for (k = 0; k < n; k++) { max = 0.0f; p[k] = 0; for (i = k; i < n; i++) { s = 0.0; for (j = k; j < n; j++) s += fabs(a[i][j]); q = fabs(a[i][k]) / s; if (q > max) { max = q; p[k] = i; } } if (max == 0.0f) return false; if (p[k] != k) { for (j = 0; j < n; j++) { h = a[k][j]; a[k][j] = a[p[k]][j]; a[p[k]][j] = h; } } pivot = a[k][k]; for (j = 0; j < n; j++) { if (j != k) { a[k][j] = - a[k][j] / pivot; for (i = 0; i < n; i++) { if (i != k) a[i][j] += a[i][k] * a[k][j]; } } } for (i = 0; i < n; i++) a[i][k] /= pivot; a[k][k] = 1 / pivot; } for (k = n-2; k >= 0; k--) { if (p [k] != k) { for (i = 0; i < n; i++) { h = a [i][k]; a [i][k] = a [i][p[k]]; a [i][p[k]] = h; } } } return true; } dime/src/util/Makefile.am0100644017777301777730000000276007455303646014116 0ustar wwwwww## Process this file with automake to generate Makefile.in. LIBS = INCLUDES = -I$(top_srcdir)/include if BUILD_WITH_MSVC noinst_LIBRARIES = util.lst else noinst_LTLIBRARIES = libutil.la endif UtilSources = \ Array.cpp Array.h \ BSPTree.cpp BSPTree.h \ Box.cpp Box.h \ Dict.cpp Dict.h \ Linear.cpp Linear.h \ MemHandler.cpp MemHandler.h libutil_la_SOURCES = \ $(UtilSources) util_lst_SOURCES = \ $(UtilSources) util.lst: Makefile $(util_lst_OBJECTS) @echo "Linking util.lst..."; \ rm -f $@; \ for i in $(util_lst_OBJECTS); do echo $$i >>$@; done ## Installation information. libutilincdir = $(includedir)/dime/util libutilinc_HEADERS = \ ../../include/dime/util/Array.h \ ../../include/dime/util/BSPTree.h \ ../../include/dime/util/Box.h \ ../../include/dime/util/Dict.h \ ../../include/dime/util/Linear.h \ ../../include/dime/util/MemHandler.h install-libutilincHEADERS: $(libutilinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libutilincdir) @list='$(libutilinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libutilincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libutilincdir)/$$f; \ done uninstall-libutilincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libutilinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libutilincdir)/$$f"; \ rm -f $(DESTDIR)$(libutilincdir)/$$f; \ done dime/src/util/Makefile.in0100644017777301777730000003136607643247733014136 0ustar wwwwww# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # 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@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AMTAR = @AMTAR@ AS = @AS@ AWK = @AWK@ BUILD_WITH_MSVC = @BUILD_WITH_MSVC@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DEPDIR = @DEPDIR@ DIME_BETA_VERSION = @DIME_BETA_VERSION@ DIME_BINARY_AGE = @DIME_BINARY_AGE@ DIME_COMPILER = @DIME_COMPILER@ DIME_EXTRA_CFLAGS = @DIME_EXTRA_CFLAGS@ DIME_EXTRA_CPPFLAGS = @DIME_EXTRA_CPPFLAGS@ DIME_EXTRA_CXXFLAGS = @DIME_EXTRA_CXXFLAGS@ DIME_EXTRA_LDFLAGS = @DIME_EXTRA_LDFLAGS@ DIME_EXTRA_LIBS = @DIME_EXTRA_LIBS@ DIME_INTERFACE_AGE = @DIME_INTERFACE_AGE@ DIME_MAJOR_VERSION = @DIME_MAJOR_VERSION@ DIME_MICRO_VERSION = @DIME_MICRO_VERSION@ DIME_MINOR_VERSION = @DIME_MINOR_VERSION@ DIME_MSVC_LIBC = @DIME_MSVC_LIBC@ DIME_VERSION = @DIME_VERSION@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EXEEXT = @EXEEXT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBFLAGS = @LIBFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ SUFFIX = @SUFFIX@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ LIBS = INCLUDES = -I$(top_srcdir)/include @BUILD_WITH_MSVC_TRUE@noinst_LIBRARIES = util.lst @BUILD_WITH_MSVC_FALSE@noinst_LTLIBRARIES = libutil.la UtilSources = \ Array.cpp Array.h \ BSPTree.cpp BSPTree.h \ Box.cpp Box.h \ Dict.cpp Dict.h \ Linear.cpp Linear.h \ MemHandler.cpp MemHandler.h libutil_la_SOURCES = \ $(UtilSources) util_lst_SOURCES = \ $(UtilSources) libutilincdir = $(includedir)/dime/util libutilinc_HEADERS = \ ../../include/dime/util/Array.h \ ../../include/dime/util/BSPTree.h \ ../../include/dime/util/Box.h \ ../../include/dime/util/Dict.h \ ../../include/dime/util/Linear.h \ ../../include/dime/util/MemHandler.h subdir = src/util mkinstalldirs = $(SHELL) $(top_srcdir)/cfg/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) util_lst_AR = $(AR) cru util_lst_LIBADD = am_util_lst_OBJECTS = Array.$(OBJEXT) BSPTree.$(OBJEXT) Box.$(OBJEXT) \ Dict.$(OBJEXT) Linear.$(OBJEXT) MemHandler.$(OBJEXT) util_lst_OBJECTS = $(am_util_lst_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libutil_la_LDFLAGS = libutil_la_LIBADD = am_libutil_la_OBJECTS = Array.lo BSPTree.lo Box.lo Dict.lo Linear.lo \ MemHandler.lo libutil_la_OBJECTS = $(am_libutil_la_OBJECTS) DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ depcomp = $(SHELL) $(top_srcdir)/cfg/depcomp @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/Array.Plo $(DEPDIR)/Array.Po \ @AMDEP_TRUE@ $(DEPDIR)/BSPTree.Plo $(DEPDIR)/BSPTree.Po \ @AMDEP_TRUE@ $(DEPDIR)/Box.Plo $(DEPDIR)/Box.Po \ @AMDEP_TRUE@ $(DEPDIR)/Dict.Plo $(DEPDIR)/Dict.Po \ @AMDEP_TRUE@ $(DEPDIR)/Linear.Plo $(DEPDIR)/Linear.Po \ @AMDEP_TRUE@ $(DEPDIR)/MemHandler.Plo $(DEPDIR)/MemHandler.Po CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXFLAGS = @CXXFLAGS@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(util_lst_SOURCES) $(libutil_la_SOURCES) HEADERS = $(libutilinc_HEADERS) DIST_COMMON = $(libutilinc_HEADERS) Makefile.am Makefile.in SOURCES = $(util_lst_SOURCES) $(libutil_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/util/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status AR = ar clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) libutil.la: $(libutil_la_OBJECTS) $(libutil_la_DEPENDENCIES) $(CXXLINK) $(libutil_la_LDFLAGS) $(libutil_la_OBJECTS) $(libutil_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/BSPTree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/BSPTree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Box.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Dict.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Dict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Linear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/Linear.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/MemHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/MemHandler.Po@am__quote@ distclean-depend: -rm -rf $(DEPDIR) .cpp.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< .cpp.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(CXXCOMPILE) -c -o $@ `( test -f $< || echo -n '$(srcdir)/'; echo -n $< ) | xargs cygpath -w` .cpp.lo: @AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< CXXDEPMODE = @CXXDEPMODE@ uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(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; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../../include/dime/util @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ cp -pR $$d/$$file $(distdir) \ || 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 $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libutilincdir) 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)" \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-libutilincHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool uninstall-am: uninstall-info-am uninstall-libutilincHEADERS .PHONY: GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libutilincHEADERS install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libutilincHEADERS util.lst: Makefile $(util_lst_OBJECTS) @echo "Linking util.lst..."; \ rm -f $@; \ for i in $(util_lst_OBJECTS); do echo $$i >>$@; done install-libutilincHEADERS: $(libutilinc_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libutilincdir) @list='$(libutilinc_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libutilincdir)/$$f"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libutilincdir)/$$f; \ done uninstall-libutilincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libutilinc_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(libutilincdir)/$$f"; \ rm -f $(DESTDIR)$(libutilincdir)/$$f; \ done # 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: dime/src/util/MemHandler.cpp0100644017777301777730000001245607163700603014573 0ustar wwwwww/**************************************************************************\ * * FILE: MemHandler.cpp * * This source file is part of DIME. * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. * * This library is distributed in the hope that 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 (the accompanying file named COPYING) for more * details. * ************************************************************************** * * If you need DIME for a non-GPL project, contact Systems In Motion * to acquire a Professional Edition License: * * Systems In Motion http://www.sim.no/ * Prof. Brochs gate 6 sales@sim.no * N-7030 Trondheim Voice: +47 22114160 * NORWAY Fax: +47 67172912 * \**************************************************************************/ /*! \class dimeMemHandler dime/util/MemHandler.h \brief The dimeMemHandler class is a special-purpose memory manager. Using this class will give you efficient memory allocation and extremely efficient deallocation. In addition, there is almost \e no overhead on the memory allocated. The drawback is that it is not possible to deallocate a block of memory once it is allocated; all the allocated memory must be deallocated in one operation. If you plan to use DIME in a way that requires lots of dynamic allocation / deallocation of for instance entities, you should not use the memory manager - the standard new / delete operators should be used instead. The most common use of dime is to import and export DXF files, so the data structure is just built and then freed up all at once. For this kind of usage, the special-purpose memory manager is far superior to the system memory manager. */ /*! \class dimeMemNode src/util/MemHandler.cpp \brief The dimeMemNode class is internal / private. Mind your own business ;) */ #include #include #include #include #define MEMBLOCK_SIZE 65536 // the bigger the value, the less overhead class dimeMemNode { friend class dimeMemHandler; public: dimeMemNode(const int numbytes, dimeMemNode *next_node) : next( next_node ), currPos( 0 ), size( numbytes ) { this->block = (unsigned char*)malloc(numbytes); } ~dimeMemNode() { free((void*)this->block); } bool initOk() const { return (this->block != NULL); } void *alloc(const int numbytes, const int alignment) { unsigned int mask = alignment - 1; unsigned char *ret = NULL; if (alignment > 1) { if (this->currPos & mask) this->currPos = (this->currPos & ~mask) + alignment; } if (this->currPos + numbytes <= this->size) { ret = &this->block[currPos]; this->currPos += numbytes; } return ret; } private: dimeMemNode *next; unsigned char *block; unsigned int currPos; unsigned int size; }; // class dimeMemNode /*! Constructor. Get ready for fast alloc :-) */ dimeMemHandler::dimeMemHandler() : bigmemnode( NULL ) { this->memnode = new dimeMemNode(MEMBLOCK_SIZE, NULL); } /*! Frees all memory used. */ dimeMemHandler::~dimeMemHandler() { dimeMemNode *curr = this->memnode; dimeMemNode *next; while (curr) { next = curr->next; delete curr; curr = next; } curr = this->bigmemnode; while (curr) { next = curr->next; delete curr; curr = next; } } /*! Bullshit function. Can be called right after constructor to test if initial memory was allocated ok. */ bool dimeMemHandler::initOk() const { return this->memnode && this->memnode->initOk(); } /*! Allocates memory for the string, copies string into memory, and returns the new string pointer. */ char * dimeMemHandler::stringAlloc(const char * const string) { int len = strlen(string)+1; char *ret = (char*)this->allocMem(len, 1); if (ret) { strcpy(ret, string); } return ret; } /*! Allocates a chunk (\a size) of memory. Memory is allocates in big blocks. New blocks of memory is allocated whenever needed, and is handled automatically. The returned pointer is aligned according to the \a alignment argument. The default alignment is four bytes, but when compiled on 64 bits systems the default alignment should probably be changed to eight. */ void * dimeMemHandler::allocMem(const int size, const int alignment) { void *ret = NULL; if (size > MEMBLOCK_SIZE/2) { // big blocks is allocated separately. this->bigmemnode = new dimeMemNode(size, this->bigmemnode); if (!this->bigmemnode || !this->bigmemnode->initOk()) return NULL; ret = (void*) this->bigmemnode->block; } else { ret = this->memnode->alloc(size, alignment); if (ret == NULL) { this->memnode = new dimeMemNode(MEMBLOCK_SIZE, this->memnode); if (!this->memnode || !this->memnode->initOk()) return NULL; ret = this->memnode->alloc(size, alignment); } } return ret; }