diff options
Diffstat (limited to 'apps/X11')
214 files changed, 41766 insertions, 0 deletions
diff --git a/apps/X11/InstallMgr/ABOUT-NLS b/apps/X11/InstallMgr/ABOUT-NLS new file mode 100644 index 0000000..28d38c7 --- /dev/null +++ b/apps/X11/InstallMgr/ABOUT-NLS @@ -0,0 +1,226 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do *not* +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +One advise in advance +===================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias or message inheritance) as the +implementation here. It is also not possible to offer this additional +functionality on top of a `catgets' implementation. Future versions of +GNU `gettext' will very likely convey even more functionality. So it +might be a good idea to change to GNU `gettext' as soon as possible. + + So you need not provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system provides +usable `catgets' (if using this is selected by the installer) or +`gettext' functions. If neither is available, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is *not* required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --with-catgets + ./configure --disable-nls + +will respectively bypass any pre-existing `catgets' or `gettext' to use +the internationalizing routines provided within this package, enable +the use of the `catgets' functions (if found on the locale system), or +else, *totally* disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + By default the configuration process will not test for the `catgets' +function and therefore they will not be used. The reasons are already +given above: the emulation on top of `catgets' cannot provide all the +extensions provided by the GNU `gettext' library. If you nevertheless +want to use the `catgets' functions use + + ./configure --with-catgets + +to enable the test for `catgets' (this causes no harm if `catgets' is +not available on your system). If you really select this option we +would like to hear about the reasons because we cannot think of any +good one ourself. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +ISO 639 `LL' two-letter code prior to using the programs in the +package. For example, let's suppose that you speak German. At the +shell prompt, merely execute `setenv LANG de' (in `csh'), +`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This +can be done from your `.login' or `.profile' file, once and for all. + + An operating system might already offer message localization for +many of its programs, while other programs have been installed locally +with the full capabilities of GNU `gettext'. Just using `gettext' +extended syntax for `LANG' would break proper localization of already +available operating system programs. In this case, users should set +both `LANGUAGE' and `LANG' variables in their environment, as programs +using GNU `gettext' give preference to `LANGUAGE'. For example, some +Swedish users would rather read translations in German than English for +when Swedish is not available. This is easily accomplished by setting +`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list, courtesy of Linux +International. You may reach your translation team at the address +`LL@li.org', replacing LL by the two-letter ISO 639 code for your +language. Language codes are *not* the same as the country codes given +in ISO 3166. The following translation teams exist, as of December +1997: + + Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en', + Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian + `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja', + Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish + `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es', + Swedish `sv', and Turkish `tr'. + +For example, you may reach the Chinese translation team by writing to +`zh@li.org'. + + If you'd like to volunteer to *work* at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is *not* the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +*actively* in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of December +1997. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination. + + Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv + .----------------------------------------------------. + bash | [] [] [] | 3 + bison | [] [] [] | 3 + clisp | [] [] [] [] | 4 + cpio | [] [] [] [] [] [] | 6 + diffutils | [] [] [] [] [] | 5 + enscript | [] [] [] [] [] [] | 6 + fileutils | [] [] [] [] [] [] [] [] [] [] | 10 + findutils | [] [] [] [] [] [] [] [] [] | 9 + flex | [] [] [] [] | 4 + gcal | [] [] [] [] [] | 5 + gettext | [] [] [] [] [] [] [] [] [] [] [] | 12 + grep | [] [] [] [] [] [] [] [] [] [] | 10 + hello | [] [] [] [] [] [] [] [] [] [] [] | 11 + id-utils | [] [] [] | 3 + indent | [] [] [] [] [] | 5 + libc | [] [] [] [] [] [] [] | 7 + m4 | [] [] [] [] [] [] | 6 + make | [] [] [] [] [] [] | 6 + music | [] [] | 2 + ptx | [] [] [] [] [] [] [] [] | 8 + recode | [] [] [] [] [] [] [] [] [] | 9 + sh-utils | [] [] [] [] [] [] [] [] | 8 + sharutils | [] [] [] [] [] [] | 6 + tar | [] [] [] [] [] [] [] [] [] [] [] | 11 + texinfo | [] [] [] | 3 + textutils | [] [] [] [] [] [] [] [] [] | 9 + wdiff | [] [] [] [] [] [] [] [] | 8 + `----------------------------------------------------' + 17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv + 27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If December 1997 seems to be old, you may fetch a more recent copy +of this `ABOUT-NLS' file on most GNU archive sites. + diff --git a/apps/X11/InstallMgr/AUTHORS b/apps/X11/InstallMgr/AUTHORS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/apps/X11/InstallMgr/AUTHORS diff --git a/apps/X11/InstallMgr/COPYING b/apps/X11/InstallMgr/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/apps/X11/InstallMgr/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/apps/X11/InstallMgr/ChangeLog b/apps/X11/InstallMgr/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/apps/X11/InstallMgr/ChangeLog diff --git a/apps/X11/InstallMgr/INSTALL b/apps/X11/InstallMgr/INSTALL new file mode 100644 index 0000000..b42a17a --- /dev/null +++ b/apps/X11/InstallMgr/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/apps/X11/InstallMgr/Makefile b/apps/X11/InstallMgr/Makefile new file mode 100644 index 0000000..09251a2 --- /dev/null +++ b/apps/X11/InstallMgr/Makefile @@ -0,0 +1,421 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = . +prefix = /usr/local +exec_prefix = ${prefix} + +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 +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/installmgr +pkglibdir = $(libdir)/installmgr +pkgincludedir = $(includedir)/installmgr + +top_builddir = . + +ACLOCAL = aclocal -I macros +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = +CATOBJEXT = .gmo +CC = gcc +CXX = c++ +DATADIRNAME = share +GENCAT = +GMOFILES = +GMSGFMT = /usr/bin/msgfmt +GNOMEGNORBA_LIBS = -rdynamic -lgnorba -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lnsl -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNOMEUI_LIBS = -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNOME_APPLETS_LIBS = +GNOME_CAPPLET_LIBS = +GNOME_CONFIG = /usr/bin/gnome-config +GNOME_INCLUDEDIR = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNOME_LIBDIR = -rdynamic -L/usr/lib -L/usr/X11R6/lib +GNOME_LIBS = -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNORBA_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNORBA_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnorba -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lnsl -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GTKXMHTML_LIBS = -rdynamic -lgtkxmhtml -lXpm -ljpeg -lpng -lz -lSM -lICE -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GTK_CFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +GTK_CONFIG = /usr/bin/gtk-config +GTK_LIBS = -lSM -lICE -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GT_NO = +GT_YES = #YES# +INCLUDE_LOCALE_H = #include <locale.h> +INSTOBJEXT = .mo +INTLDEPS = +INTLLIBS = +INTLOBJS = +MAKEINFO = makeinfo +MKINSTALLDIRS = ./mkinstalldirs +MSGFMT = /usr/bin/msgfmt +ORBIT_CFLAGS = -I/usr/lib/glib/include -I/usr/include +ORBIT_CONFIG = /usr/bin/orbit-config +ORBIT_IDL = /usr/bin/orbit-idl +ORBIT_LIBS = -L/usr/lib -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lglib -lnsl -lm +PACKAGE = installmgr +PACKAGE_PIXMAPS_DIR = /usr/share/pixmaps/installmgr +POFILES = +POSUB = po +PTHREAD_LIB = -lpthread +RANLIB = ranlib +USE_INCLUDED_LIBINTL = no +USE_NLS = yes +VERSION = 0.1 +XPM_LIBS = -lXpm +ZVT_LIBS = -rdynamic -lzvt -lutil -lSM -lICE -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +cflags_set = yes +cxxflags_set = @cxxflags_set@ +l = + +SUBDIRS = intl po macros src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ +INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.h.in \ +configure configure.in install-sh missing mkinstalldirs + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: $(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: + +# 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. + + + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @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; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && 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) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(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)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(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 + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --with-included-gettext --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) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-data-local +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: +uninstall: uninstall-recursive +all-am: Makefile config.h +all-redirect: all-recursive-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-local install-data-am \ +install-data install-am install uninstall-am uninstall all-redirect \ +all-am all installdirs-am installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +install-data-local: + @$(NORMAL_INSTALL) + if test -d $(srcdir)/pixmaps; then \ + $(mkinstalldirs) $(DESTDIR)/usr/share/pixmaps/installmgr; \ + for pixmap in $(srcdir)/pixmaps/*; do \ + if test -f $$pixmap; then \ + $(INSTALL_DATA) $$pixmap $(DESTDIR)/usr/share/pixmaps/installmgr; \ + fi \ + done \ + fi + +dist-hook: + if test -d pixmaps; then \ + mkdir $(distdir)/pixmaps; \ + for pixmap in pixmaps/*; do \ + if test -f $$pixmap; then \ + cp -p $$pixmap $(distdir)/pixmaps; \ + fi \ + done \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/Makefile.am b/apps/X11/InstallMgr/Makefile.am new file mode 100644 index 0000000..e02f1e4 --- /dev/null +++ b/apps/X11/InstallMgr/Makefile.am @@ -0,0 +1,25 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = intl po macros src + +install-data-local: + @$(NORMAL_INSTALL) + if test -d $(srcdir)/pixmaps; then \ + $(mkinstalldirs) $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \ + for pixmap in $(srcdir)/pixmaps/*; do \ + if test -f $$pixmap; then \ + $(INSTALL_DATA) $$pixmap $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \ + fi \ + done \ + fi + +dist-hook: + if test -d pixmaps; then \ + mkdir $(distdir)/pixmaps; \ + for pixmap in pixmaps/*; do \ + if test -f $$pixmap; then \ + cp -p $$pixmap $(distdir)/pixmaps; \ + fi \ + done \ + fi + diff --git a/apps/X11/InstallMgr/Makefile.in b/apps/X11/InstallMgr/Makefile.in new file mode 100644 index 0000000..b9a1609 --- /dev/null +++ b/apps/X11/InstallMgr/Makefile.in @@ -0,0 +1,421 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +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 + +DESTDIR = + +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@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CXX = @CXX@ +DATADIRNAME = @DATADIRNAME@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@ +GNOMEUI_LIBS = @GNOMEUI_LIBS@ +GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@ +GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ +GNOME_CONFIG = @GNOME_CONFIG@ +GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ +GNOME_LIBDIR = @GNOME_LIBDIR@ +GNOME_LIBS = @GNOME_LIBS@ +GNORBA_CFLAGS = @GNORBA_CFLAGS@ +GNORBA_LIBS = @GNORBA_LIBS@ +GTKXMHTML_LIBS = @GTKXMHTML_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PTHREAD_LIB = @PTHREAD_LIB@ +RANLIB = @RANLIB@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XPM_LIBS = @XPM_LIBS@ +ZVT_LIBS = @ZVT_LIBS@ +cflags_set = @cflags_set@ +cxxflags_set = @cxxflags_set@ +l = @l@ + +SUBDIRS = intl po macros src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ +INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.h.in \ +configure configure.in install-sh missing mkinstalldirs + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: $(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: + +# 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. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @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; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && 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) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(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)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(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 + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --with-included-gettext --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) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-data-local +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: +uninstall: uninstall-recursive +all-am: Makefile config.h +all-redirect: all-recursive-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-local install-data-am \ +install-data install-am install uninstall-am uninstall all-redirect \ +all-am all installdirs-am installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +install-data-local: + @$(NORMAL_INSTALL) + if test -d $(srcdir)/pixmaps; then \ + $(mkinstalldirs) $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \ + for pixmap in $(srcdir)/pixmaps/*; do \ + if test -f $$pixmap; then \ + $(INSTALL_DATA) $$pixmap $(DESTDIR)@PACKAGE_PIXMAPS_DIR@; \ + fi \ + done \ + fi + +dist-hook: + if test -d pixmaps; then \ + mkdir $(distdir)/pixmaps; \ + for pixmap in pixmaps/*; do \ + if test -f $$pixmap; then \ + cp -p $$pixmap $(distdir)/pixmaps; \ + fi \ + done \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/NEWS b/apps/X11/InstallMgr/NEWS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/apps/X11/InstallMgr/NEWS diff --git a/apps/X11/InstallMgr/README b/apps/X11/InstallMgr/README new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/apps/X11/InstallMgr/README diff --git a/apps/X11/InstallMgr/acconfig.h b/apps/X11/InstallMgr/acconfig.h new file mode 100644 index 0000000..4a321c8 --- /dev/null +++ b/apps/X11/InstallMgr/acconfig.h @@ -0,0 +1,9 @@ +#undef ENABLE_NLS +#undef HAVE_CATGETS +#undef HAVE_GETTEXT +#undef HAVE_LC_MESSAGES +#undef HAVE_STPCPY +#undef HAVE_LIBSM +#undef PACKAGE_LOCALE_DIR +#undef PACKAGE_DATA_DIR +#undef PACKAGE_SOURCE_DIR diff --git a/apps/X11/InstallMgr/aclocal.m4 b/apps/X11/InstallMgr/aclocal.m4 new file mode 100644 index 0000000..9d56aa0 --- /dev/null +++ b/apps/X11/InstallMgr/aclocal.m4 @@ -0,0 +1,1227 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4 + +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# 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 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# 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 conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $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" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<<am_indx=1 +for am_file in <<$1>>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + +# aclocal-include.m4 +# +# This macro adds the name macrodir to the set of directories +# that `aclocal' searches for macros. + +# serial 1 + +dnl AM_ACLOCAL_INCLUDE(macrodir) +AC_DEFUN([AM_ACLOCAL_INCLUDE], +[ + AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) + + test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + + for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done +]) + +# Define a conditional. + +AC_DEFUN(AM_CONDITIONAL, +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + +dnl +dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) +dnl +dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh +dnl is not found. +dnl + +AC_DEFUN([GNOME_INIT_HOOK],[ + AC_SUBST(GNOME_LIBS) + AC_SUBST(GNOMEUI_LIBS) + AC_SUBST(GNOMEGNORBA_LIBS) + AC_SUBST(GTKXMHTML_LIBS) + AC_SUBST(ZVT_LIBS) + AC_SUBST(GNOME_LIBDIR) + AC_SUBST(GNOME_INCLUDEDIR) + + AC_ARG_WITH(gnome-includes, + [ --with-gnome-includes Specify location of GNOME headers],[ + CFLAGS="$CFLAGS -I$withval" + ]) + + AC_ARG_WITH(gnome-libs, + [ --with-gnome-libs Specify location of GNOME libs],[ + LDFLAGS="$LDFLAGS -L$withval" + gnome_prefix=$withval + ]) + + AC_ARG_WITH(gnome, + [ --with-gnome Specify prefix for GNOME files], + if test x$withval = xyes; then + want_gnome=yes + dnl Note that an empty true branch is not + dnl valid sh syntax. + ifelse([$1], [], :, [$1]) + else + if test "x$withval" = xno; then + want_gnome=no + else + want_gnome=yes + LDFLAGS="$LDFLAGS -L$withval/lib" + CFLAGS="$CFLAGS -I$withval/include" + gnome_prefix=$withval/lib + fi + fi, + want_gnome=yes) + + if test "x$want_gnome" = xyes; then + + AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) + if test "$GNOME_CONFIG" = "no"; then + no_gnome_config="yes" + else + AC_MSG_CHECKING(if $GNOME_CONFIG works) + if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then + AC_MSG_RESULT(yes) + GNOME_GNORBA_HOOK([],$2) + GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" + GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" + GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" + GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" + ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" + GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" + GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" + $1 + else + AC_MSG_RESULT(no) + no_gnome_config="yes" + fi + fi + + if test x$exec_prefix = xNONE; then + if test x$prefix = xNONE; then + gnome_prefix=$ac_default_prefix/lib + else + gnome_prefix=$prefix/lib + fi + else + gnome_prefix=`eval echo \`echo $libdir\`` + fi + + if test "$no_gnome_config" = "yes"; then + AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) + if test -f $gnome_prefix/gnomeConf.sh; then + AC_MSG_RESULT(found) + echo "loading gnome configuration from" \ + "$gnome_prefix/gnomeConf.sh" + . $gnome_prefix/gnomeConf.sh + $1 + else + AC_MSG_RESULT(not found) + if test x$2 = xfail; then + AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) + fi + fi + fi + fi + + if test -n "$3"; then + n="$3" + for i in $n; do + AC_MSG_CHECKING(extra library \"$i\") + case $i in + applets) + AC_SUBST(GNOME_APPLETS_LIBS) + GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` + AC_MSG_RESULT($GNOME_APPLETS_LIBS);; + capplet) + AC_SUBST(GNOME_CAPPLET_LIBS) + GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` + AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; + *) + AC_MSG_RESULT(unknown library) + esac + done + fi +]) + +dnl +dnl GNOME_INIT ([additional-inits]) +dnl + +AC_DEFUN([GNOME_INIT],[ + GNOME_INIT_HOOK([],fail,$1) +]) + +dnl +dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) +dnl +dnl if failflag is "failure" it aborts if gnorba is not found. +dnl + +AC_DEFUN([GNOME_GNORBA_HOOK],[ + GNOME_ORBIT_HOOK([],$2) + AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ + gnome_cv_gnorba_found=no + if test x$gnome_cv_orbit_found = xyes; then + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + if test -n "$GNORBA_LIBS"; then + gnome_cv_gnorba_found=yes + fi + fi + ]) + AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) + if test x$gnome_cv_orbit_found = xyes; then + $1 + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + AC_SUBST(GNORBA_CFLAGS) + AC_SUBST(GNORBA_LIBS) + else + if test x$2 = xfailure; then + AC_MSG_ERROR(gnorba library not installed or installation problem) + fi + fi +]) + +AC_DEFUN([GNOME_GNORBA_CHECK], [ + GNOME_GNORBA_HOOK([],failure) +]) + +dnl +dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) +dnl +dnl if failflag is "failure" it aborts if orbit is not found. +dnl + +AC_DEFUN([GNOME_ORBIT_HOOK],[ + AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) + AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) + AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ + if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then + gnome_cv_orbit_found=no + else + gnome_cv_orbit_found=yes + fi + ]) + AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) + if test x$gnome_cv_orbit_found = xyes; then + $1 + ORBIT_CFLAGS=`orbit-config --cflags client server` + ORBIT_LIBS=`orbit-config --use-service=name --libs client server` + AC_SUBST(ORBIT_CFLAGS) + AC_SUBST(ORBIT_LIBS) + else + if test x$2 = xfailure; then + AC_MSG_ERROR(ORBit not installed or installation problem) + fi + fi +]) + +AC_DEFUN([GNOME_ORBIT_CHECK], [ + GNOME_ORBIT_HOOK([],failure) +]) + + +# serial 1 + +# @defmac AC_PROG_CC_STDC +# @maindex PROG_CC_STDC +# @ovindex CC +# If the C compiler in not in ANSI C mode by default, try to add an option +# to output variable @code{CC} to make it so. This macro tries various +# options that select ANSI C on some system or another. It considers the +# compiler to be in ANSI C mode if it handles function prototypes correctly. +# +# If you use this macro, you should check after calling it whether the C +# compiler has been set to accept ANSI C; if not, the shell variable +# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source +# code in ANSI C, you can make an un-ANSIfied copy of it by using the +# program @code{ansi2knr}, which comes with Ghostscript. +# @end defmac + +AC_DEFUN(AM_PROG_CC_STDC, +[AC_REQUIRE([AC_PROG_CC]) +AC_BEFORE([$0], [AC_C_INLINE]) +AC_BEFORE([$0], [AC_C_CONST]) +dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require +dnl a magic option to avoid problems with ANSI preprocessor commands +dnl like #elif. +dnl FIXME: can't do this because then AC_AIX won't work due to a +dnl circular dependency. +dnl AC_BEFORE([$0], [AC_PROG_CPP]) +AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) +AC_CACHE_VAL(am_cv_prog_cc_stdc, +[am_cv_prog_cc_stdc=no +ac_save_CC="$CC" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + AC_TRY_COMPILE( +[#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +], [ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; +], +[am_cv_prog_cc_stdc="$ac_arg"; break]) +done +CC="$ac_save_CC" +]) +if test -z "$am_cv_prog_cc_stdc"; then + AC_MSG_RESULT([none needed]) +else + AC_MSG_RESULT($am_cv_prog_cc_stdc) +fi +case "x$am_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $am_cv_prog_cc_stdc" ;; +esac +]) + +dnl GNOME_COMPILE_WARNINGS +dnl Turn on many useful compiler warnings +dnl For now, only works on GCC +AC_DEFUN([GNOME_COMPILE_WARNINGS],[ + AC_ARG_ENABLE(compile-warnings, + [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum) + + AC_MSG_CHECKING(what warning flags to pass to the C compiler) + warnCFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + + if test "x$enable_compile_warnings" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) warnCFLAGS="-Wall -Wunused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_compile_warnings" = "xyes"; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations" + fi + fi + fi + AC_MSG_RESULT($warnCFLAGS) + + AC_ARG_ENABLE(iso-c, + [ --enable-iso-c Try to warn if code is not ISO C ],, + enable_iso_c=no) + + AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) + complCFLAGS= + if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCFLAGS) + if test "x$cflags_set" != "xyes"; then + CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" + cflags_set=yes + AC_SUBST(cflags_set) + fi +]) + +dnl For C++, do basically the same thing. + +AC_DEFUN([GNOME_CXX_WARNINGS],[ + AC_ARG_ENABLE(cxx-warnings, + [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) + + AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) + warnCXXFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + if test "x$enable_cxx_warnings" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CXXFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) warnCXXFLAGS="-Wall -Wno-unused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_cxx_warnings" = "xyes"; then + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual" + fi + fi + fi + AC_MSG_RESULT($warnCXXFLAGS) + + AC_ARG_ENABLE(iso-cxx, + [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, + enable_iso_cxx=no) + + AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) + complCXXFLAGS= + if test "x$enable_iso_cxx" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CXXFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; + esac + + case " $CXXFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCXXFLAGS) + if test "x$cxxflags_set" != "xyes"; then + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" + cxxflags_set=yes + AC_SUBST(cxxflags_set) + fi +]) + +dnl GNOME_X_CHECKS +dnl +dnl Basic X11 related checks for X11. At the end, the following will be +dnl defined/changed: +dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK +dnl CPPFLAGS Will include $X_CFLAGS +dnl GNOME_HAVE_SM `true' or `false' depending on whether session +dnl management is available. It is available if +dnl both -lSM and X11/SM/SMlib.h exist. (Some +dnl Solaris boxes have the library but not the header) +dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" +dnl +dnl The following configure cache variables are defined (but not used): +dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} +dnl +AC_DEFUN([GNOME_X_CHECKS], +[ + AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) + dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could + dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" + dnl + dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses + dnl CPPFLAGS, not CFLAGS + CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" + + saved_ldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS $GTK_LIBS" + + gnome_cv_passdown_x_libs="$GTK_LIBS" + gnome_cv_passdown_X_LIBS="$GTK_LIBS" + gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" + gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" + + LDFLAGS="$saved_ldflags $GTK_LIBS" + +dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow. + USE_DEVGTK=true + +dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x]) +dnl AC_EGREP_CPP(answer_affirmatively, +dnl [#include <gtk/gtkfeatures.h> +dnl #ifdef GTK_HAVE_FEATURES_1_1_0 +dnl answer_affirmatively +dnl #endif +dnl ], dev_gtk=yes, dev_gtk=no) +dnl if test "$dev_gtk" = "yes"; then +dnl USE_DEVGTK=true +dnl fi +dnl AC_MSG_RESULT("$dev_gtk") + + GNOME_HAVE_SM=true + case "$GTK_LIBS" in + *-lSM*) + dnl Already found it. + ;; + *) + dnl Assume that if we have -lSM then we also have -lICE. + AC_CHECK_LIB(SM, SmcSaveYourselfDone, + [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, + $x_libs -lICE) + ;; + esac + + if test "$GNOME_HAVE_SM" = true; then + AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) + fi + + if test "$GNOME_HAVE_SM" = true; then + AC_DEFINE(HAVE_LIBSM) + fi + + XPM_LIBS="" + AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) + AC_SUBST(XPM_LIBS) + + AC_REQUIRE([GNOME_PTHREAD_CHECK]) + LDFLAGS="$saved_ldflags" + + AC_PROVIDE([GNOME_X_CHECKS]) +]) + +# Configure paths for GTK+ +# Owen Taylor 97-11-3 + +dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(AM_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + for module in . $4 + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include <gtk/gtk.h> +#include <stdio.h> +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + +dnl +dnl And better, use gthreads instead... +dnl + +AC_DEFUN([GNOME_PTHREAD_CHECK],[ + PTHREAD_LIB="" + AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", + [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", + [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", + [AC_CHECK_FUNC(pthread_create)] + )] + )] + ) + AC_SUBST(PTHREAD_LIB) + AC_PROVIDE([GNOME_PTHREAD_CHECK]) +]) + +# Macro to add for using GNU gettext. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 5 + +AC_DEFUN(AM_WITH_NLS, + [AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + USE_INCLUDED_LIBINTL=no + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS) + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_CHECK_LIB(intl, gettext, + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)], + gt_cv_func_gettext_libintl=no)]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + AC_MSG_CHECKING([whether catgets can be used]) + AC_ARG_WITH(catgets, + [ --with-catgets use catgets functions if available], + nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) + AC_MSG_RESULT($nls_cv_use_catgets) + + if test "$nls_cv_use_catgets" = "yes"; then + dnl No gettext in C library. Try catgets next. + AC_CHECK_LIB(i, main) + AC_CHECK_FUNC(catgets, + [AC_DEFINE(HAVE_CATGETS) + INTLOBJS="\$(CATOBJS)" + AC_PATH_PROG(GENCAT, gencat, no)dnl + if test "$GENCAT" != "no"; then + AC_PATH_PROG(GMSGFMT, gmsgfmt, no) + if test "$GMSGFMT" = "no"; then + AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) + fi + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi]) + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_SUBST(MSGFMT) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN(AM_GNU_GETTEXT, + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next]) + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + AC_CHECK_FUNCS(stpcpy) + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + AC_DEFINE(HAVE_STPCPY) + fi + + AM_LC_MESSAGES + AM_WITH_NLS + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl The reference to <locale.h> in the installed <libintl.h> file + dnl must be resolved because we cannot expect the users of this + dnl to define HAVE_LOCALE_H. + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include <locale.h>" + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header <locale.h>. Take care yourself. */" + fi + AC_SUBST(INCLUDE_LOCALE_H) + + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + dnl po2tbl.sed is always needed. + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + dnl In the intl/Makefile.in we have a special dependency which makes + dnl only sense for gettext. We comment this out for non-gettext + dnl packages. + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + AC_SUBST(GT_NO) + AC_SUBST(GT_YES) + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl *** For now the libtool support in intl/Makefile is not for real. + l= + AC_SUBST(l) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + +# Search path for a program which passes the given test. +# Ulrich Drepper <drepper@cygnus.com>, 1996. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN(AM_PATH_PROG_WITH_TEST, +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# Check whether LC_MESSAGES is available in <locale.h>. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +AC_DEFUN(AM_LC_MESSAGES, + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES) + fi + fi]) + diff --git a/apps/X11/InstallMgr/autogen.sh b/apps/X11/InstallMgr/autogen.sh new file mode 100755 index 0000000..8cda498 --- /dev/null +++ b/apps/X11/InstallMgr/autogen.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +PKG_NAME="the package." + +(test -f $srcdir/configure.in) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level directory" + exit 1 +} + +. $srcdir/macros/autogen.sh diff --git a/apps/X11/InstallMgr/config.h b/apps/X11/InstallMgr/config.h new file mode 100644 index 0000000..0d16366 --- /dev/null +++ b/apps/X11/InstallMgr/config.h @@ -0,0 +1,134 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ +#define HAVE_ALLOCA_H 1 + +/* Define if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define as __inline if that's what the C compiler calls it. */ +/* #undef inline */ + +/* Define to `long' if <sys/types.h> doesn't define. */ +/* #undef off_t */ + +/* Define if you need to in order for stat and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +#define ENABLE_NLS 1 +/* #undef HAVE_CATGETS */ +#define HAVE_GETTEXT 1 +#define HAVE_LC_MESSAGES 1 +#define HAVE_STPCPY 1 +#define HAVE_LIBSM 1 +#define PACKAGE_LOCALE_DIR "/usr/local/share/locale" +/* #undef PACKAGE_DATA_DIR */ +/* #undef PACKAGE_SOURCE_DIR */ + +/* Define if you have the __argz_count function. */ +#define HAVE___ARGZ_COUNT 1 + +/* Define if you have the __argz_next function. */ +#define HAVE___ARGZ_NEXT 1 + +/* Define if you have the __argz_stringify function. */ +#define HAVE___ARGZ_STRINGIFY 1 + +/* Define if you have the dcgettext function. */ +#define HAVE_DCGETTEXT 1 + +/* Define if you have the getcwd function. */ +#define HAVE_GETCWD 1 + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the munmap function. */ +#define HAVE_MUNMAP 1 + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the setenv function. */ +#define HAVE_SETENV 1 + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the stpcpy function. */ +#define HAVE_STPCPY 1 + +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the strchr function. */ +#define HAVE_STRCHR 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the <X11/SM/SMlib.h> header file. */ +#define HAVE_X11_SM_SMLIB_H 1 + +/* Define if you have the <argz.h> header file. */ +#define HAVE_ARGZ_H 1 + +/* Define if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the <malloc.h> header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the <nl_types.h> header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the i library (-li). */ +/* #undef HAVE_LIBI */ + +/* Name of package */ +#define PACKAGE "installmgr" + +/* Version number of package */ +#define VERSION "0.1" + diff --git a/apps/X11/InstallMgr/config.h.in b/apps/X11/InstallMgr/config.h.in new file mode 100644 index 0000000..9fb8895 --- /dev/null +++ b/apps/X11/InstallMgr/config.h.in @@ -0,0 +1,133 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `long' if <sys/types.h> doesn't define. */ +#undef off_t + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +#undef ENABLE_NLS +#undef HAVE_CATGETS +#undef HAVE_GETTEXT +#undef HAVE_LC_MESSAGES +#undef HAVE_STPCPY +#undef HAVE_LIBSM +#undef PACKAGE_LOCALE_DIR +#undef PACKAGE_DATA_DIR +#undef PACKAGE_SOURCE_DIR + +/* Define if you have the __argz_count function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the __argz_next function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the __argz_stringify function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* Define if you have the dcgettext function. */ +#undef HAVE_DCGETTEXT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the munmap function. */ +#undef HAVE_MUNMAP + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the <X11/SM/SMlib.h> header file. */ +#undef HAVE_X11_SM_SMLIB_H + +/* Define if you have the <argz.h> header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the <nl_types.h> header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the i library (-li). */ +#undef HAVE_LIBI + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION + diff --git a/apps/X11/InstallMgr/configure b/apps/X11/InstallMgr/configure new file mode 100755 index 0000000..8b2c404 --- /dev/null +++ b/apps/X11/InstallMgr/configure @@ -0,0 +1,4995 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-gnome-includes Specify location of GNOME headers" +ac_help="$ac_help + --with-gnome-libs Specify location of GNOME libs" +ac_help="$ac_help + --with-gnome Specify prefix for GNOME files" +ac_help="$ac_help + --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings." +ac_help="$ac_help + --enable-iso-c Try to warn if code is not ISO C " +ac_help="$ac_help + --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" +ac_help="$ac_help + --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)" +ac_help="$ac_help + --disable-gtktest Do not try to compile and run a test GTK program" +ac_help="$ac_help + --disable-nls do not use Native Language Support" +ac_help="$ac_help + --with-included-gettext use the GNU gettext library included here" +ac_help="$ac_help + --with-catgets use catgets functions if available" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=configure.in + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# 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 +# 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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:578: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:631: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# 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 conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $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 "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +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" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=installmgr + +VERSION=0.1 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <<EOF +#define PACKAGE "$PACKAGE" +EOF + +cat >> confdefs.h <<EOF +#define VERSION "$VERSION" +EOF + + + +missing_dir=`cd $ac_aux_dir && pwd` +echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +echo "configure:734: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:747: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:760: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:773: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:786: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + + + + + + + +if test x = y; then + INSIDE_GNOME_COMMON_TRUE= + INSIDE_GNOME_COMMON_FALSE='#' +else + INSIDE_GNOME_COMMON_TRUE='#' + INSIDE_GNOME_COMMON_FALSE= +fi + + test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + + for k in macros ; do ACLOCAL="$ACLOCAL -I $k" ; done + + + + + + + + + + + + + # Check whether --with-gnome-includes or --without-gnome-includes was given. +if test "${with_gnome_includes+set}" = set; then + withval="$with_gnome_includes" + + CFLAGS="$CFLAGS -I$withval" + +fi + + + # Check whether --with-gnome-libs or --without-gnome-libs was given. +if test "${with_gnome_libs+set}" = set; then + withval="$with_gnome_libs" + + LDFLAGS="$LDFLAGS -L$withval" + gnome_prefix=$withval + +fi + + + # Check whether --with-gnome or --without-gnome was given. +if test "${with_gnome+set}" = set; then + withval="$with_gnome" + if test x$withval = xyes; then + want_gnome=yes + : + else + if test "x$withval" = xno; then + want_gnome=no + else + want_gnome=yes + LDFLAGS="$LDFLAGS -L$withval/lib" + CFLAGS="$CFLAGS -I$withval/include" + gnome_prefix=$withval/lib + fi + fi +else + want_gnome=yes +fi + + + if test "x$want_gnome" = xyes; then + + # Extract the first word of "gnome-config", so it can be a program name with args. +set dummy gnome-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:874: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GNOME_CONFIG" in + /*) + ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no" + ;; +esac +fi +GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG" +if test -n "$GNOME_CONFIG"; then + echo "$ac_t""$GNOME_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$GNOME_CONFIG" = "no"; then + no_gnome_config="yes" + else + echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6 +echo "configure:911: checking if $GNOME_CONFIG works" >&5 + if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then + echo "$ac_t""yes" 1>&6 + + + # Extract the first word of "orbit-config", so it can be a program name with args. +set dummy orbit-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:919: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ORBIT_CONFIG" in + /*) + ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_ORBIT_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_ORBIT_CONFIG" && ac_cv_path_ORBIT_CONFIG="no" + ;; +esac +fi +ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG" +if test -n "$ORBIT_CONFIG"; then + echo "$ac_t""$ORBIT_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "orbit-idl", so it can be a program name with args. +set dummy orbit-idl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:955: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ORBIT_IDL" in + /*) + ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_ORBIT_IDL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_ORBIT_IDL" && ac_cv_path_ORBIT_IDL="no" + ;; +esac +fi +ORBIT_IDL="$ac_cv_path_ORBIT_IDL" +if test -n "$ORBIT_IDL"; then + echo "$ac_t""$ORBIT_IDL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6 +echo "configure:989: checking for working ORBit environment" >&5 +if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then + gnome_cv_orbit_found=no + else + gnome_cv_orbit_found=yes + fi + +fi + +echo "$ac_t""$gnome_cv_orbit_found" 1>&6 + + +if test x$gnome_cv_orbit_found = xyes; then + HAVE_ORBIT_TRUE= + HAVE_ORBIT_FALSE='#' +else + HAVE_ORBIT_TRUE='#' + HAVE_ORBIT_FALSE= +fi + if test x$gnome_cv_orbit_found = xyes; then + + ORBIT_CFLAGS=`orbit-config --cflags client server` + ORBIT_LIBS=`orbit-config --use-service=name --libs client server` + + + else + if test xfail = xfailure; then + { echo "configure: error: ORBit not installed or installation problem" 1>&2; exit 1; } + fi + fi + + echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6 +echo "configure:1025: checking for gnorba libraries" >&5 +if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + gnome_cv_gnorba_found=no + if test x$gnome_cv_orbit_found = xyes; then + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + if test -n "$GNORBA_LIBS"; then + gnome_cv_gnorba_found=yes + fi + fi + +fi + +echo "$ac_t""$gnome_cv_gnorba_found" 1>&6 + + +if test x$gnome_cv_gnorba_found = xyes; then + HAVE_GNORBA_TRUE= + HAVE_GNORBA_FALSE='#' +else + HAVE_GNORBA_TRUE='#' + HAVE_GNORBA_FALSE= +fi + if test x$gnome_cv_orbit_found = xyes; then + + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + + + else + if test xfail = xfailure; then + { echo "configure: error: gnorba library not installed or installation problem" 1>&2; exit 1; } + fi + fi + + GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" + GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" + GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" + GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" + ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" + GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" + GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" + + else + echo "$ac_t""no" 1>&6 + no_gnome_config="yes" + fi + fi + + if test x$exec_prefix = xNONE; then + if test x$prefix = xNONE; then + gnome_prefix=$ac_default_prefix/lib + else + gnome_prefix=$prefix/lib + fi + else + gnome_prefix=`eval echo \`echo $libdir\`` + fi + + if test "$no_gnome_config" = "yes"; then + echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6 +echo "configure:1089: checking for gnomeConf.sh file in $gnome_prefix" >&5 + if test -f $gnome_prefix/gnomeConf.sh; then + echo "$ac_t""found" 1>&6 + echo "loading gnome configuration from" \ + "$gnome_prefix/gnomeConf.sh" + . $gnome_prefix/gnomeConf.sh + + else + echo "$ac_t""not found" 1>&6 + if test xfail = xfail; then + { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; } + fi + fi + fi + fi + + if test -n ""; then + n="" + for i in $n; do + echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6 +echo "configure:1109: checking extra library \"$i\"" >&5 + case $i in + applets) + + GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` + echo "$ac_t""$GNOME_APPLETS_LIBS" 1>&6;; + capplet) + + GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` + echo "$ac_t""$GNOME_CAPPLET_LIBS" 1>&6;; + *) + echo "$ac_t""unknown library" 1>&6 + esac + done + fi + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1129: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1159: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1210: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1242: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 1253 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1284: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1289: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1317: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1349: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1372: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1402: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1453: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1485: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 1496 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1527: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1532: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1560: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1596: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1628: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext << EOF + +#line 1639 "configure" +#include "confdefs.h" + +int main(){return(0);} +EOF +if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1670: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:1675: checking whether we are using GNU C++" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.C <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes +else + ac_cv_prog_gxx=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + +if test $ac_cv_prog_gxx = yes; then + GXX=yes +else + GXX= +fi + +ac_test_CXXFLAGS="${CXXFLAGS+set}" +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS= +echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:1703: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes +else + ac_cv_prog_cxx_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&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 + + + + +echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 +echo "configure:1738: checking for ${CC-cc} option to accept ANSI C" >&5 +if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + am_cv_prog_cc_stdc=no +ac_save_CC="$CC" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + cat > conftest.$ac_ext <<EOF +#line 1754 "configure" +#include "confdefs.h" +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; + +int main() { + +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + +; return 0; } +EOF +if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_prog_cc_stdc="$ac_arg"; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done +CC="$ac_save_CC" + +fi + +if test -z "$am_cv_prog_cc_stdc"; then + echo "$ac_t""none needed" 1>&6 +else + echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6 +fi +case "x$am_cv_prog_cc_stdc" in + x|xno) ;; + *) CC="$CC $am_cv_prog_cc_stdc" ;; +esac + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1815: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 1830 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 1847 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 1864 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1895: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1900 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1925 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1943 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext <<EOF +#line 1964 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + + + + # Check whether --enable-compile-warnings or --disable-compile-warnings was given. +if test "${enable_compile_warnings+set}" = set; then + enableval="$enable_compile_warnings" + : +else + enable_compile_warnings=minimum +fi + + + echo $ac_n "checking what warning flags to pass to the C compiler""... $ac_c" 1>&6 +echo "configure:2010: checking what warning flags to pass to the C compiler" >&5 + warnCFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + + if test "x$enable_compile_warnings" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *\ \ -Wall\ \ *) ;; + *) warnCFLAGS="-Wall -Wunused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_compile_warnings" = "xyes"; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations" + fi + fi + fi + echo "$ac_t""$warnCFLAGS" 1>&6 + + # Check whether --enable-iso-c or --disable-iso-c was given. +if test "${enable_iso_c+set}" = set; then + enableval="$enable_iso_c" + : +else + enable_iso_c=no +fi + + + echo $ac_n "checking what language compliance flags to pass to the C compiler""... $ac_c" 1>&6 +echo "configure:2042: checking what language compliance flags to pass to the C compiler" >&5 + complCFLAGS= + if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *\ \ -ansi\ \ *) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + + case " $CFLAGS " in + *\ \ -pedantic\ \ *) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi + fi + echo "$ac_t""$complCFLAGS" 1>&6 + if test "x$cflags_set" != "xyes"; then + CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" + cflags_set=yes + + fi + + + PTHREAD_LIB="" + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:2067: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthread $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2075 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create(); + +int main() { +pthread_create() +; return 0; } +EOF +if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + PTHREAD_LIB="-lpthread" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 +echo "configure:2105: checking for pthread_create in -lpthreads" >&5 +ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthreads $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2113 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create(); + +int main() { +pthread_create() +; return 0; } +EOF +if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + PTHREAD_LIB="-lpthreads" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +echo "configure:2143: checking for pthread_create in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc_r $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2151 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create(); + +int main() { +pthread_create() +; return 0; } +EOF +if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + PTHREAD_LIB="-lc_r" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 +echo "configure:2181: checking for pthread_create" >&5 +if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2186 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pthread_create(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create(); + +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_pthread_create) || defined (__stub___pthread_create) +choke me +#else +pthread_create(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_pthread_create=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_pthread_create=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + +fi + + + + + + # Check whether --with-gtk-prefix or --without-gtk-prefix was given. +if test "${with_gtk_prefix+set}" = set; then + withval="$with_gtk_prefix" + gtk_config_prefix="$withval" +else + gtk_config_prefix="" +fi + +# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. +if test "${with_gtk_exec_prefix+set}" = set; then + withval="$with_gtk_exec_prefix" + gtk_config_exec_prefix="$withval" +else + gtk_config_exec_prefix="" +fi + +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + : +else + enable_gtktest=yes +fi + + + for module in . + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + # Extract the first word of "gtk-config", so it can be a program name with args. +set dummy gtk-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2291: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GTK_CONFIG" in + /*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +GTK_CONFIG="$ac_cv_path_GTK_CONFIG" +if test -n "$GTK_CONFIG"; then + echo "$ac_t""$GTK_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_gtk_version=1.2.0 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:2326: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext <<EOF +#line 2349 "configure" +#include "confdefs.h" + +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +EOF +if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gtk=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext <<EOF +#line 2461 "configure" +#include "confdefs.h" + +#include <gtk/gtk.h> +#include <stdio.h> + +int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +; return 0; } +EOF +if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + { echo "configure: error: GTK not installed" 1>&2; exit 1; } + fi + + + rm -f conf.gtktest + + CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" + + saved_ldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS $GTK_LIBS" + + gnome_cv_passdown_x_libs="$GTK_LIBS" + gnome_cv_passdown_X_LIBS="$GTK_LIBS" + gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" + gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" + + LDFLAGS="$saved_ldflags $GTK_LIBS" + + USE_DEVGTK=true + + + GNOME_HAVE_SM=true + case "$GTK_LIBS" in + *-lSM*) + ;; + *) + echo $ac_n "checking for SmcSaveYourselfDone in -lSM""... $ac_c" 1>&6 +echo "configure:2530: checking for SmcSaveYourselfDone in -lSM" >&5 +ac_lib_var=`echo SM'_'SmcSaveYourselfDone | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lSM $x_libs -lICE $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2538 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SmcSaveYourselfDone(); + +int main() { +SmcSaveYourselfDone() +; return 0; } +EOF +if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + GTK_LIBS="-lSM -lICE $GTK_LIBS" +else + echo "$ac_t""no" 1>&6 +GNOME_HAVE_SM=false +fi + + ;; + esac + + if test "$GNOME_HAVE_SM" = true; then + for ac_hdr in X11/SM/SMlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2578: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2583 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +GNOME_HAVE_SM=false +fi +done + + fi + + if test "$GNOME_HAVE_SM" = true; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBSM 1 +EOF + + fi + + XPM_LIBS="" + echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6 +echo "configure:2626: checking for XpmFreeXpmImage in -lXpm" >&5 +ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXpm $x_libs $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2634 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XpmFreeXpmImage(); + +int main() { +XpmFreeXpmImage() +; return 0; } +EOF +if { (eval echo configure:2645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + XPM_LIBS="-lXpm" +else + echo "$ac_t""no" 1>&6 +fi + + + + + LDFLAGS="$saved_ldflags" + + + + +ALL_LINGUAS="" +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2677: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:2705: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2710 "configure" +#include "confdefs.h" + +int main() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:2759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:2780: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <<EOF +#line 2787 "configure" +#include "confdefs.h" + +int main() { +} $ac_kw foo() { +; return 0; } +EOF +if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <<EOF +#define inline $ac_cv_c_inline +EOF + ;; +esac + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:2820: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2825 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:2853: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2858 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:2888: checking for working alloca.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2893 "configure" +#include "confdefs.h" +#include <alloca.h> +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:2900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:2921: checking for alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2926 "configure" +#include "confdefs.h" + +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include <malloc.h> +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include <alloca.h> +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int main() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if { (eval echo configure:2954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_alloca_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_alloca_works=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 +if test $ac_cv_func_alloca_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.${ac_objext} + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:2986: checking whether alloca needs Cray hooks" >&5 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2991 "configure" +#include "confdefs.h" +#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3016: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3021 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<EOF +#define CRAY_STACKSEG_END $ac_func +EOF + + break +else + echo "$ac_t""no" 1>&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:3071: checking stack direction for C alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat > conftest.$ac_ext <<EOF +#line 3079 "configure" +#include "confdefs.h" +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:3098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_stack_direction=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_stack_direction=-1 +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <<EOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +EOF + +fi + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3123: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3128 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3162: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3167 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:3215: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat > conftest.$ac_ext <<EOF +#line 3223 "configure" +#include "confdefs.h" + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the filesystem buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include <sys/types.h> +#include <fcntl.h> +#include <sys/mman.h> + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include <unistd.h> +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { (eval echo configure:3363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + + + for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3391: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3396 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3431: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3436 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + for ac_func in stpcpy +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3488: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3493 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STPCPY 1 +EOF + + fi + + if test $ac_cv_header_locale_h = yes; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:3550: checking for LC_MESSAGES" >&5 +if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3555 "configure" +#include "confdefs.h" +#include <locale.h> +int main() { +return LC_MESSAGES +; return 0; } +EOF +if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_val_LC_MESSAGES=no +fi +rm -f conftest* +fi + +echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 + if test $am_cv_val_LC_MESSAGES = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LC_MESSAGES 1 +EOF + + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +echo "configure:3583: checking whether NLS is requested" >&5 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi + + echo "$ac_t""$USE_NLS" 1>&6 + + + USE_INCLUDED_LIBINTL=no + + if test "$USE_NLS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ENABLE_NLS 1 +EOF + + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +echo "configure:3603: checking whether included gettext is requested" >&5 + # Check whether --with-included-gettext or --without-included-gettext was given. +if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +echo "configure:3622: checking for libintl.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3627 "configure" +#include "confdefs.h" +#include <libintl.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +echo "configure:3649: checking for gettext in libc" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3654 "configure" +#include "confdefs.h" +#include <libintl.h> +int main() { +return (int) gettext ("") +; return 0; } +EOF +if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + gt_cv_func_gettext_libc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gt_cv_func_gettext_libc=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 + + if test "$gt_cv_func_gettext_libc" != "yes"; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +echo "configure:3677: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 3685 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char bindtextdomain(); + +int main() { +bindtextdomain() +; return 0; } +EOF +if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +echo "configure:3712: checking for gettext in libintl" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 +echo "configure:3717: checking for gettext in -lintl" >&5 +ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 3725 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gettext(); + +int main() { +gettext() +; return 0; } +EOF +if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + gt_cv_func_gettext_libintl=yes +else + echo "$ac_t""no" 1>&6 +gt_cv_func_gettext_libintl=no +fi + +fi + +echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT 1 +EOF + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3775: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$MSGFMT" != "no"; then + for ac_func in dcgettext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3809: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3814 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3864: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3900: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + cat > conftest.$ac_ext <<EOF +#line 3932 "configure" +#include "confdefs.h" + +int main() { +extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr +; return 0; } +EOF +if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CATOBJEXT=.mo + DATADIRNAME=lib +fi +rm -f conftest* + INSTOBJEXT=.mo + fi + fi + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "$CATOBJEXT" = "NONE"; then + echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 +echo "configure:3963: checking whether catgets can be used" >&5 + # Check whether --with-catgets or --without-catgets was given. +if test "${with_catgets+set}" = set; then + withval="$with_catgets" + nls_cv_use_catgets=$withval +else + nls_cv_use_catgets=no +fi + + echo "$ac_t""$nls_cv_use_catgets" 1>&6 + + if test "$nls_cv_use_catgets" = "yes"; then + echo $ac_n "checking for main in -li""... $ac_c" 1>&6 +echo "configure:3976: checking for main in -li" >&5 +ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-li $LIBS" +cat > conftest.$ac_ext <<EOF +#line 3984 "configure" +#include "confdefs.h" + +int main() { +main() +; return 0; } +EOF +if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-li $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for catgets""... $ac_c" 1>&6 +echo "configure:4019: checking for catgets" >&5 +if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4024 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char catgets(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char catgets(); + +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_catgets) || defined (__stub___catgets) +choke me +#else +catgets(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_catgets=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_catgets=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_CATGETS 1 +EOF + + INTLOBJS="\$(CATOBJS)" + # Extract the first word of "gencat", so it can be a program name with args. +set dummy gencat; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4069: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GENCAT" in + /*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GENCAT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" + ;; +esac +fi +GENCAT="$ac_cv_path_GENCAT" +if test -n "$GENCAT"; then + echo "$ac_t""$GENCAT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$GENCAT" != "no"; then + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4105: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$GMSGFMT" = "no"; then + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4142: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4177: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4235: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4269: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4305: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + + + + + + + + + + + + + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +echo "configure:4398: checking for catalogs to be installed" >&5 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + echo "$ac_t""$LINGUAS" 1>&6 + fi + + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include <locale.h>" + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header <locale.h>. Take care yourself. */" + fi + + + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +echo "configure:4426: checking for linux/version.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4431 "configure" +#include "confdefs.h" +#include <linux/version.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + msgformat=linux +else + echo "$ac_t""no" 1>&6 +msgformat=xopen +fi + + + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + l= + + + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + + +if test "x${prefix}" = "xNONE"; then + cat >> confdefs.h <<EOF +#define PACKAGE_LOCALE_DIR "${ac_default_prefix}/${DATADIRNAME}/locale" +EOF + +else + cat >> confdefs.h <<EOF +#define PACKAGE_LOCALE_DIR "${prefix}/${DATADIRNAME}/locale" +EOF + +fi + +PACKAGE_PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/${PACKAGE}" + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | 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 \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo " +Makefile +macros/Makefile +src/Makefile +intl/Makefile +po/Makefile.in + config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@INSIDE_GNOME_COMMON_TRUE@%$INSIDE_GNOME_COMMON_TRUE%g +s%@INSIDE_GNOME_COMMON_FALSE@%$INSIDE_GNOME_COMMON_FALSE%g +s%@GNOME_LIBS@%$GNOME_LIBS%g +s%@GNOMEUI_LIBS@%$GNOMEUI_LIBS%g +s%@GNOMEGNORBA_LIBS@%$GNOMEGNORBA_LIBS%g +s%@GTKXMHTML_LIBS@%$GTKXMHTML_LIBS%g +s%@ZVT_LIBS@%$ZVT_LIBS%g +s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g +s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g +s%@GNOME_CONFIG@%$GNOME_CONFIG%g +s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g +s%@ORBIT_IDL@%$ORBIT_IDL%g +s%@HAVE_ORBIT_TRUE@%$HAVE_ORBIT_TRUE%g +s%@HAVE_ORBIT_FALSE@%$HAVE_ORBIT_FALSE%g +s%@ORBIT_CFLAGS@%$ORBIT_CFLAGS%g +s%@ORBIT_LIBS@%$ORBIT_LIBS%g +s%@HAVE_GNORBA_TRUE@%$HAVE_GNORBA_TRUE%g +s%@HAVE_GNORBA_FALSE@%$HAVE_GNORBA_FALSE%g +s%@GNORBA_CFLAGS@%$GNORBA_CFLAGS%g +s%@GNORBA_LIBS@%$GNORBA_LIBS%g +s%@GNOME_APPLETS_LIBS@%$GNOME_APPLETS_LIBS%g +s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g +s%@CC@%$CC%g +s%@CXX@%$CXX%g +s%@CPP@%$CPP%g +s%@cflags_set@%$cflags_set%g +s%@GTK_CONFIG@%$GTK_CONFIG%g +s%@GTK_CFLAGS@%$GTK_CFLAGS%g +s%@GTK_LIBS@%$GTK_LIBS%g +s%@XPM_LIBS@%$XPM_LIBS%g +s%@PTHREAD_LIB@%$PTHREAD_LIB%g +s%@RANLIB@%$RANLIB%g +s%@ALLOCA@%$ALLOCA%g +s%@USE_NLS@%$USE_NLS%g +s%@MSGFMT@%$MSGFMT%g +s%@GMSGFMT@%$GMSGFMT%g +s%@XGETTEXT@%$XGETTEXT%g +s%@GENCAT@%$GENCAT%g +s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g +s%@CATALOGS@%$CATALOGS%g +s%@CATOBJEXT@%$CATOBJEXT%g +s%@DATADIRNAME@%$DATADIRNAME%g +s%@GMOFILES@%$GMOFILES%g +s%@INSTOBJEXT@%$INSTOBJEXT%g +s%@INTLDEPS@%$INTLDEPS%g +s%@INTLLIBS@%$INTLLIBS%g +s%@INTLOBJS@%$INTLOBJS%g +s%@POFILES@%$POFILES%g +s%@POSUB@%$POSUB%g +s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g +s%@GT_NO@%$GT_NO%g +s%@GT_YES@%$GT_YES%g +s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g +s%@l@%$l%g +s%@PACKAGE_PIXMAPS_DIR@%$PACKAGE_PIXMAPS_DIR%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"Makefile +macros/Makefile +src/Makefile +intl/Makefile +po/Makefile.in +"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <<EOF + CONFIG_HEADERS="config.h" +EOF +cat >> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF + +cat >> $CONFIG_STATUS <<EOF +ac_sources="$nls_cv_header_libgt" +ac_dests="$nls_cv_header_intl" +EOF + +cat >> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi +done +EOF +cat >> $CONFIG_STATUS <<EOF + + + +EOF +cat >> $CONFIG_STATUS <<\EOF +test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h +case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + + diff --git a/apps/X11/InstallMgr/configure.in b/apps/X11/InstallMgr/configure.in new file mode 100644 index 0000000..2977d42 --- /dev/null +++ b/apps/X11/InstallMgr/configure.in @@ -0,0 +1,42 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(configure.in) +AM_INIT_AUTOMAKE(installmgr, 0.1) +AM_CONFIG_HEADER(config.h) + +dnl Pick up the Gnome macros. +AM_ACLOCAL_INCLUDE(macros) + +GNOME_INIT +AC_ISC_POSIX +AC_PROG_CC +AC_PROG_CXX +AM_PROG_CC_STDC +AC_HEADER_STDC + +GNOME_COMPILE_WARNINGS +GNOME_X_CHECKS + +dnl Add the languages which your application supports here. +ALL_LINGUAS="" +AM_GNU_GETTEXT + +dnl Set PACKAGE_LOCALE_DIR in config.h. +if test "x${prefix}" = "xNONE"; then + AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale") +else + AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale") +fi + +dnl Subst PACKAGE_PIXMAPS_DIR. +PACKAGE_PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/${PACKAGE}" +AC_SUBST(PACKAGE_PIXMAPS_DIR) + +AC_OUTPUT([ +Makefile +macros/Makefile +src/Makefile +intl/Makefile +po/Makefile.in +]) + diff --git a/apps/X11/InstallMgr/install-sh b/apps/X11/InstallMgr/install-sh new file mode 100755 index 0000000..e9de238 --- /dev/null +++ b/apps/X11/InstallMgr/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=mkdir + 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 + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + 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 + true + 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 + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; 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 + true + 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 true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/apps/X11/InstallMgr/installmgr.glade b/apps/X11/InstallMgr/installmgr.glade new file mode 100644 index 0000000..99e0f5b --- /dev/null +++ b/apps/X11/InstallMgr/installmgr.glade @@ -0,0 +1,1220 @@ +<?xml version="1.0"?> +<GTK-Interface> + +<project> + <name>InstallMgr</name> + <program_name>installmgr</program_name> + <directory></directory> + <source_directory>src</source_directory> + <pixmaps_directory>pixmaps</pixmaps_directory> + <language>C</language> + <gnome_support>True</gnome_support> + <gettext_support>True</gettext_support> + <use_widget_names>False</use_widget_names> + <output_main_file>True</output_main_file> + <output_support_files>True</output_support_files> + <output_build_files>True</output_build_files> + <backup_source_files>True</backup_source_files> + <main_source_file>interface.c</main_source_file> + <main_header_file>interface.h</main_header_file> + <handler_source_file>callbacks.cpp</handler_source_file> + <handler_header_file>callbacks.h</handler_header_file> + <support_source_file>support.c</support_source_file> + <support_header_file>support.h</support_header_file> + <translatable_strings_file></translatable_strings_file> +</project> + +<widget> + <class>GnomeApp</class> + <name>InstallMgrApp</name> + <title>InstallMgr</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>False</modal> + <default_width>600</default_width> + <default_height>450</default_height> + <allow_shrink>False</allow_shrink> + <allow_grow>True</allow_grow> + <auto_shrink>False</auto_shrink> + <enable_layout_config>True</enable_layout_config> + + <widget> + <class>GnomeDock</class> + <child_name>GnomeApp:dock</child_name> + <name>dock1</name> + <allow_floating>True</allow_floating> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GnomeDockItem</class> + <name>dockitem1</name> + <border_width>2</border_width> + <placement>GNOME_DOCK_TOP</placement> + <band>0</band> + <position>0</position> + <offset>0</offset> + <locked>False</locked> + <exclusive>True</exclusive> + <never_floating>False</never_floating> + <never_vertical>True</never_vertical> + <never_horizontal>False</never_horizontal> + <shadow_type>GTK_SHADOW_OUT</shadow_type> + + <widget> + <class>GtkMenuBar</class> + <name>menubar1</name> + <shadow_type>GTK_SHADOW_NONE</shadow_type> + + <widget> + <class>GtkMenuItem</class> + <name>file2</name> + <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item> + + <widget> + <class>GtkMenu</class> + <name>file2_menu</name> + + <widget> + <class>GtkPixmapMenuItem</class> + <name>exit1</name> + <signal> + <name>activate</name> + <handler>on_exit1_activate</handler> + <last_modification_time>Sun, 19 Dec 1999 05:17:05 GMT</last_modification_time> + </signal> + <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item> + </widget> + </widget> + </widget> + + <widget> + <class>GtkMenuItem</class> + <name>options1</name> + <label>_Options</label> + <right_justify>False</right_justify> + + <widget> + <class>GtkMenu</class> + <name>options1_menu</name> + + <widget> + <class>GtkMenuItem</class> + <name>local_path1</name> + <signal> + <name>activate</name> + <handler>on_local_path1_activate</handler> + <last_modification_time>Sun, 19 Dec 1999 05:18:44 GMT</last_modification_time> + </signal> + <label>_Local Path...</label> + <right_justify>False</right_justify> + </widget> + + <widget> + <class>GtkMenuItem</class> + <name>manage_remote_sources1</name> + <signal> + <name>activate</name> + <handler>on_manage_remote_sources1_activate</handler> + <last_modification_time>Sun, 19 Dec 1999 05:18:45 GMT</last_modification_time> + </signal> + <label>_Manage Remote Sources...</label> + <right_justify>False</right_justify> + </widget> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkVBox</class> + <child_name>GnomeDock:contents</child_name> + <name>vbox1</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkPixmap</class> + <name>pixmap1</name> + <signal> + <name>button_press_event</name> + <handler>on_pixmap1_button_press_event</handler> + <last_modification_time>Tue, 21 Dec 1999 07:14:26 GMT</last_modification_time> + </signal> + <filename>sword.xpm</filename> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <build_insensitive>True</build_insensitive> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkHPaned</class> + <name>hpaned1</name> + <handle_size>10</handle_size> + <gutter_size>6</gutter_size> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox2</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <shrink>True</shrink> + <resize>False</resize> + </child> + + <widget> + <class>GtkToolbar</class> + <name>toolbar2</name> + <orientation>GTK_ORIENTATION_HORIZONTAL</orientation> + <type>GTK_TOOLBAR_ICONS</type> + <space_size>5</space_size> + <space_style>GTK_TOOLBAR_SPACE_EMPTY</space_style> + <relief>GTK_RELIEF_NORMAL</relief> + <tooltips>True</tooltips> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label3</name> + <label>Available </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkButton</class> + <child_name>Toolbar:button</child_name> + <name>GlobeBtn</name> + <signal> + <name>clicked</name> + <handler>on_GlobeBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:20:12 GMT</last_modification_time> + </signal> + <label>Mng Rmt Srcs</label> + <icon>globe.xpm</icon> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label5</name> + <label> </label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkPixmap</class> + <name>pixmap2</name> + <filename>arrow2r.xpm</filename> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <build_insensitive>True</build_insensitive> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label4</name> + <label>Selected for Install</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + </widget> + + <widget> + <class>GtkNotebook</class> + <name>notebook1</name> + <can_focus>True</can_focus> + <show_tabs>True</show_tabs> + <show_border>True</show_border> + <tab_pos>GTK_POS_TOP</tab_pos> + <scrollable>False</scrollable> + <tab_hborder>2</tab_hborder> + <tab_vborder>2</tab_vborder> + <popup_enable>False</popup_enable> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkTree</class> + <name>LocalTree</name> + <selection_mode>GTK_SELECTION_SINGLE</selection_mode> + <view_mode>GTK_TREE_VIEW_LINE</view_mode> + <view_line>True</view_line> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label1</name> + <label>Local</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + </widget> + + <widget> + <class>GtkToolbar</class> + <name>toolbar3</name> + <orientation>GTK_ORIENTATION_HORIZONTAL</orientation> + <type>GTK_TOOLBAR_BOTH</type> + <space_size>5</space_size> + <space_style>GTK_TOOLBAR_SPACE_EMPTY</space_style> + <relief>GTK_RELIEF_NORMAL</relief> + <tooltips>True</tooltips> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkButton</class> + <child_name>Toolbar:button</child_name> + <name>InfoBtn</name> + <signal> + <name>clicked</name> + <handler>on_InfoBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:15:28 GMT</last_modification_time> + </signal> + <label>Info</label> + </widget> + + <widget> + <class>GtkButton</class> + <child_name>Toolbar:button</child_name> + <name>SelectBtn</name> + <signal> + <name>clicked</name> + <handler>on_SelectBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:15:19 GMT</last_modification_time> + </signal> + <label>Select</label> + </widget> + + <widget> + <class>GtkButton</class> + <child_name>Toolbar:button</child_name> + <name>SelectAllBtn</name> + <signal> + <name>clicked</name> + <handler>on_SelectAllBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:15:12 GMT</last_modification_time> + </signal> + <label>Select All</label> + </widget> + + <widget> + <class>GtkButton</class> + <child_name>Toolbar:button</child_name> + <name>InstallBtn</name> + <signal> + <name>clicked</name> + <handler>on_InstallBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:15:39 GMT</last_modification_time> + </signal> + <label>Install</label> + <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap> + </widget> + </widget> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox3</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <shrink>True</shrink> + <resize>True</resize> + </child> + + <widget> + <class>GtkLabel</class> + <name>label2</name> + <label>Installed</label> + <justify>GTK_JUSTIFY_LEFT</justify> + <wrap>False</wrap> + <xalign>0.01</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkTree</class> + <name>InstalledTree</name> + <selection_mode>GTK_SELECTION_SINGLE</selection_mode> + <view_mode>GTK_TREE_VIEW_LINE</view_mode> + <view_line>True</view_line> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkToolbar</class> + <name>toolbar4</name> + <orientation>GTK_ORIENTATION_HORIZONTAL</orientation> + <type>GTK_TOOLBAR_BOTH</type> + <space_size>5</space_size> + <space_style>GTK_TOOLBAR_SPACE_EMPTY</space_style> + <relief>GTK_RELIEF_NORMAL</relief> + <tooltips>True</tooltips> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkButton</class> + <child_name>Toolbar:button</child_name> + <name>RemoveBtn</name> + <signal> + <name>clicked</name> + <handler>on_RemoveBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:15:48 GMT</last_modification_time> + </signal> + <label>Remove</label> + <stock_pixmap>GNOME_STOCK_PIXMAP_REMOVE</stock_pixmap> + </widget> + </widget> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GnomeAppBar</class> + <child_name>GnomeApp:appbar</child_name> + <name>appbar1</name> + <has_progress>True</has_progress> + <has_status>True</has_status> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> +</widget> + +<widget> + <class>GnomeDialog</class> + <name>InfoFrm</name> + <title>About Module</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>True</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>False</allow_grow> + <auto_shrink>False</auto_shrink> + <auto_close>False</auto_close> + <hide_on_close>False</hide_on_close> + + <widget> + <class>GtkVBox</class> + <child_name>GnomeDialog:vbox</child_name> + <name>dialog-vbox1</name> + <homogeneous>False</homogeneous> + <spacing>8</spacing> + <child> + <padding>4</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkScrolledWindow</class> + <name>scrolledwindow1</name> + <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy> + <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy> + <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> + <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkText</class> + <name>InfoText</name> + <can_focus>True</can_focus> + <editable>False</editable> + <text></text> + </widget> + </widget> + + <widget> + <class>GtkHButtonBox</class> + <child_name>GnomeDialog:action_area</child_name> + <name>dialog-action_area1</name> + <layout_style>GTK_BUTTONBOX_SPREAD</layout_style> + <spacing>8</spacing> + <child_min_width>85</child_min_width> + <child_min_height>27</child_min_height> + <child_ipad_x>7</child_ipad_x> + <child_ipad_y>0</child_ipad_y> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + <pack>GTK_PACK_END</pack> + </child> + + <widget> + <class>GtkButton</class> + <name>OKBtn</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_OKBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:21:03 GMT</last_modification_time> + </signal> + <stock_button>GNOME_STOCK_BUTTON_OK</stock_button> + </widget> + </widget> + </widget> +</widget> + +<widget> + <class>GtkFileSelection</class> + <name>fileselection1</name> + <border_width>10</border_width> + <title>Select File</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>False</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>True</allow_grow> + <auto_shrink>False</auto_shrink> + <show_file_op_buttons>True</show_file_op_buttons> + + <widget> + <class>GtkButton</class> + <child_name>FileSel:ok_button</child_name> + <name>ok_button1</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <label>OK</label> + </widget> + + <widget> + <class>GtkButton</class> + <child_name>FileSel:cancel_button</child_name> + <name>cancel_button1</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <label>Cancel</label> + </widget> +</widget> + +<widget> + <class>GnomeDialog</class> + <name>RemoteMntFrm</name> + <title>Manage Remote Sites</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>True</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>False</allow_grow> + <auto_shrink>False</auto_shrink> + <auto_close>False</auto_close> + <hide_on_close>False</hide_on_close> + + <widget> + <class>GtkVBox</class> + <child_name>GnomeDialog:vbox</child_name> + <name>dialog-vbox2</name> + <homogeneous>False</homogeneous> + <spacing>8</spacing> + <child> + <padding>4</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox2</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox4</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkList</class> + <name>SiteList</name> + <height>140</height> + <selection_mode>GTK_SELECTION_SINGLE</selection_mode> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox3</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox4</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkPixmap</class> + <name>pixmap4</name> + <filename>filenew.xpm</filename> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <build_insensitive>True</build_insensitive> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkButton</class> + <name>AddBtn</name> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_AddBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:25:03 GMT</last_modification_time> + </signal> + <label>Add</label> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox5</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkPixmap</class> + <name>pixmap5</name> + <filename>trash.xpm</filename> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <build_insensitive>True</build_insensitive> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + + <widget> + <class>GtkButton</class> + <name>RemoveBtn</name> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_RemoveBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:24:54 GMT</last_modification_time> + </signal> + <label>Remove</label> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox5</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox6</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label6</name> + <label>Site Name</label> + <justify>GTK_JUSTIFY_LEFT</justify> + <wrap>False</wrap> + <xalign>1.22935e-07</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>NameText</name> + <can_focus>True</can_focus> + <signal> + <name>changed</name> + <handler>on_NameText_changed</handler> + <last_modification_time>Tue, 21 Dec 1999 07:25:55 GMT</last_modification_time> + </signal> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox7</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label7</name> + <label>Site Machine Name</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>7.45058e-09</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>MachineText</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkVBox</class> + <name>vbox8</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label8</name> + <label>Repository Directory</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>7.45058e-09</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>RepositoryText</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkHButtonBox</class> + <child_name>GnomeDialog:action_area</child_name> + <name>dialog-action_area2</name> + <layout_style>GTK_BUTTONBOX_SPREAD</layout_style> + <spacing>8</spacing> + <child_min_width>85</child_min_width> + <child_min_height>27</child_min_height> + <child_ipad_x>7</child_ipad_x> + <child_ipad_y>0</child_ipad_y> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + <pack>GTK_PACK_END</pack> + </child> + + <widget> + <class>GtkButton</class> + <name>SaveBtn</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_SaveBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:25:12 GMT</last_modification_time> + </signal> + <label>Save</label> + <stock_pixmap>GNOME_STOCK_PIXMAP_SAVE</stock_pixmap> + </widget> + + <widget> + <class>GtkButton</class> + <name>CancelBtn</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_CancelBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:25:19 GMT</last_modification_time> + </signal> + <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button> + </widget> + </widget> + </widget> +</widget> + +<widget> + <class>GnomeDialog</class> + <name>CipherFrm</name> + <title>Ciphered Module</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>True</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>False</allow_grow> + <auto_shrink>False</auto_shrink> + <auto_close>False</auto_close> + <hide_on_close>False</hide_on_close> + + <widget> + <class>GtkVBox</class> + <child_name>GnomeDialog:vbox</child_name> + <name>dialog-vbox3</name> + <homogeneous>False</homogeneous> + <spacing>8</spacing> + <child> + <padding>4</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox9</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox10</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label9</name> + <label>The module that you have requested for install seems to be ciphered.</label> + <justify>GTK_JUSTIFY_LEFT</justify> + <wrap>False</wrap> + <xalign>7.45058e-09</xalign> + <yalign>0</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox6</name> + <border_width>5</border_width> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox7</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label10</name> + <label>Cipher Key:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>KeyText</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <padding>5</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkButton</class> + <name>TryBtn</name> + <width>99</width> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_TryBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:27:36 GMT</last_modification_time> + </signal> + <label>Try</label> + <child> + <padding>10</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkScrolledWindow</class> + <name>scrolledwindow2</name> + <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy> + <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy> + <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> + <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkText</class> + <name>ModuleText</name> + <width>166</width> + <height>146</height> + <can_focus>True</can_focus> + <editable>False</editable> + <text></text> + </widget> + </widget> + </widget> + + <widget> + <class>GtkHButtonBox</class> + <child_name>GnomeDialog:action_area</child_name> + <name>dialog-action_area3</name> + <layout_style>GTK_BUTTONBOX_SPREAD</layout_style> + <spacing>8</spacing> + <child_min_width>85</child_min_width> + <child_min_height>27</child_min_height> + <child_ipad_x>7</child_ipad_x> + <child_ipad_y>0</child_ipad_y> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + <pack>GTK_PACK_END</pack> + </child> + + <widget> + <class>GtkButton</class> + <name>OKBtn</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_OKBtn_clicked</handler> + <last_modification_time>Tue, 21 Dec 1999 07:27:28 GMT</last_modification_time> + </signal> + <stock_button>GNOME_STOCK_BUTTON_OK</stock_button> + </widget> + </widget> + </widget> +</widget> + +<widget> + <class>GnomeDialog</class> + <name>StatusFrm</name> + <title>Status</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>True</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>False</allow_grow> + <auto_shrink>False</auto_shrink> + <auto_close>False</auto_close> + <hide_on_close>False</hide_on_close> + + <widget> + <class>GtkVBox</class> + <child_name>GnomeDialog:vbox</child_name> + <name>dialog-vbox4</name> + <homogeneous>False</homogeneous> + <spacing>8</spacing> + <child> + <padding>4</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox11</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>label11</name> + <label></label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>7.45058e-09</xalign> + <yalign>7.45058e-09</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkProgressBar</class> + <name>progressbar1</name> + <value>0</value> + <lower>0</lower> + <upper>100</upper> + <bar_style>GTK_PROGRESS_CONTINUOUS</bar_style> + <orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation> + <activity_mode>False</activity_mode> + <show_text>False</show_text> + <format>%P %%</format> + <text_xalign>0.5</text_xalign> + <text_yalign>0.5</text_yalign> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkHButtonBox</class> + <child_name>GnomeDialog:action_area</child_name> + <name>dialog-action_area4</name> + <layout_style>GTK_BUTTONBOX_SPREAD</layout_style> + <spacing>8</spacing> + <child_min_width>85</child_min_width> + <child_min_height>27</child_min_height> + <child_ipad_x>7</child_ipad_x> + <child_ipad_y>0</child_ipad_y> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + <pack>GTK_PACK_END</pack> + </child> + + <widget> + <class>GtkButton</class> + <name>CancelBtn</name> + <can_default>True</can_default> + <can_focus>True</can_focus> + <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button> + </widget> + </widget> + </widget> +</widget> + +</GTK-Interface> diff --git a/apps/X11/InstallMgr/intl/ChangeLog b/apps/X11/InstallMgr/intl/ChangeLog new file mode 100644 index 0000000..1989501 --- /dev/null +++ b/apps/X11/InstallMgr/intl/ChangeLog @@ -0,0 +1,1086 @@ +1998-04-29 Ulrich Drepper <drepper@cygnus.com> + + * intl/localealias.c (read_alias_file): Use unsigned char for + local variables. Remove unused variable tp. + * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char * + for type of codeset. For loosing Solaris systems. + * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset. + * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable + len if not needed. + Patches by Jim Meyering. + +1998-04-28 Ulrich Drepper <drepper@cygnus.com> + + * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if + mmap is not supported. + + * hash-string.h: Don't include <values.h>. + +1998-04-27 Ulrich Drepper <drepper@cygnus.com> + + * textdomain.c: Use strdup is available. + + * localealias.c: Define HAVE_MEMPCPY so that we can use this + function. Define and use semapahores to protect modfication of + global objects when compiling for glibc. Add code to allow + freeing alias table. + + * l10nflist.c: Don't assume stpcpy not being a macro. + + * gettextP.h: Define internal_function macri if not already done. + Use glibc byte-swap macros instead of defining SWAP when compiled + for glibc. + (struct loaded_domain): Add elements to allow unloading. + + * Makefile.in (distclean): Don't remove libintl.h here. + + * bindtextdomain.c: Carry over changes from glibc. Use strdup if + available. + + * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal + functions. Add memory freeing code for glibc. + + * dgettext.c: Update copyright. + + * explodename.c: Include stdlib.h and string.h only if they exist. + Use strings.h eventually. + + * finddomain.c: Mark internal functions. Use strdup if available. + Add memory freeing code for glibc. + +1997-10-10 20:00 Ulrich Drepper <drepper@cygnus.com> + + * libgettext.h: Fix dummy textdomain and bindtextdomain macros. + They should return reasonable values. + Reported by Tom Tromey <tromey@cygnus.com>. + +1997-09-16 03:33 Ulrich Drepper <drepper@cygnus.com> + + * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. + * intlh.inst.in: Likewise. + Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>. + + * libintl.glibc: Update from current glibc version. + +1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com> + + * intlh.inst.in: Reformat copyright. + +1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com> + + * dcgettext.c (DCGETTEXT): Remove wrong comment. + +1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (install-data): Don't change directory to install. + +1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com> + + * cat-compat.c: Fix copyright. + + * localealias.c: Don't define strchr unless !HAVE_STRCHR. + + * loadmsgcat.c: Update copyright. Fix typos. + + * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. + (_nl_make_l10nflist): Handle sponsor and revision correctly. + + * gettext.c: Update copyright. + * gettext.h: Likewise. + * hash-string.h: Likewise. + + * finddomain.c: Remoave dead code. Define strchr only if + !HAVE_STRCHR. + + * explodename.c: Include <sys/types.h>. + + * explodename.c: Reformat copyright text. + (_nl_explode_name): Fix typo. + + * dcgettext.c: Define and use __set_errno. + (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is + not defined. + + * bindtextdom.c: Pretty printing. + +1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com> + + * dcgettext.c (guess_category_value): Don't depend on + HAVE_LC_MESSAGES. We don't need the macro here. + Patch by Bruno Haible <haible@ilog.fr>. + + * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL + macro. Instead use HAVE_LOCALE_NULL and define it when using + glibc, as in dcgettext.c. + Patch by Bruno Haible <haible@ilog.fr>. + + * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois + Pinard. + +Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in: Implement handling of libtool. + + * gettextP.h: Change data structures for use of generic lowlevel + i18n file handling. + +Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com> + + * textdomain.c: Put parentheses around arguments of memcpy macro + definition. + * localealias.c: Likewise. + * l10nflist.c: Likewise. + * finddomain.c: Likewise. + * bindtextdom.c: Likewise. + Reported by Thomas Esken. + +Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com> + + * textdomain.c: Move definition of `memcpy` macro to right + position. + +Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com> + + * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using + bcopy if not already defined. Reported by Thomas Esken. + * bindtextdom.c: Likewise. + * l10nflist.c: Likewise. + * localealias.c: Likewise. + * textdomain.c: Likewise. + +Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (libdir): Change to use exec_prefix instead of + prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>. + +Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com> + + * l10nflist.c (_nl_normalize_codeset): We convert to lower case, + so don't prepend uppercase `ISO' for only numeric arg. + +Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com> + + * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after + definition of _GNU_SOURCE. Patch by Roland McGrath. + + * Makefile.in (uninstall): Fix another bug with `for' loop and + empty arguments. Patch by Jim Meyering. Correct name os + uninstalled files: no intl- prefix anymore. + + * Makefile.in (install-data): Again work around shells which + cannot handle mpty for list. Reported by Jim Meyering. + +Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (install): Split goal. Now depend on install-exec + and install-data. + (install-exec, install-data): New goals. Created from former + install goal. + Reported by Karl Berry. + +Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (MKINSTALLDIRS): New variable. Path to + mkinstalldirs script. + (install): use MKINSTALLDIRS variable or if the script is not present + try to find it in the $top_scrdir). + +Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com> + + * l10nflist.c: Linux libc *partly* includes the argz_* functions. + Grr. Work around by renaming the static version and use macros + for renaming. + +Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com> + + * l10nflist.c: Correct presence test macros of __argz_* functions. + + * l10nflist.c: Include <argz.h> based on test of it instead when + __argz_* functions are available. + Reported by Andreas Schwab. + +Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com> + + * explodename.c, l10nflist.c: Define NULL for dumb systems. + +Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com> + + * intlh.inst.in, libgettext.h (dcgettext): Rename local variable + result to __result to prevent name clash. + + * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to + get prototype for stpcpy and strcasecmp. + + * intlh.inst.in, libgettext.h: Move declaration of + `_nl_msg_cat_cntr' outside __extension__ block to prevent warning + from gcc's -Wnested-extern option. + +Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (install): Remove comment. + +Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (install): Work around for another Buglix stupidity. + Always use an `else' close for `if's. Reported by Nelson Beebe. + + * Makefile.in (intlh.inst): Correct typo in phony rule. + Reported by Nelson Beebe. + +Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com> + + * dcgettext.c (read_alias_file): Rename variable alloca_list to + block_list as the macro calls assume. + Patch by Eric Backus. + + * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using + malloc. + (read_alias_file): Rename varriabe alloca_list to block_list as the + macro calls assume. + Patch by Eric Backus. + + * l10nflist.c: Correct conditional for <argz.h> inclusion. + Reported by Roland McGrath. + + * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not + all-@USE_NLS@. + + * Makefile.in (install): intlh.inst comes from local dir, not + $(srcdir). + + * Makefile.in (intlh.inst): Special handling of this goal. If + used in gettext, this is really a rul to construct this file. If + used in any other package it is defined as a .PHONY rule with + empty body. + + * finddomain.c: Extract locale file information handling into + l10nfile.c. Rename local stpcpy__ function to stpcpy. + + * dcgettext.c (stpcpy): Add local definition. + + * l10nflist.c: Solve some portability problems. Patches partly by + Thomas Esken. Add local definition of stpcpy. + +Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com> + + * intlh.inst.in: Don't depend including <locale.h> on + HAVE_LOCALE_H. Instead configure must rewrite this fiile + depending on the result of the configure run. + + * Makefile.in (install): libintl.inst is now called intlh.inst. + Add rules for updating intlh.inst from intlh.inst.in. + + * libintl.inst: Renamed to intlh.inst.in. + + * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 + because gcc has __buitlin_alloca. + Reported by Roland McGrath. + +Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (installcheck): New goal to fulfill needs of + automake's distcheck. + + * Makefile.in (install): Reorder commands so that VERSION is + found. + + * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in + @datadir@/gettext. + (COMSRCS): Add l10nfile.c. + (OBJECTS): Add l10nfile.o. + (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). + (DISTFILE.gettext): Remove $(DISTFILES.common). + (all-gettext): Remove goal. + (install): If $(PACKAGE) = gettext install, otherwose do nothing. No + package but gettext itself should install libintl.h + headers. + (dist): Extend goal to work for gettext, too. + (dist-gettext): Remove goal. + + * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. + +Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com> + + * loadmsgcat.c (_nl_load_domain): Parameter is now comes from + find_l10nfile. + +Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com> + + * l10nflist.c (__argz_next): Add definition. + + * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca + code. Use new l10nfile handling. + + * localealias.c [!HAVE_ALLOCA]: Add code for handling missing + alloca code. + + * l10nflist.c: Initial revision. + +Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware> + + * Makefile.in (all-gettext): New goal. Same as all-yes. + +Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de> + + * Makefile.in (gettextsrcdir): Define using @datadir@. + +Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware> + + * finddomain.c: Include <ctype.h>. Reported by Roland McGrath. + +Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware> + + * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing + with external declaration. + +Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware> + + * Makefile.in (all-no): Rename from all_no. + +Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware> + + * gettextP.h [loaded_domain]: Array `successor' must now contain up + to 63 elements (because of codeset name normalization). + + * finddomain.c: Implement codeset name normalization. + +Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware> + + * Makefile.in (all): Define to `all-@USE_NLS@'. + (all-yes, all_no): New goals. `all-no' is noop, `all-yes' + is former all. + +Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com> + + * localealias.c (alias_compare): Increment string pointers in loop + of strcasecmp replacement. + +Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (install-src): Who commented this goal out ? :-) + +Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware> + + * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls + should not effect it because a missing catalog is no error. + Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>. + +Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (Makefile): Explicitly use $(SHELL) for running + shell scripts. + +Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * Makefile.in (install-src): Only install library and header when + we use the own implementation. Don't do it when using the + system's gettext or catgets functions. + + * dcgettext.c (find_msg): Must not swap domain->hash_size here. + +Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware> + + * localealias.c, libintl.inst, libgettext.h, hash-string.h, + gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: + Use PARAMS instead of __P. Suggested by Roland McGrath. + +Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu> + + * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if + !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. + +Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (install-src): + Install libintl.inst instead of libintl.h.install. + +Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu> + + * cat-compat.c (textdomain): + Reverse order in which files are tried you load. First + try local file, when this failed absolute path. + +Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu> + + * cat-compat.c (bindtextdomain): Add missing { }. + +Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware> + + * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. + + * Makefile.in: + Add dummy `all' and `dvi' goals. Reported by Tom Tromey. + +Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca> + + * hash-string.h: Capitalize arguments of macros. + +Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): Prevent files names longer than 13 + characters. libintl.h.glibc->libintl.glibc, + libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. + +Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com> + + * dcgettext.c: Fix bug in preprocessor conditionals. + +Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu> + + * libgettext.h: Solaris cc does not understand + #if !SYMBOL1 && !SYMBOL2. Sad but true. + +Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware> + + * hash-string.h (hash_string): + Fix for machine with >32 bit `unsigned long's. + + * dcgettext.c (DCGETTEXT): + Fix horrible bug in loop for alternative translation. + +Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware> + + * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: + Some further simplifications in message number generation. + +Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware> + + * libintl.h.glibc: Use __const instead of const in prototypes. + + * Makefile.in (install-src): + Install libintl.h.install instead of libintl.h. This + is a stripped-down version. Suggested by Peter Miller. + + * libintl.h.install, libintl.h.glibc: Initial revision. + + * localealias.c (_nl_expand_alias, read_alias_file): + Protect prototypes in type casts by __P. + +Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware> + + * hash-string.h: Correct prototype for hash_string. + +Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware> + + * hash-string.h (hash_string): Add prototype. + + * gettextP.h: Fix copyright. + (SWAP): Add prototype. + +Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware> + + * localealias.c (read_alias_file): Forgot sizeof. + Avoid calling *printf function. This introduces a big overhead. + Patch by Roland McGrath. + +Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. + + * finddomain.c (stpcpy): + Define substitution function local. The macro was to flaky. + + * cat-compat.c: Fix typo. + + * xopen-msg.sed, linux-msg.sed: + While bringing message number to right place only accept digits. + + * linux-msg.sed, xopen-msg.sed: Now that the counter does not have + leading 0s we don't need to remove them. Reported by Marcus + Daniels. + + * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in + dependency. Reported by Marcus Daniels. + + * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. + Generally cleanup using #if instead of #ifndef. + + * Makefile.in: Correct typos in comment. By Franc,ois Pinard. + +Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (install-src): Don't install libintl.h and libintl.a + if we use an available gettext implementation. + +Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware> + + * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported + by Franc,ois Pinard. + + * libgettext.h: Use #if instead of #ifdef/#ifndef. + + * finddomain.c: + Comments describing what has to be done should start with FIXME. + +Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. + DISTFILES.common names the files common to both dist goals. + DISTFILES.gettext are the files only distributed in GNU gettext. + +Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware> + + * dcgettext.c (DCGETTEXT): Correct searching in derived locales. + This was necessary since a change in _nl_find_msg several weeks + ago. I really don't know this is still not fixed. + +Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware> + + * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This + might mark a special condition. + + * finddomain.c (make_entry_rec): Don't make illegal entry as decided. + + * Makefile.in (dist): Suppress error message when ln failed. + Get files from $(srcdir) explicitly. + + * libgettext.h (gettext_const): Rename to gettext_noop. + +Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c (make_entry_rec): + Protect against wrong locale names by testing mask. + + * libgettext.h (gettext_const): Add macro definition. + Capitalize macro arguments. + +Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c (_nl_find_domain): + Test for pointer != NULL before accessing value. + Reported by Tom Tromey. + + * gettext.c (NULL): + Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. + +Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware> + + * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. + +Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware> + + * libgettext.h: Disable dcgettext optimization for Solaris 2.3. + + * localealias.c (alias_compare): + Peter Miller reported that tolower in some systems is + even dumber than I thought. Protect call by `isupper'. + +Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (libdir, includedir): New variables. + (install-src): Install libintl.a and libintl.h in correct dirs. + +Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. + + * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. + + * localealias.c: + Fix typo and superflous test. Reported by Christian von Roques. + +Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c (_nl_find_domain): + Correct some remainder from the pre-CEN syntax. Now + we don't have a constant number of successors anymore. + +Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): Add libintl.h.glibc. + + * Makefile.in (dist-libc): Add goal for packing sources for glibc. + (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. + + * loadmsgcat.c: Forget to continue #if line. + + * localealias.c: + [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name + space clean. + + * dcgettext.c, finddomain.c: Better comment to last change. + + * loadmsgcat.c: + [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to + __fstat, __open, __close, __read, __mmap, and __munmap resp + to keep ANSI C name space clean. + + * finddomain.c: + [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. + + * dcgettext.c: + [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to + keep ANSI C name space clean. + + * libgettext.h: + Include sys/types.h for those old SysV systems out there. + Reported by Francesco Potorti`. + + * loadmsgcat.c (use_mmap): Define if compiled for glibc. + + * bindtextdom.c: Include all those standard headers + unconditionally if _LIBC is defined. + + * finddomain.c: Fix 2 times defiend -> defined. + + * textdomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. + + * gettext.c: + Include libintl.h instead of libgettext.h when compiling for glibc. + Get NULL from stddef.h if we compile for glibc. + + * finddomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * dcgettext.c: Include all those standard headers unconditionally + if _LIBC is defined. + + * dgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. + + * dcgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. + + * bindtextdom.c: + If compiled in glibc include libintl.h instead of libgettext.h. + +Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware> + + * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. + Reported by Marcus Daniels. + + * cat-compat.c (bindtextdomain): + String used in putenv must not be recycled. + Reported by Marcus Daniels. + + * libgettext.h (__USE_GNU_GETTEXT): + Additional symbol to signal that we use GNU gettext + library. + + * cat-compat.c (bindtextdomain): + Fix bug with the strange stpcpy replacement. + Reported by Nelson Beebe. + +Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware> + + * cat-compat.c: Include <string.h> for stpcpy prototype. + + * localealias.c (read_alias_file): + While expand strdup code temporary variable `cp' hided + higher level variable with same name. Rename to `tp'. + + * textdomain.c (textdomain): + Avoid warning by using temporary variable in strdup code. + + * finddomain.c (_nl_find_domain): Remove unused variable `application'. + +Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware> + + * localealias.c (alias_compare): + Use strcasecmp() only if available. Else use + implementation in place. + + * intl-compat.c: + Wrapper functions now call *__ functions instead of __*. + + * libgettext.h: Declare prototypes for *__ functions instead for __*. + + * cat-compat.c, loadmsgcat.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + + * bindtextdom.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Rename to bindtextdomain__ if not used in GNU C Library. + + * dgettext.c: + Rename function to dgettext__ if not used in GNU C Library. + + * gettext.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Functions now called gettext__ if not used in GNU C Library. + + * dcgettext.c, localealias.c, textdomain.c, finddomain.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + +Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c: Correct some bugs in handling of CEN standard + locale definitions. + +Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c: Implement CEN syntax. + + * gettextP.h (loaded_domain): Extend number of successors to 31. + +Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (aliaspath): Remove path to X11 locale dir. + + * Makefile.in: Make install-src depend on install. This helps + gettext to install the sources and other packages can use the + install goal. + +Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (uninstall): Remove stuff installed by install-src. + +Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware> + + * VERSION.in: Initial revision. + + * Makefile.in (DISTFILES): + Add VERSION file. This is not necessary for gettext, but + for other packages using this library. + +Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware> + + * gettextP.h (_nl_find_domain): + New prototype after changing search strategy. + + * finddomain.c (_nl_find_domain): + We now try only to find a specified catalog. Fall back to other + catalogs listed in the locale list is now done in __dcgettext. + + * dcgettext.c (__dcgettext): + Now we provide message fall back even to different languages. + I.e. if a message is not available in one language all the other + in the locale list a tried. Formerly fall back was only possible + within one language. Implemented by moving one loop from + _nl_find_domain to here. + +Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (gettextsrcdir): + Directory where source of GNU gettext library are made + available. + (INSTALL, INSTALL_DATA): Programs used for installing sources. + (gettext-src): New. Rule to install GNU gettext sources for use in + gettextize shell script. + +Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware> + + * loadmsgcat.c (_nl_load_domain): + Use mmap for loading only when munmap function is + also available. + + * Makefile.in (install): Depend on `all' goal. + +Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware> + + * localealias.c (read_alias_file): + Do not overwrite '\n' when terminating alias value string. + + * localealias.c (read_alias_file): + Handle long lines. Ignore the rest not fitting in + the buffer after the initial `fgets' call. + +Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware> + + * gettextP.h (_nl_load_domain): + Add prototype, replacing prototype for _nl_load_msg_cat. + + * finddomain.c (_nl_find_domain): + Remove unneeded variable filename and filename_len. + (expand_alias): Remove prototype because functions does not + exist anymore. + + * localealias.c (read_alias_file): + Change type of fname_len parameter to int. + (xmalloc): Add prototype. + + * loadmsgcat.c: Better prototypes for xmalloc. + +Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c (_nl_find_domain): + Allow alias name to be constructed from the four components. + + * Makefile.in (aliaspath): New variable. Set to preliminary value. + (SOURCES): Add localealias.c. + (OBJECTS): Add localealias.o. + + * gettextP.h: Add prototype for _nl_expand_alias. + + * finddomain.c: Aliasing handled in intl/localealias.c. + + * localealias.c: Aliasing for locale names. + + * bindtextdom.c: Better prototypes for xmalloc and xstrdup. + +Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): gettext.perl is now found in misc/. + + * cat-compat.c (bindtextdomain): + Correct implementation. dirname parameter was not used. + Reported by Marcus Daniels. + + * gettextP.h (loaded_domain): + New fields `successor' and `decided' for oo, lazy + message handling implementation. + + * dcgettext.c: + Adopt for oo, lazy message handliing. + Now we can inherit translations from less specific locales. + (find_msg): New function. + + * loadmsgcat.c, finddomain.c: + Complete rewrite. Implement oo, lazy message handling :-). + We now have an additional environment variable `LANGUAGE' with + a higher priority than LC_ALL for the LC_MESSAGE locale. + Here we can set a colon separated list of specifications each + of the form `language[_territory[.codeset]][@modifier]'. + +Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c (unistd.h): + Include to get _PC_PATH_MAX defined on system having it. + +Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware> + + * finddomain.c (stpcpy): Include prototype. + + * Makefile.in (dist): Remove `copying instead' message. + +Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (ID, TAGS): Do not use $^. + +Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (TAGS, ID): Use $^ as command argument. + (TAGS): Give etags -o option t write to current directory, + not $(srcdir). + (ID): Use $(srcdir) instead os $(top_srcdir)/src. + (distclean): Remove ID. + +Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (gnulocaledir): + New variable, always using share/ for data directory. + (DEFS): Add GNULOCALEDIR, used in finddomain.c. + + * finddomain.c (_nl_default_dirname): + Set to GNULOCALEDIR, because it always has to point + to the directory where GNU gettext Library writes it to. + + * intl-compat.c (textdomain, bindtextdomain): + Undefine macros before function definition. + +Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware> + + * libgettext.h (_LIBINTL_H): + Protect definition in case where this file is included as + libgettext.h on Solaris machines. Add comment about this. + +Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware> + + * intl-compat.c (textdomain): Correct typo. + +Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware> + + * dcgettext.c (dcgettext): Function now called __dcgettext. + + * dgettext.c (dgettext): Now called __dgettext and calls + __dcgettext. + + * gettext.c (gettext): + Function now called __gettext and calls __dgettext. + + * textdomain.c (textdomain): Function now called __textdomain. + + * bindtextdom.c (bindtextdomain): Function now called + __bindtextdomain. + + * intl-compat.c: Initial revision. + + * Makefile.in (SOURCES): Add intl-compat.c. + (OBJECTS): We always compile the GNU gettext library functions. + OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, + and intl-compat.o. + (GETTOBJS): Contains now only intl-compat.o. + + * libgettext.h: + Re-include protection matches dualistic character of libgettext.h. + For all functions in GNU gettext library define __ counter part. + + * finddomain.c (strchr): Define as index if not found in C library. + (_nl_find_domain): For relative paths paste / in between. + +Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware> + + * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. + + * xopen-msg.sed: Fix bug with `msgstr ""' lines. + A little bit better comments. + +Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in: + po-mode.el, makelinks, combine-sh are now found in ../misc. + + * po-mode.el, makelinks, combine-sh, elisp-comp: + Moved to ../misc/. + + * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. + +Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (INSTALL, INSTALL_DATA): New variables. + (install-data, uninstall): Install/uninstall .elc file. + + * po-mode.el (Installation comment): + Add .pox as possible extension of .po files. + +Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware> + + * elisp-comp: Complete new version by Franc,ois: This does not + fail when not compiling in the source directory. + +Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (../po/cat-id-tbl.o): + Use $(MAKE) instead of make for recursive make. + + * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. + (install-exec): Add missing dummy goal. + (install-data, uninstall): @ in multi-line shell command at + beginning, not in front of echo. Reported by Eric Backus. + +Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): + Rename libgettext.perl to gettext.perl to fit in 14 chars + file systems. + + * gettext.perl: + Rename to gettext.perl to fit in 14 chars file systems. + +Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware> + + * cat-compat.c: If !STDC_HEADERS try to include malloc.h. + +Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware> + + * po2tbl.sed.in: Pretty printing. + + * linux-msg.sed, xopen-msg.sed: + Correct bugs with handling substitute flags in branches. + + * hash-string.h (hash_string): + Old K&R compilers don't under stand `unsigned char'. + + * gettext.h (nls_uint32): + Some old K&R compilers (eg HP) don't understand `unsigned int'. + + * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. + +Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (ELCFILES): New variable. + (DISTFILES): Add elisp-comp. + Add implicit rule for .el -> .elc compilation. + (install-data): install $ELCFILES + (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. + + * elisp-comp: Initial revision + +Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in: + cat-id-tbl.c is now found in po/. This enables us to use an identical + intl/ directory in all packages. + + * dcgettext.c (dcgettext): hashing does not work for table size <= 2. + + * textdomain.c: fix typo (#if def -> #if defined) + +Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in (stamp-cat-id): use top_srcdir to address source files + (DISTFILES,distclean): move tupdate.perl to src/ + + * po-to-tbl.sed.in: + add additional jump to clear change flag to recognize multiline strings + +Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware> + + * textdomain.c: Protect inclusion of stdlib.h and string.h. + + * loadmsgcat.c: Protect inclusion of stdlib.h. + + * libgettext.h: Protect inclusion of locale.h. + Allow use in C++ programs. + Define NULL is not happened already. + + * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of + po-to-tbl.sed. + (distclean): remove po-to-tbl.sed and tupdate.perl. + + * tupdate.perl.in: Substitute Perl path even in exec line. + Don't include entries without translation from old .po file. + +Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware> + + * tupdate.perl.in: use "Updated: " in msgid "". + + * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). + Define getenv if !__STDC__. + + * bindtextdom.c: Protect stdlib.h and string.h inclusion. + Define free if !__STDC__. + + * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + Define free if !__STDC__. + + * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + +Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware> + + * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. + Remove unneeded $(srcdir) from Makefile.in dependency. + + * makelinks: Add copyright and short description. + + * po-mode.el: Last version for 0.7. + + * tupdate.perl.in: Fix die message. + + * dcgettext.c: Protect include of string.h. + + * gettext.c: Protect include of stdlib.h and further tries to get NULL. + + * finddomain.c: Some corrections in includes. + + * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. + + * po-to-tbl.sed: Adopt for new .po file format. + + * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. + +Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware> + + * tupdate.perl.in: Complete rewrite for new .po file format. + +Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware> + + * First official release. This directory contains all the code + needed to internationalize own packages. It provides functions + which allow to use the X/Open catgets function with an interface + like the Uniforum gettext function. For system which does not + have neither of those a complete implementation is provided. diff --git a/apps/X11/InstallMgr/intl/Makefile b/apps/X11/InstallMgr/intl/Makefile new file mode 100644 index 0000000..80f56ad --- /dev/null +++ b/apps/X11/InstallMgr/intl/Makefile @@ -0,0 +1,214 @@ +# Generated automatically from Makefile.in by configure. +# Makefile for directory with message catalog handling in GNU NLS Utilities. +# Copyright (C) 1995, 1996, 1997 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. + +PACKAGE = installmgr +VERSION = 0.1 + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. +top_builddir = .. + +prefix = /usr/local +exec_prefix = ${prefix} +transform = s,x,x, +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +datadir = $(prefix)/share +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = ${prefix}/share/gettext/intl +aliaspath = $(localedir):. +subdir = intl + +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +MKINSTALLDIRS = ./mkinstalldirs + +l = + +AR = ar +CC = gcc +LIBTOOL = @LIBTOOL@ +RANLIB = ranlib + +DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ +-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" -DHAVE_CONFIG_H +CPPFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +CFLAGS = -g -O2 -Wall -Wunused +LDFLAGS = + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +HEADERS = $(COMHDRS) libgettext.h loadinfo.h +COMHDRS = gettext.h gettextP.h hash-string.h +SOURCES = $(COMSRCS) intl-compat.c cat-compat.c +COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ +finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ +explodename.c +OBJECTS = bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ +finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ +explodename.$lo +CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo +GETTOBJS = intl-compat.$lo +DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ +xopen-msg.sed $(HEADERS) $(SOURCES) +DISTFILES.normal = VERSION +DISTFILES.gettext = libintl.glibc intlh.inst.in + +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(COMPILE) $< +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) $< + +INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib + +all: all-no + +all-yes: libintl.$la intlh.inst +all-no: + +libintl.a: $(OBJECTS) + rm -f $@ + $(AR) cru $@ $(OBJECTS) + $(RANLIB) $@ + +libintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ + -version-info 1:0 -rpath $(libdir) + +../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot + cd ../po && $(MAKE) cat-id-tbl.$lo + +check: all + +# This installation goal is only used in GNU gettext. Packages which +# only use the library should use install instead. + +# We must not install the libintl.h/libintl.a files if we are on a +# system which has the gettext() function in its C library or in a +# separate library or use the catgets interface. A special case is +# where configure found a previously installed GNU gettext library. +# If you want to use the one which comes with this version of the +# package, you have to use `configure --with-included-gettext'. +install: install-exec install-data +install-exec: all + if test "$(PACKAGE)" = "gettext" \ + && test '' = '$(GETTOBJS)'; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(libdir) $(includedir); \ + else \ + $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ + fi; \ + $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ + $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ + else \ + : ; \ + fi +install-data: all + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + rm -f $(gettextsrcdir)/$$file; \ + done + +info dvi: + +$(OBJECTS): ../config.h libgettext.h +bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h +dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h + +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) + +id: ID + +ID: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) + + +mostlyclean: + rm -f *.a *.o *.lo core core.* + +clean: mostlyclean + +distclean: clean + rm -f Makefile ID TAGS po2msg.sed po2tbl.sed + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + +# GNU gettext needs not contain the file `VERSION' but contains some +# other files which should not be distributed in other packages. +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: Makefile $(DISTFILES) + if test "$(PACKAGE)" = gettext; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + for file in $(DISTFILES.common) $$additional; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +dist-libc: + tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc + +Makefile: Makefile.in ../config.status + cd .. \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# The dependency for intlh.inst is different in gettext and all other +# packages. Because we cannot you GNU make features we have to solve +# the problem while rewriting Makefile.in. +#YES#intlh.inst: intlh.inst.in ../config.status +#YES# cd .. \ +#YES# && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ +#YES# $(SHELL) ./config.status +.PHONY: intlh.inst +intlh.inst: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/intl/Makefile.in b/apps/X11/InstallMgr/intl/Makefile.in new file mode 100644 index 0000000..4bdb186 --- /dev/null +++ b/apps/X11/InstallMgr/intl/Makefile.in @@ -0,0 +1,214 @@ +# Makefile for directory with message catalog handling in GNU NLS Utilities. +# Copyright (C) 1995, 1996, 1997 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. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = .. +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +transform = @program_transform_name@ +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = @datadir@/gettext/intl +aliaspath = $(localedir):. +subdir = intl + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ + +l = @l@ + +AR = ar +CC = @CC@ +LIBTOOL = @LIBTOOL@ +RANLIB = @RANLIB@ + +DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ +-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +HEADERS = $(COMHDRS) libgettext.h loadinfo.h +COMHDRS = gettext.h gettextP.h hash-string.h +SOURCES = $(COMSRCS) intl-compat.c cat-compat.c +COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ +finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ +explodename.c +OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ +finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ +explodename.$lo +CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo +GETTOBJS = intl-compat.$lo +DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ +xopen-msg.sed $(HEADERS) $(SOURCES) +DISTFILES.normal = VERSION +DISTFILES.gettext = libintl.glibc intlh.inst.in + +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(COMPILE) $< +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) $< + +INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib + +all: all-@USE_INCLUDED_LIBINTL@ + +all-yes: libintl.$la intlh.inst +all-no: + +libintl.a: $(OBJECTS) + rm -f $@ + $(AR) cru $@ $(OBJECTS) + $(RANLIB) $@ + +libintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ + -version-info 1:0 -rpath $(libdir) + +../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot + cd ../po && $(MAKE) cat-id-tbl.$lo + +check: all + +# This installation goal is only used in GNU gettext. Packages which +# only use the library should use install instead. + +# We must not install the libintl.h/libintl.a files if we are on a +# system which has the gettext() function in its C library or in a +# separate library or use the catgets interface. A special case is +# where configure found a previously installed GNU gettext library. +# If you want to use the one which comes with this version of the +# package, you have to use `configure --with-included-gettext'. +install: install-exec install-data +install-exec: all + if test "$(PACKAGE)" = "gettext" \ + && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(libdir) $(includedir); \ + else \ + $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ + fi; \ + $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ + $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ + else \ + : ; \ + fi +install-data: all + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + rm -f $(gettextsrcdir)/$$file; \ + done + +info dvi: + +$(OBJECTS): ../config.h libgettext.h +bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h +dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h + +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) + +id: ID + +ID: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) + + +mostlyclean: + rm -f *.a *.o *.lo core core.* + +clean: mostlyclean + +distclean: clean + rm -f Makefile ID TAGS po2msg.sed po2tbl.sed + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + +# GNU gettext needs not contain the file `VERSION' but contains some +# other files which should not be distributed in other packages. +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: Makefile $(DISTFILES) + if test "$(PACKAGE)" = gettext; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + for file in $(DISTFILES.common) $$additional; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +dist-libc: + tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc + +Makefile: Makefile.in ../config.status + cd .. \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# The dependency for intlh.inst is different in gettext and all other +# packages. Because we cannot you GNU make features we have to solve +# the problem while rewriting Makefile.in. +@GT_YES@intlh.inst: intlh.inst.in ../config.status +@GT_YES@ cd .. \ +@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ +@GT_YES@ $(SHELL) ./config.status +@GT_NO@.PHONY: intlh.inst +@GT_NO@intlh.inst: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/intl/VERSION b/apps/X11/InstallMgr/intl/VERSION new file mode 100644 index 0000000..ee66b06 --- /dev/null +++ b/apps/X11/InstallMgr/intl/VERSION @@ -0,0 +1 @@ +GNU gettext library from gettext-0.10.35 diff --git a/apps/X11/InstallMgr/intl/bindtextdom.c b/apps/X11/InstallMgr/intl/bindtextdom.c new file mode 100644 index 0000000..d9c3f34 --- /dev/null +++ b/apps/X11/InstallMgr/intl/bindtextdom.c @@ -0,0 +1,203 @@ +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997, 1998 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#else +# ifdef HAVE_MALLOC_H +# include <malloc.h> +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include <string.h> +#else +# include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include <libintl.h> +#else +# include "libgettext.h" +#endif +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define BINDTEXTDOMAIN __bindtextdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define BINDTEXTDOMAIN bindtextdomain__ +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +BINDTEXTDOMAIN (domainname, dirname) + const char *domainname; + const char *dirname; +{ + struct binding *binding; + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0') + return NULL; + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (dirname == NULL) + /* The current binding has be to returned. */ + return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; + + if (binding != NULL) + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + if (strcmp (dirname, binding->dirname) != 0) + { + char *new_dirname; + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_dirname = strdup (dirname); + if (new_dirname == NULL) + return NULL; +#else + size_t len = strlen (dirname) + 1; + new_dirname = (char *) malloc (len); + if (new_dirname == NULL) + return NULL; + + memcpy (new_dirname, dirname, len); +#endif + } + + if (binding->dirname != _nl_default_dirname) + free (binding->dirname); + + binding->dirname = new_dirname; + } + } + else + { + /* We have to create a new binding. */ +#if !defined _LIBC && !defined HAVE_STRDUP + size_t len; +#endif + struct binding *new_binding = + (struct binding *) malloc (sizeof (*new_binding)); + + if (new_binding == NULL) + return NULL; + +#if defined _LIBC || defined HAVE_STRDUP + new_binding->domainname = strdup (domainname); + if (new_binding->domainname == NULL) + return NULL; +#else + len = strlen (domainname) + 1; + new_binding->domainname = (char *) malloc (len); + if (new_binding->domainname == NULL) + return NULL; + memcpy (new_binding->domainname, domainname, len); +#endif + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_binding->dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_binding->dirname = strdup (dirname); + if (new_binding->dirname == NULL) + return NULL; +#else + len = strlen (dirname) + 1; + new_binding->dirname = (char *) malloc (len); + if (new_binding->dirname == NULL) + return NULL; + memcpy (new_binding->dirname, dirname, len); +#endif + } + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + binding = new_binding; + } + + return binding->dirname; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +#endif diff --git a/apps/X11/InstallMgr/intl/cat-compat.c b/apps/X11/InstallMgr/intl/cat-compat.c new file mode 100644 index 0000000..867d901 --- /dev/null +++ b/apps/X11/InstallMgr/intl/cat-compat.c @@ -0,0 +1,262 @@ +/* Compatibility code for gettext-using-catgets interface. + Copyright (C) 1995, 1997 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <stdio.h> + +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <string.h> +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include <malloc.h> +# endif +#endif + +#ifdef HAVE_NL_TYPES_H +# include <nl_types.h> +#endif + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* The catalog descriptor. */ +static nl_catd catalog = (nl_catd) -1; + +/* Name of the default catalog. */ +static const char default_catalog_name[] = "messages"; + +/* Name of currently used catalog. */ +static const char *catalog_name = default_catalog_name; + +/* Get ID for given string. If not found return -1. */ +static int msg_to_cat_id PARAMS ((const char *msg)); + +/* Substitution for systems lacking this function in their C library. */ +#if !_LIBC && !HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +#endif + + +/* Set currently used domain/catalog. */ +char * +textdomain (domainname) + const char *domainname; +{ + nl_catd new_catalog; + char *new_name; + size_t new_name_len; + char *lang; + +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ + && defined HAVE_LOCALE_NULL + lang = setlocale (LC_MESSAGES, NULL); +#else + lang = getenv ("LC_ALL"); + if (lang == NULL || lang[0] == '\0') + { + lang = getenv ("LC_MESSAGES"); + if (lang == NULL || lang[0] == '\0') + lang = getenv ("LANG"); + } +#endif + if (lang == NULL || lang[0] == '\0') + lang = "C"; + + /* See whether name of currently used domain is asked. */ + if (domainname == NULL) + return (char *) catalog_name; + + if (domainname[0] == '\0') + domainname = default_catalog_name; + + /* Compute length of added path element. */ + new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) + + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 + + sizeof (".cat"); + + new_name = (char *) malloc (new_name_len); + if (new_name == NULL) + return NULL; + + strcpy (new_name, PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + /* NLSPATH search didn't work, try absolute path */ + sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, + PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + free (new_name); + return (char *) catalog_name; + } + } + + /* Close old catalog. */ + if (catalog != (nl_catd) -1) + catclose (catalog); + if (catalog_name != default_catalog_name) + free ((char *) catalog_name); + + catalog = new_catalog; + catalog_name = new_name; + + return (char *) catalog_name; +} + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ +#if HAVE_SETENV || HAVE_PUTENV + char *old_val, *new_val, *cp; + size_t new_val_len; + + /* This does not make much sense here but to be compatible do it. */ + if (domainname == NULL) + return NULL; + + /* Compute length of added path element. If we use setenv we don't need + the first byts for NLSPATH=, but why complicate the code for this + peanuts. */ + new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + + old_val = getenv ("NLSPATH"); + if (old_val == NULL || old_val[0] == '\0') + { + old_val = NULL; + new_val_len += 1 + sizeof (LOCALEDIR) - 1 + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + } + else + new_val_len += strlen (old_val); + + new_val = (char *) malloc (new_val_len); + if (new_val == NULL) + return NULL; + +# if HAVE_SETENV + cp = new_val; +# else + cp = stpcpy (new_val, "NLSPATH="); +# endif + + cp = stpcpy (cp, dirname); + cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); + + if (old_val == NULL) + { +# if __STDC__ + stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); +# else + + cp = stpcpy (cp, LOCALEDIR); + stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); +# endif + } + else + stpcpy (cp, old_val); + +# if HAVE_SETENV + setenv ("NLSPATH", new_val, 1); + free (new_val); +# else + putenv (new_val); + /* Do *not* free the environment entry we just entered. It is used + from now on. */ +# endif + +#endif + + return (char *) domainname; +} + +#undef gettext +char * +gettext (msg) + const char *msg; +{ + int msgid; + + if (msg == NULL || catalog == (nl_catd) -1) + return (char *) msg; + + /* Get the message from the catalog. We always use set number 1. + The message ID is computed by the function `msg_to_cat_id' + which works on the table generated by `po-to-tbl'. */ + msgid = msg_to_cat_id (msg); + if (msgid == -1) + return (char *) msg; + + return catgets (catalog, 1, msgid, (char *) msg); +} + +/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries + for the one equal to msg. If it is found return the ID. In case when + the string is not found return -1. */ +static int +msg_to_cat_id (msg) + const char *msg; +{ + int cnt; + + for (cnt = 0; cnt < _msg_tbl_length; ++cnt) + if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) + return _msg_tbl[cnt]._msg_number; + + return -1; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/apps/X11/InstallMgr/intl/dcgettext.c b/apps/X11/InstallMgr/intl/dcgettext.c new file mode 100644 index 0000000..c4c7a2c --- /dev/null +++ b/apps/X11/InstallMgr/intl/dcgettext.c @@ -0,0 +1,624 @@ +/* Implementation of the dcgettext(3) function. + Copyright (C) 1995, 1996, 1997, 1998 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <sys/types.h> + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include <alloca.h> +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#include <errno.h> +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include <malloc.h> +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include <string.h> +#else +# include <strings.h> +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include <unistd.h> +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include <libintl.h> +#else +# include "libgettext.h" +#endif +#include "hash-string.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define getcwd __getcwd +# ifndef stpcpy +# define stpcpy __stpcpy +# endif +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) +# include <limits.h> +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +# include <sys/param.h> +#endif + +#if !defined(PATH_MAX) && defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +const char _nl_default_dirname[] = GNULOCALEDIR; + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, + const char *msgid)) internal_function; +static const char *category_to_name PARAMS ((int category)) internal_function; +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)) + internal_function; + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCGETTEXT __dcgettext +#else +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + int saved_errno = errno; + + /* If no real MSGID is given return NULL. */ + if (msgid == NULL) + return NULL; + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + defintion left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) _nl_default_dirname; + else if (binding->dirname[0] == '/') + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) + { + path_max += PATH_INCR; + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + __set_errno (0); + } + + if (ret == NULL) + { + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + xdomainname = (char *) alloca (strlen (categoryname) + + strlen (domainname) + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for th translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') + *cp++ = *categoryvalue++; + *cp = '\0'; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname); + + if (domain != NULL) + { + retval = find_msg (domain, msgid); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = find_msg (domain->successor[cnt], msgid); + + if (retval != NULL) + break; + } + } + + if (retval != NULL) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return retval; + } + } + } + /* NOTREACHED */ +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcgettext, dcgettext); +#endif + + +static char * +internal_function +find_msg (domain_file, msgid) + struct loaded_l10nfile *domain_file; + const char *msgid; +{ + size_t top, act, bottom; + struct loaded_domain *domain; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) == 0) + return (char *) domain->data + W (domain->must_swap, + domain->trans_tab[nstr - 1].offset); + + while (1) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = W (domain->must_swap, domain->hash_tab[idx]); + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) + == 0) + return (char *) domain->data + + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted + array of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + break; + } + + /* If an translation is found return this. */ + return bottom >= top ? NULL : (char *) domain->data + + W (domain->must_swap, + domain->trans_tab[act].offset); +} + + +/* Return string representation of locale CATEGORY. */ +static const char * +internal_function +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} + +/* Guess value of current locale from value of the environment variables. */ +static const char * +internal_function +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. This is a GNU extension. */ + retval = getenv ("LANGUAGE"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* `LANGUAGE' is not set. So we have to proceed with the POSIX + methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some + systems this can be done by the `setlocale' function itself. */ +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + return setlocale (category, NULL); +#else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* We use C as the default domain. POSIX says this is implementation + defined. */ + return "C"; +#endif +} + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif + + +#ifdef _LIBC +/* If we want to free all resources we have to do some work at + program's end. */ +static void __attribute__ ((unused)) +free_mem (void) +{ + struct binding *runp; + + for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) + { + free (runp->domainname); + if (runp->dirname != _nl_default_dirname) + /* Yes, this is a pointer comparison. */ + free (runp->dirname); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/apps/X11/InstallMgr/intl/dgettext.c b/apps/X11/InstallMgr/intl/dgettext.c new file mode 100644 index 0000000..0510c2b --- /dev/null +++ b/apps/X11/InstallMgr/intl/dgettext.c @@ -0,0 +1,59 @@ +/* Implementation of the dgettext(3) function + Copyright (C) 1995, 1996, 1997 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if defined HAVE_LOCALE_H || defined _LIBC +# include <locale.h> +#endif + +#ifdef _LIBC +# include <libintl.h> +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DGETTEXT __dgettext +# define DCGETTEXT __dcgettext +#else +# define DGETTEXT dgettext__ +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ +char * +DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return DCGETTEXT (domainname, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dgettext, dgettext); +#endif diff --git a/apps/X11/InstallMgr/intl/explodename.c b/apps/X11/InstallMgr/intl/explodename.c new file mode 100644 index 0000000..8066dc2 --- /dev/null +++ b/apps/X11/InstallMgr/intl/explodename.c @@ -0,0 +1,188 @@ +/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + + 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include <string.h> +#else +# include <strings.h> +#endif +#include <sys/types.h> + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +int +_nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; +{ + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',') + ++cp; + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; +} diff --git a/apps/X11/InstallMgr/intl/finddomain.c b/apps/X11/InstallMgr/intl/finddomain.c new file mode 100644 index 0000000..81ea29b --- /dev/null +++ b/apps/X11/InstallMgr/intl/finddomain.c @@ -0,0 +1,216 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + + 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <ctype.h> +#include <errno.h> +#include <stdio.h> +#include <sys/types.h> + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#else +# ifdef HAVE_MALLOC_H +# include <malloc.h> +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include <string.h> +#else +# include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include <unistd.h> +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include <libintl.h> +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ +/* List of already loaded domains. */ +static struct loaded_l10nfile *_nl_loaded_domains; + + +/* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ +struct loaded_l10nfile * +internal_function +_nl_find_domain (dirname, locale, domainname) + const char *dirname; + char *locale; + const char *domainname; +{ + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first part all of them are allowed to be missing. If + the full specified locale is not found, the less specific one are + looked for. The various parts will be stripped off according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { +#if defined _LIBC || defined HAVE_STRDUP + locale = strdup (alias_value); + if (locale == NULL) + return NULL; +#else + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); +#endif + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + return retval; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + struct loaded_l10nfile *runp = _nl_loaded_domains; + + while (runp != NULL) + { + struct loaded_l10nfile *here = runp; + if (runp->data != NULL) + _nl_unload_domain ((struct loaded_domain *) runp->data); + runp = runp->next; + free (here); + } +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/apps/X11/InstallMgr/intl/gettext.c b/apps/X11/InstallMgr/intl/gettext.c new file mode 100644 index 0000000..d929f98 --- /dev/null +++ b/apps/X11/InstallMgr/intl/gettext.c @@ -0,0 +1,70 @@ +/* Implementation of gettext(3) function. + Copyright (C) 1995, 1997 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#ifdef _LIBC +# define __need_NULL +# include <stddef.h> +#else +# ifdef STDC_HEADERS +# include <stdlib.h> /* Just for NULL. */ +# else +# ifdef HAVE_STRING_H +# include <string.h> +# else +# define NULL ((void *) 0) +# endif +# endif +#endif + +#ifdef _LIBC +# include <libintl.h> +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define GETTEXT __gettext +# define DGETTEXT __dgettext +#else +# define GETTEXT gettext__ +# define DGETTEXT dgettext__ +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +GETTEXT (msgid) + const char *msgid; +{ + return DGETTEXT (NULL, msgid); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff --git a/apps/X11/InstallMgr/intl/gettext.h b/apps/X11/InstallMgr/intl/gettext.h new file mode 100644 index 0000000..3cd23d7 --- /dev/null +++ b/apps/X11/InstallMgr/intl/gettext.h @@ -0,0 +1,105 @@ +/* Internal header for GNU gettext internationalization functions. + Copyright (C) 1995, 1997 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 Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include <stdio.h> + +#if HAVE_LIMITS_H || _LIBC +# include <limits.h> +#endif + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have <limits.h>) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + nls_uint32 trans_tab_offset; + /* Size of hashing table. */ + nls_uint32 hash_tab_size; + /* Offset of first hashing entry. */ + nls_uint32 hash_tab_offset; +}; + +struct string_desc +{ + /* Length of addressed string. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff --git a/apps/X11/InstallMgr/intl/gettextP.h b/apps/X11/InstallMgr/intl/gettextP.h new file mode 100644 index 0000000..00c5203 --- /dev/null +++ b/apps/X11/InstallMgr/intl/gettextP.h @@ -0,0 +1,89 @@ +/* Header describing internals of gettext library + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + + 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. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include "loadinfo.h" + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include <byteswap.h> +# define SWAP(i) bswap_32 (i) +#else +static nls_uint32 SWAP PARAMS ((nls_uint32 i)); + +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +struct loaded_domain +{ + const char *data; + int use_mmap; + size_t mmap_size; + int must_swap; + nls_uint32 nstrings; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + nls_uint32 hash_size; + nls_uint32 *hash_tab; +}; + +struct binding +{ + struct binding *next; + char *domainname; + char *dirname; +}; + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname)) + internal_function; +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) + internal_function; +void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) + internal_function; + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/apps/X11/InstallMgr/intl/hash-string.h b/apps/X11/InstallMgr/intl/hash-string.h new file mode 100644 index 0000000..cacb38e --- /dev/null +++ b/apps/X11/InstallMgr/intl/hash-string.h @@ -0,0 +1,59 @@ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 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 Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static unsigned long hash_string PARAMS ((const char *__str_param)); + +static inline unsigned long +hash_string (str_param) + const char *str_param; +{ + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long) *str++; + g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} diff --git a/apps/X11/InstallMgr/intl/intl-compat.c b/apps/X11/InstallMgr/intl/intl-compat.c new file mode 100644 index 0000000..503efa0 --- /dev/null +++ b/apps/X11/InstallMgr/intl/intl-compat.c @@ -0,0 +1,76 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef textdomain +#undef bindtextdomain + + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return bindtextdomain__ (domainname, dirname); +} + + +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return dcgettext__ (domainname, msgid, category); +} + + +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return dgettext__ (domainname, msgid); +} + + +char * +gettext (msgid) + const char *msgid; +{ + return gettext__ (msgid); +} + + +char * +textdomain (domainname) + const char *domainname; +{ + return textdomain__ (domainname); +} diff --git a/apps/X11/InstallMgr/intl/l10nflist.c b/apps/X11/InstallMgr/intl/l10nflist.c new file mode 100644 index 0000000..9c7dc18 --- /dev/null +++ b/apps/X11/InstallMgr/intl/l10nflist.c @@ -0,0 +1,411 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + + 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include <string.h> +#else +# include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined _LIBC || defined HAVE_ARGZ_H +# include <argz.h> +#endif +#include <ctype.h> +#include <sys/types.h> + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#endif + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# ifndef stpcpy +# define stpcpy(dest, src) __stpcpy(dest, src) +# endif +#else +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Define function which are usually not available. */ + +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +/* Returns the number of strings in ARGZ. */ +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + +static size_t +argz_count__ (argz, len) + const char *argz; + size_t len; +{ + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; +} +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + +static void +argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; +{ + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } +} +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; +} +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + +/* Return number of bits set in X. */ +static int pop PARAMS ((int x)); + +static inline int +pop (x) + int x; +{ + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; +} + + +struct loaded_l10nfile * +_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, do_allocate) + struct loaded_l10nfile **l10nfile_list; + const char *dirlist; + size_t dirlist_len; + int mask; + const char *language; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *modifier; + const char *special; + const char *sponsor; + const char *revision; + const char *filename; + int do_allocate; +{ + char *abs_filename; + struct loaded_l10nfile *last = NULL; + struct loaded_l10nfile *retval; + char *cp; + size_t entries; + int cnt; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) + 1 : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + retval = NULL; + last = NULL; + + /* Construct file name. */ + memcpy (abs_filename, dirlist, dirlist_len); + __argz_stringify (abs_filename, dirlist_len, ':'); + cp = abs_filename + (dirlist_len - 1); + *cp++ = '/'; + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaces but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + last = NULL; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + last = retval; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + retval = (struct loaded_l10nfile *) + malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) + * (1 << pop (mask)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + return NULL; + + retval->filename = abs_filename; + retval->decided = (__argz_count (dirlist, dirlist_len) != 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + if (last == NULL) + { + retval->next = *l10nfile_list; + *l10nfile_list = retval; + } + else + { + retval->next = last->next; + last->next = retval; + } + + entries = 0; + /* If the DIRLIST is a real list the RETVAL entry corresponds not to + a real file. So we have to use the DIRLIST separation mechanism + of the inner loop. */ + cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; + for (; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, + language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; +} + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. */ +const char * +_nl_normalize_codeset (codeset, name_len) + const unsigned char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum (codeset[cnt])) + { + ++len; + + if (isalpha (codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha (codeset[cnt])) + *wp++ = tolower (codeset[cnt]); + else if (isdigit (codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/apps/X11/InstallMgr/intl/libgettext.h b/apps/X11/InstallMgr/intl/libgettext.h new file mode 100644 index 0000000..3a92960 --- /dev/null +++ b/apps/X11/InstallMgr/intl/libgettext.h @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997, 1998 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. */ + +/* Because on some systems (e.g. Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H +#ifndef _LIBINTL_H +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include <sys/types.h> + +#if HAVE_LOCALE_H +# include <locale.h> +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); +extern char *gettext__ PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); +extern char *dgettext__ PARAMS ((const char *__domainname, + const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); +extern char *textdomain__ PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/apps/X11/InstallMgr/intl/linux-msg.sed b/apps/X11/InstallMgr/intl/linux-msg.sed new file mode 100644 index 0000000..5918e72 --- /dev/null +++ b/apps/X11/InstallMgr/intl/linux-msg.sed @@ -0,0 +1,100 @@ +# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. +# +# 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. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# Mitch's old catalog format does not allow comments. +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { + s/msgid[ ]*"// +# +# This does not work now with the new format. +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + x +# The following nice solution is by +# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/# \1/ +# Clear substitution flag. + tb +# Append the next line. + :b + N +# Look whether second part is continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that D includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/apps/X11/InstallMgr/intl/loadinfo.h b/apps/X11/InstallMgr/intl/loadinfo.h new file mode 100644 index 0000000..f4ebf6d --- /dev/null +++ b/apps/X11/InstallMgr/intl/loadinfo.h @@ -0,0 +1,76 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 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. */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +/* Encoding of locale name parts. */ +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, + size_t name_len)); + +extern struct loaded_l10nfile * +_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, + const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate)); + + +extern const char *_nl_expand_alias PARAMS ((const char *name)); + +extern int _nl_explode_name PARAMS ((char *name, const char **language, + const char **modifier, + const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, + const char **sponsor, + const char **revision)); diff --git a/apps/X11/InstallMgr/intl/loadmsgcat.c b/apps/X11/InstallMgr/intl/loadmsgcat.c new file mode 100644 index 0000000..515892d --- /dev/null +++ b/apps/X11/InstallMgr/intl/loadmsgcat.c @@ -0,0 +1,222 @@ +/* Load needed message catalogs. + Copyright (C) 1995, 1996, 1997, 1998 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include <unistd.h> +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC +# include <sys/mman.h> +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ +# define open __open +# define close __close +# define read __read +# define mmap __mmap +# define munmap __munmap +#endif + +/* We need a sign, whether a new catalog was loaded, which can be associated + with all translations. This is important if the translations are + cached by one of GCC's features. */ +int _nl_msg_cat_cntr = 0; + + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +internal_function +_nl_load_domain (domain_file) + struct loaded_l10nfile *domain_file; +{ + int fd; + size_t size; + struct stat st; + struct mo_file_header *data = (struct mo_file_header *) -1; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + int use_mmap = 0; +#endif + struct loaded_domain *domain; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY); + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if (fstat (fd, &st) != 0 + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + /* Something went wrong. */ + close (fd); + return; + } + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (data != (struct mo_file_header *) -1) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } +#endif + + /* If the data is not yet available (i.e. mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + size_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (size); + if (data == NULL) + return; + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb == -1) + { + close (fd); + return; + } + + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } + + domain_file->data + = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain_file->data == NULL) + return; + + domain = (struct loaded_domain *) domain_file->data; + domain->data = (char *) data; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + domain->use_mmap = use_mmap; +#endif + domain->mmap_size = size; + domain->must_swap = data->magic != _MAGIC; + + /* Fill in the information about the available tables. */ + switch (W (domain->must_swap, data->revision)) + { + case 0: + domain->nstrings = W (domain->must_swap, data->nstrings); + domain->orig_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)); + break; + default: + /* This is an illegal revision. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Show that one domain is changed. This might make some cached + translations invalid. */ + ++_nl_msg_cat_cntr; +} + + +#ifdef _LIBC +void +internal_function +_nl_unload_domain (domain) + struct loaded_domain *domain; +{ + if (domain->use_mmap) + munmap ((caddr_t) domain->data, domain->mmap_size); + else + free ((void *) domain->data); + + free (domain); +} +#endif diff --git a/apps/X11/InstallMgr/intl/localealias.c b/apps/X11/InstallMgr/intl/localealias.c new file mode 100644 index 0000000..bca555a --- /dev/null +++ b/apps/X11/InstallMgr/intl/localealias.c @@ -0,0 +1,424 @@ +/* Handle aliases for locale names. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + + 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <ctype.h> +#include <stdio.h> +#include <sys/types.h> + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include <alloca.h> +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include <malloc.h> +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include <string.h> +#else +# include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define strcasecmp __strcasecmp + +# define mempcpy __mempcpy +# define HAVE_MEMPCPY 1 + +/* We need locking here since we can be called from different places. */ +# include <bits/libc-lock.h> + +__libc_lock_define_initialized (static, lock); +#endif + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +struct alias_map +{ + const char *alias; + const char *value; +}; + + +static char *string_space = NULL; +static size_t string_space_act = 0; +static size_t string_space_max = 0; +static struct alias_map *map; +static size_t nmap = 0; +static size_t maxmap = 0; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; +static void extend_alias_table PARAMS ((void)); +static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + +const char * +_nl_expand_alias (name) + const char *name; +{ + static const char *locale_alias_path = LOCALE_ALIAS_PATH; + struct alias_map *retval; + const char *result = NULL; + size_t added; + +#ifdef _LIBC + __libc_lock_lock (lock); +#endif + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + { + result = retval->value; + break; + } + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == ':') + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + +#ifdef _LIBC + __libc_lock_unlock (lock); +#endif + + return result; +} + + +static size_t +internal_function +read_alias_file (fname, fname_len) + const char *fname; + int fname_len; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + ADD_BLOCK (block_list, full_fname); +#ifdef HAVE_MEMPCPY + mempcpy (mempcpy (full_fname, fname, fname_len), + aliasfile, sizeof aliasfile); +#else + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); +#endif + + fp = fopen (full_fname, "r"); + if (fp == NULL) + { + FREE_BLOCKS (block_list); + return 0; + } + + added = 0; + while (!feof (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + */ + unsigned char buf[BUFSIZ]; + unsigned char *alias; + unsigned char *value; + unsigned char *cp; + + if (fgets (buf, sizeof buf, fp) == NULL) + /* EOF reached. */ + break; + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + if (strchr (buf, '\n') == NULL) + { + char altbuf[BUFSIZ]; + do + if (fgets (altbuf, sizeof altbuf, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + break; + while (strchr (altbuf, '\n') == NULL); + } + + cp = buf; + /* Ignore leading white space. */ + while (isspace (cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace (cp[0])) + ++cp; + + if (cp[0] != '\0') + { + size_t alias_len; + size_t value_len; + + value = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + extend_alias_table (); + + alias_len = strlen (alias) + 1; + value_len = strlen (value) + 1; + + if (string_space_act + alias_len + value_len > string_space_max) + { + /* Increase size of memory pool. */ + size_t new_size = (string_space_max + + (alias_len + value_len > 1024 + ? alias_len + value_len : 1024)); + char *new_pool = (char *) realloc (string_space, new_size); + if (new_pool == NULL) + { + FREE_BLOCKS (block_list); + return added; + } + string_space = new_pool; + string_space_max = new_size; + } + + map[nmap].alias = memcpy (&string_space[string_space_act], + alias, alias_len); + string_space_act += alias_len; + + map[nmap].value = memcpy (&string_space[string_space_act], + value, value_len); + string_space_act += value_len; + + ++nmap; + ++added; + } + } + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + FREE_BLOCKS (block_list); + return added; +} + + +static void +extend_alias_table () +{ + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) realloc (map, (new_size + * sizeof (struct alias_map))); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return; + + map = new_map; + maxmap = new_size; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + if (string_space != NULL) + free (string_space); + if (map != NULL) + free (map); +} +text_set_element (__libc_subfreeres, free_mem); +#endif + + +static int +alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; +{ +#if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); +#else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; +#endif +} diff --git a/apps/X11/InstallMgr/intl/po2tbl.sed b/apps/X11/InstallMgr/intl/po2tbl.sed new file mode 100644 index 0000000..93c0435 --- /dev/null +++ b/apps/X11/InstallMgr/intl/po2tbl.sed @@ -0,0 +1,60 @@ +1 { + i\ +/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ +\ +#if HAVE_CONFIG_H\ +# include <config.h>\ +#endif\ +\ +#include "libgettext.h"\ +\ +const struct _msg_ent _msg_tbl[] = { + h + s/.*/0/ + x +} +/^msgid/ { + s/msgid[ ]*\(".*"\)/ {\1/ + tb + :b + N + s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ + ta + s/\(.*\)\n.*/\1/ + bc + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P + s/.*\n\(.*\)/\1/ + tb + :c + x + td + :d + s/9\(_*\)$/_\1/ + td + s/^\(_*\)$/0\1/ + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ + s/_/0/g + x + G + s/\(.*\)\n\([0-9]*\)/\1, \2},/ + s/\(.*\)"$/\1/ + p +} +$ { + i\ +};\ + + g + s/0*\(.*\)/int _msg_tbl_length = \1;/p +} +d diff --git a/apps/X11/InstallMgr/intl/po2tbl.sed.in b/apps/X11/InstallMgr/intl/po2tbl.sed.in new file mode 100644 index 0000000..b3bcca4 --- /dev/null +++ b/apps/X11/InstallMgr/intl/po2tbl.sed.in @@ -0,0 +1,102 @@ +# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. +# +# 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. +# +1 { + i\ +/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ +\ +#if HAVE_CONFIG_H\ +# include <config.h>\ +#endif\ +\ +#include "libgettext.h"\ +\ +const struct _msg_ent _msg_tbl[] = { + h + s/.*/0/ + x +} +# +# Write msgid entries in C array form. +# +/^msgid/ { + s/msgid[ ]*\(".*"\)/ {\1/ + tb +# Append the next line + :b + N +# Look whether second part is continuation line. + s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ +# Yes, then branch. + ta +# Because we assume that the input file correctly formed the line +# just read cannot be again be a msgid line. So it's safe to ignore +# it. + s/\(.*\)\n.*/\1/ + bc +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ +# Some buggy seds do not clear the `successful substitution since last ``t''' +# flag on `N', so we do a `t' here to clear it. + tb +# Not reached + :c + x +# The following nice solution is by +# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)\n\([0-9]*\)/\1, \2},/ + s/\(.*\)"$/\1/ + p +} +# +# Last line. +# +$ { + i\ +};\ + + g + s/0*\(.*\)/int _msg_tbl_length = \1;/p +} +d diff --git a/apps/X11/InstallMgr/intl/textdomain.c b/apps/X11/InstallMgr/intl/textdomain.c new file mode 100644 index 0000000..8855746 --- /dev/null +++ b/apps/X11/InstallMgr/intl/textdomain.c @@ -0,0 +1,108 @@ +/* Implementation of the textdomain(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + + 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. */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include <stdlib.h> +#endif + +#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC +# include <string.h> +#else +# include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include <libintl.h> +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[]; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define TEXTDOMAIN __textdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define TEXTDOMAIN textdomain__ +#endif + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +char * +TEXTDOMAIN (domainname) + const char *domainname; +{ + char *old; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + old = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + _nl_current_default_domain = _nl_default_default_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + _nl_current_default_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + char *cp = (char *) malloc (len); + if (cp != NULL) + memcpy (cp, domainname, len); + _nl_current_default_domain = cp; +#endif + } + + if (old != _nl_default_default_domain) + free (old); + + return (char *) _nl_current_default_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff --git a/apps/X11/InstallMgr/intl/xopen-msg.sed b/apps/X11/InstallMgr/intl/xopen-msg.sed new file mode 100644 index 0000000..b19c0bb --- /dev/null +++ b/apps/X11/InstallMgr/intl/xopen-msg.sed @@ -0,0 +1,104 @@ +# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. +# +# 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. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# We copy all comments into the .msg file. Perhaps they can help. +# +/^#/ s/^#[ ]*/$ /p +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { +# Does not work now +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ + p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/\1/ + x +# The following nice solution is by +# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de> + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x +# Bring the line in the format `<number> <message>' + G + s/^[^\n]*$/& / + s/\(.*\)\n\([0-9]*\)/\2 \1/ +# Clear flag from last substitution. + tb +# Append the next line. + :b + N +# Look whether second part is a continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that `D' includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use the sed command `D' here + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/apps/X11/InstallMgr/macros/Makefile b/apps/X11/InstallMgr/macros/Makefile new file mode 100644 index 0000000..dd4dfe8 --- /dev/null +++ b/apps/X11/InstallMgr/macros/Makefile @@ -0,0 +1,255 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. +prefix = /usr/local +exec_prefix = ${prefix} + +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 +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/installmgr +pkglibdir = $(libdir)/installmgr +pkgincludedir = $(includedir)/installmgr + +top_builddir = .. + +ACLOCAL = aclocal -I macros +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = +CATOBJEXT = .gmo +CC = gcc +CXX = c++ +DATADIRNAME = share +GENCAT = +GMOFILES = +GMSGFMT = /usr/bin/msgfmt +GNOMEGNORBA_LIBS = -rdynamic -lgnorba -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lnsl -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNOMEUI_LIBS = -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNOME_APPLETS_LIBS = +GNOME_CAPPLET_LIBS = +GNOME_CONFIG = /usr/bin/gnome-config +GNOME_INCLUDEDIR = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNOME_LIBDIR = -rdynamic -L/usr/lib -L/usr/X11R6/lib +GNOME_LIBS = -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNORBA_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNORBA_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnorba -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lnsl -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GTKXMHTML_LIBS = -rdynamic -lgtkxmhtml -lXpm -ljpeg -lpng -lz -lSM -lICE -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GTK_CFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +GTK_CONFIG = /usr/bin/gtk-config +GTK_LIBS = -lSM -lICE -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GT_NO = +GT_YES = #YES# +INCLUDE_LOCALE_H = #include <locale.h> +INSTOBJEXT = .mo +INTLDEPS = +INTLLIBS = +INTLOBJS = +MAKEINFO = makeinfo +MKINSTALLDIRS = ./mkinstalldirs +MSGFMT = /usr/bin/msgfmt +ORBIT_CFLAGS = -I/usr/lib/glib/include -I/usr/include +ORBIT_CONFIG = /usr/bin/orbit-config +ORBIT_IDL = /usr/bin/orbit-idl +ORBIT_LIBS = -L/usr/lib -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lglib -lnsl -lm +PACKAGE = installmgr +PACKAGE_PIXMAPS_DIR = /usr/share/pixmaps/installmgr +POFILES = +POSUB = po +PTHREAD_LIB = -lpthread +RANLIB = ranlib +USE_INCLUDED_LIBINTL = no +USE_NLS = yes +VERSION = 0.1 +XPM_LIBS = -lXpm +ZVT_LIBS = -rdynamic -lzvt -lutil -lSM -lICE -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +cflags_set = yes +cxxflags_set = @cxxflags_set@ +l = + +MACROS = aclocal-include.m4 compiler-flags.m4 curses.m4 gnome-bonobo-check.m4 gnome-fileutils.m4 gnome-gettext.m4 gnome-ghttp-check.m4 gnome-gnorba-check.m4 gnome-guile-checks.m4 gnome-libgtop-check.m4 gnome-objc-checks.m4 gnome-orbit-check.m4 gnome-print-check.m4 gnome-pthread-check.m4 gnome-support.m4 gnome-undelfs.m4 gnome-vfs.m4 gnome-x-checks.m4 gnome-xml-check.m4 gnome.m4 linger.m4 need-declaration.m4 + + +EXTRA_DIST = $(MACROS) gnome-common.m4 autogen.sh +MAINTAINERCLEANFILES = macros.dep + +#gnome_aclocaldir = $(datadir)/aclocal/gnome + +#gnome_aclocal_DATA = $(MACROS) gnome-macros.dep gnome-common.m4 autogen.sh +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +DATA = $(gnome_aclocal_DATA) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu macros/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-gnome_aclocalDATA: $(gnome_aclocal_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(gnome_aclocaldir) + @list='$(gnome_aclocal_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gnome_aclocaldir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gnome_aclocaldir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gnome_aclocaldir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(gnome_aclocaldir)/$$p; \ + fi; fi; \ + done + +uninstall-gnome_aclocalDATA: + @$(NORMAL_UNINSTALL) + list='$(gnome_aclocal_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(gnome_aclocaldir)/$$p; \ + done +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = macros + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu macros/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: install-gnome_aclocalDATA +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-gnome_aclocalDATA +uninstall: uninstall-am +all-am: Makefile $(DATA) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(gnome_aclocaldir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: uninstall-gnome_aclocalDATA install-gnome_aclocalDATA tags \ +distdir info-am info dvi-am dvi check check-am installcheck-am \ +installcheck install-exec-am install-exec install-data-am install-data \ +install-am install uninstall-am uninstall all-redirect all-am all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +macros.dep: Makefile.am + @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=macros/%)' > $@ + +#gnome-macros.dep: Makefile.am +# @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=$(gnome_aclocaldir)/%)' > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/macros/Makefile.am b/apps/X11/InstallMgr/macros/Makefile.am new file mode 100644 index 0000000..e03dbee --- /dev/null +++ b/apps/X11/InstallMgr/macros/Makefile.am @@ -0,0 +1,40 @@ +## Please update this variable if any new macros are created +MACROS= \ + aclocal-include.m4 \ + compiler-flags.m4 \ + curses.m4 \ + gnome-bonobo-check.m4 \ + gnome-fileutils.m4 \ + gnome-gettext.m4 \ + gnome-ghttp-check.m4 \ + gnome-gnorba-check.m4 \ + gnome-guile-checks.m4 \ + gnome-libgtop-check.m4 \ + gnome-objc-checks.m4 \ + gnome-orbit-check.m4 \ + gnome-print-check.m4 \ + gnome-pthread-check.m4 \ + gnome-support.m4 \ + gnome-undelfs.m4 \ + gnome-vfs.m4 \ + gnome-x-checks.m4 \ + gnome-xml-check.m4 \ + gnome.m4 \ + linger.m4 \ + need-declaration.m4 + +EXTRA_DIST=$(MACROS) gnome-common.m4 autogen.sh +MAINTAINERCLEANFILES=macros.dep + +@MAINT@macros.dep: Makefile.am +@MAINT@ @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=macros/%)' > $@ + +if INSIDE_GNOME_COMMON +gnome_aclocaldir = $(datadir)/aclocal/gnome + +gnome-macros.dep: Makefile.am + @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=$(gnome_aclocaldir)/%)' > $@ + +gnome_aclocal_DATA = $(MACROS) gnome-macros.dep gnome-common.m4 autogen.sh + +endif diff --git a/apps/X11/InstallMgr/macros/Makefile.in b/apps/X11/InstallMgr/macros/Makefile.in new file mode 100644 index 0000000..6b477be --- /dev/null +++ b/apps/X11/InstallMgr/macros/Makefile.in @@ -0,0 +1,255 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +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 + +DESTDIR = + +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@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CXX = @CXX@ +DATADIRNAME = @DATADIRNAME@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@ +GNOMEUI_LIBS = @GNOMEUI_LIBS@ +GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@ +GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ +GNOME_CONFIG = @GNOME_CONFIG@ +GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ +GNOME_LIBDIR = @GNOME_LIBDIR@ +GNOME_LIBS = @GNOME_LIBS@ +GNORBA_CFLAGS = @GNORBA_CFLAGS@ +GNORBA_LIBS = @GNORBA_LIBS@ +GTKXMHTML_LIBS = @GTKXMHTML_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PTHREAD_LIB = @PTHREAD_LIB@ +RANLIB = @RANLIB@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XPM_LIBS = @XPM_LIBS@ +ZVT_LIBS = @ZVT_LIBS@ +cflags_set = @cflags_set@ +cxxflags_set = @cxxflags_set@ +l = @l@ + +MACROS = aclocal-include.m4 compiler-flags.m4 curses.m4 gnome-bonobo-check.m4 gnome-fileutils.m4 gnome-gettext.m4 gnome-ghttp-check.m4 gnome-gnorba-check.m4 gnome-guile-checks.m4 gnome-libgtop-check.m4 gnome-objc-checks.m4 gnome-orbit-check.m4 gnome-print-check.m4 gnome-pthread-check.m4 gnome-support.m4 gnome-undelfs.m4 gnome-vfs.m4 gnome-x-checks.m4 gnome-xml-check.m4 gnome.m4 linger.m4 need-declaration.m4 + + +EXTRA_DIST = $(MACROS) gnome-common.m4 autogen.sh +MAINTAINERCLEANFILES = macros.dep + +@INSIDE_GNOME_COMMON_TRUE@gnome_aclocaldir = $(datadir)/aclocal/gnome + +@INSIDE_GNOME_COMMON_TRUE@gnome_aclocal_DATA = $(MACROS) gnome-macros.dep gnome-common.m4 autogen.sh +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +DATA = $(gnome_aclocal_DATA) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu macros/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-gnome_aclocalDATA: $(gnome_aclocal_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(gnome_aclocaldir) + @list='$(gnome_aclocal_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gnome_aclocaldir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(gnome_aclocaldir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gnome_aclocaldir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(gnome_aclocaldir)/$$p; \ + fi; fi; \ + done + +uninstall-gnome_aclocalDATA: + @$(NORMAL_UNINSTALL) + list='$(gnome_aclocal_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(gnome_aclocaldir)/$$p; \ + done +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = macros + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu macros/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: install-gnome_aclocalDATA +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-gnome_aclocalDATA +uninstall: uninstall-am +all-am: Makefile $(DATA) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(gnome_aclocaldir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: uninstall-gnome_aclocalDATA install-gnome_aclocalDATA tags \ +distdir info-am info dvi-am dvi check check-am installcheck-am \ +installcheck install-exec-am install-exec install-data-am install-data \ +install-am install uninstall-am uninstall all-redirect all-am all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +macros.dep: Makefile.am + @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=macros/%)' > $@ + +@INSIDE_GNOME_COMMON_TRUE@gnome-macros.dep: Makefile.am +@INSIDE_GNOME_COMMON_TRUE@ @echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=$(gnome_aclocaldir)/%)' > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/macros/aclocal-include.m4 b/apps/X11/InstallMgr/macros/aclocal-include.m4 new file mode 100644 index 0000000..abf6533 --- /dev/null +++ b/apps/X11/InstallMgr/macros/aclocal-include.m4 @@ -0,0 +1,16 @@ +# aclocal-include.m4 +# +# This macro adds the name macrodir to the set of directories +# that `aclocal' searches for macros. + +# serial 1 + +dnl AM_ACLOCAL_INCLUDE(macrodir) +AC_DEFUN([AM_ACLOCAL_INCLUDE], +[ + AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) + + test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + + for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done +]) diff --git a/apps/X11/InstallMgr/macros/autogen.sh b/apps/X11/InstallMgr/macros/autogen.sh new file mode 100644 index 0000000..7027391 --- /dev/null +++ b/apps/X11/InstallMgr/macros/autogen.sh @@ -0,0 +1,145 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to compile Gnome." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { + (libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed to compile Gnome." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed to compile Gnome." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed to compile Gnome." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed to compile Gnome." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for coin in `find $srcdir -name configure.in -print` +do + dr=`dirname $coin` + if test -f $dr/NO-AUTO-GEN; then + echo skipping $dr -- flagged as no auto-gen + else + echo processing $dr + macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` + ( cd $dr + aclocalinclude="$ACLOCAL_FLAGS" + for k in $macrodirs; do + if test -d $k; then + aclocalinclude="$aclocalinclude -I $k" + ##else + ## echo "**Warning**: No such directory \`$k'. Ignored." + fi + done + if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then + if grep "sed.*POTFILES" configure.in >/dev/null; then + : do nothing -- we still have an old unmodified configure.in + else + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running gettextize... Ignore non-fatal messages." + echo "no" | gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + fi + if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running gettextize... Ignore non-fatal messages." + echo "no" | gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then + echo "Running libtoolize..." + libtoolize --force --copy + fi + echo "Running aclocal $aclocalinclude ..." + aclocal $aclocalinclude + if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then + echo "Running autoheader..." + autoheader + fi + echo "Running automake --gnu $am_opt ..." + automake --add-missing --gnu $am_opt + echo "Running autoconf ..." + autoconf + ) + fi +done + +conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME || exit 1 +else + echo Skipping configure process. +fi diff --git a/apps/X11/InstallMgr/macros/compiler-flags.m4 b/apps/X11/InstallMgr/macros/compiler-flags.m4 new file mode 100644 index 0000000..63f8e2e --- /dev/null +++ b/apps/X11/InstallMgr/macros/compiler-flags.m4 @@ -0,0 +1,109 @@ +dnl GNOME_COMPILE_WARNINGS +dnl Turn on many useful compiler warnings +dnl For now, only works on GCC +AC_DEFUN([GNOME_COMPILE_WARNINGS],[ + AC_ARG_ENABLE(compile-warnings, + [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum) + + AC_MSG_CHECKING(what warning flags to pass to the C compiler) + warnCFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + + if test "x$enable_compile_warnings" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) warnCFLAGS="-Wall -Wunused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_compile_warnings" = "xyes"; then + warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations" + fi + fi + fi + AC_MSG_RESULT($warnCFLAGS) + + AC_ARG_ENABLE(iso-c, + [ --enable-iso-c Try to warn if code is not ISO C ],, + enable_iso_c=no) + + AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) + complCFLAGS= + if test "x$enable_iso_c" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -ansi" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCFLAGS="$complCFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCFLAGS) + if test "x$cflags_set" != "xyes"; then + CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" + cflags_set=yes + AC_SUBST(cflags_set) + fi +]) + +dnl For C++, do basically the same thing. + +AC_DEFUN([GNOME_CXX_WARNINGS],[ + AC_ARG_ENABLE(cxx-warnings, + [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) + + AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) + warnCXXFLAGS= + if test "x$GCC" != xyes; then + enable_compile_warnings=no + fi + if test "x$enable_cxx_warnings" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CXXFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) warnCXXFLAGS="-Wall -Wno-unused" ;; + esac + + ## -W is not all that useful. And it cannot be controlled + ## with individual -Wno-xxx flags, unlike -Wall + if test "x$enable_cxx_warnings" = "xyes"; then + warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual" + fi + fi + fi + AC_MSG_RESULT($warnCXXFLAGS) + + AC_ARG_ENABLE(iso-cxx, + [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, + enable_iso_cxx=no) + + AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) + complCXXFLAGS= + if test "x$enable_iso_cxx" != "xno"; then + if test "x$GCC" = "xyes"; then + case " $CXXFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; + esac + + case " $CXXFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; + esac + fi + fi + AC_MSG_RESULT($complCXXFLAGS) + if test "x$cxxflags_set" != "xyes"; then + CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" + cxxflags_set=yes + AC_SUBST(cxxflags_set) + fi +]) diff --git a/apps/X11/InstallMgr/macros/curses.m4 b/apps/X11/InstallMgr/macros/curses.m4 new file mode 100644 index 0000000..3dd4ffa --- /dev/null +++ b/apps/X11/InstallMgr/macros/curses.m4 @@ -0,0 +1,318 @@ +dnl Curses detection: Munged from Midnight Commander's configure.in +dnl +dnl What it does: +dnl ============= +dnl +dnl - Determine which version of curses is installed on your system +dnl and set the -I/-L/-l compiler entries and add a few preprocessor +dnl symbols +dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that +dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in +dnl Makefile.in's +dnl - Modify the following configure variables (these are the only +dnl curses.m4 variables you can access from within configure.in) +dnl CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if +dnl an ncurses.h that's been renamed to curses.h +dnl is found. +dnl CURSES_LIBS - sets -L and -l's appropriately +dnl CFLAGS - if --with-sco, add -D_SVID3 +dnl has_curses - exports result of tests to rest of configure +dnl +dnl Usage: +dnl ====== +dnl 1) Add lines indicated below to acconfig.h +dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in +dnl 3) Instead of #include <curses.h> you should use the following to +dnl properly locate ncurses or curses header file +dnl +dnl #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) +dnl #include <ncurses.h> +dnl #else +dnl #include <curses.h> +dnl #endif +dnl +dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags +dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS +dnl +dnl Notes with automake: +dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from +dnl configure.in +dnl - your Makefile.am can look something like this +dnl ----------------------------------------------- +dnl INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) +dnl if HAS_CURSES +dnl CURSES_TARGETS=name_of_curses_prog +dnl endif +dnl bin_PROGRAMS = other_programs $(CURSES_TARGETS) +dnl other_programs_SOURCES = blah blah blah +dnl name_of_curses_prog_SOURCES = blah blah blah +dnl other_programs_LDADD = blah +dnl name_of_curses_prog_LDADD = blah $(CURSES_LIBS) +dnl ----------------------------------------------- +dnl +dnl +dnl The following lines should be added to acconfig.h: +dnl ================================================== +dnl +dnl /*=== Curses version detection defines ===*/ +dnl /* Found some version of curses that we're going to use */ +dnl #undef HAS_CURSES +dnl +dnl /* Use SunOS SysV curses? */ +dnl #undef USE_SUNOS_CURSES +dnl +dnl /* Use old BSD curses - not used right now */ +dnl #undef USE_BSD_CURSES +dnl +dnl /* Use SystemV curses? */ +dnl #undef USE_SYSV_CURSES +dnl +dnl /* Use Ncurses? */ +dnl #undef USE_NCURSES +dnl +dnl /* If you Curses does not have color define this one */ +dnl #undef NO_COLOR_CURSES +dnl +dnl /* Define if you want to turn on SCO-specific code */ +dnl #undef SCO_FLAVOR +dnl +dnl /* Set to reflect version of ncurses * +dnl * 0 = version 1.* +dnl * 1 = version 1.9.9g +dnl * 2 = version 4.0/4.1 */ +dnl #undef NCURSES_970530 +dnl +dnl /*=== End new stuff for acconfig.h ===*/ +dnl + + +AC_DEFUN(AC_CHECK_CURSES,[ + search_ncurses=true + screen_manager="" + has_curses=false + + CFLAGS=${CFLAGS--O} + + AC_SUBST(CURSES_LIBS) + AC_SUBST(CURSES_INCLUDEDIR) + + AC_ARG_WITH(sco, + [ --with-sco Use this to turn on SCO-specific code],[ + if test x$withval = xyes; then + AC_DEFINE(SCO_FLAVOR) + CFLAGS="$CFLAGS -D_SVID3" + fi + ]) + + AC_ARG_WITH(sunos-curses, + [ --with-sunos-curses Used to force SunOS 4.x curses],[ + if test x$withval = xyes; then + AC_USE_SUNOS_CURSES + fi + ]) + + AC_ARG_WITH(osf1-curses, + [ --with-osf1-curses Used to force OSF/1 curses],[ + if test x$withval = xyes; then + AC_USE_OSF1_CURSES + fi + ]) + + AC_ARG_WITH(vcurses, + [ --with-vcurses[=incdir] Used to force SysV curses], + if test x$withval != xyes; then + CURSES_INCLUDEDIR="-I$withval" + fi + AC_USE_SYSV_CURSES + ) + + AC_ARG_WITH(ncurses, + [ --with-ncurses[=dir] Compile with ncurses/locate base dir], + if test x$withval = xno ; then + search_ncurses=false + elif test x$withval != xyes ; then + CURSES_LIBS="$LIBS -L$withval/lib -lncurses" + CURSES_INCLUDEDIR="-I$withval/include" + search_ncurses=false + screen_manager="ncurses" + AC_DEFINE(USE_NCURSES) + AC_DEFINE(HAS_CURSES) + has_curses=true + fi + ) + + if $search_ncurses + then + AC_SEARCH_NCURSES() + fi + + +]) + + +AC_DEFUN(AC_USE_SUNOS_CURSES, [ + search_ncurses=false + screen_manager="SunOS 4.x /usr/5include curses" + AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) + AC_DEFINE(USE_SUNOS_CURSES) + AC_DEFINE(HAS_CURSES) + has_curses=true + AC_DEFINE(NO_COLOR_CURSES) + AC_DEFINE(USE_SYSV_CURSES) + CURSES_INCLUDEDIR="-I/usr/5include" + CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" + AC_MSG_RESULT(Please note that some screen refreshs may fail) +]) + +AC_DEFUN(AC_USE_OSF1_CURSES, [ + AC_MSG_RESULT(Using OSF1 curses) + search_ncurses=false + screen_manager="OSF1 curses" + AC_DEFINE(HAS_CURSES) + has_curses=true + AC_DEFINE(NO_COLOR_CURSES) + AC_DEFINE(USE_SYSV_CURSES) + CURSES_LIBS="-lcurses" +]) + +AC_DEFUN(AC_USE_SYSV_CURSES, [ + AC_MSG_RESULT(Using SysV curses) + AC_DEFINE(HAS_CURSES) + has_curses=true + AC_DEFINE(USE_SYSV_CURSES) + search_ncurses=false + screen_manager="SysV/curses" + CURSES_LIBS="-lcurses" +]) + +dnl AC_ARG_WITH(bsd-curses, +dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], +dnl search_ncurses=false +dnl screen_manager="Ultrix/cursesX" +dnl if test $system = ULTRIX +dnl then +dnl THIS_CURSES=cursesX +dnl else +dnl THIS_CURSES=curses +dnl fi +dnl +dnl CURSES_LIBS="-l$THIS_CURSES -ltermcap" +dnl AC_DEFINE(HAS_CURSES) +dnl has_curses=true +dnl AC_DEFINE(USE_BSD_CURSES) +dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) +dnl AC_WARN(Use of the bsdcurses extension has some) +dnl AC_WARN(display/input problems.) +dnl AC_WARN(Reconsider using xcurses) +dnl) + + +dnl +dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename +dnl +AC_DEFUN(AC_NCURSES, [ + if $search_ncurses + then + if test -f $1/$2 + then + AC_MSG_RESULT(Found ncurses on $1/$2) + CURSES_LIBS="$3" + CURSES_INCLUDEDIR="$4" + search_ncurses=false + screen_manager=$5 + AC_DEFINE(HAS_CURSES) + has_curses=true + AC_DEFINE(USE_NCURSES) + fi + fi +]) + +AC_DEFUN(AC_SEARCH_NCURSES, [ + AC_CHECKING("location of ncurses.h file") + + AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") + AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") + AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local") + AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") + + AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") + + AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") + + dnl + dnl We couldn't find ncurses, try SysV curses + dnl + if $search_ncurses + then + AC_EGREP_HEADER(init_color, /usr/include/curses.h, + AC_USE_SYSV_CURSES) + AC_EGREP_CPP(USE_NCURSES,[ +#include <curses.h> +#ifdef __NCURSES_H +#undef USE_NCURSES +USE_NCURSES +#endif +],[ + CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" + AC_DEFINE(HAS_CURSES) + has_curses=true + AC_DEFINE(USE_NCURSES) + search_ncurses=false + screen_manager="ncurses installed as curses" +]) + fi + + dnl + dnl Try SunOS 4.x /usr/5{lib,include} ncurses + dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES + dnl should be replaced by a more fine grained selection routine + dnl + if $search_ncurses + then + if test -f /usr/5include/curses.h + then + AC_USE_SUNOS_CURSES + fi + else + # check for ncurses version, to properly ifdef mouse-fix + AC_MSG_CHECKING(for ncurses version) + ncurses_version=unknown +cat > conftest.$ac_ext <<EOF +[#]line __oline__ "configure" +#include "confdefs.h" +#ifdef RENAMED_NCURSES +#include <curses.h> +#else +#include <ncurses.h> +#endif +#undef VERSION +VERSION:NCURSES_VERSION +EOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | + egrep "VERSION:" >conftest.out 2>&1; then +changequote(,)dnl + ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` +changequote([,])dnl + fi + rm -rf conftest* + AC_MSG_RESULT($ncurses_version) + case "$ncurses_version" in +changequote(,)dnl + 4.[01]) +changequote([,])dnl + AC_DEFINE(NCURSES_970530,2) + ;; + 1.9.9g) + AC_DEFINE(NCURSES_970530,1) + ;; + 1*) + AC_DEFINE(NCURSES_970530,0) + ;; + esac + fi +]) + + + + + diff --git a/apps/X11/InstallMgr/macros/gnome-bonobo-check.m4 b/apps/X11/InstallMgr/macros/gnome-bonobo-check.m4 new file mode 100644 index 0000000..65e272c --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-bonobo-check.m4 @@ -0,0 +1,150 @@ +# Configure paths for Bonobo +# Miguel de Icaza, 99-04-12 +# Stolen from Chris Lahey 99-2-5 +# stolen from Manish Singh again +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_BONOBO ([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for Bonobo, and define BONOBO_CFLAGS and BONOBO_LIBS +dnl +AC_DEFUN([AM_PATH_BONOBO], +[ +dnl +dnl Get the cflags and libraries from the gnome-config script +dnl +AC_ARG_WITH(bonobo-prefix,[ --with-bonobo-prefix=PFX Prefix where Bonobo is installed (optional)], + bonobo_prefix="$withval", bonobo_prefix="") +AC_ARG_WITH(bonobo-exec-prefix,[ --with-bonobo-exec-prefix=PFX Exec prefix where Bonobo is installed (optional)], + bonobo_exec_prefix="$withval", bonobo_exec_prefix="") +AC_ARG_ENABLE(bonobotest, [ --disable-bonobotest Do not try to compile and run a test Bonobo program], + , enable_bonobotest=yes) + + if test x$bonobo_exec_prefix != x ; then + bonobo_args="$bonobo_args --exec-prefix=$bonobo_exec_prefix" + if test x${GNOME_CONFIG+set} != xset ; then + GNOME_CONFIG=$bonobo_exec_prefix/bin/gnome-config + fi + fi + if test x$bonobo_prefix != x ; then + bonobo_args="$bonobo_args --prefix=$bonobo_prefix" + if test x${GNOME_CONFIG+set} != xset ; then + GNOME_CONFIG=$bonobo_prefix/bin/gnome-config + fi + fi + + AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) + min_bonobo_version=ifelse([$1], ,0.1.0,$1) + AC_MSG_CHECKING(for BONOBO - version >= $min_bonobo_version) + no_bonobo="" + if test "$GNOME_CONFIG" = "no" ; then + no_bonobo=yes + else + BONOBO_CFLAGS=`$GNOME_CONFIG $bonoboconf_args --cflags bonobo` + BONOBO_LIBS=`$GNOME_CONFIG $bonoboconf_args --libs bonobo` + + bonobo_major_version=`$GNOME_CONFIG $bonobo_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + bonobo_minor_version=`$GNOME_CONFIG $bonobo_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + bonobo_micro_version=`$GNOME_CONFIG $bonobo_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_bonobotest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $BONOBO_CFLAGS" + LIBS="$LIBS $BONOBO_LIBS" +dnl +dnl Now check if the installed BONOBO is sufficiently new. (Also sanity +dnl checks the results of gnome-config to some extent +dnl + rm -f conf.bonobotest + AC_TRY_RUN([ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <bonobo/gnome-object.h> + +static char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.bonobotest"); + gnome_object_get_type (); + return 0; +} + +],, no_bonobo=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_bonobo" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GNOME_CONFIG" = "no" ; then + echo "*** The gnome-config script installed by GNOME-LIBS could not be found" + echo "*** If BONOBO was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GNOME_CONFIG environment variable to the" + echo "*** full path to gnome-config." + else + if test -f conf.bonobotest ; then + : + else + echo "*** Could not run BONOBO test program, checking why..." + CFLAGS="$CFLAGS $BONOBO_CFLAGS" + LIBS="$LIBS $BONOBO_LIBS" + AC_TRY_LINK([ +#include <stdio.h> +#include <bonobo/gnome-object.h> +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding BONOBO or finding the wrong" + echo "*** version of BONOBO. If it is not finding BONOBO, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means BONOBO was incorrectly installed" + echo "*** or that you have moved BONOBO since it was installed. In the latter case, you" + echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + BONOBO_CFLAGS="" + BONOBO_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(BONOBO_CFLAGS) + AC_SUBST(BONOBO_LIBS) + rm -f conf.bonobotest +]) + +AC_DEFUN([BONOBO_CHECK], [ + AM_PATH_BONOBO(0.1.0,,[AC_MSG_ERROR(BONOBO not found)]) +]) + diff --git a/apps/X11/InstallMgr/macros/gnome-common.m4 b/apps/X11/InstallMgr/macros/gnome-common.m4 new file mode 100644 index 0000000..b723829 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-common.m4 @@ -0,0 +1,14 @@ +# gnome-common.m4 +# +# This only for packages that are not in the GNOME CVS tree. + +dnl GNOME_COMMON_INIT + +AC_DEFUN([GNOME_COMMON_INIT], +[ + GNOME_ACLOCAL_DIR=`$ACLOCAL --print-ac-dir`/gnome + AC_SUBST(GNOME_ACLOCAL_DIR) + + ACLOCAL="$ACLOCAL -I $GNOME_ACLOCAL_DIR" +]) + diff --git a/apps/X11/InstallMgr/macros/gnome-fileutils.m4 b/apps/X11/InstallMgr/macros/gnome-fileutils.m4 new file mode 100644 index 0000000..7c11a78 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-fileutils.m4 @@ -0,0 +1,414 @@ +dnl +dnl GNOME_FILEUTILS_CHECKS +dnl +dnl checks that are needed for the diskusage applet. +dnl + +AC_DEFUN([GNOME_FILEUTILS_CHECKS], +[ +AC_CHECK_HEADERS(fcntl.h sys/param.h sys/statfs.h sys/fstyp.h \ +mnttab.h mntent.h sys/statvfs.h sys/vfs.h sys/mount.h \ +sys/filsys.h sys/fs_types.h sys/fs/s5param.h) + +AC_CHECK_FUNCS(bcopy endgrent endpwent fchdir ftime ftruncate \ +getcwd getmntinfo gettimeofday isascii lchown \ +listmntent memcpy mkfifo strchr strerror strrchr vprintf) + +dnl Set some defaults when cross-compiling + +if test x$cross_compiling = xyes ; then + case "$host_os" in + linux*) + fu_cv_sys_mounted_getmntent1=yes + fu_cv_sys_stat_statfs2_bsize=yes + ;; + sunos*) + fu_cv_sys_stat_statfs4=yes + ;; + freebsd*) + fu_cv_sys_stat_statfs2_bsize=yes + ;; + osf*) + fu_cv_sys_stat_statfs3_osf1=yes + ;; + esac +fi + +# Determine how to get the list of mounted filesystems. +list_mounted_fs= + +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). +AC_FUNC_GETMNTENT + +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. + +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# `CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. + +if test -z "$list_mounted_fs"; then +# Cray UNICOS 9 +AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) +AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent, +[fu_cv_sys_mounted_cray_listmntent=no +AC_EGREP_CPP(yes, +[#ifdef _CRAY +yes +#endif +], [test $ac_cv_func_listmntent = yes \ +&& fu_cv_sys_mounted_cray_listmntent=yes] +) +] +) +AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent) +if test $fu_cv_sys_mounted_cray_listmntent = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_LISTMNTENT) +fi +fi + +if test $ac_cv_func_getmntent = yes; then + +# This system has the getmntent function. +# Determine whether it's the one-argument variant or the two-argument one. + +if test -z "$list_mounted_fs"; then +# 4.3BSD, SunOS, HP-UX, Dynix, Irix +AC_MSG_CHECKING([for one-argument getmntent function]) +AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, +[test $ac_cv_header_mntent_h = yes \ +&& fu_cv_sys_mounted_getmntent1=yes \ +|| fu_cv_sys_mounted_getmntent1=no]) +AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) +if test $fu_cv_sys_mounted_getmntent1 = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_GETMNTENT1) +fi +fi + +if test -z "$list_mounted_fs"; then +# SVR4 +AC_MSG_CHECKING([for two-argument getmntent function]) +AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2, +[AC_EGREP_HEADER(getmntent, sys/mnttab.h, +fu_cv_sys_mounted_getmntent2=yes, +fu_cv_sys_mounted_getmntent2=no)]) +AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) +if test $fu_cv_sys_mounted_getmntent2 = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_GETMNTENT2) +fi +fi + +if test -z "$list_mounted_fs"; then +AC_MSG_ERROR([could not determine how to read list of mounted filesystems]) +fi + +fi + +if test -z "$list_mounted_fs"; then +# DEC Alpha running OSF/1. +AC_MSG_CHECKING([for getfsstat function]) +AC_CACHE_VAL(fu_cv_sys_mounted_getsstat, +[AC_TRY_LINK([ +#include <sys/types.h> +#include <sys/mount.h> +#include <sys/fs_types.h>], +[struct statfs *stats; +int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ], +fu_cv_sys_mounted_getsstat=yes, +fu_cv_sys_mounted_getsstat=no)]) +AC_MSG_RESULT($fu_cv_sys_mounted_getsstat) +if test $fu_cv_sys_mounted_getsstat = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_GETFSSTAT) +fi +fi + +if test -z "$list_mounted_fs"; then +# AIX. +AC_MSG_CHECKING([for mntctl function and struct vmount]) +AC_CACHE_VAL(fu_cv_sys_mounted_vmount, +[AC_TRY_CPP([#include <fshelp.h>], +fu_cv_sys_mounted_vmount=yes, +fu_cv_sys_mounted_vmount=no)]) +AC_MSG_RESULT($fu_cv_sys_mounted_vmount) +if test $fu_cv_sys_mounted_vmount = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_VMOUNT) +fi +fi + +if test -z "$list_mounted_fs"; then +# SVR3 +AC_MSG_CHECKING([for FIXME existence of three headers]) +AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp, +[AC_TRY_CPP([ +#include <sys/statfs.h> +#include <sys/fstyp.h> +#include <mnttab.h>], +fu_cv_sys_mounted_fread_fstyp=yes, +fu_cv_sys_mounted_fread_fstyp=no)]) +AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) +if test $fu_cv_sys_mounted_fread_fstyp = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_FREAD_FSTYP) +fi +fi + +if test -z "$list_mounted_fs"; then +# 4.4BSD and DEC OSF/1. +AC_MSG_CHECKING([for getmntinfo function]) +AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, +[ +ok= +if test $ac_cv_func_getmntinfo = yes; then +AC_EGREP_HEADER(f_type;, sys/mount.h, +ok=yes) +fi +test -n "$ok" \ +&& fu_cv_sys_mounted_getmntinfo=yes \ +|| fu_cv_sys_mounted_getmntinfo=no +]) +AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) +if test $fu_cv_sys_mounted_getmntinfo = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_GETMNTINFO) +fi +fi + +# FIXME: add a test for netbsd-1.1 here + +if test -z "$list_mounted_fs"; then +# Ultrix +AC_MSG_CHECKING([for getmnt function]) +AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, +[AC_TRY_CPP([ +#include <sys/fs_types.h> +#include <sys/mount.h>], +fu_cv_sys_mounted_getmnt=yes, +fu_cv_sys_mounted_getmnt=no)]) +AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) +if test $fu_cv_sys_mounted_getmnt = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_GETMNT) +fi +fi + +if test -z "$list_mounted_fs"; then +# SVR2 +AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) +AC_CACHE_VAL(fu_cv_sys_mounted_fread, +[AC_TRY_CPP([#include <mnttab.h>], +fu_cv_sys_mounted_fread=yes, +fu_cv_sys_mounted_fread=no)]) +AC_MSG_RESULT($fu_cv_sys_mounted_fread) +if test $fu_cv_sys_mounted_fread = yes; then +list_mounted_fs=found +AC_DEFINE(MOUNTED_FREAD) +fi +fi + +if test -z "$list_mounted_fs"; then +AC_MSG_ERROR([could not determine how to read list of mounted filesystems]) +# FIXME -- no need to abort building the whole package +# Can't build mountlist.c or anything that needs its functions +fi + +AC_CHECKING(how to get filesystem space usage) +space=no + +# Perform only the link test since it seems there are no variants of the +# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) +# because that got a false positive on SCO OSR5. Adding the declaration +# of a `struct statvfs' causes this test to fail (as it should) on such +# systems. That system is reported to work fine with STAT_STATFS4 which +# is what it gets when this test fails. +if test $space = no; then +# SVR4 +AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, +[AC_TRY_LINK([#include <sys/types.h> +#include <sys/statvfs.h>], +[struct statvfs fsd; statvfs (0, &fsd);], +fu_cv_sys_stat_statvfs=yes, +fu_cv_sys_stat_statvfs=no)]) +if test $fu_cv_sys_stat_statvfs = yes; then +space=yes +AC_DEFINE(STAT_STATVFS) +fi +fi + +if test $space = no; then +# DEC Alpha running OSF/1 +AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) +AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, +[AC_TRY_RUN([ +#include <sys/param.h> +#include <sys/types.h> +#include <sys/mount.h> +main () +{ +struct statfs fsd; +fsd.f_fsize = 0; +exit (statfs (".", &fsd, sizeof (struct statfs))); +}], +fu_cv_sys_stat_statfs3_osf1=yes, +fu_cv_sys_stat_statfs3_osf1=no, +fu_cv_sys_stat_statfs3_osf1=no)]) +AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) +if test $fu_cv_sys_stat_statfs3_osf1 = yes; then +space=yes +AC_DEFINE(STAT_STATFS3_OSF1) +fi +fi + +if test $space = no; then +# AIX +AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl +member (AIX, 4.3BSD)]) +AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, +[AC_TRY_RUN([ +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif +#ifdef HAVE_SYS_VFS_H +#include <sys/vfs.h> +#endif +main () +{ +struct statfs fsd; +fsd.f_bsize = 0; +exit (statfs (".", &fsd)); +}], +fu_cv_sys_stat_statfs2_bsize=yes, +fu_cv_sys_stat_statfs2_bsize=no, +fu_cv_sys_stat_statfs2_bsize=no)]) +AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) +if test $fu_cv_sys_stat_statfs2_bsize = yes; then +space=yes +AC_DEFINE(STAT_STATFS2_BSIZE) +fi +fi + +if test $space = no; then +# SVR3 +AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) +AC_CACHE_VAL(fu_cv_sys_stat_statfs4, +[AC_TRY_RUN([#include <sys/types.h> +#include <sys/statfs.h> +main () +{ +struct statfs fsd; +exit (statfs (".", &fsd, sizeof fsd, 0)); +}], +fu_cv_sys_stat_statfs4=yes, +fu_cv_sys_stat_statfs4=no, +fu_cv_sys_stat_statfs4=no)]) +AC_MSG_RESULT($fu_cv_sys_stat_statfs4) +if test $fu_cv_sys_stat_statfs4 = yes; then +space=yes +AC_DEFINE(STAT_STATFS4) +fi +fi + +if test $space = no; then +# 4.4BSD and NetBSD +AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl +member (4.4BSD and NetBSD)]) +AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, +[AC_TRY_RUN([#include <sys/types.h> +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif +main () +{ +struct statfs fsd; +fsd.f_fsize = 0; +exit (statfs (".", &fsd)); +}], +fu_cv_sys_stat_statfs2_fsize=yes, +fu_cv_sys_stat_statfs2_fsize=no, +fu_cv_sys_stat_statfs2_fsize=no)]) +AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) +if test $fu_cv_sys_stat_statfs2_fsize = yes; then +space=yes +AC_DEFINE(STAT_STATFS2_FSIZE) +fi +fi + +if test $space = no; then +# Ultrix +AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) +AC_CACHE_VAL(fu_cv_sys_stat_fs_data, +[AC_TRY_RUN([#include <sys/types.h> +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include <sys/fs_types.h> +#endif +main () +{ +struct fs_data fsd; +/* Ultrix's statfs returns 1 for success, +0 for not mounted, -1 for failure. */ +exit (statfs (".", &fsd) != 1); +}], +fu_cv_sys_stat_fs_data=yes, +fu_cv_sys_stat_fs_data=no, +fu_cv_sys_stat_fs_data=no)]) +AC_MSG_RESULT($fu_cv_sys_stat_fs_data) +if test $fu_cv_sys_stat_fs_data = yes; then +space=yes +AC_DEFINE(STAT_STATFS2_FS_DATA) +fi +fi + +if test $space = no; then +# SVR2 +AC_TRY_CPP([#include <sys/filsys.h>], +AC_DEFINE(STAT_READ_FILSYS) space=yes) +fi + +if test -n "$list_mounted_fs" && test $space != no; then +DF_PROG="df" +# LIBOBJS="$LIBOBJS fsusage.o" +# LIBOBJS="$LIBOBJS mountlist.o" +fi + +# Check for SunOS statfs brokenness wrt partitions 2GB and larger. +# If <sys/vfs.h> exists and struct statfs has a member named f_spare, +# enable the work-around code in fsusage.c. +AC_MSG_CHECKING([for statfs that truncates block counts]) +AC_CACHE_VAL(fu_cv_sys_truncating_statfs, +[AC_TRY_COMPILE([ +#if !defined(sun) && !defined(__sun) +choke -- this is a workaround for a Sun-specific problem +#endif +#include <sys/types.h> +#include <sys/vfs.h>], +[struct statfs t; long c = *(t.f_spare);], +fu_cv_sys_truncating_statfs=yes, +fu_cv_sys_truncating_statfs=no, +)]) +if test $fu_cv_sys_truncating_statfs = yes; then +AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS) +fi +AC_MSG_RESULT($fu_cv_sys_truncating_statfs) + +AC_CHECKING(for AFS) +test -d /afs && AC_DEFINE(AFS) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-gettext.m4 b/apps/X11/InstallMgr/macros/gnome-gettext.m4 new file mode 100644 index 0000000..1dac989 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-gettext.m4 @@ -0,0 +1,336 @@ +# Macro to add for using GNU gettext. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# Modified to never use included libintl. +# Owen Taylor <otaylor@redhat.com>, 12/15/1998 +# +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 5 + +AC_DEFUN(AM_GNOME_WITH_NLS, + [AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + USE_INCLUDED_LIBINTL=no + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS) +# AC_MSG_CHECKING([whether included gettext is requested]) +# AC_ARG_WITH(included-gettext, +# [ --with-included-gettext use the GNU gettext library included here], +# nls_cv_force_use_gnu_gettext=$withval, +# nls_cv_force_use_gnu_gettext=no) +# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + nls_cv_force_use_gnu_gettext="no" + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_CHECK_LIB(intl, gettext, + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)], + gt_cv_func_gettext_libintl=no)]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + + # Added by Martin Baulig 12/15/98 for libc5 systems + if test "$gt_cv_func_gettext_libc" != "yes" \ + && test "$gt_cv_func_gettext_libintl" = "yes"; then + INTLLIBS=-lintl + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + AC_MSG_CHECKING([whether catgets can be used]) + AC_ARG_WITH(catgets, + [ --with-catgets use catgets functions if available], + nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) + AC_MSG_RESULT($nls_cv_use_catgets) + + if test "$nls_cv_use_catgets" = "yes"; then + dnl No gettext in C library. Try catgets next. + AC_CHECK_LIB(i, main) + AC_CHECK_FUNC(catgets, + [AC_DEFINE(HAVE_CATGETS) + INTLOBJS="\$(CATOBJS)" + AC_PATH_PROG(GENCAT, gencat, no)dnl +# if test "$GENCAT" != "no"; then +# AC_PATH_PROG(GMSGFMT, gmsgfmt, no) +# if test "$GMSGFMT" = "no"; then +# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, +# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) +# fi +# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, +# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) +# USE_INCLUDED_LIBINTL=yes +# CATOBJEXT=.cat +# INSTOBJEXT=.cat +# DATADIRNAME=lib +# INTLDEPS='$(top_builddir)/intl/libintl.a' +# INTLLIBS=$INTLDEPS +# LIBS=`echo $LIBS | sed -e 's/-lintl//'` +# nls_cv_header_intl=intl/libintl.h +# nls_cv_header_libgt=intl/libgettext.h +# fi + ]) + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" != "yes"; then + AC_DEFINE(ENABLE_NLS) + else + # Unset this variable since we use the non-zero value as a flag. + CATOBJEXT= +# dnl Mark actions used to generate GNU NLS library. +# INTLOBJS="\$(GETTOBJS)" +# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, +# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) +# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) +# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, +# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) +# AC_SUBST(MSGFMT) +# USE_INCLUDED_LIBINTL=yes +# CATOBJEXT=.gmo +# INSTOBJEXT=.mo +# DATADIRNAME=share +# INTLDEPS='$(top_builddir)/intl/libintl.a' +# INTLLIBS=$INTLDEPS +# LIBS=`echo $LIBS | sed -e 's/-lintl//'` +# nls_cv_header_intl=intl/libintl.h +# nls_cv_header_libgt=intl/libgettext.h + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + +# # If this is used in GNU gettext we have to set USE_NLS to `yes' +# # because some of the sources are only built for this goal. +# if test "$PACKAGE" = gettext; then +# USE_NLS=yes +# USE_INCLUDED_LIBINTL=yes +# fi + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN(AM_GNOME_GETTEXT, + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next]) + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + AC_CHECK_FUNCS(stpcpy) + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + AC_DEFINE(HAVE_STPCPY) + fi + + AM_LC_MESSAGES + AM_GNOME_WITH_NLS + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + if test "x$LINGUAS" = "x"; then + LINGUAS=$ALL_LINGUAS + fi + for lang in $LINGUAS; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl The reference to <locale.h> in the installed <libintl.h> file + dnl must be resolved because we cannot expect the users of this + dnl to define HAVE_LOCALE_H. + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include <locale.h>" + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header <locale.h>. Take care yourself. */" + fi + AC_SUBST(INCLUDE_LOCALE_H) + + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + dnl po2tbl.sed is always needed. + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + dnl In the intl/Makefile.in we have a special dependency which makes + dnl only sense for gettext. We comment this out for non-gettext + dnl packages. + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + AC_SUBST(GT_NO) + AC_SUBST(GT_YES) + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl *** For now the libtool support in intl/Makefile is not for real. + l= + AC_SUBST(l) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + diff --git a/apps/X11/InstallMgr/macros/gnome-ghttp-check.m4 b/apps/X11/InstallMgr/macros/gnome-ghttp-check.m4 new file mode 100644 index 0000000..0ecacaa --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-ghttp-check.m4 @@ -0,0 +1,14 @@ +AC_DEFUN([GNOME_GHTTP_CHECK],[ + AC_REQUIRE([GNOME_INIT_HOOK]) + GHTTP_LIB= + AC_CHECK_FUNC(connect,,[ + AC_CHECK_LIB(socket,connect, + GHTTP_LIB="-lsocket $GHTTP_LIB",,$GHTTP_LIB)]) + AC_CHECK_FUNC(gethostbyname,,[ + AC_CHECK_LIB(nsl,gethostbyname, + GHTTP_LIB="-lnsl $GHTTP_LIB",,$GHTTP_LIB)]) + AC_CHECK_LIB(ghttp, ghttp_request_new, + GHTTP_LIB="-lghttp $GHTTP_LIB",GHTTP_LIB="",-L$gnome_prefix $GHTTP_LIB) + AC_SUBST(GHTTP_LIB) + AC_PROVIDE([GNOME_GHTTP_CHECK]) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-gnorba-check.m4 b/apps/X11/InstallMgr/macros/gnome-gnorba-check.m4 new file mode 100644 index 0000000..dbac0a6 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-gnorba-check.m4 @@ -0,0 +1,35 @@ +dnl +dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) +dnl +dnl if failflag is "failure" it aborts if gnorba is not found. +dnl + +AC_DEFUN([GNOME_GNORBA_HOOK],[ + GNOME_ORBIT_HOOK([],$2) + AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ + gnome_cv_gnorba_found=no + if test x$gnome_cv_orbit_found = xyes; then + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + if test -n "$GNORBA_LIBS"; then + gnome_cv_gnorba_found=yes + fi + fi + ]) + AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) + if test x$gnome_cv_orbit_found = xyes; then + $1 + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + AC_SUBST(GNORBA_CFLAGS) + AC_SUBST(GNORBA_LIBS) + else + if test x$2 = xfailure; then + AC_MSG_ERROR(gnorba library not installed or installation problem) + fi + fi +]) + +AC_DEFUN([GNOME_GNORBA_CHECK], [ + GNOME_GNORBA_HOOK([],failure) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-guile-checks.m4 b/apps/X11/InstallMgr/macros/gnome-guile-checks.m4 new file mode 100644 index 0000000..1086d30 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-guile-checks.m4 @@ -0,0 +1,119 @@ +dnl +dnl GNOME_CHECK_GUILE (failflag) +dnl +dnl if failflag is "fail" then GNOME_CHECK_GUILE will abort if guile is not found. +dnl + +AC_DEFUN([GNOME_CHECK_GUILE], +[ + saved_ldflags="$LDFLAGS" + saved_cppflags="$CPPFLAGS" + LDFLAGS="$LDFLAGS $GNOME_LIBDIR" + + AC_CHECK_LIB(qthreads,qt_null,[ + QTTHREADS_LIB="-lqthreads" + ],[ + AC_CHECK_LIB(qt, qt_null, QTTHREADS_LIB="-lqt") + ],$LIBS) + AC_SUBST(QTTHREADS_LIB) + + AC_CHECK_LIB(termcap,main,TERMCAP_LIB="-ltermcap") + AC_CHECK_LIB(readline,main,READLINE_LIB="-lreadline",,$TERMCAP_LIB) + + AC_SUBST(TERMCAP_LIB) + AC_SUBST(READLINE_LIB) + + if test "x$cross_compiling" = "xyes" ; then + name_build_guile="$target_alias-guile-config" + else + name_build_guile="guile-config" + fi + + AC_CHECK_PROG(BUILD_GUILE, $name_build_guile, yes, no) + + if test "x$BUILD_GUILE" = "xyes"; then + AC_MSG_CHECKING(whether $name_build_guile works) + if test x`$name_build_guile --version >/dev/null 2>&1 || \ + echo no` = xno; then + BUILD_GUILE=no + fi + AC_MSG_RESULT($BUILD_GUILE) + else + + if test "x$cross_compiling" = "xyes" ; then + name_build_guile="$target_alias-build-guile" + else + name_build_guile="build-guile" + fi + + AC_CHECK_PROG(BUILD_GUILE, $name_build_guile, yes, no) + + if test "x$BUILD_GUILE" = "xyes"; then + AC_MSG_CHECKING(whether $name_build_guile works) + if test x`$name_build_guile --version >/dev/null 2>&1 || \ + echo no` = xno; then + BUILD_GUILE=no + fi + AC_MSG_RESULT($BUILD_GUILE) + fi + fi + + AC_CHECK_LIB(m, sin) + + if test "x$BUILD_GUILE" = "xyes"; then + AC_MSG_CHECKING(for guile libraries) + GUILE_LIBS="`$name_build_guile link`" + AC_MSG_RESULT($GUILE_LIBS) + AC_MSG_CHECKING(for guile headers) + GUILE_INCS="`$name_build_guile compile`" + AC_MSG_RESULT($GUILE_INCS) + else + GUILE_LIBS="$GNOME_LIBDIR" + GUILE_INCS="$GNOME_INCLUDEDIR" + AC_CHECK_LIB(rx, main, GUILE_LIBS="-lrx $GUILE_LIBS") + AC_CHECK_LIB(qt, qt_null, GUILE_LIBS="-lqt $GUILE_LIBS") + AC_CHECK_LIB(dl, dlopen, GUILE_LIBS="-ldl $GUILE_LIBS") + AC_CHECK_LIB(nsl, t_accept, GUILE_LIBS="$GUILE_LIBS -lnsl") + AC_CHECK_LIB(socket, socket, GUILE_LIBS="$GUILE_LIBS -lsocket") + GUILE_LIBS="-lguile $GUILE_LIBS $QTTHREADS_LIB $READLINE_LIB $TERMCAP_LIB" + fi + + AC_SUBST(GUILE_LIBS) + AC_SUBST(GUILE_INCS) + + saved_LIBS="$LIBS" + LIBS="$LIBS $GUILE_LIBS" + CPPFLAGS="$saved_cppflags $GUILE_INCS" + + AC_MSG_CHECKING(whether guile works) + AC_TRY_LINK([ + #include <libguile.h> + #include <guile/gh.h> + ],[ + gh_eval_str("(newline)"); + scm_boot_guile(0,NULL,NULL,NULL); + ],[ + ac_cv_guile_found=yes + AC_DEFINE(HAVE_GUILE) + ],[ + ac_cv_guile_found=no + ]) + AC_MSG_RESULT($ac_cv_guile_found) + + if test x$ac_cv_guile_found = xno ; then + if test x$1 = xfail ; then + AC_MSG_ERROR(Can not find Guile on this system) + else + AC_MSG_WARN(Can not find Guile on this system) + fi + ac_cv_guile_found=no + GUILE_LIBS= GUILE_INCS= + fi + + LIBS="$saved_LIBS" + LDFLAGS="$saved_ldflags" + CPPFLAGS="$saved_cppflags" + + AC_SUBST(GUILE_LIBS) + AM_CONDITIONAL(GUILE, test x$ac_cv_guile_found = xyes) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-libgtop-check.m4 b/apps/X11/InstallMgr/macros/gnome-libgtop-check.m4 new file mode 100644 index 0000000..81fbb60 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-libgtop-check.m4 @@ -0,0 +1,182 @@ +dnl +dnl GNOME_LIBGTOP_TYPES +dnl +dnl some typechecks for libgtop. +dnl + +AC_DEFUN([GNOME_LIBGTOP_TYPES], +[ + AC_CHECK_TYPE(u_int64_t, unsigned long long int) + AC_CHECK_TYPE(int64_t, long long int) +]) + +dnl +dnl GNOME_LIBGTOP_HOOK (minversion, script-if-libgtop-enabled, failflag) +dnl +dnl if failflag is "fail" then GNOME_LIBGTOP_HOOK will abort if LibGTop +dnl is not found. +dnl + +AC_DEFUN([GNOME_LIBGTOP_HOOK], +[ + AC_REQUIRE([GNOME_LIBGTOP_TYPES]) + + AC_SUBST(LIBGTOP_LIBDIR) + AC_SUBST(LIBGTOP_INCLUDEDIR) + AC_SUBST(LIBGTOP_EXTRA_LIBS) + AC_SUBST(LIBGTOP_LIBS) + AC_SUBST(LIBGTOP_INCS) + AC_SUBST(LIBGTOP_NAMES_LIBS) + AC_SUBST(LIBGTOP_NAMES_INCS) + AC_SUBST(LIBGTOP_GUILE_INCS) + AC_SUBST(LIBGTOP_GUILE_LIBS) + AC_SUBST(LIBGTOP_GUILE_NAMES_INCS) + AC_SUBST(LIBGTOP_GUILE_NAMES_LIBS) + AC_SUBST(LIBGTOP_MAJOR_VERSION) + AC_SUBST(LIBGTOP_MINOR_VERSION) + AC_SUBST(LIBGTOP_MICRO_VERSION) + AC_SUBST(LIBGTOP_VERSION) + AC_SUBST(LIBGTOP_VERSION_CODE) + AC_SUBST(LIBGTOP_SERVER_VERSION) + AC_SUBST(LIBGTOP_INTERFACE_AGE) + AC_SUBST(LIBGTOP_BINARY_AGE) + AC_SUBST(LIBGTOP_BINDIR) + AC_SUBST(LIBGTOP_SERVER) + + dnl Get the cflags and libraries from the libgtop-config script + dnl + AC_ARG_WITH(libgtop, + [ --with-libgtop=PFX Prefix where LIBGTOP is installed (optional)], + libgtop_config_prefix="$withval", libgtop_config_prefix="") + AC_ARG_WITH(libgtop-exec, + [ --with-libgtop-exec=PFX Exec prefix where LIBGTOP is installed (optional)], + libgtop_config_exec_prefix="$withval", libgtop_config_exec_prefix="") + + if test x$libgtop_config_exec_prefix != x ; then + libgtop_config_args="$libgtop_config_args --exec-prefix=$libgtop_config_exec_prefix" + if test x${LIBGTOP_CONFIG+set} != xset ; then + LIBGTOP_CONFIG=$libgtop_config_exec_prefix/bin/libgtop-config + fi + fi + if test x$libgtop_config_prefix != x ; then + libgtop_config_args="$libgtop_config_args --prefix=$libgtop_config_prefix" + if test x${LIBGTOP_CONFIG+set} != xset ; then + LIBGTOP_CONFIG=$libgtop_config_prefix/bin/libgtop-config + fi + fi + + AC_PATH_PROG(LIBGTOP_CONFIG, libgtop-config, no) + dnl IMPORTANT NOTICE: + dnl If you increase this number here, this means that *ALL* + dnl modules will require the new version, even if they explicitly + dnl give a lower number in their `configure.in' !!! + real_min_libgtop_version=1.0.0 + min_libgtop_version=ifelse([$1], ,$real_min_libgtop_version,$1) + dnl I know, the following code looks really ugly, but if you want + dnl to make changes, please test it with a brain-dead /bin/sh and + dnl with a brain-dead /bin/test (not all shells/tests support the + dnl `<' operator to compare strings, that's why I convert everything + dnl into numbers and test them). + min_libgtop_major=`echo $min_libgtop_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + min_libgtop_minor=`echo $min_libgtop_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + min_libgtop_micro=`echo $min_libgtop_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + test x$min_libgtop_micro = x && min_libgtop_micro=0 + real_min_libgtop_major=`echo $real_min_libgtop_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + real_min_libgtop_minor=`echo $real_min_libgtop_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + real_min_libgtop_micro=`echo $real_min_libgtop_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + test x$real_min_libgtop_micro = x && real_min_libgtop_micro=0 + dnl You cannot require a version less then $real_min_libgtop_version, + dnl so you don't need to update each `configure.in' when it's increased. + if test $real_min_libgtop_major -gt $min_libgtop_major ; then + min_libgtop_major=$real_min_libgtop_major + min_libgtop_minor=$real_min_libgtop_minor + min_libgtop_micro=$real_min_libgtop_micro + elif test $real_min_libgtop_major = $min_libgtop_major ; then + if test $real_min_libgtop_minor -gt $min_libgtop_minor ; then + min_libgtop_minor=$real_min_libgtop_minor + min_libgtop_micro=$real_min_libgtop_micro + elif test $real_min_libgtop_minor = $min_libgtop_minor ; then + if test $real_min_libgtop_micro -gt $min_libgtop_micro ; then + min_libgtop_micro=$real_min_libgtop_micro + fi + fi + fi + min_libgtop_version="$min_libgtop_major.$min_libgtop_minor.$min_libgtop_micro" + AC_MSG_CHECKING(for libgtop - version >= $min_libgtop_version) + no_libgtop="" + if test "$LIBGTOP_CONFIG" = "no" ; then + no_libgtop=yes + else + configfile=`$LIBGTOP_CONFIG --config` + libgtop_major_version=`$LIBGTOP_CONFIG --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + libgtop_minor_version=`$LIBGTOP_CONFIG --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + libgtop_micro_version=`$LIBGTOP_CONFIG --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + test $libgtop_major_version != $min_libgtop_major && no_libgtop=yes + test $libgtop_minor_version -lt $min_libgtop_minor && no_libgtop=yes + if test $libgtop_minor_version = $min_libgtop_minor ; then + test $libgtop_micro_version -lt $min_libgtop_micro && no_libgtop=yes + fi + . $configfile + fi + if test x$no_libgtop = x ; then + AC_DEFINE(HAVE_LIBGTOP) + AC_DEFINE_UNQUOTED(LIBGTOP_VERSION, "$LIBGTOP_VERSION") + AC_DEFINE_UNQUOTED(LIBGTOP_VERSION_CODE, $LIBGTOP_VERSION_CODE) + AC_DEFINE_UNQUOTED(LIBGTOP_MAJOR_VERSION, $LIBGTOP_MAJOR_VERSION) + AC_DEFINE_UNQUOTED(LIBGTOP_MINOR_VERSION, $LIBGTOP_MINOR_VERSION) + AC_DEFINE_UNQUOTED(LIBGTOP_MICRO_VERSION, $LIBGTOP_MICRO_VERSION) + AC_DEFINE_UNQUOTED(LIBGTOP_SERVER_VERSION, $LIBGTOP_SERVER_VERSION) + AC_MSG_RESULT(yes) + dnl Note that an empty true branch is not valid sh syntax. + ifelse([$2], [], :, [$2]) + else + AC_MSG_RESULT(no) + if test "x$3" = "xfail"; then + AC_MSG_ERROR(LibGTop >= $min_libgtop_version not found) + else + AC_MSG_WARN(LibGTop >= $min_libgtop_version not found) + fi + fi + + AM_CONDITIONAL(HAVE_LIBGTOP, test x$no_libgtop != xyes) +]) + +AC_DEFUN([GNOME_INIT_LIBGTOP],[ + GNOME_LIBGTOP_HOOK($1,[ifelse([$3], [], :, [$3])],$2) +]) + +dnl +dnl GNOME_LIBGTOP_DOCU +dnl +dnl checks whether the documentation of LibGTop is installed +dnl + +AC_DEFUN([GNOME_LIBGTOP_DOCU], +[ + AC_REQUIRE([GNOME_LIBGTOP_HOOK]) + + helpdir="$LIBGTOP_DATADIR/gnome/help/libgtop" + + AC_MSG_CHECKING(whether you have the LibGTop Documentation) + + if test -f "$helpdir/C/topic.dat" ; then + have_libgtop_docu=yes + AC_DEFINE(HAVE_LIBGTOP_DOCU) + else + have_libgtop_docu=no + fi + + AC_MSG_RESULT($have_libgtop_docu) + + AM_CONDITIONAL(HAVE_LIBGTOP_DOCU, test x$have_libgtop_docu = xyes) +]) + diff --git a/apps/X11/InstallMgr/macros/gnome-objc-checks.m4 b/apps/X11/InstallMgr/macros/gnome-objc-checks.m4 new file mode 100644 index 0000000..dc9691c --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-objc-checks.m4 @@ -0,0 +1,79 @@ +AC_DEFUN([GNOME_CHECK_OBJC], +[ +dnl Look for an ObjC compiler. +dnl FIXME: extend list of possible names of ObjC compilers. + AC_CHECK_PROGS(OBJC, $OBJC egcs, "") + if test "x$OBJC" = "x" ; then + AC_CHECK_PROGS(OBJC, $OBJC egcc, "") + if test "x$OBJC" = "x" ; then + AC_CHECK_PROGS(OBJC, $OBJC gcc, "") + fi + fi + + AC_REQUIRE([GNOME_PTHREAD_CHECK]) + + OBJC_LIBS="-lobjc $PTHREAD_LIB" + AC_CHECK_FUNC(sched_yield,,[ + AC_CHECK_LIB(posix4,sched_yield, + OBJC_LIBS="$OBJC_LIBS -lposix4",, $OBJC_LIBS)]) + AC_SUBST(OBJC_LIBS) + + AC_CACHE_CHECK([if Objective C compiler ($OBJC) works], + ac_cv_prog_objc_works, [ + if test -n "$OBJC"; then + cat > conftest.m <<EOF +#include <objc/Object.h> +@interface myRandomObj : Object +{ +} +@end +@implementation myRandomObj +@end +int main () { + /* No, you are not seeing double. Remember that square brackets + are the autoconf m4 quotes. */ + id myid = [[myRandomObj alloc]]; + [[myid free]]; + return 0; +} +EOF + + $OBJC $CFLAGS -o conftest $LDFLAGS conftest.m $OBJC_LIBS 1>&AC_FD_CC 2>&1 + result=$? + rm -f conftest* + + if test $result -eq 0; then + ac_cv_prog_objc_works=yes + fi + else + ac_cv_prog_objc_works=no + fi + ]) + + AM_CONDITIONAL(OBJECTIVE_C, test x$ac_cv_prog_objc_works = xyes) + dnl Also set the shell variable OBJECTIVE_C to "yes" or "no". + OBJECTIVE_C=$ac_cv_prog_objc_works +]) + +AC_DEFUN([GNOME_INIT_OBJC], +[ + AC_MSG_CHECKING(for an obGnomeConf.sh) + my_gnome_libdir=`$GNOME_CONFIG --libdir` + if test -f $my_gnome_libdir/obGnomeConf.sh; then + . $my_gnome_libdir/obGnomeConf.sh + AC_MSG_RESULT(found $my_gnome_libdir) + ac_cv_have_gnome_objc=yes + else + AC_MSG_RESULT(not found) + AC_MSG_WARN(Could not find the obGnomeConf.sh file that is generated by gnome-objc install) + ac_cv_have_gnome_objc=no + fi + + dnl Add a conditional on whether or not we have gnome-objc + AM_CONDITIONAL(HAVE_GNOME_OBJC, test x$ac_cv_have_gnome_objc = xyes) + HAVE_GNOME_OBJC=$ac_cv_have_gnome_objc + + AC_SUBST(OBGNOME_INCLUDEDIR) + AC_SUBST(OBGNOME_LIBS) + AC_SUBST(OBGTK_LIBS) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-orbit-check.m4 b/apps/X11/InstallMgr/macros/gnome-orbit-check.m4 new file mode 100644 index 0000000..54bf33a --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-orbit-check.m4 @@ -0,0 +1,33 @@ +dnl +dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) +dnl +dnl if failflag is "failure" it aborts if orbit is not found. +dnl + +AC_DEFUN([GNOME_ORBIT_HOOK],[ + AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) + AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) + AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ + if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then + gnome_cv_orbit_found=no + else + gnome_cv_orbit_found=yes + fi + ]) + AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) + if test x$gnome_cv_orbit_found = xyes; then + $1 + ORBIT_CFLAGS=`orbit-config --cflags client server` + ORBIT_LIBS=`orbit-config --use-service=name --libs client server` + AC_SUBST(ORBIT_CFLAGS) + AC_SUBST(ORBIT_LIBS) + else + if test x$2 = xfailure; then + AC_MSG_ERROR(ORBit not installed or installation problem) + fi + fi +]) + +AC_DEFUN([GNOME_ORBIT_CHECK], [ + GNOME_ORBIT_HOOK([],failure) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-print-check.m4 b/apps/X11/InstallMgr/macros/gnome-print-check.m4 new file mode 100644 index 0000000..7d98281 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-print-check.m4 @@ -0,0 +1,171 @@ +# Configure paths for GNOME-PRINT +# Chris Lahey 99-2-5 +# stolen from Manish Singh again +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_GNOME_PRINT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for GNOME-PRINT, and define GNOME_PRINT_CFLAGS and GNOME_PRINT_LIBS +dnl +AC_DEFUN(AM_PATH_GNOME_PRINT, +[dnl +dnl Get the cflags and libraries from the gnome-config script +dnl +AC_ARG_WITH(gnome-print-prefix,[ --with-gnome-print-prefix=PFX Prefix where GNOME-PRINT is installed (optional)], + gnome_print_prefix="$withval", gnome_print_prefix="") +AC_ARG_WITH(gnome-print-exec-prefix,[ --with-gnome-print-exec-prefix=PFX Exec prefix where GNOME-PRINT is installed (optional)], + gnome_print_exec_prefix="$withval", gnome_print_exec_prefix="") +AC_ARG_ENABLE(gnome-printtest, [ --disable-gnome-printtest Do not try to compile and run a test GNOME-PRINT program], + , enable_gnome_printtest=yes) + + if test x$gnome_print_exec_prefix != x ; then + gnome_print_args="$gnome_print_args --exec-prefix=$gnome_print_exec_prefix" + if test x${GNOME_CONFIG+set} != xset ; then + GNOME_CONFIG=$gnome_print_exec_prefix/bin/gnome-config + fi + fi + if test x$gnome_print_prefix != x ; then + gnome_print_args="$gnome_print_args --prefix=$gnome_print_prefix" + if test x${GNOME_CONFIG+set} != xset ; then + GNOME_CONFIG=$gnome_print_prefix/bin/gnome-config + fi + fi + + AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) + min_gnome_print_version=ifelse([$1], ,0.1.0,$1) + AC_MSG_CHECKING(for GNOME-PRINT - version >= $min_gnome_print_version) + no_gnome_print="" + if test "$GNOME_CONFIG" = "no" ; then + no_gnome_print=yes + else + GNOME_PRINT_CFLAGS=`$GNOME_CONFIG $gnome_printconf_args --cflags print` + GNOME_PRINT_LIBS=`$GNOME_CONFIG $gnome_printconf_args --libs print` + + gnome_print_major_version=`$GNOME_CONFIG $gnome_print_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gnome_print_minor_version=`$GNOME_CONFIG $gnome_print_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gnome_print_micro_version=`$GNOME_CONFIG $gnome_print_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gnome_printtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS" + LIBS="$LIBS $GNOME_PRINT_LIBS" +dnl +dnl Now check if the installed GNOME-PRINT is sufficiently new. (Also sanity +dnl checks the results of gnome-config to some extent +dnl + rm -f conf.gnome_printtest + AC_TRY_RUN([ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <libgnomeprint/gnome-print.h> + +static char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gnome_printtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_gnome_print_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gnome_print_version"); + exit(1); + } + return 0; +#if 0 + if (($gnome_print_major_version > major) || + (($gnome_print_major_version == major) && ($gnome_print_minor_version > minor)) || + (($gnome_print_major_version == major) && ($gnome_print_minor_version == minor) && ($gnome_print_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'gnome-config print --version' returned %d.%d.%d, but the minimum version\n", $gnome_print_major_version, $gnome_print_minor_version, $gnome_print_micro_version); + printf("*** of GNOME-PRINT required is %d.%d.%d. If gnome-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If gnome-config was wrong, set the environment variable GNOME_CONFIG\n"); + printf("*** to point to the correct copy of gnome-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +#endif +} + +],, no_gnome_print=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gnome_print" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GNOME_CONFIG" = "no" ; then + echo "*** The gnome-config script installed by GNOME-LIBS could not be found" + echo "*** If GNOME-PRINT was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GNOME_CONFIG environment variable to the" + echo "*** full path to gnome-config." + else + if test -f conf.gnome_printtest ; then + : + else + echo "*** Could not run GNOME-PRINT test program, checking why..." + CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS" + LIBS="$LIBS $GNOME_PRINT_LIBS" + AC_TRY_LINK([ +#include <stdio.h> +#include <libgnomeprint/gnome-print.h> +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GNOME-PRINT or finding the wrong" + echo "*** version of GNOME-PRINT. If it is not finding GNOME-PRINT, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GNOME-PRINT was incorrectly installed" + echo "*** or that you have moved GNOME-PRINT since it was installed. In the latter case, you" + echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GNOME_PRINT_CFLAGS="" + GNOME_PRINT_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GNOME_PRINT_CFLAGS) + AC_SUBST(GNOME_PRINT_LIBS) + rm -f conf.gnome_printtest +]) + +AC_DEFUN([GNOME_PRINT_CHECK], [ + AM_PATH_GNOME_PRINT(0.1.0,,[AC_MSG_ERROR(GNOME-PRINT not found)]) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-pthread-check.m4 b/apps/X11/InstallMgr/macros/gnome-pthread-check.m4 new file mode 100644 index 0000000..a4eb3b4 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-pthread-check.m4 @@ -0,0 +1,16 @@ +dnl +dnl And better, use gthreads instead... +dnl + +AC_DEFUN([GNOME_PTHREAD_CHECK],[ + PTHREAD_LIB="" + AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", + [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", + [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", + [AC_CHECK_FUNC(pthread_create)] + )] + )] + ) + AC_SUBST(PTHREAD_LIB) + AC_PROVIDE([GNOME_PTHREAD_CHECK]) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-support.m4 b/apps/X11/InstallMgr/macros/gnome-support.m4 new file mode 100644 index 0000000..2c1d049 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-support.m4 @@ -0,0 +1,68 @@ +dnl GNOME_SUPPORT_CHECKS +dnl Check for various support functions needed by the standard +dnl Gnome libraries. Sets LIBOBJS, might define some macros. +dnl This should only be used when building the Gnome libs; +dnl Gnome clients should not need this macro. +AC_DEFUN([GNOME_SUPPORT_CHECKS],[ + # we need an `awk' to build `gnomesupport.h' + AC_REQUIRE([AC_PROG_AWK]) + + # this should go away soon + need_gnome_support=yes + + save_LIBOBJS="$LIBOBJS" + LIBOBJS= + + AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o") + + # for `scandir' + AC_HEADER_DIRENT + + # copied from `configure.in' of `libiberty' + vars="program_invocation_short_name program_invocation_name sys_errlist" + for v in $vars; do + AC_MSG_CHECKING([for $v]) + AC_CACHE_VAL(gnome_cv_var_$v, + [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;], + [eval "gnome_cv_var_$v=yes"], + [eval "gnome_cv_var_$v=no"])]) + if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then + AC_MSG_RESULT(yes) + n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + AC_DEFINE_UNQUOTED($n) + else + AC_MSG_RESULT(no) + fi + done + + AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen) + AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf) + + AC_CHECK_FUNCS(realpath,,LIBOBJS="$LIBOBJS canonicalize.o") + + # to include `error.c' error.c has some HAVE_* checks + AC_CHECK_FUNCS(vprintf doprnt strerror_r) + AM_FUNC_ERROR_AT_LINE + + # This is required if we declare setreuid () and setregid (). + AC_TYPE_UID_T + + # see if we need to declare some functions. Solaris is notorious for + # putting functions into the `libc' but not listing them in the headers + AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h) + GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize) + GCC_NEED_DECLARATION(scandir,[ +#ifdef HAVE_DIRENT_H +#include <dirent.h> +#endif +]) + + # Turn our LIBOBJS into libtool objects. This is gross, but it + # requires changes to autoconf before it goes away. + LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'` + AC_SUBST(need_gnome_support) + AC_SUBST(LTLIBOBJS) + + LIBOBJS="$save_LIBOBJS" + AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-undelfs.m4 b/apps/X11/InstallMgr/macros/gnome-undelfs.m4 new file mode 100644 index 0000000..c8ea6f4 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-undelfs.m4 @@ -0,0 +1,20 @@ +dnl GNOME_UNDELFS_CHECKS +dnl Check for ext2fs undel support. +dnl Set shell variable ext2fs_undel to "yes" if we have it, +dnl "no" otherwise. May define USE_EXT2FSLIB for cpp. +dnl Will set EXT2FS_UNDEL_LIBS to required libraries. + +AC_DEFUN([GNOME_UNDELFS_CHECKS], [ + AC_CHECK_HEADERS(ext2fs/ext2fs.h linux/ext2_fs.h) + ext2fs_undel=no + EXT2FS_UNDEL_LIBS= + if test x$ac_cv_header_ext2fs_ext2fs_h = xyes + then + if test x$ac_cv_header_linux_ext2_fs_h = xyes + then + AC_DEFINE(USE_EXT2FSLIB) + ext2fs_undel=yes + EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err" + fi + fi +]) diff --git a/apps/X11/InstallMgr/macros/gnome-vfs.m4 b/apps/X11/InstallMgr/macros/gnome-vfs.m4 new file mode 100644 index 0000000..137a39d --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-vfs.m4 @@ -0,0 +1,120 @@ +dnl GNOME_VFS_CHECKS +dnl Check for various functions needed by libvfs. +dnl This has various effects: +dnl Sets GNOME_VFS_LIBS to libraries required +dnl Sets termnet to true or false depending on whether it is required. +dnl If yes, defines USE_TERMNET. +dnl Sets vfs_flags to "pretty" list of vfs implementations we include. +dnl Sets shell variable use_vfs to yes (default, --with-vfs) or +dnl "no" (--without-vfs). +dnl Calls AC_SUBST(mcserv), which is either empty or "mcserv". + +dnl Private define +AC_DEFUN([GNOME_WITH_VFS],[ + dnl FIXME: network checks should probably be in their own macro. + AC_CHECK_LIB(nsl, t_accept) + AC_CHECK_LIB(socket, socket) + + have_socket=no + AC_CHECK_FUNCS(socket, have_socket=yes) + if test $have_socket = no; then + # socket is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, socket, [ + LIBS="$LIBS -l$lib" + have_socket=yes + AC_DEFINE(HAVE_SOCKET) + break]) + done + fi + + have_gethostbyname=no + AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes) + if test $have_gethostbyname = no; then + # gethostbyname is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break]) + done + fi + + vfs_flags="tarfs" + use_net_code=false + if test $have_socket = yes; then + AC_STRUCT_LINGER + AC_CHECK_FUNCS(pmap_set, , [ + AC_CHECK_LIB(rpc, pmap_set, [ + LIBS="-lrpc $LIBS" + AC_DEFINE(HAVE_PMAP_SET) + ])]) + AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport) + dnl add for source routing support setsockopt + AC_CHECK_HEADERS(rpc/pmap_clnt.h) + vfs_flags="$vfs_flags, mcfs, ftpfs, fish" + use_net_code=true + fi + + dnl + dnl Samba support + dnl + smbfs="" + SAMBAFILES="" + AC_ARG_WITH(samba, + [--with-samba Support smb virtual file system],[ + if test "x$withval != xno"; then + AC_DEFINE(WITH_SMBFS) + vfs_flags="$vfs_flags, smbfs" + smbfs="smbfs.o" + SAMBAFILES="\$(SAMBAFILES)" + fi + ]) + AC_SUBST(smbfs) + AC_SUBST(SAMBAFILES) + + dnl + dnl The termnet support + dnl + termnet=false + AC_ARG_WITH(termnet, + [--with-termnet If you want a termified net support],[ + if test x$withval = xyes; then + AC_DEFINE(USE_TERMNET) + termnet=true + fi + ]) + + TERMNET="" + AC_DEFINE(USE_VFS) + if $use_net_code; then + AC_DEFINE(USE_NETCODE) + fi + mcserv= + if test $have_socket = yes; then + mcserv="mcserv" + if $termnet; then + TERMNET="-ltermnet" + fi + fi + + AC_SUBST(TERMNET) + AC_SUBST(mcserv) + +dnl FIXME: +dnl GNOME_VFS_LIBS= + +]) + +AC_DEFUN([GNOME_VFS_CHECKS],[ + use_vfs=yes + AC_ARG_WITH(vfs, + [--with-vfs Compile with the VFS code], + use_vfs=$withval + ) + case $use_vfs in + yes) GNOME_WITH_VFS;; + no) use_vfs=no;; + *) use_vfs=no;; + dnl Should we issue a warning? + esac +]) + + diff --git a/apps/X11/InstallMgr/macros/gnome-x-checks.m4 b/apps/X11/InstallMgr/macros/gnome-x-checks.m4 new file mode 100644 index 0000000..1e397ef --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-x-checks.m4 @@ -0,0 +1,80 @@ +dnl GNOME_X_CHECKS +dnl +dnl Basic X11 related checks for X11. At the end, the following will be +dnl defined/changed: +dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK +dnl CPPFLAGS Will include $X_CFLAGS +dnl GNOME_HAVE_SM `true' or `false' depending on whether session +dnl management is available. It is available if +dnl both -lSM and X11/SM/SMlib.h exist. (Some +dnl Solaris boxes have the library but not the header) +dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" +dnl +dnl The following configure cache variables are defined (but not used): +dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} +dnl +AC_DEFUN([GNOME_X_CHECKS], +[ + AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) + dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could + dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" + dnl + dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses + dnl CPPFLAGS, not CFLAGS + CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" + + saved_ldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS $GTK_LIBS" + + gnome_cv_passdown_x_libs="$GTK_LIBS" + gnome_cv_passdown_X_LIBS="$GTK_LIBS" + gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" + gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" + + LDFLAGS="$saved_ldflags $GTK_LIBS" + +dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow. + USE_DEVGTK=true + +dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x]) +dnl AC_EGREP_CPP(answer_affirmatively, +dnl [#include <gtk/gtkfeatures.h> +dnl #ifdef GTK_HAVE_FEATURES_1_1_0 +dnl answer_affirmatively +dnl #endif +dnl ], dev_gtk=yes, dev_gtk=no) +dnl if test "$dev_gtk" = "yes"; then +dnl USE_DEVGTK=true +dnl fi +dnl AC_MSG_RESULT("$dev_gtk") + + GNOME_HAVE_SM=true + case "$GTK_LIBS" in + *-lSM*) + dnl Already found it. + ;; + *) + dnl Assume that if we have -lSM then we also have -lICE. + AC_CHECK_LIB(SM, SmcSaveYourselfDone, + [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, + $x_libs -lICE) + ;; + esac + + if test "$GNOME_HAVE_SM" = true; then + AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) + fi + + if test "$GNOME_HAVE_SM" = true; then + AC_DEFINE(HAVE_LIBSM) + fi + + XPM_LIBS="" + AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) + AC_SUBST(XPM_LIBS) + + AC_REQUIRE([GNOME_PTHREAD_CHECK]) + LDFLAGS="$saved_ldflags" + + AC_PROVIDE([GNOME_X_CHECKS]) +]) diff --git a/apps/X11/InstallMgr/macros/gnome-xml-check.m4 b/apps/X11/InstallMgr/macros/gnome-xml-check.m4 new file mode 100644 index 0000000..2410f35 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome-xml-check.m4 @@ -0,0 +1,30 @@ +dnl +dnl GNOME_XML_HOOK (script-if-xml-found, failflag) +dnl +dnl If failflag is "failure", script aborts due to lack of XML +dnl +dnl Check for availability of the libxml library +dnl the XML parser uses libz if available too +dnl + +AC_DEFUN([GNOME_XML_HOOK],[ + AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) + if test "$GNOME_CONFIG" = no; then + if test x$2 = xfailure; then + AC_MSG_ERROR(Could not find gnome-config) + fi + fi + AC_CHECK_LIB(xml, xmlNewDoc, [ + $1 + AC_SUBST(GNOME_XML_LIB) + GNOME_XML_LIB=`$GNOME_CONFIG --libs xml` + ], [ + if test x$2 = xfailure; then + AC_MSG_ERROR(Could not link sample xml program) + fi + ], `$GNOME_CONFIG --libs xml`) +]) + +AC_DEFUN([GNOME_XML_CHECK], [ + GNOME_XML_HOOK([],failure) +]) diff --git a/apps/X11/InstallMgr/macros/gnome.m4 b/apps/X11/InstallMgr/macros/gnome.m4 new file mode 100644 index 0000000..a3a9ca7 --- /dev/null +++ b/apps/X11/InstallMgr/macros/gnome.m4 @@ -0,0 +1,124 @@ +dnl +dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) +dnl +dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh +dnl is not found. +dnl + +AC_DEFUN([GNOME_INIT_HOOK],[ + AC_SUBST(GNOME_LIBS) + AC_SUBST(GNOMEUI_LIBS) + AC_SUBST(GNOMEGNORBA_LIBS) + AC_SUBST(GTKXMHTML_LIBS) + AC_SUBST(ZVT_LIBS) + AC_SUBST(GNOME_LIBDIR) + AC_SUBST(GNOME_INCLUDEDIR) + + AC_ARG_WITH(gnome-includes, + [ --with-gnome-includes Specify location of GNOME headers],[ + CFLAGS="$CFLAGS -I$withval" + ]) + + AC_ARG_WITH(gnome-libs, + [ --with-gnome-libs Specify location of GNOME libs],[ + LDFLAGS="$LDFLAGS -L$withval" + gnome_prefix=$withval + ]) + + AC_ARG_WITH(gnome, + [ --with-gnome Specify prefix for GNOME files], + if test x$withval = xyes; then + want_gnome=yes + dnl Note that an empty true branch is not + dnl valid sh syntax. + ifelse([$1], [], :, [$1]) + else + if test "x$withval" = xno; then + want_gnome=no + else + want_gnome=yes + LDFLAGS="$LDFLAGS -L$withval/lib" + CFLAGS="$CFLAGS -I$withval/include" + gnome_prefix=$withval/lib + fi + fi, + want_gnome=yes) + + if test "x$want_gnome" = xyes; then + + AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) + if test "$GNOME_CONFIG" = "no"; then + no_gnome_config="yes" + else + AC_MSG_CHECKING(if $GNOME_CONFIG works) + if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then + AC_MSG_RESULT(yes) + GNOME_GNORBA_HOOK([],$2) + GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" + GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" + GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" + GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" + ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" + GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" + GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" + $1 + else + AC_MSG_RESULT(no) + no_gnome_config="yes" + fi + fi + + if test x$exec_prefix = xNONE; then + if test x$prefix = xNONE; then + gnome_prefix=$ac_default_prefix/lib + else + gnome_prefix=$prefix/lib + fi + else + gnome_prefix=`eval echo \`echo $libdir\`` + fi + + if test "$no_gnome_config" = "yes"; then + AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) + if test -f $gnome_prefix/gnomeConf.sh; then + AC_MSG_RESULT(found) + echo "loading gnome configuration from" \ + "$gnome_prefix/gnomeConf.sh" + . $gnome_prefix/gnomeConf.sh + $1 + else + AC_MSG_RESULT(not found) + if test x$2 = xfail; then + AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) + fi + fi + fi + fi + + if test -n "$3"; then + n="$3" + for i in $n; do + AC_MSG_CHECKING(extra library \"$i\") + case $i in + applets) + AC_SUBST(GNOME_APPLETS_LIBS) + GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` + AC_MSG_RESULT($GNOME_APPLETS_LIBS);; + capplet) + AC_SUBST(GNOME_CAPPLET_LIBS) + GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` + AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; + *) + AC_MSG_RESULT(unknown library) + esac + done + fi +]) + +dnl +dnl GNOME_INIT ([additional-inits]) +dnl + +AC_DEFUN([GNOME_INIT],[ + GNOME_INIT_HOOK([],fail,$1) +]) diff --git a/apps/X11/InstallMgr/macros/linger.m4 b/apps/X11/InstallMgr/macros/linger.m4 new file mode 100644 index 0000000..dfa7c8a --- /dev/null +++ b/apps/X11/InstallMgr/macros/linger.m4 @@ -0,0 +1,28 @@ +dnl +dnl Check for struct linger +dnl +AC_DEFUN(AC_STRUCT_LINGER, [ +av_struct_linger=no +AC_MSG_CHECKING(struct linger is available) +AC_TRY_RUN([ +#include <sys/types.h> +#include <sys/socket.h> + +struct linger li; + +main () +{ + li.l_onoff = 1; + li.l_linger = 120; + exit (0); +} +],[ +AC_DEFINE(HAVE_STRUCT_LINGER) +av_struct_linger=yes +],[ +av_struct_linger=no +],[ +av_struct_linger=no +]) +AC_MSG_RESULT($av_struct_linger) +]) diff --git a/apps/X11/InstallMgr/macros/need-declaration.m4 b/apps/X11/InstallMgr/macros/need-declaration.m4 new file mode 100644 index 0000000..d5b7bc6 --- /dev/null +++ b/apps/X11/InstallMgr/macros/need-declaration.m4 @@ -0,0 +1,42 @@ +dnl See whether we need a declaration for a function. +dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES]) +AC_DEFUN(GCC_NEED_DECLARATION, +[AC_MSG_CHECKING([whether $1 must be declared]) +AC_CACHE_VAL(gcc_cv_decl_needed_$1, +[AC_TRY_COMPILE([ +#include <stdio.h> +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +$2], +[char *(*pfn) = (char *(*)) $1], +eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")]) +if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then + AC_MSG_RESULT(yes) + gcc_need_declarations="$gcc_need_declarations $1" + gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + AC_DEFINE_UNQUOTED($gcc_tr_decl) +else + AC_MSG_RESULT(no) +fi +])dnl + +dnl Check multiple functions to see whether each needs a declaration. +dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES]) +AC_DEFUN(GCC_NEED_DECLARATIONS, +[for ac_func in $1 +do +GCC_NEED_DECLARATION($ac_func, $2) +done +] +) diff --git a/apps/X11/InstallMgr/missing b/apps/X11/InstallMgr/missing new file mode 100755 index 0000000..7789652 --- /dev/null +++ b/apps/X11/InstallMgr/missing @@ -0,0 +1,190 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard <pinard@iro.umontreal.ca>, 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. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +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 + +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 + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. 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.in` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + 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 + ;; + + 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 + ;; + + makeinfo) + 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 + ;; + + *) + 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 diff --git a/apps/X11/InstallMgr/mkinstalldirs b/apps/X11/InstallMgr/mkinstalldirs new file mode 100755 index 0000000..51d276b --- /dev/null +++ b/apps/X11/InstallMgr/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 1999/12/21 08:19:13 scribe Exp $ + +errstatus=0 + +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 + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/apps/X11/InstallMgr/pixmaps/arrow2r.xpm b/apps/X11/InstallMgr/pixmaps/arrow2r.xpm new file mode 100644 index 0000000..e58b852 --- /dev/null +++ b/apps/X11/InstallMgr/pixmaps/arrow2r.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * arrow2r_xpm[] = { +"16 16 6 1", +" c None", +". c #0000FF", +"+ c #D3D3DD", +"@ c #FF0000", +"# c #000080", +"$ c #7F7F7F", +"..++++++++++++++", +"+...++++++++++++", +"+.....++++++++++", +"++......++++++++", +"+++.......++++++", +"+++.........++++", +"++++..........++", +"@@@@@@@@@@@@@@@@", +"++++##########$+", +"+++#########$+++", +"++$#######$+++++", +"++######$+++++++", +"+#####$+++++++++", +"$###$+++++++++++", +"##$+++++++++++++", +"++++++++++++++++"}; diff --git a/apps/X11/InstallMgr/pixmaps/filenew.xpm b/apps/X11/InstallMgr/pixmaps/filenew.xpm new file mode 100644 index 0000000..2abd4bf --- /dev/null +++ b/apps/X11/InstallMgr/pixmaps/filenew.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * filenew_xpm[] = { +"16 16 6 1", +" c None", +". c #FFFF00", +"+ c #D3D3DD", +"@ c #000000", +"# c #FFFFFF", +"$ c #7F7F7F", +".++++++.+++++++.", +"+..++++..++++..+", +"++.@@@@@@+++..++", +"+++@####@@+..+++", +"+++@####@#@.++++", +"+++@####@##@++++", +"+++@####@@@@@+++", +"+..@########@...", +"...@########@..+", +"+++@########@$++", +"+++@########@$++", +"+++@########@$++", +"+++@########@$++", +"++.@@@@@@@@@@.++", +"+..+$$$..$$$$..+", +"++++++++.++++++."}; diff --git a/apps/X11/InstallMgr/pixmaps/globe.xpm b/apps/X11/InstallMgr/pixmaps/globe.xpm new file mode 100644 index 0000000..84f772f --- /dev/null +++ b/apps/X11/InstallMgr/pixmaps/globe.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * globe_xpm[] = { +"16 16 5 1", +" c None", +". c #D3D3DD", +"+ c #0000FF", +"@ c #000080", +"# c #808000", +".....+@+++......", +"...##++@+@++....", +"..####++#+##+...", +".@+#########++..", +".+++++######@+..", +"+++##++@###++@+.", +"@++########+@+@.", +"+@######+#+@+++.", +"@++#####+++@@@+.", +"+++++###+++@+@@.", +".@+++###@@@@##..", +".@+@+##@+@+@##..", +"..@+@##@@@@@@...", +"...@+@@@+@@@....", +".....@@+@+......", +"................"}; diff --git a/apps/X11/InstallMgr/pixmaps/sword.xpm b/apps/X11/InstallMgr/pixmaps/sword.xpm new file mode 100644 index 0000000..7b4b67f --- /dev/null +++ b/apps/X11/InstallMgr/pixmaps/sword.xpm @@ -0,0 +1,875 @@ +/* XPM */ +static char * sword_xpm[] = { +"254 100 772 2", +" c None", +". c #CCCDCC", +"+ c #CDCECD", +"@ c #CECFCE", +"# c #585858", +"$ c #4A4A4A", +"% c #919291", +"& c #9A9B9A", +"* c #040404", +"= c #000000", +"- c #1D1D1D", +"; c #B7B8B7", +"> c #CECECE", +", c #8D8E8D", +"' c #050505", +") c #A5A6A5", +"! c #757675", +"~ c #444544", +"{ c #373737", +"] c #848584", +"^ c #C8C9C8", +"/ c #2D2D2D", +"( c #0B0B0B", +"_ c #AEAFAE", +": c #A8A9A8", +"< c #5A5B5A", +"[ c #767676", +"} c #121212", +"| c #B8B9B8", +"1 c #7B7C7B", +"2 c #AFB0AF", +"3 c #3A3B3A", +"4 c #6D6D6D", +"5 c #797A79", +"6 c #121312", +"7 c #BEBFBE", +"8 c #A3A4A3", +"9 c #1E1E1E", +"0 c #5D5D5D", +"a c #373837", +"b c #060606", +"c c #464746", +"d c #404040", +"e c #5C5C5C", +"f c #7B7B7B", +"g c #B6B7B6", +"h c #323232", +"i c #696969", +"j c #C3C4C3", +"k c #959595", +"l c #232323", +"m c #838383", +"n c #B9BAB9", +"o c #696A69", +"p c #BBBCBB", +"q c #8C8C8C", +"r c #969796", +"s c #707070", +"t c #646464", +"u c #6E6E6E", +"v c #C4C5C4", +"w c #A7A8A7", +"x c #101010", +"y c #4B4B4B", +"z c #C7C8C7", +"A c #131313", +"B c #BDBEBD", +"C c #2B2B2B", +"D c #1F1F1F", +"E c #8A8B8A", +"F c #7F7F7F", +"G c #242524", +"H c #020202", +"I c #828382", +"J c #CDCFCD", +"K c #494949", +"L c #3B3B3B", +"M c #535353", +"N c #686968", +"O c #161616", +"P c #B0B1B0", +"Q c #0F0F0F", +"R c #9FA09F", +"S c #4F4F4F", +"T c #1B1B1B", +"U c #B3B4B3", +"V c #ADAEAD", +"W c #0C0C0C", +"X c #1A1A1A", +"Y c #9B9B9B", +"Z c #4C4C4C", +"` c #505050", +" . c #494A49", +".. c #606060", +"+. c #989998", +"@. c #1C1C1C", +"#. c #151515", +"$. c #717171", +"%. c #747574", +"&. c #818281", +"*. c #424242", +"=. c #878787", +"-. c #393A39", +";. c #CACBCA", +">. c #A0A1A0", +",. c #070707", +"'. c #292A29", +"). c #9C9D9C", +"!. c #090909", +"~. c #222222", +"{. c #B1B2B1", +"]. c #787878", +"^. c #414241", +"/. c #414141", +"(. c #717271", +"_. c #B2B3B2", +":. c #090A09", +"<. c #BCBDBC", +"[. c #171717", +"}. c #565656", +"|. c #C0C1C0", +"1. c #939493", +"2. c #393939", +"3. c #C2C2C2", +"4. c #797979", +"5. c #A4A5A4", +"6. c #636363", +"7. c #525252", +"8. c #C2C3C2", +"9. c #6B6B6B", +"0. c #898989", +"a. c #A1A2A1", +"b. c #505150", +"c. c #8E8F8E", +"d. c #272827", +"e. c #010101", +"f. c #9B9C9B", +"g. c #515251", +"h. c #121412", +"i. c #939393", +"j. c #949494", +"k. c #3D3D3D", +"l. c #4C4D4C", +"m. c #080808", +"n. c #2B2C2B", +"o. c #BABABA", +"p. c #B7B7B7", +"q. c #ABACAB", +"r. c #9FA19F", +"s. c #B0B0B0", +"t. c #707170", +"u. c #BFC0BF", +"v. c #878887", +"w. c #565856", +"x. c #323532", +"y. c #303330", +"z. c #333533", +"A. c #383738", +"B. c #3B3A3B", +"C. c #3E3D3E", +"D. c #373937", +"E. c #393B39", +"F. c #7E807E", +"G. c #939593", +"H. c #303030", +"I. c #282728", +"J. c #282828", +"K. c #656765", +"L. c #828482", +"M. c #868886", +"N. c #8A8A8A", +"O. c #8A8C8A", +"P. c #A0A2A0", +"Q. c #969896", +"R. c #8E908E", +"S. c #929292", +"T. c #939293", +"U. c #949594", +"V. c #979797", +"W. c #BEBEBE", +"X. c #838283", +"Y. c #A09FA0", +"Z. c #A0A0A0", +"`. c #8C8A8C", +" + c #A9ABA9", +".+ c #9A9C9A", +"++ c #909090", +"@+ c #949294", +"#+ c #949394", +"$+ c #949694", +"%+ c #9A999A", +"&+ c #A7A6A7", +"*+ c #CBCCCB", +"=+ c #C0BFC0", +"-+ c #C4C3C4", +";+ c #C3C2C3", +">+ c #BDBDBD", +",+ c #C6C6C6", +"'+ c #CBCBCB", +")+ c #D0D0D0", +"!+ c #D2D2D2", +"~+ c #D2D3D2", +"{+ c #D6D5D6", +"]+ c #D6D6D6", +"^+ c #D6D7D6", +"/+ c #D7D8D7", +"(+ c #E4E1E4", +"_+ c #E6E2E6", +":+ c #E6E5E6", +"<+ c #E6E6E6", +"[+ c #E9E6E9", +"}+ c #E0DEE0", +"|+ c #E0E0E0", +"1+ c #D8D9D8", +"2+ c #302F30", +"3+ c #5F605F", +"4+ c #676767", +"5+ c #383838", +"6+ c #383B38", +"7+ c #7B7D7B", +"8+ c #666866", +"9+ c #434543", +"0+ c #494849", +"a+ c #494B49", +"b+ c #494C49", +"c+ c #4D4E4D", +"d+ c #515051", +"e+ c #515151", +"f+ c #515451", +"g+ c #7A7C7A", +"h+ c #595C59", +"i+ c #5B5D5B", +"j+ c #626062", +"k+ c #626162", +"l+ c #626362", +"m+ c #626462", +"n+ c #666666", +"o+ c #6A686A", +"p+ c #6F6E6F", +"q+ c #727072", +"r+ c #727372", +"s+ c #727472", +"t+ c #7A787A", +"u+ c #7A797A", +"v+ c #7A7B7A", +"w+ c #808180", +"x+ c #A1A0A1", +"y+ c #8C8B8C", +"z+ c #8C8D8C", +"A+ c #8C8E8C", +"B+ c #9C9A9C", +"C+ c #AAAAAA", +"D+ c #B9BBB9", +"E+ c #C9C9C9", +"F+ c #ADABAD", +"G+ c #ADADAD", +"H+ c #B3B1B3", +"I+ c #B5B2B5", +"J+ c #B5B4B5", +"K+ c #B5B6B5", +"L+ c #BCB9BC", +"M+ c #BDBABD", +"N+ c #C1C0C1", +"O+ c #C6C3C6", +"P+ c #C7C4C7", +"Q+ c #CDCDCD", +"R+ c #D2D1D2", +"S+ c #D6D3D6", +"T+ c #D7D7D7", +"U+ c #DDDADD", +"V+ c #DEDBDE", +"W+ c #DEDDDE", +"X+ c #DEDFDE", +"Y+ c #E2E0E2", +"Z+ c #E7E3E7", +"`+ c #E7E6E7", +" @ c #E7E7E7", +".@ c #ECE9EC", +"+@ c #EFEBEF", +"@@ c #EFECEF", +"#@ c #EFEEEF", +"$@ c #EFEFEF", +"%@ c #E6E4E6", +"&@ c #D5D5D5", +"*@ c #B7B9B7", +"=@ c #3F423F", +"-@ c #2A2C2A", +";@ c #484748", +">@ c #989898", +",@ c #C6C7C6", +"'@ c #999A99", +")@ c #1F1E1F", +"!@ c #393839", +"~@ c #9EA09E", +"{@ c #4E504E", +"]@ c #5C5E5C", +"^@ c #6E706E", +"/@ c #929492", +"(@ c #ACADAC", +"_@ c #C1C1C1", +":@ c #C1C2C1", +"<@ c #9B9D9B", +"[@ c #747674", +"}@ c #898889", +"|@ c #8D8D8D", +"1@ c #959795", +"2@ c #A9AAA9", +"3@ c #ADACAD", +"4@ c #9C9C9C", +"5@ c #A2A4A2", +"6@ c #BBBDBB", +"7@ c #C9CAC9", +"8@ c #C0BEC0", +"9@ c #C5C2C5", +"0@ c #CFCFCF", +"a@ c #D1D2D1", +"b@ c #D3D4D3", +"c@ c #D5D6D5", +"d@ c #DADADA", +"e@ c #DAD9DA", +"f@ c #DBDADB", +"g@ c #D8D8D8", +"h@ c #DBDCDB", +"i@ c #DCDCDC", +"j@ c #EBE8EB", +"k@ c #EEEAEE", +"l@ c #F0EFF0", +"m@ c #F4F0F4", +"n@ c #E8E6E8", +"o@ c #D4D4D4", +"p@ c #3C3D3C", +"q@ c #282B28", +"r@ c #8B8D8B", +"s@ c #4E4F4E", +"t@ c #161716", +"u@ c #3A393A", +"v@ c #4A494A", +"w@ c #AFB1AF", +"x@ c #979897", +"y@ c #807E80", +"z@ c #848684", +"A@ c #929192", +"B@ c #AEAEAE", +"C@ c #9C9B9C", +"D@ c #9C9E9C", +"E@ c #B2B4B2", +"F@ c #C7C7C7", +"G@ c #D5D4D5", +"H@ c #D1D1D1", +"I@ c #F6F2F6", +"J@ c #F7F3F7", +"K@ c #A3A3A3", +"L@ c #282928", +"M@ c #545354", +"N@ c #AEB0AE", +"O@ c #A9A9A9", +"P@ c #A5A5A5", +"Q@ c #918F91", +"R@ c #848284", +"S@ c #929392", +"T@ c #BABBBA", +"U@ c #A3A2A3", +"V@ c #B3B5B3", +"W@ c #CFD0CF", +"X@ c #D9D9D9", +"Y@ c #E8E7E8", +"Z@ c #EEEBEE", +"`@ c #292829", +" # c #4D4C4D", +".# c #858685", +"+# c #838183", +"@# c #848384", +"## c #AFAEAF", +"$# c #C9C8C9", +"%# c #E1E0E1", +"&# c #EEEEEE", +"*# c #292C29", +"=# c #262626", +"-# c #2A292A", +";# c #A2A2A2", +"># c #8D8F8D", +",# c #8F8F8F", +"'# c #C7C9C7", +")# c #5C5F5C", +"!# c #B8B8B8", +"~# c #595A59", +"{# c #757475", +"]# c #959695", +"^# c #979597", +"/# c #B7B6B7", +"(# c #C7C5C7", +"_# c #D3D1D3", +":# c #212421", +"<# c #6A6D6A", +"[# c #414441", +"}# c #8E8E8E", +"|# c #7E7D7E", +"1# c #595959", +"2# c #747374", +"3# c #7B797B", +"4# c #B4B3B4", +"5# c #B7B5B7", +"6# c #C2C0C2", +"7# c #CCCCCC", +"8# c #252825", +"9# c #202320", +"0# c #686868", +"a# c #595859", +"b# c #818481", +"c# c #6F706F", +"d# c #7D7B7D", +"e# c #888788", +"f# c #7D7E7D", +"g# c #A5A3A5", +"h# c #A3A5A3", +"i# c #ADAAAD", +"j# c #E9E7E9", +"k# c #F2EFF2", +"l# c #474847", +"m# c #505350", +"n# c #525552", +"o# c #BCBEBC", +"p# c #B0B2B0", +"q# c #6B6D6B", +"r# c #6D6E6D", +"s# c #9D9D9D", +"t# c #A4A6A4", +"u# c #8F8E8F", +"v# c #9B9A9B", +"w# c #D4D2D4", +"x# c #202020", +"y# c #434643", +"z# c #A6A8A6", +"A# c #868686", +"B# c #5B5A5B", +"C# c #6A6C6A", +"D# c #7F807F", +"E# c #737573", +"F# c #AFAFAF", +"G# c #A4A4A4", +"H# c #B3B3B3", +"I# c #ACA9AC", +"J# c #D1D0D1", +"K# c #565556", +"L# c #201F20", +"M# c #414041", +"N# c #7C7E7C", +"O# c #585B58", +"P# c #5D605D", +"Q# c #767576", +"R# c #676967", +"S# c #787778", +"T# c #6A6B6A", +"U# c #7E7F7E", +"V# c #B4B4B4", +"W# c #BEC0BE", +"X# c #BCBCBC", +"Y# c #A6A6A6", +"Z# c #D9D8D9", +"`# c #DFDEDF", +" $ c #3A3C3A", +".$ c #6C6B6C", +"+$ c #595B59", +"@$ c #C5C7C5", +"#$ c #AAABAA", +"$$ c #999B99", +"%$ c #ADAFAD", +"&$ c #6A696A", +"*$ c #969596", +"=$ c #727172", +"-$ c #737373", +";$ c #A4A2A4", +">$ c #CACACA", +",$ c #EAE6EA", +"'$ c #E1E1E1", +")$ c #575857", +"!$ c #969696", +"~$ c #B1B3B1", +"{$ c #858585", +"]$ c #616461", +"^$ c #7C7C7C", +"/$ c #696869", +"($ c #6C6A6C", +"_$ c #747274", +":$ c #737173", +"<$ c #9D9B9D", +"[$ c #BFBFBF", +"}$ c #CECCCE", +"|$ c #CECDCE", +"1$ c #E1DFE1", +"2$ c #EAEAEA", +"3$ c #BDBFBD", +"4$ c #5C5B5C", +"5$ c #ACACAC", +"6$ c #484848", +"7$ c #686768", +"8$ c #909290", +"9$ c #646564", +"0$ c #B1B0B1", +"a$ c #BDBCBD", +"b$ c #CECBCE", +"c$ c #1C1D1C", +"d$ c #2E2D2E", +"e$ c #5A5D5A", +"f$ c #3F3F3F", +"g$ c #424142", +"h$ c #888888", +"i$ c #B2B2B2", +"j$ c #B1AFB1", +"k$ c #A5A2A5", +"l$ c #BDBBBD", +"m$ c #EDEAED", +"n$ c #EAE8EA", +"o$ c #4B4C4B", +"p$ c #232223", +"q$ c #989A98", +"r$ c #393C39", +"s$ c #4C4F4C", +"t$ c #5E5D5E", +"u$ c #919091", +"v$ c #626262", +"w$ c #8D8C8D", +"x$ c #B4B5B4", +"y$ c #BAB9BA", +"z$ c #B6B4B6", +"A$ c #CDCACD", +"B$ c #E0E1E0", +"C$ c #EAE7EA", +"D$ c #7A7A7A", +"E$ c #848484", +"F$ c #575657", +"G$ c #575A57", +"H$ c #6B696B", +"I$ c #A4A1A4", +"J$ c #212021", +"K$ c #323132", +"L$ c #C5C6C5", +"M$ c #737473", +"N$ c #AAACAA", +"O$ c #616061", +"P$ c #ABADAB", +"Q$ c #9E9F9E", +"R$ c #B9B9B9", +"S$ c #3A3A3A", +"T$ c #5A595A", +"U$ c #8F908F", +"V$ c #898A89", +"W$ c #878987", +"X$ c #605F60", +"Y$ c #BBBBBB", +"Z$ c #A1A1A1", +"`$ c #CDCCCD", +" % c #E3E3E3", +".% c #C3C3C3", +"+% c #424542", +"@% c #5E615E", +"#% c #6F6F6F", +"$% c #717371", +"%% c #767476", +"&% c #C8C7C8", +"*% c #2B2A2B", +"=% c #535653", +"-% c #9F9F9F", +";% c #ABAAAB", +">% c #C8C6C8", +",% c #C6C4C6", +"'% c #E0DFE0", +")% c #6E6F6E", +"!% c #6A6A6A", +"~% c #807F80", +"{% c #A9A8A9", +"]% c #A7A7A7", +"^% c #B5B3B5", +"/% c #D0D1D0", +"(% c #E2E1E2", +"_% c #363636", +":% c #3E413E", +"<% c #5E5E5E", +"[% c #7D7F7D", +"}% c #5F5F5F", +"|% c #979697", +"1% c #919391", +"2% c #BFBEBF", +"3% c #C6C5C6", +"4% c #D8D7D8", +"5% c #C1C3C1", +"6% c #4F504F", +"7% c #818181", +"8% c #636463", +"9% c #5D5F5D", +"0% c #ACAEAC", +"a% c #808080", +"b% c #636563", +"c% c #A6A5A6", +"d% c #AEABAE", +"e% c #CAC9CA", +"f% c #D7D6D7", +"g% c #DEDEDE", +"h% c #171817", +"i% c #5B5B5B", +"j% c #818381", +"k% c #A7A9A7", +"l% c #706E70", +"m% c #939193", +"n% c #A5A7A5", +"o% c #B8B6B8", +"p% c #DCD9DC", +"q% c #D9DAD9", +"r% c #111511", +"s% c #0E0F0E", +"t% c #8B8C8B", +"u% c #767876", +"v% c #757575", +"w% c #626562", +"x% c #666966", +"y% c #828182", +"z% c #8A898A", +"A% c #A6A7A6", +"B% c #DDDDDD", +"C% c #080C08", +"D% c #616361", +"E% c #353635", +"F% c #9D9F9D", +"G% c #343534", +"H% c #3C3C3C", +"I% c #676A67", +"J% c #888A88", +"K% c #B1B1B1", +"L% c #9F9E9F", +"M% c #979997", +"N% c #C1BFC1", +"O% c #070B07", +"P% c #303430", +"Q% c #1C1E1C", +"R% c #404340", +"S% c #434243", +"T% c #383938", +"U% c #5A5A5A", +"V% c #636263", +"W% c #757775", +"X% c #878587", +"Y% c #A5A4A5", +"Z% c #BCBBBC", +"`% c #DCDADC", +" & c #111211", +".& c #2D302D", +"+& c #181C18", +"@& c #313431", +"#& c #797C79", +"$& c #4A4D4A", +"%& c #868486", +"&& c #B5B5B5", +"*& c #AAA8AA", +"=& c #111111", +"-& c #070907", +";& c #090C09", +">& c #838483", +",& c #171B17", +"'& c #656465", +")& c #8B8B8B", +"!& c #A4A3A4", +"~& c #BEBDBE", +"{& c #353835", +"]& c #353535", +"^& c #191C19", +"/& c #737673", +"(& c #3D3F3D", +"_& c #6C6D6C", +":& c #7E7C7E", +"<& c #969496", +"[& c #AEACAE", +"}& c #C0C0C0", +"|& c #141514", +"1& c #4E4E4E", +"2& c #D5D2D5", +"3& c #222522", +"4& c #B4B6B4", +"5& c #363936", +"6& c #181818", +"7& c #767776", +"8& c #303230", +"9& c #3E403E", +"0& c #BABCBA", +"a& c #999999", +"b& c #7F817F", +"c& c #919191", +"d& c #C4C4C4", +"e& c #B9B8B9", +"f& c #141414", +"g& c #464946", +"h& c #040604", +"i& c #252925", +"j& c #585958", +"k& c #0F130F", +"l& c #121512", +"m& c #464846", +"n& c #707270", +"o& c #706F70", +"p& c #818081", +"q& c #B4B1B4", +"r& c #676567", +"s& c #CBCACB", +"t& c #C8C8C8", +"u& c #484948", +"v& c #0F100F", +"w& c #0F120F", +"x& c #202420", +"y& c #B6B6B6", +"z& c #6D6F6D", +"A& c #A8AAA8", +"B& c #444344", +"C& c #444444", +"D& c #464646", +"E& c #555755", +"F& c #393D39", +"G& c #3A3D3A", +"H& c #9A9A9A", +"I& c #A2A3A2", +"J& c #333433", +"K& c #C5C5C5", +"L& c #434343", +"M& c #888988", +"N& c #242424", +"O& c #868786", +"P& c #0C0D0C", +"Q& c #2A2A2A", +"R& c #1F201F", +"S& c #606160", +"T& c #5E5F5E", +"U& c #323332", +"V& c #6B6C6B", +"W& c #656565", +"X& c #2E2F2E", +"Y& c #212221", +"Z& c #909190", +"`& c #0B0C0B", +" * c #2C2C2C", +".* c #0E0E0E", +"+* c #ABABAB", +"@* c #333333", +"#* c #535453", +"$* c #747474", +"%* c #303130", +"&* c #2F2F2F", +"** c #525352", +"=* c #262726", +"-* c #575757", +";* c #252525", +">* c #343434", +",* c #787978", +"'* c #030303", +")* c #1D1E1D", +"!* c #777877", +"~* c #5B5C5B", +"{* c #424342", +"]* c #191919", +"^* c #616261", +"/* c #0D0D0D", +"(* c #292929", +"_* c #2C2D2C", +":* c #2A2B2A", +"<* c #3D3E3D", +"[* c #3E3F3E", +"}* c #191A19", +"|* c #4A4B4A", +"1* c #0A0A0A", +"2* c #9D9E9D", +"3* c #727272", +"4* c #4D4D4D", +"5* c #6C6C6C", +"6* c #3B3C3B", +"7* c #2F302F", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + . . . . . . + + + + + . + + + + + + . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . + + + + + + + . + + + + + + + + . . . . + + + + + . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . + + + + + + + + + + + + + + + + + + + + + . . . . . + . . . . . . + + + + + . . + + + + + . . + + + + + . . + + + + + . + + + + + + + + + + . . + + + ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # $ $ % + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + & * = - ; + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + @ @ @ @ @ @ @ > @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , = ' ) + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ + + + + ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ! = ~ + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ + + + + ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { = ] + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^ / ( + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ = ( + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : = < + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # = [ + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } = | + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 = = | + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 + + 5 = 6 7 + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 8 = = 9 0 0 0 0 0 a = = b b b b b b = c + + 5 = d + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 8 = e + + + + + + f = = g + + + + . h c + + i = d + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 8 = j + + + + + + f = = g + + + + + k c + + l = m + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + > @ @ @ @ @ @ @ @ @ + + + + + + + n o ^ + + + + + + f = = g + + + + + p q + + l = r + + + + ^ s t t u + + + + v w t x y q + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + + l = r + + + z $ = = = A + + + B C D E F G H I + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + + l = r + + + K L M = = A + + + N = [ + + j O b w + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + P Q * R + + S T U z = = A + + V = W + + + + X = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + + V ( _ + ^ = = A + + V = Z + + + + X = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + + ` .+ + ^ = = A + + ..= P + + + +.H = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + > > @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + 5 @.7 + + ^ = = A + + ~ = n + + g S = = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + #.$.+ + + ^ = = A + + = = %.&...A = *.0 v + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + % = D =.-.;.+ + + ^ = = @.+ >.= ,.O '.4 ).j . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = !.~.8 + + + + {.= = i + ].= ^.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = = /.+ + + + + (.= = _.+ ].= :.<.+ + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = = r + + + + v [.= }.@ + ].= = n + + + + + ) K + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + > @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = [.|.+ + + + 1.= 2.3.@ + | = = 4.+ + + + + ) K + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ > @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = K + + + + . /.H 5.+ @ + + b = 6.+ + + + + 7.S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + 8.3 = = 9.+ + + + + + + + ~ = 0.+ + + + a.= b.+ + @ + + c.= l E + + + 1 / B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + 9.d.d.9 = = = e.d.d.d.f.+ + + + g.h.i.j.2 + + k.O <.+ + @ + + z l.= m.d.d.d.n.7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ o.p.p.q.r.r.s.|.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + r t.u.z z z z 8.t.t.t.{.+ ;.v.w.x.y.z.A.B.C.C.D.E.F.+ + @ + + + G.H.I.I.J.K.L.M.N.N.N.E O.P.+ + + + + Q.R.R.S.T.T.i.G.G.U.V.V.V.& + + + + + W.X.).).).Y.Z.Z.>.P.P.a.`.@ @ @ @ @ @ @ + U +.+R.++@+@+#+U.$+$+%+&+p.z + @ @ @ @ @ @ @ @ @ @ @ @ *+p p p W.=+=+=+|.|.|.-+-+;+>+|.v ,+'+. + @ @ @ @ @ @ @ @ @ @ @ @ @ )+!+~+~+~+{+{+{+]+^+^+/+(+_+_+:+<+<+[+}+}+}+|+1+~+@ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + n s 2+H.3+r.r.a.4+A.A.5+6+7++ + @ + + + 8+9+0+0+K a+b+b+c+d+d+e+f+g++ + + + + N h+h+i+j+j+k+l+m+m+n+o+o+p++ + + + + B q+r+s+s+%.t+t+u+v+g+g+w+@ @ @ @ @ @ u.x+`.y+z+A+A+++@+@+#+U.$+$+%+B+B+C+D+. @ @ @ @ @ @ @ @ @ @ E+F+G+V V H+I+I+J+K+K+p.L+M+M+>+B B N+O+P+Q+@ @ @ @ @ @ @ @ @ @ @ @ R+S+{+^+^+T+U+V+V+W+X+X+Y+Z+Z+Z+`+ @ @.@+@+@@@#@$@<+%@&@@ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + *@=@-@;@>@,@+ + . '@)@!@A.5+7++ + @ + + + |.~@i+K 0+K a+b+b+{@k+0.B 8.+ + + + + |.7 7 r.]@j+j+k+l+^@/@(@|._@+ + + + + *+:@7 f.<@[@%.t+t+u+&. +j @ @ @ @ + <@M.}@`.`.|@1@2@ +3@G+G+V +1@$+%+B+B+4@5@6@+ @ @ @ @ @ @ @ @ + 7@^ p g V H+I+I+J+u.|.3.8@M+M+>+B B N+9@P+Q+@ @ @ @ @ @ @ @ @ @ @ @ 0@0@a@b@c@T+U+V+V+d@^+^+e@f@!+g@h@h@i@j@k@+@@@#@$@l@m@n@o@@ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + 8.p@q@q@r@+ + + ^ s@t@P =.u@A.f + + @ + + + + + + r@v@0+K a+b+w@+ + + + + + + + + + + + + <@i+j+j+k+x@+ + + + + + + + + + + + + + {.s+%.t+y@'++ + @ @ @ ;.%+] z@z@A@B@+ @ @ @ @ @ @ @ @ @ n : C@B+B+4@D@E@+ @ @ @ @ @ @ @ @ @ @ @ @ {.V H+I+I+*+@ @ @ @ + F@:@B B N+O+P+Q+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ b@^+T+U+V+G@@ @ @ @ @ @ @ @ @ @ H@f@[+@@#@$@l@I@J@[+H@@ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + K@I.L@=@v + + + s@O q.+ + M@A.f + + @ + + + + + + + ]@0+0+K < ^ + + + + + + + + + + + + + N@h+i+j+j+O@+ + + + + + + + + + + + + + |.s+s+%.P@+ + + @ @ ^ Q@R@R@] S@z @ @ @ @ @ @ @ @ @ @ @ @ @ T@U@B+B+4@D@V@@ @ @ @ @ @ @ @ @ @ @ @ :@V V H+I+*+@ @ @ @ @ @ @ 7@7 B N+O+P+Q+@ @ @ @ @ @ @ @ @ @ @ @ @ @ W@^+^+T+U+G@@ @ @ @ @ @ @ @ @ @ @ @ 0@X@Y@$@$@l@I@J@Z@a@@ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + b.I.`@q + + + + |@(@+ + + 1 A.f + + @ + + + + + + + ~@9+0+0+ #,@+ + + + + + + + + + + + + N@h+h+i+j+P@+ + + + + + + + + + + + + + |.r+s+.#. + + + @ *+$+F +#@##+z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ E+##B+B+4@D@V@+ @ @ @ @ @ @ @ @ @ @ . _.V V H+*+@ @ @ @ @ @ @ @ *+7 B N+9@$#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ o@]+^+T+o@@ @ @ @ @ @ @ @ @ @ @ @ @ @ W@%#&#$@l@I@J@Z@H@@ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + *#=#-#;#+ + + + + + + + + >#< ,#+ + @ + + + + + + + '#)#9+0+0+!#+ + + + + + + + + + + + + K@~#h+h+i+{#7@+ + + + + + + + + + + + + p.q+r+r.+ + + + ;.]#7+7+F ^#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ J+B+B+4@D@U @ @ @ @ @ @ @ @ @ @ @ /#G+V V *+@ @ @ @ @ @ @ @ @ v B B N+(#+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ _#{+^+^+a@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ h@&#$@l@I@J@%@@ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + q@:#=#q + + + + + + + + + + + + + + @ + + + + + + + + <#[#9+0+}#+ + + + + + + + + + + + + |#1#~#h+h+i+w + + + + + + + + + + + + + %+q+2#o.+ + + + s.3#1 7+7+z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + 4#B+B+4@D@B @ @ @ @ @ @ @ @ @ @ 5#F+V V *+@ @ @ @ @ @ @ @ @ . >+B B 6#7#@ @ @ @ @ @ @ @ @ @ @ @ @ @ _#S+{+^+a@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ i@$@$@l@I@I@X@@ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + E@8#9#:#l++ + + + + + + + + + + + + + @ + + + + + + + + 5.[#[#9+.#+ + + + + + + + + + + + ,@0#a#1#~#h+h+b#+ + + + + + + + + + + + + c#q+d#+ + + + . e#3#3#f#_.+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 7@g#B+B+4@h#. @ @ @ @ @ @ @ @ @ 5#i#F+G+*+@ @ @ @ @ @ @ @ @ + M+>+B B *+@ @ @ @ @ @ @ @ @ @ @ @ @ @ _#S+S+{+a@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@j##@$@l@I@k#!++ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + J.9#9#*#P + + + + + + + + + + + + + @ + + + + + + + + {.l#[#[#m#+ + + + + + + + + + + + {.n## a#a#~#h+h+o#+ + + + + + + + + + + p#q#r#s#+ + + + t#%.t+3#u#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ |.v#B+B+4@p @ @ @ @ @ @ @ @ @ 5#i#i#F+*+@ @ @ @ @ @ @ @ @ + M+M+>+B *+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#S+S+H@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ e@@@$@$@l@I@%#+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + J.x#9#9#a+v + + + + + + + + + + + + @ + + + + + + + + + p+^.[#y#z#+ + + + + + + + + + + O.f+n#A#B#1#~#h+'@+ + + + + + + + + + + S@C#C#7 + + + . D#E#%.u+F#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 8 %+B+B+G#*+@ @ @ @ @ @ @ @ H#I#i#i#'+@ @ @ @ @ @ @ @ @ + L+M+M+>+*+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#S+J#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 0@[+@@#@$@l@m@W@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + K#L#x#9#9#8+8.+ + + + + + + + + + + @ + + + + + + + + + H#M#^.[#N#+ + + + + + + + + + + O#f+P#+ Q#a#a#~#R#z + + + + + + + + + E+S#T#U#7@+ + + V#r+E#E#] @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W#$+%+B+B+X#@ @ @ @ @ @ @ @ {.Y#I#i#'+@ @ @ @ @ @ @ @ @ *+p.L+M+6#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#J#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Z#+@@@#@$@l@`#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + C+L#L#x#9#9# $D@+ + + + + + + + + + @ + + + + + + + + + . .$M#^.+$@$+ + + + + + + + + #$M f+$$+ $$# a#a#+$%$+ + + + + + + + + K+o+&$+.+ + + + *$=$-$E#2 @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ . 5@$+%+B+;$@ @ @ @ @ @ @ @ {.) Y#I#'+@ @ @ @ @ @ @ @ @ j K+p.M+>$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ > @ @ @ )+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ,$+@@@$@$@'$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + . )$L#L#x#9#9#8## #$. + + + + + + + @ + + + + + + + + + + !$M#/.^.~$+ + + + + + + + + {$d+e+p + *+]$# a#1#^$. + + + + + + + + E /$($K++ + + j _$q+:$-$z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ z#$+$+%+<$v @ @ @ @ @ @ @ {.) ) Y#;.@ @ @ @ @ @ @ @ + >+K+K+[$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 1$+@+@@@#@2$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + 3$^.L#L#x#9#9#:#=#4$5$+ + + + + + @ + + + + + + + + + + n 6$M#M#r#+ + + + + + + + z l+d+7$z + + 8$n## a#a#U + + + + + + + '#^@9$S#+ + + + 8.r#q+:$e#*+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Y#U.$+$+%+X#@ @ @ @ @ @ @ 0$P@) ) ;.@ @ @ @ @ @ @ + a$I+J+B + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]+.@+@+@@@2$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + 7 c$L#L#x#9#9#:#=#d$0 B@+ + + + @ + + + + + + + + + + + e$f$M#g$+ + + + + + + + U b+c+h$+ + + <.f+n## a#,#+ + + + + + + i$m+m+'@+ + + + 8.C#r#:$A@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ o.#+$+$+$+p @ @ @ @ @ @ @ j$k$P@) ;.@ @ @ @ @ *+|._.H+I+l$+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }$b$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ~+ @m$+@+@n$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + |.o$p$L#x#9#9#:#=#I.`@4 ;.+ + @ + + + + + + + + + + + q$r$f$M#i.+ + + + + + + N#b+s$q.+ + + + N#f+n## t$F@+ + + + + + u$v$m+. + + + + p C#C#r#w$. @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W.@+#+U.$+D+@ @ @ @ @ @ @ j$k$k$P@x$g g y$z$i#F+G+V {.,+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ E+A$b$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ B$ @.@+@C$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + D$L#L#x#9#9#:#=#I.I.E$+ + @ + + + + + + + + + + + |.=@r$f$7$+ + + + + + ;.F$a+G$+ + + + + 5@f+f+n## ;#+ + + + + + H$j+s + + + + + >@T#C#q#r#z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W.@+@+#+U.D+@ @ @ @ @ @ @ B@I$k$k$P@) ) Y#I#i#i#F+G+g . @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^ F@A$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ B$ @ @.@C$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + . #$K#J$x#9#9#:#=#I.K$_ + @ + + + + + + + + + + + + F.6+r$Z <.+ + + + + L$0+K A++ + + + + 7 )#f+f+n#M$. + + + + N$O$j+u$+ + + + + >@&$T#q#q#,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.u$@+@+#+D+@ @ @ @ @ @ @ P$Q$I$k$,@7@7@7@R$I#i#i#F+G+:@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^ ,@F@A$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }+`+ @ @n@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {$S$x#9#9#:#=#I.T$L$@ + + + + + + + + + + + + 8.y#6+r$I + + + + + U$0+0+,@+ + + + + + V$f+f+f+n#x$+ + + + W$e$X$Y$+ + + + + Z$o+&$9.q#,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.A+u$@+@+R$@ @ @ @ @ @ @ P$D@Q$I$;.@ @ @ @ n I#i#i#F+V *+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^ ,@,@F@`$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }+Z+`+ @ %@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .%h$5+9#9#:#=#I.|@@ + + + + + + + + + + + + + N 6+6++%j + + + + @%9+#%. + + + + + + F#7.f+f+f+O.+ + + ,@q#h+$%;.+ + + + + ,@%%o+H$9.,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.A+A+u$@+R$@ @ @ @ @ @ @ q.D@D@Q$;.@ @ @ @ + i$I#i#i#F+p @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ &%,+,@,@;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }+Z+Z+`+ %@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7@$.:#9#:#=#*%T@+ + + + + + + + + + + + + G#5+6+6+~@+ + + ; b+[#$++ + + + + + + + T$e+f+f+=%^ + + U 1#h+N#+ + + + + + + V$o+H$H$-%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.z+A+A+u$R$@ @ @ @ @ @ @ ;%4@D@D@7@@ @ @ @ @ 7@G+I#i#i#F+v @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ >%,%,+,@;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@'%_+Z+Z+ %@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )%9#9#:#=#!%+ + + + + + + + + + + + + 8.0+5+6+w.+ + + j.^.b+*@+ + + + + + + + h$d+e+f+f+h#+ + h$a#1#z#+ + + + + + + | N o+H$~%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ {%y+A+A+>#7 @ @ @ @ @ @ @ ;%B+4@D@7@@ @ @ @ @ @ 8.]%I#i#i#^%+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ >%O+,%,+;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ /%X+(%Z+Z+}+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + . ;.;.+ + + + + + + + + + + 3.{ 9#9#:#_%+ + + + + + + + + + + + + + 9.A.5+:%; + + i /.<%+ + + + + + + + + x$d+d+e+f+[%+ . }%a#k+^ + + + + + + + + s+9$o+p+u.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ '+|%`.y+z+1%@ @ @ @ @ @ @ @ ;%B+B+4@7@@ @ @ @ @ @ @ B Y#I#i#i#2%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 3%9@O+,%;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ /%X+X+(%_+4%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + {.#.Q H#+ + + + + + + + + + + F x#9#9#y.+ + + + + + + + + + + + + + ,#A.A.5+R.+ 5%6%M#7%+ + + + + + + + + ,@8%d+d+e+9%z 0%n## a%+ + + + + + + + + ~@b%9$o+c%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :@}@`.`.y+{.@ @ @ @ @ @ @ @ z#%+B+B+7@@ @ @ @ @ @ @ . 2 Y#I#i#d%F@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :@6#O+O+e%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ f%g%X+X+Y+!+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + h%Q H#+ + + + + + + + + + + 3.K$x#9#y.+ + + + + + + + + + + + + + 7 A.A.A.i%+ t#r$f$+.+ + + + + + + + + + j%c+d+d+e+k%M.f+n#G#+ + + + + + + + + |.b%b%9$l%:@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w z@}@`.m%>$@ @ @ @ @ @ @ @ n%$+%+B+7@@ @ @ @ @ @ @ @ *+2@Y#I#i#o%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :@B 6#O+e%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ p%V+g%X+q%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + r%s%t%+ + + + + + + + + + + + A.L#x#y.+ + + + + + + + + + + + + + + c#A.A.B.V#u%6+:%7@+ + + + + + + + + + D+f+c+d+d+v%w%f+x%7@+ + + + + + + + + . f 8%b%9$y%+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *+O.z@z@z%s.@ @ @ @ @ @ @ @ @ n%$+$+%+7@@ @ @ @ @ @ @ @ @ j A%Y#I#i#_@@ @ @ @ @ @ @ @ @ @ @ @ @ @ :@B B 6#e%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@U+V+V+B%a@+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + r%C%D%+ + + + + + + + + + + + E%L#L#H.+ + + + + + + + + + + + + + + F%G%A.A.0.H%6+I%+ + + + + + + + + + + + [%b+c+d+d+e+f+J%+ + + + + + + + + + + 7 0#8%b%9$K%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ L%R@] z@M%@ @ @ @ @ @ @ @ @ @ ) U.$+$+7@@ @ @ @ @ @ @ @ @ @ n ) Y#I#j$+ @ @ @ @ @ @ @ @ @ @ @ @ @ N%>+B B z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ b@g@U+V+G@@ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + r%O%@%+ + + + + + + + + + + + P%Q%L#.$+ + + + + + + + + + + + + + + 7 R%G%A.S%!@T%r + + + + + + + + + + + + B b+b+c+d+d+U%6@+ + + + + + + + + + + @ w$V%b%b%W%8.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ V#X%R@R@] p @ @ @ @ @ @ @ @ @ @ Y%#+$+$+K+@ @ @ @ @ @ @ @ @ @ . (@) Y#I#Z%@ @ @ @ @ @ @ @ @ @ @ @ @ N%M+>+B ,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@c@^+g@`%0@@ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + &O%P%+ + + + + + + + + + + z .&+&c$4.+ + + + + + + + + + + + + + + + ]$@&G%A.A.d+L$+ + + + + + + + + + + + + #&b+$&c+d+7$+ + + + + + + + + + + + @ + }@V%8%b%E#5%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ U 7+F +#%&&&@ @ @ @ @ @ @ @ @ @ @ Y%@+@+U.%$@ @ @ @ @ @ @ @ @ @ @ z 2@) Y#*&a$@ @ @ @ @ @ @ @ @ @ @ @ N%M+M+>+u.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#{+^+^+a@@ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + =&-&;&1@+ + + + + + + + + + >&,&,&,&A++ + + + + + + + + + + + + + + + .+y.y.G%A.'&+ + + + + + + + + + + + + + )&a+b+b+c+|@+ + + + + + + + + + + + @ @ *+!&0#8%b%[@8.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ i$[%7+7+7%V#@ @ @ @ @ @ @ @ @ @ @ ^ k m%@+@++.@ @ @ @ @ @ @ @ @ @ @ @ ,@2@) ) 3@F@@ @ @ @ @ @ @ @ @ @ @ ~&L+M+M+B ^ @ 8.% ;.@ @ @ @ @ @ @ @ @ @ @ @ _#S+S+{+b@@ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + =&,.-&{&7@+ + + + + + + + :@]&h%^&/&. + + + + + + + + + + + + + + + + z (&y.y.G%f.+ + + + + + + + + + + + + + _.K b+b+$&f.+ + + + + + + + + + + + @ @ @ @ s.t 8%b%_&w + @ @ @ @ @ @ @ @ @ @ . <.#+:&3#1 [%~$@ @ @ @ @ @ @ @ @ @ @ @ n A+c.m%@+<&j + @ @ @ @ @ @ @ @ @ @ @ 8.) ) ) [&+ @ @ @ @ @ @ @ @ @ ;.K+p.L+M+M+B }&|&= 1&@ @ @ @ @ @ @ @ @ > @ @ @ w#2&_#@ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + s%,.,.-&3&4&+ + + + + + p#5&[.6&7&+ @ + + + + + + + + + + + + + + + + + 4+8&y.9&<.+ + + + + + + + + + + + + + j B#K a+s$+ + + + + + + + + + + + + @ @ @ @ @ F#0#8%b%9$#+}&@ @ @ . 0&X#X#X#a&b&E#! t+3#c&,@@ @ @ @ @ @ @ @ ,@|._@_@p.>#A+A+c.m%@+@+A%N$N$V @ @ @ @ @ @ @ @ @ n ) ) ) &&. @ @ @ ;.z ^ E+d&e&K+K+p.L+M+M+4+= = f&@ @ @ @ @ @ @ > |$b$|$@ @ @ R+@ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + g&h&,.,.-&i&J%J%V$E E j&+&k&l&r++ + @ + + + + + + + + + + + + + + + + + 7%H.8&m&+ + + + + + + + + + + + + + + + ++0+K u%+ + + + + + + + + + + + + @ @ @ @ @ @ X#>.n&b%9$o&p&p&7%b&q#r#:$:$:$-$E#E#q p.@ @ @ @ @ @ @ @ @ @ t#z@z%`.`.y+A+A+A+c.m%@+@+U.$+Q.@ @ @ @ @ @ @ @ @ @ | ) ) ) }&@ @ @ n V B@q&I+I+J+K+K+p.L+M+r&= = A ^ s&s&s&*+*+^ t&A$b$b$|$@ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + . z@u&Q ,.-&O%O%C%s%Q v&w&x&n&. + + @ + + + + + + + + + + + + + + + + + 7 2+H.m + + + + + + + + + + + + + + + + y& #0+R + + + + + + + + + + + + + @ @ @ @ @ @ @ @ 7@5@z&9$o+H$H$9.q#q#u q+:$3#& ,@. @ @ @ @ @ @ @ @ @ @ @ A&O.$$9.B&B&C&~ 3+y D&;@;@].5.U @ @ @ @ @ @ @ @ @ @ + 7 : ) A%8.@ @ p P {.[$N+N+N+!#; K+p.L+q&X$..t%B 6#O+O+,%,+,@,@F@A$b$}$> @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + ]%|@|@E&F&F&G&f$e+U$*++ + + + @ + + + + + + + + + + + + + + + + + ;.H&H&p.+ + + + + + + + + + + + + + + + + 8 I&z + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ 7@N$5$G+G+G+V V V F#i$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 8 T#6&= = 6&E L J&!.= f&: @ @ @ @ @ @ @ @ @ @ @ @ ,@: ) A%:@@ @ @ @ @ @ @ @ @ @ z L$F@t&t&K&:@:@:@3%>%>%&%^ 7@*+. @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ *+L&L&M&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ p j&= N&@ @ @ {. .= f&_ @ @ @ @ @ @ @ @ @ @ @ @ L$: ) A%8.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ ;.= = 4+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ + i = { : @ @ @ @ @ @ @ @ @ @ @ @ + U ) ) v @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ %.= = <.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ <.x = l.@ @ @ @ @ @ U @ @ @ 2 , :@. g n 7@; , , , _.@ @ @ @ @ @ @ @ ).7@@ @ @ @ @ u.l#{ { .#@ @ @ @ @ @ @ @ @ '@&.{ O&@ @ q., ` = = I , , _.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + > @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ [.= l.@ @ @ z ) /.S$@ @ ;.*.= 5.@ @ @ ; ~.= = = P&! @ @ @ ^ #$!%O ' :@@ @ @ @ <.=&Q&2@R&= 3+@ @ @ @ @ @ )%O m.* = e.V$@ S&= = = = = = = %.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ [.= T&@ M$Z 9 = = U&@ @ f = = 5.@ @ j.=#r#&.V&,.= 6&:@@ W&~.= = = = :@@ @ @ u.X&:.2 @ ; Y&Q {.@ @ @ @ Z&!.t >.r `&= 7%@ ) &.K = *&.&.&.G+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ g .*= K@@ M$c+I&=#= U&@ 8.~.= H.U @ | l T#@ @ @ .#= = v%@ +*I&I&|&= = :@@ @ :@@*= S @ @ @ c#= Z$@ @ @ |.x##*@ @ + 2.= 7%@ @ @ $*= D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ ;.< = h *+@ @ @ @ %*= U&@ &*~.!$;.@ @ /.= .#@ @ @ @ **= ]&@ @ @ @ X = =*z @ @ 5$= e., @ @ @ c#= Z$@ @ + S = ; @ @ + 2.= 7%@ @ @ $*= D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ 0 = H r @ @ @ @ @ %*= U&; !.E @ @ @ <.A ' @ @ @ @ @ -*= W @ @ @ @ X = K @ @ @ t.= ;*@ @ @ @ >*= Z$@ @ x$= = <.@ @ + R , y&@ @ @ 0 = D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&i.D D D = e.,*@ @ @ @ @ @ %*= U&,*C&@ @ @ @ V&= Q&@ @ @ @ @ -*= W @ @ @ @ X = K @ @ + %*= 9$@ @ @ '@'*= Z$@ @ ! = - j @ @ + @ @ @ @ @ @ )*= D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&{.4.t ~.!*g @ @ @ @ @ @ @ %*= U&l : @ @ @ @ <%= ~*@ @ @ @ @ -*= W @ @ @ @ X = K @ @ + = = #*q.q.f 6&Q ~.: @ @ {*= ~ @ @ @ + @ @ @ @ @ @ )*= ,*@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ @ %*= W m.*+@ @ @ @ *.= ~*@ @ @ @ @ -*= W @ @ @ @ X = K @ @ z+= = k.L&L&S H&{.@ @ @ @ D = ~ @ @ @ + @ @ @ @ @ @ )*= ).@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ p ]*= = Z + @ @ @ @ m.= ^*@ @ @ @ @ -*= W @ @ @ P /*= K @ @ 7&= = T@@ @ @ @ @ @ @ @ U x = )%@ @ @ + @ @ @ @ @ @ )*= ).@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ : = = = q @ @ @ @ @ m.= D$@ @ @ @ @ -*= x#@ @ @ S.= = K @ @ 7&= = m @ @ @ @ @ @ 2@*+r = = Y @ @ @ + @ *+: @ @ :@[.= ).@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ : = = (*z @ @ @ @ G+* = ~*@ @ @ @ @ -*= ] @ @ @ S.= = T#@ @ 7&= = 9$@ @ @ @ @ @ _*8.(@W = Y @ @ @ + @ v :*@ @ ]#= = ).@ @ @ >.| @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ : = = <*@ @ @ @ @ @ m.= b.@ @ @ @ @ -*m.<.@ @ @ S.= = R @ @ ;.= = ]&@ @ @ @ @ ^ H.j @ D = [**+@ @ + @ n+]&@ @ ]#= = ).@ @ @ 1#!$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= ]*u.@ @ @ @ @ @ @ @ @ @ @ : = ' ).@ @ @ @ @ @ m.= ' @ @ @ @ K+}*< @ @ @ @ S.= = R @ @ + 6&= .*@ @ @ @ @ t%|*@ @ D = = 8 @ @ + <.A V.@ @ ]#= = >&@ @ @ d !$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ;.^ ^ u = = }.:@^ ^ + @ @ @ @ @ @ @ : = 5+@ @ @ @ @ @ @ 1*= = .#@ @ . *x P @ @ @ @ S.= e.>.@ @ @ a.'*e.&*| ^ ^ 2*( r @ @ Z&H = f&3*3*^.A }.@ @ @ ]#= = C&^ U S L&,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 4*= = X =#=#=#l = = ;.@ @ @ @ @ @ @ : = 0#@ @ @ @ @ @ @ x@( = Q e+e+H%D q.@ @ @ @ @ S.= J.@ @ @ @ @ U T = = = = =&5*@ @ @ @ ,#!.= = = ' d v @ @ @ Z.;*= = = = *.. @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 2 2*2*7 @ @ @ ;.2*2*+ @ @ @ @ @ @ @ L$2*y&@ @ @ @ @ @ @ @ q.7&c c c 7%,+@ @ @ @ @ @ S.= J.@ @ @ @ @ @ P c c c S&U @ @ @ @ @ @ z+c c c I&@ @ @ @ @ @ + 2*2*2*2*L$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ S.= J.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ j&= k.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 6*= U#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ U e.A . @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ v%= f.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ) s%}%;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *+_&D l+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <%7*a.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ _.(.7@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ "}; diff --git a/apps/X11/InstallMgr/pixmaps/trash.xpm b/apps/X11/InstallMgr/pixmaps/trash.xpm new file mode 100644 index 0000000..611703b --- /dev/null +++ b/apps/X11/InstallMgr/pixmaps/trash.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * trash_xpm[] = { +"16 16 6 1", +" c None", +". c #D3D3DD", +"+ c #000000", +"@ c #7F7F7F", +"# c #FFFFFF", +"$ c #BFBFBF", +".....+++++......", +".....+@@@+......", +"..+++++++++++...", +"..+#$$$@@@@@+...", +"..+++++++++++...", +"...+@+@+@+@+....", +"...+#+$+@+@+....", +"..++#+$+$+@++...", +".+.+#+$+@+@+.+..", +"...+#+$+$+@+....", +"...+#+$+@+@+....", +"...+#+$+$+@+....", +"...+#+$+@+@+....", +"...+#+$+$+@+....", +"...+#@@@@@@+....", +"...+++++++++...."}; diff --git a/apps/X11/InstallMgr/po/ChangeLog b/apps/X11/InstallMgr/po/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/apps/X11/InstallMgr/po/ChangeLog diff --git a/apps/X11/InstallMgr/po/Makefile b/apps/X11/InstallMgr/po/Makefile new file mode 100644 index 0000000..ebae61a --- /dev/null +++ b/apps/X11/InstallMgr/po/Makefile @@ -0,0 +1,252 @@ +# Generated automatically from Makefile.in.in by configure. +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = installmgr +VERSION = 0.1 + +SHELL = /bin/sh + + +srcdir = . +top_srcdir = .. + +prefix = /usr/local +exec_prefix = ${prefix} +datadir = $(prefix)/share +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +MKINSTALLDIRS = $(top_srcdir)/./mkinstalldirs + +CC = gcc +GENCAT = +GMSGFMT = PATH=../src:$$PATH /usr/bin/msgfmt +MSGFMT = /usr/bin/msgfmt +XGETTEXT = PATH=../src:$$PATH /usr/bin/xgettext +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = -DHAVE_CONFIG_H +CFLAGS = -g -O2 -Wall -Wunused +CPPFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = +GMOFILES = +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + ../src/MainFrm.cpp \ + ../src/interface.c \ + ../src/callbacks.cpp \ + ../src/support.c + +CATALOGS = +CATOBJEXT = .gmo +INSTOBJEXT = .mo + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-yes + +all-yes: cat-id-tbl.c $(CATALOGS) +all-no: + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(PACKAGE).po \ + || ( rm -f $(srcdir)/$(PACKAGE).pot \ + && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-yes +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/po/Makefile.in b/apps/X11/InstallMgr/po/Makefile.in new file mode 100644 index 0000000..fad13da --- /dev/null +++ b/apps/X11/InstallMgr/po/Makefile.in @@ -0,0 +1,248 @@ +# Generated automatically from Makefile.in.in by configure. +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = installmgr +VERSION = 0.1 + +SHELL = /bin/sh + + +srcdir = . +top_srcdir = .. + +prefix = /usr/local +exec_prefix = ${prefix} +datadir = $(prefix)/share +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +MKINSTALLDIRS = $(top_srcdir)/./mkinstalldirs + +CC = gcc +GENCAT = +GMSGFMT = PATH=../src:$$PATH /usr/bin/msgfmt +MSGFMT = /usr/bin/msgfmt +XGETTEXT = PATH=../src:$$PATH /usr/bin/xgettext +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = -DHAVE_CONFIG_H +CFLAGS = -g -O2 -Wall -Wunused +CPPFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = +GMOFILES = +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = +CATOBJEXT = .gmo +INSTOBJEXT = .mo + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-yes + +all-yes: cat-id-tbl.c $(CATALOGS) +all-no: + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(PACKAGE).po \ + || ( rm -f $(srcdir)/$(PACKAGE).pot \ + && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-yes +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/po/Makefile.in.in b/apps/X11/InstallMgr/po/Makefile.in.in new file mode 100644 index 0000000..111b40f --- /dev/null +++ b/apps/X11/InstallMgr/po/Makefile.in.in @@ -0,0 +1,248 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: cat-id-tbl.c $(CATALOGS) +all-no: + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(PACKAGE).po \ + || ( rm -f $(srcdir)/$(PACKAGE).pot \ + && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/po/POTFILES b/apps/X11/InstallMgr/po/POTFILES new file mode 100644 index 0000000..3f9cfd2 --- /dev/null +++ b/apps/X11/InstallMgr/po/POTFILES @@ -0,0 +1,4 @@ + ../src/MainFrm.cpp \ + ../src/interface.c \ + ../src/callbacks.cpp \ + ../src/support.c diff --git a/apps/X11/InstallMgr/po/POTFILES.in b/apps/X11/InstallMgr/po/POTFILES.in new file mode 100644 index 0000000..ac1985d --- /dev/null +++ b/apps/X11/InstallMgr/po/POTFILES.in @@ -0,0 +1,6 @@ +# List of source files containing translatable strings. + +src/MainFrm.cpp +src/interface.c +src/callbacks.cpp +src/support.c diff --git a/apps/X11/InstallMgr/po/cat-id-tbl.c b/apps/X11/InstallMgr/po/cat-id-tbl.c new file mode 100644 index 0000000..04bdf07 --- /dev/null +++ b/apps/X11/InstallMgr/po/cat-id-tbl.c @@ -0,0 +1,43 @@ +/* Automatically generated by po2tbl.sed from installmgr.pot. */ + +#if HAVE_CONFIG_H +# include <config.h> +#endif + +#include "libgettext.h" + +const struct _msg_ent _msg_tbl[] = { + {"", 1}, + {"E_xit", 2}, + {"_Options", 3}, + {"_Local Path...", 4}, + {"_Manage Remote Sources...", 5}, + {"Local", 6}, + {"Info", 7}, + {"Select", 8}, + {"Select All", 9}, + {"Install", 10}, + {"Installed", 11}, + {"Remove", 12}, + {"Available ", 13}, + {"Mng Rmt Srcs", 14}, + {" ", 15}, + {"Selected for Install", 16}, + {"About Module", 17}, + {"Select File", 18}, + {"Manage Remote Sites", 19}, + {"Add", 20}, + {"Site Name", 21}, + {"Site Machine Name", 22}, + {"Repository Directory", 23}, + {"Save", 24}, + {"Ciphered Module", 25}, + {"The module that you have requested for install seems to be ciphered.", 26}, + {"Cipher Key:", 27}, + {"Try", 28}, + {"Status", 29}, + {"Couldn't find pixmap file: %s", 30}, + {"Couldn't create pixmap from file: %s", 31}, +}; + +int _msg_tbl_length = 31; diff --git a/apps/X11/InstallMgr/po/installmgr.pot b/apps/X11/InstallMgr/po/installmgr.pot new file mode 100644 index 0000000..b97b615 --- /dev/null +++ b/apps/X11/InstallMgr/po/installmgr.pot @@ -0,0 +1,137 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2001-03-07 04:36-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" + +#: src/MainFrm.cpp:166 +msgid "E_xit" +msgstr "" + +#: src/MainFrm.cpp:178 +msgid "_Options" +msgstr "" + +#: src/MainFrm.cpp:197 +msgid "_Local Path..." +msgstr "" + +#: src/MainFrm.cpp:208 +msgid "_Manage Remote Sources..." +msgstr "" + +#: src/MainFrm.cpp:268 +msgid "Local" +msgstr "" + +#: src/MainFrm.cpp:285 +msgid "Info" +msgstr "" + +#: src/MainFrm.cpp:296 +msgid "Select" +msgstr "" + +#: src/MainFrm.cpp:307 +msgid "Select All" +msgstr "" + +#: src/MainFrm.cpp:321 +msgid "Install" +msgstr "" + +#: src/MainFrm.cpp:336 +msgid "Installed" +msgstr "" + +#: src/MainFrm.cpp:377 src/interface.c:202 +msgid "Remove" +msgstr "" + +#: src/MainFrm.cpp:1475 +msgid "Available " +msgstr "" + +#: src/MainFrm.cpp:1486 +msgid "Mng Rmt Srcs" +msgstr "" + +#: src/MainFrm.cpp:1494 +msgid " " +msgstr "" + +#: src/MainFrm.cpp:1508 +msgid "Selected for Install" +msgstr "" + +#: src/interface.c:31 +msgid "About Module" +msgstr "" + +#: src/interface.c:83 +msgid "Select File" +msgstr "" + +#: src/interface.c:129 +msgid "Manage Remote Sites" +msgstr "" + +#: src/interface.c:181 +msgid "Add" +msgstr "" + +#: src/interface.c:223 +msgid "Site Name" +msgstr "" + +#: src/interface.c:246 +msgid "Site Machine Name" +msgstr "" + +#: src/interface.c:268 +msgid "Repository Directory" +msgstr "" + +#: src/interface.c:290 +msgid "Save" +msgstr "" + +#: src/interface.c:343 +msgid "Ciphered Module" +msgstr "" + +#: src/interface.c:366 +msgid "The module that you have requested for install seems to be ciphered." +msgstr "" + +#: src/interface.c:390 +msgid "Cipher Key:" +msgstr "" + +#: src/interface.c:404 +msgid "Try" +msgstr "" + +#: src/interface.c:463 +msgid "Status" +msgstr "" + +#: src/support.c:97 src/support.c:135 +#, c-format +msgid "Couldn't find pixmap file: %s" +msgstr "" + +#: src/support.c:113 +#, c-format +msgid "Couldn't create pixmap from file: %s" +msgstr "" diff --git a/apps/X11/InstallMgr/po/stamp-cat-id b/apps/X11/InstallMgr/po/stamp-cat-id new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/apps/X11/InstallMgr/po/stamp-cat-id @@ -0,0 +1 @@ +timestamp diff --git a/apps/X11/InstallMgr/src/FTPDownload.cpp b/apps/X11/InstallMgr/src/FTPDownload.cpp new file mode 100644 index 0000000..eb74177 --- /dev/null +++ b/apps/X11/InstallMgr/src/FTPDownload.cpp @@ -0,0 +1,29 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop + +#include "FTPDownload.h" +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Important: Methods and properties of objects in VCL can only be +// used in a method called using Synchronize, for example: +// +// Synchronize(UpdateCaption); +// +// where UpdateCaption could look like: +// +// void __fastcall FTPDownload::UpdateCaption() +// { +// Form1->Caption = "Updated in a thread"; +// } +//--------------------------------------------------------------------------- +__fastcall FTPDownload::FTPDownload(bool CreateSuspended) + : TThread(CreateSuspended) +{ +} +//--------------------------------------------------------------------------- +void __fastcall FTPDownload::Execute() +{ + //---- Place thread code here ---- +} +//--------------------------------------------------------------------------- diff --git a/apps/X11/InstallMgr/src/FTPDownload.h b/apps/X11/InstallMgr/src/FTPDownload.h new file mode 100644 index 0000000..4ad9e01 --- /dev/null +++ b/apps/X11/InstallMgr/src/FTPDownload.h @@ -0,0 +1,16 @@ +//--------------------------------------------------------------------------- +#ifndef FTPDownloadH +#define FTPDownloadH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +//--------------------------------------------------------------------------- +class FTPDownload : public TThread +{ +private: +protected: + void __fastcall Execute(); +public: + __fastcall FTPDownload(bool CreateSuspended); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/apps/X11/InstallMgr/src/InfoFrm.cpp b/apps/X11/InstallMgr/src/InfoFrm.cpp new file mode 100644 index 0000000..a75b7b2 --- /dev/null +++ b/apps/X11/InstallMgr/src/InfoFrm.cpp @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop + +#include "InfoFrm.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TInfoForm *InfoForm; +//--------------------------------------------------------------------------- +__fastcall TInfoForm::TInfoForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TInfoForm::FormShow(TObject *Sender) +{ + AnsiString abouttext = ""; + TMemoryStream *RTFStream = new TMemoryStream(); + + abouttext = abouttext + "{\\fs20\\cf0 " + info.c_str() + " }"; + RTFStream->Clear(); + RTFStream->WriteBuffer(abouttext.c_str(), abouttext.Length()); + RTFStream->Position = 0; + InfoText->Lines->LoadFromStream(RTFStream); + delete RTFStream; +} +//--------------------------------------------------------------------------- +void __fastcall TInfoForm::SpeedButton1Click(TObject *Sender) +{ + ModalResult = mrOk; +} +//--------------------------------------------------------------------------- diff --git a/apps/X11/InstallMgr/src/InfoFrm.h b/apps/X11/InstallMgr/src/InfoFrm.h new file mode 100644 index 0000000..9bbeef6 --- /dev/null +++ b/apps/X11/InstallMgr/src/InfoFrm.h @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------- +#ifndef InfoFrmH +#define InfoFrmH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +#include <Controls.hpp> +#include <StdCtrls.hpp> +#include <Forms.hpp> +#include <Buttons.hpp> +#include <ComCtrls.hpp> +#include <ExtCtrls.hpp> +#include <string> + +//--------------------------------------------------------------------------- +class TInfoForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TPanel *Panel2; + TRichEdit *InfoText; + TSpeedButton *SpeedButton1; + void __fastcall FormShow(TObject *Sender); + void __fastcall SpeedButton1Click(TObject *Sender); +private: // User declarations +public: // User declarations + std::string info; + __fastcall TInfoForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TInfoForm *InfoForm; +//--------------------------------------------------------------------------- +#endif diff --git a/apps/X11/InstallMgr/src/InstallMgr.conf b/apps/X11/InstallMgr/src/InstallMgr.conf new file mode 100644 index 0000000..7d63e5f --- /dev/null +++ b/apps/X11/InstallMgr/src/InstallMgr.conf @@ -0,0 +1,5 @@ + +[Sources] +FTPSource=CrossWire Bible Society|ftp.crosswire.org|/pub/sword/raw/ +LocalPath=/usr/share/ + diff --git a/apps/X11/InstallMgr/src/InstallMgr.cpp b/apps/X11/InstallMgr/src/InstallMgr.cpp new file mode 100644 index 0000000..1d6907e --- /dev/null +++ b/apps/X11/InstallMgr/src/InstallMgr.cpp @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop +USERES("InstallMgr.res"); +USEFORM("MainFrm.cpp", MainForm); +USELIB("..\BibleCS\swordlib.lib"); +USEFORM("StatusFrm.cpp", StatusForm); +USEFORM("RemoteMntFrm.cpp", RemoteMntForm); +USEFORM("InfoFrm.cpp", InfoForm); +USEFORM("cipherfrm.cpp", CipherForm); +USEFORM("UninstallFrm.cpp", UninstallForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->Title = "Install Manager"; + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->CreateForm(__classid(TStatusForm), &StatusForm); + Application->CreateForm(__classid(TRemoteMntForm), &RemoteMntForm); + Application->CreateForm(__classid(TInfoForm), &InfoForm); + Application->CreateForm(__classid(TCipherForm), &CipherForm); + Application->CreateForm(__classid(TUninstallForm), &UninstallForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/apps/X11/InstallMgr/src/MainFrm.cpp b/apps/X11/InstallMgr/src/MainFrm.cpp new file mode 100644 index 0000000..5104912 --- /dev/null +++ b/apps/X11/InstallMgr/src/MainFrm.cpp @@ -0,0 +1,1526 @@ +#include "MainFrm.h" +//#include "StatusFrm.h" +//#include "RemoteMntFrm.h" +//#include "InfoFrm.h" +//#include "cipherfrm.h" +//#include "UninstallFrm.h" + +//#include <swwinlog.h> +//#include <shellapi.h> +#include <dirent.h> +#include <fcntl.h> +//#include <io.h> +#include <sys/stat.h> +//#include <dir.h> + +TMainForm *MainForm; + +#include "pix/null.xpm" +#include "pix/arrow2r.xpm" +#include "pix/bookshut.xpm" +#include "pix/bulbon.xpm" +#include "pix/fingerup.xpm" +#include "pix/bulblk.xpm" +#include "pix/upgrdlk.xpm" +#include "pix/sword.xpm" +#include "pix/globe.xpm" + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <sys/types.h> +#include <unistd.h> +#include <string.h> +#include <gdk/gdkkeysyms.h> + +#include <gtk/gtk.h> + +extern "C" { +#include "callbacks.h" +//#include "interface.h" +//#include "support.h" +} +#ifndef O_BINARY +#define O_BINARY 0 +#endif + + +VersionInfo::VersionInfo(const char *version) { + char *buf = new char[ strlen(version) + 1 ]; + char *tok; + major = minor = minor2 = minor3 = 0; + + strcpy(buf, version); + tok = strtok(buf, "."); + if (tok) + major = atoi(tok); + tok = strtok(0, "."); + if (tok) + minor = atoi(tok); + tok = strtok(0, "."); + if (tok) + minor2 = atoi(tok); + tok = strtok(0, "."); + if (tok) + minor3 = atoi(tok); + delete [] buf; +} + + +int VersionInfo::compare(const VersionInfo &vi) const { + if (major == vi.major) + if (minor == vi.minor) + if (minor2 == vi.minor2) + if (minor3 == vi.minor3) + return 0; + else return minor3 - vi.minor3; + else return minor2 - vi.minor2; + else return minor - vi.minor; + else return major - vi.major; +} + + +InstallSourceTab::InstallSourceTab(GtkWidget *Owner, const char *confEnt, const char *type) { + char *buf = new char [ strlen(confEnt) + 1 ]; + + strcpy(buf, confEnt); + + Caption = strtok(buf, "|"); + Source = strtok(0, "|"); + Directory = strtok(0, "|"); + delete [] buf; + Type = type; + mgr = 0; +} + +InstallSourceTab::~InstallSourceTab() { + if (mgr) + delete mgr; +} + +TMainForm::TMainForm(GtkWidget* Owner) { + manager = new SWMgr(); + installConf = new SWConfig("./InstallMgr.conf"); + localMgr = 0; + FormCreate(0); +} + + +TMainForm::~TMainForm() +{ + delete manager; + delete installConf; + if (localMgr) + delete localMgr; +} + + +void TMainForm::FormCreate(GtkWidget *Sender) { + + accel_group = gtk_accel_group_new (); + main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (main_window), "main_window", main_window); + gtk_window_set_default_size (GTK_WINDOW (main_window), 600, 450); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox1", vbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox1); + gtk_container_add (GTK_CONTAINER (main_window), vbox1); + + GtkWidget *handlebox3 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (main_window), "handlebox3", handlebox3); + gtk_widget_show (handlebox3); + gtk_box_pack_start (GTK_BOX (vbox1), handlebox3, FALSE, FALSE, 0); + + menubar1 = gtk_menu_bar_new (); + gtk_widget_ref (menubar1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "menubar1", menubar1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (menubar1); + gtk_menu_bar_set_shadow_type (GTK_MENU_BAR (menubar1), GTK_SHADOW_NONE); + gtk_container_add (GTK_CONTAINER (handlebox3), menubar1); + + file2 = gtk_menu_item_new_with_label (""); + tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (file2)->child), + "_File"); + gtk_widget_add_accelerator (file2, "activate_item", accel_group, + tmp_key, GDK_MOD1_MASK, (enum GtkAccelFlags)0); + gtk_widget_ref (file2); + gtk_object_set_data_full (GTK_OBJECT (main_window), "file2", file2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (file2); + gtk_container_add (GTK_CONTAINER (menubar1), file2); + + file2_menu = gtk_menu_new (); + gtk_widget_ref (file2_menu); + gtk_object_set_data_full (GTK_OBJECT (main_window), "file2_menu", file2_menu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (file2), file2_menu); + file2_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (file2_menu)); + + exit1 = gtk_menu_item_new_with_label (""); + tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (exit1)->child), + _("E_xit")); + gtk_widget_add_accelerator (exit1, "activate_item", file2_menu_accels, + tmp_key, 0, (enum GtkAccelFlags)0); + gtk_widget_ref (exit1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "exit1", exit1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (exit1); + gtk_container_add (GTK_CONTAINER (file2_menu), exit1); + + + options1 = gtk_menu_item_new_with_label (""); + tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (options1)->child), + _("_Options")); + gtk_widget_add_accelerator (options1, "activate_item", accel_group, + tmp_key, GDK_MOD1_MASK, (enum GtkAccelFlags)0); + gtk_widget_ref (options1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "options1", options1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (options1); + gtk_container_add (GTK_CONTAINER (menubar1), options1); + + options1_menu = gtk_menu_new (); + gtk_widget_ref (options1_menu); + + gtk_object_set_data_full (GTK_OBJECT (main_window), "options1_menu", options1_menu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (options1), options1_menu); + options1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (options1_menu)); + + local_path1 = gtk_menu_item_new_with_label (""); + tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (local_path1)->child), + _("_Local Path...")); + gtk_widget_add_accelerator (local_path1, "activate_item", options1_menu_accels, + tmp_key, 0, (enum GtkAccelFlags)0); + gtk_widget_ref (local_path1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "local_path1", local_path1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (local_path1); + gtk_container_add (GTK_CONTAINER (options1_menu), local_path1); + + manage_remote_sources1 = gtk_menu_item_new_with_label (""); + tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (manage_remote_sources1)->child), + _("_Manage Remote Sources...")); + gtk_widget_add_accelerator (manage_remote_sources1, "activate_item", options1_menu_accels, + tmp_key, 0, (enum GtkAccelFlags)0); + gtk_widget_ref (manage_remote_sources1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "manage_remote_sources1", manage_remote_sources1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (manage_remote_sources1); + gtk_container_add (GTK_CONTAINER (options1_menu), manage_remote_sources1); + + banner_panel = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (banner_panel); + gtk_object_set_data_full (GTK_OBJECT (main_window), "banner_panel", banner_panel, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (banner_panel); + gtk_box_pack_start (GTK_BOX (vbox1), banner_panel, FALSE, FALSE, 0); + + hpaned1 = gtk_hpaned_new (); + gtk_widget_ref (hpaned1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "hpaned1", hpaned1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hpaned1); + gtk_box_pack_start (GTK_BOX (vbox1), hpaned1, TRUE, TRUE, 0); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox2); + gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox2", vbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox2); + gtk_container_add (GTK_CONTAINER (hpaned1), vbox2); + + toolbar2 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); + gtk_widget_ref (toolbar2); + gtk_object_set_data_full (GTK_OBJECT (main_window), "toolbar2", toolbar2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (toolbar2); + gtk_box_pack_start (GTK_BOX (vbox2), toolbar2, FALSE, FALSE, 0); + + notebook1 = gtk_notebook_new (); + gtk_widget_ref (notebook1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "notebook1", notebook1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (notebook1); + gtk_box_pack_start (GTK_BOX (vbox2), notebook1, TRUE, TRUE, 0); + + scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow3); + gtk_object_set_data_full (GTK_OBJECT (main_window), "scrolledwindow3", scrolledwindow3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow3); + gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow3); + + viewport1 = gtk_viewport_new (NULL, NULL); + gtk_widget_ref (viewport1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "viewport1", viewport1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (viewport1); + gtk_container_add (GTK_CONTAINER (scrolledwindow3), viewport1); + + localTree = new TTreeView(viewport1); + + label1 = gtk_label_new (_("Local")); + gtk_widget_ref (label1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "label1", label1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label1); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1); + + toolbar3 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); + gtk_widget_ref (toolbar3); + gtk_object_set_data_full (GTK_OBJECT (main_window), "toolbar3", toolbar3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (toolbar3); + gtk_box_pack_start (GTK_BOX (vbox2), toolbar3, FALSE, FALSE, 0); + + InfoBtn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar3), + GTK_TOOLBAR_CHILD_BUTTON, + NULL, + _("Info"), + NULL, NULL, + NULL, NULL, NULL); + gtk_widget_ref (InfoBtn); + gtk_object_set_data_full (GTK_OBJECT (main_window), "InfoBtn", InfoBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (InfoBtn); + + SelectBtn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar3), + GTK_TOOLBAR_CHILD_BUTTON, + NULL, + _("Select"), + NULL, NULL, + NULL, NULL, NULL); + gtk_widget_ref (SelectBtn); + gtk_object_set_data_full (GTK_OBJECT (main_window), "SelectBtn", SelectBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (SelectBtn); + + SelectAllBtn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar3), + GTK_TOOLBAR_CHILD_BUTTON, + NULL, + _("Select All"), + NULL, NULL, + NULL, NULL, NULL); + gtk_widget_ref (SelectAllBtn); + gtk_object_set_data_full (GTK_OBJECT (main_window), "SelectAllBtn", SelectAllBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (SelectAllBtn); + +/* + tmp_toolbar_icon = gnome_stock_pixmap_widget (main_window, GNOME_STOCK_PIXMAP_ADD); +*/ + InstallBtn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar3), + GTK_TOOLBAR_CHILD_BUTTON, + NULL, + _("Install"), + NULL, NULL, + /*tmp_toolbar_icon*/NULL, NULL, NULL); + gtk_widget_ref (InstallBtn); + gtk_object_set_data_full (GTK_OBJECT (main_window), "InstallBtn", InstallBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (InstallBtn); + + vbox3 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox3); + gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox3", vbox3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox3); + gtk_container_add (GTK_CONTAINER (hpaned1), vbox3); + + label2 = gtk_label_new (_("Installed")); + gtk_widget_ref (label2); + gtk_object_set_data_full (GTK_OBJECT (main_window), "label2", label2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label2); + gtk_box_pack_start (GTK_BOX (vbox3), label2, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (label2), 0.01, 0.5); + + scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow4); + gtk_object_set_data_full (GTK_OBJECT (main_window), "scrolledwindow4", scrolledwindow4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow4); + gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow4, TRUE, TRUE, 0); + + viewport2 = gtk_viewport_new (NULL, NULL); + gtk_widget_ref (viewport2); + gtk_object_set_data_full (GTK_OBJECT (main_window), "viewport2", viewport2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (viewport2); + gtk_container_add (GTK_CONTAINER (scrolledwindow4), viewport2); + + installTree = new TTreeView(viewport2); + + + + + toolbar4 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); + gtk_widget_ref (toolbar4); + gtk_object_set_data_full (GTK_OBJECT (main_window), "toolbar4", toolbar4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (toolbar4); + gtk_box_pack_start (GTK_BOX (vbox3), toolbar4, FALSE, FALSE, 0); + +/* + tmp_toolbar_icon = gnome_stock_pixmap_widget (main_window, GNOME_STOCK_PIXMAP_REMOVE); +*/ + RemoveBtn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar4), + GTK_TOOLBAR_CHILD_BUTTON, + NULL, + _("Remove"), + NULL, NULL, + /*tmp_toolbar_icon*/NULL, NULL, NULL); + gtk_widget_ref (RemoveBtn); + gtk_object_set_data_full (GTK_OBJECT (main_window), "RemoveBtn", RemoveBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (RemoveBtn); + + /* + appbar1 = gtk_statusbar_new (); + gtk_widget_ref (appbar1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "appbar1", appbar1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (appbar1); + gtk_box_pack_start (GTK_BOX (vbox1), appbar1, FALSE, FALSE, 0); + */ + + appbar1 = gtk_progress_bar_new (); + gtk_widget_ref (appbar1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "appbar1", appbar1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (appbar1); + gtk_box_pack_start (GTK_BOX (vbox1), appbar1, FALSE, FALSE, 0); + + + gtk_signal_connect (GTK_OBJECT (localTree->nativeControl), "button_press_event", + GTK_SIGNAL_FUNC (on_localTreeButtonPress), + NULL); + gtk_signal_connect (GTK_OBJECT (InfoBtn), "clicked", + GTK_SIGNAL_FUNC (on_InfoBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (SelectBtn), "clicked", + GTK_SIGNAL_FUNC (on_SelectBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (SelectAllBtn), "clicked", + GTK_SIGNAL_FUNC (on_SelectAllBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (InstallBtn), "clicked", + GTK_SIGNAL_FUNC (on_InstallBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (RemoveBtn), "clicked", + GTK_SIGNAL_FUNC (on_RemoveBtn_clicked), + NULL); + gtk_signal_connect(GTK_OBJECT(main_window), + "destroy", + GTK_SIGNAL_FUNC(gtk_main_quit), + NULL); + gtk_signal_connect (GTK_OBJECT (local_path1), "activate", + GTK_SIGNAL_FUNC (on_local_path1_activate), + NULL); + gtk_signal_connect (GTK_OBJECT (exit1), "activate", + GTK_SIGNAL_FUNC (on_exit1_activate), + NULL); + + + + + ImageList1 = new TCustomImageList(localTree); + ImageList2 = new TCustomImageList(localTree); + localTree->Images = ImageList1; + localTree->StateImages = ImageList2; + + refreshPageControl(); + +// if (SWLog::systemlog) +// delete SWLog::systemlog; +// SWLog::systemlog = new SWWinLog(this->Handle); // set the system logger to our MSWindows specific SWLog class + + +} + + +void TMainForm::refreshPageControl() +{ + SectionMap::iterator sources; + ConfigEntMap::iterator sourceBegin; + ConfigEntMap::iterator sourceEnd; + +/* + while (PageControl1->PageCount > 1) { + delete PageControl1->Pages[1]; + } +*/ + + sources = installConf->Sections.find("Sources"); + + if (sources != installConf->Sections.end()) { + sourceBegin = sources->second.lower_bound("FTPSource"); + sourceEnd = sources->second.upper_bound("FTPSource"); + + if (sourceBegin != sourceEnd) { + while (sourceBegin != sourceEnd) { +// addSource(new InstallSourceTab(this, sourceBegin->second.c_str(), "FTP")); + sourceBegin++; + } + } + } +} + +/* + +void TMainForm::addSource(InstallSourceTab *ist) +{ + TTabSheet *newtab = new TTabSheet(this); + TTreeView *newtree = new TTreeView(this); + TSpeedButton *newbutton = new TSpeedButton(this); + TPanel *newpanel = new TPanel(this); + char buf[512]; + SectionMap::iterator sit; + + newtab->Caption = ist->Caption.c_str(); + newtab->Hint = ist->Source.c_str(); + newtab->ShowHint = true; + newtab->PageControl = PageControl1; + ist->Parent = newtab; + ist->tree = newtree; + newpanel->Parent = newtab; + newpanel->Align = alTop; + newpanel->BevelOuter = bvNone; + newpanel->BevelInner = bvNone; + newpanel->Height = 25; + newbutton->Parent = newpanel; + newbutton->Caption = "Refresh from Remote Source"; + newbutton->Width = 175; + newbutton->OnClick = RefreshRemoteSource; + newbutton->Flat = true; + newbutton->Glyph = SpeedButton2->Glyph; + newtree->Parent = newtab; + newtree->Align = alClient; + newtree->ReadOnly = true; + newtree->OnDblClick = localTreeDblClick; + newtree->Images = ImageList1; + newtree->StateImages = ImageList2; + string parent = "./sources/" + ist->Source + "/file"; + createParent(parent.c_str()); + parent = "./sources/" + ist->Source; + fillSourceTree(parent.c_str(), newtree); +} + + +*/ +const char *TMainForm::getLocalDir() +{ + ConfigEntMap::iterator entry; + + entry = installConf->Sections["Sources"].find("LocalPath"); + if (entry == installConf->Sections["Sources"].end()) { + installConf->Sections["Sources"].insert(ConfigEntMap::value_type("LocalPath", "d:/sword")); + entry = installConf->Sections["Sources"].find("LocalPath"); + } + return entry->second.c_str(); + +} + + +void TMainForm::setLocalDir(const char *idir) +{ + installConf->Sections["Sources"].erase("LocalPath"); installConf->Sections["Sources"].insert(ConfigEntMap::value_type("LocalPath", idir)); +} + + +void file_ok_sel( GtkWidget *w, TMainForm *form ) { + form->LocalPath1Click_ok(w); +} + +void TMainForm::LocalPath1Click_ok(GtkWidget *Sender) { + char *buf = new char [ strlen(gtk_file_selection_get_filename (GTK_FILE_SELECTION (localPathDlg))) + 1 ]; + + strcpy(buf, gtk_file_selection_get_filename (GTK_FILE_SELECTION (localPathDlg))); + int end = strlen(buf) - 1; + while (end) { + if ((buf[end] == '/') || (buf[end] == '\\')) + break; + end--; + } + buf[end+1] = 0; + setLocalDir(buf); + delete [] buf; + + installConf->Save(); + fillSourceTree(getLocalDir(), localTree); + gtk_widget_destroy(GTK_WIDGET(localPathDlg)); +} + +//--------------------------------------------------------------------------- +void TMainForm::LocalPath1Click(GtkWidget *Sender) +{ +/* + localPathDlg->Title = "Select a file in the directory to choose"; + localPathDlg->InitialDir = getLocalDir(); +*/ + localPathDlg = gtk_file_selection_new( "Select a file in the directory to choose" ); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (localPathDlg)->ok_button), + "clicked", (GtkSignalFunc) file_ok_sel, this ); + + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION + (localPathDlg)->cancel_button), + "clicked", (GtkSignalFunc) gtk_widget_destroy, + GTK_OBJECT (localPathDlg)); + + /* Lets set the filename, as if this were a save dialog, and we are giving + a default filename */ +// gtk_file_selection_set_filename (GTK_FILE_SELECTION(localPathDlg), +// "penguin.png"); + + gtk_window_set_modal(GTK_WINDOW(localPathDlg), true); + gtk_widget_show(localPathDlg); + + +} +//--------------------------------------------------------------------------- + +void TMainForm::fillInstallTree() +{ + ModMap::iterator mods; + TTreeNode *node; + string nodeName; + + installTree->Items->Clear(); + + if (!manager->configPath) + return; + + for (mods = manager->Modules.begin(); mods != manager->Modules.end(); mods++) { + for (node = installTree->Items->GetFirstNode(); node; node = node->getNextSibling()) { + if (!strcmp(string(node->Text).c_str(), mods->second->Type())) { + break; + } + } + if (!node) { // Add Section + if (!strncmp(mods->second->Type(), "Bibl", 4)) // If Bibles, put first in list + node = installTree->Items->AddChildFirst(0, mods->second->Type()); + else node = installTree->Items->AddChild(0, mods->second->Type()); + } + nodeName = "["; + nodeName += mods->second->Name(); + nodeName += "] "; + nodeName += mods->second->Description(); + node = installTree->Items->AddChildObject(node, nodeName.c_str(), mods->second->Name()); + } + for (node = installTree->Items->GetFirstNode(); node; node = node->getNextSibling()) + node->Expand(true); + node = installTree->Items->GetFirstNode(); +// if (node) +// node->MakeVisible(); +} + + +void TMainForm::fillSourceTree(const char *sourceConf, TTreeView *tree) +{ + ModMap::iterator mods; + TTreeNode *node; + SectionMap::iterator sections, targetSection; + ConfigEntMap::iterator entry; + string secName; + const char * modDesc; + string nodeName; + string targetVersion; + string sourceVersion; + bool cipher; + + SWMgr *mgr; + +// if (tree == localTree) { + if (localMgr) + delete localMgr; + mgr = localMgr = new SWMgr(sourceConf); +/* + } + else { + InstallSourceTab *ist = (InstallSourceTab *) MainForm->PageControl1->ActivePage->Controls[0]; + if (ist->mgr) + delete ist->mgr; + mgr = ist->mgr = new SWMgr(sourceConf); + } +*/ + + tree->Items->Clear(); + + if (!mgr->configPath) + return; + + for (sections = mgr->config->Sections.begin(); sections != mgr->config->Sections.end(); sections++) { + + cipher = false; + + if (!strcmp(sections->first.c_str(), "Globals")) // skip [Globals] + continue; + + mods = mgr->Modules.find(sections->first.c_str()); + if (mods != mgr->Modules.end()) + secName = mods->second->Type(); + else { + secName = "Other"; + } + + string misc1 = ((entry = sections->second.find("Category")) != sections->second.end()) ? (*entry).second : (string)""; + if (misc1.length() > 0) + secName = misc1; + + entry = sections->second.find("Description"); + if (entry != sections->second.end()) + modDesc = entry->second.c_str(); + else modDesc = ""; + + + targetVersion = "0.0"; + sourceVersion = "1.0"; + + entry = sections->second.find("CipherKey"); + if (entry != sections->second.end()) + cipher = true; + + entry = sections->second.find("Version"); + if (entry != sections->second.end()) + sourceVersion = entry->second.c_str(); + + targetSection = manager->config->Sections.find(sections->first); + if (targetSection != manager->config->Sections.end()) { + targetVersion = "1.0"; + entry = targetSection->second.find("Version"); + if (entry != targetSection->second.end()) + targetVersion = entry->second; + } + + if (VersionInfo(sourceVersion.c_str()) > VersionInfo(targetVersion.c_str())) { + for (node = tree->Items->GetFirstNode(); node; node = node->getNextSibling()) { + if (!strcmp(string(node->Text).c_str(), secName.c_str())) { + break; + } + } + + if (!node) { // Add Section + if (!strncmp(secName.c_str(), "Bibl", 4)) // If Bibles, put first in list + node = tree->Items->AddChildFirst(0, secName.c_str()); + else node = tree->Items->AddChild(0, secName.c_str()); + node->ImageIndex = 0; + } + nodeName = "[" + sections->first + "] " + modDesc; + node = tree->Items->AddChildObject(node, nodeName.c_str(), (void *) sections->first.c_str()); + gtk_signal_connect (GTK_OBJECT (node->nativeControl), "button_press_event", + GTK_SIGNAL_FUNC (on_localTreeButtonPress), + NULL); + + if (VersionInfo(targetVersion.c_str()) < VersionInfo("1.0")) { + node->ImageIndex = 1; +// node->SelectedIndex = 1; + } + else { + node->ImageIndex = 2; +// node->SelectedIndex = 2; + } + if (cipher) { + node->ImageIndex += 2; +// node->SelectedIndex += 2; + } + node->StateIndex = 0; + } + } + for (node = tree->Items->GetFirstNode(); node; node = node->getNextSibling()) + node->Expand(true); + node = tree->Items->GetFirstNode(); +// if (node) +// node->MakeVisible(); +} + + +void TMainForm::Button5Click(GtkWidget *Sender) +{ + TTreeView *tree; +/* + for (int i = 0; i < PageControl1->ActivePage->ControlCount; i++) { + if (PageControl1->ActivePage->Controls[i]->ClassNameIs("TTreeView")) { + tree = (TTreeView*)(PageControl1->ActivePage->Controls[i]); + break; + } + } +*/ + tree = localTree; + + TTreeNode *node = tree->Selected; + if (node) { + if (node->Parent) { + if (node->StateIndex == 1) + node->StateIndex = 0; + else node->StateIndex = 1; + tree->Repaint(); + } + } +} +/* +//--------------------------------------------------------------------------- + +void TMainForm::localTreeDblClick(GtkWidget *Sender) +{ + Button5Click(Sender); +} +//--------------------------------------------------------------------------- +*/ + +int TMainForm::selectAll(TTreeView *tree, bool sel) +{ + TTreeNode *node; + TTreeNode *node2; + int retCount = 0; + + for (node = tree->Items->GetFirstNode(); node; node = node->getNextSibling()) { + for (node2 = node->getFirstChild(); node2; node2 = node2->getNextSibling()) { + if (node2->StateIndex == 1) { + if (!sel) { + node2->StateIndex = 0; //node2->StateIndex; + retCount++; + } + } + else { + if (sel) { + node2->StateIndex = 1; + retCount++; + } + } + } + } + return retCount; +} + + +void TMainForm::Button6Click(GtkWidget *Sender) // SELECT ALL +{ + TTreeView *tree; +/* + for (int i = 0; i < PageControl1->ActivePage->ControlCount; i++) { + if (PageControl1->ActivePage->Controls[i]->ClassNameIs("TTreeView")) { + tree = (TTreeView*)(PageControl1->ActivePage->Controls[i]); + break; + } + } +*/ + tree = localTree; + if (!selectAll(tree, true)) + selectAll(tree, false); + tree->Repaint(); +} +/* +//--------------------------------------------------------------------------- + +void TMainForm::Image1Click(GtkWidget *Sender) +{ + ShellExecute(this->Handle, "open", "http://www.crosswire.org", NULL, NULL, SW_SHOWNORMAL); + +} +//--------------------------------------------------------------------------- + +*/ + +int TMainForm::removeModule(const char *modName) +{ + SectionMap::iterator module; + ConfigEntMap::iterator fileBegin; + ConfigEntMap::iterator fileEnd, entry; + + module = manager->config->Sections.find(modName); + + if (module != manager->config->Sections.end()) { + entry = module->second.find("CipherKey"); + if (entry != module->second.end()) +// CipherForm->cipherEdit->Text = entry->second.c_str(); + + fileBegin = module->second.lower_bound("File"); + fileEnd = module->second.upper_bound("File"); + +/* + if (fileBegin != fileEnd) { // remove each file + while (fileBegin != fileEnd) { + //remove file + remove(fileBegin->second.c_str()); + fileBegin++; + } + } + else { //remove all files in DataPath directory +*/ + + DIR *dir; + struct dirent *ent; + ConfigEntMap::iterator entry; + string modDir; + string modFile; + + entry = module->second.find("DataPath"); + if (entry != module->second.end()) { + modDir = manager->prefixPath; + if ((manager->prefixPath[strlen(manager->prefixPath)-1] != '\\') && (manager->prefixPath[strlen(manager->prefixPath)-1] != '/')) + modDir += "/"; + + modDir += entry->second.c_str(); + entry = module->second.find("ModDrv"); + if (entry != module->second.end()) { + if (!strcmp(entry->second.c_str(), "RawLD")) { + char *buf = new char [ strlen(modDir.c_str()) + 1 ]; + + strcpy(buf, modDir.c_str()); + int end = strlen(buf) - 1; + while (end) { + if (buf[end] == '/') + break; + end--; + } + buf[end] = 0; + modDir = buf; + delete [] buf; + } + } + + if (dir = opendir(modDir.c_str())) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = modDir; + modFile += "/"; + modFile += ent->d_name; + remove(modFile.c_str()); + } + } + closedir(dir); + } + if (dir = opendir(manager->configPath)) { // find and remove .conf file + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = manager->configPath; + modFile += "/"; + modFile += ent->d_name; + SWConfig *config = new SWConfig(modFile.c_str()); + if (config->Sections.find(modName) != config->Sections.end()) { + delete config; + remove(modFile.c_str()); + } + else delete config; + } + } + closedir(dir); + } + } +// } + return 0; + } + return 1; +} + + +int TMainForm::createParent(const char *pName) +{ + char *buf = new char [ strlen(pName) + 1 ]; + int retCode; + + strcpy(buf, pName); + int end = strlen(buf) - 1; + while (end) { + if (buf[end] == '/') + break; + end--; + } + buf[end] = 0; + if (!strlen(buf)) + return -1; + + if ((retCode = mkdir(buf, 0755))) { + createParent(buf); + retCode = mkdir(buf, 0755); + } + delete [] buf; + return retCode; +} + + +int TMainForm::createPathAndFile(const char *fName) +{ + int fd; + + fd = open(fName, O_CREAT|O_WRONLY|O_BINARY, 00644); + if (fd < 1) { + createParent(fName); + fd = open(fName, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE); + } + return fd; +} + + +int TMainForm::copyFileToCWD(const char *sourceDir, const char *fName) +{ + string sourcePath = sourceDir; + sourcePath += fName; + + string dest; + dest = manager->prefixPath; + if ((manager->prefixPath[strlen(manager->prefixPath)-1] != '\\') && (manager->prefixPath[strlen(manager->prefixPath)-1] != '/')) + dest += "/"; + dest +=fName; + return copyFile(sourcePath.c_str(), dest.c_str()); +} + + +int TMainForm::copyFile(const char *sourceFile, const char *targetFile) +{ + int sfd, dfd, len; + char buf[4096]; + + if ((sfd = open(sourceFile, O_RDONLY|O_BINARY)) < 1) + return -1; + if ((dfd = createPathAndFile(targetFile)) < 1) + return -1; + + do { + len = read(sfd, buf, 4096); + write(dfd, buf, len); + } + while(len == 4096); + close(dfd); + close(sfd); + + return 0; +} + + +int TMainForm::installModule(const char *modName, InstallSourceTab *ist) +{ + SectionMap::iterator module, section; + ConfigEntMap::iterator fileBegin; + ConfigEntMap::iterator fileEnd; + ConfigEntMap::iterator entry; + string sourceDir; + string buffer; + bool aborted = false; + bool cipher = false; + + if (ist) + sourceDir = "./sources/" + ist->Source; + else sourceDir = getLocalDir(); + + SWMgr mgr(sourceDir.c_str()); + + module = mgr.config->Sections.find(modName); + + if (module != mgr.config->Sections.end()) { + + entry = module->second.find("CipherKey"); + if (entry != module->second.end()) + cipher = true; + + fileEnd = module->second.upper_bound("File"); + fileBegin = module->second.lower_bound("File"); + + if (fileBegin != fileEnd) { // copy each file + if (ist) { + while (fileBegin != fileEnd) { // ftp each file first + buffer = sourceDir + "/" + fileBegin->second; +// if (FTPCopy(ist, fileBegin->second.c_str(), buffer.c_str())) { +// aborted = true; +// break; // user aborted +// } + fileBegin++; + } + fileBegin = module->second.lower_bound("File"); + } + + if (!aborted) { + // DO THE INSTALL + while (fileBegin != fileEnd) { + copyFileToCWD(sourceDir.c_str(), fileBegin->second.c_str()); + fileBegin++; + } + } + //--------------- + + if (ist) { + fileBegin = module->second.lower_bound("File"); + while (fileBegin != fileEnd) { // delete each tmp ftp file + buffer = sourceDir + "/" + fileBegin->second; + remove(buffer.c_str()); + fileBegin++; + } + } + } + else { //copy all files in DataPath directory + DIR *dir; + struct dirent *ent; + ConfigEntMap::iterator entry; + string modDir; + string modFile; + string sourceOrig = sourceDir; + + entry = module->second.find("DataPath"); + if (entry != module->second.end()) { + modDir = entry->second.c_str(); + entry = module->second.find("ModDrv"); + if (entry != module->second.end()) { + if (!strcmp(entry->second.c_str(), "RawLD")) { + char *buf = new char [ strlen(modDir.c_str()) + 1 ]; + + strcpy(buf, modDir.c_str()); + int end = strlen(buf) - 1; + while (end) { + if (buf[end] == '/') + break; + end--; + } + buf[end] = 0; + modDir = buf; + delete [] buf; + } + } + + if (ist) { + buffer = sourceDir + "/" + modDir; +// if (FTPCopy(ist, modDir.c_str(), buffer.c_str(), true)) { +// aborted = true; // user aborted +// } + } + sourceDir += "/"; + sourceDir += modDir; + if (!aborted) { + if (dir = opendir(sourceDir.c_str())) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = modDir; + modFile += "/"; + modFile += ent->d_name; + copyFileToCWD(sourceOrig.c_str(), modFile.c_str()); + } + } + closedir(dir); + } + } + if (ist) { // delete tmp ftp files + if (dir = opendir(sourceDir.c_str())) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = sourceOrig + "/" + modDir; + modFile += "/"; + modFile += ent->d_name; + remove(modFile.c_str()); + } + } + closedir(dir); + } + } + sourceDir = sourceOrig; + sourceDir += "/mods.d/"; + if (!aborted) { + if (dir = opendir(sourceDir.c_str())) { // find and copy .conf file + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = sourceDir; + modFile += ent->d_name; + SWConfig *config = new SWConfig(modFile.c_str()); + if (config->Sections.find(modName) != config->Sections.end()) { + delete config; + string targetFile = manager->configPath; //"./mods.d/"; + targetFile += "/"; + targetFile += ent->d_name; + copyFile(modFile.c_str(), targetFile.c_str()); + if (cipher) { +// CipherForm->modName = modName; +// CipherForm->confFile = targetFile; +// CipherForm->ShowModal(); + } + } + else delete config; + } + } + closedir(dir); + } + } + } + } + return (aborted) ? -1 : 0; + } + return 1; +} + + +void TMainForm::fillAllSourceTrees() +{ + fillSourceTree(getLocalDir(), localTree); +/* + for (int i = 1; i < PageControl1->PageCount; i++) { + InstallSourceTab *ist = (InstallSourceTab *) MainForm->PageControl1->Pages[i]->Controls[0]; + string parent = "./sources/" + ist->Source; + fillSourceTree(parent.c_str(), ist->tree); + } +*/ +} + + +void TMainForm::Button4Click(GtkWidget *Sender) // REMOVE MODULE +{ + TTreeNode *node = installTree->Selected; + if (node) { + if (node->Parent) { + removeModule((const char *)(void *)node->Data); + delete manager; + manager = new SWMgr(); + fillInstallTree(); + fillAllSourceTrees(); + } + } +} +//--------------------------------------------------------------------------- + +void TMainForm::Button2Click(GtkWidget *Sender) // INSTALL +{ + TTreeNode *node; + int count = 0; + int abort = 0; + //gtk temporary + float position = 0; + +/* + class TWaitCursor { + public: + TWaitCursor() : oldc(Screen->Cursor) { Screen->Cursor = crHourGlass; } + ~TWaitCursor() { Screen->Cursor = oldc; } + private: + TCursor oldc; + } wait; // show hourglass +*/ + + TTreeView *tree; +/* + for (int i = 0; i < PageControl1->ActivePage->ControlCount; i++) { + if (PageControl1->ActivePage->Controls[i]->ClassNameIs("TTreeView")) { + tree = (TTreeView*)(PageControl1->ActivePage->Controls[i]); + break; + } + } +*/ + tree = localTree; + + for (node = tree->Items->GetFirstNode(); node; node = node->GetNext()) { + if (node->StateIndex == 1) + count++; + } // do true progress bar + + if (!count) return; // if nothing is selected, do nothing + +// progressBar->Max = count; +// progressBar->Position = 0; + gtk_progress_bar_update(GTK_PROGRESS_BAR(appbar1), 0); + gtk_progress_set_show_text(GTK_PROGRESS(appbar1), 1); + + for (node = tree->Items->GetFirstNode(); node; node = node->GetNext()) { + if (node->StateIndex == 1) { // if selected for install +// CipherForm->cipherEdit->Text = ""; + if ((node->ImageIndex == 2) || (node->ImageIndex == 4)) { // if this is an upgrade + removeModule((const char *)(void *)node->Data); + } + // install module +// statusBar->Caption = "Installing: " + node->Text + "..."; + string statusText = "Installing: " + string(node->Text) + "..."; + gtk_progress_set_format_string(GTK_PROGRESS(appbar1), statusText.c_str()); + +// statusBar->Repaint(); + if (tree == localTree) + abort = installModule((const char *)(void *)node->Data); +// else abort = installModule((const char *)(void *)node->Data, (InstallSourceTab *) PageControl1->ActivePage->Controls[0]); + if (abort) + break; +// progressBar->Position++; + position++; + gtk_progress_bar_update(GTK_PROGRESS_BAR(appbar1), position/count); + while (g_main_iteration(FALSE)); // force refresh + } + } + delete manager; + manager = new SWMgr(); + fillInstallTree(); + fillAllSourceTrees(); +// statusBar->Caption = ""; +// progressBar->Position = 0; + gtk_progress_set_format_string(GTK_PROGRESS(appbar1), ""); + gtk_progress_bar_update(GTK_PROGRESS_BAR(appbar1), 0); +} + + +/* +int TMainForm::FTPCopy(InstallSourceTab *ist, const char *src, const char *dest, bool dirTransfer) +{ + StatusForm->ist = ist; + StatusForm->src = src; + StatusForm->dest = dest; + StatusForm->dirTransfer = dirTransfer; + + Application->ProcessMessages(); + if (StatusForm->ShowModal() == mrCancel) + return -1; + else return 0; +} + + +void TMainForm::RefreshRemoteSource(GtkWidget *Sender) +{ + InstallSourceTab *ist = (InstallSourceTab *) MainForm->PageControl1->ActivePage->Controls[0]; + DIR *dir; + struct dirent *ent; + ConfigEntMap::iterator entry; + string modDir; + string modFile; + string target = "./sources/"; + target += ist->Source.c_str(); + target += "/mods.d"; + + if (dir = opendir(target.c_str())) { + rewinddir(dir); + while ((ent = readdir(dir))) { + if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) { + modFile = target; + modFile += "/"; + modFile += ent->d_name; + remove(modFile.c_str()); + } + } + closedir(dir); + } + + + FTPCopy(ist, "mods.d", target.c_str(), true); + + target = "./sources/"; + target += ist->Source.c_str(); + + fillSourceTree(target.c_str(), ist->tree); +} + + + +void TMainForm::SpeedButton1Click(GtkWidget *Sender) +{ + InfoForm->Caption = "W A R N I N G"; + InfoForm->info = "\\qc {\\b \\fs20 -=+* WARNING *+=- -=+* WARNING *+=-}\\par\\par\\pard "; + InfoForm->info += "Although Install Manager provides a convenient way for installing and upgrading SWORD components, it also uses a systematic method for accessing sites which gives packet sniffers a target to lock into for singling out users. \\par\\par "; + InfoForm->info += "\\b\\qc IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION, YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES."; + InfoForm->ShowModal(); + if (RemoteMntForm->ShowModal() == mrOk) { + delete installConf; + installConf = new SWConfig("./InstallMgr.conf"); + + refreshPageControl(); + } +} + +void TMainForm::SpeedButton5Click(GtkWidget *Sender) +{ + TTreeView *tree; + InstallSourceTab *ist = 0; + SectionMap::iterator module; + ConfigEntMap::iterator entry, entryEnd; + string sourceDir; + + if (PageControl1->ActivePage != PageControl1->Pages[0]) { + ist = (InstallSourceTab *) PageControl1->ActivePage->Controls[0]; + tree = ist->tree; + } + else tree = localTree; + + TTreeNode *node = tree->Selected; + if (node) { + if (node->Parent) { + if (ist) + sourceDir = "./sources/" + ist->Source; + else sourceDir = getLocalDir(); + SWMgr *mgr = new SWMgr(sourceDir.c_str()); + + module = mgr->config->Sections.find((const char *)node->Data); + + if (module != mgr->config->Sections.end()) { + string targetVersion = "0.0"; + string sourceVersion = "1.0"; + SectionMap::iterator targetSection; + + entry = module->second.find("Version"); + if (entry != module->second.end()) + sourceVersion = entry->second.c_str(); + + targetSection = manager->config->Sections.find(module->first); + if (targetSection != manager->config->Sections.end()) { + targetVersion = "1.0"; + entry = targetSection->second.find("Version"); + if (entry != targetSection->second.end()) + targetVersion = entry->second; + } + if (VersionInfo(targetVersion.c_str()) < VersionInfo("1.0")) { + InfoForm->info = "\\pard{\\b * Additional Module Available for Install. } \\par "; + } + else { + InfoForm->info = "\\pard{\\b + Upgraded Module Available for Install.}\\par\\tab Current Version: \\tab " + targetVersion + " \\par\\tab Upgrade Version:\\tab " + sourceVersion + " \\par "; + bool changes = false; + for (entry = module->second.begin(); entry != module->second.end(); entry++) { + if (!strncmp(entry->first.c_str(), "History_", 8)) { + if (VersionInfo(&entry->first.c_str()[8]) > VersionInfo(targetVersion.c_str())) { + if (!changes) { + changes = true; + InfoForm->info += "\\par{\\b Changes: }\\par "; + } + InfoForm->info += "\\tab "; + InfoForm->info += entry->second.c_str(); + InfoForm->info += "\\par "; + } + } + } + } + + entry = module->second.find("About"); + if (entry != module->second.end()) { + InfoForm->info += "\\par{\\b About: } \\par\\par "; + InfoForm->info += entry->second.c_str(); + } + InfoForm->Caption = "Module Information"; + InfoForm->ShowModal(); + } + delete mgr; + } + } +} +//--------------------------------------------------------------------------- + +void TMainForm::Exit1Click(GtkWidget *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- + +*/ +void TMainForm::deleteAllModules() { + + SWMgr *mgr = new SWMgr(); + + + int count = mgr->Modules.size(); + + if (!count) + return; + +// UninstallForm->Show(); +// UninstallForm->ProgressBar1->Max = count; +// UninstallForm->ProgressBar1->Position = 0; + + ModMap::iterator it; + for (it = mgr->Modules.begin(); it != mgr->Modules.end(); it++) { + string label = "Uninstalling: ["; + label += it->second->Name(); + label += "] "; + label += it->second->Description(); +// UninstallForm->Label1->Caption = label.c_str(); +// UninstallForm->Label1->Repaint(); + removeModule(it->second->Name()); +// UninstallForm->ProgressBar1->Position = UninstallForm->ProgressBar1->Position + 1; +// UninstallForm->ProgressBar1->Repaint(); + } + delete mgr; +// UninstallForm->Hide(); + return; +} + +void TMainForm::FormShow(GtkWidget *Sender) { + +/* + for (int i=0;i<=ParamCount();i++) { + if (LowerCase(ParamStr(i)) == "-uninstall") { + deleteAllModules(); + Application->Terminate(); + } + } + +*/ + gtk_widget_show (main_window); + + localTree->StateImages->Add(null_xpm, GTK_WIDGET(localTree->nativeControl)); + localTree->StateImages->Add(arrow2r_xpm, GTK_WIDGET(localTree->nativeControl)); + localTree->Images->Add(bookshut_xpm, GTK_WIDGET(localTree->nativeControl)); + localTree->Images->Add(bulbon_xpm, GTK_WIDGET(localTree->nativeControl)); + localTree->Images->Add(fingerup_xpm, GTK_WIDGET(localTree->nativeControl)); + localTree->Images->Add(bulblk_xpm, GTK_WIDGET(localTree->nativeControl)); + localTree->Images->Add(upgrdlk_xpm, GTK_WIDGET(localTree->nativeControl)); + + TCustomImageList *im = new TCustomImageList(localTree); // cheeze + im->Add(sword_xpm, GTK_WIDGET(banner_panel)); + im->Add(globe_xpm, GTK_WIDGET(banner_panel)); + im->Add(arrow2r_xpm, GTK_WIDGET(banner_panel)); + + pixmap1 = GTK_WIDGET(im->GetPixmap(0)); + gtk_widget_ref (pixmap1); + gtk_object_set_data_full (GTK_OBJECT (main_window), "pixmap1", pixmap1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (pixmap1); + gtk_box_pack_start (GTK_BOX (banner_panel), pixmap1, FALSE, FALSE, 0); + + label3 = gtk_label_new (_("Available ")); + gtk_widget_ref (label3); + gtk_object_set_data_full (GTK_OBJECT (main_window), "label3", label3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label3); + gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar2), label3, NULL, NULL); + + tmp_toolbar_icon = GTK_WIDGET(im->GetPixmap(1)); + GlobeBtn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2), + GTK_TOOLBAR_CHILD_BUTTON, + NULL, + _("Mng Rmt Srcs"), + NULL, NULL, + tmp_toolbar_icon, NULL, NULL); + gtk_widget_ref (GlobeBtn); + gtk_object_set_data_full (GTK_OBJECT (main_window), "GlobeBtn", GlobeBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GlobeBtn); + + label5 = gtk_label_new (_(" ")); + gtk_widget_ref (label5); + gtk_object_set_data_full (GTK_OBJECT (main_window), "label5", label5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label5); + gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar2), label5, NULL, NULL); + + pixmap2 = GTK_WIDGET(im->GetPixmap(2)); + gtk_widget_ref (pixmap2); + gtk_object_set_data_full (GTK_OBJECT (main_window), "pixmap2", pixmap2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (pixmap2); + gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar2), pixmap2, NULL, NULL); + + label4 = gtk_label_new (_("Selected for Install")); + gtk_widget_ref (label4); + gtk_object_set_data_full (GTK_OBJECT (main_window), "label4", label4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label4); + gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar2), label4, NULL, NULL); + + gtk_signal_connect (GTK_OBJECT (pixmap1), "button_press_event", + GTK_SIGNAL_FUNC (on_pixmap1_button_press_event), + NULL); + gtk_signal_connect (GTK_OBJECT (GlobeBtn), "clicked", + GTK_SIGNAL_FUNC (on_GlobeBtn_clicked), + NULL); + + fillInstallTree(); + fillSourceTree(getLocalDir(), localTree); +} +//--------------------------------------------------------------------------- + diff --git a/apps/X11/InstallMgr/src/MainFrm.h b/apps/X11/InstallMgr/src/MainFrm.h new file mode 100644 index 0000000..c7eefae --- /dev/null +++ b/apps/X11/InstallMgr/src/MainFrm.h @@ -0,0 +1,169 @@ +//--------------------------------------------------------------------------- +#ifndef MainFrmH +#define MainFrmH +//--------------------------------------------------------------------------- +#include <swmgr.h> +//#include <gnome.h> +#include <TCustomImageList.h> +#include <TTreeView.h> +#include <TTreeNode.h> +#include <TTreeNodes.h> + + +#ifdef ENABLE_NLS +# include <libintl.h> +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + + + + +class VersionInfo { + public: + int major, minor, minor2, minor3; + + VersionInfo(const char *version); + int compare(const VersionInfo &vi) const; + bool operator>(const VersionInfo &vi) const {return (compare(vi) > 0);} + bool operator<(const VersionInfo &vi) const {return (compare(vi) < 0);} + bool operator==(const VersionInfo &vi) const {return (compare(vi) == 0);} +}; + + +class InstallSourceTab { +public: + InstallSourceTab(GtkWidget *Owner, const char *confEnt, const char *type); + ~InstallSourceTab(); + string Type; + string Source; + string Directory; + string Caption; + GtkWidget *tree; + SWMgr *mgr; +}; + + +//--------------------------------------------------------------------------- +class TMainForm { + class TWebThread; + friend class TWebThread; + + GtkAccelGroup *accel_group; + GtkWidget *menubar1; + GtkWidget *banner_panel; + guint tmp_key; + GtkWidget *file2; + GtkWidget *file2_menu; + GtkAccelGroup *file2_menu_accels; + GtkWidget *exit1; + GtkWidget *options1; + GtkWidget *options1_menu; + GtkAccelGroup *options1_menu_accels; + GtkWidget *local_path1; + GtkWidget *manage_remote_sources1; + GtkWidget *main_window; + GtkWidget *dock1; + GtkWidget *vbox1; + GtkWidget *pixmap1; + GtkWidget *hpaned1; + GtkWidget *vbox2; + GtkWidget *toolbar2; + GtkWidget *label3; + GtkWidget *tmp_toolbar_icon; + GtkWidget *GlobeBtn; + GtkWidget *label5; + GtkWidget *pixmap2; + GtkWidget *label4; + GtkWidget *notebook1; + GtkWidget *scrolledwindow3; + GtkWidget *viewport1; + GtkWidget *label1; + GtkWidget *toolbar3; + GtkWidget *InfoBtn; + GtkWidget *SelectBtn; + GtkWidget *SelectAllBtn; + GtkWidget *InstallBtn; + GtkWidget *vbox3; + GtkWidget *label2; + GtkWidget *scrolledwindow4; + GtkWidget *viewport2; + GtkWidget *toolbar4; + GtkWidget *RemoveBtn; + GtkWidget *appbar1; +// GtkWidget *InstalledTree; + TTreeView *installTree; + TTreeView *localTree; + TCustomImageList *ImageList1; + TCustomImageList *ImageList2; + +public: + GtkWidget *localPathDlg; + void FormCreate(GtkWidget *Sender); + void LocalPath1Click(GtkWidget *Sender); + void LocalPath1Click_ok(GtkWidget *Sender); + void Button5Click(GtkWidget *Sender); + void Button6Click(GtkWidget *Sender); + void Button4Click(GtkWidget *Sender); + void Button2Click(GtkWidget *Sender); +/* + void localTreeDblClick(GtkWidget *Sender); + void Image1Click(GtkWidget *Sender); + void SpeedButton1Click(GtkWidget *Sender); + void SpeedButton5Click(GtkWidget *Sender); + void Exit1Click(GtkWidget *Sender); +*/ + void FormShow(GtkWidget *Sender); + + void refreshPageControl(); + +private: // User declarations + + SWMgr *manager; + SWConfig *installConf; + const char *getLocalDir(); + void setLocalDir(const char *idir); + void fillAllSourceTrees(); + void deleteAllModules(); +/* + void addSource(InstallSourceTab *ist); +*/ + +public: // User declarations + TMainForm(GtkWidget* Owner); + ~TMainForm(); + int selectAll(TTreeView *tree, bool sel); + int removeModule(const char *modName); + int installModule(const char *modName, InstallSourceTab *ist = 0); + static int createParent(const char *pName); + int createPathAndFile(const char *fName); + int copyFile(const char *sourceFile, const char *targetFile); + int copyFileToCWD(const char *sourceDir, const char *fName); +/* + void RefreshRemoteSource(GtkWidget *Sender); + int FTPCopy(InstallSourceTab *ist, const char *src, const char *dest, bool dirTransfer = false); +*/ + SWMgr *localMgr; + +protected: + virtual void fillInstallTree(); + virtual void fillSourceTree(const char *sourceConf, TTreeView *tree); +}; + +//--------------------------------------------------------------------------- +extern TMainForm *MainForm; +//--------------------------------------------------------------------------- +#endif diff --git a/apps/X11/InstallMgr/src/Makefile b/apps/X11/InstallMgr/src/Makefile new file mode 100644 index 0000000..e0f6e15 --- /dev/null +++ b/apps/X11/InstallMgr/src/Makefile @@ -0,0 +1,387 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. +prefix = /usr/local +exec_prefix = ${prefix} + +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 +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/installmgr +pkglibdir = $(libdir)/installmgr +pkgincludedir = $(includedir)/installmgr + +top_builddir = .. + +ACLOCAL = aclocal -I macros +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = +CATOBJEXT = .gmo +CC = gcc +CXX = c++ +DATADIRNAME = share +GENCAT = +GMOFILES = +GMSGFMT = /usr/bin/msgfmt +GNOMEGNORBA_LIBS = -rdynamic -lgnorba -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lnsl -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNOMEUI_LIBS = -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNOME_APPLETS_LIBS = +GNOME_CAPPLET_LIBS = +GNOME_CONFIG = /usr/bin/gnome-config +GNOME_INCLUDEDIR = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNOME_LIBDIR = -rdynamic -L/usr/lib -L/usr/X11R6/lib +GNOME_LIBS = -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GNORBA_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNORBA_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnorba -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lnsl -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GTKXMHTML_LIBS = -rdynamic -lgtkxmhtml -lXpm -ljpeg -lpng -lz -lSM -lICE -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GTK_CFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +GTK_CONFIG = /usr/bin/gtk-config +GTK_LIBS = -lSM -lICE -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GT_NO = +GT_YES = #YES# +INCLUDE_LOCALE_H = #include <locale.h> +INSTOBJEXT = .mo +INTLDEPS = +INTLLIBS = +INTLOBJS = +MAKEINFO = makeinfo +MKINSTALLDIRS = ./mkinstalldirs +MSGFMT = /usr/bin/msgfmt +ORBIT_CFLAGS = -I/usr/lib/glib/include -I/usr/include +ORBIT_CONFIG = /usr/bin/orbit-config +ORBIT_IDL = /usr/bin/orbit-idl +ORBIT_LIBS = -L/usr/lib -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lglib -lnsl -lm +PACKAGE = installmgr +PACKAGE_PIXMAPS_DIR = /usr/share/pixmaps/installmgr +POFILES = +POSUB = po +PTHREAD_LIB = -lpthread +RANLIB = ranlib +USE_INCLUDED_LIBINTL = no +USE_NLS = yes +VERSION = 0.1 +XPM_LIBS = -lXpm +ZVT_LIBS = -rdynamic -static -lzvt -lutil -lSM -lICE -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +cflags_set = yes +cxxflags_set = @cxxflags_set@ +l = + +INCLUDES = -I$(top_srcdir)/intl -I/usr/lib/glib/include -I/usr/X11R6/include -I ../../../../include -I ../../VCL -static + + +bin_PROGRAMS = installmgr + +installmgr_SOURCES = main.cpp callbacks.cpp callbacks.h MainFrm.cpp MainFrm.h + +# interface.c interface.h \ +# support.c support.h \ + +installmgr_LDADD = -L../../../../lib -lVCL -lSM -lICE -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -static -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm $(INTLLIBS) -lsword -L ../../VCL -lz +installmgr_LDFLAGS = +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. +CPPFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +LDFLAGS = +LIBS = +installmgr_OBJECTS = main.o callbacks.o MainFrm.o +installmgr_DEPENDENCIES = ../../VCL +CXXFLAGS = -g -O2 +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ +CFLAGS = -g -O2 -Wall -Wunused +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +DEP_FILES = .deps/MainFrm.P .deps/callbacks.P .deps/main.P +SOURCES = $(installmgr_SOURCES) +OBJECTS = $(installmgr_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .cpp .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +installmgr: $(installmgr_OBJECTS) $(installmgr_DEPENDENCIES) + @rm -f installmgr + $(CXXLINK) $(installmgr_LDFLAGS) $(installmgr_OBJECTS) $(installmgr_LDADD) $(LIBS) +.cpp.o: + $(CXXCOMPILE) -c $< + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = src + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cpp + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cpp + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: install-binPROGRAMS +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ + mostlyclean-tags mostlyclean-depend mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ + distclean-depend distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir mostlyclean-depend \ +distclean-depend clean-depend maintainer-clean-depend info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/src/Makefile.am b/apps/X11/InstallMgr/src/Makefile.am new file mode 100644 index 0000000..0728ed5 --- /dev/null +++ b/apps/X11/InstallMgr/src/Makefile.am @@ -0,0 +1,20 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = \ + -I$(top_srcdir)/intl \ + @GTK_CFLAGS@ \ + -I ../../../../include \ + -I ../../VCL -static + +bin_PROGRAMS = installmgr + +installmgr_SOURCES = \ + main.cpp \ + callbacks.cpp callbacks.h \ + MainFrm.cpp MainFrm.h +# interface.c interface.h \ +# support.c support.h \ + +installmgr_LDADD = -L../../../../lib -lVCL @GTK_LIBS@ $(INTLLIBS) -lsword -L ../../VCL -lz +installmgr_LDFLAGS = + diff --git a/apps/X11/InstallMgr/src/Makefile.in b/apps/X11/InstallMgr/src/Makefile.in new file mode 100644 index 0000000..e2ada23 --- /dev/null +++ b/apps/X11/InstallMgr/src/Makefile.in @@ -0,0 +1,387 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +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 + +DESTDIR = + +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@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CXX = @CXX@ +DATADIRNAME = @DATADIRNAME@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@ +GNOMEUI_LIBS = @GNOMEUI_LIBS@ +GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@ +GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ +GNOME_CONFIG = @GNOME_CONFIG@ +GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ +GNOME_LIBDIR = @GNOME_LIBDIR@ +GNOME_LIBS = @GNOME_LIBS@ +GNORBA_CFLAGS = @GNORBA_CFLAGS@ +GNORBA_LIBS = @GNORBA_LIBS@ +GTKXMHTML_LIBS = @GTKXMHTML_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PTHREAD_LIB = @PTHREAD_LIB@ +RANLIB = @RANLIB@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XPM_LIBS = @XPM_LIBS@ +ZVT_LIBS = @ZVT_LIBS@ +cflags_set = @cflags_set@ +cxxflags_set = @cxxflags_set@ +l = @l@ + +INCLUDES = -I$(top_srcdir)/intl @GTK_CFLAGS@ -I ../../../../include -I ../../VCL -static + + +bin_PROGRAMS = installmgr + +installmgr_SOURCES = main.cpp callbacks.cpp callbacks.h MainFrm.cpp MainFrm.h + +# interface.c interface.h \ +# support.c support.h \ + +installmgr_LDADD = -L../../../../lib -lVCL @GTK_LIBS@ $(INTLLIBS) -lsword -L ../../VCL -lz +installmgr_LDFLAGS = +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I.. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +installmgr_OBJECTS = main.o callbacks.o MainFrm.o +installmgr_DEPENDENCIES = ../../VCL +CXXFLAGS = @CXXFLAGS@ +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +DEP_FILES = .deps/MainFrm.P .deps/callbacks.P .deps/main.P +SOURCES = $(installmgr_SOURCES) +OBJECTS = $(installmgr_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .cpp .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +installmgr: $(installmgr_OBJECTS) $(installmgr_DEPENDENCIES) + @rm -f installmgr + $(CXXLINK) $(installmgr_LDFLAGS) $(installmgr_OBJECTS) $(installmgr_LDADD) $(LIBS) +.cpp.o: + $(CXXCOMPILE) -c $< + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = src + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cpp + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cpp + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: install-binPROGRAMS +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ + mostlyclean-tags mostlyclean-depend mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ + distclean-depend distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir mostlyclean-depend \ +distclean-depend clean-depend maintainer-clean-depend info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/InstallMgr/src/RemoteMntFrm.cpp b/apps/X11/InstallMgr/src/RemoteMntFrm.cpp new file mode 100644 index 0000000..a6b04b3 --- /dev/null +++ b/apps/X11/InstallMgr/src/RemoteMntFrm.cpp @@ -0,0 +1,145 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop + +#include "RemoteMntFrm.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" + +TRemoteMntForm *RemoteMntForm; + + +class TRemoteSource : public TObject { +public: + string name; + string machine; + string dir; + TRemoteSource(const char *confEnt) { + char *buf = new char [ strlen(confEnt) + 1 ]; + + strcpy(buf, confEnt); + + name = strtok(buf, "|"); + machine = strtok(0, "|"); + dir = strtok(0, "|"); + delete [] buf; + } + string getConfEnt() { + return name +"|" + machine + "|" + dir; + } +}; + + +//--------------------------------------------------------------------------- +__fastcall TRemoteMntForm::TRemoteMntForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TRemoteMntForm::FormShow(TObject *Sender) +{ + ConfigEntMap::iterator loop, end; + config = new SWConfig("./InstallMgr.conf"); + ListBox1->Clear(); + loop = config->Sections["Sources"].lower_bound("FTPSource"); + end = config->Sections["Sources"].upper_bound("FTPSource"); + while (loop != end) { + TRemoteSource *rs = new TRemoteSource(loop->second.c_str()); + ListBox1->Items->AddObject(rs->name.c_str(), rs); + loop++; + } + ListBox1->ItemIndex = 0; + ListBox1Click(0); +} +//--------------------------------------------------------------------------- +void __fastcall TRemoteMntForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + delete config; +} + + +void __fastcall TRemoteMntForm::SpeedButton4Click(TObject *Sender) +{ + ModalResult = mrCancel; +} + + +void __fastcall TRemoteMntForm::ListBox1Click(TObject *Sender) +{ + if (ListBox1->ItemIndex >= 0) { + TRemoteSource *rs = (TRemoteSource *)ListBox1->Items->Objects[ListBox1->ItemIndex]; + + NameEdit->Text = rs->name.c_str(); + MachineEdit->Text = rs->machine.c_str(); + DirEdit->Text = rs->dir.c_str(); + } + else { + NameEdit->Text = ""; + MachineEdit->Text = ""; + DirEdit->Text = ""; + } +} + + +void __fastcall TRemoteMntForm::NameEditChange(TObject *Sender) +{ + if (ListBox1->ItemIndex < 0) + return; + TRemoteSource *rs = (TRemoteSource *)ListBox1->Items->Objects[ListBox1->ItemIndex]; + rs->name = NameEdit->Text.c_str(); + ListBox1->Items->Strings[ListBox1->ItemIndex] = rs->name.c_str(); +} + + +void __fastcall TRemoteMntForm::MachineEditChange(TObject *Sender) +{ + if (ListBox1->ItemIndex < 0) + return; + TRemoteSource *rs = (TRemoteSource *)ListBox1->Items->Objects[ListBox1->ItemIndex]; + rs->machine = MachineEdit->Text.c_str(); +} + + +void __fastcall TRemoteMntForm::DirEditChange(TObject *Sender) +{ + if (ListBox1->ItemIndex < 0) + return; + TRemoteSource *rs = (TRemoteSource *)ListBox1->Items->Objects[ListBox1->ItemIndex]; + rs->dir = DirEdit->Text.c_str(); +} + +void __fastcall TRemoteMntForm::SpeedButton2Click(TObject *Sender) +{ + if (ListBox1->ItemIndex < 0) + return; + int delItem = ListBox1->ItemIndex; + ListBox1->Items->Delete(delItem); + ListBox1->ItemIndex = (delItem < ListBox1->Items->Count) ? delItem : delItem - 1; + ListBox1Click(0); +} +//--------------------------------------------------------------------------- + +void __fastcall TRemoteMntForm::SpeedButton1Click(TObject *Sender) +{ + TRemoteSource *rs = new TRemoteSource("[New Remote Site]|ftp.domain.org|/pub/sword/"); + ListBox1->ItemIndex = ListBox1->Items->AddObject(rs->name.c_str(), rs); + + ListBox1Click(0); +} +//--------------------------------------------------------------------------- + +void __fastcall TRemoteMntForm::SpeedButton3Click(TObject *Sender) +{ + TRemoteSource *rs; + config->Sections["Sources"].erase("FTPSource"); + for (int i = 0; i < ListBox1->Items->Count; i++) { + rs = (TRemoteSource *)ListBox1->Items->Objects[i]; + config->Sections["Sources"].insert(ConfigEntMap::value_type("FTPSource", rs->getConfEnt().c_str())); + } + config->Save(); + ModalResult = mrOk; +} +//--------------------------------------------------------------------------- + diff --git a/apps/X11/InstallMgr/src/RemoteMntFrm.h b/apps/X11/InstallMgr/src/RemoteMntFrm.h new file mode 100644 index 0000000..81060e1 --- /dev/null +++ b/apps/X11/InstallMgr/src/RemoteMntFrm.h @@ -0,0 +1,49 @@ +//--------------------------------------------------------------------------- +#ifndef RemoteMntFrmH +#define RemoteMntFrmH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +#include <Controls.hpp> +#include <StdCtrls.hpp> +#include <Forms.hpp> +#include <Buttons.hpp> +#include <ExtCtrls.hpp> +#include <swconfig.h> +//--------------------------------------------------------------------------- +class TRemoteMntForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TPanel *Panel2; + TPanel *Panel3; + TListBox *ListBox1; + TSpeedButton *SpeedButton1; + TSpeedButton *SpeedButton2; + TEdit *NameEdit; + TEdit *MachineEdit; + TEdit *DirEdit; + TPanel *Panel4; + TSpeedButton *SpeedButton3; + TSpeedButton *SpeedButton4; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall NameEditChange(TObject *Sender); + void __fastcall SpeedButton4Click(TObject *Sender); + void __fastcall ListBox1Click(TObject *Sender); + void __fastcall MachineEditChange(TObject *Sender); + void __fastcall DirEditChange(TObject *Sender); + void __fastcall SpeedButton2Click(TObject *Sender); + void __fastcall SpeedButton1Click(TObject *Sender); + void __fastcall SpeedButton3Click(TObject *Sender); +private: // User declarations + SWConfig *config; +public: // User declarations + __fastcall TRemoteMntForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TRemoteMntForm *RemoteMntForm; +//--------------------------------------------------------------------------- +#endif diff --git a/apps/X11/InstallMgr/src/StatusFrm.cpp b/apps/X11/InstallMgr/src/StatusFrm.cpp new file mode 100644 index 0000000..36911d2 --- /dev/null +++ b/apps/X11/InstallMgr/src/StatusFrm.cpp @@ -0,0 +1,175 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop + +#include "StatusFrm.h" +#include "MainFrm.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TStatusForm *StatusForm; +//--------------------------------------------------------------------------- +__fastcall TStatusForm::TStatusForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TStatusForm::FormShow(TObject *Sender) +{ + abort = false; + ftpThread = new TFTPThread(ist, src.c_str(), dest.c_str(), dirTransfer, true); + ftpThread->OnTerminate = Cleanup; + ftpThread->Resume(); +} +//--------------------------------------------------------------------------- +__fastcall TStatusForm::TFTPThread::TFTPThread(InstallSourceTab *iist, const char *isrc, const char *idest, bool idirTransfer, bool CreateSuspended) + : TThread(CreateSuspended) +{ + ist = iist; + src = isrc; + dest = idest; + dirTransfer = idirTransfer; + Priority = tpNormal; + FreeOnTerminate = true; + Synchronize((TThreadMethod)&CreateFTPObject); +} + +__fastcall TStatusForm::TFTPThread::~TFTPThread() +{ + delete FTPLink; +} + + +void __fastcall TStatusForm::TFTPThread::Execute() +{ + Synchronize((TThreadMethod)&PreConnect); + FTPLink->OnPacketRecvd = FTPLinkPacketRecvd; + FTPLink->ParseList = true; + FTPLink->Host = ist->Source.c_str(); + FTPLink->Port = 21; + FTPLink->UserID = "ftp"; + FTPLink->Password = "installmgr@user.com"; + + try { + FTPLink->Connect(); + FTPLink->Mode(MODE_IMAGE); + FTPLink->ChangeDir(ist->Directory.c_str()); + } + catch(...) { + StatusForm->Button1Click(0); // abort thread + } + + if (!Terminated) { + if (dirTransfer) { + FTPLink->ChangeDir(src.c_str()); + fileList.clear(); + FTPLink->List(); + int fileCount = FTPLink->FTPDirectoryList->name->Count; + for (int i = 0; i < fileCount; i++) { + if (FTPLink->FTPDirectoryList->Attribute->Strings[i].c_str()[0] != 'd') { + buffer = dest + "/" + FTPLink->FTPDirectoryList->name->Strings[i].c_str(); + buffer2 = "Downloading ("; + buffer2 += IntToStr(i+1).c_str(); + buffer2 += " of "; + buffer2 += IntToStr(fileCount).c_str(); + buffer2 += "): "; + buffer2 += FTPLink->FTPDirectoryList->name->Strings[i].c_str(); + // SWLog::systemlog->LogInformation("%s", buffer.c_str()); + TMainForm::createParent(buffer.c_str()); // make sure parent directory exists + Synchronize((TThreadMethod)&PreDownload1); + try { + FTPLink->Download(FTPLink->FTPDirectoryList->name->Strings[i].c_str(), buffer.c_str()); + } + catch(...) {} + if (Terminated) + break; + } + } + + } + else { + Synchronize((TThreadMethod)&PreDownload2); + FTPLink->Download(src.c_str(), dest.c_str()); + } + try { + FTPLink->Disconnect(); + } + catch(...){} + } +} + + +void __fastcall TStatusForm::TFTPThread::FTPLinkPacketRecvd(TObject *Sender) +{ + Synchronize((TThreadMethod)&UpdateBytes); +} + + +void __fastcall TStatusForm::TFTPThread::UpdateBytes(void) +{ + StatusForm->statusBar->Caption = IntToStr(FTPLink->BytesRecvd) + " bytes out of " + IntToStr(FTPLink->BytesTotal) + " transferred (" + IntToStr((int)((float)(FTPLink->BytesRecvd + 1) / (float)(FTPLink->BytesTotal + 1) * 100)) + "%)"; + StatusForm->statusBar->Repaint(); +} + + +void __fastcall TStatusForm::TFTPThread::CreateFTPObject(void) +{ + FTPLink = new TNMFTP(0); +} + + +void __fastcall TStatusForm::TFTPThread::PreConnect(void) +{ + buffer = "Connecting to server at "; + buffer += ist->Source.c_str(); + buffer += "..."; + StatusForm->actionBar->Caption = buffer.c_str(); + StatusForm->statusBar->Caption = ""; + StatusForm->Repaint(); +} + + +void __fastcall TStatusForm::TFTPThread::PreDownload1(void) +{ +// SWLog::systemlog->LogInformation("Creating parent dir: %s", buffer.c_str()); +// SWLog::systemlog->LogInformation("Return: %d", ret); + StatusForm->actionBar->Caption = buffer2.c_str(); + StatusForm->statusBar->Caption = ""; + StatusForm->Repaint(); +} + + +void __fastcall TStatusForm::TFTPThread::PreDownload2(void) +{ + buffer = "Downloading: "; + buffer += src.c_str(); + StatusForm->actionBar->Caption = buffer.c_str(); + StatusForm->statusBar->Caption = ""; + StatusForm->Repaint(); + MainForm->createParent(dest.c_str()); // make sure parent directory exists +} + + +void __fastcall TStatusForm::Cleanup(TObject *Sender) +//void __fastcall TStatusForm::TFTPThread::Cleanup() +{ + if (abort) + StatusForm->ModalResult = mrCancel; + else StatusForm->ModalResult = mrOk; +// StatusForm->Close(); +} + +void __fastcall TStatusForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + MainForm->SetFocus(); +} +//--------------------------------------------------------------------------- + +void __fastcall TStatusForm::Button1Click(TObject *Sender) +{ + abort = true; + ftpThread->Terminate(); + ftpThread->FTPLink->Abort(); +} +//--------------------------------------------------------------------------- + diff --git a/apps/X11/InstallMgr/src/StatusFrm.h b/apps/X11/InstallMgr/src/StatusFrm.h new file mode 100644 index 0000000..fdf7800 --- /dev/null +++ b/apps/X11/InstallMgr/src/StatusFrm.h @@ -0,0 +1,61 @@ +//--------------------------------------------------------------------------- +#ifndef StatusFrmH +#define StatusFrmH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +#include <Controls.hpp> +#include <StdCtrls.hpp> +#include <Forms.hpp> +#include <ExtCtrls.hpp> +#include <NMFtp.hpp> +#include "MainFrm.h" +//--------------------------------------------------------------------------- +class TStatusForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TPanel *Panel2; + TButton *Button1; + TPanel *statusBar; + TPanel *Panel3; + TPanel *actionBar; + void __fastcall FormShow(TObject *Sender); + void __fastcall Cleanup(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall Button1Click(TObject *Sender); +private: // User declarations + class TFTPThread : public TThread { + bool abort; + InstallSourceTab *ist; + string src; + string dest; + string buffer; + string buffer2; + bool dirTransfer; + protected: + void __fastcall Execute(); + public: + TNMFTP *FTPLink; + list<string> fileList; + __fastcall TFTPThread(InstallSourceTab *iist, const char *isrc, const char *idest, bool idirTransfer = false, bool CreateSuspended = false); + __fastcall TFTPThread::~TFTPThread(); + void __fastcall FTPLinkPacketRecvd(TObject *Sender); + void __fastcall CreateFTPObject(void); + void __fastcall UpdateBytes(void); + void __fastcall PreConnect(void); + void __fastcall PreDownload1(void); + void __fastcall PreDownload2(void); +// void __fastcall Cleanup(void); + } *ftpThread; +public: // User declarations + InstallSourceTab *ist; + string src; + string dest; + bool dirTransfer; + bool abort; + __fastcall TStatusForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TStatusForm *StatusForm; +//--------------------------------------------------------------------------- +#endif diff --git a/apps/X11/InstallMgr/src/callbacks.cpp b/apps/X11/InstallMgr/src/callbacks.cpp new file mode 100644 index 0000000..99ccd44 --- /dev/null +++ b/apps/X11/InstallMgr/src/callbacks.cpp @@ -0,0 +1,154 @@ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <gtk/gtk.h> + +extern "C" { +#include "callbacks.h" +} +//#include "interface.h" +//#include "support.h" +#include <MainFrm.h> + + +void +on_exit1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ +gtk_main_quit(); +} + + +void +on_local_path1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + MainForm->LocalPath1Click(0); +} + + +void +on_manage_remote_sources1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +gboolean +on_pixmap1_button_press_event (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data) +{ + + return FALSE; +} + +gboolean +on_localTreeButtonPress (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data) +{ +// printf("button: %d\n", event->button); + if (event->button == 2) + MainForm->Button5Click(widget); + return FALSE; +} + + +void +on_GlobeBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + + +void +on_InfoBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + + +void +on_SelectBtn_clicked (GtkButton *button, + gpointer user_data) +{ + MainForm->Button5Click(GTK_WIDGET(button)); +} + + +void +on_SelectAllBtn_clicked (GtkButton *button, + gpointer user_data) +{ + MainForm->Button6Click(GTK_WIDGET(button)); +} + + +void +on_InstallBtn_clicked (GtkButton *button, + gpointer user_data) +{ + MainForm->Button2Click(GTK_WIDGET(button)); +} + + +void +on_RemoveBtn_clicked (GtkButton *button, + gpointer user_data) +{ + MainForm->Button4Click(GTK_WIDGET(button)); +} + + +void +on_OKBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + + +void +on_AddBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + + +void +on_NameText_changed (GtkEditable *editable, + gpointer user_data) +{ + +} + + +void +on_SaveBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + + +void +on_CancelBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + + +void +on_TryBtn_clicked (GtkButton *button, + gpointer user_data) +{ + +} + diff --git a/apps/X11/InstallMgr/src/callbacks.h b/apps/X11/InstallMgr/src/callbacks.h new file mode 100644 index 0000000..dbab442 --- /dev/null +++ b/apps/X11/InstallMgr/src/callbacks.h @@ -0,0 +1,72 @@ +#include <gtk/gtk.h> + + +void +on_exit1_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_local_path1_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_manage_remote_sources1_activate (GtkMenuItem *menuitem, + gpointer user_data); + +gboolean +on_pixmap1_button_press_event (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data); + +gboolean +on_localTreeButtonPress (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data); + +void +on_GlobeBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_InfoBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_SelectBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_SelectAllBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_InstallBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_RemoveBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_OKBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_AddBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_NameText_changed (GtkEditable *editable, + gpointer user_data); + +void +on_SaveBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_CancelBtn_clicked (GtkButton *button, + gpointer user_data); + +void +on_TryBtn_clicked (GtkButton *button, + gpointer user_data); diff --git a/apps/X11/InstallMgr/src/cipherfrm.cpp b/apps/X11/InstallMgr/src/cipherfrm.cpp new file mode 100644 index 0000000..5b77797 --- /dev/null +++ b/apps/X11/InstallMgr/src/cipherfrm.cpp @@ -0,0 +1,67 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop + +#include "cipherfrm.h" +#include <swmgr.h> +#include <swconfig.h> +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TCipherForm *CipherForm; +//--------------------------------------------------------------------------- +__fastcall TCipherForm::TCipherForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TCipherForm::Button2Click(TObject *Sender) +{ + SectionMap::iterator section; + ConfigEntMap::iterator entry; + SWConfig *modconf = new SWConfig(confFile.c_str()); + string tmpBuf; + + section = modconf->Sections.find(modName); + if (section != modconf->Sections.end()) { + entry = section->second.find("CipherKey"); + if (entry != section->second.end()) { + entry->second = CipherForm->cipherEdit->Text.c_str(); + modconf->Save(); + delete modconf; // close file + modconf = 0; + SWMgr *mgr = new SWMgr(); + SWModule *mod = mgr->Modules[modName]; + mod->SetKey("Ipet 2:12"); + tmpBuf = mod->StripText(); + mod->SetKey("gen 1:10"); + tmpBuf += "\r\n\r\n"; + tmpBuf += mod->StripText(); + Memo1->Text = tmpBuf.c_str(); + delete mgr; + } + } + if (modconf) + delete modconf; + +} +//--------------------------------------------------------------------------- + +void __fastcall TCipherForm::FormShow(TObject *Sender) +{ + string tmpCaption; + tmpCaption = "Cipher Key: ["; + tmpCaption += modName; + tmpCaption += "]"; + Caption = tmpCaption.c_str(); +} +//--------------------------------------------------------------------------- + + +void __fastcall TCipherForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + Memo1->Text = ""; +} +//--------------------------------------------------------------------------- + diff --git a/apps/X11/InstallMgr/src/cipherfrm.h b/apps/X11/InstallMgr/src/cipherfrm.h new file mode 100644 index 0000000..4fcd722 --- /dev/null +++ b/apps/X11/InstallMgr/src/cipherfrm.h @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------------- +#ifndef cipherfrmH +#define cipherfrmH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +#include <Controls.hpp> +#include <StdCtrls.hpp> +#include <Forms.hpp> +#include <ExtCtrls.hpp> +#include <string> +//--------------------------------------------------------------------------- +class TCipherForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TPanel *Panel2; + TPanel *Panel3; + TLabel *Label1; + TLabel *Label2; + TEdit *cipherEdit; + TMemo *Memo1; + TButton *Button1; + TButton *Button2; + void __fastcall Button2Click(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); +private: // User declarations +public: // User declarations + std::string confFile; + std::string modName; + __fastcall TCipherForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TCipherForm *CipherForm; +//--------------------------------------------------------------------------- +#endif diff --git a/apps/X11/InstallMgr/src/interface.c b/apps/X11/InstallMgr/src/interface.c new file mode 100644 index 0000000..b5ef755 --- /dev/null +++ b/apps/X11/InstallMgr/src/interface.c @@ -0,0 +1,510 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <string.h> + +#include <gnome.h> + +#include "callbacks.h" +#include "interface.h" +#include "support.h" + + +GtkWidget* +create_InfoFrm (void) +{ + GtkWidget *InfoFrm; + GtkWidget *dialog_vbox1; + GtkWidget *scrolledwindow1; + GtkWidget *InfoText; + GtkWidget *dialog_action_area1; + GtkWidget *OKBtn; + + InfoFrm = gnome_dialog_new (_("About Module"), NULL); + gtk_object_set_data (GTK_OBJECT (InfoFrm), "InfoFrm", InfoFrm); + gtk_window_set_modal (GTK_WINDOW (InfoFrm), TRUE); + gtk_window_set_policy (GTK_WINDOW (InfoFrm), FALSE, FALSE, FALSE); + + dialog_vbox1 = GNOME_DIALOG (InfoFrm)->vbox; + gtk_object_set_data (GTK_OBJECT (InfoFrm), "dialog_vbox1", dialog_vbox1); + gtk_widget_show (dialog_vbox1); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow1); + gtk_object_set_data_full (GTK_OBJECT (InfoFrm), "scrolledwindow1", scrolledwindow1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow1); + gtk_box_pack_start (GTK_BOX (dialog_vbox1), scrolledwindow1, TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + + InfoText = gtk_text_new (NULL, NULL); + gtk_widget_ref (InfoText); + gtk_object_set_data_full (GTK_OBJECT (InfoFrm), "InfoText", InfoText, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (InfoText); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), InfoText); + + dialog_action_area1 = GNOME_DIALOG (InfoFrm)->action_area; + gtk_object_set_data (GTK_OBJECT (InfoFrm), "dialog_action_area1", dialog_action_area1); + gtk_widget_show (dialog_action_area1); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_SPREAD); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area1), 8); + + gnome_dialog_append_button (GNOME_DIALOG (InfoFrm), GNOME_STOCK_BUTTON_OK); + OKBtn = g_list_last (GNOME_DIALOG (InfoFrm)->buttons)->data; + gtk_widget_ref (OKBtn); + gtk_object_set_data_full (GTK_OBJECT (InfoFrm), "OKBtn", OKBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (OKBtn); + GTK_WIDGET_SET_FLAGS (OKBtn, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (OKBtn), "clicked", + GTK_SIGNAL_FUNC (on_OKBtn_clicked), + NULL); + + return InfoFrm; +} + +GtkWidget* +create_fileselection1 (void) +{ + GtkWidget *fileselection1; + GtkWidget *ok_button1; + GtkWidget *cancel_button1; + + fileselection1 = gtk_file_selection_new (_("Select File")); + gtk_object_set_data (GTK_OBJECT (fileselection1), "fileselection1", fileselection1); + gtk_container_set_border_width (GTK_CONTAINER (fileselection1), 10); + + ok_button1 = GTK_FILE_SELECTION (fileselection1)->ok_button; + gtk_object_set_data (GTK_OBJECT (fileselection1), "ok_button1", ok_button1); + gtk_widget_show (ok_button1); + GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT); + + cancel_button1 = GTK_FILE_SELECTION (fileselection1)->cancel_button; + gtk_object_set_data (GTK_OBJECT (fileselection1), "cancel_button1", cancel_button1); + gtk_widget_show (cancel_button1); + GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT); + + return fileselection1; +} + +GtkWidget* +create_RemoteMntFrm (void) +{ + GtkWidget *RemoteMntFrm; + GtkWidget *dialog_vbox2; + GtkWidget *hbox2; + GtkWidget *vbox4; + GtkWidget *SiteList; + GtkWidget *hbox3; + GtkWidget *hbox4; + GtkWidget *pixmap4; + GtkWidget *AddBtn; + GtkWidget *hbox5; + GtkWidget *pixmap5; + GtkWidget *RemoveBtn; + GtkWidget *vbox5; + GtkWidget *vbox6; + GtkWidget *label6; + GtkWidget *NameText; + GtkWidget *vbox7; + GtkWidget *label7; + GtkWidget *MachineText; + GtkWidget *vbox8; + GtkWidget *label8; + GtkWidget *RepositoryText; + GtkWidget *dialog_action_area2; + GtkWidget *SaveBtn; + GtkWidget *CancelBtn; + + RemoteMntFrm = gnome_dialog_new (_("Manage Remote Sites"), NULL); + gtk_object_set_data (GTK_OBJECT (RemoteMntFrm), "RemoteMntFrm", RemoteMntFrm); + gtk_window_set_modal (GTK_WINDOW (RemoteMntFrm), TRUE); + gtk_window_set_policy (GTK_WINDOW (RemoteMntFrm), FALSE, FALSE, FALSE); + + dialog_vbox2 = GNOME_DIALOG (RemoteMntFrm)->vbox; + gtk_object_set_data (GTK_OBJECT (RemoteMntFrm), "dialog_vbox2", dialog_vbox2); + gtk_widget_show (dialog_vbox2); + + hbox2 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox2); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "hbox2", hbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox2); + gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox2, TRUE, TRUE, 0); + + vbox4 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox4); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "vbox4", vbox4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox4); + gtk_box_pack_start (GTK_BOX (hbox2), vbox4, TRUE, TRUE, 0); + + SiteList = gtk_list_new (); + gtk_widget_ref (SiteList); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "SiteList", SiteList, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (SiteList); + gtk_box_pack_start (GTK_BOX (vbox4), SiteList, TRUE, TRUE, 0); + gtk_widget_set_usize (SiteList, -2, 140); + + hbox3 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox3); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "hbox3", hbox3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox3); + gtk_box_pack_start (GTK_BOX (vbox4), hbox3, TRUE, TRUE, 0); + + hbox4 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox4); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "hbox4", hbox4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox4); + gtk_box_pack_start (GTK_BOX (hbox3), hbox4, FALSE, FALSE, 0); + + pixmap4 = create_pixmap (RemoteMntFrm, "installmgr/filenew.xpm", FALSE); + gtk_widget_ref (pixmap4); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "pixmap4", pixmap4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (pixmap4); + gtk_box_pack_start (GTK_BOX (hbox4), pixmap4, TRUE, TRUE, 0); + + AddBtn = gtk_button_new_with_label (_("Add")); + gtk_widget_ref (AddBtn); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "AddBtn", AddBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (AddBtn); + gtk_box_pack_start (GTK_BOX (hbox4), AddBtn, FALSE, FALSE, 0); + + hbox5 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox5); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "hbox5", hbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox5); + gtk_box_pack_start (GTK_BOX (hbox3), hbox5, TRUE, TRUE, 0); + + pixmap5 = create_pixmap (RemoteMntFrm, "installmgr/trash.xpm", FALSE); + gtk_widget_ref (pixmap5); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "pixmap5", pixmap5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (pixmap5); + gtk_box_pack_start (GTK_BOX (hbox5), pixmap5, TRUE, TRUE, 0); + + RemoveBtn = gtk_button_new_with_label (_("Remove")); + gtk_widget_ref (RemoveBtn); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "RemoveBtn", RemoveBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (RemoveBtn); + gtk_box_pack_start (GTK_BOX (hbox5), RemoveBtn, FALSE, FALSE, 0); + + vbox5 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox5); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "vbox5", vbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox5); + gtk_box_pack_start (GTK_BOX (hbox2), vbox5, TRUE, TRUE, 0); + + vbox6 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox6); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "vbox6", vbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox6); + gtk_box_pack_start (GTK_BOX (vbox5), vbox6, TRUE, TRUE, 0); + + label6 = gtk_label_new (_("Site Name")); + gtk_widget_ref (label6); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "label6", label6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label6); + gtk_box_pack_start (GTK_BOX (vbox6), label6, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (label6), 1.22935e-07, 0.5); + + NameText = gtk_entry_new (); + gtk_widget_ref (NameText); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "NameText", NameText, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (NameText); + gtk_box_pack_start (GTK_BOX (vbox6), NameText, FALSE, FALSE, 0); + + vbox7 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox7); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "vbox7", vbox7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox7); + gtk_box_pack_start (GTK_BOX (vbox5), vbox7, TRUE, TRUE, 0); + + label7 = gtk_label_new (_("Site Machine Name")); + gtk_widget_ref (label7); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "label7", label7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label7); + gtk_box_pack_start (GTK_BOX (vbox7), label7, FALSE, FALSE, 0); + gtk_misc_set_alignment (GTK_MISC (label7), 7.45058e-09, 0.5); + + MachineText = gtk_entry_new (); + gtk_widget_ref (MachineText); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "MachineText", MachineText, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (MachineText); + gtk_box_pack_start (GTK_BOX (vbox7), MachineText, FALSE, FALSE, 0); + + vbox8 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox8); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "vbox8", vbox8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox8); + gtk_box_pack_start (GTK_BOX (vbox5), vbox8, TRUE, TRUE, 0); + + label8 = gtk_label_new (_("Repository Directory")); + gtk_widget_ref (label8); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "label8", label8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label8); + gtk_box_pack_start (GTK_BOX (vbox8), label8, FALSE, FALSE, 0); + gtk_misc_set_alignment (GTK_MISC (label8), 7.45058e-09, 0.5); + + RepositoryText = gtk_entry_new (); + gtk_widget_ref (RepositoryText); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "RepositoryText", RepositoryText, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (RepositoryText); + gtk_box_pack_start (GTK_BOX (vbox8), RepositoryText, FALSE, FALSE, 0); + + dialog_action_area2 = GNOME_DIALOG (RemoteMntFrm)->action_area; + gtk_object_set_data (GTK_OBJECT (RemoteMntFrm), "dialog_action_area2", dialog_action_area2); + gtk_widget_show (dialog_action_area2); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_SPREAD); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area2), 8); + + gnome_dialog_append_button_with_pixmap (GNOME_DIALOG (RemoteMntFrm), + _("Save"), GNOME_STOCK_PIXMAP_SAVE); + SaveBtn = g_list_last (GNOME_DIALOG (RemoteMntFrm)->buttons)->data; + gtk_widget_ref (SaveBtn); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "SaveBtn", SaveBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (SaveBtn); + GTK_WIDGET_SET_FLAGS (SaveBtn, GTK_CAN_DEFAULT); + + gnome_dialog_append_button (GNOME_DIALOG (RemoteMntFrm), GNOME_STOCK_BUTTON_CANCEL); + CancelBtn = g_list_last (GNOME_DIALOG (RemoteMntFrm)->buttons)->data; + gtk_widget_ref (CancelBtn); + gtk_object_set_data_full (GTK_OBJECT (RemoteMntFrm), "CancelBtn", CancelBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (CancelBtn); + GTK_WIDGET_SET_FLAGS (CancelBtn, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (AddBtn), "clicked", + GTK_SIGNAL_FUNC (on_AddBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (RemoveBtn), "clicked", + GTK_SIGNAL_FUNC (on_RemoveBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (NameText), "changed", + GTK_SIGNAL_FUNC (on_NameText_changed), + NULL); + gtk_signal_connect (GTK_OBJECT (SaveBtn), "clicked", + GTK_SIGNAL_FUNC (on_SaveBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (CancelBtn), "clicked", + GTK_SIGNAL_FUNC (on_CancelBtn_clicked), + NULL); + + return RemoteMntFrm; +} + +GtkWidget* +create_CipherFrm (void) +{ + GtkWidget *CipherFrm; + GtkWidget *dialog_vbox3; + GtkWidget *vbox9; + GtkWidget *vbox10; + GtkWidget *label9; + GtkWidget *hbox6; + GtkWidget *hbox7; + GtkWidget *label10; + GtkWidget *KeyText; + GtkWidget *TryBtn; + GtkWidget *scrolledwindow2; + GtkWidget *ModuleText; + GtkWidget *dialog_action_area3; + GtkWidget *OKBtn; + + CipherFrm = gnome_dialog_new (_("Ciphered Module"), NULL); + gtk_object_set_data (GTK_OBJECT (CipherFrm), "CipherFrm", CipherFrm); + gtk_window_set_modal (GTK_WINDOW (CipherFrm), TRUE); + gtk_window_set_policy (GTK_WINDOW (CipherFrm), FALSE, FALSE, FALSE); + + dialog_vbox3 = GNOME_DIALOG (CipherFrm)->vbox; + gtk_object_set_data (GTK_OBJECT (CipherFrm), "dialog_vbox3", dialog_vbox3); + gtk_widget_show (dialog_vbox3); + + vbox9 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox9); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "vbox9", vbox9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox9); + gtk_box_pack_start (GTK_BOX (dialog_vbox3), vbox9, TRUE, TRUE, 0); + + vbox10 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox10); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "vbox10", vbox10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox10); + gtk_box_pack_start (GTK_BOX (vbox9), vbox10, TRUE, TRUE, 0); + + label9 = gtk_label_new (_("The module that you have requested for install seems to be ciphered.")); + gtk_widget_ref (label9); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "label9", label9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label9); + gtk_box_pack_start (GTK_BOX (vbox10), label9, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (label9), 7.45058e-09, 0); + + hbox6 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox6); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "hbox6", hbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox6); + gtk_box_pack_start (GTK_BOX (vbox10), hbox6, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (hbox6), 5); + + hbox7 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox7); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "hbox7", hbox7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox7); + gtk_box_pack_start (GTK_BOX (hbox6), hbox7, TRUE, TRUE, 0); + + label10 = gtk_label_new (_("Cipher Key:")); + gtk_widget_ref (label10); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "label10", label10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label10); + gtk_box_pack_start (GTK_BOX (hbox7), label10, FALSE, FALSE, 0); + + KeyText = gtk_entry_new (); + gtk_widget_ref (KeyText); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "KeyText", KeyText, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (KeyText); + gtk_box_pack_start (GTK_BOX (hbox7), KeyText, TRUE, TRUE, 5); + + TryBtn = gtk_button_new_with_label (_("Try")); + gtk_widget_ref (TryBtn); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "TryBtn", TryBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (TryBtn); + gtk_box_pack_start (GTK_BOX (hbox6), TryBtn, FALSE, FALSE, 10); + gtk_widget_set_usize (TryBtn, 99, -2); + + scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow2); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "scrolledwindow2", scrolledwindow2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow2); + gtk_box_pack_start (GTK_BOX (vbox9), scrolledwindow2, TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + + ModuleText = gtk_text_new (NULL, NULL); + gtk_widget_ref (ModuleText); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "ModuleText", ModuleText, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (ModuleText); + gtk_container_add (GTK_CONTAINER (scrolledwindow2), ModuleText); + gtk_widget_set_usize (ModuleText, 166, 146); + + dialog_action_area3 = GNOME_DIALOG (CipherFrm)->action_area; + gtk_object_set_data (GTK_OBJECT (CipherFrm), "dialog_action_area3", dialog_action_area3); + gtk_widget_show (dialog_action_area3); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_SPREAD); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area3), 8); + + gnome_dialog_append_button (GNOME_DIALOG (CipherFrm), GNOME_STOCK_BUTTON_OK); + OKBtn = g_list_last (GNOME_DIALOG (CipherFrm)->buttons)->data; + gtk_widget_ref (OKBtn); + gtk_object_set_data_full (GTK_OBJECT (CipherFrm), "OKBtn", OKBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (OKBtn); + GTK_WIDGET_SET_FLAGS (OKBtn, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (TryBtn), "clicked", + GTK_SIGNAL_FUNC (on_TryBtn_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (OKBtn), "clicked", + GTK_SIGNAL_FUNC (on_OKBtn_clicked), + NULL); + + return CipherFrm; +} + +GtkWidget* +create_StatusFrm (void) +{ + GtkWidget *StatusFrm; + GtkWidget *dialog_vbox4; + GtkWidget *vbox11; + GtkWidget *label11; + GtkWidget *progressbar1; + GtkWidget *dialog_action_area4; + GtkWidget *CancelBtn; + + StatusFrm = gnome_dialog_new (_("Status"), NULL); + gtk_object_set_data (GTK_OBJECT (StatusFrm), "StatusFrm", StatusFrm); + gtk_window_set_modal (GTK_WINDOW (StatusFrm), TRUE); + gtk_window_set_policy (GTK_WINDOW (StatusFrm), FALSE, FALSE, FALSE); + + dialog_vbox4 = GNOME_DIALOG (StatusFrm)->vbox; + gtk_object_set_data (GTK_OBJECT (StatusFrm), "dialog_vbox4", dialog_vbox4); + gtk_widget_show (dialog_vbox4); + + vbox11 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox11); + gtk_object_set_data_full (GTK_OBJECT (StatusFrm), "vbox11", vbox11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox11); + gtk_box_pack_start (GTK_BOX (dialog_vbox4), vbox11, TRUE, TRUE, 0); + + label11 = gtk_label_new (""); + gtk_widget_ref (label11); + gtk_object_set_data_full (GTK_OBJECT (StatusFrm), "label11", label11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label11); + gtk_box_pack_start (GTK_BOX (vbox11), label11, FALSE, FALSE, 0); + gtk_misc_set_alignment (GTK_MISC (label11), 7.45058e-09, 7.45058e-09); + + progressbar1 = gtk_progress_bar_new (); + gtk_widget_ref (progressbar1); + gtk_object_set_data_full (GTK_OBJECT (StatusFrm), "progressbar1", progressbar1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (progressbar1); + gtk_box_pack_start (GTK_BOX (vbox11), progressbar1, FALSE, FALSE, 0); + + dialog_action_area4 = GNOME_DIALOG (StatusFrm)->action_area; + gtk_object_set_data (GTK_OBJECT (StatusFrm), "dialog_action_area4", dialog_action_area4); + gtk_widget_show (dialog_action_area4); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_SPREAD); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area4), 8); + + gnome_dialog_append_button (GNOME_DIALOG (StatusFrm), GNOME_STOCK_BUTTON_CANCEL); + CancelBtn = g_list_last (GNOME_DIALOG (StatusFrm)->buttons)->data; + gtk_widget_ref (CancelBtn); + gtk_object_set_data_full (GTK_OBJECT (StatusFrm), "CancelBtn", CancelBtn, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (CancelBtn); + GTK_WIDGET_SET_FLAGS (CancelBtn, GTK_CAN_DEFAULT); + + return StatusFrm; +} + diff --git a/apps/X11/InstallMgr/src/interface.h b/apps/X11/InstallMgr/src/interface.h new file mode 100644 index 0000000..250257f --- /dev/null +++ b/apps/X11/InstallMgr/src/interface.h @@ -0,0 +1,10 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +GtkWidget* create_InstallMgrApp (void); +GtkWidget* create_InfoFrm (void); +GtkWidget* create_fileselection1 (void); +GtkWidget* create_RemoteMntFrm (void); +GtkWidget* create_CipherFrm (void); +GtkWidget* create_StatusFrm (void); diff --git a/apps/X11/InstallMgr/src/main.cpp b/apps/X11/InstallMgr/src/main.cpp new file mode 100644 index 0000000..d6b82c6 --- /dev/null +++ b/apps/X11/InstallMgr/src/main.cpp @@ -0,0 +1,47 @@ +/* + * Initial main.c file generated by Glade. Edit as required. + * Glade will not overwrite this file. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <gtk/gtk.h> + +//#include "interface.h" +//#include "support.h" +#include <MainFrm.h> + +int +main (int argc, char *argv[]) { + +#ifdef ENABLE_NLS +// bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); +// textdomain (PACKAGE); +#endif + + gtk_set_locale (); + gtk_init (&argc, &argv); + + MainForm = new TMainForm(0); + MainForm->FormShow(0); +// GtkWidget *InstallMgrApp = create_InstallMgrApp (); +// gtk_widget_show (InstallMgrApp); +/* + InfoFrm = create_InfoFrm (); + gtk_widget_show (InfoFrm); + fileselection1 = create_fileselection1 (); + gtk_widget_show (fileselection1); + RemoteMntFrm = create_RemoteMntFrm (); + gtk_widget_show (RemoteMntFrm); + CipherFrm = create_CipherFrm (); + gtk_widget_show (CipherFrm); + StatusFrm = create_StatusFrm (); + gtk_widget_show (StatusFrm); +*/ + + gtk_main (); + return 0; +} + diff --git a/apps/X11/InstallMgr/src/pix/arrow2r.xpm b/apps/X11/InstallMgr/src/pix/arrow2r.xpm new file mode 100644 index 0000000..12b6ab6 --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/arrow2r.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * arrow2r_xpm[] = { +"16 16 5 1", +" c None", +". c #0000FF", +"+ c #FF0000", +"@ c #000080", +"# c #7F7F7F", +".. ", +" ... ", +" ..... ", +" ...... ", +" ....... ", +" ......... ", +" .......... ", +"++++++++++++++++", +" @@@@@@@@@@# ", +" @@@@@@@@@# ", +" #@@@@@@@# ", +" @@@@@@# ", +" @@@@@# ", +"#@@@# ", +"@@# ", +" "}; diff --git a/apps/X11/InstallMgr/src/pix/bookshut.xpm b/apps/X11/InstallMgr/src/pix/bookshut.xpm new file mode 100644 index 0000000..a0164db --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/bookshut.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * bookshut_xpm[] = { +"16 16 5 1", +" c None", +". c #0000FF", +"+ c #000080", +"@ c #000000", +"# c #FFFFFF", +" ", +" .+. ", +" .+.... ", +" .+...... ", +" .+.@@...@ ", +" .+...@..@#@. ", +" .+..@...@###@. ", +".+......@###@. ", +"+......@###@. ", +" .....@###@. ", +" ...@###@. ", +" .@###@. ", +" .@#@. ", +" .@. ", +" . ", +" "}; diff --git a/apps/X11/InstallMgr/src/pix/bulblk.xpm b/apps/X11/InstallMgr/src/pix/bulblk.xpm new file mode 100644 index 0000000..69b678f --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/bulblk.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * bulblk_xpm[] = { +"16 16 7 1", +" c None", +". c #000000", +"+ c #FFFF00", +"@ c #00FFFF", +"# c #808080", +"$ c #FFFFFF", +"% c #C0C0C0", +" .... + ", +" .@@@@.+ ", +" .@..#.+++ + ", +"........++++ ", +".@@@@@@..+++ ", +".@....#.$.+++ ", +".@#####.+$.++ ", +".@....#.$+.++++ ", +" ......#+$.++ ", +" +++.$#$.+++ ", +" +++.$.+++ ", +" +++.+.+++ ", +" + +...+ + ", +" .%. ", +" ... ", +" . "}; diff --git a/apps/X11/InstallMgr/src/pix/bulbon.xpm b/apps/X11/InstallMgr/src/pix/bulbon.xpm new file mode 100644 index 0000000..576e76d --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/bulbon.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * bulbon_xpm[] = { +"16 16 6 1", +" c None", +". c #FFFF00", +"+ c #000000", +"@ c #FFFFFF", +"# c #7F7F7F", +"$ c #BFBFBF", +" . ", +" . ", +" . ..... . ", +" ......... ", +" ...+++... ", +" ...+@.@+... ", +" ..+@.@.@+.. ", +"....+.@#@.+.... ", +" ..+@.#.@+.. ", +" ...+@#@+... ", +" ...+@+... ", +" ...+.+... ", +" . .+++. . ", +" +$+ ", +" +++ ", +" + "}; diff --git a/apps/X11/InstallMgr/src/pix/filenew.xpm b/apps/X11/InstallMgr/src/pix/filenew.xpm new file mode 100644 index 0000000..2abd4bf --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/filenew.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * filenew_xpm[] = { +"16 16 6 1", +" c None", +". c #FFFF00", +"+ c #D3D3DD", +"@ c #000000", +"# c #FFFFFF", +"$ c #7F7F7F", +".++++++.+++++++.", +"+..++++..++++..+", +"++.@@@@@@+++..++", +"+++@####@@+..+++", +"+++@####@#@.++++", +"+++@####@##@++++", +"+++@####@@@@@+++", +"+..@########@...", +"...@########@..+", +"+++@########@$++", +"+++@########@$++", +"+++@########@$++", +"+++@########@$++", +"++.@@@@@@@@@@.++", +"+..+$$$..$$$$..+", +"++++++++.++++++."}; diff --git a/apps/X11/InstallMgr/src/pix/fingerup.xpm b/apps/X11/InstallMgr/src/pix/fingerup.xpm new file mode 100644 index 0000000..731cc4d --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/fingerup.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * fingerup_xpm[] = { +"16 16 5 1", +" c None", +". c #000000", +"+ c #FFFF00", +"@ c #FFFFFF", +"# c #00FFFF", +" . ", +" .+. ", +" .@. ", +" ..+. ", +" ..@.@. ", +" .+.+.+. ", +" .@.@.@.. ", +" .+@+@+.+. ", +" .@+@+@.@. ", +" .+@+@+@+. ", +" .+@+@+. ", +" ........ ", +" .######. ", +" ......... ", +" .+....... ", +" ......... "}; diff --git a/apps/X11/InstallMgr/src/pix/globe.xpm b/apps/X11/InstallMgr/src/pix/globe.xpm new file mode 100644 index 0000000..84f772f --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/globe.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * globe_xpm[] = { +"16 16 5 1", +" c None", +". c #D3D3DD", +"+ c #0000FF", +"@ c #000080", +"# c #808000", +".....+@+++......", +"...##++@+@++....", +"..####++#+##+...", +".@+#########++..", +".+++++######@+..", +"+++##++@###++@+.", +"@++########+@+@.", +"+@######+#+@+++.", +"@++#####+++@@@+.", +"+++++###+++@+@@.", +".@+++###@@@@##..", +".@+@+##@+@+@##..", +"..@+@##@@@@@@...", +"...@+@@@+@@@....", +".....@@+@+......", +"................"}; diff --git a/apps/X11/InstallMgr/src/pix/null.xpm b/apps/X11/InstallMgr/src/pix/null.xpm new file mode 100644 index 0000000..b2851be --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/null.xpm @@ -0,0 +1,5 @@ +/* XPM */ +static char * null_xpm[] = { +"1 1 1 1", +" c None", +" "}; diff --git a/apps/X11/InstallMgr/src/pix/sword.xpm b/apps/X11/InstallMgr/src/pix/sword.xpm new file mode 100644 index 0000000..7b4b67f --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/sword.xpm @@ -0,0 +1,875 @@ +/* XPM */ +static char * sword_xpm[] = { +"254 100 772 2", +" c None", +". c #CCCDCC", +"+ c #CDCECD", +"@ c #CECFCE", +"# c #585858", +"$ c #4A4A4A", +"% c #919291", +"& c #9A9B9A", +"* c #040404", +"= c #000000", +"- c #1D1D1D", +"; c #B7B8B7", +"> c #CECECE", +", c #8D8E8D", +"' c #050505", +") c #A5A6A5", +"! c #757675", +"~ c #444544", +"{ c #373737", +"] c #848584", +"^ c #C8C9C8", +"/ c #2D2D2D", +"( c #0B0B0B", +"_ c #AEAFAE", +": c #A8A9A8", +"< c #5A5B5A", +"[ c #767676", +"} c #121212", +"| c #B8B9B8", +"1 c #7B7C7B", +"2 c #AFB0AF", +"3 c #3A3B3A", +"4 c #6D6D6D", +"5 c #797A79", +"6 c #121312", +"7 c #BEBFBE", +"8 c #A3A4A3", +"9 c #1E1E1E", +"0 c #5D5D5D", +"a c #373837", +"b c #060606", +"c c #464746", +"d c #404040", +"e c #5C5C5C", +"f c #7B7B7B", +"g c #B6B7B6", +"h c #323232", +"i c #696969", +"j c #C3C4C3", +"k c #959595", +"l c #232323", +"m c #838383", +"n c #B9BAB9", +"o c #696A69", +"p c #BBBCBB", +"q c #8C8C8C", +"r c #969796", +"s c #707070", +"t c #646464", +"u c #6E6E6E", +"v c #C4C5C4", +"w c #A7A8A7", +"x c #101010", +"y c #4B4B4B", +"z c #C7C8C7", +"A c #131313", +"B c #BDBEBD", +"C c #2B2B2B", +"D c #1F1F1F", +"E c #8A8B8A", +"F c #7F7F7F", +"G c #242524", +"H c #020202", +"I c #828382", +"J c #CDCFCD", +"K c #494949", +"L c #3B3B3B", +"M c #535353", +"N c #686968", +"O c #161616", +"P c #B0B1B0", +"Q c #0F0F0F", +"R c #9FA09F", +"S c #4F4F4F", +"T c #1B1B1B", +"U c #B3B4B3", +"V c #ADAEAD", +"W c #0C0C0C", +"X c #1A1A1A", +"Y c #9B9B9B", +"Z c #4C4C4C", +"` c #505050", +" . c #494A49", +".. c #606060", +"+. c #989998", +"@. c #1C1C1C", +"#. c #151515", +"$. c #717171", +"%. c #747574", +"&. c #818281", +"*. c #424242", +"=. c #878787", +"-. c #393A39", +";. c #CACBCA", +">. c #A0A1A0", +",. c #070707", +"'. c #292A29", +"). c #9C9D9C", +"!. c #090909", +"~. c #222222", +"{. c #B1B2B1", +"]. c #787878", +"^. c #414241", +"/. c #414141", +"(. c #717271", +"_. c #B2B3B2", +":. c #090A09", +"<. c #BCBDBC", +"[. c #171717", +"}. c #565656", +"|. c #C0C1C0", +"1. c #939493", +"2. c #393939", +"3. c #C2C2C2", +"4. c #797979", +"5. c #A4A5A4", +"6. c #636363", +"7. c #525252", +"8. c #C2C3C2", +"9. c #6B6B6B", +"0. c #898989", +"a. c #A1A2A1", +"b. c #505150", +"c. c #8E8F8E", +"d. c #272827", +"e. c #010101", +"f. c #9B9C9B", +"g. c #515251", +"h. c #121412", +"i. c #939393", +"j. c #949494", +"k. c #3D3D3D", +"l. c #4C4D4C", +"m. c #080808", +"n. c #2B2C2B", +"o. c #BABABA", +"p. c #B7B7B7", +"q. c #ABACAB", +"r. c #9FA19F", +"s. c #B0B0B0", +"t. c #707170", +"u. c #BFC0BF", +"v. c #878887", +"w. c #565856", +"x. c #323532", +"y. c #303330", +"z. c #333533", +"A. c #383738", +"B. c #3B3A3B", +"C. c #3E3D3E", +"D. c #373937", +"E. c #393B39", +"F. c #7E807E", +"G. c #939593", +"H. c #303030", +"I. c #282728", +"J. c #282828", +"K. c #656765", +"L. c #828482", +"M. c #868886", +"N. c #8A8A8A", +"O. c #8A8C8A", +"P. c #A0A2A0", +"Q. c #969896", +"R. c #8E908E", +"S. c #929292", +"T. c #939293", +"U. c #949594", +"V. c #979797", +"W. c #BEBEBE", +"X. c #838283", +"Y. c #A09FA0", +"Z. c #A0A0A0", +"`. c #8C8A8C", +" + c #A9ABA9", +".+ c #9A9C9A", +"++ c #909090", +"@+ c #949294", +"#+ c #949394", +"$+ c #949694", +"%+ c #9A999A", +"&+ c #A7A6A7", +"*+ c #CBCCCB", +"=+ c #C0BFC0", +"-+ c #C4C3C4", +";+ c #C3C2C3", +">+ c #BDBDBD", +",+ c #C6C6C6", +"'+ c #CBCBCB", +")+ c #D0D0D0", +"!+ c #D2D2D2", +"~+ c #D2D3D2", +"{+ c #D6D5D6", +"]+ c #D6D6D6", +"^+ c #D6D7D6", +"/+ c #D7D8D7", +"(+ c #E4E1E4", +"_+ c #E6E2E6", +":+ c #E6E5E6", +"<+ c #E6E6E6", +"[+ c #E9E6E9", +"}+ c #E0DEE0", +"|+ c #E0E0E0", +"1+ c #D8D9D8", +"2+ c #302F30", +"3+ c #5F605F", +"4+ c #676767", +"5+ c #383838", +"6+ c #383B38", +"7+ c #7B7D7B", +"8+ c #666866", +"9+ c #434543", +"0+ c #494849", +"a+ c #494B49", +"b+ c #494C49", +"c+ c #4D4E4D", +"d+ c #515051", +"e+ c #515151", +"f+ c #515451", +"g+ c #7A7C7A", +"h+ c #595C59", +"i+ c #5B5D5B", +"j+ c #626062", +"k+ c #626162", +"l+ c #626362", +"m+ c #626462", +"n+ c #666666", +"o+ c #6A686A", +"p+ c #6F6E6F", +"q+ c #727072", +"r+ c #727372", +"s+ c #727472", +"t+ c #7A787A", +"u+ c #7A797A", +"v+ c #7A7B7A", +"w+ c #808180", +"x+ c #A1A0A1", +"y+ c #8C8B8C", +"z+ c #8C8D8C", +"A+ c #8C8E8C", +"B+ c #9C9A9C", +"C+ c #AAAAAA", +"D+ c #B9BBB9", +"E+ c #C9C9C9", +"F+ c #ADABAD", +"G+ c #ADADAD", +"H+ c #B3B1B3", +"I+ c #B5B2B5", +"J+ c #B5B4B5", +"K+ c #B5B6B5", +"L+ c #BCB9BC", +"M+ c #BDBABD", +"N+ c #C1C0C1", +"O+ c #C6C3C6", +"P+ c #C7C4C7", +"Q+ c #CDCDCD", +"R+ c #D2D1D2", +"S+ c #D6D3D6", +"T+ c #D7D7D7", +"U+ c #DDDADD", +"V+ c #DEDBDE", +"W+ c #DEDDDE", +"X+ c #DEDFDE", +"Y+ c #E2E0E2", +"Z+ c #E7E3E7", +"`+ c #E7E6E7", +" @ c #E7E7E7", +".@ c #ECE9EC", +"+@ c #EFEBEF", +"@@ c #EFECEF", +"#@ c #EFEEEF", +"$@ c #EFEFEF", +"%@ c #E6E4E6", +"&@ c #D5D5D5", +"*@ c #B7B9B7", +"=@ c #3F423F", +"-@ c #2A2C2A", +";@ c #484748", +">@ c #989898", +",@ c #C6C7C6", +"'@ c #999A99", +")@ c #1F1E1F", +"!@ c #393839", +"~@ c #9EA09E", +"{@ c #4E504E", +"]@ c #5C5E5C", +"^@ c #6E706E", +"/@ c #929492", +"(@ c #ACADAC", +"_@ c #C1C1C1", +":@ c #C1C2C1", +"<@ c #9B9D9B", +"[@ c #747674", +"}@ c #898889", +"|@ c #8D8D8D", +"1@ c #959795", +"2@ c #A9AAA9", +"3@ c #ADACAD", +"4@ c #9C9C9C", +"5@ c #A2A4A2", +"6@ c #BBBDBB", +"7@ c #C9CAC9", +"8@ c #C0BEC0", +"9@ c #C5C2C5", +"0@ c #CFCFCF", +"a@ c #D1D2D1", +"b@ c #D3D4D3", +"c@ c #D5D6D5", +"d@ c #DADADA", +"e@ c #DAD9DA", +"f@ c #DBDADB", +"g@ c #D8D8D8", +"h@ c #DBDCDB", +"i@ c #DCDCDC", +"j@ c #EBE8EB", +"k@ c #EEEAEE", +"l@ c #F0EFF0", +"m@ c #F4F0F4", +"n@ c #E8E6E8", +"o@ c #D4D4D4", +"p@ c #3C3D3C", +"q@ c #282B28", +"r@ c #8B8D8B", +"s@ c #4E4F4E", +"t@ c #161716", +"u@ c #3A393A", +"v@ c #4A494A", +"w@ c #AFB1AF", +"x@ c #979897", +"y@ c #807E80", +"z@ c #848684", +"A@ c #929192", +"B@ c #AEAEAE", +"C@ c #9C9B9C", +"D@ c #9C9E9C", +"E@ c #B2B4B2", +"F@ c #C7C7C7", +"G@ c #D5D4D5", +"H@ c #D1D1D1", +"I@ c #F6F2F6", +"J@ c #F7F3F7", +"K@ c #A3A3A3", +"L@ c #282928", +"M@ c #545354", +"N@ c #AEB0AE", +"O@ c #A9A9A9", +"P@ c #A5A5A5", +"Q@ c #918F91", +"R@ c #848284", +"S@ c #929392", +"T@ c #BABBBA", +"U@ c #A3A2A3", +"V@ c #B3B5B3", +"W@ c #CFD0CF", +"X@ c #D9D9D9", +"Y@ c #E8E7E8", +"Z@ c #EEEBEE", +"`@ c #292829", +" # c #4D4C4D", +".# c #858685", +"+# c #838183", +"@# c #848384", +"## c #AFAEAF", +"$# c #C9C8C9", +"%# c #E1E0E1", +"&# c #EEEEEE", +"*# c #292C29", +"=# c #262626", +"-# c #2A292A", +";# c #A2A2A2", +"># c #8D8F8D", +",# c #8F8F8F", +"'# c #C7C9C7", +")# c #5C5F5C", +"!# c #B8B8B8", +"~# c #595A59", +"{# c #757475", +"]# c #959695", +"^# c #979597", +"/# c #B7B6B7", +"(# c #C7C5C7", +"_# c #D3D1D3", +":# c #212421", +"<# c #6A6D6A", +"[# c #414441", +"}# c #8E8E8E", +"|# c #7E7D7E", +"1# c #595959", +"2# c #747374", +"3# c #7B797B", +"4# c #B4B3B4", +"5# c #B7B5B7", +"6# c #C2C0C2", +"7# c #CCCCCC", +"8# c #252825", +"9# c #202320", +"0# c #686868", +"a# c #595859", +"b# c #818481", +"c# c #6F706F", +"d# c #7D7B7D", +"e# c #888788", +"f# c #7D7E7D", +"g# c #A5A3A5", +"h# c #A3A5A3", +"i# c #ADAAAD", +"j# c #E9E7E9", +"k# c #F2EFF2", +"l# c #474847", +"m# c #505350", +"n# c #525552", +"o# c #BCBEBC", +"p# c #B0B2B0", +"q# c #6B6D6B", +"r# c #6D6E6D", +"s# c #9D9D9D", +"t# c #A4A6A4", +"u# c #8F8E8F", +"v# c #9B9A9B", +"w# c #D4D2D4", +"x# c #202020", +"y# c #434643", +"z# c #A6A8A6", +"A# c #868686", +"B# c #5B5A5B", +"C# c #6A6C6A", +"D# c #7F807F", +"E# c #737573", +"F# c #AFAFAF", +"G# c #A4A4A4", +"H# c #B3B3B3", +"I# c #ACA9AC", +"J# c #D1D0D1", +"K# c #565556", +"L# c #201F20", +"M# c #414041", +"N# c #7C7E7C", +"O# c #585B58", +"P# c #5D605D", +"Q# c #767576", +"R# c #676967", +"S# c #787778", +"T# c #6A6B6A", +"U# c #7E7F7E", +"V# c #B4B4B4", +"W# c #BEC0BE", +"X# c #BCBCBC", +"Y# c #A6A6A6", +"Z# c #D9D8D9", +"`# c #DFDEDF", +" $ c #3A3C3A", +".$ c #6C6B6C", +"+$ c #595B59", +"@$ c #C5C7C5", +"#$ c #AAABAA", +"$$ c #999B99", +"%$ c #ADAFAD", +"&$ c #6A696A", +"*$ c #969596", +"=$ c #727172", +"-$ c #737373", +";$ c #A4A2A4", +">$ c #CACACA", +",$ c #EAE6EA", +"'$ c #E1E1E1", +")$ c #575857", +"!$ c #969696", +"~$ c #B1B3B1", +"{$ c #858585", +"]$ c #616461", +"^$ c #7C7C7C", +"/$ c #696869", +"($ c #6C6A6C", +"_$ c #747274", +":$ c #737173", +"<$ c #9D9B9D", +"[$ c #BFBFBF", +"}$ c #CECCCE", +"|$ c #CECDCE", +"1$ c #E1DFE1", +"2$ c #EAEAEA", +"3$ c #BDBFBD", +"4$ c #5C5B5C", +"5$ c #ACACAC", +"6$ c #484848", +"7$ c #686768", +"8$ c #909290", +"9$ c #646564", +"0$ c #B1B0B1", +"a$ c #BDBCBD", +"b$ c #CECBCE", +"c$ c #1C1D1C", +"d$ c #2E2D2E", +"e$ c #5A5D5A", +"f$ c #3F3F3F", +"g$ c #424142", +"h$ c #888888", +"i$ c #B2B2B2", +"j$ c #B1AFB1", +"k$ c #A5A2A5", +"l$ c #BDBBBD", +"m$ c #EDEAED", +"n$ c #EAE8EA", +"o$ c #4B4C4B", +"p$ c #232223", +"q$ c #989A98", +"r$ c #393C39", +"s$ c #4C4F4C", +"t$ c #5E5D5E", +"u$ c #919091", +"v$ c #626262", +"w$ c #8D8C8D", +"x$ c #B4B5B4", +"y$ c #BAB9BA", +"z$ c #B6B4B6", +"A$ c #CDCACD", +"B$ c #E0E1E0", +"C$ c #EAE7EA", +"D$ c #7A7A7A", +"E$ c #848484", +"F$ c #575657", +"G$ c #575A57", +"H$ c #6B696B", +"I$ c #A4A1A4", +"J$ c #212021", +"K$ c #323132", +"L$ c #C5C6C5", +"M$ c #737473", +"N$ c #AAACAA", +"O$ c #616061", +"P$ c #ABADAB", +"Q$ c #9E9F9E", +"R$ c #B9B9B9", +"S$ c #3A3A3A", +"T$ c #5A595A", +"U$ c #8F908F", +"V$ c #898A89", +"W$ c #878987", +"X$ c #605F60", +"Y$ c #BBBBBB", +"Z$ c #A1A1A1", +"`$ c #CDCCCD", +" % c #E3E3E3", +".% c #C3C3C3", +"+% c #424542", +"@% c #5E615E", +"#% c #6F6F6F", +"$% c #717371", +"%% c #767476", +"&% c #C8C7C8", +"*% c #2B2A2B", +"=% c #535653", +"-% c #9F9F9F", +";% c #ABAAAB", +">% c #C8C6C8", +",% c #C6C4C6", +"'% c #E0DFE0", +")% c #6E6F6E", +"!% c #6A6A6A", +"~% c #807F80", +"{% c #A9A8A9", +"]% c #A7A7A7", +"^% c #B5B3B5", +"/% c #D0D1D0", +"(% c #E2E1E2", +"_% c #363636", +":% c #3E413E", +"<% c #5E5E5E", +"[% c #7D7F7D", +"}% c #5F5F5F", +"|% c #979697", +"1% c #919391", +"2% c #BFBEBF", +"3% c #C6C5C6", +"4% c #D8D7D8", +"5% c #C1C3C1", +"6% c #4F504F", +"7% c #818181", +"8% c #636463", +"9% c #5D5F5D", +"0% c #ACAEAC", +"a% c #808080", +"b% c #636563", +"c% c #A6A5A6", +"d% c #AEABAE", +"e% c #CAC9CA", +"f% c #D7D6D7", +"g% c #DEDEDE", +"h% c #171817", +"i% c #5B5B5B", +"j% c #818381", +"k% c #A7A9A7", +"l% c #706E70", +"m% c #939193", +"n% c #A5A7A5", +"o% c #B8B6B8", +"p% c #DCD9DC", +"q% c #D9DAD9", +"r% c #111511", +"s% c #0E0F0E", +"t% c #8B8C8B", +"u% c #767876", +"v% c #757575", +"w% c #626562", +"x% c #666966", +"y% c #828182", +"z% c #8A898A", +"A% c #A6A7A6", +"B% c #DDDDDD", +"C% c #080C08", +"D% c #616361", +"E% c #353635", +"F% c #9D9F9D", +"G% c #343534", +"H% c #3C3C3C", +"I% c #676A67", +"J% c #888A88", +"K% c #B1B1B1", +"L% c #9F9E9F", +"M% c #979997", +"N% c #C1BFC1", +"O% c #070B07", +"P% c #303430", +"Q% c #1C1E1C", +"R% c #404340", +"S% c #434243", +"T% c #383938", +"U% c #5A5A5A", +"V% c #636263", +"W% c #757775", +"X% c #878587", +"Y% c #A5A4A5", +"Z% c #BCBBBC", +"`% c #DCDADC", +" & c #111211", +".& c #2D302D", +"+& c #181C18", +"@& c #313431", +"#& c #797C79", +"$& c #4A4D4A", +"%& c #868486", +"&& c #B5B5B5", +"*& c #AAA8AA", +"=& c #111111", +"-& c #070907", +";& c #090C09", +">& c #838483", +",& c #171B17", +"'& c #656465", +")& c #8B8B8B", +"!& c #A4A3A4", +"~& c #BEBDBE", +"{& c #353835", +"]& c #353535", +"^& c #191C19", +"/& c #737673", +"(& c #3D3F3D", +"_& c #6C6D6C", +":& c #7E7C7E", +"<& c #969496", +"[& c #AEACAE", +"}& c #C0C0C0", +"|& c #141514", +"1& c #4E4E4E", +"2& c #D5D2D5", +"3& c #222522", +"4& c #B4B6B4", +"5& c #363936", +"6& c #181818", +"7& c #767776", +"8& c #303230", +"9& c #3E403E", +"0& c #BABCBA", +"a& c #999999", +"b& c #7F817F", +"c& c #919191", +"d& c #C4C4C4", +"e& c #B9B8B9", +"f& c #141414", +"g& c #464946", +"h& c #040604", +"i& c #252925", +"j& c #585958", +"k& c #0F130F", +"l& c #121512", +"m& c #464846", +"n& c #707270", +"o& c #706F70", +"p& c #818081", +"q& c #B4B1B4", +"r& c #676567", +"s& c #CBCACB", +"t& c #C8C8C8", +"u& c #484948", +"v& c #0F100F", +"w& c #0F120F", +"x& c #202420", +"y& c #B6B6B6", +"z& c #6D6F6D", +"A& c #A8AAA8", +"B& c #444344", +"C& c #444444", +"D& c #464646", +"E& c #555755", +"F& c #393D39", +"G& c #3A3D3A", +"H& c #9A9A9A", +"I& c #A2A3A2", +"J& c #333433", +"K& c #C5C5C5", +"L& c #434343", +"M& c #888988", +"N& c #242424", +"O& c #868786", +"P& c #0C0D0C", +"Q& c #2A2A2A", +"R& c #1F201F", +"S& c #606160", +"T& c #5E5F5E", +"U& c #323332", +"V& c #6B6C6B", +"W& c #656565", +"X& c #2E2F2E", +"Y& c #212221", +"Z& c #909190", +"`& c #0B0C0B", +" * c #2C2C2C", +".* c #0E0E0E", +"+* c #ABABAB", +"@* c #333333", +"#* c #535453", +"$* c #747474", +"%* c #303130", +"&* c #2F2F2F", +"** c #525352", +"=* c #262726", +"-* c #575757", +";* c #252525", +">* c #343434", +",* c #787978", +"'* c #030303", +")* c #1D1E1D", +"!* c #777877", +"~* c #5B5C5B", +"{* c #424342", +"]* c #191919", +"^* c #616261", +"/* c #0D0D0D", +"(* c #292929", +"_* c #2C2D2C", +":* c #2A2B2A", +"<* c #3D3E3D", +"[* c #3E3F3E", +"}* c #191A19", +"|* c #4A4B4A", +"1* c #0A0A0A", +"2* c #9D9E9D", +"3* c #727272", +"4* c #4D4D4D", +"5* c #6C6C6C", +"6* c #3B3C3B", +"7* c #2F302F", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + . . . . . . + + + + + . + + + + + + . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . + + + + + + + . + + + + + + + + . . . . + + + + + . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . + + + + + + + + + + + + + + + + + + + + + . . . . . + . . . . . . + + + + + . . + + + + + . . + + + + + . . + + + + + . + + + + + + + + + + . . + + + ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # $ $ % + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + & * = - ; + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ", +". + + + + @ @ @ @ @ @ @ > @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , = ' ) + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ + + + + ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ! = ~ + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ + + + + ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { = ] + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ^ / ( + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ = ( + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : = < + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # = [ + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } = | + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 = = | + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 + + 5 = 6 7 + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 8 = = 9 0 0 0 0 0 a = = b b b b b b = c + + 5 = d + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 8 = e + + + + + + f = = g + + + + . h c + + i = d + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + 8 = j + + + + + + f = = g + + + + + k c + + l = m + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + > @ @ @ @ @ @ @ @ @ + + + + + + + n o ^ + + + + + + f = = g + + + + + p q + + l = r + + + + ^ s t t u + + + + v w t x y q + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + + l = r + + + z $ = = = A + + + B C D E F G H I + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + + l = r + + + K L M = = A + + + N = [ + + j O b w + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + P Q * R + + S T U z = = A + + V = W + + + + X = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + + V ( _ + ^ = = A + + V = Z + + + + X = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + + ` .+ + ^ = = A + + ..= P + + + +.H = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + > > @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + 5 @.7 + + ^ = = A + + ~ = n + + g S = = R + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + Y = D + #.$.+ + + ^ = = A + + = = %.&...A = *.0 v + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + % = D =.-.;.+ + + ^ = = @.+ >.= ,.O '.4 ).j . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = !.~.8 + + + + {.= = i + ].= ^.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = = /.+ + + + + (.= = _.+ ].= :.<.+ + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = = r + + + + v [.= }.@ + ].= = n + + + + + ) K + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + > @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = [.|.+ + + + 1.= 2.3.@ + | = = 4.+ + + + + ) K + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ > @ + + + + + + + + + + + + + + + + f = = g + + + + + + + + ~ = K + + + + . /.H 5.+ @ + + b = 6.+ + + + + 7.S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + 8.3 = = 9.+ + + + + + + + ~ = 0.+ + + + a.= b.+ + @ + + c.= l E + + + 1 / B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + 9.d.d.9 = = = e.d.d.d.f.+ + + + g.h.i.j.2 + + k.O <.+ + @ + + z l.= m.d.d.d.n.7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ o.p.p.q.r.r.s.|.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + r t.u.z z z z 8.t.t.t.{.+ ;.v.w.x.y.z.A.B.C.C.D.E.F.+ + @ + + + G.H.I.I.J.K.L.M.N.N.N.E O.P.+ + + + + Q.R.R.S.T.T.i.G.G.U.V.V.V.& + + + + + W.X.).).).Y.Z.Z.>.P.P.a.`.@ @ @ @ @ @ @ + U +.+R.++@+@+#+U.$+$+%+&+p.z + @ @ @ @ @ @ @ @ @ @ @ @ *+p p p W.=+=+=+|.|.|.-+-+;+>+|.v ,+'+. + @ @ @ @ @ @ @ @ @ @ @ @ @ )+!+~+~+~+{+{+{+]+^+^+/+(+_+_+:+<+<+[+}+}+}+|+1+~+@ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + n s 2+H.3+r.r.a.4+A.A.5+6+7++ + @ + + + 8+9+0+0+K a+b+b+c+d+d+e+f+g++ + + + + N h+h+i+j+j+k+l+m+m+n+o+o+p++ + + + + B q+r+s+s+%.t+t+u+v+g+g+w+@ @ @ @ @ @ u.x+`.y+z+A+A+++@+@+#+U.$+$+%+B+B+C+D+. @ @ @ @ @ @ @ @ @ @ E+F+G+V V H+I+I+J+K+K+p.L+M+M+>+B B N+O+P+Q+@ @ @ @ @ @ @ @ @ @ @ @ R+S+{+^+^+T+U+V+V+W+X+X+Y+Z+Z+Z+`+ @ @.@+@+@@@#@$@<+%@&@@ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + *@=@-@;@>@,@+ + . '@)@!@A.5+7++ + @ + + + |.~@i+K 0+K a+b+b+{@k+0.B 8.+ + + + + |.7 7 r.]@j+j+k+l+^@/@(@|._@+ + + + + *+:@7 f.<@[@%.t+t+u+&. +j @ @ @ @ + <@M.}@`.`.|@1@2@ +3@G+G+V +1@$+%+B+B+4@5@6@+ @ @ @ @ @ @ @ @ + 7@^ p g V H+I+I+J+u.|.3.8@M+M+>+B B N+9@P+Q+@ @ @ @ @ @ @ @ @ @ @ @ 0@0@a@b@c@T+U+V+V+d@^+^+e@f@!+g@h@h@i@j@k@+@@@#@$@l@m@n@o@@ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + 8.p@q@q@r@+ + + ^ s@t@P =.u@A.f + + @ + + + + + + r@v@0+K a+b+w@+ + + + + + + + + + + + + <@i+j+j+k+x@+ + + + + + + + + + + + + + {.s+%.t+y@'++ + @ @ @ ;.%+] z@z@A@B@+ @ @ @ @ @ @ @ @ @ n : C@B+B+4@D@E@+ @ @ @ @ @ @ @ @ @ @ @ @ {.V H+I+I+*+@ @ @ @ + F@:@B B N+O+P+Q+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ b@^+T+U+V+G@@ @ @ @ @ @ @ @ @ @ H@f@[+@@#@$@l@I@J@[+H@@ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + K@I.L@=@v + + + s@O q.+ + M@A.f + + @ + + + + + + + ]@0+0+K < ^ + + + + + + + + + + + + + N@h+i+j+j+O@+ + + + + + + + + + + + + + |.s+s+%.P@+ + + @ @ ^ Q@R@R@] S@z @ @ @ @ @ @ @ @ @ @ @ @ @ T@U@B+B+4@D@V@@ @ @ @ @ @ @ @ @ @ @ @ :@V V H+I+*+@ @ @ @ @ @ @ 7@7 B N+O+P+Q+@ @ @ @ @ @ @ @ @ @ @ @ @ @ W@^+^+T+U+G@@ @ @ @ @ @ @ @ @ @ @ @ 0@X@Y@$@$@l@I@J@Z@a@@ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + b.I.`@q + + + + |@(@+ + + 1 A.f + + @ + + + + + + + ~@9+0+0+ #,@+ + + + + + + + + + + + + N@h+h+i+j+P@+ + + + + + + + + + + + + + |.r+s+.#. + + + @ *+$+F +#@##+z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ E+##B+B+4@D@V@+ @ @ @ @ @ @ @ @ @ @ . _.V V H+*+@ @ @ @ @ @ @ @ *+7 B N+9@$#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ o@]+^+T+o@@ @ @ @ @ @ @ @ @ @ @ @ @ @ W@%#&#$@l@I@J@Z@H@@ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + *#=#-#;#+ + + + + + + + + >#< ,#+ + @ + + + + + + + '#)#9+0+0+!#+ + + + + + + + + + + + + K@~#h+h+i+{#7@+ + + + + + + + + + + + + p.q+r+r.+ + + + ;.]#7+7+F ^#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ J+B+B+4@D@U @ @ @ @ @ @ @ @ @ @ @ /#G+V V *+@ @ @ @ @ @ @ @ @ v B B N+(#+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ _#{+^+^+a@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ h@&#$@l@I@J@%@@ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + q@:#=#q + + + + + + + + + + + + + + @ + + + + + + + + <#[#9+0+}#+ + + + + + + + + + + + + |#1#~#h+h+i+w + + + + + + + + + + + + + %+q+2#o.+ + + + s.3#1 7+7+z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + 4#B+B+4@D@B @ @ @ @ @ @ @ @ @ @ 5#F+V V *+@ @ @ @ @ @ @ @ @ . >+B B 6#7#@ @ @ @ @ @ @ @ @ @ @ @ @ @ _#S+{+^+a@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ i@$@$@l@I@I@X@@ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + E@8#9#:#l++ + + + + + + + + + + + + + @ + + + + + + + + 5.[#[#9+.#+ + + + + + + + + + + + ,@0#a#1#~#h+h+b#+ + + + + + + + + + + + + c#q+d#+ + + + . e#3#3#f#_.+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 7@g#B+B+4@h#. @ @ @ @ @ @ @ @ @ 5#i#F+G+*+@ @ @ @ @ @ @ @ @ + M+>+B B *+@ @ @ @ @ @ @ @ @ @ @ @ @ @ _#S+S+{+a@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@j##@$@l@I@k#!++ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + J.9#9#*#P + + + + + + + + + + + + + @ + + + + + + + + {.l#[#[#m#+ + + + + + + + + + + + {.n## a#a#~#h+h+o#+ + + + + + + + + + + p#q#r#s#+ + + + t#%.t+3#u#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ |.v#B+B+4@p @ @ @ @ @ @ @ @ @ 5#i#i#F+*+@ @ @ @ @ @ @ @ @ + M+M+>+B *+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#S+S+H@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ e@@@$@$@l@I@%#+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + J.x#9#9#a+v + + + + + + + + + + + + @ + + + + + + + + + p+^.[#y#z#+ + + + + + + + + + + O.f+n#A#B#1#~#h+'@+ + + + + + + + + + + S@C#C#7 + + + . D#E#%.u+F#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 8 %+B+B+G#*+@ @ @ @ @ @ @ @ H#I#i#i#'+@ @ @ @ @ @ @ @ @ + L+M+M+>+*+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#S+J#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 0@[+@@#@$@l@m@W@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + K#L#x#9#9#8+8.+ + + + + + + + + + + @ + + + + + + + + + H#M#^.[#N#+ + + + + + + + + + + O#f+P#+ Q#a#a#~#R#z + + + + + + + + + E+S#T#U#7@+ + + V#r+E#E#] @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W#$+%+B+B+X#@ @ @ @ @ @ @ @ {.Y#I#i#'+@ @ @ @ @ @ @ @ @ *+p.L+M+6#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#J#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Z#+@@@#@$@l@`#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + C+L#L#x#9#9# $D@+ + + + + + + + + + @ + + + + + + + + + . .$M#^.+$@$+ + + + + + + + + #$M f+$$+ $$# a#a#+$%$+ + + + + + + + + K+o+&$+.+ + + + *$=$-$E#2 @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ . 5@$+%+B+;$@ @ @ @ @ @ @ @ {.) Y#I#'+@ @ @ @ @ @ @ @ @ j K+p.M+>$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ > @ @ @ )+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ,$+@@@$@$@'$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + . )$L#L#x#9#9#8## #$. + + + + + + + @ + + + + + + + + + + !$M#/.^.~$+ + + + + + + + + {$d+e+p + *+]$# a#1#^$. + + + + + + + + E /$($K++ + + j _$q+:$-$z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ z#$+$+%+<$v @ @ @ @ @ @ @ {.) ) Y#;.@ @ @ @ @ @ @ @ + >+K+K+[$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 1$+@+@@@#@2$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + 3$^.L#L#x#9#9#:#=#4$5$+ + + + + + @ + + + + + + + + + + n 6$M#M#r#+ + + + + + + + z l+d+7$z + + 8$n## a#a#U + + + + + + + '#^@9$S#+ + + + 8.r#q+:$e#*+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Y#U.$+$+%+X#@ @ @ @ @ @ @ 0$P@) ) ;.@ @ @ @ @ @ @ + a$I+J+B + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]+.@+@+@@@2$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + 7 c$L#L#x#9#9#:#=#d$0 B@+ + + + @ + + + + + + + + + + + e$f$M#g$+ + + + + + + + U b+c+h$+ + + <.f+n## a#,#+ + + + + + + i$m+m+'@+ + + + 8.C#r#:$A@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ o.#+$+$+$+p @ @ @ @ @ @ @ j$k$P@) ;.@ @ @ @ @ *+|._.H+I+l$+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }$b$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ~+ @m$+@+@n$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + |.o$p$L#x#9#9#:#=#I.`@4 ;.+ + @ + + + + + + + + + + + q$r$f$M#i.+ + + + + + + N#b+s$q.+ + + + N#f+n## t$F@+ + + + + + u$v$m+. + + + + p C#C#r#w$. @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W.@+#+U.$+D+@ @ @ @ @ @ @ j$k$k$P@x$g g y$z$i#F+G+V {.,+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ E+A$b$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ B$ @.@+@C$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + D$L#L#x#9#9#:#=#I.I.E$+ + @ + + + + + + + + + + + |.=@r$f$7$+ + + + + + ;.F$a+G$+ + + + + 5@f+f+n## ;#+ + + + + + H$j+s + + + + + >@T#C#q#r#z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W.@+@+#+U.D+@ @ @ @ @ @ @ B@I$k$k$P@) ) Y#I#i#i#F+G+g . @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^ F@A$b$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ B$ @ @.@C$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + . #$K#J$x#9#9#:#=#I.K$_ + @ + + + + + + + + + + + + F.6+r$Z <.+ + + + + L$0+K A++ + + + + 7 )#f+f+n#M$. + + + + N$O$j+u$+ + + + + >@&$T#q#q#,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.u$@+@+#+D+@ @ @ @ @ @ @ P$Q$I$k$,@7@7@7@R$I#i#i#F+G+:@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^ ,@F@A$|$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }+`+ @ @n@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {$S$x#9#9#:#=#I.T$L$@ + + + + + + + + + + + + 8.y#6+r$I + + + + + U$0+0+,@+ + + + + + V$f+f+f+n#x$+ + + + W$e$X$Y$+ + + + + Z$o+&$9.q#,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.A+u$@+@+R$@ @ @ @ @ @ @ P$D@Q$I$;.@ @ @ @ n I#i#i#F+V *+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^ ,@,@F@`$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }+Z+`+ @ %@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .%h$5+9#9#:#=#I.|@@ + + + + + + + + + + + + + N 6+6++%j + + + + @%9+#%. + + + + + + F#7.f+f+f+O.+ + + ,@q#h+$%;.+ + + + + ,@%%o+H$9.,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.A+A+u$@+R$@ @ @ @ @ @ @ q.D@D@Q$;.@ @ @ @ + i$I#i#i#F+p @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ &%,+,@,@;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ }+Z+Z+`+ %@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7@$.:#9#:#=#*%T@+ + + + + + + + + + + + + G#5+6+6+~@+ + + ; b+[#$++ + + + + + + + T$e+f+f+=%^ + + U 1#h+N#+ + + + + + + V$o+H$H$-%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <.z+A+A+u$R$@ @ @ @ @ @ @ ;%4@D@D@7@@ @ @ @ @ 7@G+I#i#i#F+v @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ >%,%,+,@;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@'%_+Z+Z+ %@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )%9#9#:#=#!%+ + + + + + + + + + + + + 8.0+5+6+w.+ + + j.^.b+*@+ + + + + + + + h$d+e+f+f+h#+ + h$a#1#z#+ + + + + + + | N o+H$~%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ {%y+A+A+>#7 @ @ @ @ @ @ @ ;%B+4@D@7@@ @ @ @ @ @ 8.]%I#i#i#^%+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ >%O+,%,+;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ /%X+(%Z+Z+}+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + . ;.;.+ + + + + + + + + + + 3.{ 9#9#:#_%+ + + + + + + + + + + + + + 9.A.5+:%; + + i /.<%+ + + + + + + + + x$d+d+e+f+[%+ . }%a#k+^ + + + + + + + + s+9$o+p+u.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ '+|%`.y+z+1%@ @ @ @ @ @ @ @ ;%B+B+4@7@@ @ @ @ @ @ @ B Y#I#i#i#2%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 3%9@O+,%;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ /%X+X+(%_+4%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + {.#.Q H#+ + + + + + + + + + + F x#9#9#y.+ + + + + + + + + + + + + + ,#A.A.5+R.+ 5%6%M#7%+ + + + + + + + + ,@8%d+d+e+9%z 0%n## a%+ + + + + + + + + ~@b%9$o+c%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :@}@`.`.y+{.@ @ @ @ @ @ @ @ z#%+B+B+7@@ @ @ @ @ @ @ . 2 Y#I#i#d%F@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :@6#O+O+e%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ f%g%X+X+Y+!+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + h%Q H#+ + + + + + + + + + + 3.K$x#9#y.+ + + + + + + + + + + + + + 7 A.A.A.i%+ t#r$f$+.+ + + + + + + + + + j%c+d+d+e+k%M.f+n#G#+ + + + + + + + + |.b%b%9$l%:@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w z@}@`.m%>$@ @ @ @ @ @ @ @ n%$+%+B+7@@ @ @ @ @ @ @ @ *+2@Y#I#i#o%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :@B 6#O+e%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ p%V+g%X+q%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + r%s%t%+ + + + + + + + + + + + A.L#x#y.+ + + + + + + + + + + + + + + c#A.A.B.V#u%6+:%7@+ + + + + + + + + + D+f+c+d+d+v%w%f+x%7@+ + + + + + + + + . f 8%b%9$y%+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *+O.z@z@z%s.@ @ @ @ @ @ @ @ @ n%$+$+%+7@@ @ @ @ @ @ @ @ @ j A%Y#I#i#_@@ @ @ @ @ @ @ @ @ @ @ @ @ @ :@B B 6#e%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@U+V+V+B%a@+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + r%C%D%+ + + + + + + + + + + + E%L#L#H.+ + + + + + + + + + + + + + + F%G%A.A.0.H%6+I%+ + + + + + + + + + + + [%b+c+d+d+e+f+J%+ + + + + + + + + + + 7 0#8%b%9$K%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ L%R@] z@M%@ @ @ @ @ @ @ @ @ @ ) U.$+$+7@@ @ @ @ @ @ @ @ @ @ n ) Y#I#j$+ @ @ @ @ @ @ @ @ @ @ @ @ @ N%>+B B z @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ b@g@U+V+G@@ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + r%O%@%+ + + + + + + + + + + + P%Q%L#.$+ + + + + + + + + + + + + + + 7 R%G%A.S%!@T%r + + + + + + + + + + + + B b+b+c+d+d+U%6@+ + + + + + + + + + + @ w$V%b%b%W%8.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ V#X%R@R@] p @ @ @ @ @ @ @ @ @ @ Y%#+$+$+K+@ @ @ @ @ @ @ @ @ @ . (@) Y#I#Z%@ @ @ @ @ @ @ @ @ @ @ @ @ N%M+>+B ,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ W@c@^+g@`%0@@ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + &O%P%+ + + + + + + + + + + z .&+&c$4.+ + + + + + + + + + + + + + + + ]$@&G%A.A.d+L$+ + + + + + + + + + + + + #&b+$&c+d+7$+ + + + + + + + + + + + @ + }@V%8%b%E#5%@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ U 7+F +#%&&&@ @ @ @ @ @ @ @ @ @ @ Y%@+@+U.%$@ @ @ @ @ @ @ @ @ @ @ z 2@) Y#*&a$@ @ @ @ @ @ @ @ @ @ @ @ N%M+M+>+u.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ w#{+^+^+a@@ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + =&-&;&1@+ + + + + + + + + + >&,&,&,&A++ + + + + + + + + + + + + + + + .+y.y.G%A.'&+ + + + + + + + + + + + + + )&a+b+b+c+|@+ + + + + + + + + + + + @ @ *+!&0#8%b%[@8.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ i$[%7+7+7%V#@ @ @ @ @ @ @ @ @ @ @ ^ k m%@+@++.@ @ @ @ @ @ @ @ @ @ @ @ ,@2@) ) 3@F@@ @ @ @ @ @ @ @ @ @ @ ~&L+M+M+B ^ @ 8.% ;.@ @ @ @ @ @ @ @ @ @ @ @ _#S+S+{+b@@ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + =&,.-&{&7@+ + + + + + + + :@]&h%^&/&. + + + + + + + + + + + + + + + + z (&y.y.G%f.+ + + + + + + + + + + + + + _.K b+b+$&f.+ + + + + + + + + + + + @ @ @ @ s.t 8%b%_&w + @ @ @ @ @ @ @ @ @ @ . <.#+:&3#1 [%~$@ @ @ @ @ @ @ @ @ @ @ @ n A+c.m%@+<&j + @ @ @ @ @ @ @ @ @ @ @ 8.) ) ) [&+ @ @ @ @ @ @ @ @ @ ;.K+p.L+M+M+B }&|&= 1&@ @ @ @ @ @ @ @ @ > @ @ @ w#2&_#@ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + s%,.,.-&3&4&+ + + + + + p#5&[.6&7&+ @ + + + + + + + + + + + + + + + + + 4+8&y.9&<.+ + + + + + + + + + + + + + j B#K a+s$+ + + + + + + + + + + + + @ @ @ @ @ F#0#8%b%9$#+}&@ @ @ . 0&X#X#X#a&b&E#! t+3#c&,@@ @ @ @ @ @ @ @ ,@|._@_@p.>#A+A+c.m%@+@+A%N$N$V @ @ @ @ @ @ @ @ @ n ) ) ) &&. @ @ @ ;.z ^ E+d&e&K+K+p.L+M+M+4+= = f&@ @ @ @ @ @ @ > |$b$|$@ @ @ R+@ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + g&h&,.,.-&i&J%J%V$E E j&+&k&l&r++ + @ + + + + + + + + + + + + + + + + + 7%H.8&m&+ + + + + + + + + + + + + + + + ++0+K u%+ + + + + + + + + + + + + @ @ @ @ @ @ X#>.n&b%9$o&p&p&7%b&q#r#:$:$:$-$E#E#q p.@ @ @ @ @ @ @ @ @ @ t#z@z%`.`.y+A+A+A+c.m%@+@+U.$+Q.@ @ @ @ @ @ @ @ @ @ | ) ) ) }&@ @ @ n V B@q&I+I+J+K+K+p.L+M+r&= = A ^ s&s&s&*+*+^ t&A$b$b$|$@ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + . z@u&Q ,.-&O%O%C%s%Q v&w&x&n&. + + @ + + + + + + + + + + + + + + + + + 7 2+H.m + + + + + + + + + + + + + + + + y& #0+R + + + + + + + + + + + + + @ @ @ @ @ @ @ @ 7@5@z&9$o+H$H$9.q#q#u q+:$3#& ,@. @ @ @ @ @ @ @ @ @ @ @ A&O.$$9.B&B&C&~ 3+y D&;@;@].5.U @ @ @ @ @ @ @ @ @ @ + 7 : ) A%8.@ @ p P {.[$N+N+N+!#; K+p.L+q&X$..t%B 6#O+O+,%,+,@,@F@A$b$}$> @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + ]%|@|@E&F&F&G&f$e+U$*++ + + + @ + + + + + + + + + + + + + + + + + ;.H&H&p.+ + + + + + + + + + + + + + + + + 8 I&z + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ 7@N$5$G+G+G+V V V F#i$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 8 T#6&= = 6&E L J&!.= f&: @ @ @ @ @ @ @ @ @ @ @ @ ,@: ) A%:@@ @ @ @ @ @ @ @ @ @ z L$F@t&t&K&:@:@:@3%>%>%&%^ 7@*+. @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ *+L&L&M&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +"+ + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ p j&= N&@ @ @ {. .= f&_ @ @ @ @ @ @ @ @ @ @ @ @ L$: ) A%8.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ ;.= = 4+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ + i = { : @ @ @ @ @ @ @ @ @ @ @ @ + U ) ) v @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ %.= = <.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ <.x = l.@ @ @ @ @ @ U @ @ @ 2 , :@. g n 7@; , , , _.@ @ @ @ @ @ @ @ ).7@@ @ @ @ @ u.l#{ { .#@ @ @ @ @ @ @ @ @ '@&.{ O&@ @ q., ` = = I , , _.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + > @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ [.= l.@ @ @ z ) /.S$@ @ ;.*.= 5.@ @ @ ; ~.= = = P&! @ @ @ ^ #$!%O ' :@@ @ @ @ <.=&Q&2@R&= 3+@ @ @ @ @ @ )%O m.* = e.V$@ S&= = = = = = = %.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + J @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ [.= T&@ M$Z 9 = = U&@ @ f = = 5.@ @ j.=#r#&.V&,.= 6&:@@ W&~.= = = = :@@ @ @ u.X&:.2 @ ; Y&Q {.@ @ @ @ Z&!.t >.r `&= 7%@ ) &.K = *&.&.&.G+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ g .*= K@@ M$c+I&=#= U&@ 8.~.= H.U @ | l T#@ @ @ .#= = v%@ +*I&I&|&= = :@@ @ :@@*= S @ @ @ c#= Z$@ @ @ |.x##*@ @ + 2.= 7%@ @ @ $*= D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ ;.< = h *+@ @ @ @ %*= U&@ &*~.!$;.@ @ /.= .#@ @ @ @ **= ]&@ @ @ @ X = =*z @ @ 5$= e., @ @ @ c#= Z$@ @ + S = ; @ @ + 2.= 7%@ @ @ $*= D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ 0 = H r @ @ @ @ @ %*= U&; !.E @ @ @ <.A ' @ @ @ @ @ -*= W @ @ @ @ X = K @ @ @ t.= ;*@ @ @ @ >*= Z$@ @ x$= = <.@ @ + R , y&@ @ @ 0 = D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&i.D D D = e.,*@ @ @ @ @ @ %*= U&,*C&@ @ @ @ V&= Q&@ @ @ @ @ -*= W @ @ @ @ X = K @ @ + %*= 9$@ @ @ '@'*= Z$@ @ ! = - j @ @ + @ @ @ @ @ @ )*= D&@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&{.4.t ~.!*g @ @ @ @ @ @ @ %*= U&l : @ @ @ @ <%= ~*@ @ @ @ @ -*= W @ @ @ @ X = K @ @ + = = #*q.q.f 6&Q ~.: @ @ {*= ~ @ @ @ + @ @ @ @ @ @ )*= ,*@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ @ %*= W m.*+@ @ @ @ *.= ~*@ @ @ @ @ -*= W @ @ @ @ X = K @ @ z+= = k.L&L&S H&{.@ @ @ @ D = ~ @ @ @ + @ @ @ @ @ @ )*= ).@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ p ]*= = Z + @ @ @ @ m.= ^*@ @ @ @ @ -*= W @ @ @ P /*= K @ @ 7&= = T@@ @ @ @ @ @ @ @ U x = )%@ @ @ + @ @ @ @ @ @ )*= ).@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ : = = = q @ @ @ @ @ m.= D$@ @ @ @ @ -*= x#@ @ @ S.= = K @ @ 7&= = m @ @ @ @ @ @ 2@*+r = = Y @ @ @ + @ *+: @ @ :@[.= ).@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ : = = (*z @ @ @ @ G+* = ~*@ @ @ @ @ -*= ] @ @ @ S.= = T#@ @ 7&= = 9$@ @ @ @ @ @ _*8.(@W = Y @ @ @ + @ v :*@ @ ]#= = ).@ @ @ >.| @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= N&@ @ @ @ @ @ @ @ @ @ @ @ : = = <*@ @ @ @ @ @ m.= b.@ @ @ @ @ -*m.<.@ @ @ S.= = R @ @ ;.= = ]&@ @ @ @ @ ^ H.j @ D = [**+@ @ + @ n+]&@ @ ]#= = ).@ @ @ 1#!$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !$= ]*u.@ @ @ @ @ @ @ @ @ @ @ : = ' ).@ @ @ @ @ @ m.= ' @ @ @ @ K+}*< @ @ @ @ S.= = R @ @ + 6&= .*@ @ @ @ @ t%|*@ @ D = = 8 @ @ + <.A V.@ @ ]#= = >&@ @ @ d !$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ;.^ ^ u = = }.:@^ ^ + @ @ @ @ @ @ @ : = 5+@ @ @ @ @ @ @ 1*= = .#@ @ . *x P @ @ @ @ S.= e.>.@ @ @ a.'*e.&*| ^ ^ 2*( r @ @ Z&H = f&3*3*^.A }.@ @ @ ]#= = C&^ U S L&,@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 4*= = X =#=#=#l = = ;.@ @ @ @ @ @ @ : = 0#@ @ @ @ @ @ @ x@( = Q e+e+H%D q.@ @ @ @ @ S.= J.@ @ @ @ @ U T = = = = =&5*@ @ @ @ ,#!.= = = ' d v @ @ @ Z.;*= = = = *.. @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 2 2*2*7 @ @ @ ;.2*2*+ @ @ @ @ @ @ @ L$2*y&@ @ @ @ @ @ @ @ q.7&c c c 7%,+@ @ @ @ @ @ S.= J.@ @ @ @ @ @ P c c c S&U @ @ @ @ @ @ z+c c c I&@ @ @ @ @ @ + 2*2*2*2*L$@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ S.= J.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ j&= k.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 6*= U#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ U e.A . @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ v%= f.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ) s%}%;.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + @ @ @ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *+_&D l+@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <%7*a.@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ _.(.7@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ "}; diff --git a/apps/X11/InstallMgr/src/pix/trash.xpm b/apps/X11/InstallMgr/src/pix/trash.xpm new file mode 100644 index 0000000..611703b --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/trash.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * trash_xpm[] = { +"16 16 6 1", +" c None", +". c #D3D3DD", +"+ c #000000", +"@ c #7F7F7F", +"# c #FFFFFF", +"$ c #BFBFBF", +".....+++++......", +".....+@@@+......", +"..+++++++++++...", +"..+#$$$@@@@@+...", +"..+++++++++++...", +"...+@+@+@+@+....", +"...+#+$+@+@+....", +"..++#+$+$+@++...", +".+.+#+$+@+@+.+..", +"...+#+$+$+@+....", +"...+#+$+@+@+....", +"...+#+$+$+@+....", +"...+#+$+@+@+....", +"...+#+$+$+@+....", +"...+#@@@@@@+....", +"...+++++++++...."}; diff --git a/apps/X11/InstallMgr/src/pix/upgrdlk.xpm b/apps/X11/InstallMgr/src/pix/upgrdlk.xpm new file mode 100644 index 0000000..fbc1977 --- /dev/null +++ b/apps/X11/InstallMgr/src/pix/upgrdlk.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * upgrdlk_xpm[] = { +"16 16 6 1", +" c None", +". c #000000", +"+ c #00FFFF", +"@ c #FFFF00", +"# c #808080", +"$ c #FFFFFF", +" .... . ", +" .++++. .@. ", +" .+..#. .$. ", +".........@. ", +".++++++..$. ", +".+....#..@. ", +".+#####..$.. ", +".+....#.$@.@. ", +" ......$@$.$. ", +" .@$@$@$@. ", +" .@$@$@. ", +" ........ ", +" .++++++. ", +" ......... ", +" .@....... ", +" ......... "}; diff --git a/apps/X11/InstallMgr/src/support.c b/apps/X11/InstallMgr/src/support.c new file mode 100644 index 0000000..6e66c25 --- /dev/null +++ b/apps/X11/InstallMgr/src/support.c @@ -0,0 +1,143 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <string.h> + +#include <gnome.h> + +#include "support.h" + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* create_dummy_pixmap (GtkWidget *widget, + gboolean gnome_pixmap); + +GtkWidget* +lookup_widget (GtkWidget *widget, + const gchar *widget_name) +{ + GtkWidget *parent, *found_widget; + + for (;;) + { + if (GTK_IS_MENU (widget)) + parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else + parent = widget->parent; + if (parent == NULL) + break; + widget = parent; + } + + found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} + +/* This is a dummy pixmap we use when a pixmap can't be found. */ +static char *dummy_pixmap_xpm[] = { +/* columns rows colors chars-per-pixel */ +"1 1 1 1", +" c None", +/* pixels */ +" ", +" " +}; + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* +create_dummy_pixmap (GtkWidget *widget, + gboolean gnome_pixmap) +{ + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + + if (gnome_pixmap) + { + return gnome_pixmap_new_from_xpm_d (dummy_pixmap_xpm); + } + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, + NULL, dummy_pixmap_xpm); + if (gdkpixmap == NULL) + g_error ("Couldn't create replacement pixmap."); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +/* This is an internally used function to create pixmaps. */ +GtkWidget* +create_pixmap (GtkWidget *widget, + const gchar *filename, + gboolean gnome_pixmap) +{ + GtkWidget *pixmap; + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + gchar *pathname; + + pathname = gnome_pixmap_file (filename); + if (!pathname) + { + g_warning (_("Couldn't find pixmap file: %s"), filename); + return create_dummy_pixmap (widget, gnome_pixmap); + } + + if (gnome_pixmap) + { + pixmap = gnome_pixmap_new_from_file (pathname); + g_free (pathname); + return pixmap; + } + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, + NULL, pathname); + if (gdkpixmap == NULL) + { + g_warning (_("Couldn't create pixmap from file: %s"), pathname); + g_free (pathname); + return create_dummy_pixmap (widget, gnome_pixmap); + } + g_free (pathname); + + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +/* This is an internally used function to create imlib images. */ +GdkImlibImage* +create_image (const gchar *filename) +{ + GdkImlibImage *image; + gchar *pathname; + + pathname = gnome_pixmap_file (filename); + if (!pathname) + { + g_warning (_("Couldn't find pixmap file: %s"), filename); + return NULL; + } + + image = gdk_imlib_load_image (pathname); + g_free (pathname); + return image; +} + diff --git a/apps/X11/InstallMgr/src/support.h b/apps/X11/InstallMgr/src/support.h new file mode 100644 index 0000000..d9bb072 --- /dev/null +++ b/apps/X11/InstallMgr/src/support.h @@ -0,0 +1,34 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#include <gnome.h> + +/* + * Public Functions. + */ + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +GtkWidget* lookup_widget (GtkWidget *widget, + const gchar *widget_name); + +/* get_widget() is deprecated. Use lookup_widget instead. */ +#define get_widget lookup_widget + + +/* + * Private Functions. + */ + +/* This is used to create the pixmaps in the interface. */ +GtkWidget* create_pixmap (GtkWidget *widget, + const gchar *filename, + gboolean gnome_pixmap); + +GdkImlibImage* create_image (const gchar *filename); + diff --git a/apps/X11/InstallMgr/stamp-h b/apps/X11/InstallMgr/stamp-h new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/apps/X11/InstallMgr/stamp-h @@ -0,0 +1 @@ +timestamp diff --git a/apps/X11/InstallMgr/stamp-h.in b/apps/X11/InstallMgr/stamp-h.in new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/apps/X11/InstallMgr/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/apps/X11/Makefile b/apps/X11/Makefile new file mode 100644 index 0000000..ef8eccd --- /dev/null +++ b/apps/X11/Makefile @@ -0,0 +1,5 @@ + +root := ../.. + +all: + make -C ${root} diff --git a/apps/X11/VCL/Makefile b/apps/X11/VCL/Makefile new file mode 100644 index 0000000..81f7721 --- /dev/null +++ b/apps/X11/VCL/Makefile @@ -0,0 +1,4 @@ +root := ../../.. + +all: + make -C ${root} diff --git a/apps/X11/VCL/TComponent.cpp b/apps/X11/VCL/TComponent.cpp new file mode 100644 index 0000000..c01f110 --- /dev/null +++ b/apps/X11/VCL/TComponent.cpp @@ -0,0 +1,8 @@ +#include <TComponent.h> + +TComponent::TComponent(TComponent *AOwner) { +} + + +TComponent::~TComponent() { +} diff --git a/apps/X11/VCL/TComponent.h b/apps/X11/VCL/TComponent.h new file mode 100644 index 0000000..6981980 --- /dev/null +++ b/apps/X11/VCL/TComponent.h @@ -0,0 +1,134 @@ +#ifndef TCOMPONENT_H +#define TCOMPONENT_H + +#include <TPersistent.h> +#include <string> + +enum TOperation {opInsert, opRemove}; + +/* + TComponentState = set of (csLoading, csReading, csWriting, csDestroying, + csDesigning, csAncestor, csUpdating, csFixups); + TComponentStyle = set of (csInheritable, csCheckPropAvail); + TGetChildProc = procedure (Child: TComponent) of object; +*/ + +typedef string TComponentName; + +/* + IVCLComObject = interface + ['{E07892A0-F52F-11CF-BD2F-0020AF0E5B81}'] + function GetTypeInfoCount(out Count: Integer): HResult; stdcall; + function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall; + function GetIDsOfNames(const IID: TGUID; Names: Pointer; + NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall; + function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; + Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall; + function SafeCallException(ExceptObject: TObject; + ExceptAddr: Pointer): HResult; + procedure FreeOnRelease; + end; + + IDesignerNotify = interface + ['{B971E807-E3A6-11D1-AAB1-00C04FB16FBC}'] + procedure Modified; + procedure Notification(AnObject: TPersistent; Operation: TOperation); + end; + + TBasicAction = class; + +*/ +class TComponent : public TPersistent { +private: +/* + FOwner: TComponent; + FName: TComponentName; + FTag: Longint; + FComponents: TList; + FFreeNotifies: TList; + FDesignInfo: Longint; + FVCLComObject: Pointer; + FComponentState: TComponentState; + function GetComObject: IUnknown; + function GetComponent(AIndex: Integer): TComponent; + function GetComponentCount: Integer; + function GetComponentIndex: Integer; + procedure Insert(AComponent: TComponent); + procedure ReadLeft(Reader: TReader); + procedure ReadTop(Reader: TReader); + procedure Remove(AComponent: TComponent); + procedure SetComponentIndex(Value: Integer); + procedure SetReference(Enable: Boolean); + procedure WriteLeft(Writer: TWriter); + procedure WriteTop(Writer: TWriter); + protected + FComponentStyle: TComponentStyle; + procedure ChangeName(const NewName: TComponentName); + procedure DefineProperties(Filer: TFiler); override; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); dynamic; + function GetChildOwner: TComponent; dynamic; + function GetChildParent: TComponent; dynamic; + function GetOwner: TPersistent; override; + procedure Loaded; virtual; + procedure Notification(AComponent: TComponent; + Operation: TOperation); virtual; + procedure ReadState(Reader: TReader); virtual; + procedure SetAncestor(Value: Boolean); + procedure SetDesigning(Value: Boolean); + procedure SetName(const NewName: TComponentName); virtual; + procedure SetChildOrder(Child: TComponent; Order: Integer); dynamic; + procedure SetParentComponent(Value: TComponent); dynamic; + procedure Updating; dynamic; + procedure Updated; dynamic; + class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); virtual; + procedure ValidateRename(AComponent: TComponent; + const CurName, NewName: string); virtual; + procedure ValidateContainer(AComponent: TComponent); dynamic; + procedure ValidateInsert(AComponent: TComponent); dynamic; + procedure WriteState(Writer: TWriter); virtual; + { IUnknown } + function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; + function _AddRef: Integer; stdcall; + function _Release: Integer; stdcall; + { IDispatch } + function GetTypeInfoCount(out Count: Integer): HResult; stdcall; + function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall; + function GetIDsOfNames(const IID: TGUID; Names: Pointer; + NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall; + function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; + Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall; +*/ +public: + TComponent(TComponent *AOwner); + ~TComponent(); +/* + procedure DestroyComponents; + procedure Destroying; + function ExecuteAction(Action: TBasicAction): Boolean; dynamic; + function FindComponent(const AName: string): TComponent; + procedure FreeNotification(AComponent: TComponent); + procedure FreeOnRelease; + function GetParentComponent: TComponent; dynamic; + function GetNamePath: string; override; + function HasParent: Boolean; dynamic; + procedure InsertComponent(AComponent: TComponent); + procedure RemoveComponent(AComponent: TComponent); + function SafeCallException(ExceptObject: TObject; + ExceptAddr: Pointer): HResult; override; + function UpdateAction(Action: TBasicAction): Boolean; dynamic; + property ComObject: IUnknown read GetComObject; + property Components[Index: Integer]: TComponent read GetComponent; + property ComponentCount: Integer read GetComponentCount; + property ComponentIndex: Integer read GetComponentIndex write SetComponentIndex; + property ComponentState: TComponentState read FComponentState; + property ComponentStyle: TComponentStyle read FComponentStyle; + property DesignInfo: Longint read FDesignInfo write FDesignInfo; + property Owner: TComponent read FOwner; + property VCLComObject: Pointer read FVCLComObject write FVCLComObject; + published + property Name: TComponentName read FName write SetName stored False; + property Tag: Longint read FTag write FTag default 0; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TControl.cpp b/apps/X11/VCL/TControl.cpp new file mode 100644 index 0000000..3a0ac4d --- /dev/null +++ b/apps/X11/VCL/TControl.cpp @@ -0,0 +1,1874 @@ +#include <TControl.h> + +TControl::TControl(TComponent *AOwner) : TComponent(AOwner) { +} + +TControl::~TControl() { +} + + +/* +procedure TControl.Repaint; +var + DC: HDC; +begin + if (Visible or (csDesigning in ComponentState) and + not (csNoDesignVisible in ControlStyle)) and (Parent <> nil) and + Parent.HandleAllocated then + if csOpaque in ControlStyle then + begin + DC := GetDC(Parent.Handle); + try + IntersectClipRect(DC, Left, Top, Left + Width, Top + Height); + Parent.PaintControls(DC, Self); + finally + ReleaseDC(Parent.Handle, DC); + end; + end else + begin + Invalidate; + Update; + end; +end; +*/ +void TControl::Repaint() { +} + + +/* +{ TControl } + +constructor TControl.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowProc := WndProc; + FControlStyle := [csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks]; + FFont := TFont.Create; + FFont.OnChange := FontChanged; + FAnchors := [akLeft, akTop]; + FConstraints := TSizeConstraints.Create(Self); + FConstraints.OnChange := DoConstraintsChange; + FColor := clWindow; + FVisible := True; + FEnabled := True; + FParentFont := True; + FParentColor := True; + FParentShowHint := True; + FParentBiDiMode := True; + FIsControl := False; + FDragCursor := crDrag; + FFloatingDockSiteClass := TCustomDockForm; +end; + +destructor TControl.Destroy; +begin + Application.ControlDestroyed(Self); + SetParent(nil); + if (FHostDockSite <> nil) and not (csDestroying in FHostDockSite.ComponentState) then + begin + FHostDockSite.Perform(CM_UNDOCKCLIENT, 0, Integer(Self)); + Dock(NullDockSite, BoundsRect); + FHostDockSite := nil; + end; + FActionLink.Free; + FActionLink := nil; + FConstraints.Free; + FFont.Free; + StrDispose(FText); + inherited Destroy; +end; + +function TControl.GetDragImages: TDragImageList; +begin + Result := nil; +end; + +function TControl.GetEnabled: Boolean; +begin + Result := FEnabled; +end; + +function TControl.GetPalette: HPALETTE; +begin + Result := 0; +end; + +function TControl.HasParent: Boolean; +begin + Result := FParent <> nil; +end; + +function TControl.GetParentComponent: TComponent; +begin + Result := Parent; +end; + +procedure TControl.SetParentComponent(Value: TComponent); +begin + if Value is TWinControl then SetParent(TWinControl(Value)); +end; + +function TControl.PaletteChanged(Foreground: Boolean): Boolean; +var + OldPalette, Palette: HPALETTE; + WindowHandle: HWnd; + DC: HDC; +begin + Result := False; + if not Visible then Exit; + Palette := GetPalette; + if Palette <> 0 then + begin + DC := GetDeviceContext(WindowHandle); + OldPalette := SelectPalette(DC, Palette, not Foreground); + if RealizePalette(DC) <> 0 then Invalidate; + SelectPalette(DC, OldPalette, True); + ReleaseDC(WindowHandle, DC); + Result := True; + end; +end; + +function TControl.GetAction: TBasicAction; +begin + if ActionLink <> nil then + Result := ActionLink.Action else + Result := nil; +end; + +procedure TControl.SetAction(Value: TBasicAction); +begin + if Value = nil then + begin + ActionLink.Free; + ActionLink := nil; + Exclude(FControlStyle, csActionClient); + end + else + begin + Include(FControlStyle, csActionClient); + if ActionLink = nil then + ActionLink := GetActionLinkClass.Create(Self); + ActionLink.Action := Value; + ActionLink.OnChange := DoActionChange; + ActionChange(Value, csLoading in Value.ComponentState); + Value.FreeNotification(Self); + end; +end; + +function TControl.IsAnchorsStored: Boolean; +begin + Result := Anchors <> AnchorAlign[Align]; +end; + +procedure TControl.SetDragMode(Value: TDragMode); +begin + FDragMode := Value; +end; + +procedure TControl.RequestAlign; +begin + if Parent <> nil then Parent.AlignControl(Self); +end; + +procedure TControl.Resize; +begin + if Assigned(FOnResize) then FOnResize(Self); +end; + +procedure TControl.ReadState(Reader: TReader); +begin + Include(FControlState, csReadingState); + if Reader.Parent is TWinControl then Parent := TWinControl(Reader.Parent); + inherited ReadState(Reader); + Exclude(FControlState, csReadingState); + if Parent <> nil then + begin + Perform(CM_PARENTCOLORCHANGED, 0, 0); + Perform(CM_PARENTFONTCHANGED, 0, 0); + Perform(CM_PARENTSHOWHINTCHANGED, 0, 0); + Perform(CM_SYSFONTCHANGED, 0, 0); + Perform(CM_PARENTBIDIMODECHANGED, 0, 0); + end; +end; + +procedure TControl.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then + if AComponent = PopupMenu then PopupMenu := nil + else if AComponent = Action then Action := nil; +end; + +procedure TControl.SetAlign(Value: TAlign); +var + OldAlign: TAlign; +begin + if FAlign <> Value then + begin + OldAlign := FAlign; + FAlign := Value; + Anchors := AnchorAlign[Value]; + if not (csLoading in ComponentState) and (not (csDesigning in ComponentState) or + (Parent <> nil)) then + if ((OldAlign in [alTop, alBottom]) = (Value in [alRight, alLeft])) and + not (OldAlign in [alNone, alClient]) and not (Value in [alNone, alClient]) then + SetBounds(Left, Top, Height, Width) + else + AdjustSize; + end; + RequestAlign; +end; + +procedure TControl.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); +begin + if CheckNewSize(AWidth, AHeight) and + ((ALeft <> FLeft) or (ATop <> FTop) or + (AWidth <> FWidth) or (AHeight <> FHeight)) then + begin + InvalidateControl(Visible, False); + UpdateLastResize(AWidth, AHeight); + FLeft := ALeft; + FTop := ATop; + FWidth := AWidth; + FHeight := AHeight; + Invalidate; + Perform(WM_WINDOWPOSCHANGED, 0, 0); + RequestAlign; + if not (csLoading in ComponentState) then Resize; + end; +end; + +procedure TControl.SetLeft(Value: Integer); +begin + SetBounds(Value, FTop, FWidth, FHeight); + Include(FScalingFlags, sfLeft); +end; + +procedure TControl.SetTop(Value: Integer); +begin + SetBounds(FLeft, Value, FWidth, FHeight); + Include(FScalingFlags, sfTop); +end; + +procedure TControl.SetWidth(Value: Integer); +begin + SetBounds(FLeft, FTop, Value, FHeight); + Include(FScalingFlags, sfWidth); +end; + +procedure TControl.SetHeight(Value: Integer); +begin + SetBounds(FLeft, FTop, FWidth, Value); + Include(FScalingFlags, sfHeight); +end; + +procedure TControl.Dock(NewDockSite: TWinControl; ARect: TRect); +var + PrevDockSite: TWinControl; +begin + if HostDockSite <> NewDockSite then + begin + if (FHostDockSite <> nil) and (FHostDockSite.FDockClients <> nil) then + FHostDockSite.FDockClients.Remove(Self); + if (NewDockSite <> nil) and (NewDockSite <> NullDockSite) and + (NewDockSite.FDockClients <> nil) then + NewDockSite.FDockClients.Add(Self); + end; + Include(FControlState, csDocking); + try + if NewDockSite <> NullDockSite then + DoDock(NewDockSite, ARect); + if FHostDockSite <> NewDockSite then + begin + PrevDockSite := FHostDockSite; + if NewDockSite <> NullDockSite then + begin + FHostDockSite := NewDockSite; + if NewDockSite <> nil then NewDockSite.DoAddDockClient(Self, ARect); + end + else + FHostDockSite := nil; + if PrevDockSite <> nil then PrevDockSite.DoRemoveDockClient(Self); + end; + finally + Exclude(FControlState, csDocking); + end; +end; + +procedure TControl.DoDock(NewDockSite: TWinControl; var ARect: TRect); +begin + { Erase TControls before UpdateboundsRect modifies position } + if not (Self is TWinControl) then InvalidateControl(Visible, False); + if Parent <> NewDockSite then + UpdateBoundsRect(ARect) else + BoundsRect := ARect; + if (NewDockSite = nil) or (NewDockSite = NullDockSite) then Parent := nil; +end; + +procedure TControl.SetHostDockSite(Value: TWinControl); +begin + Dock(Value, BoundsRect); +end; + +function TControl.GetBoundsRect: TRect; +begin + Result.Left := Left; + Result.Top := Top; + Result.Right := Left + Width; + Result.Bottom := Top + Height; +end; + +procedure TControl.SetBoundsRect(const Rect: TRect); +begin + with Rect do SetBounds(Left, Top, Right - Left, Bottom - Top); +end; + +function TControl.GetClientRect: TRect; +begin + Result.Left := 0; + Result.Top := 0; + Result.Right := Width; + Result.Bottom := Height; +end; + +function TControl.GetClientWidth: Integer; +begin + Result := ClientRect.Right; +end; + +procedure TControl.SetClientWidth(Value: Integer); +begin + SetClientSize(Point(Value, ClientHeight)); +end; + +function TControl.GetClientHeight: Integer; +begin + Result := ClientRect.Bottom; +end; + +procedure TControl.SetClientHeight(Value: Integer); +begin + SetClientSize(Point(ClientWidth, Value)); +end; + +function TControl.GetClientOrigin: TPoint; +begin + if Parent = nil then + raise EInvalidOperation.CreateFmt(SParentRequired, [Name]); + Result := Parent.ClientOrigin; + Inc(Result.X, FLeft); + Inc(Result.Y, FTop); +end; + +function TControl.ClientToScreen(const Point: TPoint): TPoint; +var + Origin: TPoint; +begin + Origin := ClientOrigin; + Result.X := Point.X + Origin.X; + Result.Y := Point.Y + Origin.Y; +end; + +function TControl.ScreenToClient(const Point: TPoint): TPoint; +var + Origin: TPoint; +begin + Origin := ClientOrigin; + Result.X := Point.X - Origin.X; + Result.Y := Point.Y - Origin.Y; +end; + +procedure TControl.SendCancelMode(Sender: TControl); +var + Control: TControl; +begin + Control := Self; + while Control <> nil do + begin + if Control is TCustomForm then + TCustomForm(Control).SendCancelMode(Sender); + Control := Control.Parent; + end; +end; + +procedure TControl.SendDockNotification(Msg: Cardinal; WParam, LParam: Integer); +var + NotifyRec: TDockNotifyRec; +begin + if (FHostDockSite <> nil) and (DragObject = nil) and + (ComponentState * [csLoading, csDestroying] = []) then + begin + with NotifyRec do + begin + ClientMsg := Msg; + MsgWParam := WParam; + MsgLParam := LParam; + end; + FHostDockSite.Perform(CM_DOCKNOTIFICATION, Integer(Self), Integer(@NotifyRec)); + end; +end; + +procedure TControl.Changed; +begin + Perform(CM_CHANGED, 0, Longint(Self)); +end; + +procedure TControl.ChangeScale(M, D: Integer); +var + X, Y, W, H: Integer; + Flags: TScalingFlags; +begin + if M <> D then + begin + if csLoading in ComponentState then + Flags := ScalingFlags else + Flags := [sfLeft, sfTop, sfWidth, sfHeight, sfFont]; + if sfLeft in Flags then + X := MulDiv(FLeft, M, D) else + X := FLeft; + if sfTop in Flags then + Y := MulDiv(FTop, M, D) else + Y := FTop; + if (sfWidth in Flags) and not (csFixedWidth in ControlStyle) then + if sfLeft in Flags then + W := MulDiv(FLeft + FWidth, M, D) - X else + W := MulDiv(FWidth, M, D) + else W := FWidth; + if (sfHeight in Flags) and not (csFixedHeight in ControlStyle) then + if sfHeight in Flags then + H := MulDiv(FTop + FHeight, M, D) - Y else + H := MulDiv(FTop, M, D ) + else H := FHeight; + SetBounds(X, Y, W, H); + if not ParentFont and (sfFont in Flags) then + Font.Size := MulDiv(Font.Size, M, D); + end; + FScalingFlags := []; +end; + +procedure TControl.SetAutoSize(Value: Boolean); +begin + if FAutoSize <> Value then + begin + FAutoSize := Value; + if Value then AdjustSize; + end; +end; + +procedure TControl.SetName(const Value: TComponentName); +var + ChangeText: Boolean; +begin + ChangeText := (csSetCaption in ControlStyle) and (Name = Text) and + ((Owner = nil) or not (Owner is TControl) or + not (csLoading in TControl(Owner).ComponentState)); + inherited SetName(Value); + if ChangeText then Text := Value; +end; + +procedure TControl.SetClientSize(Value: TPoint); +var + Client: TRect; +begin + Client := GetClientRect; + SetBounds(FLeft, FTop, Width - Client.Right + Value.X, Height - + Client.Bottom + Value.Y); +end; + +procedure TControl.SetParent(AParent: TWinControl); +begin + if FParent <> AParent then + begin + if Parent = Self then + raise EInvalidOperation.Create(SControlParentSetToSelf); + if FParent <> nil then FParent.RemoveControl(Self); + if AParent <> nil then AParent.InsertControl(Self); + end; +end; + +procedure TControl.SetVisible(Value: Boolean); +begin + if FVisible <> Value then + begin + VisibleChanging; + FVisible := Value; + Perform(CM_VISIBLECHANGED, Ord(Value), 0); + RequestAlign; + end; +end; + +procedure TControl.SetEnabled(Value: Boolean); +begin + if FEnabled <> Value then + begin + FEnabled := Value; + Perform(CM_ENABLEDCHANGED, 0, 0); + end; +end; + +function TControl.GetTextLen: Integer; +begin + Result := Perform(WM_GETTEXTLENGTH, 0, 0); +end; + +function TControl.GetTextBuf(Buffer: PChar; BufSize: Integer): Integer; +begin + Result := Perform(WM_GETTEXT, BufSize, Longint(Buffer)); +end; + +function TControl.GetUndockHeight: Integer; +begin + if FUndockHeight > 0 then Result := FUndockHeight + else Result := Height; +end; + +function TControl.GetUndockWidth: Integer; +begin + if FUndockWidth > 0 then Result := FUndockWidth + else Result := Width; +end; + +function TControl.GetTBDockHeight: Integer; +begin + if FTBDockHeight > 0 then Result := FTBDockHeight + else Result := UndockHeight; +end; + +function TControl.GetLRDockWidth: Integer; +begin + if FLRDockWidth > 0 then Result := FLRDockWidth + else Result := UndockWidth; +end; + +procedure TControl.SetPopupMenu(Value: TPopupMenu); +begin + FPopupMenu := Value; + if Value <> nil then + begin + Value.ParentBiDiModeChanged(Self); + Value.FreeNotification(Self); + end; +end; + +procedure TControl.SetTextBuf(Buffer: PChar); +begin + Perform(WM_SETTEXT, 0, Longint(Buffer)); + Perform(CM_TEXTCHANGED, 0, 0); +end; + +function TControl.GetText: TCaption; +var + Len: Integer; +begin + Len := GetTextLen; + SetString(Result, PChar(nil), Len); + if Len <> 0 then GetTextBuf(Pointer(Result), Len + 1); +end; + +procedure TControl.SetText(const Value: TCaption); +begin + if GetText <> Value then SetTextBuf(PChar(Value)); +end; + +procedure TControl.SetBiDiMode(Value: TBiDiMode); +begin + if FBiDiMode <> Value then + begin + FBiDiMode := Value; + FParentBiDiMode := False; + Perform(CM_BIDIMODECHANGED, 0, 0); + end; +end; + +procedure TControl.FontChanged(Sender: TObject); +begin + FParentFont := False; + FDesktopFont := False; + if Font.Height <> FFontHeight then + begin + Include(FScalingFlags, sfFont); + FFontHeight := Font.Height; + end; + Perform(CM_FONTCHANGED, 0, 0); +end; + +procedure TControl.SetFont(Value: TFont); +begin + FFont.Assign(Value); +end; + +function TControl.IsFontStored: Boolean; +begin + Result := not ParentFont and not DesktopFont; +end; + +function TControl.IsShowHintStored: Boolean; +begin + Result := not ParentShowHint; +end; + +function TControl.IsBiDiModeStored: Boolean; +begin + Result := not ParentBiDiMode; +end; + +procedure TControl.SetParentFont(Value: Boolean); +begin + if FParentFont <> Value then + begin + FParentFont := Value; + if FParent <> nil then Perform(CM_PARENTFONTCHANGED, 0, 0); + end; +end; + +procedure TControl.SetDesktopFont(Value: Boolean); +begin + if FDesktopFont <> Value then + begin + FDesktopFont := Value; + Perform(CM_SYSFONTCHANGED, 0, 0); + end; +end; + +procedure TControl.SetShowHint(Value: Boolean); +begin + if FShowHint <> Value then + begin + FShowHint := Value; + FParentShowHint := False; + Perform(CM_SHOWHINTCHANGED, 0, 0); + end; +end; + +procedure TControl.SetParentShowHint(Value: Boolean); +begin + if FParentShowHint <> Value then + begin + FParentShowHint := Value; + if FParent <> nil then Perform(CM_PARENTSHOWHINTCHANGED, 0, 0); + end; +end; + +procedure TControl.SetColor(Value: TColor); +begin + if FColor <> Value then + begin + FColor := Value; + FParentColor := False; + Perform(CM_COLORCHANGED, 0, 0); + end; +end; + +function TControl.IsColorStored: Boolean; +begin + Result := not ParentColor; +end; + +procedure TControl.SetParentColor(Value: Boolean); +begin + if FParentColor <> Value then + begin + FParentColor := Value; + if FParent <> nil then Perform(CM_PARENTCOLORCHANGED, 0, 0); + end; +end; + +procedure TControl.SetParentBiDiMode(Value: Boolean); +begin + if FParentBiDiMode <> Value then + begin + FParentBiDiMode := Value; + if FParent <> nil then Perform(CM_PARENTBIDIMODECHANGED, 0, 0); + end; +end; + +procedure TControl.SetCursor(Value: TCursor); +begin + if FCursor <> Value then + begin + FCursor := Value; + Perform(CM_CURSORCHANGED, 0, 0); + end; +end; + +function TControl.GetMouseCapture: Boolean; +begin + Result := GetCaptureControl = Self; +end; + +procedure TControl.SetMouseCapture(Value: Boolean); +begin + if MouseCapture <> Value then + if Value then SetCaptureControl(Self) else SetCaptureControl(nil); +end; + +procedure TControl.BringToFront; +begin + SetZOrder(True); +end; + +procedure TControl.SendToBack; +begin + SetZOrder(False); +end; + +procedure TControl.SetZOrderPosition(Position: Integer); +var + I, Count: Integer; + ParentForm: TCustomForm; +begin + if FParent <> nil then + begin + I := FParent.FControls.IndexOf(Self); + if I >= 0 then + begin + Count := FParent.FControls.Count; + if Position < 0 then Position := 0; + if Position >= Count then Position := Count - 1; + if Position <> I then + begin + FParent.FControls.Delete(I); + FParent.FControls.Insert(Position, Self); + InvalidateControl(Visible, True); + ParentForm := ValidParentForm(Self); + if csPalette in ParentForm.ControlState then + TControl(ParentForm).PaletteChanged(True); + end; + end; + end; +end; + +procedure TControl.SetZOrder(TopMost: Boolean); +begin + if FParent <> nil then + if TopMost then + SetZOrderPosition(FParent.FControls.Count - 1) else + SetZOrderPosition(0); +end; + +function TControl.GetDeviceContext(var WindowHandle: HWnd): HDC; +begin + if Parent = nil then + raise EInvalidOperation.CreateFmt(SParentRequired, [Name]); + Result := Parent.GetDeviceContext(WindowHandle); + SetViewportOrgEx(Result, Left, Top, nil); + IntersectClipRect(Result, 0, 0, Width, Height); +end; + +procedure TControl.InvalidateControl(IsVisible, IsOpaque: Boolean); +var + Rect: TRect; + + function BackgroundClipped: Boolean; + var + R: TRect; + List: TList; + I: Integer; + C: TControl; + begin + Result := True; + List := FParent.FControls; + I := List.IndexOf(Self); + while I > 0 do + begin + Dec(I); + C := List[I]; + with C do + if C.Visible and (csOpaque in ControlStyle) then + begin + IntersectRect(R, Rect, BoundsRect); + if EqualRect(R, Rect) then Exit; + end; + end; + Result := False; + end; + +begin + if (IsVisible or (csDesigning in ComponentState) and + not (csNoDesignVisible in ControlStyle)) and (Parent <> nil) and + Parent.HandleAllocated then + begin + Rect := BoundsRect; + InvalidateRect(Parent.Handle, @Rect, not (IsOpaque or + (csOpaque in Parent.ControlStyle) or BackgroundClipped)); + end; +end; + +procedure TControl.Invalidate; +begin + InvalidateControl(Visible, csOpaque in ControlStyle); +end; + +procedure TControl.Hide; +begin + Visible := False; +end; + +procedure TControl.Show; +begin + if Parent <> nil then Parent.ShowControl(Self); + if not (csDesigning in ComponentState) or + (csNoDesignVisible in ControlStyle) then Visible := True; +end; + +procedure TControl.Update; +begin + if Parent <> nil then Parent.Update; +end; + +procedure TControl.Refresh; +begin + Repaint; +end; + +function TControl.GetControlsAlignment: TAlignment; +begin + Result := taLeftJustify; +end; + +function TControl.IsRightToLeft: Boolean; +begin + Result := SysLocale.MiddleEast and (BiDiMode <> bdLeftToRight); +end; + +function TControl.UseRightToLeftReading: Boolean; +begin + Result := SysLocale.MiddleEast and (BiDiMode <> bdLeftToRight); +end; + +function TControl.UseRightToLeftAlignment: Boolean; +begin + Result := SysLocale.MiddleEast and (BiDiMode = bdRightToLeft); +end; + +function TControl.UseRightToLeftScrollBar: Boolean; +begin + Result := SysLocale.MiddleEast and + (BiDiMode in [bdRightToLeft, bdRightToLeftNoAlign]); +end; + +procedure TControl.BeginAutoDrag; +begin + BeginDrag(Mouse.DragImmediate, Mouse.DragThreshold); +end; + +procedure TControl.BeginDrag(Immediate: Boolean; Threshold: Integer); +var + P: TPoint; +begin + if (Self is TCustomForm) and (FDragKind <> dkDock) then + raise EInvalidOperation.Create(SCannotDragForm); + CalcDockSizes; + if (DragControl = nil) or (DragControl = Pointer($FFFFFFFF)) then + begin + DragControl := nil; + if csLButtonDown in ControlState then + begin + GetCursorPos(P); + P := ScreenToClient(P); + Perform(WM_LBUTTONUP, 0, Longint(PointToSmallPoint(P))); + end; + { Use default value when Threshold < 0 } + if Threshold < 0 then + Threshold := Mouse.DragThreshold; + // prevent calling EndDrag within BeginDrag + if DragControl <> Pointer($FFFFFFFF) then + DragInitControl(Self, Immediate, Threshold); + end; +end; + +procedure TControl.EndDrag(Drop: Boolean); +begin + if Dragging then DragDone(Drop) + // prevent calling EndDrag within BeginDrag + else if DragControl = nil then DragControl := Pointer($FFFFFFFF); +end; + +procedure TControl.DragCanceled; +begin +end; + +function TControl.Dragging: Boolean; +begin + Result := DragControl = Self; +end; + +procedure TControl.DragOver(Source: TObject; X, Y: Integer; + State: TDragState; var Accept: Boolean); +begin + Accept := False; + if Assigned(FOnDragOver) then + begin + Accept := True; + FOnDragOver(Self, Source, X, Y, State, Accept); + end; +end; + +procedure TControl.DragDrop(Source: TObject; X, Y: Integer); +begin + if Assigned(FOnDragDrop) then FOnDragDrop(Self, Source, X, Y); +end; + +procedure TControl.DoStartDrag(var DragObject: TDragObject); +begin + if Assigned(FOnStartDrag) then FOnStartDrag(Self, DragObject); +end; + +procedure TControl.DoEndDrag(Target: TObject; X, Y: Integer); +begin + if Assigned(FOnEndDrag) then FOnEndDrag(Self, Target, X, Y); +end; + +procedure TControl.PositionDockRect(DragDockObject: TDragDockObject); +var + NewWidth, NewHeight: Integer; + TempX, TempY: Double; +begin + with DragDockObject do + begin + if (DragTarget = nil) or (not TWinControl(DragTarget).UseDockManager) then + begin + NewWidth := Control.UndockWidth; + NewHeight := Control.UndockHeight; + // Drag position for dock rect is scaled relative to control's click point. + TempX := DragPos.X - ((NewWidth) * FMouseDeltaX); + TempY := DragPos.Y - ((NewHeight) * FMouseDeltaY); + with FDockRect do + begin + Left := Round(TempX); + Top := Round(TempY); + Right := Left + NewWidth; + Bottom := Top + NewHeight; + end; + { Allow DragDockObject final say on this new dock rect } + AdjustDockRect(FDockRect); + end + else begin + GetWindowRect(TWinControl(DragTarget).Handle, FDockRect); + if TWinControl(DragTarget).UseDockManager and + (TWinControl(DragTarget).DockManager <> nil) then + TWinControl(DragTarget).DockManager.PositionDockRect(Control, + DropOnControl, DropAlign, FDockRect); + end; + end; +end; + +procedure TControl.DockTrackNoTarget(Source: TDragDockObject; X, Y: Integer); +begin + PositionDockRect(Source); +end; + +procedure TControl.DoEndDock(Target: TObject; X, Y: Integer); +begin + if Assigned(FOnEndDock) then FOnEndDock(Self, Target, X, Y); +end; + +procedure TControl.DoStartDock(var DragObject: TDragObject); +begin + if Assigned(FOnStartDock) then FOnStartDock(Self, TDragDockObject(DragObject)); +end; + +procedure TControl.DefaultDockImage(DragDockObject: TDragDockObject; + Erase: Boolean); +var + DesktopWindow: HWND; + DC: HDC; + OldBrush: HBrush; + DrawRect: TRect; + PenSize: Integer; +begin + with DragDockObject do + begin + PenSize := FrameWidth; + if Erase then DrawRect := FEraseDockRect + else DrawRect := FDockRect; + end; + DesktopWindow := GetDesktopWindow; + DC := GetDCEx(DesktopWindow, 0, DCX_CACHE or DCX_LOCKWINDOWUPDATE); + try + OldBrush := SelectObject(DC, DragDockObject.Brush.Handle); + with DrawRect do + begin + PatBlt(DC, Left + PenSize, Top, Right - Left - PenSize, PenSize, PATINVERT); + PatBlt(DC, Right - PenSize, Top + PenSize, PenSize, Bottom - Top - PenSize, PATINVERT); + PatBlt(DC, Left, Bottom - PenSize, Right - Left - PenSize, PenSize, PATINVERT); + PatBlt(DC, Left, Top, PenSize, Bottom - Top - PenSize, PATINVERT); + end; + SelectObject(DC, OldBrush); + finally + ReleaseDC(DesktopWindow, DC); + end; +end; + +procedure TControl.DrawDragDockImage(DragDockObject: TDragDockObject); +begin + DefaultDockImage(DragDockObject, False); +end; + +procedure TControl.EraseDragDockImage(DragDockObject: TDragDockObject); +begin + DefaultDockImage(DragDockObject, True); +end; + +procedure TControl.DoDragMsg(var DragMsg: TCMDrag); +var + S: TObject; + Accepts, IsDockOp: Boolean; +begin + with DragMsg, DragRec^ do + begin + S := Source; + IsDockOp := S is TDragDockObject; + if DragFreeObject and not IsDockOp then + S := (S as TDragControlObject).Control; + with ScreenToClient(Pos) do + case DragMessage of + dmDragEnter, dmDragLeave, dmDragMove: + begin + Accepts := True; + if IsDockOp then + begin + TWinControl(Target).DockOver(TDragDockObject(S), X, Y, + TDragState(DragMessage), Accepts) + end + else + DragOver(S, X, Y, TDragState(DragMessage), Accepts); + Result := Ord(Accepts); + end; + dmDragDrop: + begin + if IsDockOp then TWinControl(Target).DockDrop(TDragDockObject(S), X, Y) + else DragDrop(S, X, Y); + end; + end; + end; +end; + +function TControl.ManualDock(NewDockSite: TWinControl; DropControl: TControl; + ControlSide: TAlign): Boolean; +var + R: TRect; + DockObject: TDragDockObject; + HostDockSiteHandle: THandle; +begin + if (NewDockSite = nil) or (NewDockSite = NullDockSite) then + begin + if (HostDockSite <> nil) and HostDockSite.UseDockManager and + (HostDockSite.DockManager <> nil) then + begin + HostDockSite.DockManager.GetControlBounds(Self, R); + MapWindowPoints(HostDockSite.Handle, 0, R.TopLeft, 2); + end + else begin + R.TopLeft := Point(Left, Top); + if Parent <> nil then R.TopLeft := Parent.ClientToScreen(R.TopLeft); + end; + R := Bounds(R.Left, R.Top, UndockWidth, UndockHeight); + Result := ManualFloat(R); + end + else + begin + CalcDockSizes; + Result := (HostDockSite = nil) or HostDockSite.DoUndock(NewDockSite, Self); + if Result then + begin + DockObject := TDragDockObject.Create(Self); + try + if HostDockSite <> nil then + HostDockSiteHandle := HostDockSite.Handle else + HostDockSiteHandle := 0; + R := BoundsRect; + if HostDockSiteHandle <> 0 then + MapWindowPoints(HostDockSiteHandle, 0, R, 2); + with DockObject do + begin + FDragTarget := NewDockSite; + FDropAlign := ControlSide; + FDropOnControl := DropControl; + DockRect := R; + end; + MapWindowPoints(0, NewDockSite.Handle, R.TopLeft, 1); + NewDockSite.DockDrop(DockObject, R.Left, R.Top); + finally + DockObject.Free; + end; + end; + end; +end; + +function TControl.ManualFloat(ScreenPos: TRect): Boolean; +var + FloatHost: TWinControl; +begin + Result := (HostDockSite = nil) or HostDockSite.DoUndock(nil, Self); + if Result then + begin + FloatHost := CreateFloatingDockSite(ScreenPos); + if FloatHost <> nil then + Dock(FloatHost, Rect(0, 0, FloatHost.ClientWidth, FloatHost.ClientHeight)) + else + Dock(FloatHost, ScreenPos); + end; +end; + +function TControl.ReplaceDockedControl(Control: TControl; + NewDockSite: TWinControl; DropControl: TControl; ControlSide: TAlign): Boolean; +var + OldDockSite: TWinControl; +begin + Result := False; + if (Control.HostDockSite = nil) or ((Control.HostDockSite.UseDockManager) and + (Control.HostDockSite.DockManager <> nil)) then + begin + OldDockSite := Control.HostDockSite; + if OldDockSite <> nil then + OldDockSite.DockManager.SetReplacingControl(Control); + try + ManualDock(OldDockSite, nil, alTop); + finally + if OldDockSite <> nil then + OldDockSite.DockManager.SetReplacingControl(nil); + end; + if Control.ManualDock(NewDockSite, DropControl, ControlSide) then + Result := True; + end; +end; + +procedure TControl.DoConstraintsChange(Sender: TObject); +begin + AdjustSize; +end; + +function TControl.CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; +begin + Result := True; +end; + +function TControl.CanResize(var NewWidth, NewHeight: Integer): Boolean; +begin + Result := True; + if Assigned(FOnCanResize) then FOnCanResize(Self, NewWidth, NewHeight, Result); +end; + +function TControl.DoCanAutoSize(var NewWidth, NewHeight: Integer): Boolean; +var + W, H: Integer; +begin + if Align <> alClient then + begin + W := NewWidth; + H := NewHeight; + Result := CanAutoSize(W, H); + if Align in [alNone, alLeft, alRight] then + NewWidth := W; + if Align in [alNone, alTop, alBottom] then + NewHeight := H; + end + else Result := True; +end; + +function TControl.DoCanResize(var NewWidth, NewHeight: Integer): Boolean; +begin + Result := CanResize(NewWidth, NewHeight); + if Result then DoConstrainedResize(NewWidth, NewHeight); +end; + +procedure TControl.ConstrainedResize(var MinWidth, MinHeight, MaxWidth, + MaxHeight: Integer); +begin + if Assigned(FOnConstrainedResize) then FOnConstrainedResize(Self, MinWidth, + MinHeight, MaxWidth, MaxHeight); +end; + +procedure TControl.DoConstrainedResize(var NewWidth, NewHeight: Integer); +var + MinWidth, MinHeight, MaxWidth, MaxHeight: Integer; +begin + if Constraints.MinWidth > 0 then + MinWidth := Constraints.MinWidth + else + MinWidth := 0; + if Constraints.MinHeight > 0 then + MinHeight := Constraints.MinHeight + else + MinHeight := 0; + if Constraints.MaxWidth > 0 then + MaxWidth := Constraints.MaxWidth + else + MaxWidth := 0; + if Constraints.MaxHeight > 0 then + MaxHeight := Constraints.MaxHeight + else + MaxHeight := 0; + { Allow override of constraints } + ConstrainedResize(MinWidth, MinHeight, MaxWidth, MaxHeight); + if (MaxWidth > 0) and (NewWidth > MaxWidth) then + NewWidth := MaxWidth + else if (MinWidth > 0) and (NewWidth < MinWidth) then + NewWidth := MinWidth; + if (MaxHeight > 0) and (NewHeight > MaxHeight) then + NewHeight := MaxHeight + else if (MinHeight > 0) and (NewHeight < MinHeight) then + NewHeight := MinHeight; +end; + +function TControl.Perform(Msg: Cardinal; WParam, LParam: Longint): Longint; +var + Message: TMessage; +begin + Message.Msg := Msg; + Message.WParam := WParam; + Message.LParam := LParam; + Message.Result := 0; + if Self <> nil then WindowProc(Message); + Result := Message.Result; +end; + +procedure TControl.CalcDockSizes; +begin + if Floating then + begin + UndockHeight := Height; + UndockWidth := Width; + end + else if HostDockSite <> nil then + begin + if (DockOrientation = doVertical) or + (HostDockSite.Align in [alTop, alBottom]) then + TBDockHeight := Height + else if (DockOrientation = doHorizontal) or + (HostDockSite.Align in [alLeft, alRight]) then + LRDockWidth := Width; + end; +end; + +procedure TControl.UpdateBoundsRect(const R: TRect); +begin + UpdateLastResize(R.Right - R.Left, R.Bottom - R.Top); + FLeft := R.Left; + FTop := R.Top; + FWidth := R.Right - R.Left; + FHeight := R.Bottom - R.Top; +end; + +procedure TControl.VisibleChanging; +begin +end; + +procedure TControl.WndProc(var Message: TMessage); +var + Form: TCustomForm; +begin + if (csDesigning in ComponentState) then + begin + Form := GetParentForm(Self); + if (Form <> nil) and (Form.Designer <> nil) and + Form.Designer.IsDesignMsg(Self, Message) then Exit; + end + else if (Message.Msg >= WM_KEYFIRST) and (Message.Msg <= WM_KEYLAST) then + begin + Form := GetParentForm(Self); + if (Form <> nil) and Form.WantChildKey(Self, Message) then Exit; + end + else if (Message.Msg >= WM_MOUSEFIRST) and (Message.Msg <= WM_MOUSELAST) then + begin + if not (csDoubleClicks in ControlStyle) then + case Message.Msg of + WM_LBUTTONDBLCLK, WM_RBUTTONDBLCLK, WM_MBUTTONDBLCLK: + Dec(Message.Msg, WM_LBUTTONDBLCLK - WM_LBUTTONDOWN); + end; + case Message.Msg of + WM_MOUSEMOVE: Application.HintMouseMessage(Self, Message); + WM_LBUTTONDOWN, WM_LBUTTONDBLCLK: + begin + if FDragMode = dmAutomatic then + begin + BeginAutoDrag; + Exit; + end; + Include(FControlState, csLButtonDown); + end; + WM_LBUTTONUP: + Exclude(FControlState, csLButtonDown); + end; + end + else if Message.Msg = CM_VISIBLECHANGED then + with Message do + SendDockNotification(Msg, WParam, LParam); + Dispatch(Message); +end; + +procedure TControl.DefaultHandler(var Message); +var + P: PChar; +begin + with TMessage(Message) do + case Msg of + WM_GETTEXT: + begin + if FText <> nil then P := FText else P := ''; + Result := StrLen(StrLCopy(PChar(LParam), P, WParam - 1)); + end; + WM_GETTEXTLENGTH: + if FText = nil then Result := 0 else Result := StrLen(FText); + WM_SETTEXT: + begin + P := StrNew(PChar(LParam)); + StrDispose(FText); + FText := P; + SendDockNotification(Msg, WParam, LParam); + end; + end; +end; + +procedure TControl.ReadIsControl(Reader: TReader); +begin + FIsControl := Reader.ReadBoolean; +end; + +procedure TControl.WriteIsControl(Writer: TWriter); +begin + Writer.WriteBoolean(FIsControl); +end; + +procedure TControl.DefineProperties(Filer: TFiler); + + function DoWrite: Boolean; + begin + if Filer.Ancestor <> nil then + Result := TControl(Filer.Ancestor).IsControl <> IsControl else + Result := IsControl; + end; + +begin + { The call to inherited DefinedProperties is omitted since the Left and + Top special properties are redefined with real properties } + Filer.DefineProperty('IsControl', ReadIsControl, WriteIsControl, DoWrite); +end; + +procedure TControl.Click; +begin + { Call OnClick if assigned and not equal to associated action's OnExecute. + If associated action's OnExecute assigned then call it, otherwise, call + OnClick. } + if Assigned(FOnClick) and (Action <> nil) and (@FOnClick <> @Action.OnExecute) then + FOnClick(Self) + else if not (csDesigning in ComponentState) and (ActionLink <> nil) then + ActionLink.Execute + else if Assigned(FOnClick) then + FOnClick(Self); +end; + +procedure TControl.DblClick; +begin + if Assigned(FOnDblClick) then FOnDblClick(Self); +end; + +procedure TControl.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, X, Y); +end; + +procedure TControl.DoMouseDown(var Message: TWMMouse; Button: TMouseButton; + Shift: TShiftState); +begin + if not (csNoStdEvents in ControlStyle) then + with Message do + MouseDown(Button, KeysToShiftState(Keys) + Shift, XPos, YPos); +end; + +procedure TControl.WMLButtonDown(var Message: TWMLButtonDown); +begin + SendCancelMode(Self); + inherited; + if csCaptureMouse in ControlStyle then MouseCapture := True; + if csClickEvents in ControlStyle then Include(FControlState, csClicked); + DoMouseDown(Message, mbLeft, []); +end; + +procedure TControl.WMNCLButtonDown(var Message: TWMNCLButtonDown); +begin + SendCancelMode(Self); + inherited; +end; + +procedure TControl.WMLButtonDblClk(var Message: TWMLButtonDblClk); +begin + SendCancelMode(Self); + inherited; + if csCaptureMouse in ControlStyle then MouseCapture := True; + if csClickEvents in ControlStyle then DblClick; + DoMouseDown(Message, mbLeft, [ssDouble]); +end; + +function TControl.GetPopupMenu: TPopupMenu; +begin + Result := FPopupMenu; +end; + +procedure TControl.CheckMenuPopup(const Pos: TSmallPoint); +var + Control: TControl; + PopupMenu: TPopupMenu; +begin + if csDesigning in ComponentState then Exit; + Control := Self; + while Control <> nil do + begin + PopupMenu := Control.GetPopupMenu; + if (PopupMenu <> nil) then + begin + if not PopupMenu.AutoPopup then Exit; + SendCancelMode(nil); + PopupMenu.PopupComponent := Control; + with ClientToScreen(SmallPointToPoint(Pos)) do + PopupMenu.Popup(X, Y); + Exit; + end; + Control := Control.Parent; + end; +end; + +function TControl.CheckNewSize(var NewWidth, NewHeight: Integer): Boolean; +var + W, H, W2, H2: Integer; +begin + Result := False; + W := NewWidth; + H := NewHeight; + if DoCanResize(W, H) then + begin + W2 := W; + H2 := H; + Result := not AutoSize or (DoCanAutoSize(W2, H2) and (W2 = W) and (H2 = H)) or + DoCanResize(W2, H2); + if Result then + begin + NewWidth := W2; + NewHeight := H2; + end; + end; +end; + +procedure TControl.WMRButtonDown(var Message: TWMRButtonDown); +begin + inherited; + DoMouseDown(Message, mbRight, []); +end; + +procedure TControl.WMRButtonDblClk(var Message: TWMRButtonDblClk); +begin + inherited; + DoMouseDown(Message, mbRight, [ssDouble]); +end; + +procedure TControl.WMMButtonDown(var Message: TWMMButtonDown); +begin + inherited; + DoMouseDown(Message, mbMiddle, []); +end; + +procedure TControl.WMMButtonDblClk(var Message: TWMMButtonDblClk); +begin + inherited; + DoMouseDown(Message, mbMiddle, [ssDouble]); +end; + +procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer); +begin + if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X, Y); +end; + +procedure TControl.WMMouseMove(var Message: TWMMouseMove); +begin + inherited; + if not (csNoStdEvents in ControlStyle) then + with Message do MouseMove(KeysToShiftState(Keys), XPos, YPos); +end; + +procedure TControl.MouseUp(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X, Y); +end; + +procedure TControl.DoMouseUp(var Message: TWMMouse; Button: TMouseButton); +begin + if not (csNoStdEvents in ControlStyle) then + with Message do MouseUp(Button, KeysToShiftState(Keys), XPos, YPos); +end; + +procedure TControl.WMLButtonUp(var Message: TWMLButtonUp); +begin + inherited; + if csCaptureMouse in ControlStyle then MouseCapture := False; + if csClicked in ControlState then + begin + Exclude(FControlState, csClicked); + if PtInRect(ClientRect, SmallPointToPoint(Message.Pos)) then Click; + end; + DoMouseUp(Message, mbLeft); +end; + +procedure TControl.WMRButtonUp(var Message: TWMRButtonUp); +begin + inherited; + DoMouseUp(Message, mbRight); + if Message.Result = 0 then CheckMenuPopup(Message.Pos); +end; + +procedure TControl.WMMButtonUp(var Message: TWMMButtonUp); +begin + inherited; + DoMouseUp(Message, mbMiddle); +end; + +procedure TControl.WMCancelMode(var Message: TWMCancelMode); +begin + inherited; + if MouseCapture then + begin + MouseCapture := False; + if csLButtonDown in ControlState then Perform(WM_LBUTTONUP, 0, + Integer($FFFFFFFF)); + end + else + Exclude(FControlState, csLButtonDown); +end; + +procedure TControl.WMWindowPosChanged(var Message: TWMWindowPosChanged); +begin + inherited; + { Update min/max width/height to actual extents control will allow } + if ComponentState * [csReading, csLoading] = [] then + begin + with Constraints do + begin + if (MaxWidth > 0) and (Width > MaxWidth) then + FMaxWidth := Width + else if (MinWidth > 0) and (Width < MinWidth) then + FMinWidth := Width; + if (MaxHeight > 0) and (Height > MaxHeight) then + FMaxHeight := Height + else if (MinHeight > 0) and (Height < MinHeight) then + FMinHeight := Height; + end; + if Message.WindowPos <> nil then + with Message.WindowPos^ do + if (FHostDockSite <> nil) and not (csDocking in ControlState) and + (Flags and SWP_NOSIZE = 0) and (cx <> 0) and (cy <> 0) then + CalcDockSizes; + end; +end; + +procedure TControl.CMVisibleChanged(var Message: TMessage); +begin + if not (csDesigning in ComponentState) or + (csNoDesignVisible in ControlStyle) then + InvalidateControl(True, FVisible and (csOpaque in ControlStyle)); +end; + +procedure TControl.CMEnabledChanged(var Message: TMessage); +begin + Invalidate; +end; + +procedure TControl.CMFontChanged(var Message: TMessage); +begin + Invalidate; +end; + +procedure TControl.CMColorChanged(var Message: TMessage); +begin + Invalidate; +end; + +procedure TControl.CMParentColorChanged(var Message: TMessage); +begin + if FParentColor then + begin + if Message.wParam <> 0 then + SetColor(TColor(Message.lParam)) else + SetColor(FParent.FColor); + FParentColor := True; + end; +end; + +procedure TControl.CMParentBiDiModeChanged(var Message: TMessage); +begin + if FParentBiDiMode then + begin + if FParent <> nil then BiDiMode := FParent.BiDiMode; + FParentBiDiMode := True; + end; +end; + +procedure TControl.CMBiDiModeChanged(var Message: TMessage); +begin + if (SysLocale.MiddleEast) and (Message.wParam = 0) then Invalidate; +end; + +procedure TControl.CMParentShowHintChanged(var Message: TMessage); +begin + if FParentShowHint then + begin + SetShowHint(FParent.FShowHint); + FParentShowHint := True; + end; +end; + +procedure TControl.CMParentFontChanged(var Message: TMessage); +begin + if FParentFont then + begin + if Message.wParam <> 0 then + SetFont(TFont(Message.lParam)) else + SetFont(FParent.FFont); + FParentFont := True; + end; +end; + +procedure TControl.CMSysFontChanged(var Message: TMessage); +begin + if FDesktopFont then + begin + SetFont(Screen.IconFont); + FDesktopFont := True; + end; +end; + +procedure TControl.CMHitTest(var Message: TCMHitTest); +begin + Message.Result := 1; +end; + +procedure TControl.CMMouseEnter(var Message: TMessage); +begin + if FParent <> nil then + FParent.Perform(CM_MOUSEENTER, 0, Longint(Self)); +end; + +procedure TControl.CMMouseLeave(var Message: TMessage); +begin + if FParent <> nil then + FParent.Perform(CM_MOUSELEAVE, 0, Longint(Self)); +end; + +procedure TControl.CMDesignHitTest(var Message: TCMDesignHitTest); +begin + Message.Result := 0; +end; + +function TControl.CreateFloatingDockSite(Bounds: TRect): TWinControl; +begin + Result := nil; + if (FloatingDockSiteClass <> nil) and + (FloatingDockSiteClass <> TWinControlClass(ClassType)) then + begin + Result := FloatingDockSiteClass.Create(Application); + with Bounds do + begin + Result.Top := Top; + Result.Left := Left; + Result.ClientWidth := Right - Left; + Result.ClientHeight := Bottom - Top; + end; + end; +end; + +procedure TControl.CMFloat(var Message: TCMFloat); +var + FloatHost: TWinControl; + + procedure UpdateFloatingDockSitePos; + var + P: TPoint; + begin + P := Parent.ClientToScreen(Point(Left, Top)); + with Message.DockSource.DockRect do + Parent.BoundsRect := Bounds(Left + Parent.Left - P.X, + Top + Parent.Top - P.Y, + Right - Left + Parent.Width - Width, + Bottom - Top + Parent.Height - Height); + end; + +begin + if Floating and (Parent <> nil) then + UpdateFloatingDockSitePos + else + begin + FloatHost := CreateFloatingDockSite(Message.DockSource.DockRect); + if FloatHost <> nil then + begin + Message.DockSource.DragTarget := FloatHost; + Message.DockSource.DragHandle := FloatHost.Handle; + end; + end; +end; + +procedure TControl.ActionChange(Sender: TObject; CheckDefaults: Boolean); +begin + if Sender is TCustomAction then + with TCustomAction(Sender) do + begin + if not CheckDefaults or (Self.Caption = '') then + Self.Caption := Caption; + if not CheckDefaults or (Self.Enabled = True) then + Self.Enabled := Enabled; + if not CheckDefaults or (Self.Hint = '') then + Self.Hint := Hint; + if not CheckDefaults or (Self.Visible = True) then + Self.Visible := Visible; + if not CheckDefaults or not Assigned(Self.OnClick) then + Self.OnClick := OnExecute; + end; +end; + +procedure TControl.DoActionChange(Sender: TObject); +begin + if Sender = Action then ActionChange(Sender, False); +end; + +function TControl.GetActionLinkClass: TControlActionLinkClass; +begin + Result := TControlActionLink; +end; + +function TControl.IsCaptionStored: Boolean; +begin + Result := (ActionLink = nil) or not ActionLink.IsCaptionLinked; +end; + +function TControl.IsEnabledStored: Boolean; +begin + Result := (ActionLink = nil) or not ActionLink.IsEnabledLinked; +end; + +function TControl.IsHintStored: Boolean; +begin + Result := (ActionLink = nil) or not ActionLink.IsHintLinked; +end; + +function TControl.IsVisibleStored: Boolean; +begin + Result := (ActionLink = nil) or not ActionLink.IsVisibleLinked; +end; + +function TControl.IsOnClickStored: Boolean; +begin + Result := (ActionLink = nil) or not ActionLink.IsOnExecuteLinked; +end; + +procedure TControl.Loaded; +begin + inherited Loaded; + if Action <> nil then ActionChange(Action, True); +end; + +procedure TControl.AssignTo(Dest: TPersistent); +begin + if Dest is TCustomAction then + with TCustomAction(Dest) do + begin + Enabled := Self.Enabled; + Hint := Self.Hint; + Caption := Self.Caption; + Visible := Self.Visible; + OnExecute := Self.OnClick; + end + else inherited AssignTo(Dest); +end; + +function TControl.GetDockEdge(MousePos: TPoint): TAlign; + + function MinVar(const Data: array of Double): Integer; + var + I: Integer; + begin + Result := 0; + for I := Low(Data) + 1 to High(Data) do + if Data[I] < Data[Result] then Result := I; + end; + +var + T, L, B, R: Integer; +begin + Result := alNone; + R := Width; + B := Height; + // if Point is outside control, then we can determine side quickly + if MousePos.X <= 0 then Result := alLeft + else if MousePos.X >= R then Result := alRight + else if MousePos.Y <= 0 then Result := alTop + else if MousePos.Y >= B then Result := alBottom + else begin + // if MousePos is inside the control, then we need to figure out which side + // MousePos is closest to. + T := MousePos.Y; + B := B - MousePos.Y; + L := MousePos.X; + R := R - MousePos.X; + case MinVar([L, R, T, B]) of + 0: Result := alLeft; + 1: Result := alRight; + 2: Result := alTop; + 3: Result := alBottom; + end; + end; +end; + +function TControl.GetFloating: Boolean; +begin + Result := (HostDockSite <> nil) and (HostDockSite is FloatingDockSiteClass); +end; + +function TControl.GetFloatingDockSiteClass: TWinControlClass; +begin + Result := FFloatingDockSiteClass; +end; + +procedure TControl.AdjustSize; +begin + if not (csLoading in ComponentState) then SetBounds(Left, Top, Width, Height); +end; + +function TControl.DrawTextBiDiModeFlags(Flags: Longint): Longint; +begin + Result := Flags; + { do not change center alignment } + if UseRightToLeftAlignment then + if Result and DT_RIGHT = DT_RIGHT then + Result := Result and not DT_RIGHT { removing DT_RIGHT, makes it DT_LEFT } + else if not (Result and DT_CENTER = DT_CENTER) then + Result := Result or DT_RIGHT; + Result := Result or DrawTextBiDiModeFlagsReadingOnly; +end; + +function TControl.DrawTextBiDiModeFlagsReadingOnly: Longint; +begin + if UseRightToLeftReading then + Result := DT_RTLREADING + else + Result := 0; +end; + +procedure TControl.InitiateAction; +begin + if ActionLink <> nil then ActionLink.Update; +end; + +procedure TControl.CMHintShow(var Message: TMessage); +begin + if (ActionLink <> nil) and + not ActionLink.DoShowHint(TCMHintShow(Message).HintInfo^.HintStr) then + Message.Result := 1; +end; + +procedure TControl.UpdateLastResize(NewWidth, NewHeight: Integer); +begin + FLastWidth := NewWidth; + FLastHeight := NewHeight; +end; +*/ diff --git a/apps/X11/VCL/TControl.h b/apps/X11/VCL/TControl.h new file mode 100644 index 0000000..0969339 --- /dev/null +++ b/apps/X11/VCL/TControl.h @@ -0,0 +1,331 @@ +#ifndef TCONTROL_H +#define TCONTROL_H + +#include <TComponent.h> + +class TControl : public TComponent { +private: +/* + FParent: TWinControl; + FWindowProc: TWndMethod; + FLeft: Integer; + FTop: Integer; + FWidth: Integer; + FHeight: Integer; + FControlStyle: TControlStyle; + FControlState: TControlState; + FDesktopFont: Boolean; + FVisible: Boolean; + FEnabled: Boolean; + FParentFont: Boolean; + FParentColor: Boolean; + FAlign: TAlign; + FAutoSize: Boolean; + FDragMode: TDragMode; + FIsControl: Boolean; + FBiDiMode: TBiDiMode; + FParentBiDiMode: Boolean; + FText: PChar; + FFont: TFont; + FActionLink: TControlActionLink; + FAnchors: TAnchors; + FColor: TColor; + FConstraints: TSizeConstraints; + FCursor: TCursor; + FDragCursor: TCursor; + FPopupMenu: TPopupMenu; + FHint: string; + FFontHeight: Integer; + FLastHeight: Integer; + FLastWidth: Integer; + FScalingFlags: TScalingFlags; + FShowHint: Boolean; + FParentShowHint: Boolean; + FDragKind: TDragKind; + FDockOrientation: TDockOrientation; + FHostDockSite: TWinControl; + FUndockWidth: Integer; + FUndockHeight: Integer; + FLRDockWidth: Integer; + FTBDockHeight: Integer; + FFloatingDockSiteClass: TWinControlClass; + FOnCanResize: TCanResizeEvent; + FOnConstrainedResize: TConstrainedResizeEvent; + FOnMouseDown: TMouseEvent; + FOnMouseMove: TMouseMoveEvent; + FOnMouseUp: TMouseEvent; + FOnDragDrop: TDragDropEvent; + FOnDragOver: TDragOverEvent; + FOnResize: TNotifyEvent; + FOnStartDock: TStartDockEvent; + FOnEndDock: TEndDragEvent; + FOnStartDrag: TStartDragEvent; + FOnEndDrag: TEndDragEvent; + FOnClick: TNotifyEvent; + FOnDblClick: TNotifyEvent; + procedure CalcDockSizes; + procedure CheckMenuPopup(const Pos: TSmallPoint); + function CheckNewSize(var NewWidth, NewHeight: Integer): Boolean; + function CreateFloatingDockSite(Bounds: TRect): TWinControl; + procedure DoActionChange(Sender: TObject); + function DoCanAutoSize(var NewWidth, NewHeight: Integer): Boolean; + function DoCanResize(var NewWidth, NewHeight: Integer): Boolean; + procedure DoConstraintsChange(Sender: TObject); + procedure DoConstrainedResize(var NewWidth, NewHeight: Integer); + procedure DoDragMsg(var DragMsg: TCMDrag); + procedure DoMouseDown(var Message: TWMMouse; Button: TMouseButton; + Shift: TShiftState); + procedure DoMouseUp(var Message: TWMMouse; Button: TMouseButton); + procedure FontChanged(Sender: TObject); + function GetAction: TBasicAction; + function GetBoundsRect: TRect; + function GetClientHeight: Integer; + function GetClientWidth: Integer; + function GetLRDockWidth: Integer; + function GetMouseCapture: Boolean; + function GetText: TCaption; + function GetTBDockHeight: Integer; + function GetUndockWidth: Integer; + function GetUndockHeight: Integer; + procedure InvalidateControl(IsVisible, IsOpaque: Boolean); + function IsAnchorsStored: Boolean; + function IsBiDiModeStored: Boolean; + function IsCaptionStored: Boolean; + function IsColorStored: Boolean; + function IsEnabledStored: Boolean; + function IsFontStored: Boolean; + function IsHintStored: Boolean; + function IsOnClickStored: Boolean; + function IsShowHintStored: Boolean; + function IsVisibleStored: Boolean; + procedure ReadIsControl(Reader: TReader); + procedure SetAction(Value: TBasicAction); + procedure SetAlign(Value: TAlign); + procedure SetAutoSize(Value: Boolean); + procedure SetBoundsRect(const Rect: TRect); + procedure SetClientHeight(Value: Integer); + procedure SetClientSize(Value: TPoint); + procedure SetClientWidth(Value: Integer); + procedure SetColor(Value: TColor); + procedure SetCursor(Value: TCursor); + procedure SetDesktopFont(Value: Boolean); + procedure SetFont(Value: TFont); + procedure SetHeight(Value: Integer); + procedure SetHostDockSite(Value: TWinControl); + procedure SetLeft(Value: Integer); + procedure SetMouseCapture(Value: Boolean); + procedure SetParentColor(Value: Boolean); + procedure SetParentFont(Value: Boolean); + procedure SetShowHint(Value: Boolean); + procedure SetParentShowHint(Value: Boolean); + procedure SetPopupMenu(Value: TPopupMenu); + procedure SetText(const Value: TCaption); + procedure SetTop(Value: Integer); + procedure SetVisible(Value: Boolean); + procedure SetWidth(Value: Integer); + procedure SetZOrderPosition(Position: Integer); + procedure UpdateLastResize(NewWidth, NewHeight: Integer); virtual; + procedure WriteIsControl(Writer: TWriter); + procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; + procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; + procedure WMRButtonDown(var Message: TWMRButtonDown); message WM_RBUTTONDOWN; + procedure WMMButtonDown(var Message: TWMMButtonDown); message WM_MBUTTONDOWN; + procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK; + procedure WMRButtonDblClk(var Message: TWMRButtonDblClk); message WM_RBUTTONDBLCLK; + procedure WMMButtonDblClk(var Message: TWMMButtonDblClk); message WM_MBUTTONDBLCLK; + procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; + procedure WMLButtonUp(var Message: TWMLButtonUp); message WM_LBUTTONUP; + procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; + procedure WMMButtonUp(var Message: TWMMButtonUp); message WM_MBUTTONUP; + procedure WMCancelMode(var Message: TWMCancelMode); message WM_CANCELMODE; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED; + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; + procedure CMParentFontChanged(var Message: TMessage); message CM_PARENTFONTCHANGED; + procedure CMSysFontChanged(var Message: TMessage); message CM_SYSFONTCHANGED; + procedure CMParentColorChanged(var Message: TMessage); message CM_PARENTCOLORCHANGED; + procedure CMParentShowHintChanged(var Message: TMessage); message CM_PARENTSHOWHINTCHANGED; + procedure CMHintShow(var Message: TMessage); message CM_HINTSHOW; + procedure CMHitTest(var Message: TCMHitTest); message CM_HITTEST; + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; + procedure CMFloat(var Message: TCMFloat); message CM_FLOAT; + procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; + procedure CMParentBiDiModeChanged(var Message: TMessage); message CM_PARENTBIDIMODECHANGED; + protected + procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); dynamic; + procedure AdjustSize; dynamic; + procedure AssignTo(Dest: TPersistent); override; + procedure BeginAutoDrag; dynamic; + function CanResize(var NewWidth, NewHeight: Integer): Boolean; virtual; + function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; virtual; + procedure Changed; + procedure ChangeScale(M, D: Integer); dynamic; + procedure Click; dynamic; + procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); virtual; + procedure DblClick; dynamic; + procedure DefaultDockImage(DragDockObject: TDragDockObject; Erase: Boolean); dynamic; + procedure DefineProperties(Filer: TFiler); override; + procedure DockTrackNoTarget(Source: TDragDockObject; X, Y: Integer); dynamic; + procedure DoEndDock(Target: TObject; X, Y: Integer); dynamic; + procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); dynamic; + procedure DoStartDock(var DragObject: TDragObject); dynamic; + procedure DragCanceled; dynamic; + procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; + var Accept: Boolean); dynamic; + procedure DoEndDrag(Target: TObject; X, Y: Integer); dynamic; + procedure DoStartDrag(var DragObject: TDragObject); dynamic; + procedure DrawDragDockImage(DragDockObject: TDragDockObject); dynamic; + procedure EraseDragDockImage(DragDockObject: TDragDockObject); dynamic; + function GetActionLinkClass: TControlActionLinkClass; dynamic; + function GetClientOrigin: TPoint; virtual; + function GetClientRect: TRect; virtual; + function GetDeviceContext(var WindowHandle: HWnd): HDC; virtual; + function GetDockEdge(MousePos: TPoint): TAlign; dynamic; + function GetDragImages: TDragImageList; virtual; + function GetEnabled: Boolean; virtual; + function GetFloating: Boolean; virtual; + function GetFloatingDockSiteClass: TWinControlClass; virtual; + function GetPalette: HPALETTE; dynamic; + function GetPopupMenu: TPopupMenu; dynamic; + procedure Loaded; override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); dynamic; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); dynamic; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); dynamic; + procedure Notification(AComponent: TComponent; + Operation: TOperation); override; + procedure PositionDockRect(DragDockObject: TDragDockObject); dynamic; + function PaletteChanged(Foreground: Boolean): Boolean; dynamic; + procedure ReadState(Reader: TReader); override; + procedure RequestAlign; dynamic; + procedure Resize; dynamic; + procedure SendCancelMode(Sender: TControl); + procedure SendDockNotification(Msg: Cardinal; WParam, LParam: Integer); + procedure SetDragMode(Value: TDragMode); virtual; + procedure SetEnabled(Value: Boolean); virtual; + procedure SetName(const Value: TComponentName); override; + procedure SetParent(AParent: TWinControl); virtual; + procedure SetParentComponent(Value: TComponent); override; + procedure SetParentBiDiMode(Value: Boolean); virtual; + procedure SetBiDiMode(Value: TBiDiMode); virtual; + procedure SetZOrder(TopMost: Boolean); dynamic; + procedure UpdateBoundsRect(const R: TRect); + procedure VisibleChanging; dynamic; + procedure WndProc(var Message: TMessage); virtual; + property ActionLink: TControlActionLink read FActionLink write FActionLink; + property AutoSize: Boolean read FAutoSize write SetAutoSize default False; + property Caption: TCaption read GetText write SetText stored IsCaptionStored; + property Color: TColor read FColor write SetColor stored IsColorStored default clWindow; + property DesktopFont: Boolean read FDesktopFont write SetDesktopFont default False; + property DragKind: TDragKind read FDragKind write FDragKind default dkDrag; + property DragCursor: TCursor read FDragCursor write FDragCursor default crDrag; + property DragMode: TDragMode read FDragMode write SetDragMode default dmManual; + property Font: TFont read FFont write SetFont stored IsFontStored; + property IsControl: Boolean read FIsControl write FIsControl; + property MouseCapture: Boolean read GetMouseCapture write SetMouseCapture; + property ParentBiDiMode: Boolean read FParentBiDiMode write SetParentBiDiMode default True; + property ParentColor: Boolean read FParentColor write SetParentColor default True; + property ParentFont: Boolean read FParentFont write SetParentFont default True; + property ParentShowHint: Boolean read FParentShowHint write SetParentShowHint default True; + property PopupMenu: TPopupMenu read FPopupMenu write SetPopupMenu; + property ScalingFlags: TScalingFlags read FScalingFlags write FScalingFlags; + property Text: TCaption read GetText write SetText; + property WindowText: PChar read FText write FText; + property OnCanResize: TCanResizeEvent read FOnCanResize write FOnCanResize; + property OnConstrainedResize: TConstrainedResizeEvent read FOnConstrainedResize write FOnConstrainedResize; + property OnClick: TNotifyEvent read FOnClick write FOnClick stored IsOnClickStored; + property OnDblClick: TNotifyEvent read FOnDblClick write FOnDblClick; + property OnDragDrop: TDragDropEvent read FOnDragDrop write FOnDragDrop; + property OnDragOver: TDragOverEvent read FOnDragOver write FOnDragOver; + property OnEndDock: TEndDragEvent read FOnEndDock write FOnEndDock; + property OnEndDrag: TEndDragEvent read FOnEndDrag write FOnEndDrag; + property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown; + property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove; + property OnMouseUp: TMouseEvent read FOnMouseUp write FOnMouseUp; + property OnResize: TNotifyEvent read FOnResize write FOnResize; + property OnStartDock: TStartDockEvent read FOnStartDock write FOnStartDock; + property OnStartDrag: TStartDragEvent read FOnStartDrag write FOnStartDrag; +*/ +public: + TControl(TComponent *AOwner); + ~TControl(); + +// procedure Repaint; virtual; + void Repaint(); +/* + procedure BeginDrag(Immediate: Boolean; Threshold: Integer = -1); + procedure BringToFront; + function ClientToScreen(const Point: TPoint): TPoint; + procedure Dock(NewDockSite: TWinControl; ARect: TRect); dynamic; + procedure DefaultHandler(var Message); override; + function Dragging: Boolean; + procedure DragDrop(Source: TObject; X, Y: Integer); dynamic; + function DrawTextBiDiModeFlags(Flags: Longint): Longint; + function DrawTextBiDiModeFlagsReadingOnly: Longint; + property Enabled: Boolean read GetEnabled write SetEnabled stored IsEnabledStored default True; + procedure EndDrag(Drop: Boolean); + function GetControlsAlignment: TAlignment; dynamic; + function GetParentComponent: TComponent; override; + function GetTextBuf(Buffer: PChar; BufSize: Integer): Integer; + function GetTextLen: Integer; + function HasParent: Boolean; override; + procedure Hide; + procedure InitiateAction; virtual; + procedure Invalidate; virtual; + function IsRightToLeft: Boolean; + function ManualDock(NewDockSite: TWinControl; DropControl: TControl = nil; + ControlSide: TAlign = alNone): Boolean; + function ManualFloat(ScreenPos: TRect): Boolean; + function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint; + procedure Refresh; + function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl; + DropControl: TControl; ControlSide: TAlign): Boolean; + function ScreenToClient(const Point: TPoint): TPoint; + procedure SendToBack; + procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual; + procedure SetTextBuf(Buffer: PChar); + procedure Show; + procedure Update; virtual; + function UseRightToLeftAlignment: Boolean; dynamic; + function UseRightToLeftReading: Boolean; + function UseRightToLeftScrollBar: Boolean; + property Action: TBasicAction read GetAction write SetAction; + property Align: TAlign read FAlign write SetAlign default alNone; + property Anchors: TAnchors read FAnchors write FAnchors stored IsAnchorsStored default [akLeft, akTop]; + property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored; + property BoundsRect: TRect read GetBoundsRect write SetBoundsRect; + property ClientHeight: Integer read GetClientHeight write SetClientHeight stored False; + property ClientOrigin: TPoint read GetClientOrigin; + property ClientRect: TRect read GetClientRect; + property ClientWidth: Integer read GetClientWidth write SetClientWidth stored False; + property Constraints: TSizeConstraints read FConstraints write FConstraints; + property ControlState: TControlState read FControlState write FControlState; + property ControlStyle: TControlStyle read FControlStyle write FControlStyle; + property DockOrientation: TDockOrientation read FDockOrientation write FDockOrientation; + property Floating: Boolean read GetFloating; + property FloatingDockSiteClass: TWinControlClass read GetFloatingDockSiteClass write FFloatingDockSiteClass; + property HostDockSite: TWinControl read FHostDockSite write SetHostDockSite; + property LRDockWidth: Integer read GetLRDockWidth write FLRDockWidth; + property Parent: TWinControl read FParent write SetParent; + property ShowHint: Boolean read FShowHint write SetShowHint stored IsShowHintStored; + property TBDockHeight: Integer read GetTBDockHeight write FTBDockHeight; + property UndockHeight: Integer read GetUndockHeight write FUndockHeight; + property UndockWidth: Integer read GetUndockWidth write FUndockWidth; + property Visible: Boolean read FVisible write SetVisible stored IsVisibleStored default True; + property WindowProc: TWndMethod read FWindowProc write FWindowProc; + published + property Left: Integer read FLeft write SetLeft; + property Top: Integer read FTop write SetTop; + property Width: Integer read FWidth write SetWidth; + property Height: Integer read FHeight write SetHeight; + property Cursor: TCursor read FCursor write SetCursor default crDefault; + property Hint: string read FHint write FHint stored IsHintStored; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TCustomImageList.cpp b/apps/X11/VCL/TCustomImageList.cpp new file mode 100644 index 0000000..6a63a24 --- /dev/null +++ b/apps/X11/VCL/TCustomImageList.cpp @@ -0,0 +1,1142 @@ + +#include <TCustomImageList.h> + +TCustomImageList::TCustomImageList(TComponent *AOwner) : + TComponent(AOwner) { +} + +TCustomImageList::TCustomImageList(int AWidth, int AHeight) : + TComponent(0) { +} + +TCustomImageList::~TCustomImageList() { +} + +/* +function TCustomImageList.Add(Image, Mask: TBitmap): Integer; +var + ImageDDB, MaskDDB: TBitmap; +begin + ImageDDB := TBitmap.Create; + try + MaskDDB := TBitmap.Create; + try + HandleNeeded; + Result := ImageList_Add(FHandle, GetImageHandle(Image, ImageDDB), + GetImageHandle(Mask, MaskDDB)); + finally + MaskDDB.Free; + end; + finally + ImageDDB.Free; + end; + Change; +end; +*/ + +int TCustomImageList::Add(gchar **xpm_data, GtkWidget *canvas) { + + /* GtkWidget is the storage type for widgets */ + GtkWidget *pixmapwid; + GdkPixmap *pixmap; + GdkBitmap *mask; + GdkWindow *window = 0; + GtkStyle *style; + + while ((!window) && (canvas->parent)) { + window = gtk_widget_get_parent_window(GTK_WIDGET(canvas)); + canvas = canvas->parent; + } + style = gtk_widget_get_style( GTK_WIDGET(canvas) ); + pixmap = gdk_pixmap_create_from_xpm_d( window, &mask, + &style->bg[GTK_STATE_NORMAL], + (gchar **)xpm_data); + + pixmapwid = gtk_pixmap_new( pixmap, mask ); + images.push_back(GTK_PIXMAP(pixmapwid)); + return images.size(); +} + + +/* +procedure TCustomImageList.GetBitmap(Index: Integer; Image: TBitmap); +begin + if (Image <> nil) and HandleAllocated then + with Image do + begin + Height := FHeight; + Width := FWidth; + Draw(Canvas, 0, 0, Index); + end; +end; +*/ +GtkPixmap *TCustomImageList::GetPixmap(int index) { + if ((unsigned int)index < images.size()) + return images[index]; + else return 0; +} + + +/* +{ TCustomImageList } + +function GetRGBColor(Value: TColor): DWORD; +begin + Result := ColorToRGB(Value); + case Result of + clNone: Result := CLR_NONE; + clDefault: Result := CLR_DEFAULT; + end; +end; + +function GetColor(Value: DWORD): TColor; +begin + case Value of + CLR_NONE: Result := clNone; + CLR_DEFAULT: Result := clDefault; + else + Result := TColor(Value); + end; +end; + +constructor TCustomImageList.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWidth := 16; + FHeight := 16; + Initialize; +end; + +constructor TCustomImageList.CreateSize(AWidth, AHeight: Integer); +begin + inherited Create(nil); + FWidth := AWidth; + FHeight := AHeight; + Initialize; +end; + +destructor TCustomImageList.Destroy; +begin + while FClients.Count > 0 do + UnRegisterChanges(TChangeLink(FClients.Last)); + FBitmap.Free; + FreeHandle; + FClients.Free; + FClients := nil; + if FMonoBitmap <> nil then FMonoBitmap.Free; + inherited Destroy; +end; + +procedure TCustomImageList.Initialize; +const + MaxSize = 32768; +begin + FClients := TList.Create; + if (Height < 1) or (Height > MaxSize) or (Width < 1) then + raise EInvalidOperation.Create(SInvalidImageSize); + AllocBy := 4; + Masked := True; + DrawingStyle := dsNormal; + ImageType := itImage; + FBkColor := clNone; + FBlendColor := clNone; + FBitmap := TBitmap.Create; + InitBitmap; +end; + +function TCustomImageList.HandleAllocated: Boolean; +begin + Result := FHandle <> 0; +end; + +procedure TCustomImageList.HandleNeeded; +begin + if FHandle = 0 then CreateImageList; +end; + +procedure TCustomImageList.InitBitmap; +var + ScreenDC: HDC; +begin + ScreenDC := GetDC(0); + try + with FBitmap do + begin + Handle := CreateCompatibleBitmap(ScreenDC, Self.Width, Self.Height); + Canvas.Brush.Color := clBlack; + Canvas.FillRect(Rect(0, 0, Width, Height)); + end; + finally + ReleaseDC(0, ScreenDC); + end; + if FMonoBitmap <> nil then + begin + FMonoBitmap.Free; + FMonoBitmap := nil; + end; +end; + +procedure TCustomImageList.SetNewDimensions(Value: HImageList); +var + AHeight, AWidth: Integer; +begin + AWidth := Width; + AHeight := Height; + ImageList_GetIconSize(Value, AWidth, AHeight); + FWidth := AWidth; + FHeight := AHeight; + InitBitmap; +end; + +procedure TCustomImageList.SetWidth(Value: Integer); +begin + if Value <> Width then + begin + FWidth := Value; + if HandleAllocated then ImageList_SetIconSize(FHandle, Width, Height); + Clear; + InitBitmap; + Change; + end; +end; + +procedure TCustomImageList.SetHeight(Value: Integer); +begin + if Value <> Height then + begin + FHeight := Value; + if HandleAllocated then ImageList_SetIconSize(FHandle, Width, Height); + Clear; + InitBitmap; + Change; + end; +end; + +procedure TCustomImageList.SetHandle(Value: HImageList); +begin + FreeHandle; + if Value <> 0 then + begin + SetNewDimensions(Value); + FHandle := Value; + Change; + end; +end; + +function TCustomImageList.GetBitmapHandle(Bitmap: HBITMAP): HBITMAP; +begin + if Bitmap <> 0 then + Result := Bitmap else + Result := FBitmap.Handle; +end; + +function TCustomImageList.GetHandle: HImageList; +begin + HandleNeeded; + Result := FHandle; +end; + +function TCustomImageList.GetImageHandle(Image, ImageDDB: TBitmap): HBITMAP; +begin + CheckImage(Image); + if Image <> nil then + if Image.HandleType = bmDDB then + Result := Image.Handle + else + begin + ImageDDB.Assign(Image); + ImageDDB.HandleType := bmDDB; + Result := ImageDDB.Handle; + end + else Result := FBitmap.Handle; +end; + +procedure TCustomImageList.FreeHandle; +begin + if HandleAllocated and not ShareImages then + ImageList_Destroy(Handle); + FHandle := 0; + Change; +end; + +procedure TCustomImageList.CreateImageList; +const + Mask: array[Boolean] of Longint = (0, ILC_MASK); +begin + FHandle := ImageList_Create(Width, Height, ILC_COLOR or Mask[Masked], + AllocBy, AllocBy); + if FHandle = 0 then raise EInvalidOperation.Create(SInvalidImageList); + if FBkColor <> clNone then BkColor := FBkColor; +end; + +function TCustomImageList.GetImageBitmap: HBITMAP; +var + Info: TImageInfo; +begin + if (Count > 0) and ImageList_GetImageInfo(Handle, 0, Info) then + begin + Result := Info.hbmImage; + DeleteObject(Info.hbmMask); + end + else Result := 0; +end; + +function TCustomImageList.GetMaskBitmap: HBITMAP; +var + Info: TImageInfo; +begin + if (Count > 0) and ImageList_GetImageInfo(Handle, 0, Info) then + begin + Result := Info.hbmMask; + DeleteObject(Info.hbmImage); + end + else Result := 0; +end; + +function TCustomImageList.AddMasked(Image: TBitmap; MaskColor: TColor): Integer; +var + ImageDDB: TBitmap; +begin + ImageDDB := TBitmap.Create; + try + if Masked and (MaskColor <> -1) then + begin + with TBitmap.Create do + try + Assign(Image); + TransparentColor := MaskColor; + Self.HandleNeeded; + Result := ImageList_Add(Self.FHandle, GetImageHandle(Image, ImageDDB), + GetBitmapHandle(MaskHandle)); + finally + Free; + end; + end + else Result := ImageList_Add(Handle, GetImageHandle(Image, ImageDDB), 0); + finally + ImageDDB.Free; + end; + Change; +end; + +function TCustomImageList.AddIcon(Image: TIcon): Integer; +begin + if Image = nil then + Result := Add(nil, nil) + else + begin + CheckImage(Image); + Result := ImageList_AddIcon(Handle, Image.Handle); + end; + Change; +end; + +procedure TCustomImageList.GetIcon(Index: Integer; Image: TIcon); +const + DrawingStyles: array[TDrawingStyle] of Longint = (ILD_FOCUS, + ILD_SELECTED, ILD_NORMAL, ILD_TRANSPARENT); + Images: array[TImageType] of Longint = (0, ILD_MASK); +begin + if (Image <> nil) and HandleAllocated then + Image.Handle := ImageList_GetIcon(Handle, Index, + DrawingStyles[DrawingStyle] or Images[ImageType]); +end; + +function TCustomImageList.GetCount: Integer; +begin + if HandleAllocated then Result := ImageList_GetImageCount(Handle) + else Result := 0; +end; + +procedure TCustomImageList.Replace(Index: Integer; Image, Mask: TBitmap); +var + ImageDDB, MaskDDB: TBitmap; +begin + ImageDDB := TBitmap.Create; + try + MaskDDB := TBitmap.Create; + try + if HandleAllocated and not ImageList_Replace(Handle, Index, + GetImageHandle(Image, ImageDDB), GetImageHandle(Mask, MaskDDB)) then + raise EInvalidOperation.Create(SReplaceImage); + finally + MaskDDB.Free; + end; + finally + ImageDDB.Free; + end; + Change; +end; + +procedure TCustomImageList.ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor); +var + TempIndex: Integer; + Image, Mask: TBitmap; +begin + if HandleAllocated then + begin + CheckImage(NewImage); + TempIndex := AddMasked(NewImage, MaskColor); + if TempIndex <> -1 then + try + Image := TBitmap.Create; + try + with Image do + begin + Height := FHeight; + Width := FWidth; + end; + Mask := TBitmap.Create; + try + with Mask do + begin + Monochrome := True; + Height := FHeight; + Width := FWidth; + end; + ImageList_Draw(Handle, TempIndex, Image.Canvas.Handle, 0, 0, ILD_NORMAL); + ImageList_Draw(Handle, TempIndex, Mask.Canvas.Handle, 0, 0, ILD_MASK); + if not ImageList_Replace(Handle, Index, Image.Handle, Mask.Handle) then + raise EInvalidOperation.Create(SReplaceImage); + finally + Mask.Free; + end; + finally + Image.Free; + end; + finally + Delete(TempIndex); + end + else raise EInvalidOperation.Create(SReplaceImage); + end; + Change; +end; + +procedure TCustomImageList.ReplaceIcon(Index: Integer; Image: TIcon); +begin + if HandleAllocated then + if Image = nil then Replace(Index, nil, nil) + else begin + CheckImage(Image); + if ImageList_ReplaceIcon(Handle, Index, Image.Handle) = -1 then + raise EInvalidOperation.Create(SReplaceImage); + end; + Change; +end; + +procedure TCustomImageList.Delete(Index: Integer); +begin + if Index >= Count then raise EInvalidOperation.Create(SImageIndexError); + if HandleAllocated then ImageList_Remove(Handle, Index); + Change; +end; + +procedure TCustomImageList.Clear; +begin + Delete(-1); +end; + +procedure TCustomImageList.SetBkColor(Value: TColor); +begin + if HandleAllocated then ImageList_SetBkColor(FHandle, GetRGBColor(Value)) + else FBkColor := Value; + Change; +end; + +function TCustomImageList.GetBkColor: TColor; +begin + if HandleAllocated then Result := GetColor(ImageList_GetBkColor(Handle)) + else Result := FBkColor; +end; + +procedure TCustomImageList.DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; + Style: Cardinal; Enabled: Boolean); +const + ROP_DSPDxax = $00E20746; +var + R: TRect; + DestDC, SrcDC: HDC; +begin + if HandleAllocated then + begin + if Enabled then + ImageList_DrawEx(Handle, Index, Canvas.Handle, X, Y, 0, 0, + GetRGBColor(BkColor), GetRGBColor(BlendColor), Style) + else + begin + if FMonoBitmap = nil then + begin + FMonoBitmap := TBitmap.Create; + with FMonoBitmap do + begin + Monochrome := True; + Width := Self.Width; + Height := Self.Height; + end; + end; + { Store masked version of image temporarily in FBitmap } + FMonoBitmap.Canvas.Brush.Color := clWhite; + FMonoBitmap.Canvas.FillRect(Rect(0, 0, Self.Width, Self.Height)); + ImageList_DrawEx(Handle, Index, FMonoBitmap.Canvas.Handle, 0,0,0,0, + CLR_DEFAULT, 0, ILD_NORMAL); + R := Rect(X, Y, X+Width, Y+Height); + SrcDC := FMonoBitmap.Canvas.Handle; + { Convert Black to clBtnHighlight } + Canvas.Brush.Color := clBtnHighlight; + DestDC := Canvas.Handle; + Windows.SetTextColor(DestDC, clWhite); + Windows.SetBkColor(DestDC, clBlack); + BitBlt(DestDC, X+1, Y+1, Width, Height, SrcDC, 0, 0, ROP_DSPDxax); + { Convert Black to clBtnShadow } + Canvas.Brush.Color := clBtnShadow; + DestDC := Canvas.Handle; + Windows.SetTextColor(DestDC, clWhite); + Windows.SetBkColor(DestDC, clBlack); + BitBlt(DestDC, X, Y, Width, Height, SrcDC, 0, 0, ROP_DSPDxax); + end; + end; +end; + +procedure TCustomImageList.Draw(Canvas: TCanvas; X, Y, Index: Integer; + Enabled: Boolean); +const + DrawingStyles: array[TDrawingStyle] of Longint = (ILD_FOCUS, ILD_SELECTED, + ILD_NORMAL, ILD_TRANSPARENT); + Images: array[TImageType] of Longint = (0, ILD_MASK); +begin + if HandleAllocated then + DoDraw(Index, Canvas, X, Y, DrawingStyles[DrawingStyle] or + Images[ImageType], Enabled); +end; + +procedure TCustomImageList.DrawOverlay(Canvas: TCanvas; X, Y: Integer; + ImageIndex: Integer; Overlay: TOverlay; Enabled: Boolean); +const + Images: array[TImageType] of Longint = (0, ILD_MASK); +var + Index: Integer; +begin + if HandleAllocated then + begin + Index := IndexToOverlayMask(Overlay + 1); + DoDraw(ImageIndex, Canvas, X, Y, Images[ImageType] or ILD_OVERLAYMASK and + Index, Enabled); + end; +end; + +function TCustomImageList.Overlay(ImageIndex: Integer; Overlay: TOverlay): Boolean; +begin + if HandleAllocated then + Result := ImageList_SetOverlayImage(Handle, ImageIndex, Overlay + 1) + else Result := False; +end; + +procedure TCustomImageList.CopyImages(Value: HImageList); +var + I: Integer; + Image, Mask: TBitmap; + ARect: TRect; +begin + ARect := Rect(0, 0, Width, Height); + BeginUpdate; + try + Image := TBitmap.Create; + try + with Image do + begin + Height := FHeight; + Width := FWidth; + end; + Mask := TBitmap.Create; + try + with Mask do + begin + Monochrome := True; + Height := FHeight; + Width := FWidth; + end; + for I := 0 to ImageList_GetImageCount(Value) - 1 do + begin + with Image.Canvas do + begin + FillRect(ARect); + ImageList_Draw(Value, I, Handle, 0, 0, ILD_NORMAL); + end; + with Mask.Canvas do + begin + FillRect(ARect); + ImageList_Draw(Value, I, Handle, 0, 0, ILD_MASK); + end; + Add(Image, Mask); + end; + finally + Mask.Free; + end; + finally + Image.Free; + end; + finally + EndUpdate; + end; +end; + +procedure TCustomImageList.GetImages(Index: Integer; Image, Mask: TBitmap); +var + R: TRect; +begin + R := Rect(0, 0, Width, Height); + with Image.Canvas do + begin + Brush.Color := clWhite; + FillRect(R); + ImageList_Draw(Self.Handle, Index, Handle, 0, 0, ILD_NORMAL); + end; + with Mask.Canvas do + begin + Brush.Color := clWhite; + FillRect(R); + ImageList_Draw(Self.Handle, Index, Handle, 0, 0, ILD_MASK); + end; +end; + +procedure TCustomImageList.InsertImage(Index: Integer; Image, Mask: TBitmap; + MaskColor: TColor); +var + I: Integer; + OldImage, OldMask: TBitmap; + TempList: TCustomImageList; +begin + BeginUpdate; + try + OldImage := TBitmap.Create; + try + with OldImage do + begin + Height := FHeight; + Width := FWidth; + end; + OldMask := TBitmap.Create; + try + with OldMask do + begin + Monochrome := True; + Height := FHeight; + Width := FWidth; + end; + TempList := TCustomImageList.CreateSize(5, 5); + try + TempList.Assign(Self); + Clear; + if Index > TempList.Count then + raise EInvalidOperation.Create(SImageIndexError); + for I := 0 to Index - 1 do + begin + TempList.GetImages(I, OldImage, OldMask); + Add(OldImage, OldMask); + end; + if MaskColor <> -1 then + AddMasked(Image, MaskColor) else + Add(Image, Mask); + for I := Index to TempList.Count - 1 do + begin + TempList.GetImages(I, OldImage, OldMask); + Add(OldImage, OldMask); + end; + finally + TempList.Free; + end; + finally + OldMask.Free; + end; + finally + OldImage.Free; + end; + finally + EndUpdate; + end; +end; + +procedure TCustomImageList.Insert(Index: Integer; Image, Mask: TBitmap); +begin + InsertImage(Index, Image, Mask, -1); +end; + +procedure TCustomImageList.InsertMasked(Index: Integer; Image: TBitmap; + MaskColor: TColor); +begin + InsertImage(Index, Image, nil, MaskColor); +end; + +procedure TCustomImageList.InsertIcon(Index: Integer; Image: TIcon); +var + I: Integer; + TempList: TCustomImageList; + Icon: TIcon; +begin + Icon := TIcon.Create; + TempList := TCustomImageList.CreateSize(5, 5); + TempList.Assign(Self); + Clear; + if Index > TempList.Count then raise EInvalidOperation.Create(SImageIndexError); + BeginUpdate; + try + for I := 0 to Index - 1 do + begin + TempList.GetIcon(I, Icon); + AddIcon(Icon); + end; + AddIcon(Image); + for I := Index to TempList.Count - 1 do + begin + TempList.GetIcon(I, Icon); + AddIcon(Icon); + end; + finally + TempList.Free; + EndUpdate; + end; +end; + +procedure TCustomImageList.Move(CurIndex, NewIndex: Integer); +var + Image, Mask: TBitmap; +begin + if CurIndex <> NewIndex then + begin + Image := TBitmap.Create; + try + with Image do + begin + Height := FHeight; + Width := FWidth; + end; + Mask := TBitmap.Create; + try + with Mask do + begin + Height := FHeight; + Width := FWidth; + end; + GetImages(CurIndex, Image, Mask); + Delete(CurIndex); + Insert(NewIndex, Image, Mask); + finally + Mask.Free; + end; + finally + Image.Free; + end; + end; +end; + +procedure TCustomImageList.AddImages(Value: TCustomImageList); +begin + if Value <> nil then CopyImages(Value.Handle); +end; + +procedure TCustomImageList.Assign(Source: TPersistent); +var + ImageList: TCustomImageList; +begin + if Source = nil then FreeHandle + else if Source is TCustomImageList then + begin + Clear; + ImageList := TCustomImageList(Source); + Masked := ImageList.Masked; + ImageType := ImageList.ImageType; + DrawingStyle := ImageList.DrawingStyle; + ShareImages := ImageList.ShareImages; + SetNewDimensions(ImageList.Handle); + if not HandleAllocated then HandleNeeded + else ImageList_SetIconSize(Handle, Width, Height); + BkColor := GetColor(ImageList_GetBkColor(ImageList.Handle)); + BlendColor := ImageList.BlendColor; + AddImages(ImageList); + end + else inherited Assign(Source); +end; + +procedure TCustomImageList.AssignTo(Dest: TPersistent); +var + ImageList: TCustomImageList; +begin + if Dest is TCustomImageList then + begin + ImageList := TCustomImageList(Dest); + ImageList.Masked := Masked; + ImageList.ImageType := ImageType; + ImageList.DrawingStyle := DrawingStyle; + ImageList.ShareImages := ShareImages; + ImageList.BlendColor := BlendColor; + with ImageList do + begin + Clear; + SetNewDimensions(Self.Handle); + if not HandleAllocated then HandleNeeded + else ImageList_SetIconSize(Handle, Width, Height); + BkColor := GetColor(ImageList_GetBkColor(Self.Handle)); + AddImages(Self); + end; + end + else inherited AssignTo(Dest); +end; + +procedure TCustomImageList.CheckImage(Image: TGraphic); +begin + if Image = nil then Exit; + with Image do + if (Height < FHeight) or (Width < FWidth) then + raise EInvalidOperation.Create(SInvalidImageSize); +end; + +procedure TCustomImageList.SetDrawingStyle(Value: TDrawingStyle); +begin + if Value <> DrawingStyle then + begin + FDrawingStyle := Value; + Change; + end; +end; + +function TCustomImageList.GetHotSpot: TPoint; +begin + Result := Point(0, 0); +end; + +function TCustomImageList.GetInstRes(Instance: THandle; ResType: TResType; + Name: string; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): + Boolean; +const + ResMap: array [TResType] of Integer = (IMAGE_BITMAP, IMAGE_CURSOR, IMAGE_ICON); +var + hImage: HImageList; + Flags: Integer; +begin + Flags := 0; + if lrDefaultColor in LoadFlags then Flags := Flags or LR_DEFAULTCOLOR; + if lrDefaultSize in LoadFlags then Flags := Flags or LR_DEFAULTSIZE; + if lrFromFile in LoadFlags then Flags := Flags or LR_LOADFROMFILE; + if lrMap3DColors in LoadFlags then Flags := Flags or LR_LOADMAP3DCOLORS; + if lrTransparent in LoadFlags then Flags := Flags or LR_LOADTRANSPARENT; + if lrMonoChrome in LoadFlags then Flags := Flags or LR_MONOCHROME; + hImage := ImageList_LoadImage(Instance, PChar(Name), Width, AllocBy, + MaskColor, ResMap[ResType], Flags); + if hImage <> 0 then + begin + CopyImages(hImage); + ImageList_Destroy(hImage); + Result := True; + end + else Result := False; +end; + +function TCustomImageList.GetResource(ResType: TResType; Name: string; + Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; +begin + Result := GetInstRes(MainInstance, ResType, Name, Width, LoadFlags, MaskColor); +end; + +function TCustomImageList.ResInstLoad(Instance: THandle; ResType: TResType; + Name: string; MaskColor: TColor): Boolean; +begin + Result := GetInstRes(Instance, ResType, Name, Width, [], MaskColor); +end; + +function TCustomImageList.ResourceLoad(ResType: TResType; Name: string; + MaskColor: TColor): Boolean; +var + LibModule: PLibModule; +begin + Result := False; + if HInstance = MainInstance then + Result := GetInstRes(MainInstance, ResType, Name, Width, [], MaskColor) + else + begin + LibModule := LibModuleList; + while LibModule <> nil do + with LibModule^ do + begin + Result := GetInstRes(ResInstance, ResType, Name, Width, [], MaskColor); + if not Result and (Instance <> ResInstance) then + Result := GetInstRes(Instance, ResType, Name, Width, [], MaskColor); + if Result then Exit; + LibModule := LibModule.Next; + end; + end; +end; + +function TCustomImageList.FileLoad(ResType: TResType; Name: string; + MaskColor: TColor): Boolean; +begin + Result := GetResource(ResType, Name, Width, [lrFromFile], MaskColor); +end; + +procedure TCustomImageList.Change; +var + I: Integer; +begin + FChanged := True; + if FUpdateCount > 0 then Exit; + if FClients <> nil then + for I := 0 to FClients.Count - 1 do + TChangeLink(FClients[I]).Change; + if Assigned(FOnChange) then FOnChange(Self); +end; + +procedure TCustomImageList.UnRegisterChanges(Value: TChangeLink); +var + I: Integer; +begin + if FClients <> nil then + for I := 0 to FClients.Count - 1 do + if FClients[I] = Value then + begin + Value.Sender := nil; + FClients.Delete(I); + Break; + end; +end; + +procedure TCustomImageList.RegisterChanges(Value: TChangeLink); +begin + Value.Sender := Self; + if FClients <> nil then FClients.Add(Value); +end; + +function TCustomImageList.Equal(IL: TCustomImageList): Boolean; + + function StreamsEqual(S1, S2: TMemoryStream): Boolean; + begin + Result := (S1.Size = S2.Size) and CompareMem(S1.Memory, S2.Memory, S1.Size); + end; + +var + MyImage, OtherImage: TMemoryStream; +begin + if (IL = nil) or (Count <> IL.Count) then + begin + Result := False; + Exit; + end; + if (Count = 0) and (IL.Count = 0) then + begin + Result := True; + Exit; + end; + MyImage := TMemoryStream.Create; + try + WriteData(MyImage); + OtherImage := TMemoryStream.Create; + try + IL.WriteData(OtherImage); + Result := StreamsEqual(MyImage, OtherImage); + finally + OtherImage.Free; + end; + finally + MyImage.Free; + end; +end; + +procedure TCustomImageList.DefineProperties(Filer: TFiler); + + function DoWrite: Boolean; + begin + if Filer.Ancestor <> nil then + Result := not (Filer.Ancestor is TCustomImageList) or + not Equal(TCustomImageList(Filer.Ancestor)) + else + Result := Count > 0; + end; + +begin + inherited DefineProperties(Filer); + Filer.DefineBinaryProperty('Bitmap', ReadData, WriteData, DoWrite); +end; + +procedure TCustomImageList.ReadD2Stream(Stream: TStream); +var + FullImage, Image, FullMask, Mask: TBitmap; + I, J, Size, Pos, Count: Integer; + SrcRect: TRect; +begin + Stream.ReadBuffer(Size, SizeOf(Size)); + Stream.ReadBuffer(Count, SizeOf(Count)); + FullImage := TBitmap.Create; + try + Pos := Stream.Position; + FullImage.LoadFromStream(Stream); + Stream.Position := Pos + Size; + FullMask := TBitmap.Create; + try + FullMask.LoadFromStream(Stream); + Image := TBitmap.Create; + Image.Width := Width; + Image.Height := Height; + Mask := TBitmap.Create; + Mask.Monochrome := True; + Mask.Width := Width; + Mask.Height := Height; + SrcRect := Rect(0, 0, Width, Height); + BeginUpdate; + try + for J := 0 to (FullImage.Height div Height) - 1 do + begin + if Count = 0 then Break; + for I := 0 to (FullImage.Width div Width) - 1 do + begin + if Count = 0 then Break; + Image.Canvas.CopyRect(SrcRect, FullImage.Canvas, + Bounds(I * Width, J * Height, Width, Height)); + Mask.Canvas.CopyRect(SrcRect, FullMask.Canvas, + Bounds(I * Width, J * Height, Width, Height)); + Add(Image, Mask); + Dec(Count); + end; + end; + finally + Image.Free; + Mask.Free; + EndUpdate; + end; + finally + FullMask.Free; + end; + finally + FullImage.Free; + end; +end; + +procedure TCustomImageList.ReadD3Stream(Stream: TStream); +var + SA: TStreamAdapter; +begin + SA := TStreamAdapter.Create(Stream); + try + Handle := ImageList_Read(SA); + if Handle = 0 then + raise EReadError.Create(SImageReadFail); + finally + SA.Free; + end; +end; + +procedure TCustomImageList.ReadData(Stream: TStream); +var + CheckInt1, CheckInt2: Integer; + CheckByte1, CheckByte2: Byte; + StreamPos: Integer; +begin + FreeHandle; + StreamPos := Stream.Position; // check stream signature to + Stream.Read(CheckInt1, SizeOf(CheckInt1)); // determine a Delphi 2 or Delphi + Stream.Read(CheckInt2, SizeOf(CheckInt2)); // 3 imagelist stream. Delphi 2 + CheckByte1 := Lo(LoWord(CheckInt1)); // streams can be read, but only + CheckByte2 := Hi(LoWord(CheckInt1)); // Delphi 3 streams will be written + Stream.Position := StreamPos; + if (CheckInt1 <> CheckInt2) and (CheckByte1 = $49) and (CheckByte2 = $4C) then + ReadD3Stream(Stream) + else + ReadD2Stream(Stream); +end; + +procedure TCustomImageList.WriteData(Stream: TStream); +var + SA: TStreamAdapter; +begin + SA := TStreamAdapter.Create(Stream); + try + if not ImageList_Write(Handle, SA) then + raise EWriteError.Create(SImageWriteFail); + finally + SA.Free; + end; +end; +(* +var + I: Integer; + DIB1, DIB2: TBitmap; + DC: HDC; + S: TMemoryStream; + + procedure WriteDIB(BM: HBitmap); + { The ImageList leaves its bitmap handle selected into a DC somewhere, + so we can't select it into our own DC to copy from it. The only safe + operation is GetDIB (GetDIBits), which extracts the pixel bits without + selecting the BM into a DC. This code builds our own bitmap from + those bits, then crops it to the minimum size before writing it out.} + var + BitsSize: DWORD; + Header, Bits: PChar; + DIBBits: Pointer; + R: TRect; + HeaderSize: DWORD; + GlyphsPerRow, Rows: Integer; + begin + if BM = 0 then Exit; + GetDIBSizes(BM, HeaderSize, BitsSize); + GetMem(Header, HeaderSize + BitsSize); + try + Bits := Header + HeaderSize; + GetDIB(BM, 0, Header^, Bits^); + DIB1.Handle := CreateDIBSection(DC, PBitmapInfo(Header)^, DIB_RGB_COLORS, DIBBits, 0, 0); + System.Move(Bits^, DIBBits^, BitsSize); + with PBitmapInfo(Header)^.bmiHeader do + begin + GlyphsPerRow := biWidth div Width; + if GlyphsPerRow = 0 then Inc(GlyphsPerRow); + if GlyphsPerRow > Count then GlyphsPerRow := Count; + biWidth := GlyphsPerRow * Width; + Rows := Count div GlyphsPerRow; + if Count > Rows * GlyphsPerRow then Inc(Rows); + biHeight := Rows * Height; + R := Rect(0, 0, biWidth, biHeight); + end; + DIB2.Handle := CreateDIBSection(DC, PBitmapInfo(Header)^, DIB_RGB_COLORS, DIBBits, 0, 0); + DIB2.Canvas.CopyRect(R, DIB1.Canvas, R); + DIB2.SaveToStream(S); + finally + FreeMem(Header); + end; + end; + +begin + DIB1 := nil; + DIB2 := nil; + DC := 0; + S := TMemoryStream.Create; + try + DIB1 := TBitmap.Create; + DIB2 := TBitmap.Create; + DC := GetDC(0); + WriteDIB(GetImageBitmap); + I := S.Size; + WriteDIB(GetMaskBitmap); + Stream.WriteBuffer(I, sizeof(I)); + I := Count; + Stream.WriteBuffer(I, sizeof(I)); + Stream.WriteBuffer(S.Memory^, S.Size); + finally + ReleaseDC(0, DC); + DIB1.Free; + DIB2.Free; + S.Free; + end; +end; +*) +procedure TCustomImageList.BeginUpdate; +begin + Inc(FUpdateCount); +end; + +procedure TCustomImageList.EndUpdate; +begin + if FUpdateCount > 0 then Dec(FUpdateCount); + if FChanged then + begin + FChanged := False; + Change; + end; +end; +*/ diff --git a/apps/X11/VCL/TCustomImageList.h b/apps/X11/VCL/TCustomImageList.h new file mode 100644 index 0000000..b9b7cab --- /dev/null +++ b/apps/X11/VCL/TCustomImageList.h @@ -0,0 +1,136 @@ + +#ifndef TCUSTOMIMAGELIST_H +#define TCUSTOMIMAGELIST_H + +#include <TComponent.h> +#include <vector> +#include <gtk/gtkpixmap.h> + +class TCustomImageList : public TComponent { +/* + + TDrawingStyle = (dsFocus, dsSelected, dsNormal, dsTransparent); + TImageType = (itImage, itMask); + TResType = (rtBitmap, rtCursor, rtIcon); + TOverlay = 0..3; + TLoadResource = (lrDefaultColor, lrDefaultSize, lrFromFile, + lrMap3DColors, lrTransparent, lrMonoChrome); + TLoadResources = set of TLoadResource; + + TCustomImageList = class(TComponent) +*/ +private: + vector <GtkPixmap *> images; +/* + FHeight: Integer; + FWidth: Integer; + FAllocBy: Integer; + FHandle: HImageList; + FDrawingStyle: TDrawingStyle; + FMasked: Boolean; + FShareImages: Boolean; + FImageType: TImageType; + FBkColor: TColor; + FBlendColor: TColor; + FClients: TList; + FBitmap: TBitmap; + FMonoBitmap: TBitmap; + FChanged: Boolean; + FUpdateCount: Integer; + FOnChange: TNotifyEvent; + procedure AssignTo(Dest: TPersistent); override; + procedure BeginUpdate; + procedure EndUpdate; + procedure InitBitmap; + procedure CheckImage(Image: TGraphic); + procedure CopyImages(Value: HImageList); + procedure CreateImageList; + function Equal(IL: TCustomImageList): Boolean; + procedure FreeHandle; + function GetCount: Integer; + function GetBitmapHandle(Bitmap: HBITMAP): HBITMAP; + function GetBkColor: TColor; + function GetHandle: HImageList; + function GetImageHandle(Image, ImageDDB: TBitmap): HBITMAP; + procedure InsertImage(Index: Integer; Image, Mask: TBitmap; MaskColor: TColor); + procedure ReadData(Stream: TStream); + procedure SetBkColor(Value: TColor); + procedure SetDrawingStyle(Value: TDrawingStyle); + procedure SetHandle(Value: HImageList); + procedure SetHeight(Value: Integer); + procedure SetNewDimensions(Value: HImageList); + procedure SetWidth(Value: Integer); + procedure WriteData(Stream: TStream); + procedure ReadD2Stream(Stream: TStream); + procedure ReadD3Stream(Stream: TStream); + protected + procedure Change; dynamic; + procedure DefineProperties(Filer: TFiler); override; + procedure DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; + Style: Cardinal; Enabled: Boolean); virtual; + procedure GetImages(Index: Integer; Image, Mask: TBitmap); + procedure HandleNeeded; + procedure Initialize; virtual; +*/ +public: + TCustomImageList(TComponent *AOwner); + TCustomImageList(int AWidth, int AHeight); + virtual ~TCustomImageList(); +// int Add(TBitmap *Image, TBitmap *Mask); + int Add(gchar **xpm_data, GtkWidget *canvas); +// procedure GetBitmap(Index: Integer; Image: TBitmap); +// void GetBitmap(int Index, TBitmap *); + GtkPixmap *GetPixmap(int Index); +/* + procedure Assign(Source: TPersistent); override; + function AddIcon(Image: TIcon): Integer; + procedure AddImages(Value: TCustomImageList); + function AddMasked(Image: TBitmap; MaskColor: TColor): Integer; + procedure Clear; + procedure Delete(Index: Integer); + procedure Draw(Canvas: TCanvas; X, Y, Index: Integer; Enabled: Boolean=True); + procedure DrawOverlay(Canvas: TCanvas; X, Y: Integer; + ImageIndex: Integer; Overlay: TOverlay; Enabled: Boolean=True); + function FileLoad(ResType: TResType; Name: string; + MaskColor: TColor): Boolean; + function GetHotSpot: TPoint; virtual; + procedure GetIcon(Index: Integer; Image: TIcon); + function GetImageBitmap: HBITMAP; + function GetMaskBitmap: HBITMAP; + function GetResource(ResType: TResType; Name: string; + Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; + function GetInstRes(Instance: THandle; ResType: TResType; Name: string; + Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; + function HandleAllocated: Boolean; + procedure Insert(Index: Integer; Image, Mask: TBitmap); + procedure InsertIcon(Index: Integer; Image: TIcon); + procedure InsertMasked(Index: Integer; Image: TBitmap; MaskColor: TColor); + procedure Move(CurIndex, NewIndex: Integer); + function Overlay(ImageIndex: Integer; Overlay: TOverlay): Boolean; + procedure RegisterChanges(Value: TChangeLink); + function ResourceLoad(ResType: TResType; Name: string; + MaskColor: TColor): Boolean; + function ResInstLoad(Instance: THandle; ResType: TResType; Name: string; + MaskColor: TColor): Boolean; + procedure Replace(Index: Integer; Image, Mask: TBitmap); + procedure ReplaceIcon(Index: Integer; Image: TIcon); + procedure ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor); + procedure UnRegisterChanges(Value: TChangeLink); + property Count: Integer read GetCount; + property Handle: HImageList read GetHandle write SetHandle; + public + property AllocBy: Integer read FAllocBy write FAllocBy default 4; + property BlendColor: TColor read FBlendColor write FBlendColor default clNone; + property BkColor: TColor read GetBkColor write SetBkColor default clNone; + property DrawingStyle: TDrawingStyle read FDrawingStyle write SetDrawingStyle default dsNormal; + property Height: Integer read FHeight write SetHeight default 16; + property ImageType: TImageType read FImageType write FImageType default itImage; + property Masked: Boolean read FMasked write FMasked default True; + property ShareImages: Boolean read FShareImages write FShareImages default False; + property Width: Integer read FWidth write SetWidth default 16; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + end; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TCustomTabControl.cpp b/apps/X11/VCL/TCustomTabControl.cpp new file mode 100644 index 0000000..40f9c3e --- /dev/null +++ b/apps/X11/VCL/TCustomTabControl.cpp @@ -0,0 +1,7 @@ +#include <TCustomTabControl.h> + +TCustomTabControl::TCustomTabControl(TComponent *AOwner) : TWinControl(AOwner) { +} + +TCustomTabControl::~TCustomTabControl() { +} diff --git a/apps/X11/VCL/TCustomTabControl.h b/apps/X11/VCL/TCustomTabControl.h new file mode 100644 index 0000000..0b1e2b7 --- /dev/null +++ b/apps/X11/VCL/TCustomTabControl.h @@ -0,0 +1,103 @@ +#ifndef TCUSTOMTABCONTROL_H +#define TCUSTOMTABCONTROL_H + +#include <TWinControl.h> + +class TCustomTabControl : public TWinControl { + +private: +/* + FCanvas: TCanvas; + FHotTrack: Boolean; + FImageChangeLink: TChangeLink; + FImages: TCustomImageList; + FMultiLine: Boolean; + FMultiSelect: Boolean; + FOwnerDraw: Boolean; + FRaggedRight: Boolean; + FSaveTabIndex: Integer; + FSaveTabs: TStringList; + FScrollOpposite: Boolean; + FStyle: TTabStyle; + FTabPosition: TTabPosition; + FTabs: TStrings; + FTabSize: TSmallPoint; + FUpdating: Boolean; + FOnChange: TNotifyEvent; + FOnChanging: TTabChangingEvent; + FOnDrawTab: TDrawTabEvent; + FOnGetImageIndex: TTabGetImageEvent; + function GetDisplayRect: TRect; + function GetTabIndex: Integer; + procedure ImageListChange(Sender: TObject); + function InternalSetMultiLine(Value: Boolean): Boolean; + procedure SetHotTrack(Value: Boolean); + procedure SetImages(Value: TCustomImageList); + procedure SetMultiLine(Value: Boolean); + procedure SetMultiSelect(Value: Boolean); + procedure SetOwnerDraw(Value: Boolean); + procedure SetRaggedRight(Value: Boolean); + procedure SetScrollOpposite(Value: Boolean); + procedure SetStyle(Value: TTabStyle); + procedure SetTabHeight(Value: Smallint); + procedure SetTabIndex(Value: Integer); + procedure SetTabPosition(Value: TTabPosition); + procedure SetTabs(Value: TStrings); + procedure SetTabWidth(Value: Smallint); + procedure TabsChanged; + procedure UpdateTabSize; + procedure CMFontChanged(var Message); message CM_FONTCHANGED; + procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; + procedure CMTabStopChanged(var Message: TMessage); message CM_TABSTOPCHANGED; + procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; + procedure WMDestroy(var Message: TWMDestroy); message WM_DESTROY; + procedure WMNotifyFormat(var Message: TMessage); message WM_NOTIFYFORMAT; + procedure WMSize(var Message: TMessage); message WM_SIZE; + protected + procedure AdjustClientRect(var Rect: TRect); override; + function CanChange: Boolean; dynamic; + function CanShowTab(TabIndex: Integer): Boolean; virtual; + procedure Change; dynamic; + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + procedure DestroyWnd; override; + procedure DrawTab(TabIndex: Integer; const Rect: TRect; Active: Boolean); virtual; + function GetImageIndex(TabIndex: Integer): Integer; virtual; + procedure Loaded; override; + procedure UpdateTabImages; + property DisplayRect: TRect read GetDisplayRect; + property HotTrack: Boolean read FHotTrack write SetHotTrack default False; + property Images: TCustomImageList read FImages write SetImages; + property MultiLine: Boolean read FMultiLine write SetMultiLine default False; + property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default False; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + property OwnerDraw: Boolean read FOwnerDraw write SetOwnerDraw default False; + property RaggedRight: Boolean read FRaggedRight write SetRaggedRight default False; + property ScrollOpposite: Boolean read FScrollOpposite + write SetScrollOpposite default False; + property Style: TTabStyle read FStyle write SetStyle default tsTabs; + property TabHeight: Smallint read FTabSize.Y write SetTabHeight default 0; + property TabIndex: Integer read GetTabIndex write SetTabIndex default -1; + property TabPosition: TTabPosition read FTabPosition write SetTabPosition + default tpTop; + property Tabs: TStrings read FTabs write SetTabs; + property TabWidth: Smallint read FTabSize.X write SetTabWidth default 0; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + property OnChanging: TTabChangingEvent read FOnChanging write FOnChanging; + property OnDrawTab: TDrawTabEvent read FOnDrawTab write FOnDrawTab; + property OnGetImageIndex: TTabGetImageEvent read FOnGetImageIndex write FOnGetImageIndex; +*/ +public: + TCustomTabControl(TComponent *AOwner); + ~TCustomTabControl(); +/* + property Canvas: TCanvas read FCanvas; + property TabStop default True; + end; +*/ +}; + +#endif + diff --git a/apps/X11/VCL/TCustomTreeView.cpp b/apps/X11/VCL/TCustomTreeView.cpp new file mode 100644 index 0000000..18e4c29 --- /dev/null +++ b/apps/X11/VCL/TCustomTreeView.cpp @@ -0,0 +1,1169 @@ +#include <TCustomTreeView.h> +#include <TTreeNodes.h> + +TCustomTreeView::TCustomTreeView(TComponent *AOwner) : + TWinControl(AOwner), + Items(this, &TCustomTreeView::getItems, &TCustomTreeView::SetTreeNodes), + Images(this, &TCustomTreeView::getImages, &TCustomTreeView::SetImages), + StateImages(this, &TCustomTreeView::getStateImages, &TCustomTreeView::SetStateImages), + Selected(this, &TCustomTreeView::GetSelection, &TCustomTreeView::SetSelection) { + init(AOwner); +} + + +TCustomTreeView::TCustomTreeView(GtkWidget *parent) : + TWinControl(parent), + Items(this, &TCustomTreeView::getItems, &TCustomTreeView::SetTreeNodes), + Images(this, &TCustomTreeView::getImages, &TCustomTreeView::SetImages), + StateImages(this, &TCustomTreeView::getStateImages, &TCustomTreeView::SetStateImages), + Selected(this, &TCustomTreeView::GetSelection, &TCustomTreeView::SetSelection) { + nativeControl = gtk_tree_new(); +/* + gtk_widget_ref (nativeControl); + gtk_object_set_data_full (GTK_OBJECT (InstallMgrApp), "LocalTree", LocalTree, + (GtkDestroyNotify) gtk_widget_unref); +*/ + gtk_widget_show (nativeControl); + gtk_container_add (GTK_CONTAINER (parent), nativeControl); + init(0); +} + +TCustomTreeView::~TCustomTreeView() { +} + +void TCustomTreeView::init(TComponent *AOwner) { +/* + ControlStyle := ControlStyle - [csCaptureMouse] + [csDisplayDragImage, csReflector]; + Width := 121; + Height := 97; + TabStop := True; + ParentColor := False; + FCanvas := TControlCanvas.Create; + TControlCanvas(FCanvas).Control := Self; +*/ +// FTreeNodes := TTreeNodes.Create(Self); + FTreeNodes = new TTreeNodes(this); +/* + FBorderStyle := bsSingle; + FShowButtons := True; + FShowRoot := True; + FShowLines := True; + FHideSelection := True; + FDragImage := TDragImageList.CreateSize(32, 32); + FSaveIndent := -1; + FChangeTimer := TTimer.Create(Self); + FChangeTimer.Enabled := False; + FChangeTimer.Interval := 0; + FChangeTimer.OnTimer := OnChangeTimer; + FToolTips := True; + FEditInstance := MakeObjectInstance(EditWndProc); + FImageChangeLink := TChangeLink.Create; + FImageChangeLink.OnChange := ImageListChange; + FStateChangeLink := TChangeLink.Create; + FStateChangeLink.OnChange := ImageListChange; +*/ +} + + +/* +procedure TCustomTreeView.SetTreeNodes(Value: TTreeNodes); +begin + Items.Assign(Value); +end; +*/ + +void TCustomTreeView::SetTreeNodes(TTreeNodes* Value) { +// Items->Assign(Value); +} + +/* +procedure TCustomTreeView.GetSelectedIndex(Node: TTreeNode); +begin + if Assigned(FOnGetSelectedIndex) then FOnGetSelectedIndex(Self, Node); +end; + +TTreeNode *TCustomTreeView::GetSelected() { +} + +*/ + +/* +function TCustomTreeView.GetSelection: TTreeNode; +begin + if HandleAllocated then + begin + if FRightClickSelect and Assigned(FRClickNode) then + Result := FRClickNode + else + Result := Items.GetNode(TreeView_GetSelection(Handle)); + end + else Result := nil; +end; + +procedure TCustomTreeView.SetSelection(Value: TTreeNode); +begin + if Value <> nil then Value.Selected := True + else TreeView_SelectItem(Handle, nil); +end; +*/ + +TTreeNode *TCustomTreeView::GetSelection() { + GList *selected_nodes = GTK_TREE_SELECTION (nativeControl); + selected_nodes = g_list_first(selected_nodes); + return (selected_nodes) ? Items->GetNode(GTK_TREE_ITEM(selected_nodes->data)) : 0; +} + +void TCustomTreeView::SetSelection(TTreeNode *node) { +} + + +/* +procedure TCustomTreeView.SetImages(Value: TCustomImageList); +begin + if Images <> nil then + Images.UnRegisterChanges(FImageChangeLink); + FImages := Value; + if Images <> nil then + begin + Images.RegisterChanges(FImageChangeLink); + Images.FreeNotification(Self); + SetImageList(Images.Handle, TVSIL_NORMAL) + end + else SetImageList(0, TVSIL_NORMAL); +end; + +procedure TCustomTreeView.SetStateImages(Value: TCustomImageList); +begin + if StateImages <> nil then + StateImages.UnRegisterChanges(FStateChangeLink); + FStateImages := Value; + if StateImages <> nil then + begin + StateImages.RegisterChanges(FStateChangeLink); + StateImages.FreeNotification(Self); + SetImageList(StateImages.Handle, TVSIL_STATE) + end + else SetImageList(0, TVSIL_STATE); +end; +*/ + +void TCustomTreeView::SetImages(TCustomImageList *images) { + FImages = images; +} + +void TCustomTreeView::SetStateImages(TCustomImageList *images) { + FStateImages = images; +} + + +/* +{ TCustomTreeView } +destructor TCustomTreeView.Destroy; +begin + Items.Free; + FChangeTimer.Free; + FSaveItems.Free; + FDragImage.Free; + FMemStream.Free; + FreeObjectInstance(FEditInstance); + FImageChangeLink.Free; + FStateChangeLink.Free; + FCanvas.Free; + inherited Destroy; +end; + +procedure TCustomTreeView.CreateParams(var Params: TCreateParams); +const + BorderStyles: array[TBorderStyle] of DWORD = (0, WS_BORDER); + LineStyles: array[Boolean] of DWORD = (0, TVS_HASLINES); + RootStyles: array[Boolean] of DWORD = (0, TVS_LINESATROOT); + ButtonStyles: array[Boolean] of DWORD = (0, TVS_HASBUTTONS); + EditStyles: array[Boolean] of DWORD = (TVS_EDITLABELS, 0); + HideSelections: array[Boolean] of DWORD = (TVS_SHOWSELALWAYS, 0); + DragStyles: array[TDragMode] of DWORD = (TVS_DISABLEDRAGDROP, 0); + RTLStyles: array[Boolean] of DWORD = (0, TVS_RTLREADING); + ToolTipStyles: array[Boolean] of DWORD = (TVS_NOTOOLTIPS, 0); + AutoExpandStyles: array[Boolean] of DWORD = (0, TVS_SINGLEEXPAND); + HotTrackStyles: array[Boolean] of DWORD = (0, TVS_TRACKSELECT); + RowSelectStyles: array[Boolean] of DWORD = (0, TVS_FULLROWSELECT); +begin + InitCommonControl(ICC_TREEVIEW_CLASSES); + inherited CreateParams(Params); + CreateSubClass(Params, WC_TREEVIEW); + with Params do + begin + Style := Style or LineStyles[FShowLines] or BorderStyles[FBorderStyle] or + RootStyles[FShowRoot] or ButtonStyles[FShowButtons] or + EditStyles[FReadOnly] or HideSelections[FHideSelection] or + DragStyles[DragMode] or RTLStyles[UseRightToLeftReading] or + ToolTipStyles[FToolTips] or AutoExpandStyles[FAutoExpand] or + HotTrackStyles[FHotTrack] or RowSelectStyles[FRowSelect]; + if Ctl3D and NewStyleControls and (FBorderStyle = bsSingle) then + begin + Style := Style and not WS_BORDER; + ExStyle := Params.ExStyle or WS_EX_CLIENTEDGE; + end; + WindowClass.style := WindowClass.style and not (CS_HREDRAW or CS_VREDRAW); + end; +end; + +procedure TCustomTreeView.CreateWnd; +begin + FStateChanging := False; + inherited CreateWnd; + TreeView_SetBkColor(Handle, ColorToRGB(Color)); + TreeView_SetTextColor(Handle, ColorToRGB(Font.Color)); + if FMemStream <> nil then + begin + Items.ReadData(FMemStream); + FMemStream.Destroy; + FMemStream := nil; + SetTopItem(Items.GetNodeFromIndex(FSaveTopIndex)); + FSaveTopIndex := 0; + SetSelection(Items.GetNodeFromIndex(FSaveIndex)); + FSaveIndex := 0; + end; + if FSaveIndent <> -1 then Indent := FSaveIndent; + if (Images <> nil) and Images.HandleAllocated then + SetImageList(Images.Handle, TVSIL_NORMAL); + if (StateImages <> nil) and StateImages.HandleAllocated then + SetImageList(StateImages.Handle, TVSIL_STATE); +end; + +procedure TCustomTreeView.DestroyWnd; +var + Node: TTreeNode; +begin + FStateChanging := True; + if Items.Count > 0 then + begin + FMemStream := TMemoryStream.Create; + Items.WriteData(FMemStream); + FMemStream.Position := 0; + Node := GetTopItem; + if Node <> nil then FSaveTopIndex := Node.AbsoluteIndex; + Node := Selected; + if Node <> nil then FSaveIndex := Node.AbsoluteIndex; + end; + FSaveIndent := Indent; + inherited DestroyWnd; +end; + +procedure TCustomTreeView.EditWndProc(var Message: TMessage); +begin + try + with Message do + begin + case Msg of + WM_KEYDOWN, + WM_SYSKEYDOWN: if DoKeyDown(TWMKey(Message)) then Exit; + WM_CHAR: if DoKeyPress(TWMKey(Message)) then Exit; + WM_KEYUP, + WM_SYSKEYUP: if DoKeyUp(TWMKey(Message)) then Exit; + CN_KEYDOWN, + CN_CHAR, CN_SYSKEYDOWN, + CN_SYSCHAR: + begin + WndProc(Message); + Exit; + end; + end; + Result := CallWindowProc(FDefEditProc, FEditHandle, Msg, WParam, LParam); + end; + except + Application.HandleException(Self); + end; +end; + +procedure TCustomTreeView.CMColorChanged(var Message: TMessage); +begin + inherited; + RecreateWnd; +end; + +procedure TCustomTreeView.CMCtl3DChanged(var Message: TMessage); +begin + inherited; + if FBorderStyle = bsSingle then RecreateWnd; +end; + +procedure TCustomTreeView.CMFontChanged(var Message: TMessage); +begin + inherited; + TreeView_SetTextColor(Handle, ColorToRGB(Font.Color)); +end; + +procedure TCustomTreeView.CMSysColorChange(var Message: TMessage); +begin + inherited; + if not (csLoading in ComponentState) then + begin + Message.Msg := WM_SYSCOLORCHANGE; + DefaultHandler(Message); + end; +end; + +function TCustomTreeView.AlphaSort: Boolean; +var + Node: TTreeNode; +begin + if HandleAllocated then + begin + Result := CustomSort(nil, 0); + Node := FTreeNodes.GetFirstNode; + while Node <> nil do + begin + if Node.HasChildren then Node.AlphaSort; + Node := Node.GetNext; + end; + end + else + Result := False; +end; + +function TCustomTreeView.CustomSort(SortProc: TTVCompare; Data: Longint): Boolean; +var + SortCB: TTVSortCB; + Node: TTreeNode; +begin + Result := False; + if HandleAllocated then + begin + with SortCB do + begin + if not Assigned(SortProc) then lpfnCompare := @DefaultTreeViewSort + else lpfnCompare := SortProc; + hParent := TVI_ROOT; + lParam := Data; + Result := TreeView_SortChildrenCB(Handle, SortCB, 0); + end; + Node := FTreeNodes.GetFirstNode; + while Node <> nil do + begin + if Node.HasChildren then Node.CustomSort(SortProc, Data); + Node := Node.GetNext; + end; + Items.ClearCache; + end; +end; + +procedure TCustomTreeView.SetAutoExpand(Value: Boolean); +begin + if FAutoExpand <> Value then + begin + FAutoExpand := Value; + SetComCtlStyle(Self, TVS_SINGLEEXPAND, Value); + end; +end; + +procedure TCustomTreeView.SetHotTrack(Value: Boolean); +begin + if FHotTrack <> Value then + begin + FHotTrack := Value; + SetComCtlStyle(Self, TVS_TRACKSELECT, Value); + end; +end; + +procedure TCustomTreeView.SetRowSelect(Value: Boolean); +begin + if FRowSelect <> Value then + begin + FRowSelect := Value; + SetComCtlStyle(Self, TVS_FULLROWSELECT, Value); + end; +end; + +procedure TCustomTreeView.SetToolTips(Value: Boolean); +begin + if FToolTips <> Value then + begin + FToolTips := Value; + SetComCtlStyle(Self, TVS_NOTOOLTIPS, not Value); + end; +end; + +procedure TCustomTreeView.SetSortType(Value: TSortType); +begin + if SortType <> Value then + begin + FSortType := Value; + if ((SortType in [stData, stBoth]) and Assigned(OnCompare)) or + (SortType in [stText, stBoth]) then + AlphaSort; + end; +end; + +procedure TCustomTreeView.SetBorderStyle(Value: TBorderStyle); +begin + if BorderStyle <> Value then + begin + FBorderStyle := Value; + RecreateWnd; + end; +end; + +procedure TCustomTreeView.SetDragMode(Value: TDragMode); +begin + if Value <> DragMode then + SetComCtlStyle(Self, TVS_DISABLEDRAGDROP, Value = dmManual); + inherited; +end; + +procedure TCustomTreeView.SetButtonStyle(Value: Boolean); +begin + if ShowButtons <> Value then + begin + FShowButtons := Value; + SetComCtlStyle(Self, TVS_HASBUTTONS, Value); + end; +end; + +procedure TCustomTreeView.SetLineStyle(Value: Boolean); +begin + if ShowLines <> Value then + begin + FShowLines := Value; + SetComCtlStyle(Self, TVS_HASLINES, Value); + end; +end; + +procedure TCustomTreeView.SetRootStyle(Value: Boolean); +begin + if ShowRoot <> Value then + begin + FShowRoot := Value; + SetComCtlStyle(Self, TVS_LINESATROOT, Value); + end; +end; + +procedure TCustomTreeView.SetReadOnly(Value: Boolean); +begin + if ReadOnly <> Value then + begin + FReadOnly := Value; + SetComCtlStyle(Self, TVS_EDITLABELS, not Value); + end; +end; + +procedure TCustomTreeView.SetHideSelection(Value: Boolean); +begin + if HideSelection <> Value then + begin + FHideSelection := Value; + SetComCtlStyle(Self, TVS_SHOWSELALWAYS, not Value); + Invalidate; + end; +end; + +function TCustomTreeView.GetNodeAt(X, Y: Integer): TTreeNode; +var + HitTest: TTVHitTestInfo; +begin + with HitTest do + begin + pt.X := X; + pt.Y := Y; + if TreeView_HitTest(Handle, HitTest) <> nil then + Result := Items.GetNode(HitTest.hItem) + else Result := nil; + end; +end; + +function TCustomTreeView.GetHitTestInfoAt(X, Y: Integer): THitTests; +var + HitTest: TTVHitTestInfo; +begin + Result := []; + with HitTest do + begin + pt.X := X; + pt.Y := Y; + TreeView_HitTest(Handle, HitTest); + if (flags and TVHT_ABOVE) <> 0 then Include(Result, htAbove); + if (flags and TVHT_BELOW) <> 0 then Include(Result, htBelow); + if (flags and TVHT_NOWHERE) <> 0 then Include(Result, htNowhere); + if (flags and TVHT_ONITEM) = TVHT_ONITEM then + Include(Result, htOnItem) + else + begin + if (flags and TVHT_ONITEM) <> 0 then Include(Result, htOnItem); + if (flags and TVHT_ONITEMICON) <> 0 then Include(Result, htOnIcon); + if (flags and TVHT_ONITEMLABEL) <> 0 then Include(Result, htOnLabel); + if (flags and TVHT_ONITEMSTATEICON) <> 0 then Include(Result, htOnStateIcon); + end; + if (flags and TVHT_ONITEMBUTTON) <> 0 then Include(Result, htOnButton); + if (flags and TVHT_ONITEMINDENT) <> 0 then Include(Result, htOnIndent); + if (flags and TVHT_ONITEMRIGHT) <> 0 then Include(Result, htOnRight); + if (flags and TVHT_TOLEFT) <> 0 then Include(Result, htToLeft); + if (flags and TVHT_TORIGHT) <> 0 then Include(Result, htToRight); + end; +end; + +procedure TCustomTreeView.SetIndent(Value: Integer); +begin + if Value <> Indent then TreeView_SetIndent(Handle, Value); +end; + +function TCustomTreeView.GetIndent: Integer; +begin + Result := TreeView_GetIndent(Handle) +end; + +procedure TCustomTreeView.FullExpand; +var + Node: TTreeNode; +begin + Node := Items.GetFirstNode; + while Node <> nil do + begin + Node.Expand(True); + Node := Node.GetNextSibling; + end; +end; + +procedure TCustomTreeView.FullCollapse; +var + Node: TTreeNode; +begin + Node := Items.GetFirstNode; + while Node <> nil do + begin + Node.Collapse(True); + Node := Node.GetNextSibling; + end; +end; + +procedure TCustomTreeView.Loaded; +begin + inherited Loaded; + if csDesigning in ComponentState then FullExpand; +end; + +function TCustomTreeView.GetTopItem: TTreeNode; +begin + if HandleAllocated then + Result := Items.GetNode(TreeView_GetFirstVisible(Handle)) + else Result := nil; +end; + +procedure TCustomTreeView.SetTopItem(Value: TTreeNode); +begin + if HandleAllocated and (Value <> nil) then + TreeView_SelectSetFirstVisible(Handle, Value.ItemId); +end; + +procedure TCustomTreeView.OnChangeTimer(Sender: TObject); +begin + FChangeTimer.Enabled := False; + Change(TTreeNode(FChangeTimer.Tag)); +end; + +procedure TCustomTreeView.SetChangeDelay(Value: Integer); +begin + FChangeTimer.Interval := Value; +end; + +function TCustomTreeView.GetChangeDelay: Integer; +begin + Result := FChangeTimer.Interval; +end; + +function TCustomTreeView.GetDropTarget: TTreeNode; +begin + if HandleAllocated then + begin + Result := Items.GetNode(TreeView_GetDropHilite(Handle)); + if Result = nil then Result := FLastDropTarget; + end + else Result := nil; +end; + +procedure TCustomTreeView.SetDropTarget(Value: TTreeNode); +begin + if HandleAllocated then + if Value <> nil then Value.DropTarget := True + else TreeView_SelectDropTarget(Handle, nil); +end; + +function TCustomTreeView.GetNodeFromItem(const Item: TTVItem): TTreeNode; +begin + with Item do + if (state and TVIF_PARAM) <> 0 then Result := Pointer(lParam) + else Result := Items.GetNode(hItem); +end; + +function TCustomTreeView.IsEditing: Boolean; +var + ControlHand: HWnd; +begin + ControlHand := TreeView_GetEditControl(Handle); + Result := (ControlHand <> 0) and IsWindowVisible(ControlHand); +end; + +procedure TCustomTreeView.CNNotify(var Message: TWMNotify); +var + Node: TTreeNode; + MousePos: TPoint; + R: TRect; + DefaultDraw: Boolean; + TmpItem: TTVItem; +begin + with Message do + case NMHdr^.code of + NM_CUSTOMDRAW: + with PNMCustomDraw(NMHdr)^ do + begin + Result := CDRF_DODEFAULT; + if dwDrawStage = CDDS_PREPAINT then + begin + if IsCustomDrawn(dtControl, cdPrePaint) then + begin + FCanvas.Handle := hdc; + FCanvas.Font := Font; + FCanvas.Brush := Brush; + R := ClientRect; + DefaultDraw := CustomDraw(R, cdPrePaint); + FCanvas.Handle := 0; + if not DefaultDraw then + begin + Result := CDRF_SKIPDEFAULT; + Exit; + end; + end; + if IsCustomDrawn(dtControl, cdPostPaint) then + Result := CDRF_NOTIFYPOSTPAINT; + if IsCustomDrawn(dtItem, cdPrePaint) then + Result := Result or CDRF_NOTIFYITEMDRAW else + Result := Result or CDRF_DODEFAULT; + end + else if dwDrawStage = CDDS_ITEMPREPAINT then + begin + FillChar(TmpItem, SizeOf(TmpItem), 0); + TmpItem.hItem := HTREEITEM(dwItemSpec); + Node := GetNodeFromItem(TmpItem); + if Node <> nil then + begin + FCanvas.Handle := hdc; + FCanvas.Font := Font; + FCanvas.Brush := Brush; + { Unlike the list view, the tree view doesn't override the text + foreground and background colors of selected items. } + if uItemState and CDIS_SELECTED <> 0 then + begin + FCanvas.Font.Color := clHighlightText; + FCanvas.Brush.Color := clHighlight; + end; + FCanvas.Font.OnChange := CanvasChanged; + FCanvas.Brush.OnChange := CanvasChanged; + DefaultDraw := CustomDrawItem(Node, + TCustomDrawState(Word(uItemState)), cdPrePaint); + if not DefaultDraw then + Result := Result or CDRF_SKIPDEFAULT + else if FCanvasChanged then + begin + FCanvasChanged := False; + FCanvas.Font.OnChange := nil; + FCanvas.Brush.OnChange := nil; + with PNMTVCustomDraw(NMHdr)^ do + begin + clrText := ColorToRGB(FCanvas.Font.Color); + clrTextBk := ColorToRGB(FCanvas.Brush.Color); + SelectObject(hdc, FCanvas.Font.Handle); + Result := Result or CDRF_NEWFONT; + end; + end; + FCanvas.Handle := 0; + if IsCustomDrawn(dtItem, cdPostPaint) then + Result := Result or CDRF_NOTIFYPOSTPAINT; + end; + end; + end; + TVN_BEGINDRAG: + begin + FDragged := True; + with PNMTreeView(NMHdr)^ do + FDragNode := GetNodeFromItem(ItemNew); + end; + TVN_BEGINLABELEDIT: + begin + with PTVDispInfo(NMHdr)^ do + if Dragging or not CanEdit(GetNodeFromItem(item)) then + Result := 1; + if Result = 0 then + begin + FEditHandle := TreeView_GetEditControl(Handle); + FDefEditProc := Pointer(GetWindowLong(FEditHandle, GWL_WNDPROC)); + SetWindowLong(FEditHandle, GWL_WNDPROC, LongInt(FEditInstance)); + end; + end; + TVN_ENDLABELEDIT: Edit(PTVDispInfo(NMHdr)^.item); + TVN_ITEMEXPANDING: + if not FManualNotify then + begin + with PNMTreeView(NMHdr)^ do + begin + Node := GetNodeFromItem(ItemNew); + if (action = TVE_EXPAND) and not CanExpand(Node) then + Result := 1 + else if (action = TVE_COLLAPSE) and + not CanCollapse(Node) then Result := 1; + end; + end; + TVN_ITEMEXPANDED: + if not FManualNotify then + begin + with PNMTreeView(NMHdr)^ do + begin + Node := GetNodeFromItem(itemNew); + if (action = TVE_EXPAND) then Expand(Node) + else if (action = TVE_COLLAPSE) then Collapse(Node); + end; + end; + TVN_SELCHANGINGA, TVN_SELCHANGINGW: + if not CanChange(GetNodeFromItem(PNMTreeView(NMHdr)^.itemNew)) then + Result := 1; + TVN_SELCHANGEDA, TVN_SELCHANGEDW: + with PNMTreeView(NMHdr)^ do + if FChangeTimer.Interval > 0 then + with FChangeTimer do + begin + Enabled := False; + Tag := Integer(GetNodeFromItem(itemNew)); + Enabled := True; + end + else + Change(GetNodeFromItem(itemNew)); + TVN_DELETEITEM: + begin + Node := GetNodeFromItem(PNMTreeView(NMHdr)^.itemOld); + if Node <> nil then + begin + Node.FItemId := nil; + FChangeTimer.Enabled := False; + if FStateChanging then Node.Delete + else Items.Delete(Node); + end; + end; + TVN_SETDISPINFO: + with PTVDispInfo(NMHdr)^ do + begin + Node := GetNodeFromItem(item); + if (Node <> nil) and ((item.mask and TVIF_TEXT) <> 0) then + Node.Text := item.pszText; + end; + TVN_GETDISPINFO: + with PTVDispInfo(NMHdr)^ do + begin + Node := GetNodeFromItem(item); + if Node <> nil then + begin + if (item.mask and TVIF_TEXT) <> 0 then + StrLCopy(item.pszText, PChar(Node.Text), item.cchTextMax); + if (item.mask and TVIF_IMAGE) <> 0 then + begin + GetImageIndex(Node); + item.iImage := Node.ImageIndex; + end; + if (item.mask and TVIF_SELECTEDIMAGE) <> 0 then + begin + GetSelectedIndex(Node); + item.iSelectedImage := Node.SelectedIndex; + end; + end; + end; + NM_RCLICK: + begin + if RightClickSelect then + begin + GetCursorPos(MousePos); + with PointToSmallPoint(ScreenToClient(MousePos)) do + begin + FRClickNode := GetNodeAt(X, Y); + Perform(WM_RBUTTONUP, 0, MakeLong(X, Y)); + end; + end + else FRClickNode := Pointer(1); + end; + end; +end; + +function TCustomTreeView.GetDragImages: TDragImageList; +begin + if FDragImage.Count > 0 then + Result := FDragImage else + Result := nil; +end; + +procedure TCustomTreeView.WndProc(var Message: TMessage); +begin + if not (csDesigning in ComponentState) and ((Message.Msg = WM_LBUTTONDOWN) or + (Message.Msg = WM_LBUTTONDBLCLK)) and not Dragging and + (DragMode = dmAutomatic) and (DragKind = dkDrag) then + begin + if not IsControlMouseMsg(TWMMouse(Message)) then + begin + ControlState := ControlState + [csLButtonDown]; + Dispatch(Message); + end; + end + else inherited WndProc(Message); +end; + +procedure TCustomTreeView.DoStartDrag(var DragObject: TDragObject); +var + ImageHandle: HImageList; + DragNode: TTreeNode; + P: TPoint; +begin + inherited DoStartDrag(DragObject); + DragNode := FDragNode; + FLastDropTarget := nil; + FDragNode := nil; + if DragNode = nil then + begin + GetCursorPos(P); + with ScreenToClient(P) do DragNode := GetNodeAt(X, Y); + end; + if DragNode <> nil then + begin + ImageHandle := TreeView_CreateDragImage(Handle, DragNode.ItemId); + if ImageHandle <> 0 then + with FDragImage do + begin + Handle := ImageHandle; + SetDragImage(0, 2, 2); + end; + end; +end; + +procedure TCustomTreeView.DoEndDrag(Target: TObject; X, Y: Integer); +begin + inherited DoEndDrag(Target, X, Y); + FLastDropTarget := nil; +end; + +procedure TCustomTreeView.CMDrag(var Message: TCMDrag); +begin + inherited; + with Message, DragRec^ do + case DragMessage of + dmDragMove: + with ScreenToClient(Pos) do + DoDragOver(Source, X, Y, Message.Result <> 0); + dmDragLeave: + begin + TDragObject(Source).HideDragImage; + FLastDropTarget := DropTarget; + DropTarget := nil; + TDragObject(Source).ShowDragImage; + end; + dmDragDrop: FLastDropTarget := nil; + end; +end; + +procedure TCustomTreeView.DoDragOver(Source: TDragObject; X, Y: Integer; CanDrop: Boolean); +var + Node: TTreeNode; +begin + Node := GetNodeAt(X, Y); + if (Node <> nil) and + ((Node <> DropTarget) or (Node = FLastDropTarget)) then + begin + FLastDropTarget := nil; + TDragObject(Source).HideDragImage; + Node.DropTarget := True; + TDragObject(Source).ShowDragImage; + end; +end; + +procedure TCustomTreeView.GetImageIndex(Node: TTreeNode); +begin + if Assigned(FOnGetImageIndex) then FOnGetImageIndex(Self, Node); +end; + +function TCustomTreeView.CanChange(Node: TTreeNode): Boolean; +begin + Result := True; + if Assigned(FOnChanging) then FOnChanging(Self, Node, Result); +end; + +procedure TCustomTreeView.Change(Node: TTreeNode); +begin + if Assigned(FOnChange) then FOnChange(Self, Node); +end; + +procedure TCustomTreeView.Delete(Node: TTreeNode); +begin + if Assigned(FOnDeletion) then FOnDeletion(Self, Node); +end; + +procedure TCustomTreeView.Expand(Node: TTreeNode); +begin + if Assigned(FOnExpanded) then FOnExpanded(Self, Node); +end; + +function TCustomTreeView.CanExpand(Node: TTreeNode): Boolean; +begin + Result := True; + if Assigned(FOnExpanding) then FOnExpanding(Self, Node, Result); +end; + +procedure TCustomTreeView.Collapse(Node: TTreeNode); +begin + if Assigned(FOnCollapsed) then FOnCollapsed(Self, Node); +end; + +function TCustomTreeView.CanCollapse(Node: TTreeNode): Boolean; +begin + Result := True; + if Assigned(FOnCollapsing) then FOnCollapsing(Self, Node, Result); +end; + +function TCustomTreeView.CanEdit(Node: TTreeNode): Boolean; +begin + Result := True; + if Assigned(FOnEditing) then FOnEditing(Self, Node, Result); +end; + +procedure TCustomTreeView.Edit(const Item: TTVItem); +var + S: string; + Node: TTreeNode; +begin + with Item do + if pszText <> nil then + begin + S := pszText; + Node := GetNodeFromItem(Item); + if Assigned(FOnEdited) then FOnEdited(Self, Node, S); + if Node <> nil then Node.Text := S; + end; +end; + +function TCustomTreeView.CreateNode: TTreeNode; +begin + Result := TTreeNode.Create(Items); +end; + +procedure TCustomTreeView.SetImageList(Value: HImageList; Flags: Integer); +begin + if HandleAllocated then TreeView_SetImageList(Handle, Value, Flags); +end; + +procedure TCustomTreeView.ImageListChange(Sender: TObject); +var + ImageHandle: HImageList; +begin + if HandleAllocated then + begin + if TCustomImageList(Sender).HandleAllocated then + ImageHandle := TCustomImageList(Sender).Handle + else + ImageHandle := 0; + if Sender = Images then + SetImageList(ImageHandle, TVSIL_NORMAL) + else if Sender = StateImages then + SetImageList(ImageHandle, TVSIL_STATE); + end; +end; + +procedure TCustomTreeView.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then + begin + if AComponent = Images then Images := nil; + if AComponent = StateImages then StateImages := nil; + end; +end; + +procedure TCustomTreeView.LoadFromFile(const FileName: string); +var + Stream: TStream; +begin + Stream := TFileStream.Create(FileName, fmOpenRead); + try + LoadFromStream(Stream); + finally + Stream.Free; + end; +end; + +procedure TCustomTreeView.LoadFromStream(Stream: TStream); +begin + with TTreeStrings.Create(Items) do + try + LoadTreeFromStream(Stream); + finally + Free; + end; +end; + +procedure TCustomTreeView.SaveToFile(const FileName: string); +var + Stream: TStream; +begin + Stream := TFileStream.Create(FileName, fmCreate); + try + SaveToStream(Stream); + finally + Stream.Free; + end; +end; + +procedure TCustomTreeView.SaveToStream(Stream: TStream); +begin + with TTreeStrings.Create(Items) do + try + SaveTreeToStream(Stream); + finally + Free; + end; +end; + +procedure TCustomTreeView.WMRButtonDown(var Message: TWMRButtonDown); +var + MousePos: TPoint; +begin + FRClickNode := nil; + try + if not RightClickSelect then + begin + inherited; + if FRClickNode <> nil then + begin + GetCursorPos(MousePos); + with PointToSmallPoint(ScreenToClient(MousePos)) do + Perform(WM_RBUTTONUP, 0, MakeLong(X, Y)); + end; + end + else DefaultHandler(Message); + finally + FRClickNode := nil; + + end; +end; + +procedure TCustomTreeView.WMRButtonUp(var Message: TWMRButtonUp); + + procedure DoMouseDown(var Message: TWMMouse; Button: TMouseButton; + Shift: TShiftState); + begin + if not (csNoStdEvents in ControlStyle) then + with Message do + MouseDown(Button, KeysToShiftState(Keys) + Shift, XPos, YPos); + end; + +begin + if RightClickSelect then DoMouseDown(Message, mbRight, []); + inherited; +end; + +procedure TCustomTreeView.WMLButtonDown(var Message: TWMLButtonDown); +var + Node: TTreeNode; + MousePos: TPoint; +begin + FDragged := False; + FDragNode := nil; + try + inherited; + if (DragMode = dmAutomatic) and (DragKind = dkDrag) then + begin + SetFocus; + if not FDragged then + begin + GetCursorPos(MousePos); + with PointToSmallPoint(ScreenToClient(MousePos)) do + Perform(WM_LBUTTONUP, 0, MakeLong(X, Y)); + end + else begin + Node := GetNodeAt(Message.XPos, Message.YPos); + if Node <> nil then + begin + Node.Focused := True; + Node.Selected := True; + BeginDrag(False); + end; + end; + end; + finally + FDragNode := nil; + end; +end; + +procedure TCustomTreeView.WMNotify(var Message: TWMNotify); +var + Node: TTreeNode; + MaxTextLen: Integer; + Pt: TPoint; +begin + with Message do + if NMHdr^.code = TTN_NEEDTEXTW then + begin + // Work around NT COMCTL32 problem with tool tips >= 80 characters + GetCursorPos(Pt); + Pt := ScreenToClient(Pt); + Node := GetNodeAt(Pt.X, Pt.Y); + if (Node = nil) or (Node.Text = '') or + (PToolTipTextW(NMHdr)^.uFlags and TTF_IDISHWND = 0) then Exit; + if (GetComCtlVersion >= ComCtlVersionIE4) and (Length(Node.Text) < 80) then + begin + inherited; + Exit; + end; + FWideText := Node.Text; + MaxTextLen := SizeOf(PToolTipTextW(NMHdr)^.szText) div SizeOf(WideChar); + if Length(FWideText) >= MaxTextLen then + SetLength(FWideText, MaxTextLen - 1); + PToolTipTextW(NMHdr)^.lpszText := PWideChar(FWideText); + FillChar(PToolTipTextW(NMHdr)^.szText, MaxTextLen, 0); + Move(Pointer(FWideText)^, PToolTipTextW(NMHdr)^.szText, Length(FWideText) * SizeOf(WideChar)); + PToolTipTextW(NMHdr)^.hInst := 0; + SetWindowPos(NMHdr^.hwndFrom, HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE or + SWP_NOSIZE or SWP_NOMOVE or SWP_NOOWNERZORDER); + Result := 1; + end + else inherited; +end; + +{ CustomDraw support } + +procedure TCustomTreeView.CanvasChanged; +begin + FCanvasChanged := True; +end; + +function TCustomTreeView.IsCustomDrawn(Target: TCustomDrawTarget; + Stage: TCustomDrawStage): Boolean; +begin + { Tree view doesn't support erase notifications } + if Stage = cdPrePaint then + begin + if Target = dtItem then + Result := Assigned(FOnCustomDrawItem) + else if Target = dtControl then + Result := Assigned(FOnCustomDraw) + else + Result := False; + end + else + Result := False; +end; + +function TCustomTreeView.CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; +begin + Result := True; + if Assigned(FOnCustomDraw) then FOnCustomDraw(Self, ARect, Result); +end; + +function TCustomTreeView.CustomDrawItem(Node: TTreeNode; State: TCustomDrawState; + Stage: TCustomDrawStage): Boolean; +begin + Result := True; + if Assigned(FOnCustomDrawItem) then FOnCustomDrawItem(Self, Node, State, Result); +end; + +*/ diff --git a/apps/X11/VCL/TCustomTreeView.h b/apps/X11/VCL/TCustomTreeView.h new file mode 100644 index 0000000..0b3c91d --- /dev/null +++ b/apps/X11/VCL/TCustomTreeView.h @@ -0,0 +1,238 @@ +#ifndef TCUSTOMTREEVIEW_H +#define TCUSTOMTREEVIEW_H + +#include <TWinControl.h> +#include <TTreeNode.h> +#include <TCustomImageList.h> +#include <gtk/gtktree.h> +#include <gtk/gtktreeitem.h> + + enum THitTest {htAbove, htBelow, htNowhere, htOnItem, htOnButton, htOnIcon, + htOnIndent, htOnLabel, htOnRight, htOnStateIcon, htToLeft, htToRight}; +// THitTests = set of THitTest; + enum TSortType {stNone, stData, stText, stBoth}; + +/* + ETreeViewError = class(Exception); + TTVChangingEvent = procedure(Sender: TObject; Node: TTreeNode; + var AllowChange: Boolean) of object; + TTVChangedEvent = procedure(Sender: TObject; Node: TTreeNode) of object; + TTVEditingEvent = procedure(Sender: TObject; Node: TTreeNode; + var AllowEdit: Boolean) of object; + TTVEditedEvent = procedure(Sender: TObject; Node: TTreeNode; var S: string) of object; + TTVExpandingEvent = procedure(Sender: TObject; Node: TTreeNode; + var AllowExpansion: Boolean) of object; + TTVCollapsingEvent = procedure(Sender: TObject; Node: TTreeNode; + var AllowCollapse: Boolean) of object; + TTVExpandedEvent = procedure(Sender: TObject; Node: TTreeNode) of object; + TTVCompareEvent = procedure(Sender: TObject; Node1, Node2: TTreeNode; + Data: Integer; var Compare: Integer) of object; + TTVCustomDrawEvent = procedure(Sender: TCustomTreeView; const ARect: TRect; + var DefaultDraw: Boolean) of object; + TTVCustomDrawItemEvent = procedure(Sender: TCustomTreeView; Node: TTreeNode; + State: TCustomDrawState; var DefaultDraw: Boolean) of object; +*/ + +class TTreeNodes; + +class TCustomTreeView : public TWinControl { +friend TTreeNodes; +friend TTreeNode; +protected: + void init(TComponent *AOwner); + +// procedure SetTreeNodes(Value: TTreeNodes); + void SetTreeNodes(TTreeNodes* Value); +// FImages: TCustomImageList; + TCustomImageList *FImages; +// FStateImages: TCustomImageList; + TCustomImageList *FStateImages; +// procedure SetImages(Value: TCustomImageList); + void SetImages(TCustomImageList *val); + TCustomImageList * getImages() { return FImages; } +// procedure SetStateImages(Value: TCustomImageList); + void SetStateImages(TCustomImageList *val); + TCustomImageList * getStateImages() { return FStateImages; } +/* + FAutoExpand: Boolean; + FBorderStyle: TBorderStyle; + FCanvas: TCanvas; + FCanvasChanged: Boolean; + FDefEditProc: Pointer; + FDragged: Boolean; + FDragImage: TDragImageList; + FDragNode: TTreeNode; + FEditHandle: HWND; + FEditInstance: Pointer; + FHideSelection: Boolean; + FHotTrack: Boolean; + FImageChangeLink: TChangeLink; + FLastDropTarget: TTreeNode; + FManualNotify: Boolean; + FMemStream: TMemoryStream; + FRClickNode: TTreeNode; + FRightClickSelect: Boolean; + FReadOnly: Boolean; + FRowSelect: Boolean; + FSaveIndex: Integer; + FSaveIndent: Integer; + FSaveItems: TStringList; + FSaveTopIndex: Integer; + FShowButtons: Boolean; + FShowLines: Boolean; + FShowRoot: Boolean; + FSortType: TSortType; + FStateChanging: Boolean; + FStateChangeLink: TChangeLink; + FToolTips: Boolean; + FWideText: WideString; + FOnEditing: TTVEditingEvent; + FOnEdited: TTVEditedEvent; + FOnExpanded: TTVExpandedEvent; + FOnExpanding: TTVExpandingEvent; + FOnCollapsed: TTVExpandedEvent; + FOnCollapsing: TTVCollapsingEvent; + FOnChanging: TTVChangingEvent; + FOnChange: TTVChangedEvent; + FOnCompare: TTVCompareEvent; + FOnDeletion: TTVExpandedEvent; + FOnCustomDraw: TTVCustomDrawEvent; + FOnCustomDrawItem: TTVCustomDrawItemEvent; + FOnGetImageIndex: TTVExpandedEvent; + FOnGetSelectedIndex: TTVExpandedEvent; + procedure CanvasChanged(Sender: TObject); + procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; + procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMDrag(var Message: TCMDrag); message CM_DRAG; + procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; + procedure EditWndProc(var Message: TMessage); + procedure DoDragOver(Source: TDragObject; X, Y: Integer; CanDrop: Boolean); + function GetChangeDelay: Integer; + function GetDropTarget: TTreeNode; + function GetIndent: Integer; + function GetNodeFromItem(const Item: TTVItem): TTreeNode; + function GetTopItem: TTreeNode; + procedure ImageListChange(Sender: TObject); + procedure SetAutoExpand(Value: Boolean); + procedure SetBorderStyle(Value: TBorderStyle); + procedure SetButtonStyle(Value: Boolean); + procedure SetChangeDelay(Value: Integer); + procedure SetDropTarget(Value: TTreeNode); + procedure SetHideSelection(Value: Boolean); + procedure SetHotTrack(Value: Boolean); + procedure SetImageList(Value: HImageList; Flags: Integer); + procedure SetIndent(Value: Integer); + procedure SetLineStyle(Value: Boolean); + procedure SetReadOnly(Value: Boolean); + procedure SetRootStyle(Value: Boolean); + procedure SetRowSelect(Value: Boolean); + procedure SetSortType(Value: TSortType); + procedure SetToolTips(Value: Boolean); + procedure SetTopItem(Value: TTreeNode); + procedure OnChangeTimer(Sender: TObject); + procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; + procedure WMRButtonDown(var Message: TWMRButtonDown); message WM_RBUTTONDOWN; + procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; + procedure WMNotify(var Message: TWMNotify); message WM_NOTIFY; + procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; +*/ + protected: +// property Items: TTreeNodes read FTreeNodes write SetTreeNodes; + TTreeNodes *FTreeNodes; + property <TCustomTreeView, TTreeNodes*> Items; + TTreeNodes *getItems() { return FTreeNodes; } + +// property Images: TCustomImageList read FImages write SetImages; + property <TCustomTreeView, TCustomImageList *> Images; +// property StateImages: TCustomImageList read FStateImages write SetStateImages; + property <TCustomTreeView, TCustomImageList *> StateImages; + +// property Selected: TTreeNode read GetSelection write SetSelection; +// function GetSelection: TTreeNode; +// procedure SetSelection(Value: TTreeNode); + TTreeNode *GetSelection(); + void SetSelection(TTreeNode *); + +/* + FChangeTimer: TTimer; + function CanEdit(Node: TTreeNode): Boolean; dynamic; + function CanChange(Node: TTreeNode): Boolean; dynamic; + function CanCollapse(Node: TTreeNode): Boolean; dynamic; + function CanExpand(Node: TTreeNode): Boolean; dynamic; + procedure Change(Node: TTreeNode); dynamic; + procedure Collapse(Node: TTreeNode); dynamic; + function CreateNode: TTreeNode; virtual; + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; virtual; + function CustomDrawItem(Node: TTreeNode; State: TCustomDrawState; + Stage: TCustomDrawStage): Boolean; virtual; + procedure Delete(Node: TTreeNode); dynamic; + procedure DestroyWnd; override; + procedure DoEndDrag(Target: TObject; X, Y: Integer); override; + procedure DoStartDrag(var DragObject: TDragObject); override; + procedure Edit(const Item: TTVItem); dynamic; + procedure Expand(Node: TTreeNode); dynamic; + function GetDragImages: TDragImageList; override; + procedure GetImageIndex(Node: TTreeNode); virtual; + procedure GetSelectedIndex(Node: TTreeNode); virtual; + function IsCustomDrawn(Target: TCustomDrawTarget; Stage: TCustomDrawStage): Boolean; + procedure Loaded; override; + procedure Notification(AComponent: TComponent; + Operation: TOperation); override; + procedure SetDragMode(Value: TDragMode); override; + procedure WndProc(var Message: TMessage); override; + property AutoExpand: Boolean read FAutoExpand write SetAutoExpand default False; + property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; + property ChangeDelay: Integer read GetChangeDelay write SetChangeDelay default 0; + property HideSelection: Boolean read FHideSelection write SetHideSelection default True; + property HotTrack: Boolean read FHotTrack write SetHotTrack default False; + property Indent: Integer read GetIndent write SetIndent; + property ReadOnly: Boolean read FReadOnly write SetReadOnly default False; + property RightClickSelect: Boolean read FRightClickSelect write FRightClickSelect default False; + property RowSelect: Boolean read FRowSelect write SetRowSelect default False; + property ShowButtons: Boolean read FShowButtons write SetButtonStyle default True; + property ShowLines: Boolean read FShowLines write SetLineStyle default True; + property ShowRoot: Boolean read FShowRoot write SetRootStyle default True; + property SortType: TSortType read FSortType write SetSortType default stNone; + property ToolTips: Boolean read FToolTips write SetToolTips default True; + property OnCustomDraw: TTVCustomDrawEvent read FOnCustomDraw write FOnCustomDraw; + property OnCustomDrawItem: TTVCustomDrawItemEvent read FOnCustomDrawItem write FOnCustomDrawItem; + property OnEditing: TTVEditingEvent read FOnEditing write FOnEditing; + property OnEdited: TTVEditedEvent read FOnEdited write FOnEdited; + property OnExpanding: TTVExpandingEvent read FOnExpanding write FOnExpanding; + property OnExpanded: TTVExpandedEvent read FOnExpanded write FOnExpanded; + property OnCollapsing: TTVCollapsingEvent read FOnCollapsing write FOnCollapsing; + property OnCollapsed: TTVExpandedEvent read FOnCollapsed write FOnCollapsed; + property OnChanging: TTVChangingEvent read FOnChanging write FOnChanging; + property OnChange: TTVChangedEvent read FOnChange write FOnChange; + property OnCompare: TTVCompareEvent read FOnCompare write FOnCompare; + property OnDeletion: TTVExpandedEvent read FOnDeletion write FOnDeletion; + property OnGetImageIndex: TTVExpandedEvent read FOnGetImageIndex write FOnGetImageIndex; + property OnGetSelectedIndex: TTVExpandedEvent read FOnGetSelectedIndex write FOnGetSelectedIndex; +*/ +public: + TCustomTreeView(TComponent *AOwner); + TCustomTreeView(GtkWidget *parent); + property <TCustomTreeView, TTreeNode *> Selected; + virtual ~TCustomTreeView(); +/* + function AlphaSort: Boolean; + function CustomSort(SortProc: TTVCompare; Data: Longint): Boolean; + procedure FullCollapse; + procedure FullExpand; + function GetHitTestInfoAt(X, Y: Integer): THitTests; + function GetNodeAt(X, Y: Integer): TTreeNode; + function IsEditing: Boolean; + procedure LoadFromFile(const FileName: string); + procedure LoadFromStream(Stream: TStream); + procedure SaveToFile(const FileName: string); + procedure SaveToStream(Stream: TStream); + property Canvas: TCanvas read FCanvas; + property DropTarget: TTreeNode read GetDropTarget write SetDropTarget; + property TopItem: TTreeNode read GetTopItem write SetTopItem; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TDragImageList.cpp b/apps/X11/VCL/TDragImageList.cpp new file mode 100644 index 0000000..4f51c7c --- /dev/null +++ b/apps/X11/VCL/TDragImageList.cpp @@ -0,0 +1,144 @@ +#include <TDragImageList.h> + +TDragImageList::TDragImageList() :TCustomImageList(0) { + +} + +/* +{ TDragImageList } + +function ClientToWindow(Handle: HWND; X, Y: Integer): TPoint; +var + Rect: TRect; + Point: TPoint; +begin + Point.X := X; + Point.Y := Y; + ClientToScreen(Handle, Point); + GetWindowRect(Handle, Rect); + Result.X := Point.X - Rect.Left; + Result.Y := Point.Y - Rect.Top; +end; + +procedure TDragImageList.Initialize; +begin + inherited Initialize; + DragCursor := crNone; +end; + +procedure TDragImageList.CombineDragCursor; +var + TempList: HImageList; + Point: TPoint; +begin + if DragCursor <> crNone then + begin + TempList := ImageList_Create(GetSystemMetrics(SM_CXCURSOR), + GetSystemMetrics(SM_CYCURSOR), ILC_MASK, 1, 1); + try + ImageList_AddIcon(TempList, Screen.Cursors[DragCursor]); + ImageList_AddIcon(TempList, Screen.Cursors[DragCursor]); + ImageList_SetDragCursorImage(TempList, 0, 0, 0); + ImageList_GetDragImage(nil, @Point); + ImageList_SetDragCursorImage(TempList, 1, Point.X, Point.Y); + finally + ImageList_Destroy(TempList); + end; + end; +end; + +function TDragImageList.SetDragImage(Index, HotSpotX, HotSpotY: Integer): Boolean; +begin + if HandleAllocated then + begin + FDragIndex := Index; + FDragHotspot.x := HotSpotX; + FDragHotspot.y := HotSpotY; + ImageList_BeginDrag(Handle, Index, HotSpotX, HotSpotY); + Result := True; + FDragging := Result; + end + else Result := False; +end; + +procedure TDragImageList.SetDragCursor(Value: TCursor); +begin + if Value <> DragCursor then + begin + FDragCursor := Value; + if Dragging then CombineDragCursor; + end; +end; + +function TDragImageList.GetHotSpot: TPoint; +begin + Result := inherited GetHotSpot; + if HandleAllocated and Dragging then + ImageList_GetDragImage(nil, @Result); +end; + +function TDragImageList.BeginDrag(Window: HWND; X, Y: Integer): Boolean; +begin + Result := False; + if HandleAllocated then + begin + if not Dragging then SetDragImage(FDragIndex, FDragHotspot.x, FDragHotspot.y); + CombineDragCursor; + Result := DragLock(Window, X, Y); + if Result then ShowCursor(False); + end; +end; + +function TDragImageList.DragLock(Window: HWND; XPos, YPos: Integer): Boolean; +begin + Result := False; + if HandleAllocated and (Window <> FDragHandle) then + begin + DragUnlock; + FDragHandle := Window; + with ClientToWindow(FDragHandle, XPos, YPos) do + Result := ImageList_DragEnter(FDragHandle, X, Y); + end; +end; + +procedure TDragImageList.DragUnlock; +begin + if HandleAllocated and (FDragHandle <> 0) then + begin + ImageList_DragLeave(FDragHandle); + FDragHandle := 0; + end; +end; + +function TDragImageList.DragMove(X, Y: Integer): Boolean; +begin + if HandleAllocated then + with ClientToWindow(FDragHandle, X, Y) do + Result := ImageList_DragMove(X, Y) + else + Result := False; +end; + +procedure TDragImageList.ShowDragImage; +begin + if HandleAllocated then ImageList_DragShowNoLock(True); +end; + +procedure TDragImageList.HideDragImage; +begin + if HandleAllocated then ImageList_DragShowNoLock(False); +end; + +function TDragImageList.EndDrag: Boolean; +begin + if HandleAllocated and Dragging then + begin + DragUnlock; + Result := ImageList_EndDrag; + FDragging := False; + DragCursor := crNone; + ShowCursor(True); + end + else Result := False; +end; +*/ diff --git a/apps/X11/VCL/TDragImageList.h b/apps/X11/VCL/TDragImageList.h new file mode 100644 index 0000000..4cb9dab --- /dev/null +++ b/apps/X11/VCL/TDragImageList.h @@ -0,0 +1,40 @@ +#ifndef TDRAGIMAGELIST +#define TDRAGIMAGELIST + +#include <TCustomImageList.h> + +class TDragImageList : public TCustomImageList { + + TDragImageList(); + +/* +{ TDragImageList } + + TDragImageList = class(TCustomImageList) + private + FDragCursor: TCursor; + FDragging: Boolean; + FDragHandle: HWND; + FDragHotspot: TPoint; + FDragIndex: Integer; + procedure CombineDragCursor; + procedure SetDragCursor(Value: TCursor); + protected + procedure Initialize; override; + public + function BeginDrag(Window: HWND; X, Y: Integer): Boolean; + function DragLock(Window: HWND; XPos, YPos: Integer): Boolean; + function DragMove(X, Y: Integer): Boolean; + procedure DragUnlock; + function EndDrag: Boolean; + function GetHotSpot: TPoint; override; + procedure HideDragImage; + function SetDragImage(Index, HotSpotX, HotSpotY: Integer): Boolean; + procedure ShowDragImage; + property DragCursor: TCursor read FDragCursor write SetDragCursor; + property Dragging: Boolean read FDragging; + end; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TImageList.cpp b/apps/X11/VCL/TImageList.cpp new file mode 100644 index 0000000..e9f1259 --- /dev/null +++ b/apps/X11/VCL/TImageList.cpp @@ -0,0 +1,2 @@ +#include <TImageList.h> + diff --git a/apps/X11/VCL/TImageList.h b/apps/X11/VCL/TImageList.h new file mode 100644 index 0000000..ebabbe1 --- /dev/null +++ b/apps/X11/VCL/TImageList.h @@ -0,0 +1,28 @@ +#ifndef TIMAGELIST_H +#define TIMAGELIST_H + +#include <TDragImageList.h> + +class TImageList : public TDragImageList { +public: + +/* +{ TImageList } + + TImageList = class(TDragImageList) + published + property BlendColor; + property BkColor; + property AllocBy; + property DrawingStyle; + property Height; + property ImageType; + property Masked; + property OnChange; + property ShareImages; + property Width; + end; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TObject.cpp b/apps/X11/VCL/TObject.cpp new file mode 100644 index 0000000..e1ea4c5 --- /dev/null +++ b/apps/X11/VCL/TObject.cpp @@ -0,0 +1,7 @@ +#include <TObject.h> + +TObject::TObject() { +} + +TObject::~TObject() { +} diff --git a/apps/X11/VCL/TObject.h b/apps/X11/VCL/TObject.h new file mode 100644 index 0000000..874f071 --- /dev/null +++ b/apps/X11/VCL/TObject.h @@ -0,0 +1,38 @@ +#ifndef TOBJECT_H +#define TOBJECT_H + +#include <property> + +class TObject { +public: + TObject(); + virtual ~TObject(); +/* + procedure Free; + class function InitInstance(Instance: Pointer): TObject; + procedure CleanupInstance; + function ClassType: TClass; + class function ClassName: ShortString; + class function ClassNameIs(const Name: string): Boolean; + class function ClassParent: TClass; + class function ClassInfo: Pointer; + class function InstanceSize: Longint; + class function InheritsFrom(AClass: TClass): Boolean; + class function MethodAddress(const Name: ShortString): Pointer; + class function MethodName(Address: Pointer): ShortString; + function FieldAddress(const Name: ShortString): Pointer; + function GetInterface(const IID: TGUID; out Obj): Boolean; + class function GetInterfaceEntry(const IID: TGUID): PInterfaceEntry; + class function GetInterfaceTable: PInterfaceTable; + function SafeCallException(ExceptObject: TObject; + ExceptAddr: Pointer): HResult; virtual; + procedure AfterConstruction; virtual; + procedure BeforeDestruction; virtual; + procedure Dispatch(var Message); virtual; + procedure DefaultHandler(var Message); virtual; + class function NewInstance: TObject; virtual; + procedure FreeInstance; virtual; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TPageControl.cpp b/apps/X11/VCL/TPageControl.cpp new file mode 100644 index 0000000..af0112c --- /dev/null +++ b/apps/X11/VCL/TPageControl.cpp @@ -0,0 +1,408 @@ +#include <TPageControl.h> + +TPageControl::TPageControl(TComponent *AOwner) : TCustomTabControl(AOwner) { +} + +TPageControl::~TPageControl() { +} + +/* +{ TPageControl } + +constructor TPageControl.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + ControlStyle := [csDoubleClicks, csOpaque]; + FPages := TList.Create; +end; + +destructor TPageControl.Destroy; +var + I: Integer; +begin + for I := 0 to FPages.Count - 1 do TTabSheet(FPages[I]).FPageControl := nil; + FPages.Free; + inherited Destroy; +end; + +function TPageControl.CanShowTab(TabIndex: Integer): Boolean; +begin + Result := TTabSheet(FPages[TabIndex]).Enabled; +end; + +procedure TPageControl.Change; +var + Form: TCustomForm; +begin + UpdateActivePage; + if csDesigning in ComponentState then + begin + Form := GetParentForm(Self); + if (Form <> nil) and (Form.Designer <> nil) then Form.Designer.Modified; + end; + inherited Change; +end; + +procedure TPageControl.ChangeActivePage(Page: TTabSheet); +var + ParentForm: TCustomForm; +begin + if FActivePage <> Page then + begin + ParentForm := GetParentForm(Self); + if (ParentForm <> nil) and (FActivePage <> nil) and + FActivePage.ContainsControl(ParentForm.ActiveControl) then + begin + ParentForm.ActiveControl := FActivePage; + if ParentForm.ActiveControl <> FActivePage then + begin + TabIndex := FActivePage.TabIndex; + Exit; + end; + end; + if Page <> nil then + begin + Page.BringToFront; + Page.Visible := True; + if (ParentForm <> nil) and (FActivePage <> nil) and + (ParentForm.ActiveControl = FActivePage) then + if Page.CanFocus then + ParentForm.ActiveControl := Page else + ParentForm.ActiveControl := Self; + end; + if FActivePage <> nil then FActivePage.Visible := False; + FActivePage := Page; + if (ParentForm <> nil) and (FActivePage <> nil) and + (ParentForm.ActiveControl = FActivePage) then + FActivePage.SelectFirst; + end; +end; + +procedure TPageControl.DeleteTab(Page: TTabSheet; Index: Integer); +var + UpdateIndex: Boolean; +begin + UpdateIndex := Page = ActivePage; + Tabs.Delete(Index); + if UpdateIndex then + begin + if Index >= Tabs.Count then + Index := Tabs.Count - 1; + TabIndex := Index; + end; + UpdateActivePage; +end; + +procedure TPageControl.DoAddDockClient(Client: TControl; const ARect: TRect); +begin + if FNewDockSheet <> nil then Client.Parent := FNewDockSheet; +end; + +procedure TPageControl.DockOver(Source: TDragDockObject; X, Y: Integer; + State: TDragState; var Accept: Boolean); +var + R: TRect; +begin + GetWindowRect(Handle, R); + Source.DockRect := R; + DoDockOver(Source, X, Y, State, Accept); +end; + +procedure TPageControl.DoRemoveDockClient(Client: TControl); +begin + if (FUndockingPage <> nil) and not (csDestroying in ComponentState) then + begin + SelectNextPage(True); + FUndockingPage.Free; + FUndockingPage := nil; + end; +end; + +function TPageControl.FindNextPage(CurPage: TTabSheet; + GoForward, CheckTabVisible: Boolean): TTabSheet; +var + I, StartIndex: Integer; +begin + if FPages.Count <> 0 then + begin + StartIndex := FPages.IndexOf(CurPage); + if StartIndex = -1 then + if GoForward then StartIndex := FPages.Count - 1 else StartIndex := 0; + I := StartIndex; + repeat + if GoForward then + begin + Inc(I); + if I = FPages.Count then I := 0; + end else + begin + if I = 0 then I := FPages.Count; + Dec(I); + end; + Result := FPages[I]; + if not CheckTabVisible or Result.TabVisible then Exit; + until I = StartIndex; + end; + Result := nil; +end; + +procedure TPageControl.GetChildren(Proc: TGetChildProc; Root: TComponent); +var + I: Integer; +begin + for I := 0 to FPages.Count - 1 do Proc(TComponent(FPages[I])); +end; + +function TPageControl.GetImageIndex(TabIndex: Integer): Integer; +begin + if Assigned(FOnGetImageIndex) then + Result := inherited GetImageIndex(TabIndex) else + Result := GetPage(TabIndex).ImageIndex; +end; + +function TPageControl.GetPageFromDockClient(Client: TControl): TTabSheet; +var + I: Integer; +begin + Result := nil; + for I := 0 to PageCount - 1 do + begin + if (Client.Parent = Pages[I]) and (Client.HostDockSite = Self) then + begin + Result := Pages[I]; + Exit; + end; + end; +end; + +function TPageControl.GetPage(Index: Integer): TTabSheet; +begin + Result := FPages[Index]; +end; + +function TPageControl.GetPageCount: Integer; +begin + Result := FPages.Count; +end; + +procedure TPageControl.GetSiteInfo(Client: TControl; var InfluenceRect: TRect; + MousePos: TPoint; var CanDock: Boolean); +begin + CanDock := GetPageFromDockClient(Client) = nil; + inherited GetSiteInfo(Client, InfluenceRect, MousePos, CanDock); +end; + +procedure TPageControl.InsertPage(Page: TTabSheet); +begin + FPages.Add(Page); + Page.FPageControl := Self; + Page.UpdateTabShowing; +end; + +procedure TPageControl.InsertTab(Page: TTabSheet); +begin + Tabs.InsertObject(Page.TabIndex, Page.Caption, Page); + UpdateActivePage; +end; + +procedure TPageControl.MoveTab(CurIndex, NewIndex: Integer); +begin + Tabs.Move(CurIndex, NewIndex); +end; + +procedure TPageControl.RemovePage(Page: TTabSheet); +var + NextSheet: TTabSheet; +begin + NextSheet := FindNextPage(Page, True, not (csDesigning in ComponentState)); + if NextSheet = Page then NextSheet := nil; + Page.SetTabShowing(False); + Page.FPageControl := nil; + FPages.Remove(Page); + SetActivePage(NextSheet); +end; + +procedure TPageControl.SelectNextPage(GoForward: Boolean); +var + Page: TTabSheet; +begin + Page := FindNextPage(ActivePage, GoForward, True); + if (Page <> nil) and (Page <> ActivePage) and CanChange then + begin + TabIndex := Page.TabIndex; + Change; + end; +end; + +procedure TPageControl.SetActivePage(Page: TTabSheet); +begin + if (Page <> nil) and (Page.PageControl <> Self) then Exit; + ChangeActivePage(Page); + if Page = nil then + TabIndex := -1 + else if Page = FActivePage then + TabIndex := Page.TabIndex; +end; + +procedure TPageControl.SetChildOrder(Child: TComponent; Order: Integer); +begin + TTabSheet(Child).PageIndex := Order; +end; + +procedure TPageControl.ShowControl(AControl: TControl); +begin + if (AControl is TTabSheet) and (TTabSheet(AControl).PageControl = Self) then + SetActivePage(TTabSheet(AControl)); + inherited ShowControl(AControl); +end; + +procedure TPageControl.UpdateTab(Page: TTabSheet); +begin + Tabs[Page.TabIndex] := Page.Caption; +end; + +procedure TPageControl.UpdateActivePage; +begin + if TabIndex >= 0 then + SetActivePage(TTabSheet(Tabs.Objects[TabIndex])) + else + SetActivePage(nil); +end; + +procedure TPageControl.CMDesignHitTest(var Message: TCMDesignHitTest); +var + HitIndex: Integer; + HitTestInfo: TTCHitTestInfo; +begin + HitTestInfo.pt := SmallPointToPoint(Message.Pos); + HitIndex := SendMessage(Handle, TCM_HITTEST, 0, Longint(@HitTestInfo)); + if (HitIndex >= 0) and (HitIndex <> TabIndex) then Message.Result := 1; +end; + +procedure TPageControl.CMDialogKey(var Message: TCMDialogKey); +begin + if (Focused or Windows.IsChild(Handle, Windows.GetFocus)) and + (Message.CharCode = VK_TAB) and (GetKeyState(VK_CONTROL) < 0) then + begin + SelectNextPage(GetKeyState(VK_SHIFT) >= 0); + Message.Result := 1; + end else + inherited; +end; + +procedure TPageControl.CMDockClient(var Message: TCMDockClient); +var + IsVisible: Boolean; + DockCtl: TControl; +begin + Message.Result := 0; + FNewDockSheet := TTabSheet.Create(Self); + try + try + DockCtl := Message.DockSource.Control; + if DockCtl is TCustomForm then + FNewDockSheet.Caption := TCustomForm(DockCtl).Caption; + FNewDockSheet.PageControl := Self; + DockCtl.Dock(Self, Message.DockSource.DockRect); + except + FNewDockSheet.Free; + raise; + end; + IsVisible := DockCtl.Visible; + FNewDockSheet.TabVisible := IsVisible; + if IsVisible then ActivePage := FNewDockSheet; + DockCtl.Align := alClient; + finally + FNewDockSheet := nil; + end; +end; + +procedure TPageControl.CMDockNotification(var Message: TCMDockNotification); +var + I: Integer; + S: string; + Page: TTabSheet; +begin + Page := GetPageFromDockClient(Message.Client); + if Page <> nil then + case Message.NotifyRec.ClientMsg of + WM_SETTEXT: + begin + S := PChar(Message.NotifyRec.MsgLParam); + { Search for first CR/LF and end string there } + for I := 1 to Length(S) do + if S[I] in [#13, #10] then + begin + SetLength(S, I - 1); + Break; + end; + Page.Caption := S; + end; + CM_VISIBLECHANGED: + with Page do + begin + Visible := Boolean(Message.NotifyRec.MsgWParam); + TabVisible := Boolean(Message.NotifyRec.MsgWParam);; + end; + end; + inherited; +end; + +procedure TPageControl.CMUnDockClient(var Message: TCMUnDockClient); +var + Page: TTabSheet; +begin + Message.Result := 0; + Page := GetPageFromDockClient(Message.Client); + if Page <> nil then + begin + FUndockingPage := Page; + Message.Client.Align := alNone; + end; +end; + +function TPageControl.GetDockClientFromMousePos(MousePos: TPoint): TControl; +var + HitIndex: Integer; + HitTestInfo: TTCHitTestInfo; + Page: TTabSheet; +begin + Result := nil; + if DockSite then + begin + HitTestInfo.pt := MousePos; + HitIndex := SendMessage(Handle, TCM_HITTEST, 0, Longint(@HitTestInfo)); + if HitIndex >= 0 then + begin + Page := Pages[HitIndex]; + if not Page.TabVisible then Page := FindNextPage(Page, True, True); + if (Page <> nil) and (Page.ControlCount > 0) then + begin + Result := Page.Controls[0]; + if Result.HostDockSite <> Self then Result := nil; + end; + end; + end; +end; + +procedure TPageControl.WMLButtonDown(var Message: TWMLButtonDown); +var + DockCtl: TControl; +begin + inherited; + DockCtl := GetDockClientFromMousePos(SmallPointToPoint(Message.Pos)); + if DockCtl <> nil then DockCtl.BeginDrag(False); +end; + +procedure TPageControl.WMLButtonDblClk(var Message: TWMLButtonDblClk); +var + DockCtl: TControl; +begin + inherited; + DockCtl := GetDockClientFromMousePos(SmallPointToPoint(Message.Pos)); + if DockCtl <> nil then DockCtl.ManualDock(nil, nil, alNone); +end; + +*/ + + diff --git a/apps/X11/VCL/TPageControl.h b/apps/X11/VCL/TPageControl.h new file mode 100644 index 0000000..447efec --- /dev/null +++ b/apps/X11/VCL/TPageControl.h @@ -0,0 +1,113 @@ + +#ifndef TPAGECONTROL_H +#define TPAGECONTROL_H + +#include <TCustomTabControl.h> + +class TPageControl : public TCustomTabControl { +private: +/* + FPages: TList; + FActivePage: TTabSheet; + FNewDockSheet: TTabSheet; + FUndockingPage: TTabSheet; + procedure ChangeActivePage(Page: TTabSheet); + procedure DeleteTab(Page: TTabSheet; Index: Integer); + function GetDockClientFromMousePos(MousePos: TPoint): TControl; + function GetPage(Index: Integer): TTabSheet; + function GetPageCount: Integer; + procedure InsertPage(Page: TTabSheet); + procedure InsertTab(Page: TTabSheet); + procedure MoveTab(CurIndex, NewIndex: Integer); + procedure RemovePage(Page: TTabSheet); + procedure SetActivePage(Page: TTabSheet); + procedure UpdateTab(Page: TTabSheet); + procedure UpdateActivePage; + procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; + procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY; + procedure CMDockClient(var Message: TCMDockClient); message CM_DOCKCLIENT; + procedure CMDockNotification(var Message: TCMDockNotification); message CM_DOCKNOTIFICATION; + procedure CMUnDockClient(var Message: TCMUnDockClient); message CM_UNDOCKCLIENT; + procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; + procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK; +*/ +protected: +/* + function CanShowTab(TabIndex: Integer): Boolean; override; + procedure Change; override; + procedure DoAddDockClient(Client: TControl; const ARect: TRect); override; + procedure DockOver(Source: TDragDockObject; X, Y: Integer; + State: TDragState; var Accept: Boolean); override; + procedure DoRemoveDockClient(Client: TControl); override; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; + function GetImageIndex(TabIndex: Integer): Integer; override; + function GetPageFromDockClient(Client: TControl): TTabSheet; + procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; + MousePos: TPoint; var CanDock: Boolean); override; + procedure SetChildOrder(Child: TComponent; Order: Integer); override; + procedure ShowControl(AControl: TControl); override; +*/ +public: + TPageControl(TComponent *AOwner); + virtual ~TPageControl(); +/* + function FindNextPage(CurPage: TTabSheet; + GoForward, CheckTabVisible: Boolean): TTabSheet; + procedure SelectNextPage(GoForward: Boolean); + property PageCount: Integer read GetPageCount; + property Pages[Index: Integer]: TTabSheet read GetPage; + published + property ActivePage: TTabSheet read FActivePage write SetActivePage; + property Align; + property Anchors; + property BiDiMode; + property Constraints; + property DockSite; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Font; + property HotTrack; + property Images; + property MultiLine; + property OwnerDraw; + property ParentBiDiMode; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property RaggedRight; + property ScrollOpposite; + property ShowHint; + property Style; + property TabHeight; + property TabOrder; + property TabPosition; + property TabStop; + property TabWidth; + property Visible; + property OnChange; + property OnChanging; + property OnDockDrop; + property OnDockOver; + property OnDragDrop; + property OnDragOver; + property OnDrawTab; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnGetImageIndex; + property OnGetSiteInfo; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnResize; + property OnStartDock; + property OnStartDrag; + property OnUnDock; + end; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TPersistent.cpp b/apps/X11/VCL/TPersistent.cpp new file mode 100644 index 0000000..8303b01 --- /dev/null +++ b/apps/X11/VCL/TPersistent.cpp @@ -0,0 +1,2 @@ +#include <TPersistent.h> + diff --git a/apps/X11/VCL/TPersistent.h b/apps/X11/VCL/TPersistent.h new file mode 100644 index 0000000..7453921 --- /dev/null +++ b/apps/X11/VCL/TPersistent.h @@ -0,0 +1,19 @@ +#ifndef TPERSISTENT_H +#define TPERSISTENT_H + +#include <TObject.h> + +class TPersistent : public TObject { +private: +// void AssignError(TPersistent Source); +protected: +// virtual void AssignTo(TPersistent Dest); +// virtual void DefineProperties(TFiler Filer); +// TPersistent GetOwner(); // dynamic; +public: +// virtual ~TPersistent(); //override; +// virtual void Assign(Source: TPersistent); +// string GetNamePath(); //dynamic; +}; + +#endif diff --git a/apps/X11/VCL/TTreeNode.cpp b/apps/X11/VCL/TTreeNode.cpp new file mode 100644 index 0000000..e50778b --- /dev/null +++ b/apps/X11/VCL/TTreeNode.cpp @@ -0,0 +1,1003 @@ +#include <TTreeNode.h> +#include <TTreeNodes.h> +#include <gtk/gtklabel.h> +#include <gtk/gtkhbox.h> +#include <stdio.h> + + +TTreeNode::TTreeNode(TTreeNodes *AOwner) : + Text(this, &TTreeNode::getText, &TTreeNode::SetText), + StateIndex(this, &TTreeNode::getStateIndex, &TTreeNode::SetStateIndex), + ImageIndex(this, &TTreeNode::getImageIndex, &TTreeNode::SetImageIndex), + Data(this, &TTreeNode::getData, &TTreeNode::SetData), + Parent(this, &TTreeNode::GetParent, 0) { + FOwner = AOwner; + FStateIndex = 0; + FImageIndex = 0; +} + + +TTreeNode::TTreeNode(const TTreeNode &other) : + Text(this, &TTreeNode::getText, &TTreeNode::SetText), + StateIndex(this, &TTreeNode::getStateIndex, &TTreeNode::SetStateIndex), + ImageIndex(this, &TTreeNode::getImageIndex, &TTreeNode::SetImageIndex), + Data(this, &TTreeNode::getData, &TTreeNode::SetData), + Parent(this, &TTreeNode::GetParent, 0) { + FOwner = other.FOwner; + subTreeOwner = other.subTreeOwner; + nativeControl = other.nativeControl; + FData = other.FData; + Text = other.Text; + FStateIndex = other.FStateIndex; + FImageIndex = other.FImageIndex; +} + +TTreeNode::TTreeNode(TTreeNodes *AOwner, GtkTree *AsubTreeOwner, GtkTreeItem *AnativeControl, string AText, void *Ptr) : + Text(this, &TTreeNode::getText, &TTreeNode::SetText), + StateIndex(this, &TTreeNode::getStateIndex, &TTreeNode::SetStateIndex), + ImageIndex(this, &TTreeNode::getImageIndex, &TTreeNode::SetImageIndex), + Data(this, &TTreeNode::getData, &TTreeNode::SetData), + Parent(this, &TTreeNode::GetParent, 0) { + FOwner = AOwner; + subTreeOwner = AsubTreeOwner; + nativeControl = AnativeControl; + FData = Ptr; + Text = AText; + FStateIndex = 0; + FImageIndex = 0; +} + + +TTreeNode::~TTreeNode() { +} + + +/* +function TTreeNode.GetLastChild: TTreeNode; +var + Node: TTreeNode; +begin + Result := GetFirstChild; + if Result <> nil then + begin + Node := Result; + repeat + Result := Node; + Node := Result.GetNextSibling; + until Node = nil; + end; +end; +*/ + +/* +function TTreeNode.GetFirstChild: TTreeNode; +begin + with FOwner do + Result := GetNode(TreeView_GetChild(Handle, ItemId)); +end; +*/ +TTreeNode *TTreeNode::getFirstChild() { + GtkWidget *subtree = nativeControl->subtree; + if (subtree) { + GList *child = g_list_first(GTK_TREE(subtree)->children); + return (child) ? FOwner->GetNode(GTK_TREE_ITEM(child->data)) : 0; + } + return 0; +} + + +/* +function TTreeNode.GetNextSibling: TTreeNode; +begin + with FOwner do + Result := GetNode(TreeView_GetNextSibling(Handle, ItemId)); +end; +*/ +TTreeNode *TTreeNode::getNextSibling() { + GList *node = g_list_find(GTK_TREE(subTreeOwner)->children, nativeControl); + if (node) { + node = g_list_next(node); + return (node) ? FOwner->GetNode(GTK_TREE_ITEM(node->data)) : 0; + } + return 0; +} + + +/* +procedure TTreeNode.SetText(const S: string); +var + Item: TTVItem; +begin + FText := S; + with Item do + begin + mask := TVIF_TEXT; + hItem := ItemId; + pszText := LPSTR_TEXTCALLBACK; + end; + TreeView_SetItem(Handle, Item); + if (TreeView.SortType in [stText, stBoth]) and FInTree then + begin + if (Parent <> nil) then Parent.AlphaSort + else TreeView.AlphaSort; + end; +end; +*/ + + +void TTreeNode::SetText(string S) { + FText = S; + GtkLabel *label; + GtkObject *hbox; + + //It's a Bin, so it has one child, which we know to be a + // hbox, so get that + hbox = GTK_OBJECT(GTK_BIN(nativeControl)->child); + label = GTK_LABEL(gtk_object_get_data(hbox, "label1")); + gtk_label_set(label, FText.c_str()); +} + + +/* +function TTreeNode.GetParent: TTreeNode; +begin + with FOwner do + Result := GetNode(TreeView_GetParent(Handle, ItemId)); +end; +*/ + +TTreeNode *TTreeNode::GetParent() { + return FOwner->GetParentNode(this); +} + + +/* +procedure TTreeNode.SetStateIndex(Value: Integer); +var + Item: TTVItem; +begin + FStateIndex := Value; + if Value >= 0 then Dec(Value); + with Item do + begin + mask := TVIF_STATE or TVIF_HANDLE; + stateMask := TVIS_STATEIMAGEMASK; + hItem := ItemId; + state := IndexToStateImageMask(Value + 1); + end; + TreeView_SetItem(Handle, Item); +end; +*/ + +void TTreeNode::SetStateIndex(int val) { + GtkPixmap *itempixmap = 0, *stateImage; + GdkPixmap *pixmap; + GdkBitmap *mask; + FStateIndex = val; + TCustomImageList *images; + GtkObject *hbox; + // display appropriate image + + hbox = GTK_OBJECT(GTK_BIN(nativeControl)->child); + itempixmap = GTK_PIXMAP(gtk_object_get_data(hbox, "pixmap1")); + + gtk_widget_hide(GTK_WIDGET(itempixmap)); + + images = FOwner->FOwner->StateImages; + + if (images) { + stateImage = images->GetPixmap(val); + if (stateImage) { + gtk_pixmap_get(stateImage, &pixmap, &mask); + gtk_pixmap_set(itempixmap, pixmap, mask); + gtk_widget_show(GTK_WIDGET(itempixmap)); + } + + } +} + + +/* +procedure TTreeNode.SetImageIndex(Value: Integer); +var + Item: TTVItem; +begin + FImageIndex := Value; + with Item do + begin + mask := TVIF_IMAGE or TVIF_HANDLE; + hItem := ItemId; + iImage := I_IMAGECALLBACK; + end; + TreeView_SetItem(Handle, Item); +end; +*/ + +void TTreeNode::SetImageIndex(int val) { + GtkPixmap *itempixmap, *Image; + GdkPixmap *pixmap; + GdkBitmap *mask; + FImageIndex = val; + TCustomImageList *images; + GtkObject *hbox; + // display appropriate image + + hbox = GTK_OBJECT(GTK_BIN(nativeControl)->child); + itempixmap = GTK_PIXMAP(gtk_object_get_data(hbox, "pixmap2")); + + gtk_widget_hide(GTK_WIDGET(itempixmap)); + + images = FOwner->FOwner->Images; + + if (images) { + Image = images->GetPixmap(val); + if (Image) { + gtk_pixmap_get(Image, &pixmap, &mask); + gtk_pixmap_set(itempixmap, pixmap, mask); + gtk_widget_show(GTK_WIDGET(itempixmap)); + } + } +} + + +/* +procedure TTreeNode.SetData(Value: Pointer); +begin + FData := Value; + if (TreeView.SortType in [stData, stBoth]) and Assigned(TreeView.OnCompare) + and (not Deleting) and FInTree then + begin + if Parent <> nil then Parent.AlphaSort + else TreeView.AlphaSort; + end; +end; +*/ + +void TTreeNode::SetData(void *Value) { + FData = Value; +} + + +/* +function TTreeNode.GetNext: TTreeNode; +var + NodeID, ParentID: HTreeItem; + Handle: HWND; +begin + Handle := FOwner.Handle; + NodeID := TreeView_GetChild(Handle, ItemId); + if NodeID = nil then NodeID := TreeView_GetNextSibling(Handle, ItemId); + ParentID := ItemId; + while (NodeID = nil) and (ParentID <> nil) do + begin + ParentID := TreeView_GetParent(Handle, ParentID); + NodeID := TreeView_GetNextSibling(Handle, ParentID); + end; + Result := FOwner.GetNode(NodeID); +end; +*/ + +TTreeNode *TTreeNode::GetNext() { + TTreeNode *parent = this; + TTreeNode *next = getFirstChild(); + if (!next) { + next = getNextSibling(); + while ((!next) && (parent)) { + parent = parent->GetParent(); + if (parent) + next = parent->getNextSibling(); + } + } + + return next; +} + + +/* +procedure TTreeNode.ExpandItem(Expand: Boolean; Recurse: Boolean); +var + Flag: Integer; + Node: TTreeNode; +begin + if Recurse then + begin + Node := Self; + repeat + Node.ExpandItem(Expand, False); + Node := Node.GetNext; + until (Node = nil) or (not Node.HasAsParent(Self)); + end + else begin + TreeView.FManualNotify := True; + try + Flag := 0; + if Expand then + begin + if DoCanExpand(True) then + begin + Flag := TVE_EXPAND; + DoExpand(True); + end; + end + else begin + if DoCanExpand(False) then + begin + Flag := TVE_COLLAPSE; + DoExpand(False); + end; + end; + if Flag <> 0 then TreeView_Expand(Handle, ItemId, Flag); + finally + TreeView.FManualNotify := False; + end; + end; +end; +*/ + +void TTreeNode::ExpandItem(bool Expand, bool Recurse) { + TTreeNode *Node; + + if (Recurse) { + Node = this; + do { + Node->ExpandItem(Expand, false); + Node = Node->GetNext(); + } + while ((Node) /*and (Node.HasAsParent(Self)*/); + } + else { + gtk_tree_item_expand(nativeControl); + +/* + TreeView.FManualNotify := True; + try + Flag := 0; + if Expand then + begin + if DoCanExpand(True) then + begin + Flag := TVE_EXPAND; + DoExpand(True); + end; + end + else begin + if DoCanExpand(False) then + begin + Flag := TVE_COLLAPSE; + DoExpand(False); + end; + end; + if Flag <> 0 then TreeView_Expand(Handle, ItemId, Flag); + finally + TreeView.FManualNotify := False; + end; +*/ + } +} + +/* +procedure TTreeNode.Expand(Recurse: Boolean); +begin + ExpandItem(True, Recurse); +end; +*/ + +void TTreeNode::Expand(bool Recurse) { + ExpandItem(true, Recurse); +} + +/* + +function DefaultTreeViewSort(Node1, Node2: TTreeNode; lParam: Integer): Integer; stdcall; +begin + with Node1 do + if Assigned(TreeView.OnCompare) then + TreeView.OnCompare(TreeView, Node1, Node2, lParam, Result) + else Result := lstrcmp(PChar(Node1.Text), PChar(Node2.Text)); +end; + +procedure TreeViewError(const Msg: string); +begin + raise ETreeViewError.Create(Msg); +end; + +procedure TreeViewErrorFmt(const Msg: string; Format: array of const); +begin + raise ETreeViewError.CreateFmt(Msg, Format); +end; + +constructor TTreeNode.Create(AOwner: TTreeNodes); +begin + inherited Create; + FOverlayIndex := -1; + FStateIndex := -1; + FOwner := AOwner; +end; + +destructor TTreeNode.Destroy; +var + Node: TTreeNode; + CheckValue: Integer; +begin + Owner.ClearCache; + FDeleting := True; + if Owner.Owner.FLastDropTarget = Self then + Owner.Owner.FLastDropTarget := nil; + Node := Parent; + if (Node <> nil) and (not Node.Deleting) then + begin + if Node.IndexOf(Self) <> -1 then CheckValue := 1 + else CheckValue := 0; + if Node.CompareCount(CheckValue) then + begin + Expanded := False; + Node.HasChildren := False; + end; + end; + if ItemId <> nil then TreeView_DeleteItem(Handle, ItemId); + Data := nil; + inherited Destroy; +end; + +function TTreeNode.GetHandle: HWND; +begin + Result := TreeView.Handle; +end; + +function TTreeNode.GetTreeView: TCustomTreeView; +begin + Result := Owner.Owner; +end; + +function TTreeNode.HasAsParent(Value: TTreeNode): Boolean; +begin + if Value <> Nil then + begin + if Parent = nil then Result := False + else if Parent = Value then Result := True + else Result := Parent.HasAsParent(Value); + end + else Result := True; +end; + +function TTreeNode.GetState(NodeState: TNodeState): Boolean; +var + Item: TTVItem; +begin + Result := False; + with Item do + begin + mask := TVIF_STATE; + hItem := ItemId; + if TreeView_GetItem(Handle, Item) then + case NodeState of + nsCut: Result := (state and TVIS_CUT) <> 0; + nsFocused: Result := (state and TVIS_FOCUSED) <> 0; + nsSelected: Result := (state and TVIS_SELECTED) <> 0; + nsExpanded: Result := (state and TVIS_EXPANDED) <> 0; + nsDropHilited: Result := (state and TVIS_DROPHILITED) <> 0; + end; + end; +end; + +procedure TTreeNode.SetSelectedIndex(Value: Integer); +var + Item: TTVItem; +begin + FSelectedIndex := Value; + with Item do + begin + mask := TVIF_SELECTEDIMAGE or TVIF_HANDLE; + hItem := ItemId; + iSelectedImage := I_IMAGECALLBACK; + end; + TreeView_SetItem(Handle, Item); +end; + +procedure TTreeNode.SetOverlayIndex(Value: Integer); +var + Item: TTVItem; +begin + FOverlayIndex := Value; + with Item do + begin + mask := TVIF_STATE or TVIF_HANDLE; + stateMask := TVIS_OVERLAYMASK; + hItem := ItemId; + state := IndexToOverlayMask(OverlayIndex + 1); + end; + TreeView_SetItem(Handle, Item); +end; + +function TTreeNode.CompareCount(CompareMe: Integer): Boolean; +var + Count: integer; + Node: TTreeNode; +Begin + Count := 0; + Result := False; + Node := GetFirstChild; + while Node <> nil do + begin + Inc(Count); + Node := Node.GetNextChild(Node); + if Count > CompareMe then Exit; + end; + if Count = CompareMe then Result := True; +end; + +function TTreeNode.DoCanExpand(Expand: Boolean): Boolean; +begin + Result := False; + if HasChildren then + begin + if Expand then Result := TreeView.CanExpand(Self) + else Result := TreeView.CanCollapse(Self); + end; +end; + +procedure TTreeNode.DoExpand(Expand: Boolean); +begin + if HasChildren then + begin + if Expand then TreeView.Expand(Self) + else TreeView.Collapse(Self); + end; +end; + +procedure TTreeNode.Collapse(Recurse: Boolean); +begin + ExpandItem(False, Recurse); +end; + +function TTreeNode.GetExpanded: Boolean; +begin + Result := GetState(nsExpanded); +end; + +procedure TTreeNode.SetExpanded(Value: Boolean); +begin + if Value then Expand(False) + else Collapse(False); +end; + +function TTreeNode.GetSelected: Boolean; +begin + Result := GetState(nsSelected); +end; + +procedure TTreeNode.SetSelected(Value: Boolean); +begin + if Value then TreeView_SelectItem(Handle, ItemId) + else if Selected then TreeView_SelectItem(Handle, nil); +end; + +function TTreeNode.GetCut: Boolean; +begin + Result := GetState(nsCut); +end; + +procedure TTreeNode.SetCut(Value: Boolean); +var + Item: TTVItem; + Template: DWORD; +begin + if Value then Template := DWORD(-1) + else Template := 0; + with Item do + begin + mask := TVIF_STATE; + hItem := ItemId; + stateMask := TVIS_CUT; + state := stateMask and Template; + end; + TreeView_SetItem(Handle, Item); +end; + +function TTreeNode.GetDropTarget: Boolean; +begin + Result := GetState(nsDropHilited); +end; + +procedure TTreeNode.SetDropTarget(Value: Boolean); +begin + if Value then TreeView_SelectDropTarget(Handle, ItemId) + else if DropTarget then TreeView_SelectDropTarget(Handle, nil); +end; + +function TTreeNode.GetChildren: Boolean; +var + Item: TTVItem; +begin + Item.mask := TVIF_CHILDREN; + Item.hItem := ItemId; + if TreeView_GetItem(Handle, Item) then Result := Item.cChildren > 0 + else Result := False; +end; + +procedure TTreeNode.SetFocused(Value: Boolean); +var + Item: TTVItem; + Template: DWORD; +begin + if Value then Template := DWORD(-1) + else Template := 0; + with Item do + begin + mask := TVIF_STATE; + hItem := ItemId; + stateMask := TVIS_FOCUSED; + state := stateMask and Template; + end; + TreeView_SetItem(Handle, Item); +end; + +function TTreeNode.GetFocused: Boolean; +begin + Result := GetState(nsFocused); +end; + +procedure TTreeNode.SetChildren(Value: Boolean); +var + Item: TTVItem; +begin + with Item do + begin + mask := TVIF_CHILDREN; + hItem := ItemId; + cChildren := Ord(Value); + end; + TreeView_SetItem(Handle, Item); +end; + +function TTreeNode.GetPrevSibling: TTreeNode; +begin + with FOwner do + Result := GetNode(TreeView_GetPrevSibling(Handle, ItemId)); +end; + +function TTreeNode.GetNextVisible: TTreeNode; +begin + if IsVisible then + with FOwner do + Result := GetNode(TreeView_GetNextVisible(Handle, ItemId)) + else Result := nil; +end; + +function TTreeNode.GetPrevVisible: TTreeNode; +begin + with FOwner do + Result := GetNode(TreeView_GetPrevVisible(Handle, ItemId)); +end; + +function TTreeNode.GetNextChild(Value: TTreeNode): TTreeNode; +begin + if Value <> nil then Result := Value.GetNextSibling + else Result := nil; +end; + +function TTreeNode.GetPrevChild(Value: TTreeNode): TTreeNode; +begin + if Value <> nil then Result := Value.GetPrevSibling + else Result := nil; +end; + + +function TTreeNode.GetPrev: TTreeNode; +var + Node: TTreeNode; +begin + Result := GetPrevSibling; + if Result <> nil then + begin + Node := Result; + repeat + Result := Node; + Node := Result.GetLastChild; + until Node = nil; + end else + Result := Parent; +end; + +function TTreeNode.GetAbsoluteIndex: Integer; +var + Node: TTreeNode; +begin + if Owner.FNodeCache.CacheNode = Self then + Result := Owner.FNodeCache.CacheIndex + else begin + Result := -1; + Node := Self; + while Node <> nil do + begin + Inc(Result); + Node := Node.GetPrev; + end; + end; +end; + +function TTreeNode.GetIndex: Integer; +var + Node: TTreeNode; +begin + Result := -1; + Node := Self; + while Node <> nil do + begin + Inc(Result); + Node := Node.GetPrevSibling; + end; +end; + +function TTreeNode.GetItem(Index: Integer): TTreeNode; +begin + Result := GetFirstChild; + while (Result <> nil) and (Index > 0) do + begin + Result := GetNextChild(Result); + Dec(Index); + end; + if Result = nil then TreeViewError(SListIndexError); +end; + +procedure TTreeNode.SetItem(Index: Integer; Value: TTreeNode); +begin + item[Index].Assign(Value); +end; + +function TTreeNode.IndexOf(Value: TTreeNode): Integer; +var + Node: TTreeNode; +begin + Result := -1; + Node := GetFirstChild; + while (Node <> nil) do + begin + Inc(Result); + if Node = Value then Break; + Node := GetNextChild(Node); + end; + if Node = nil then Result := -1; +end; + +function TTreeNode.GetCount: Integer; +var + Node: TTreeNode; +begin + Result := 0; + Node := GetFirstChild; + while Node <> nil do + begin + Inc(Result); + Node := Node.GetNextChild(Node); + end; +end; + +procedure TTreeNode.EndEdit(Cancel: Boolean); +begin + TreeView_EndEditLabelNow(Handle, Cancel); +end; + +procedure TTreeNode.InternalMove(ParentNode, Node: TTreeNode; + HItem: HTreeItem; AddMode: TAddMode); +var + I: Integer; + NodeId: HTreeItem; + TreeViewItem: TTVItem; + Children: Boolean; + IsSelected: Boolean; +begin + Owner.ClearCache; + if (AddMode = taInsert) and (Node <> nil) then + NodeId := Node.ItemId else + NodeId := nil; + Children := HasChildren; + IsSelected := Selected; + if (Parent <> nil) and (Parent.CompareCount(1)) then + begin + Parent.Expanded := False; + Parent.HasChildren := False; + end; + with TreeViewItem do + begin + mask := TVIF_PARAM; + hItem := ItemId; + lParam := 0; + end; + TreeView_SetItem(Handle, TreeViewItem); + with Owner do + HItem := AddItem(HItem, NodeId, CreateItem(Self), AddMode); + if HItem = nil then + raise EOutOfResources.Create(sInsertError); + for I := Count - 1 downto 0 do + Item[I].InternalMove(Self, nil, HItem, taAddFirst); + TreeView_DeleteItem(Handle, ItemId); + FItemId := HItem; + Assign(Self); + HasChildren := Children; + Selected := IsSelected; +end; + +procedure TTreeNode.MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode); +var + AddMode: TAddMode; + Node: TTreeNode; + HItem: HTreeItem; + OldOnChanging: TTVChangingEvent; + OldOnChange: TTVChangedEvent; +begin + OldOnChanging := TreeView.OnChanging; + OldOnChange := TreeView.OnChange; + TreeView.OnChanging := nil; + TreeView.OnChange := nil; + try + if (Destination = nil) or not Destination.HasAsParent(Self) then + begin + AddMode := taAdd; + if (Destination <> nil) and not (Mode in [naAddChild, naAddChildFirst]) then + Node := Destination.Parent else + Node := Destination; + case Mode of + naAdd, + naAddChild: AddMode := taAdd; + naAddFirst, + naAddChildFirst: AddMode := taAddFirst; + naInsert: + begin + Destination := Destination.GetPrevSibling; + if Destination = nil then AddMode := taAddFirst + else AddMode := taInsert; + end; + end; + if Node <> nil then + HItem := Node.ItemId else + HItem := nil; + if (Destination <> Self) then + InternalMove(Node, Destination, HItem, AddMode); + Node := Parent; + if Node <> nil then + begin + Node.HasChildren := True; + Node.Expanded := True; + end; + end; + finally + TreeView.OnChanging := OldOnChanging; + TreeView.OnChange := OldOnChange; + end; +end; + +procedure TTreeNode.MakeVisible; +begin + TreeView_EnsureVisible(Handle, ItemId); +end; + +function TTreeNode.GetLevel: Integer; +var + Node: TTreeNode; +begin + Result := 0; + Node := Parent; + while Node <> nil do + begin + Inc(Result); + Node := Node.Parent; + end; +end; + +function TTreeNode.IsNodeVisible: Boolean; +var + Rect: TRect; +begin + Result := TreeView_GetItemRect(Handle, ItemId, Rect, True); +end; + +function TTreeNode.EditText: Boolean; +begin + Result := TreeView_EditLabel(Handle, ItemId) <> 0; +end; + +function TTreeNode.DisplayRect(TextOnly: Boolean): TRect; +begin + FillChar(Result, SizeOf(Result), 0); + TreeView_GetItemRect(Handle, ItemId, Result, TextOnly); +end; + +function TTreeNode.AlphaSort: Boolean; +begin + Result := CustomSort(nil, 0); +end; + +function TTreeNode.CustomSort(SortProc: TTVCompare; Data: Longint): Boolean; +var + SortCB: TTVSortCB; +begin + Owner.ClearCache; + with SortCB do + begin + if not Assigned(SortProc) then lpfnCompare := @DefaultTreeViewSort + else lpfnCompare := SortProc; + hParent := ItemId; + lParam := Data; + end; + Result := TreeView_SortChildrenCB(Handle, SortCB, 0); +end; + +procedure TTreeNode.Delete; +begin + if not Deleting then Free; +end; + +procedure TTreeNode.DeleteChildren; +begin + Owner.ClearCache; + TreeView_Expand(TreeView.Handle, ItemID, TVE_COLLAPSE or TVE_COLLAPSERESET); + HasChildren := False; +end; + +procedure TTreeNode.Assign(Source: TPersistent); +var + Node: TTreeNode; +begin + Owner.ClearCache; + if Source is TTreeNode then + begin + Node := TTreeNode(Source); + Text := Node.Text; + Data := Node.Data; + ImageIndex := Node.ImageIndex; + SelectedIndex := Node.SelectedIndex; + StateIndex := Node.StateIndex; + OverlayIndex := Node.OverlayIndex; + Focused := Node.Focused; + DropTarget := Node.DropTarget; + Cut := Node.Cut; + HasChildren := Node.HasChildren; + end + else inherited Assign(Source); +end; + +function TTreeNode.IsEqual(Node: TTreeNode): Boolean; +begin + Result := (Text = Node.Text) and (Data = Node.Data); +end; + +procedure TTreeNode.ReadData(Stream: TStream; Info: PNodeInfo); +var + I, Size, ItemCount: Integer; +begin + Owner.ClearCache; + Stream.ReadBuffer(Size, SizeOf(Size)); + Stream.ReadBuffer(Info^, Size); + Text := Info^.Text; + ImageIndex := Info^.ImageIndex; + SelectedIndex := Info^.SelectedIndex; + StateIndex := Info^.StateIndex; + OverlayIndex := Info^.OverlayIndex; + Data := Info^.Data; + ItemCount := Info^.Count; + for I := 0 to ItemCount - 1 do + Owner.AddChild(Self, '').ReadData(Stream, Info); +end; + +procedure TTreeNode.WriteData(Stream: TStream; Info: PNodeInfo); +var + I, Size, L, ItemCount: Integer; +begin + L := Length(Text); + if L > 255 then L := 255; + Size := SizeOf(TNodeInfo) + L - 255; + Info^.Text := Text; + Info^.ImageIndex := ImageIndex; + Info^.SelectedIndex := SelectedIndex; + Info^.OverlayIndex := OverlayIndex; + Info^.StateIndex := StateIndex; + Info^.Data := Data; + ItemCount := Count; + Info^.Count := ItemCount; + Stream.WriteBuffer(Size, SizeOf(Size)); + Stream.WriteBuffer(Info^, Size); + for I := 0 to ItemCount - 1 do Item[I].WriteData(Stream, Info); +end; + +*/ diff --git a/apps/X11/VCL/TTreeNode.h b/apps/X11/VCL/TTreeNode.h new file mode 100644 index 0000000..6d9647e --- /dev/null +++ b/apps/X11/VCL/TTreeNode.h @@ -0,0 +1,163 @@ +#ifndef TTREENODE_H +#define TTREENODE_H + +#include <TPersistent.h> +#include <gtk/gtktreeitem.h> +#include <gtk/gtktree.h> +#include <gtk/gtkpixmap.h> +#include <string> + + class TTreeNodes; + + enum TNodeState {nsCut, nsDropHilited, nsFocused, nsSelected, nsExpanded}; + enum TNodeAttachMode {naAdd, naAddFirst, naAddChild, naAddChildFirst, naInsert}; + enum TAddMode {taAddFirst, taAdd, taInsert}; + + typedef struct { + int ImageIndex; + int SelectedIndex; + int StateIndex; + int OverlayIndex; + void *Data; + int Count; + char Text[255]; + } TNodeInfo; + + +class TTreeNode: public TPersistent { +friend class TTreeNodes; +private: + TTreeNodes *FOwner; + GtkTree *subTreeOwner; + GtkPixmap *image; + GtkPixmap *stateImage; + string FText; + void *FData; +// FStateIndex: Integer; + int FStateIndex; +// FImageIndex: Integer; + int FImageIndex; +/* + FItemId: HTreeItem; + FSelectedIndex: Integer; + FOverlayIndex: Integer; + FDeleting: Boolean; + FInTree: Boolean; + function CompareCount(CompareMe: Integer): Boolean; + function DoCanExpand(Expand: Boolean): Boolean; + procedure DoExpand(Expand: Boolean); + function GetAbsoluteIndex: Integer; + function GetExpanded: Boolean; + function GetLevel: Integer; + function GetChildren: Boolean; + function GetCut: Boolean; + function GetDropTarget: Boolean; + function GetFocused: Boolean; + function GetIndex: Integer; + function GetItem(Index: Integer): TTreeNode; + function GetSelected: Boolean; + function GetState(NodeState: TNodeState): Boolean; + function GetCount: Integer; + function GetTreeView: TCustomTreeView; + procedure InternalMove(ParentNode, Node: TTreeNode; HItem: HTreeItem; + AddMode: TAddMode); + function IsEqual(Node: TTreeNode): Boolean; + function IsNodeVisible: Boolean; + procedure ReadData(Stream: TStream; Info: PNodeInfo); + procedure SetChildren(Value: Boolean); + procedure SetCut(Value: Boolean); + procedure SetDropTarget(Value: Boolean); + procedure SetItem(Index: Integer; Value: TTreeNode); + procedure SetExpanded(Value: Boolean); + procedure SetFocused(Value: Boolean); + procedure SetOverlayIndex(Value: Integer); + procedure SetSelectedIndex(Value: Integer); + procedure SetSelected(Value: Boolean); + procedure WriteData(Stream: TStream; Info: PNodeInfo); +*/ +// procedure ExpandItem(Expand: Boolean; Recurse: Boolean); + void ExpandItem(bool Expand, bool Recurse); +// procedure SetData(Value: Pointer); + void SetData(void *); + void *getData() { return FData; } +// procedure SetText(const S: string); + void SetText(string S); + string getText() { return FText; } +// function GetParent: TTreeNode; + TTreeNode *GetParent(); +// procedure SetStateIndex(Value: Integer); + void SetStateIndex(int val); + int getStateIndex() { return FStateIndex; } +// procedure SetImageIndex(Value: Integer); + void SetImageIndex(int val); + int getImageIndex() { return FImageIndex; } + public: + GtkTreeItem *nativeControl; + TTreeNode(TTreeNodes *AOwner); + TTreeNode(const TTreeNode &other); // copy constructor; + TTreeNode(TTreeNodes *AOwner, GtkTree *subTreeOwner, GtkTreeItem *nativeControl, string FText, void *Ptr = 0); + ~TTreeNode(); + TTreeNode *getNextSibling(); +// function getFirstChild: TTreeNode; + TTreeNode *getFirstChild(); +// function GetNext: TTreeNode; + TTreeNode *GetNext(); +// property Text: string read FText write SetText; + property <TTreeNode, string> Text; +// property StateIndex: Integer read FStateIndex write SetStateIndex; + property <TTreeNode, int> StateIndex; +// property ImageIndex: Integer read FImageIndex write SetImageIndex; + property <TTreeNode, int> ImageIndex; +// property Data: Pointer read FData write SetData; + property <TTreeNode, void *> Data; +// property Parent: TTreeNode read GetParent; + property <TTreeNode, TTreeNode *> Parent; + +// procedure Expand(Recurse: Boolean); + void Expand(bool Recurse); +// procedure MakeVisible; + void MakeVisible(); +/* + function AlphaSort: Boolean; + procedure Assign(Source: TPersistent); override; + procedure Collapse(Recurse: Boolean); + function CustomSort(SortProc: TTVCompare; Data: Longint): Boolean; + procedure Delete; + procedure DeleteChildren; + function DisplayRect(TextOnly: Boolean): TRect; + function EditText: Boolean; + procedure EndEdit(Cancel: Boolean); + function GetHandle: HWND; + function GetLastChild: TTreeNode; + function GetNextChild(Value: TTreeNode): TTreeNode; + function GetNextVisible: TTreeNode; + function GetPrev: TTreeNode; + function GetPrevChild(Value: TTreeNode): TTreeNode; + function getPrevSibling: TTreeNode; + function GetPrevVisible: TTreeNode; + function HasAsParent(Value: TTreeNode): Boolean; + function IndexOf(Value: TTreeNode): Integer; + procedure MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode); virtual; + property AbsoluteIndex: Integer read GetAbsoluteIndex; + property Count: Integer read GetCount; + property Cut: Boolean read GetCut write SetCut; + property Deleting: Boolean read FDeleting; + property Focused: Boolean read GetFocused write SetFocused; + property DropTarget: Boolean read GetDropTarget write SetDropTarget; + property Selected: Boolean read GetSelected write SetSelected; + property Expanded: Boolean read GetExpanded write SetExpanded; + property Handle: HWND read GetHandle; + property HasChildren: Boolean read GetChildren write SetChildren; + property Index: Integer read GetIndex; + property IsVisible: Boolean read IsNodeVisible; + property Item[Index: Integer]: TTreeNode read GetItem write SetItem; default; + property ItemId: HTreeItem read FItemId; + property Level: Integer read GetLevel; + property OverlayIndex: Integer read FOverlayIndex write SetOverlayIndex; + property Owner: TTreeNodes read FOwner; + property SelectedIndex: Integer read FSelectedIndex write SetSelectedIndex; + property TreeView: TCustomTreeView read GetTreeView; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TTreeNodes.cpp b/apps/X11/VCL/TTreeNodes.cpp new file mode 100644 index 0000000..77657e6 --- /dev/null +++ b/apps/X11/VCL/TTreeNodes.cpp @@ -0,0 +1,553 @@ +#include <TTreeNodes.h> + +#include <gtk/gtkhbox.h> +#include <gtk/gtklabel.h> +#include <stdio.h> + +TTreeNodes::TTreeNodes(TCustomTreeView *AOwner) { + FOwner = AOwner; +} + + +TTreeNodes::~TTreeNodes() { +} + + +/* +procedure TTreeNodes.Clear; +begin + ClearCache; + if Owner.HandleAllocated then + TreeView_DeleteAllItems(Handle); +end; + +*/ +void TTreeNodes::Clear() { + gtk_tree_remove_items(GTK_TREE(FOwner->nativeControl), GTK_TREE(FOwner->nativeControl)->children); + nodeCache.erase(nodeCache.begin(), nodeCache.end()); +} + + +/* +function TTreeNodes.GetFirstNode: TTreeNode; +begin + Result := GetNode(TreeView_GetRoot(Handle)); +end; +*/ + +TTreeNode *TTreeNodes::GetFirstNode() { + GList *first = g_list_first(GTK_TREE(FOwner->nativeControl)->children); + return (first) ? GetNode(GTK_TREE_ITEM(first->data)) : 0; +} + +/* +function TTreeNodes.GetNode(ItemId: HTreeItem): TTreeNode; +var + Item: TTVItem; +begin + with Item do + begin + hItem := ItemId; + mask := TVIF_PARAM; + end; + if TreeView_GetItem(Handle, Item) then Result := TTreeNode(Item.lParam) + else Result := nil; +end; +*/ + +TTreeNode *TTreeNodes::GetNode(GtkTreeItem *subElement) { + TTreeNodeMap::iterator node; + node = nodeCache.find(subElement); + if (node != nodeCache.end()) + return &(node->second); + else return 0; +} + + +GtkTreeItem *TTreeNodes::GetParentNode(GtkTreeItem *root, GtkTreeItem *subElement) { + GtkWidget *subtree = root->subtree; + if (subtree) { + for (GList *nodes = GTK_TREE(subtree)->children; nodes; nodes = g_list_next(nodes)) { + if (nodes->data == subElement) + return root; + GtkTreeItem *ret = GetParentNode(GTK_TREE_ITEM(nodes->data), subElement); + if (ret) + return ret; + } + } + return 0; +} + + +TTreeNode *TTreeNodes::GetParentNode(TTreeNode *target) { + for (GList *nodes = g_list_first(GTK_TREE(FOwner->nativeControl)->children); nodes; nodes = g_list_next(nodes)) { + if (nodes->data == target->nativeControl) + return 0; // top level; no parent + GtkTreeItem *ret = GetParentNode(GTK_TREE_ITEM(nodes->data), target->nativeControl); + if (ret) + return GetNode(ret); + } + return 0; +} + + +/* +function TTreeNodes.AddChildFirst(Node: TTreeNode; const S: string): TTreeNode; +begin + Result := AddChildObjectFirst(Node, S, nil); +end; +*/ + +GtkTree *TTreeNodes::getSubTree(TTreeNode *node) { + GtkWidget *subtree; + + if (!node) + subtree = FOwner->nativeControl; + else { + subtree = node->nativeControl->subtree; + if (!subtree) { + subtree = gtk_tree_new(); + gtk_tree_set_selection_mode (GTK_TREE(subtree), GTK_SELECTION_SINGLE); + gtk_tree_set_view_mode (GTK_TREE(subtree), GTK_TREE_VIEW_ITEM); + gtk_tree_item_set_subtree (node->nativeControl, subtree); + } + } + return GTK_TREE(subtree); +} + + +GtkTreeItem *TTreeNodes::createTreeItem(GtkWidget *parent, const char *label) { + GtkWidget *treeitem; + GtkWidget *hbox1; + GtkWidget *label1; + GdkPixmap *pixmap; + GdkBitmap *mask; + GtkWidget *pixmap1; + GtkWidget *pixmap2; + GtkStyle *style; + GdkWindow *window = 0; + + treeitem = gtk_tree_item_new (); + + hbox1 = gtk_hbox_new (FALSE, 0); + gtk_widget_show (hbox1); + gtk_container_add (GTK_CONTAINER (treeitem), hbox1); + + while ((!window) && (parent->parent)) { + window = gtk_widget_get_parent_window(GTK_WIDGET(parent)); + parent = parent->parent; + } + style = gtk_widget_get_style( GTK_WIDGET(parent) ); + pixmap = gdk_pixmap_create_from_xpm_d( window, &mask, + &style->bg[GTK_STATE_NORMAL], + (gchar **)default_xpm ); + + pixmap1 = gtk_pixmap_new( pixmap, mask ); + gtk_widget_hide (pixmap1); + gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, FALSE, TRUE, 0); + gtk_object_set_data (GTK_OBJECT (hbox1), "pixmap1", pixmap1); + pixmap2 = gtk_pixmap_new( pixmap, mask ); + gtk_widget_hide (pixmap2); + gtk_box_pack_start (GTK_BOX (hbox1), pixmap2, FALSE, TRUE, 0); + gtk_object_set_data (GTK_OBJECT (hbox1), "pixmap2", pixmap2); + + label1 = gtk_label_new (label); + gtk_widget_ref (label1); + gtk_object_set_data (GTK_OBJECT (hbox1), "label1", label1); + gtk_widget_show (label1); + gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 3); + + return GTK_TREE_ITEM(treeitem); +} + + +TTreeNode *TTreeNodes::AddChildFirst(TTreeNode *Node, const string S) { + GtkTree *subtree; + GtkTreeItem *item; + + subtree = getSubTree(Node); + item = createTreeItem(GTK_WIDGET(subtree), (const char *)S.c_str()); + gtk_tree_prepend(subtree, GTK_WIDGET(item)); + gtk_widget_show(GTK_WIDGET(item)); + nodeCache.insert(TTreeNodeMap::value_type(item, TTreeNode(this, subtree, item, S))); + return GetNode(item); +} +TTreeNode *TTreeNodes::AddChild(TTreeNode *Node, const string S) { + GtkTree *subtree; + GtkTreeItem *item; + + subtree = getSubTree(Node); + item = createTreeItem(GTK_WIDGET(subtree), (const char *)S.c_str()); + gtk_tree_append(subtree, GTK_WIDGET(item)); + gtk_widget_show(GTK_WIDGET(item)); + nodeCache.insert(TTreeNodeMap::value_type(item, TTreeNode(this, subtree, item, S))); + return GetNode(item); +} +TTreeNode *TTreeNodes::AddChildObject(TTreeNode *Node, const string S, void *Ptr) { + GtkTree *subtree; + GtkTreeItem *item; + + + subtree = getSubTree(Node); + item = createTreeItem(GTK_WIDGET(subtree), (const char *)S.c_str()); + gtk_tree_append(subtree, GTK_WIDGET(item)); + gtk_widget_show(GTK_WIDGET(item)); + nodeCache.insert(TTreeNodeMap::value_type(item, TTreeNode(this, subtree, item, S))); + TTreeNode *node = GetNode(item); + if (node) + node->Data = Ptr; + + return node; +} + +/* +function TTreeNodes.AddChildObjectFirst(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; +begin + Result := InternalAddObject(Node, S, Ptr, taAddFirst); +end; + +function TTreeNodes.InternalAddObject(Node: TTreeNode; const S: string; + Ptr: Pointer; AddMode: TAddMode): TTreeNode; +var + Item: HTreeItem; +begin + Result := Owner.CreateNode; + try + if Node <> nil then Item := Node.ItemId + else Item := nil; + Result.Data := Ptr; + Result.Text := S; + Item := AddItem(Item, nil, CreateItem(Result), AddMode); + if Item = nil then + raise EOutOfResources.Create(sInsertError); + Result.FItemId := Item; + AddedNode(Node); + except + Result.Free; + raise; + end; +end; + +function TTreeNodes.AddItem(Parent, Target: HTreeItem; + const Item: TTVItem; AddMode: TAddMode): HTreeItem; +var + InsertStruct: TTVInsertStruct; +begin + ClearCache; + with InsertStruct do + begin + hParent := Parent; + case AddMode of + taAddFirst: + hInsertAfter := TVI_FIRST; + taAdd: + hInsertAfter := TVI_LAST; + taInsert: + hInsertAfter := Target; + end; + end; + InsertStruct.item := Item; + FOwner.FChangeTimer.Enabled := False; + Result := TreeView_InsertItem(Handle, InsertStruct); +end; +*/ + + +/* +{ TTreeNodes } + +constructor TTreeNodes.Create(AOwner: TCustomTreeView); +begin + inherited Create; + FOwner := AOwner; +end; + +destructor TTreeNodes.Destroy; +begin + Clear; + inherited Destroy; +end; + +function TTreeNodes.GetCount: Integer; +begin + if Owner.HandleAllocated then Result := TreeView_GetCount(Handle) + else Result := 0; +end; + +function TTreeNodes.GetHandle: HWND; +begin + Result := Owner.Handle; +end; + +procedure TTreeNodes.Delete(Node: TTreeNode); +begin + if (Node.ItemId = nil) then + Owner.Delete(Node); + Node.Delete; +end; + +function TTreeNodes.AddChild(Node: TTreeNode; const S: string): TTreeNode; +begin + Result := AddChildObject(Node, S, nil); +end; + +function TTreeNodes.AddChildObject(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; +begin + Result := InternalAddObject(Node, S, Ptr, taAdd); +end; + +function TTreeNodes.AddFirst(Node: TTreeNode; const S: string): TTreeNode; +begin + Result := AddObjectFirst(Node, S, nil); +end; + +function TTreeNodes.AddObjectFirst(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; +begin + if Node <> nil then Node := Node.Parent; + Result := InternalAddObject(Node, S, Ptr, taAddFirst); +end; + +function TTreeNodes.Add(Node: TTreeNode; const S: string): TTreeNode; +begin + Result := AddObject(Node, S, nil); +end; + +procedure TTreeNodes.Repaint(Node: TTreeNode); +var + R: TRect; +begin + if FUpdateCount < 1 then + begin + while (Node <> nil) and not Node.IsVisible do Node := Node.Parent; + if Node <> nil then + begin + R := Node.DisplayRect(False); + InvalidateRect(Owner.Handle, @R, True); + end; + end; +end; + +function TTreeNodes.AddObject(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; +begin + if Node <> nil then Node := Node.Parent; + Result := InternalAddObject(Node, S, Ptr, taAdd); +end; + +function TTreeNodes.Insert(Node: TTreeNode; const S: string): TTreeNode; +begin + Result := InsertObject(Node, S, nil); +end; + +procedure TTreeNodes.AddedNode(Value: TTreeNode); +begin + if Value <> nil then + begin + Value.HasChildren := True; + Repaint(Value); + end; +end; + +function TTreeNodes.InsertObject(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; +var + Item, ItemId: HTreeItem; + Parent: TTreeNode; + AddMode: TAddMode; +begin + Result := Owner.CreateNode; + try + Item := nil; + ItemId := nil; + Parent := nil; + AddMode := taInsert; + if Node <> nil then + begin + Parent := Node.Parent; + if Parent <> nil then Item := Parent.ItemId; + Node := Node.GetPrevSibling; + if Node <> nil then ItemId := Node.ItemId + else AddMode := taAddFirst; + end; + Result.Data := Ptr; + Result.Text := S; + Item := AddItem(Item, ItemId, CreateItem(Result), AddMode); + if Item = nil then + raise EOutOfResources.Create(sInsertError); + Result.FItemId := Item; + AddedNode(Parent); + except + Result.Free; + raise; + end; +end; + +function TTreeNodes.CreateItem(Node: TTreeNode): TTVItem; +begin + Node.FInTree := True; + with Result do + begin + mask := TVIF_TEXT or TVIF_PARAM or TVIF_IMAGE or TVIF_SELECTEDIMAGE; + lParam := Longint(Node); + pszText := LPSTR_TEXTCALLBACK; + iImage := I_IMAGECALLBACK; + iSelectedImage := I_IMAGECALLBACK; + end; +end; + + +function TTreeNodes.GetNodeFromIndex(Index: Integer): TTreeNode; +var + I: Integer; +begin + if Index < 0 then TreeViewError(sInvalidIndex); + if (FNodeCache.CacheNode <> nil) and (Abs(FNodeCache.CacheIndex - Index) <= 1) then + begin + with FNodeCache do + begin + if Index = CacheIndex then Result := CacheNode + else if Index < CacheIndex then Result := CacheNode.GetPrev + else Result := CacheNode.GetNext; + end; + end + else begin + Result := GetFirstNode; + I := Index; + while (I <> 0) and (Result <> nil) do + begin + Result := Result.GetNext; + Dec(I); + end; + end; + if Result = nil then TreeViewError(sInvalidIndex); + FNodeCache.CacheNode := Result; + FNodeCache.CacheIndex := Index; +end; + +function TTreeNodes.GetNode(ItemId: HTreeItem): TTreeNode; +var + Item: TTVItem; +begin + with Item do + begin + hItem := ItemId; + mask := TVIF_PARAM; + end; + if TreeView_GetItem(Handle, Item) then Result := TTreeNode(Item.lParam) + else Result := nil; +end; + +procedure TTreeNodes.SetItem(Index: Integer; Value: TTreeNode); +begin + GetNodeFromIndex(Index).Assign(Value); +end; + +procedure TTreeNodes.BeginUpdate; +begin + if FUpdateCount = 0 then SetUpdateState(True); + Inc(FUpdateCount); +end; + +procedure TTreeNodes.SetUpdateState(Updating: Boolean); +begin + SendMessage(Handle, WM_SETREDRAW, Ord(not Updating), 0); + if not Updating then Owner.Refresh; +end; + +procedure TTreeNodes.EndUpdate; +begin + Dec(FUpdateCount); + if FUpdateCount = 0 then SetUpdateState(False); +end; + +procedure TTreeNodes.Assign(Source: TPersistent); +var + TreeNodes: TTreeNodes; + MemStream: TMemoryStream; +begin + ClearCache; + if Source is TTreeNodes then + begin + TreeNodes := TTreeNodes(Source); + Clear; + MemStream := TMemoryStream.Create; + try + TreeNodes.WriteData(MemStream); + MemStream.Position := 0; + ReadData(MemStream); + finally + MemStream.Free; + end; + end + else inherited Assign(Source); +end; + +procedure TTreeNodes.DefineProperties(Filer: TFiler); + + function WriteNodes: Boolean; + var + I: Integer; + Nodes: TTreeNodes; + begin + Nodes := TTreeNodes(Filer.Ancestor); + if Nodes = nil then + Result := Count > 0 + else if Nodes.Count <> Count then + Result := True + else + begin + Result := False; + for I := 0 to Count - 1 do + begin + Result := not Item[I].IsEqual(Nodes[I]); + if Result then Break; + end + end; + end; + +begin + inherited DefineProperties(Filer); + Filer.DefineBinaryProperty('Data', ReadData, WriteData, WriteNodes); +end; + +procedure TTreeNodes.ReadData(Stream: TStream); +var + I, Count: Integer; + NodeInfo: TNodeInfo; +begin + Clear; + Stream.ReadBuffer(Count, SizeOf(Count)); + for I := 0 to Count - 1 do + Add(nil, '').ReadData(Stream, @NodeInfo); +end; + +procedure TTreeNodes.WriteData(Stream: TStream); +var + I: Integer; + Node: TTreeNode; + NodeInfo: TNodeInfo; +begin + I := 0; + Node := GetFirstNode; + while Node <> nil do + begin + Inc(I); + Node := Node.GetNextSibling; + end; + Stream.WriteBuffer(I, SizeOf(I)); + Node := GetFirstNode; + while Node <> nil do + begin + Node.WriteData(Stream, @NodeInfo); + Node := Node.GetNextSibling; + end; +end; + +procedure TTreeNodes.ClearCache; +begin + FNodeCache.CacheNode := nil; +end; +*/ diff --git a/apps/X11/VCL/TTreeNodes.h b/apps/X11/VCL/TTreeNodes.h new file mode 100644 index 0000000..ed28bad --- /dev/null +++ b/apps/X11/VCL/TTreeNodes.h @@ -0,0 +1,90 @@ +#ifndef TTREENODES_H +#define TTREENODES_H + +#include <TTreeNode.h> +#include <TCustomTreeView.h> +#include <map> + + +static char * default_xpm[] = { +"1 1 2 1", +" c None", +". c #FFFFFF", +"."}; + + +/* + TNodeCache = record + CacheNode: TTreeNode; + CacheIndex: Integer; + end; +*/ + +typedef map <GtkTreeItem *, TTreeNode> TTreeNodeMap; + +class TTreeNodes: public TPersistent { +friend class TTreeNode; +private: +// FOwner: TCustomTreeView; + TCustomTreeView *FOwner; + TTreeNodeMap nodeCache; +// function GetNode(ItemId: HTreeItem): TTreeNode; +/* + FUpdateCount: Integer; + FNodeCache: TNodeCache; + procedure AddedNode(Value: TTreeNode); + function GetHandle: HWND; + function GetNodeFromIndex(Index: Integer): TTreeNode; + procedure ReadData(Stream: TStream); + procedure Repaint(Node: TTreeNode); + procedure WriteData(Stream: TStream); + procedure ClearCache; + protected + function AddItem(Parent, Target: HTreeItem; const Item: TTVItem; + AddMode: TAddMode): HTreeItem; + function InternalAddObject(Node: TTreeNode; const S: string; + Ptr: Pointer; AddMode: TAddMode): TTreeNode; + procedure DefineProperties(Filer: TFiler); override; + function CreateItem(Node: TTreeNode): TTVItem; + function GetCount: Integer; + procedure SetItem(Index: Integer; Value: TTreeNode); + procedure SetUpdateState(Updating: Boolean); +*/ + GtkTree *getSubTree(TTreeNode *node); + GtkTreeItem *createTreeItem(GtkWidget *parent, const char *label); +public: + TTreeNodes(TCustomTreeView *AOwner); + virtual ~TTreeNodes(); +// procedure Clear; + void Clear(); + TTreeNode *GetFirstNode(); + TTreeNode *GetNode(GtkTreeItem *subElement); + GtkTreeItem *GetParentNode(GtkTreeItem *root, GtkTreeItem *subElement); + TTreeNode *GetParentNode(TTreeNode *target); + TTreeNode *AddChildFirst(TTreeNode *Node, const string S); + TTreeNode *AddChild(TTreeNode *Node, const string S); + TTreeNode *AddChildObject(TTreeNode *Node, const string S, void *Ptr); +/* + function AddChildObjectFirst(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; + function AddFirst(Node: TTreeNode; const S: string): TTreeNode; + function Add(Node: TTreeNode; const S: string): TTreeNode; + function AddObjectFirst(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; + function AddObject(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; + procedure Assign(Source: TPersistent); override; + procedure BeginUpdate; + procedure Delete(Node: TTreeNode); + procedure EndUpdate; + function Insert(Node: TTreeNode; const S: string): TTreeNode; + function InsertObject(Node: TTreeNode; const S: string; + Ptr: Pointer): TTreeNode; + property Count: Integer read GetCount; + property Handle: HWND read GetHandle; + property Item[Index: Integer]: TTreeNode read GetNodeFromIndex; default; + property Owner: TCustomTreeView read FOwner; +*/ +}; + +#endif diff --git a/apps/X11/VCL/TTreeView.cpp b/apps/X11/VCL/TTreeView.cpp new file mode 100644 index 0000000..3d17529 --- /dev/null +++ b/apps/X11/VCL/TTreeView.cpp @@ -0,0 +1 @@ +#include <TTreeView.h> diff --git a/apps/X11/VCL/TTreeView.h b/apps/X11/VCL/TTreeView.h new file mode 100644 index 0000000..af71e4e --- /dev/null +++ b/apps/X11/VCL/TTreeView.h @@ -0,0 +1,92 @@ +#ifndef TTREEVIEW_H +#define TTREEVIEW_H + +#include <TCustomTreeView.h> + +class TTreeView : public TCustomTreeView { +public: +// property Items; + property <TTreeView, TTreeNodes *> Items; +// property StateImages; + property <TTreeView, TCustomImageList *> StateImages; +// property Images; + property <TTreeView, TCustomImageList *> Images; +//published: +/* + property Align; + property Anchors; + property AutoExpand; + property BiDiMode; + property BorderStyle; + property BorderWidth; + property ChangeDelay; + property Color; + property Ctl3D; + property Constraints; + property DragKind; + property DragCursor; + property DragMode; + property Enabled; + property Font; + property HideSelection; + property HotTrack; + property Indent; + property ParentBiDiMode; + property ParentColor default False; + property ParentCtl3D; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ReadOnly; + property RightClickSelect; + property RowSelect; + property ShowButtons; + property ShowHint; + property ShowLines; + property ShowRoot; + property SortType; + property TabOrder; + property TabStop default True; + property ToolTips; + property Visible; + property OnChange; + property OnChanging; + property OnClick; + property OnCollapsing; + property OnCollapsed; + property OnCompare; + property OnCustomDraw; + property OnCustomDrawItem; + property OnDblClick; + property OnDeletion; + property OnDragDrop; + property OnDragOver; + property OnEdited; + property OnEditing; + property OnEndDock; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnExpanding; + property OnExpanded; + property OnGetImageIndex; + property OnGetSelectedIndex; + property OnKeyDown; + property OnKeyPress; + property OnKeyUp; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDock; + property OnStartDrag; +*/ +public: + TTreeView(GtkWidget *parent) : + TCustomTreeView(parent), + Items(this, &TCustomTreeView::getItems, &TCustomTreeView::SetTreeNodes), + StateImages(this, &TCustomTreeView::getStateImages, &TCustomTreeView::SetStateImages), + Images(this, &TCustomTreeView::getImages, &TCustomTreeView::SetImages) + {} +}; + +#endif diff --git a/apps/X11/VCL/TWinControl.cpp b/apps/X11/VCL/TWinControl.cpp new file mode 100644 index 0000000..79edfe8 --- /dev/null +++ b/apps/X11/VCL/TWinControl.cpp @@ -0,0 +1,16 @@ +#include <TWinControl.h> +extern "C" { +#include <gtk/gtkwidget.h> +} + +TWinControl::TWinControl(TComponent *AOwner) : TControl(AOwner) { +} + + +TWinControl::TWinControl(GtkWidget *ParentWindow) : TControl(0) { +} + + +TWinControl::~TWinControl() { +} + diff --git a/apps/X11/VCL/TWinControl.h b/apps/X11/VCL/TWinControl.h new file mode 100644 index 0000000..b16e1b2 --- /dev/null +++ b/apps/X11/VCL/TWinControl.h @@ -0,0 +1,331 @@ +#ifndef TWINCONTROL_H +#define TWINCONTROL_H + +#include <TControl.h> +extern "C" { +#include <gtk/gtkwidget.h> +} + +class TWinControl : public TControl { +private: +/* + FAlignLevel: Word; + FBevelEdges: TBevelEdges; + FBevelInner: TBevelCut; + FBevelOuter: TBevelCut; + FBevelKind: TBevelKind; + FBevelWidth: TBevelWidth; + FBorderWidth: TBorderWidth; + FBrush: TBrush; + FControls: TList; + FCtl3D: Boolean; + FDefWndProc: Pointer; + FDockClients: TList; + FDockSite: Boolean; + FDockManager: IDockManager; + FHandle: HWnd; + FHelpContext: THelpContext; + FImeMode: TImeMode; + FImeName: TImeName; + FLastClientWidth: Integer; + FLastClientHeight: Integer; + FLastResize: TPoint; + FObjectInstance: Pointer; + FParentCtl3D: Boolean; + FParentWindow: HWnd; + FShowing: Boolean; + FTabList: TList; + FTabOrder: Integer; + FTabStop: Boolean; + FWheelAccumulator: Integer; + FUseDockManager: Boolean; + FWinControls: TList; + FOnDockDrop: TDockDropEvent; + FOnDockOver: TDockOverEvent; + FOnEnter: TNotifyEvent; + FOnExit: TNotifyEvent; + FOnGetSiteInfo: TGetSiteInfoEvent; + FOnKeyDown: TKeyEvent; + FOnKeyPress: TKeyPressEvent; + FOnKeyUp: TKeyEvent; + FOnMouseWheel: TMouseWheelEvent; + FOnMouseWheelDown: TMouseWheelUpDownEvent; + FOnMouseWheelUp: TMouseWheelUpDownEvent; + FOnUnDock: TUnDockEvent; + procedure AlignControl(AControl: TControl); + procedure CalcConstraints(var MinWidth, MinHeight, MaxWidth, + MaxHeight: Integer); + function GetControl(Index: Integer): TControl; + function GetControlCount: Integer; + function GetDockClientCount: Integer; + function GetDockClients(Index: Integer): TControl; + function GetHandle: HWnd; + function GetTabOrder: TTabOrder; + procedure Insert(AControl: TControl); + procedure InvalidateFrame; + function IsCtl3DStored: Boolean; + function IsHelpContextStored: Boolean; + function PrecedingWindow(Control: TWinControl): HWnd; + procedure Remove(AControl: TControl); + procedure RemoveFocus(Removing: Boolean); + procedure SetBevelCut(Index: Integer; const Value: TBevelCut); + procedure SetBevelEdges(const Value: TBevelEdges); + procedure SetBevelKind(const Value: TBevelKind); + procedure SetBevelWidth(const Value: TBevelWidth); + procedure SetBorderWidth(Value: TBorderWidth); + procedure SetCtl3D(Value: Boolean); + procedure SetDockSite(Value: Boolean); + procedure SetParentCtl3D(Value: Boolean); + procedure SetParentWindow(Value: HWnd); + procedure SetTabOrder(Value: TTabOrder); + procedure SetTabStop(Value: Boolean); + procedure SetUseDockManager(Value: Boolean); + procedure SetZOrderPosition(Position: Integer); + procedure UpdateLastResize(NewWidth, NewHeight: Integer); override; + procedure UpdateTabOrder(Value: TTabOrder); + procedure UpdateBounds; + procedure UpdateShowing; + function IsMenuKey(var Message: TWMKey): Boolean; + procedure WMPaint(var Message: TWMPaint); message WM_PAINT; + procedure WMCommand(var Message: TWMCommand); message WM_COMMAND; + procedure WMNotify(var Message: TWMNotify); message WM_NOTIFY; + procedure WMSysColorChange(var Message: TWMSysColorChange); message WM_SYSCOLORCHANGE; + procedure WMHScroll(var Message: TWMHScroll); message WM_HSCROLL; + procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL; + procedure WMCompareItem(var Message: TWMCompareItem); message WM_COMPAREITEM; + procedure WMDeleteItem(var Message: TWMDeleteItem); message WM_DELETEITEM; + procedure WMDrawItem(var Message: TWMDrawItem); message WM_DRAWITEM; + procedure WMMeasureItem(var Message: TWMMeasureItem); message WM_MEASUREITEM; + procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND; + procedure WMWindowPosChanged(var Message: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED; + procedure WMWindowPosChanging(var Message: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING; + procedure WMSize(var Message: TWMSize); message WM_SIZE; + procedure WMMove(var Message: TWMMove); message WM_MOVE; + procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; + procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN; + procedure WMSysKeyDown(var Message: TWMKeyDown); message WM_SYSKEYDOWN; + procedure WMKeyUp(var Message: TWMKeyUp); message WM_KEYUP; + procedure WMSysKeyUp(var Message: TWMKeyUp); message WM_SYSKEYUP; + procedure WMChar(var Message: TWMChar); message WM_CHAR; + procedure WMSysCommand(var Message: TWMSysCommand); message WM_SYSCOMMAND; + procedure WMCharToItem(var Message: TWMCharToItem); message WM_CHARTOITEM; + procedure WMParentNotify(var Message: TWMParentNotify); message WM_PARENTNOTIFY; + procedure WMVKeyToItem(var Message: TWMVKeyToItem); message WM_VKEYTOITEM; + procedure WMDestroy(var Message: TWMDestroy); message WM_DESTROY; + procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE; + procedure WMNCDestroy(var Message: TWMNCDestroy); message WM_NCDESTROY; + procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; + procedure WMNCPaint(var Message: TMessage); message WM_NCPAINT; + procedure WMQueryNewPalette(var Message: TMessage); message WM_QUERYNEWPALETTE; + procedure WMPaletteChanged(var Message: TMessage); message WM_PALETTECHANGED; + procedure WMWinIniChange(var Message: TMessage); message WM_WININICHANGE; + procedure WMFontChange(var Message: TMessage); message WM_FONTCHANGE; + procedure WMTimeChange(var Message: TMessage); message WM_TIMECHANGE; + procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; + procedure WMKillFocus(var Message: TWMSetFocus); message WM_KILLFOCUS; + procedure WMIMEStartComp(var Message: TMessage); message WM_IME_STARTCOMPOSITION; + procedure WMIMEEndComp(var Message: TMessage); message WM_IME_ENDCOMPOSITION; + procedure WMMouseWheel(var Message: TWMMouseWheel); message WM_MOUSEWHEEL; + procedure CMChanged(var Message: TMessage); message CM_CHANGED; + procedure CMChildKey(var Message: TMessage); message CM_CHILDKEY; + procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY; + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED; + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMBorderChanged(var Message: TMessage); message CM_BORDERCHANGED; + procedure CMCursorChanged(var Message: TMessage); message CM_CURSORCHANGED; + procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; + procedure CMParentCtl3DChanged(var Message: TMessage); message CM_PARENTCTL3DCHANGED; + procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED; + procedure CMShowHintChanged(var Message: TMessage); message CM_SHOWHINTCHANGED; + procedure CMEnter(var Message: TCMEnter); message CM_ENTER; + procedure CMExit(var Message: TCMExit); message CM_EXIT; + procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; + procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; + procedure CMSysFontChanged(var Message: TMessage); message CM_SYSFONTCHANGED; + procedure CMWinIniChange(var Message: TWMWinIniChange); message CM_WININICHANGE; + procedure CMFontChange(var Message: TMessage); message CM_FONTCHANGE; + procedure CMTimeChange(var Message: TMessage); message CM_TIMECHANGE; + procedure CMDrag(var Message: TCMDrag); message CM_DRAG; + procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; + procedure CNKeyUp(var Message: TWMKeyUp); message CN_KEYUP; + procedure CNChar(var Message: TWMChar); message CN_CHAR; + procedure CNSysKeyDown(var Message: TWMKeyDown); message CN_SYSKEYDOWN; + procedure CNSysChar(var Message: TWMChar); message CN_SYSCHAR; + procedure CMControlListChange(var Message: TMessage); message CM_CONTROLLISTCHANGE; + procedure CMRecreateWnd(var Message: TMessage); message CM_RECREATEWND; + procedure CMInvalidate(var Message: TMessage); message CM_INVALIDATE; + procedure CMDockClient(var Message: TCMDockClient); message CM_DOCKCLIENT; + procedure CMUnDockClient(var Message: TCMUnDockClient); message CM_UNDOCKCLIENT; + procedure CMFloat(var Message: TCMFloat); message CM_FLOAT; + procedure CMBiDiModeChanged(var Message: TMessage); message CM_BIDIMODECHANGED; + procedure CMMouseWheel(var Message: TCMMouseWheel); message CM_MOUSEWHEEL; +*/ +protected: +/* + FDoubleBuffered: Boolean; + FInImeComposition: Boolean; + procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override; + procedure AddBiDiModeExStyle(var ExStyle: DWORD); + procedure AssignTo(Dest: TPersistent); override; + procedure AdjustClientRect(var Rect: TRect); virtual; + procedure AdjustSize; override; + procedure AlignControls(AControl: TControl; var Rect: TRect); virtual; + function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override; + function CanResize(var NewWidth, NewHeight: Integer): Boolean; override; + procedure ChangeScale(M, D: Integer); override; + procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, + MaxHeight: Integer); override; + function CreateDockManager: IDockManager; dynamic; + procedure CreateHandle; virtual; + procedure CreateParams(var Params: TCreateParams); virtual; + procedure CreateSubClass(var Params: TCreateParams; + ControlClassName: PChar); + procedure CreateWindowHandle(const Params: TCreateParams); virtual; + procedure CreateWnd; virtual; + procedure DestroyHandle; + procedure DestroyWindowHandle; virtual; + procedure DestroyWnd; virtual; + procedure DoAddDockClient(Client: TControl; const ARect: TRect); dynamic; + procedure DockOver(Source: TDragDockObject; X, Y: Integer; State: TDragState; + var Accept: Boolean); dynamic; + procedure DoDockOver(Source: TDragDockObject; X, Y: Integer; State: TDragState; + var Accept: Boolean); dynamic; + procedure DoEnter; dynamic; + procedure DoExit; dynamic; + procedure DoFlipChildren; dynamic; + function DoKeyDown(var Message: TWMKey): Boolean; + function DoKeyPress(var Message: TWMKey): Boolean; + function DoKeyUp(var Message: TWMKey): Boolean; + function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; + MousePos: TPoint): Boolean; dynamic; + function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; dynamic; + function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; dynamic; + procedure DoRemoveDockClient(Client: TControl); dynamic; + function DoUnDock(NewTarget: TWinControl; Client: TControl): Boolean; dynamic; + function FindNextControl(CurControl: TWinControl; + GoForward, CheckTabStop, CheckParent: Boolean): TWinControl; + procedure FixupTabList; + function GetActionLinkClass: TControlActionLinkClass; override; + procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; + function GetClientOrigin: TPoint; override; + function GetClientRect: TRect; override; + function GetControlExtents: TRect; virtual; + function GetDeviceContext(var WindowHandle: HWnd): HDC; override; + function GetParentHandle: HWnd; + procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; + MousePos: TPoint; var CanDock: Boolean); dynamic; + function GetTopParentHandle: HWnd; + function IsControlMouseMsg(var Message: TWMMouse): Boolean; + procedure KeyDown(var Key: Word; Shift: TShiftState); dynamic; + procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic; + procedure KeyPress(var Key: Char); dynamic; + procedure MainWndProc(var Message: TMessage); + procedure NotifyControls(Msg: Word); + procedure PaintControls(DC: HDC; First: TControl); + procedure PaintHandler(var Message: TWMPaint); + procedure PaintWindow(DC: HDC); virtual; + function PaletteChanged(Foreground: Boolean): Boolean; override; + procedure ReadState(Reader: TReader); override; + procedure RecreateWnd; + procedure ReloadDockedControl(const AControlName: string; + var AControl: TControl); dynamic; + procedure ResetIme; + function ResetImeComposition(Action: DWORD): Boolean; + procedure ScaleControls(M, D: Integer); + procedure SelectFirst; + procedure SelectNext(CurControl: TWinControl; + GoForward, CheckTabStop: Boolean); + procedure SetChildOrder(Child: TComponent; Order: Integer); override; + procedure SetIme; + function SetImeCompositionWindow(Font: TFont; XPos, YPos: Integer): Boolean; + procedure SetZOrder(TopMost: Boolean); override; + procedure ShowControl(AControl: TControl); virtual; + procedure WndProc(var Message: TMessage); override; + property BevelEdges: TBevelEdges read FBevelEdges write SetBevelEdges default [beLeft, beTop, beRight, beBottom]; + property BevelInner: TBevelCut index 0 read FBevelInner write SetBevelCut default bvRaised; + property BevelOuter: TBevelCut index 1 read FBevelOuter write SetBevelCut default bvLowered; + property BevelKind: TBevelKind read FBevelKind write SetBevelKind default bkNone; + property BevelWidth: TBevelWidth read FBevelWidth write SetBevelWidth default 1; + property BorderWidth: TBorderWidth read FBorderWidth write SetBorderWidth default 0; + property Ctl3D: Boolean read FCtl3D write SetCtl3D stored IsCtl3DStored; + property DefWndProc: Pointer read FDefWndProc write FDefWndProc; + property DockSite: Boolean read FDockSite write SetDockSite default False; + property DockManager: IDockManager read FDockManager write FDockManager; + property ImeMode: TImeMode read FImeMode write FImeMode default imDontCare; + property ImeName: TImeName read FImeName write FImeName; + property ParentCtl3D: Boolean read FParentCtl3D write SetParentCtl3D default True; + property UseDockManager: Boolean read FUseDockManager write SetUseDockManager + default False; + property WheelAccumulator: Integer read FWheelAccumulator write FWheelAccumulator; + property WindowHandle: HWnd read FHandle write FHandle; + property OnDockDrop: TDockDropEvent read FOnDockDrop write FOnDockDrop; + property OnDockOver: TDockOverEvent read FOnDockOver write FOnDockOver; + property OnEnter: TNotifyEvent read FOnEnter write FOnEnter; + property OnExit: TNotifyEvent read FOnExit write FOnExit; + property OnGetSiteInfo: TGetSiteInfoEvent read FOnGetSiteInfo write FOnGetSiteInfo; + property OnKeyDown: TKeyEvent read FOnKeyDown write FOnKeyDown; + property OnKeyPress: TKeyPressEvent read FOnKeyPress write FOnKeyPress; + property OnKeyUp: TKeyEvent read FOnKeyUp write FOnKeyUp; + property OnMouseWheel: TMouseWheelEvent read FOnMouseWheel write FOnMouseWheel; + property OnMouseWheelDown: TMouseWheelUpDownEvent read FOnMouseWheelDown + write FOnMouseWheelDown; + property OnMouseWheelUp: TMouseWheelUpDownEvent read FOnMouseWheelUp write + FOnMouseWheelUp; + property OnUnDock: TUnDockEvent read FOnUnDock write FOnUnDock; +*/ +public: + GtkWidget *nativeControl; + + TWinControl(TComponent *AOwner); + TWinControl(GtkWidget *ParentWindow); + virtual ~TWinControl(); +/* + class function CreateParentedControl(ParentWindow: HWnd): TWinControl; + procedure Broadcast(var Message); + function CanFocus: Boolean; + function ContainsControl(Control: TControl): Boolean; + function ControlAtPos(const Pos: TPoint; AllowDisabled: Boolean): TControl; + procedure DefaultHandler(var Message); override; + procedure DisableAlign; + property DockClientCount: Integer read GetDockClientCount; + property DockClients[Index: Integer]: TControl read GetDockClients; + procedure DockDrop(Source: TDragDockObject; X, Y: Integer); dynamic; + property DoubleBuffered: Boolean read FDoubleBuffered write FDoubleBuffered; + procedure EnableAlign; + function FindChildControl(const ControlName: string): TControl; + procedure FlipChildren(AllLevels: Boolean); dynamic; + function Focused: Boolean; dynamic; + procedure GetTabOrderList(List: TList); dynamic; + function HandleAllocated: Boolean; + procedure HandleNeeded; + procedure InsertControl(AControl: TControl); + procedure Invalidate; override; + procedure MouseWheelHandler(var Message: TMessage); dynamic; + procedure PaintTo(DC: HDC; X, Y: Integer); + procedure RemoveControl(AControl: TControl); + procedure Realign; + procedure Repaint; override; + procedure ScaleBy(M, D: Integer); + procedure ScrollBy(DeltaX, DeltaY: Integer); + procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; + procedure SetFocus; virtual; + procedure Update; override; + procedure UpdateControlState; + property Brush: TBrush read FBrush; + property Controls[Index: Integer]: TControl read GetControl; + property ControlCount: Integer read GetControlCount; + property Handle: HWnd read GetHandle; + property ParentWindow: HWnd read FParentWindow write SetParentWindow; + property Showing: Boolean read FShowing; + property TabOrder: TTabOrder read GetTabOrder write SetTabOrder default -1; + property TabStop: Boolean read FTabStop write SetTabStop default False; + published + property HelpContext: THelpContext read FHelpContext write FHelpContext stored IsHelpContextStored default 0; +*/ +}; + +#endif diff --git a/apps/X11/VCL/property b/apps/X11/VCL/property new file mode 100644 index 0000000..aee9eda --- /dev/null +++ b/apps/X11/VCL/property @@ -0,0 +1,77 @@ +#ifndef PROPERTY_H +#define PROPERTY_H + +#include <iostream> + +template<class Context, class T> struct Property_index; + +template<class Context, class T> +class property { + Context* view; // an Item needs to access values in its context + T (Context::*Getter)(); + void (Context::*Setter)(T); + +protected: + T get() const { return (Getter) ? (view->*Getter)() : 0; } + void set(T val) { if (Setter) (view->*Setter)(val); } + +public: + property(Context* v, + T (Context::*G)() = &Context::get, + void (Context::*S)(T) = &Context::set) + :view(v), Getter(G), Setter(S) { } + + operator T() const { return get(); } + property& operator=(T val) { set(val); return *this; } + property& operator+=(T val) { set(get() + val); return *this; } + property& operator=(const property &other) { set(T(other)); return *this; } + + // specialized operations: + + T operator->() { return get(); } + + // string specific + property<Property_index<Context,T>,char> operator[](int i); + int size() { return (view->*Getter)().size(); } + +}; + +template<class Context, class T> +struct Property_index { // inefficient + property<Context,T>* p; + int i; + Property_index(property<Context,T>* pp, int ii) : p(pp), i(ii) { } + char get() const { return p->get()[i]; } + void set(char ch) { T v = p->get(); v[i] = ch; p->set(v); } +}; + +template<class Context, class T> +property<Property_index<Context,T>,char> property<Context,T>::operator[](int i) +{ + return property<Property_index<Context,T>,char>(new Property_index<Context,T>(this,i)); +// leaks +} + +template<class Context, class T> +inline ostream& operator<<(ostream& s, property<Context,T> p) +{ + s << T(p); +} + +template<class Context, class T> +inline istream& operator>>(istream& s, property<Context,T>& p) +{ + T t; + s >> t; + p = t; +} + + + +/* examples +property<TTreeView,TTreeNodes*> Items; +Items(this, &get, &set); +*/ + + +#endif diff --git a/apps/X11/cheatah/AUTHORS b/apps/X11/cheatah/AUTHORS new file mode 100644 index 0000000..cca39e0 --- /dev/null +++ b/apps/X11/cheatah/AUTHORS @@ -0,0 +1 @@ +CrossWire Bible Society and the global internet community at large. diff --git a/apps/X11/cheatah/COPYING b/apps/X11/cheatah/COPYING new file mode 100644 index 0000000..eeb586b --- /dev/null +++ b/apps/X11/cheatah/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/apps/X11/cheatah/ChangeLog b/apps/X11/cheatah/ChangeLog new file mode 100644 index 0000000..23f8aeb --- /dev/null +++ b/apps/X11/cheatah/ChangeLog @@ -0,0 +1,2 @@ +05-Jun-1999 + Released first version of cheatah in public SWORD distribution diff --git a/apps/X11/cheatah/INSTALL b/apps/X11/cheatah/INSTALL new file mode 100644 index 0000000..736846a --- /dev/null +++ b/apps/X11/cheatah/INSTALL @@ -0,0 +1,10 @@ + +First, be sure to read INSTALL in the root of the project +directory for instructions on how to make sure the API +libraries are installed and configured properly. + +Then do a: + +./configure +make + diff --git a/apps/X11/cheatah/Makefile.am b/apps/X11/cheatah/Makefile.am new file mode 100644 index 0000000..d57a8e9 --- /dev/null +++ b/apps/X11/cheatah/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +bin_PROGRAMS = cheatah + +cheatah_SOURCES = \ + cheatah.cpp \ + cheatsig.cpp + +noinst_HEADERS = \ + cheatah.h \ + cheatsig.h + + +CXXFLAGS = $(GTK_CFLAGS) -I../../../include -g diff --git a/apps/X11/cheatah/Makefile.in b/apps/X11/cheatah/Makefile.in new file mode 100644 index 0000000..7fc7a9c --- /dev/null +++ b/apps/X11/cheatah/Makefile.in @@ -0,0 +1,385 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +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 + +DESTDIR = + +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@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CXX = @CXX@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +bin_PROGRAMS = cheatah + +cheatah_SOURCES = cheatah.cpp cheatsig.cpp + + +noinst_HEADERS = cheatah.h cheatsig.h + + +CXXFLAGS = $(GTK_CFLAGS) -I../../../include -g +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +cheatah_OBJECTS = cheatah.o cheatsig.o +cheatah_LDADD = $(LDADD) +cheatah_DEPENDENCIES = +cheatah_LDFLAGS = +CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ +HEADERS = $(noinst_HEADERS) + +DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ +Makefile.in NEWS aclocal.m4 configure configure.in install-sh missing \ +mkinstalldirs + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +DEP_FILES = .deps/cheatah.P .deps/cheatsig.P +SOURCES = $(cheatah_SOURCES) +OBJECTS = $(cheatah_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .cpp .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +cheatah: $(cheatah_OBJECTS) $(cheatah_DEPENDENCIES) + @rm -f cheatah + $(CXXLINK) $(cheatah_LDFLAGS) $(cheatah_OBJECTS) $(cheatah_LDADD) $(LIBS) +.cpp.o: + $(CXXCOMPILE) -c $< + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(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 + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`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) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cpp + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cpp + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: install-binPROGRAMS +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) $(HEADERS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ + mostlyclean-tags mostlyclean-depend mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ + distclean-depend distclean-generic clean-am + +distclean: distclean-am + -rm -f config.status + +maintainer-clean-am: maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + -rm -f config.status + +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir mostlyclean-depend \ +distclean-depend clean-depend maintainer-clean-depend info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/apps/X11/cheatah/NEWS b/apps/X11/cheatah/NEWS new file mode 100644 index 0000000..5af8a53 --- /dev/null +++ b/apps/X11/cheatah/NEWS @@ -0,0 +1 @@ +Look for full blown gtk SWORD GUIs in the near future diff --git a/apps/X11/cheatah/README b/apps/X11/cheatah/README new file mode 100644 index 0000000..bcc13de --- /dev/null +++ b/apps/X11/cheatah/README @@ -0,0 +1,4 @@ +This is the temporary gtk GUI to The SWORD Project. It is called cheatah +because it is a fast lookup and search utility for SWORD modules. It is +mispelled because it is a 'cheater' interface meant to hold over Linux users +until we can build a full featured GUI! :) diff --git a/apps/X11/cheatah/aclocal.m4 b/apps/X11/cheatah/aclocal.m4 new file mode 100644 index 0000000..c4a8693 --- /dev/null +++ b/apps/X11/cheatah/aclocal.m4 @@ -0,0 +1,299 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4 + +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# 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 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# 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 conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $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" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + +# Configure paths for GTK+ +# Owen Taylor 97-11-3 + +dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(AM_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + for module in . $4 + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include <gtk/gtk.h> +#include <stdio.h> +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + diff --git a/apps/X11/cheatah/cheatah.cpp b/apps/X11/cheatah/cheatah.cpp new file mode 100644 index 0000000..0cb5778 --- /dev/null +++ b/apps/X11/cheatah/cheatah.cpp @@ -0,0 +1,654 @@ +/* cheatah + * Copyright (C) 1999, CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 <gtk/gtk.h> +#include <gdk/gdkkeysyms.h> +#include "cheatsig.h" +#include "cheatah.h" +#include <swmgr.h> +#include <versekey.h> +#include <regex.h> +#include <gbfplain.h> +#include <thmlplain.h> +#include <string.h> + + +MainWindow *cheatahWindow = NULL; + +/* I'm going to try commenting out get_widget() - it no longer seems to be used */ +/* Note: this doesn't seem to have caused any problems so far. */ +/* +GtkWidget* +get_widget (GtkWidget *widget, + gchar *widget_name) +{ + GtkWidget *found_widget; + + if (widget->parent) + widget = gtk_widget_get_toplevel (widget); + found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} +*/ + +/* This is an internally used function to set notebook tab widgets. */ +void +set_notebook_tab (GtkWidget *notebook, + gint page_num, + GtkWidget *widget) +{ + GtkNotebookPage *page; + GtkWidget *notebook_page; + + page = (GtkNotebookPage*) g_list_nth (GTK_NOTEBOOK (notebook)->children, page_num)->data; + notebook_page = page->child; + gtk_widget_ref (notebook_page); + gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), page_num); + gtk_notebook_insert_page (GTK_NOTEBOOK (notebook), notebook_page, + widget, page_num); + gtk_widget_unref (notebook_page); +} + + + +MainWindow::MainWindow() { + searchType_group = NULL; + mainMgr = new SWMgr(); + curMod = NULL; + chapDisplay = 0; // set in create + entryDisplay = 0; // set in create +} + + +MainWindow::~MainWindow() { + delete mainMgr; + if (chapDisplay) + delete chapDisplay; + if (entryDisplay) + delete entryDisplay; +} + + +GtkWidget* create_mainWindow () { + GtkWidget *retWidget; + cheatahWindow = new MainWindow(); + retWidget = cheatahWindow->create(); + cheatahWindow->initSWORD(); + return retWidget; +} + +/* */ +/* Note: this seems to be a poor choice of a name for this function . */ +/* When I accidentally left off the parenthesis when trying to call it, */ +/* the compiler didn't complain, but it didn't execute, either. */ +/* Could there be a macro or something by the same name? */ +/* At any rate, be careful with it. */ +/* */ +void destroy_mainWindow () { + delete cheatahWindow; +} + +GtkWidget *MainWindow::create() { + mainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (mainWindow), "mainWindow", mainWindow); + gtk_window_set_title (GTK_WINDOW (mainWindow), "Cheatah - SWORD Quick Lookup / Search"); + gtk_window_set_policy (GTK_WINDOW (mainWindow), TRUE, TRUE, FALSE); + gtk_widget_set_usize(GTK_WIDGET(mainWindow), 580, 360); + gtk_signal_connect(GTK_OBJECT(mainWindow), + "destroy", + GTK_SIGNAL_FUNC(gtk_main_quit), + NULL); + + + mainPanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "mainPanel", mainPanel); + gtk_widget_show (mainPanel); + gtk_container_add (GTK_CONTAINER (mainWindow), mainPanel); + + headerPanel = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "headerPanel", headerPanel); + gtk_widget_show (headerPanel); + gtk_box_pack_start (GTK_BOX (mainPanel), headerPanel, FALSE, TRUE, 0); + + handlebox3 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "handlebox3", handlebox3); + gtk_widget_show (handlebox3); + gtk_box_pack_start (GTK_BOX (headerPanel), handlebox3, TRUE, TRUE, 0); + + menubar4 = gtk_menu_bar_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menubar4", menubar4); + gtk_widget_show (menubar4); + gtk_container_add (GTK_CONTAINER (handlebox3), menubar4); + + File = gtk_menu_item_new_with_label ("File"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "File", File); + gtk_widget_show (File); + gtk_container_add (GTK_CONTAINER (menubar4), File); + + menuFile = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuFile", menuFile); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (File), menuFile); + + Exit3 = gtk_menu_item_new_with_label ("Exit"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "Exit3", Exit3); + gtk_widget_show (Exit3); + gtk_container_add (GTK_CONTAINER (menuFile), Exit3); + gtk_signal_connect (GTK_OBJECT (Exit3), "activate", + GTK_SIGNAL_FUNC (gtk_main_quit), + NULL); + + + View3 = gtk_menu_item_new_with_label ("View"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "View3", View3); + gtk_widget_show (View3); + gtk_container_add (GTK_CONTAINER (menubar4), View3); + gtk_signal_connect (GTK_OBJECT (View3), "activate", + GTK_SIGNAL_FUNC (on_View3_activate), + NULL); + + menuView = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuView", menuView); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (View3), menuView); + + commentaries = gtk_menu_item_new_with_label ("Commentaries"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "commentaries", commentaries); + gtk_widget_show (commentaries); + + menuCommentaries = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuCommentaries", menuCommentaries); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (commentaries), menuCommentaries); + + dictionaries = gtk_menu_item_new_with_label ("Dictionaries"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "Dictionaries", dictionaries); + gtk_widget_show (dictionaries); + + menuDictionaries = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuDictionaries", menuDictionaries); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (dictionaries), menuDictionaries); + + + + Help = gtk_menu_item_new_with_label ("Help"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "Help", Help); + gtk_widget_show (Help); + gtk_container_add (GTK_CONTAINER (menubar4), Help); + gtk_signal_connect (GTK_OBJECT (Help), "activate", + GTK_SIGNAL_FUNC (on_Help_activate), + NULL); + gtk_menu_item_right_justify (GTK_MENU_ITEM (Help)); + + menuHelp = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuHelp", menuHelp); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (Help), menuHelp); + + About = gtk_menu_item_new_with_label ("About"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "About", About); + gtk_widget_show (About); + gtk_container_add (GTK_CONTAINER (menuHelp), About); + gtk_signal_connect (GTK_OBJECT (About), "activate", + GTK_SIGNAL_FUNC (on_About_activate), + NULL); + + handlebox4 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "handlebox4", handlebox4); + gtk_widget_show (handlebox4); + gtk_box_pack_start (GTK_BOX (headerPanel), handlebox4, TRUE, TRUE, 0); + + hbox6 = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "hbox6", hbox6); + gtk_widget_show (hbox6); + gtk_container_add (GTK_CONTAINER (handlebox4), hbox6); + + label2 = gtk_label_new ("FreeForm Lookup:"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "label2", label2); + gtk_widget_show (label2); + gtk_box_pack_start (GTK_BOX (hbox6), label2, FALSE, TRUE, 0); + gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_RIGHT); + gtk_misc_set_padding (GTK_MISC (label2), 2, 0); + + lookupText = gtk_entry_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "lookupText", lookupText); + gtk_widget_show (lookupText); + gtk_box_pack_start (GTK_BOX (hbox6), lookupText, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (lookupText), "changed", + GTK_SIGNAL_FUNC (on_lookupText_changed), + NULL); + + hbox2 = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "hbox2", hbox2); + gtk_widget_show (hbox2); + gtk_box_pack_start (GTK_BOX (mainPanel), hbox2, TRUE, TRUE, 0); + + +/* + textScrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_object_set_data (GTK_OBJECT (mainWindow), "textScrolledWindow", textScrolledWindow); + gtk_widget_show (textScrolledWindow); + gtk_box_pack_start (GTK_BOX (hbox2), textScrolledWindow, FALSE, FALSE, 0); +*/ + + moduleText = gtk_text_new (NULL, NULL); + gtk_object_set_data (GTK_OBJECT (mainWindow), "moduleText", moduleText); + gtk_widget_show (moduleText); +// gtk_container_add (GTK_CONTAINER (textScrolledWindow), moduleText); + gtk_box_pack_start (GTK_BOX (hbox2), moduleText, TRUE, TRUE, 0); + gtk_text_set_editable (GTK_TEXT (moduleText), FALSE); + gtk_text_set_word_wrap (GTK_TEXT (moduleText), TRUE); + gtk_widget_realize (moduleText); + + /* Add a vertical scrollbar to the GtkText widget */ + textScrollbar = gtk_vscrollbar_new (GTK_TEXT (moduleText)->vadj); + gtk_box_pack_start (GTK_BOX (hbox2), textScrollbar, FALSE, FALSE, 0); + gtk_widget_show (textScrollbar); + + +/* + handlebox5 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "handlebox5", handlebox5); + gtk_widget_show (handlebox5); + gtk_box_pack_start (GTK_BOX (hbox2), handlebox5, FALSE, FALSE, 0); + gtk_container_border_width (GTK_CONTAINER (handlebox5), 5); +*/ + + searchPanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchPanel", searchPanel); + gtk_widget_show (searchPanel); + gtk_box_pack_start (GTK_BOX (hbox2), searchPanel, FALSE, FALSE, 0); +// gtk_container_add (GTK_CONTAINER (handlebox5), searchPanel); + + hbox4 = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "hbox4", hbox4); + gtk_widget_show (hbox4); + gtk_box_pack_start (GTK_BOX (searchPanel), hbox4, FALSE, FALSE, 0); + + searchText = gtk_entry_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchText", searchText); + gtk_widget_show (searchText); + gtk_box_pack_start (GTK_BOX (hbox4), searchText, TRUE, TRUE, 0); + + searchButton = gtk_button_new_with_label ("Search"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchButton", searchButton); + gtk_widget_show (searchButton); + gtk_box_pack_start (GTK_BOX (hbox4), searchButton, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (searchButton), "clicked", + GTK_SIGNAL_FUNC (on_searchButton_clicked), + NULL); + + searchSettingsPanel = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchSettingsPanel", searchSettingsPanel); + gtk_widget_show (searchSettingsPanel); + gtk_box_pack_start (GTK_BOX (searchPanel), searchSettingsPanel, FALSE, FALSE, 0); + + searchTypePanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchTypePanel", searchTypePanel); + gtk_widget_show (searchTypePanel); + gtk_box_pack_start (GTK_BOX (searchSettingsPanel), searchTypePanel, FALSE, FALSE, 0); + + multiWordSearch = gtk_radio_button_new_with_label (searchType_group, "Multi Word"); + searchType_group = gtk_radio_button_group (GTK_RADIO_BUTTON (multiWordSearch)); + gtk_object_set_data (GTK_OBJECT (mainWindow), "multiWordSearch", multiWordSearch); + gtk_widget_show (multiWordSearch); + gtk_box_pack_start (GTK_BOX (searchTypePanel), multiWordSearch, FALSE, FALSE, 0); + + phraseSearch = gtk_radio_button_new_with_label (searchType_group, "Exact Phrase"); + searchType_group = gtk_radio_button_group (GTK_RADIO_BUTTON (phraseSearch)); + gtk_object_set_data (GTK_OBJECT (mainWindow), "phraseSearch", phraseSearch); + gtk_widget_show (phraseSearch); + gtk_box_pack_start (GTK_BOX (searchTypePanel), phraseSearch, FALSE, FALSE, 0); + + regexSearch = gtk_radio_button_new_with_label (searchType_group, "Regular Expression"); + searchType_group = gtk_radio_button_group (GTK_RADIO_BUTTON (regexSearch)); + gtk_object_set_data (GTK_OBJECT (mainWindow), "regexSearch", regexSearch); + gtk_widget_show (regexSearch); + gtk_box_pack_start (GTK_BOX (searchTypePanel), regexSearch, FALSE, FALSE, 0); + + + searchOptionsPanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchOptionsPanel", searchOptionsPanel); + gtk_widget_show (searchOptionsPanel); + gtk_box_pack_start (GTK_BOX (searchSettingsPanel), searchOptionsPanel, FALSE, FALSE, 0); + + caseSensitive = gtk_check_button_new_with_label ("Case Sensitive"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "caseSensitive", caseSensitive); + gtk_widget_show (caseSensitive); + gtk_box_pack_start (GTK_BOX (searchOptionsPanel), caseSensitive, FALSE, FALSE, 0); + + GtkWidget *resultPanel = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "resultPanel", resultPanel); + gtk_widget_show (resultPanel); + gtk_box_pack_start (GTK_BOX (searchPanel), resultPanel, TRUE, TRUE, 0); + resultList = gtk_clist_new(1); + gtk_object_set_data(GTK_OBJECT (mainWindow), "resultList", resultList); +// gtk_clist_set_policy(GTK_CLIST(resultList), GTK_POLICY_AUTOMATIC, 0); +// gtk_clist_set_border(GTK_CLIST(resultList), GTK_SHADOW_ETCHED_IN); + gtk_widget_show (resultList); + gtk_box_pack_start (GTK_BOX (resultPanel), resultList, TRUE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (resultList), "select_row", + GTK_SIGNAL_FUNC (on_resultList_selection_changed), + NULL); + /* Add a vertical scrollbar to the GtkCList widget */ + textScrollbar = gtk_vscrollbar_new (NULL); + gtk_clist_set_vadjustment (GTK_CLIST(resultList), gtk_range_get_adjustment(GTK_RANGE(textScrollbar))); + gtk_box_pack_start (GTK_BOX (resultPanel), textScrollbar, FALSE, FALSE, 0); + gtk_widget_show (textScrollbar); + + +/* + statusbar1 = gtk_statusbar_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "statusbar1", statusbar1); + gtk_widget_show (statusbar1); + gtk_box_pack_start (GTK_BOX (mainPanel), statusbar1, FALSE, TRUE, 0); +*/ + + arrow1 = gtk_button_new_with_label ("[<]"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "arrow1", arrow1); + gtk_widget_show (arrow1); + gtk_box_pack_start (GTK_BOX (headerPanel), arrow1, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (arrow1), "clicked", + GTK_SIGNAL_FUNC (on_arrow1_button_press_event), + NULL); + + arrow2 = gtk_button_new_with_label ("[>]"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "arrow2", arrow2); + gtk_widget_show (arrow2); + gtk_box_pack_start (GTK_BOX (headerPanel), arrow2, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (arrow2), "clicked", + GTK_SIGNAL_FUNC (on_arrow2_button_press_event), + NULL); + + + statusbar1 = gtk_label_new (""); + gtk_object_set_data (GTK_OBJECT (mainWindow), "statusbar1", statusbar1); + gtk_widget_show (statusbar1); + gtk_box_pack_start (GTK_BOX (mainPanel), statusbar1, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (statusbar1), GTK_JUSTIFY_LEFT); + gtk_misc_set_padding (GTK_MISC (statusbar1), 2, 0); + + + GTKEntryDisp::__initialize(); + chapDisplay = new GTKChapDisp(moduleText); + entryDisplay = new GTKEntryDisp(moduleText); + + return mainWindow; +} + +void MainWindow::initSWORD() { + + GtkWidget *menuChoice; + int viewNumber = 1; + char menuName[64]; + ModMap::iterator it; + SectionMap::iterator sit; + ConfigEntMap::iterator eit; + char *font; + SWModule *curMod; + +/* First, check and see whether SWMgr found any installed books. If not, tell the user what the problem is. */ +/* Print a short notice to stderr, for use when the program is invoked from the command line, */ +/* and also put a bit longer message into the spot where bible text would otherwise show up. */ +/* Then, return out of this function, because there's nothing left to do. */ + + if (mainMgr->Modules.empty()==TRUE) { + fprintf(stderr,"SWMgr: Can't find 'mods.conf' or 'mods.d'. Try setting:\n\tSWORD_PATH=<directory containing mods.conf>\n\tOr see the README file for a full description of setup options.\n\t"); + + gtk_text_set_point(GTK_TEXT(moduleText), 0); + gtk_text_forward_delete (GTK_TEXT (moduleText), gtk_text_get_length((GTK_TEXT(moduleText)))); + int curPos = 0; + gtk_text_freeze (GTK_TEXT(moduleText)); + gtk_text_insert(GTK_TEXT(moduleText), NULL, &moduleText->style->black, NULL, "\nCheatah was unable to find any books installed!\n\n", -1); + gtk_text_insert(GTK_TEXT(moduleText), NULL, &moduleText->style->black, NULL, "They should be listed in a configuration file named either: ", -1); + gtk_text_insert(GTK_TEXT(moduleText), NULL, &moduleText->style->black, NULL, "'mods.conf' or 'mods.d'. \n\n", -1); + gtk_text_insert(GTK_TEXT(moduleText), NULL, &moduleText->style->black, NULL, "Try setting:\n\tSWORD_PATH=<directory containing mods.conf>\n\t",-1); + gtk_text_insert(GTK_TEXT(moduleText), NULL, &moduleText->style->black, NULL, "Or see the README file for a full description of setup options.\n", -1); + gtk_text_set_point(GTK_TEXT(moduleText), curPos); + gtk_text_thaw(GTK_TEXT(moduleText)); + + return; + } + +/* +* Create filters to use, depending on the needs of the installed modules. +* Right now, basically just handling GBF files and converting them to plain +* text for display. So far, I haven't found any modules that specify +* anything other than GBF, but I've dropped in code to +* install the thtml to plain filter just in case, since it's available. +* Question: I'm installing this as a display filter - would it make more +* sense to install it is a raw filter, so that I could use "plain" as the +* base for any strip filters we may need? Or is that used for something else, +* like compression or decyphering locked books? +*/ + + gbftoplain = new GBFPlain(); + thmlplain = new ThMLPlain(); + +/* +* Next, if SWMgr did find some book modules installed , hook them up to any filters needed +* and set up the menues to reflect them. +* Pick a default module to show on startup. +*/ + + for (it = mainMgr->Modules.begin(); it != mainMgr->Modules.end(); it++) { + curMod = (*it).second; + menuChoice = gtk_menu_item_new_with_label (curMod->Name()); + sprintf(menuName, "viewMod%d", viewNumber++); + gtk_object_set_data (GTK_OBJECT (mainWindow), menuName, menuChoice); + gtk_widget_show (menuChoice); + gtk_signal_connect(GTK_OBJECT (menuChoice), "activate", + GTK_SIGNAL_FUNC (on_viewMod_activate), + g_strdup(curMod->Name())); + + if ((sit = mainMgr->config->Sections.find(curMod->Name())) != mainMgr->config->Sections.end()) { + if ((eit = (*sit).second.find("SourceType")) != (*sit).second.end()) { + if (!strcasecmp((*eit).second.c_str(), "GBF")) { + curMod->AddRenderFilter(gbftoplain); + } + else if (!strcasecmp((*eit).second.c_str(), "ThML")) { + curMod->AddRenderFilter(thmlplain); + } + } + } + + if (!strcmp((*it).second->Type(), "Biblical Texts")) { + gtk_container_add (GTK_CONTAINER (menuView), menuChoice); + font = 0; + if ((sit = mainMgr->config->Sections.find(curMod->Name())) != mainMgr->config->Sections.end()) { + if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) { + font = (char *)(*eit).second.c_str(); + } + } +// CreateTextPane((*it).second, font); + curMod->Disp(chapDisplay); // set our GTKChapDisp object up for the diplayer of each Biblical Text module + if (!this->curMod) // set currently selected module for app to first module from SWMgr (Bible Texts get first preference + this->curMod = curMod; + } + else { + curMod->Disp(entryDisplay); // set our GTKEntryDisp object up for the diplayer of each module other than Biblical Texts + if (!strcmp(curMod->Type(), "Commentaries")) { + gtk_container_add (GTK_CONTAINER (menuCommentaries), menuChoice); + // CreateCommentPane((*it).second); + } + if (!strcmp(curMod->Type(), "Lexicons / Dictionaries")) { + gtk_container_add (GTK_CONTAINER (menuDictionaries), menuChoice); + // CreateLDPane((*it).second); + } + } + + + } + gtk_container_add (GTK_CONTAINER (menuView), commentaries); + gtk_container_add (GTK_CONTAINER (menuView), dictionaries); + + if (!this->curMod) // We didn't find a bible text, so set currently selected module for app to first module from SWMgr + this->curMod = curMod; // Should be o.k. to do this, because we've already tested to see if SWMgr thinks it found something + assert(this->curMod!=NULL); + if(this->curMod!=NULL) // Go ahead and display default module + lookupTextChanged(); +} + + +void MainWindow::lookupTextChanged() { + string keyText; + gchar *entryText; + char tmpBuf[255]; + + entryText = gtk_entry_get_text(GTK_ENTRY(lookupText)); + keyText = entryText; + + if (curMod) { + curMod->SetKey(keyText.c_str()); + curMod->Display(); + sprintf(tmpBuf, "%s (%s)", curMod->KeyText(), curMod->Name()); + gtk_label_set(GTK_LABEL(statusbar1), tmpBuf); + } +} + +void MainWindow::viewModActivate(GtkMenuItem *sender, gchar *modName) { + ModMap::iterator it; + + it = mainMgr->Modules.find(modName); + if (it != mainMgr->Modules.end()) { + curMod = (*it).second; + lookupTextChanged(); + } + else curMod = 0; +} + + +void MainWindow::navigateButtonClicked(int direction) { + if (curMod) { + if (direction) + (*curMod)++; + else (*curMod)--; + (const char *)*curMod; // snap to closest locations + const gchar *text = curMod->KeyText(); + gtk_entry_set_text(GTK_ENTRY(lookupText), text); +// curMod->Display(); + } +} + + +void MainWindow::searchButtonClicked() { + string srchText; + gchar *entryText; + const gchar *resultText; + gchar **clistText = (gchar **)&resultText; + + + gtk_clist_clear(GTK_CLIST(resultList)); + + entryText = gtk_entry_get_text(GTK_ENTRY(searchText)); + srchText = entryText; + + if (curMod) { + int searchType = GTK_TOGGLE_BUTTON(regexSearch)->active ? 0 : GTK_TOGGLE_BUTTON(phraseSearch)->active ? -1 : -2; + int searchParams = GTK_TOGGLE_BUTTON(caseSensitive)->active ? 0 : REG_ICASE; + gtk_clist_freeze(GTK_CLIST(resultList)); + for (ListKey searchResults = curMod->Search(srchText.c_str(), searchType, searchParams); !searchResults.Error(); searchResults++) { + resultText = (const char *)searchResults; + gtk_clist_append(GTK_CLIST(resultList), clistText); + } + gtk_clist_thaw(GTK_CLIST(resultList)); + } +} + + +void MainWindow::resultListSelectionChanged(GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data) { + gchar *text; + + gtk_clist_get_text(GTK_CLIST(resultList), row, column, &text); + + if (text) { + gtk_entry_set_text(GTK_ENTRY(lookupText), text); + } +} + +GdkColor GTKEntryDisp::colourBlue; +GdkColor GTKEntryDisp::colourGreen; + +/* */ +/* Note: we have a warning that should be fixed here. GTKEntryDisp::Display() is defined */ +/* as returning char, but doesn't have a return statement */ +/* What was intended - a return code? That doesn't seem right, because those are */ +/* usually int's. But it isn't defined as returning a char*, so it doesn't seem */ +/* likely that it's intended to return the text involved. */ +/* */ +char GTKEntryDisp::Display(SWModule &imodule) { + char tmpBuf[255]; + + gtk_text_set_point(GTK_TEXT(gtkText), 0); + gtk_text_forward_delete (GTK_TEXT (gtkText), gtk_text_get_length((GTK_TEXT(gtkText)))); + int curPos = 0; + (const char *)imodule; // snap to entry + gtk_text_freeze (GTK_TEXT(gtkText)); + sprintf(tmpBuf, "[%s] ", imodule.KeyText()); + gtk_text_insert(GTK_TEXT(gtkText), NULL, &colourBlue, NULL, tmpBuf, -1); + gtk_text_insert(GTK_TEXT(gtkText), NULL, >kText->style->black, NULL, (const char *)imodule, -1); + gtk_text_set_point(GTK_TEXT(gtkText), curPos); + gtk_text_thaw(GTK_TEXT(gtkText)); +} + +/* */ +/* Note: we have a warning that should be fixed here. GTKChapDisp::Display() is defined */ +/* as returning char, but doesn't have a return statement. */ +/* What was intended - a return code? That doesn't seem right, because those are */ +/* usually int's. But it isn't defined as returning a char*, so it doesn't seem */ +/* likely that it's intended to return the text involved. */ +/* */ + +char GTKChapDisp::Display(SWModule &imodule) { + char tmpBuf[255]; + + gtk_text_set_point(GTK_TEXT(gtkText), 0); + gtk_text_forward_delete (GTK_TEXT (gtkText), gtk_text_get_length((GTK_TEXT(gtkText)))); + VerseKey *key = (VerseKey *)(SWKey *)imodule; + int curVerse = key->Verse(); + int curChapter = key->Chapter(); + int curBook = key->Book(); + int curPos = 0; + gfloat adjVal; + gtk_text_freeze (GTK_TEXT(gtkText)); + for (key->Verse(1); (key->Book() == curBook && key->Chapter() == curChapter && !imodule.Error()); imodule++) { + sprintf(tmpBuf, "%d. ", key->Verse()); + gtk_text_insert(GTK_TEXT(gtkText), NULL, &colourBlue, NULL, tmpBuf, -1); + if (key->Verse() == curVerse) { + gtk_text_thaw(GTK_TEXT(gtkText)); + adjVal = GTK_TEXT(gtkText)->vadj->upper; + curPos = gtk_text_get_length(GTK_TEXT(gtkText)); + gtk_text_insert(GTK_TEXT(gtkText), NULL, &colourGreen, NULL, (const char *)imodule, -1); + gtk_text_freeze (GTK_TEXT(gtkText)); + } + else { + gtk_text_insert(GTK_TEXT(gtkText), NULL, >kText->style->black, NULL, (const char *)imodule, -1); + } + gtk_text_insert(GTK_TEXT(gtkText), NULL, >kText->style->black, NULL, " ", -1); + } + gtk_text_set_point(GTK_TEXT(gtkText), curPos); + gtk_text_thaw(GTK_TEXT(gtkText)); + adjVal -= (GTK_TEXT(gtkText)->vadj->page_size / 2); + gtk_adjustment_set_value(GTK_TEXT(gtkText)->vadj, (adjVal>0)?adjVal:0); + key->Verse(1); + key->Chapter(1); + key->Book(curBook); + key->Chapter(curChapter); + key->Verse(curVerse); +} diff --git a/apps/X11/cheatah/cheatah.h b/apps/X11/cheatah/cheatah.h new file mode 100644 index 0000000..42fae6d --- /dev/null +++ b/apps/X11/cheatah/cheatah.h @@ -0,0 +1,162 @@ +/* Note: You are free to use whatever license you want. + Eventually you will be able to edit it within Glade. */ + +/* cheatah + * Copyright (C) <YEAR> <AUTHORS> + * + * 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 <gtk/gtk.h> +#include <swmgr.h> +#include <swdisp.h> + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +/* I'm going to try commenting it out - it no longer seems to be used. */ +/* Note: This doesn't seem to have caused any problems so far. */ +/* +GtkWidget* +get_widget (GtkWidget *widget, + gchar *widget_name); +*/ + + /* + * This is an internally used function for setting notebook tabs. It is only + * included in this header file so you don't get compilation warnings + */ +void +set_notebook_tab (GtkWidget *notebook, + gint page_num, + GtkWidget *widget); + +GtkWidget* create_mainWindow (void); +void destroy_mainWindow (void); + +class GTKEntryDisp : public SWDisplay { +protected: + GtkWidget *gtkText; +public: + static GdkColor colourGreen; + static GdkColor colourBlue; + static void __initialize() { + GdkColormap *cmap; + + cmap = gdk_colormap_get_system(); + colourGreen.red = 0; + colourGreen.green = 0x00ff; + colourGreen.blue = 0xffff; + colourBlue.red = 0; + colourBlue.green = 0; + colourBlue.blue = 0xffff; + if (!gdk_color_alloc(cmap, &colourGreen)) { + g_error("couldn't allocate colour"); + } + if (!gdk_color_alloc(cmap, &colourBlue)) { + g_error("couldn't allocate colour"); + } + } + GTKEntryDisp(GtkWidget *gtkText) { this->gtkText = gtkText; } + virtual char Display(SWModule &imodule); +}; + +class GTKChapDisp : public GTKEntryDisp { +public: + GTKChapDisp(GtkWidget *gtkText) : GTKEntryDisp(gtkText) {} + virtual char Display(SWModule &imodule); +}; + +class MainWindow { + GtkWidget *mainWindow; + GtkWidget *mainPanel; + GtkWidget *headerPanel; + GtkWidget *handlebox3; + GtkWidget *menubar4; + GtkWidget *File; + GtkWidget *menuFile; + GtkWidget *Exit3; + GtkWidget *View3; + GtkWidget *Help; + GtkWidget *menuHelp; + GtkWidget *menuView; + GtkWidget *menuCommentaries; + GtkWidget *menuDictionaries; + GtkWidget *commentaries; + GtkWidget *dictionaries; + GtkWidget *About; + GtkWidget *handlebox4; + GtkWidget *hbox6; + GtkWidget *label2; + GtkWidget *lookupText; + GtkWidget *hbox2; + GtkWidget *moduleText; + GtkWidget *handlebox5; + GtkWidget *searchPanel; + GtkWidget *hbox4; + GtkWidget *searchText; + GtkWidget *searchButton; + GtkWidget *searchSettingsPanel; + GtkWidget *searchTypePanel; + GSList *searchType_group; + GtkWidget *regexSearch; + GtkWidget *phraseSearch; + GtkWidget *multiWordSearch; + GtkWidget *searchOptionsPanel; + GtkWidget *caseSensitive; + GtkWidget *resultList; + GtkWidget *statusbar1; + GtkWidget *textScrolledWindow; + GtkWidget *textScrollbar; + GtkWidget *arrow1; + GtkWidget *arrow2; + + + SWMgr *mainMgr; + SWModule *curMod; + SWDisplay *chapDisplay; + SWDisplay *entryDisplay; + SWFilter *gbftoplain; // GBF seems to be the most common format + SWFilter *thmlplain; // ThML to Plain filter is also available - put it in just in case + // Should there be any more added? (Do we need a RWPtoPlain filter?) + +public: + MainWindow(); + ~MainWindow(); + GtkWidget *create(); + void initSWORD(); + void lookupTextChanged(); + void viewModActivate(GtkMenuItem *sender, gchar *modName); + void searchButtonClicked(); + void navigateButtonClicked(int direction); + void resultListSelectionChanged(GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data); + SWMgr *getSwordManager(void) {return(mainMgr);}; +}; + + +extern MainWindow *cheatahWindow; + + + + + + + + + + diff --git a/apps/X11/cheatah/cheatsig.cpp b/apps/X11/cheatah/cheatsig.cpp new file mode 100644 index 0000000..d3646ba --- /dev/null +++ b/apps/X11/cheatah/cheatsig.cpp @@ -0,0 +1,326 @@ +/* Note: You are free to use whatever license you want. + Eventually you will be able to edit it within Glade. */ + +/* cheatah + * Copyright (C) <YEAR> <AUTHORS> + * + * 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 <gtk/gtk.h> +#include "cheatah.h" +#include "cheatsig.h" + +int +main (int argc, char *argv[]) +{ + GtkWidget *mainWindow; + + gtk_set_locale (); + gtk_init (&argc, &argv); + + /* + * The following code was added by Glade to create one of each component + * (except popup menus), just so that you see something after building + * the project. Delete any components that you don't want shown initially. + */ + mainWindow = create_mainWindow (); + gtk_widget_show (mainWindow); + + gtk_main (); + + destroy_mainWindow(); + return 0; +} + + +void +on_Exit3_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_View3_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_Help_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_viewMod_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + cheatahWindow->viewModActivate(menuitem, (gchar *)user_data); +} + + +/* +* This function is used to do a quick and dirty translation of the formating +* commands in the module descriptions into reasonable equivalents in +* plain ascii. (The descriptions look like .rtf-lite, perhaps?) +* It takes a character pointer to the module description and +* returns a pointer to a new string that's been fixed up. Ultimately, +* a better solution should be developed, but this improves the +* appearance of the descriptions significantly for now. +* +* Perhaps this could serve as the basis for a function that would take +* an input string and a text widget, then insert the string into the +* widget in a formatted manner (good next step?); +*/ + +char * +str_fixup_format (const char *string) +{ + char *strNew; + int i,j; + + assert(string!=NULL); + strNew = (char *) malloc(strlen(string)); // First, allocate space for the new string + assert(strNew!=NULL); + if(strNew==NULL) return ((char *)NULL); // Make sure we actually got it + + for (i=0,j=0;i<strlen(string);i++) { // Work through input string char at a time + if (string[i]=='\\') { // Found backslash, probably a command + if (string[i+1]=='q') { // Looks like an alignment command + if(string[i+2]=='c') { // Want to center text + strNew[j]='\n'; // - make do with a new line + j++; + strNew[j]='\t'; // - and a tab for now + j++; + } + i=i+2; // Assume command and skip past q and ? + continue; + } + else { // if string[i+1] != 'q' + if(string[i+1]=='p' && string[i+2]=='a' && string[i+3]=='r') { // "\par" or "\pard"command? + if(string[i+4]=='d') { // "\pard" command - ignore for now + i=i+4; // Skip past the "pard" + continue; + } + else { // "\par" command + strNew[j]='\n'; // - use a new line for now + j++; + i=i+3; // Skip past the "par" + continue; + } + } + } // End of "else" + } // End of "if(string[i]=='\\') + strNew[j]=string[i]; // Don't know what it is, so copy it + j++; + } // End of "for" + strNew[j]='\0'; // Terminate new string + +// fprintf(stderr, "strlen(string) = %i, strlen(strNew) = %i \n", strlen(string), strlen(strNew)); // Used for debugging +// fprintf(stderr, "string = \"%s\"\n",string); // Used for debugging +// fprintf(stderr, "strNew = \"%s\"\n",strNew); // Used for debugging + + assert(strlen(strNew)<=strlen(string)); // Nothing we have done should have lengthend it + return(strNew); // Return fixed-up string +} + +void +on_About_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + SWMgr *mainMgr; + + mainMgr=cheatahWindow->getSwordManager(); + int i; + char *tempString; + static char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries"}; + string newtext, tmptext; + ModMap::iterator it; + SectionMap::iterator sit; + ConfigEntMap::iterator eit; + + GtkWidget *dialogAbout; + GtkWidget *hBoxModDesc; + GtkWidget *textAboutMods; + GtkWidget *textScrollbarMods; + GtkWidget *hBoxAbout; + GtkWidget *textAbout; + GtkWidget *textScrollbar; + GtkWidget *buttonOK; + + dialogAbout=gtk_dialog_new(); + gtk_object_set_data (GTK_OBJECT (dialogAbout), "dialogAbout", dialogAbout); + gtk_window_set_title (GTK_WINDOW (dialogAbout), "About Cheatah"); + gtk_window_set_policy (GTK_WINDOW (dialogAbout), FALSE, TRUE, FALSE); + gtk_widget_set_usize(GTK_WIDGET(dialogAbout), 360, 360); + gtk_window_position(GTK_WINDOW(dialogAbout),GTK_WIN_POS_CENTER); + + buttonOK = gtk_button_new_with_label("O.k."); + +/* */ +/* Set it up so that the dialog box and all it's children are automatically */ +/* destroyed when the user is done looking at it. */ +/* Note: Use gtk_signal_connect_object() rather than */ +/* gtk_signal_connect(), because we want the "destroy" */ +/* connected to the dialog box, not just the button. */ +/* */ + gtk_signal_connect_object(GTK_OBJECT(buttonOK), + "clicked", + GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT(dialogAbout)); + + gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialogAbout)->action_area), buttonOK); + + hBoxModDesc = gtk_hbox_new (FALSE,0); + gtk_object_set_data (GTK_OBJECT (dialogAbout), "hBoxModDesc", hBoxModDesc); + gtk_box_pack_end (GTK_BOX (GTK_DIALOG(dialogAbout)->vbox), hBoxModDesc, TRUE, TRUE, 0); + textAboutMods = gtk_text_new (NULL, NULL); + gtk_object_set_data (GTK_OBJECT (dialogAbout), "textAboutMods", textAboutMods); + gtk_box_pack_start (GTK_BOX (hBoxModDesc), textAboutMods, TRUE, TRUE, 0); + gtk_text_set_editable (GTK_TEXT (textAboutMods), FALSE); + gtk_text_set_word_wrap (GTK_TEXT (textAboutMods), TRUE); + + gtk_text_freeze (GTK_TEXT(textAboutMods)); + gtk_text_set_point(GTK_TEXT(textAboutMods), 0); + gtk_text_forward_delete (GTK_TEXT (textAboutMods), gtk_text_get_length((GTK_TEXT(textAboutMods)))); + + if (mainMgr->Modules.empty()==TRUE) { + gtk_text_freeze (GTK_TEXT(textAboutMods)); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "\nCheatah was unable to find any books installed!\n\n", -1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "They should be listed in a configuration file named either: ", -1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "'mods.conf' or 'mods.d'. \n\n", -1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "Try setting:\n\tSWORD_PATH=<directory containing mods.conf>\n\t",-1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "Or see the README file for a full description of setup options.\n", -1); + } + else { + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "\tInstalled Book Modules", -1); + for (i = 0; i < 3; i++) { + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "\n\n\t", -1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, modtypes[i], -1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "\n\n", -1); + for (it = mainMgr->Modules.begin(); it != mainMgr->Modules.end(); it++) { + if (!strcmp((*it).second->Type(), modtypes[i])) { + sit = mainMgr->config->Sections.find((*it).second->Name()); + if (sit != mainMgr->config->Sections.end()) { + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, (*it).second->Name() ,-1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, ": " ,-1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, (*it).second->Description() ,-1); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "\n\n", -1); + eit = (*sit).second.find("About"); + if (eit != (*sit).second.end()) { +// gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, (*eit).second.c_str() ,-1); + tempString=str_fixup_format((*eit).second.c_str() ); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, tempString, -1); + free(tempString); + gtk_text_insert(GTK_TEXT(textAboutMods), NULL, &textAboutMods->style->black, NULL, "\n\n" ,-1); + } +// eit = (*sit).second.find("SourceType"); +// if (eit != (*sit).second.end()) { +// fprintf(stderr,"SourceType: %s\n", (*eit).second.c_str() ); +// } + } + } + } + } + } + + gtk_text_set_point(GTK_TEXT(textAboutMods), 0); + gtk_text_thaw(GTK_TEXT(textAboutMods)); + + /* Add a vertical scrollbar to the textAboutMods GtkText widget */ + textScrollbarMods = gtk_vscrollbar_new (GTK_TEXT (textAboutMods)->vadj); + gtk_box_pack_end (GTK_BOX (hBoxModDesc), textScrollbarMods, FALSE, FALSE, 0); + + hBoxAbout = gtk_hbox_new (FALSE,0); + gtk_object_set_data (GTK_OBJECT (dialogAbout), "hBoxAbout", hBoxAbout); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialogAbout)->vbox), hBoxAbout, FALSE, TRUE, 0); + textAbout = gtk_text_new (NULL, NULL); + gtk_object_set_data (GTK_OBJECT (dialogAbout), "textAbout", textAbout); + gtk_box_pack_start (GTK_BOX (hBoxAbout), textAbout, TRUE, TRUE, 0); + gtk_text_set_editable (GTK_TEXT (textAbout), FALSE); + gtk_text_set_word_wrap (GTK_TEXT (textAbout), TRUE); + + gtk_text_freeze (GTK_TEXT(textAbout)); + gtk_text_set_point(GTK_TEXT(textAbout), 0); + gtk_text_forward_delete (GTK_TEXT (textAbout), gtk_text_get_length((GTK_TEXT(textAbout)))); + gtk_text_insert(GTK_TEXT(textAbout), NULL, &textAbout->style->black, NULL, "Cheatah is a quick and dirty GTK/Linux front end to the Sword software.", -1); + gtk_text_insert(GTK_TEXT(textAbout), NULL, &textAbout->style->black, NULL, "\n\nSword is developed by the CrossWire Software & Bible Society:",-1); + gtk_text_insert(GTK_TEXT(textAbout), NULL, &textAbout->style->black, NULL, "\n\tP. O. Box 2528",-1); + gtk_text_insert(GTK_TEXT(textAbout), NULL, &textAbout->style->black, NULL, "\n\tTempe, AZ 85280-2528 ", -1); + gtk_text_insert(GTK_TEXT(textAbout), NULL, &textAbout->style->black, NULL, "\n\thttp://www.crosswire.org ", -1); + gtk_text_insert(GTK_TEXT(textAbout), NULL, &textAbout->style->black, NULL, "\n\nThis software is provided free for the study of God and His Word.",-1); + + gtk_text_set_point(GTK_TEXT(textAbout), 0); + gtk_text_thaw(GTK_TEXT(textAbout)); + + /* Add a vertical scrollbar to the textAbout GtkText widget */ + textScrollbar = gtk_vscrollbar_new (GTK_TEXT (textAbout)->vadj); + gtk_box_pack_end (GTK_BOX (hBoxAbout), textScrollbar, FALSE, FALSE, 0); + + gtk_widget_show_all(dialogAbout); // "show_all" makes all the children visable too + +/* */ +/* No need to clean up the various widgets - we've arranged */ +/* for that to happen automatically when the user presses the */ +/* "o.k." button. */ +/* */ + + return; +} + + +void +on_lookupText_changed (GtkEditable *editable, + gpointer user_data) +{ + cheatahWindow->lookupTextChanged(); +} + + +void +on_searchButton_clicked (GtkButton *button, + gpointer user_data) +{ + cheatahWindow->searchButtonClicked(); +} + + +void +on_resultList_selection_changed (GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data) +{ + cheatahWindow->resultListSelectionChanged(clist, row, column, event, data); +} + + +void on_arrow1_button_press_event(GtkButton *button, gpointer user_data) { + cheatahWindow->navigateButtonClicked(0); +} + + +void on_arrow2_button_press_event(GtkButton *button, gpointer user_data) { + cheatahWindow->navigateButtonClicked(1); +} + + + + + diff --git a/apps/X11/cheatah/cheatsig.h b/apps/X11/cheatah/cheatsig.h new file mode 100644 index 0000000..9c9fea4 --- /dev/null +++ b/apps/X11/cheatah/cheatsig.h @@ -0,0 +1,68 @@ +/* Note: You are free to use whatever license you want. + Eventually you will be able to edit it within Glade. */ + +/* cheatah + * Copyright (C) <YEAR> <AUTHORS> + * + * 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 <gtk/gtk.h> + + +void +on_Exit3_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_View3_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_Help_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_viewMod_activate (GtkMenuItem *menuitem, + gpointer user_data); + +char * +str_fixup_format (const char *string); + +void +on_About_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_lookupText_changed (GtkEditable *editable, + gpointer user_data); + +void +on_searchButton_clicked (GtkButton *button, + gpointer user_data); + +void +on_resultList_selection_changed (GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data); + +void +on_arrow1_button_press_event (GtkButton *button, + gpointer user_data); + +void +on_arrow2_button_press_event (GtkButton *button, + gpointer user_data); + + + diff --git a/apps/X11/cheatah/configure b/apps/X11/cheatah/configure new file mode 100644 index 0000000..6bd577d --- /dev/null +++ b/apps/X11/cheatah/configure @@ -0,0 +1,1707 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" +ac_help="$ac_help + --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)" +ac_help="$ac_help + --disable-gtktest Do not try to compile and run a test GTK program" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=cheatah.cpp + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# 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 +# 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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:564: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:617: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# 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 conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $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 "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +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" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:674: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=cheatah + +VERSION=0.1 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <<EOF +#define PACKAGE "$PACKAGE" +EOF + +cat >> confdefs.h <<EOF +#define VERSION "$VERSION" +EOF + + + +missing_dir=`cd $ac_aux_dir && pwd` +echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +echo "configure:720: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:733: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:746: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:759: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:772: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:789: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:819: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:870: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 913 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:949: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:977: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + + +# Check whether --with-gtk-prefix or --without-gtk-prefix was given. +if test "${with_gtk_prefix+set}" = set; then + withval="$with_gtk_prefix" + gtk_config_prefix="$withval" +else + gtk_config_prefix="" +fi + +# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. +if test "${with_gtk_exec_prefix+set}" = set; then + withval="$with_gtk_exec_prefix" + gtk_config_exec_prefix="$withval" +else + gtk_config_exec_prefix="" +fi + +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + : +else + enable_gtktest=yes +fi + + + for module in . + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + # Extract the first word of "gtk-config", so it can be a program name with args. +set dummy gtk-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1059: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GTK_CONFIG" in + /*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +GTK_CONFIG="$ac_cv_path_GTK_CONFIG" +if test -n "$GTK_CONFIG"; then + echo "$ac_t""$GTK_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_gtk_version=1.2.0 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:1094: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext <<EOF +#line 1117 "configure" +#include "confdefs.h" + +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +EOF +if { (eval echo configure:1195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gtk=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" + else + echo "$ac_t""no" 1>&6 + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext <<EOF +#line 1229 "configure" +#include "confdefs.h" + +#include <gtk/gtk.h> +#include <stdio.h> + +int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +; return 0; } +EOF +if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + { echo "configure: error: Cannot find GTK: Is gtk-config in path?" 1>&2; exit 1; } + fi + + + rm -f conf.gtktest + + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1283: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1315: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext << EOF + +#line 1326 "configure" +#include "confdefs.h" + +int main(){return(0);} +EOF +if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1357: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:1362: checking whether we are using GNU C++" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.C <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gxx=yes +else + ac_cv_prog_gxx=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + +if test $ac_cv_prog_gxx = yes; then + GXX=yes +else + GXX= +fi + +ac_test_CXXFLAGS="${CXXFLAGS+set}" +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS= +echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:1390: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes +else + ac_cv_prog_cxx_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi + + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +LIBS="$LIBS -L../../../lib -lsword -lz" +if test "x$GCC" = "xyes"; then + if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then + CFLAGS="$CFLAGS -Wall" + fi +fi + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | 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 \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CC@%$CC%g +s%@GTK_CONFIG@%$GTK_CONFIG%g +s%@GTK_CFLAGS@%$GTK_CFLAGS%g +s%@GTK_LIBS@%$GTK_LIBS%g +s%@CXX@%$CXX%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"Makefile"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/apps/X11/cheatah/configure.in b/apps/X11/cheatah/configure.in new file mode 100644 index 0000000..b067a5f --- /dev/null +++ b/apps/X11/cheatah/configure.in @@ -0,0 +1,25 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(cheatah.cpp) + + +AM_INIT_AUTOMAKE(cheatah, 0.1) + +AC_PROG_CC + +AM_PATH_GTK(1.2.0, + [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], + AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) + +AC_PROG_CXX + +AC_LANG_CPLUSPLUS +LIBS="$LIBS -L../../../lib -lsword -lz" +dnl Only use -Wall if we have gcc +if test "x$GCC" = "xyes"; then + if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then + CFLAGS="$CFLAGS -Wall" + fi +fi + +AC_OUTPUT(Makefile) diff --git a/apps/X11/cheatah/install-sh b/apps/X11/cheatah/install-sh new file mode 100644 index 0000000..e843669 --- /dev/null +++ b/apps/X11/cheatah/install-sh @@ -0,0 +1,250 @@ +#!/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 + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + 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 + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + 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 + true + 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 + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; 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 + true + 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 true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/apps/X11/cheatah/missing b/apps/X11/cheatah/missing new file mode 100644 index 0000000..cbe2b0e --- /dev/null +++ b/apps/X11/cheatah/missing @@ -0,0 +1,188 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard <pinard@iro.umontreal.ca>, 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. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +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 + +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 + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. 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.in` + if test -z "$files"; then + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` + test -z "$files" || files="$files.in" + else + files=`echo "$files" | sed -e 's/:/ /g'` + fi + test -z "$files" && files="config.h.in" + touch $files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + 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$/touch \1.in/' \ + | sh + ;; + + 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 + ;; + + makeinfo) + 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 + ;; + + *) + 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 diff --git a/apps/X11/cheatah/mkinstalldirs b/apps/X11/cheatah/mkinstalldirs new file mode 100644 index 0000000..9bfeff6 --- /dev/null +++ b/apps/X11/cheatah/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1.1.1 1999/05/04 22:03:35 scribe Exp $ + +errstatus=0 + +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" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/apps/X11/cheatah/save/Makefile.am b/apps/X11/cheatah/save/Makefile.am new file mode 100644 index 0000000..1f8f037 --- /dev/null +++ b/apps/X11/cheatah/save/Makefile.am @@ -0,0 +1,2 @@ + +CXXFLAGS = $(GTK_CFLAGS) -I../../../include diff --git a/apps/X11/cheatah/save/cheatah.glade b/apps/X11/cheatah/save/cheatah.glade new file mode 100644 index 0000000..0aa6e4d --- /dev/null +++ b/apps/X11/cheatah/save/cheatah.glade @@ -0,0 +1,406 @@ +<?xml version="1.0"?> +<GTK-Interface> + +<project> + <name>cheatah</name> + <srcdir>/tmp</srcdir> + <main_source_file>cheatah.cpp</main_source_file> + <main_header_file>cheatah.h</main_header_file> + <handler_source_file>cheatsig.cpp</handler_source_file> + <handler_header_file>cheatsig.h</handler_header_file> +</project> + +<widget> + <class>GtkWindow</class> + <name>mainWindow</name> + <title>Cheatah - SWORD Quick Lookup / Search</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <allow_shrink>True</allow_shrink> + <allow_grow>True</allow_grow> + <auto_shrink>False</auto_shrink> + + <widget> + <class>GtkVBox</class> + <name>mainPanel</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHBox</class> + <name>headerPanel</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHandleBox</class> + <name>handlebox3</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkMenuBar</class> + <name>menubar4</name> + + <widget> + <class>GtkMenuItem</class> + <name>File3</name> + <label>File</label> + <right_justify>False</right_justify> + + <widget> + <class>GtkMenu</class> + <name>menu13</name> + + <widget> + <class>GtkMenuItem</class> + <name>Exit3</name> + <signal> + <name>activate</name> + <handler>on_Exit3_activate</handler> + <last_modification_time>Sun, 06 Dec 1998 19:49:44 GMT</last_modification_time> + </signal> + <label>Exit</label> + <right_justify>False</right_justify> + </widget> + </widget> + </widget> + + <widget> + <class>GtkMenuItem</class> + <name>View3</name> + <signal> + <name>activate</name> + <handler>on_View3_activate</handler> + <last_modification_time>Sun, 06 Dec 1998 19:49:46 GMT</last_modification_time> + </signal> + <label>View</label> + <right_justify>False</right_justify> + </widget> + + <widget> + <class>GtkMenuItem</class> + <name>Help</name> + <signal> + <name>activate</name> + <handler>on_Help_activate</handler> + <last_modification_time>Sun, 06 Dec 1998 19:52:46 GMT</last_modification_time> + </signal> + <label>Help</label> + <right_justify>True</right_justify> + + <widget> + <class>GtkMenu</class> + <name>menu14</name> + + <widget> + <class>GtkMenuItem</class> + <name>About</name> + <signal> + <name>activate</name> + <handler>on_About_activate</handler> + <last_modification_time>Sun, 06 Dec 1998 19:53:14 GMT</last_modification_time> + </signal> + <label>About</label> + <right_justify>False</right_justify> + </widget> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkHandleBox</class> + <name>handlebox4</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox6</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkLabel</class> + <name>label2</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + <label>FreeForm Lookup:</label> + <justify>GTK_JUSTIFY_RIGHT</justify> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>2</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkEntry</class> + <name>lookupText</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + <can_focus>True</can_focus> + <signal> + <name>changed</name> + <handler>on_lookupText_changed</handler> + <last_modification_time>Sun, 06 Dec 1998 20:10:28 GMT</last_modification_time> + </signal> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + </widget> + </widget> + </widget> + + <widget> + <class>GtkArrow</class> + <name>arrow1</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + <signal> + <name>button_press_event</name> + <handler>on_arrow1_button_press_event</handler> + <after>True</after> + <last_modification_time>Sun, 10 Jan 1999 05:14:03 GMT</last_modification_time> + </signal> + <arrow_type>GTK_ARROW_LEFT</arrow_type> + <shadow_type>GTK_SHADOW_OUT</shadow_type> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hbox2</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkText</class> + <name>moduleText</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + <can_focus>True</can_focus> + <editable>False</editable> + <text></text> + </widget> + + <widget> + <class>GtkHandleBox</class> + <name>handlebox5</name> + <border_width>5</border_width> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>searchPanel</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkHBox</class> + <name>hbox4</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkEntry</class> + <name>searchText</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + </widget> + + <widget> + <class>GtkButton</class> + <name>searchButton</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + <can_focus>True</can_focus> + <signal> + <name>clicked</name> + <handler>on_searchButton_clicked</handler> + <last_modification_time>Sun, 06 Dec 1998 20:09:45 GMT</last_modification_time> + </signal> + <label>Search</label> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>searchSettingsPanel</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkVBox</class> + <name>searchTypePanel</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkRadioButton</class> + <name>regexSearch</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <can_focus>True</can_focus> + <label>Regular Expression</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>searchType</group> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>phaseSearch</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <can_focus>True</can_focus> + <label>Exact Phrase</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>searchType</group> + </widget> + + <widget> + <class>GtkRadioButton</class> + <name>multiWordSearch</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <can_focus>True</can_focus> + <label>Multi Word</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>searchType</group> + </widget> + </widget> + + <widget> + <class>GtkVBox</class> + <name>searchOptionsPanel</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkCheckButton</class> + <name>caseSensitive</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + <can_focus>True</can_focus> + <label>Case Sensitive</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + </widget> + </widget> + </widget> + + <widget> + <class>GtkList</class> + <name>resultList</name> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + <signal> + <name>selection_changed</name> + <handler>on_resultList_selection_changed</handler> + <last_modification_time>Sun, 06 Dec 1998 20:11:29 GMT</last_modification_time> + </signal> + <selection_mode>GTK_SELECTION_SINGLE</selection_mode> + </widget> + </widget> + </widget> + </widget> + + <widget> + <class>GtkStatusbar</class> + <name>statusbar1</name> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + </widget> + </widget> +</widget> + +</GTK-Interface> diff --git a/apps/X11/cheatah/save/configure.in b/apps/X11/cheatah/save/configure.in new file mode 100644 index 0000000..e45446d --- /dev/null +++ b/apps/X11/cheatah/save/configure.in @@ -0,0 +1,4 @@ +AC_PROG_CXX + +AC_LANG_CPLUSPLUS +LIBS="$LIBS -L../../../lib -lswmgr -lkeys -lutilfuns -lmodules -lfrontend" diff --git a/apps/X11/micros/AUTHORS b/apps/X11/micros/AUTHORS new file mode 100644 index 0000000..cca39e0 --- /dev/null +++ b/apps/X11/micros/AUTHORS @@ -0,0 +1 @@ +CrossWire Bible Society and the global internet community at large. diff --git a/apps/X11/micros/COPYING b/apps/X11/micros/COPYING new file mode 100644 index 0000000..eeb586b --- /dev/null +++ b/apps/X11/micros/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/apps/X11/micros/ChangeLog b/apps/X11/micros/ChangeLog new file mode 100644 index 0000000..8b40e47 --- /dev/null +++ b/apps/X11/micros/ChangeLog @@ -0,0 +1,2 @@ +22-Dec-2000 + Released first version of micros in public SWORD distribution diff --git a/apps/X11/micros/INSTALL b/apps/X11/micros/INSTALL new file mode 100644 index 0000000..08c9b6e --- /dev/null +++ b/apps/X11/micros/INSTALL @@ -0,0 +1,10 @@ + +First, be sure to read INSTALL in the root of the sword +directory for instructions on how to make sure the API +libraries are installed and configured properly. + +Then look at Makefile.cfg, changing anything to your +preference and do a: + +make + diff --git a/apps/X11/micros/Makefile b/apps/X11/micros/Makefile new file mode 100644 index 0000000..4bf1c2c --- /dev/null +++ b/apps/X11/micros/Makefile @@ -0,0 +1,18 @@ +root := ../../.. +subdirs := +clean-targets := none +targets := micros +# set bin so we don't build these .o's into shared lib +bin := noshare +include ${root}/Makefile.cfg +CPPFLAGS += -I. +CPPFLAGS += `gtk-config --cflags` -I/usr/include +LDFLAGS += `gtk-config --libs` + +cpp += micros.cpp +cpp += microssig.cpp + +include ${root}/Makefile.post + +micros: $(o) + $(CROSS_COMPILE)$(CC) -o $@ $(o) -L$(root)/lib $(LIBS) -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -L/usr/X11R6/lib -lXi -lXext -lX11 -lm diff --git a/apps/X11/micros/NEWS b/apps/X11/micros/NEWS new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/apps/X11/micros/NEWS @@ -0,0 +1 @@ + diff --git a/apps/X11/micros/README b/apps/X11/micros/README new file mode 100644 index 0000000..c82c0b0 --- /dev/null +++ b/apps/X11/micros/README @@ -0,0 +1 @@ +This is mini GUI for use on PDA's. diff --git a/apps/X11/micros/confdefs.h b/apps/X11/micros/confdefs.h new file mode 100644 index 0000000..3f5c36f --- /dev/null +++ b/apps/X11/micros/confdefs.h @@ -0,0 +1,3 @@ + +#define PACKAGE "micros" +#define VERSION "0.1" diff --git a/apps/X11/micros/micros.cpp b/apps/X11/micros/micros.cpp new file mode 100644 index 0000000..0321b92 --- /dev/null +++ b/apps/X11/micros/micros.cpp @@ -0,0 +1,699 @@ +/* micros + * Copyright (C) 2000, CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * 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 <gtk/gtk.h> +#include <gdk/gdkkeysyms.h> +#include "microssig.h" +#include "micros.h" +#include <swmgr.h> +#include <versekey.h> +#include <regex.h> + +MainWindow *mainWindow = NULL; +GtkWidget* +get_widget (GtkWidget *widget, + gchar *widget_name) +{ + GtkWidget *found_widget; + + if (widget->parent) + widget = gtk_widget_get_toplevel (widget); + found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} + +/* This is an internally used function to set notebook tab widgets. */ +void +set_notebook_tab (GtkWidget *notebook, + gint page_num, + GtkWidget *widget) +{ + GtkNotebookPage *page; + GtkWidget *notebook_page; + + page = (GtkNotebookPage*) g_list_nth (GTK_NOTEBOOK (notebook)->children, page_num)->data; + notebook_page = page->child; + gtk_widget_ref (notebook_page); + gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), page_num); + gtk_notebook_insert_page (GTK_NOTEBOOK (notebook), notebook_page, + widget, page_num); + gtk_widget_unref (notebook_page); +} + + + +MainWindow::MainWindow() { + searchType_group = NULL; + mainMgr = new SWMgr(); + curMod = NULL; + chapDisplay = 0; // set in create + entryDisplay = 0; // set in create + skipLookup = false; +} + + +MainWindow::~MainWindow() { + delete mainMgr; + if (chapDisplay) + delete chapDisplay; + if (entryDisplay) + delete entryDisplay; +} + + +GtkWidget* create_mainWindow () { + GtkWidget *retWidget; + mainWindow = new MainWindow(); + retWidget = mainWindow->create(); + mainWindow->initSWORD(); + return retWidget; +} + +GtkWidget *MainWindow::create() { + mainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (mainWindow), "mainWindow", mainWindow); + gtk_window_set_title (GTK_WINDOW (mainWindow), "Micros - SWORD PDA UI"); + gtk_window_set_policy (GTK_WINDOW (mainWindow), TRUE, TRUE, FALSE); + gtk_widget_set_usize(GTK_WIDGET(mainWindow), 315, 225); + gtk_signal_connect(GTK_OBJECT(mainWindow), + "destroy", + GTK_SIGNAL_FUNC(gtk_main_quit), + NULL); + + + mainPanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "mainPanel", mainPanel); + gtk_widget_show (mainPanel); + gtk_container_add (GTK_CONTAINER (mainWindow), mainPanel); + + headerPanel = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "headerPanel", headerPanel); + gtk_widget_show (headerPanel); + gtk_box_pack_start (GTK_BOX (mainPanel), headerPanel, FALSE, TRUE, 0); + + handlebox3 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "handlebox3", handlebox3); + gtk_widget_show (handlebox3); + gtk_box_pack_start (GTK_BOX (headerPanel), handlebox3, TRUE, TRUE, 0); + + menubar4 = gtk_menu_bar_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menubar4", menubar4); + gtk_widget_show (menubar4); + gtk_container_add (GTK_CONTAINER (handlebox3), menubar4); + +/* + File3 = gtk_menu_item_new_with_label ("File"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "File3", File3); + gtk_widget_show (File3); + gtk_container_add (GTK_CONTAINER (menubar4), File3); + + menu13 = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menu13", menu13); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (File3), menu13); + + Exit3 = gtk_menu_item_new_with_label ("Exit"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "Exit3", Exit3); + gtk_widget_show (Exit3); + gtk_container_add (GTK_CONTAINER (menu13), Exit3); + gtk_signal_connect (GTK_OBJECT (Exit3), "activate", + GTK_SIGNAL_FUNC (gtk_main_quit), + NULL); +*/ + + + View3 = gtk_menu_item_new_with_label ("View"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "View3", View3); + gtk_widget_show (View3); + gtk_container_add (GTK_CONTAINER (menubar4), View3); + gtk_signal_connect (GTK_OBJECT (View3), "activate", + GTK_SIGNAL_FUNC (on_View3_activate), + NULL); + + menuView = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuView", menuView); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (View3), menuView); + + commentaries = gtk_menu_item_new_with_label ("Commentaries"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "commentaries", commentaries); + gtk_widget_show (commentaries); + + menuCommentaries = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuCommentaries", menuCommentaries); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (commentaries), menuCommentaries); + + dictionaries = gtk_menu_item_new_with_label ("Dictionaries"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "Dictionaries", dictionaries); + gtk_widget_show (dictionaries); + + menuDictionaries = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menuDictionaries", menuDictionaries); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (dictionaries), menuDictionaries); + + + +/* + Help = gtk_menu_item_new_with_label ("Help"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "Help", Help); + gtk_widget_show (Help); + gtk_container_add (GTK_CONTAINER (menubar4), Help); + gtk_signal_connect (GTK_OBJECT (Help), "activate", + GTK_SIGNAL_FUNC (on_Help_activate), + NULL); + gtk_menu_item_right_justify (GTK_MENU_ITEM (Help)); + + menu14 = gtk_menu_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "menu14", menu14); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (Help), menu14); + + About = gtk_menu_item_new_with_label ("About"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "About", About); + gtk_widget_show (About); + gtk_container_add (GTK_CONTAINER (menu14), About); + gtk_signal_connect (GTK_OBJECT (About), "activate", + GTK_SIGNAL_FUNC (on_About_activate), + NULL); +*/ + + handlebox4 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "handlebox4", handlebox4); + gtk_widget_show (handlebox4); + gtk_box_pack_start (GTK_BOX (headerPanel), handlebox4, TRUE, TRUE, 0); + + hbox6 = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "hbox6", hbox6); + gtk_widget_show (hbox6); + gtk_container_add (GTK_CONTAINER (handlebox4), hbox6); + + showSearchButton = gtk_button_new_with_label ("-O"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "showSearchButton", showSearchButton); + gtk_widget_show (showSearchButton); + gtk_box_pack_start (GTK_BOX (hbox6), showSearchButton, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (showSearchButton), "clicked", + GTK_SIGNAL_FUNC (on_showSearchButton_clicked), + NULL); + + label2 = gtk_label_new ("Verse"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "label2", label2); + gtk_widget_show (label2); + gtk_box_pack_start (GTK_BOX (hbox6), label2, FALSE, TRUE, 0); + gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_RIGHT); + gtk_misc_set_padding (GTK_MISC (label2), 2, 0); + + + + + + GtkWidget *combo1 = gtk_combo_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "combo1", combo1); + gtk_widget_show (combo1); + gtk_box_pack_start (GTK_BOX (hbox6), combo1, FALSE, TRUE, 0); + gtk_widget_set_usize (combo1, 90, -2); +// GtkRequisition req = {90, 175}; +// gtk_widget_size_request(GTK_WIDGET(GTK_COMBO(combo1)->list), &req); +// gtk_widget_size_request(GTK_WIDGET(combo1), &req); +// gtk_widget_size_allocate(GTK_WIDGET(GTK_COMBO(combo1)->list), &allc); +// gtk_widget_set_usize(GTK_WIDGET(GTK_COMBO(combo1)->list), -2, 175); +// gtk_list_scroll_vertical(GTK_LIST(GTK_COMBO(combo1)->list), +// GTK_SCROLL_STEP_FORWARD, +// 0); + GList *combo1_items = NULL; + + VerseKey *myVk = new VerseKey(); + myVk->Error(); //clear error + (*myVk) = TOP; + char *buf; + while (!myVk->Error()) { + const char *bname = myVk->books[myVk->Testament()-1][myVk->Book()-1].name; + int len = strlen(bname); + buf = new char [ len + 1 ]; + strcpy(buf, bname); + combo1_items = g_list_append (combo1_items, buf); + myVk->Book(myVk->Book() + 1); + } + delete myVk; + + gtk_combo_set_popdown_strings (GTK_COMBO (combo1), combo1_items); + + + lookupText = GTK_COMBO (combo1)->entry; + gtk_object_set_data(GTK_OBJECT(mainWindow), "lookupText", lookupText); + gtk_widget_show (lookupText); + gtk_entry_set_text (GTK_ENTRY (lookupText),(char *)g_list_nth_data (combo1_items, 0)); + gtk_signal_connect (GTK_OBJECT (lookupText), "changed", + GTK_SIGNAL_FUNC (on_lookupText_changed), + NULL); + + for (GList *i = g_list_first(combo1_items); i; i = g_list_next(i)) + delete [] i->data; + g_list_free (combo1_items); + + gtk_widget_set_usize (GTK_COMBO(combo1)->popup, 90, 175); +// GtkAllocation allc = {-2, -2, 90, 175}; +// gtk_widget_size_allocate(GTK_WIDGET(combo1), &allc); +// gtk_widget_set_usize(GTK_WIDGET(GTK_COMBO(combo1)->list), 90, 175); +//GTK_WIDGET(GTK_COMBO(combo1))->allocation.height = 175; +//GTK_WIDGET(GTK_COMBO(combo1))->allocation.width = 90; +//GTK_WIDGET(GTK_COMBO(combo1)->list)->allocation.height = 175; +//GTK_WIDGET(GTK_COMBO(combo1)->list)->allocation.width = 90; +//GTK_WIDGET(GTK_COMBO(combo1))->requisition.height = 175; +//GTK_WIDGET(GTK_COMBO(combo1))->requisition.width = 90; +//GTK_WIDGET(GTK_COMBO(combo1)->list)->requisition.height = 175; +//GTK_WIDGET(GTK_COMBO(combo1)->list)->requisition.width = 90; +//GTK_WIDGET(GTK_COMBO(combo1)->popwin)->allocation.height = 175; +//GTK_WIDGET(GTK_COMBO(combo1)->popwin)->allocation.width = 90; +//GTK_WIDGET(GTK_COMBO(combo1)->popwin)->requisition.height = 175; +//GTK_WIDGET(GTK_COMBO(combo1)->popwin)->requisition.width = 90; + + + GtkObject *spinbutton_adj = gtk_adjustment_new (1, 1, 200, 1, 10, 10); + chapBox = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_adj), 1, 0); + gtk_widget_ref (chapBox); + gtk_object_set_data(GTK_OBJECT (mainWindow), "chapBox", chapBox); + gtk_widget_show (chapBox); + gtk_box_pack_start (GTK_BOX (hbox6), chapBox, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (chapBox), "changed", + GTK_SIGNAL_FUNC (on_lookupText_changed), + NULL); + gtk_widget_set_usize (chapBox, 40, -2); + + spinbutton_adj = gtk_adjustment_new (1, 1, 200, 1, 10, 10); + verseBox = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_adj), 1, 0); + gtk_widget_ref (verseBox); + gtk_object_set_data(GTK_OBJECT (mainWindow), "verseBox", verseBox); + gtk_widget_show (verseBox); + gtk_box_pack_start (GTK_BOX (hbox6), verseBox, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (verseBox), "changed", + GTK_SIGNAL_FUNC (on_lookupText_changed), + NULL); + gtk_widget_set_usize (verseBox, 40, -2); + + hbox2 = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "hbox2", hbox2); + gtk_widget_show (hbox2); + gtk_box_pack_start (GTK_BOX (mainPanel), hbox2, TRUE, TRUE, 0); + + +/* + textScrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_object_set_data (GTK_OBJECT (mainWindow), "textScrolledWindow", textScrolledWindow); + gtk_widget_show (textScrolledWindow); + gtk_box_pack_start (GTK_BOX (hbox2), textScrolledWindow, FALSE, FALSE, 0); +*/ + + moduleText = gtk_text_new (NULL, NULL); + gtk_object_set_data (GTK_OBJECT (mainWindow), "moduleText", moduleText); + gtk_widget_show (moduleText); +// gtk_container_add (GTK_CONTAINER (textScrolledWindow), moduleText); + gtk_box_pack_start (GTK_BOX (hbox2), moduleText, TRUE, TRUE, 0); + gtk_text_set_editable (GTK_TEXT (moduleText), FALSE); + gtk_text_set_word_wrap (GTK_TEXT (moduleText), TRUE); + gtk_widget_realize (moduleText); + + /* Add a vertical scrollbar to the GtkText widget */ + textScrollbar = gtk_vscrollbar_new (GTK_TEXT (moduleText)->vadj); + gtk_box_pack_start (GTK_BOX (hbox2), textScrollbar, FALSE, FALSE, 0); + gtk_widget_show (textScrollbar); + + +/* + handlebox5 = gtk_handle_box_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "handlebox5", handlebox5); + gtk_widget_show (handlebox5); + gtk_box_pack_start (GTK_BOX (hbox2), handlebox5, FALSE, FALSE, 0); + gtk_container_border_width (GTK_CONTAINER (handlebox5), 5); +*/ + + searchPanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchPanel", searchPanel); + gtk_widget_hide (searchPanel); + gtk_box_pack_start (GTK_BOX (hbox2), searchPanel, FALSE, FALSE, 0); +// gtk_container_add (GTK_CONTAINER (handlebox5), searchPanel); + + hbox4 = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "hbox4", hbox4); + gtk_widget_show (hbox4); + gtk_box_pack_start (GTK_BOX (searchPanel), hbox4, FALSE, FALSE, 0); + + searchText = gtk_entry_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchText", searchText); + gtk_widget_show (searchText); + gtk_box_pack_start (GTK_BOX (hbox4), searchText, TRUE, TRUE, 0); + gtk_widget_set_usize (searchText, 90, -2); + + searchButton = gtk_button_new_with_label ("Go"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchButton", searchButton); + gtk_widget_show (searchButton); + gtk_box_pack_start (GTK_BOX (hbox4), searchButton, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (searchButton), "clicked", + GTK_SIGNAL_FUNC (on_searchButton_clicked), + NULL); + + searchSettingsPanel = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchSettingsPanel", searchSettingsPanel); + gtk_widget_show (searchSettingsPanel); + gtk_box_pack_start (GTK_BOX (searchPanel), searchSettingsPanel, FALSE, FALSE, 0); + + searchTypePanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchTypePanel", searchTypePanel); + gtk_widget_show (searchTypePanel); + gtk_box_pack_start (GTK_BOX (searchSettingsPanel), searchTypePanel, FALSE, FALSE, 0); + + multiWordSearch = gtk_radio_button_new_with_label (searchType_group, "Multi Word"); + searchType_group = gtk_radio_button_group (GTK_RADIO_BUTTON (multiWordSearch)); + gtk_object_set_data (GTK_OBJECT (mainWindow), "multiWordSearch", multiWordSearch); + gtk_widget_show (multiWordSearch); + gtk_box_pack_start (GTK_BOX (searchTypePanel), multiWordSearch, FALSE, FALSE, 0); + + phraseSearch = gtk_radio_button_new_with_label (searchType_group, "Exact Phrase"); + searchType_group = gtk_radio_button_group (GTK_RADIO_BUTTON (phraseSearch)); + gtk_object_set_data (GTK_OBJECT (mainWindow), "phraseSearch", phraseSearch); + gtk_widget_show (phraseSearch); + gtk_box_pack_start (GTK_BOX (searchTypePanel), phraseSearch, FALSE, FALSE, 0); + + regexSearch = gtk_radio_button_new_with_label (searchType_group, "Regular Expression"); + searchType_group = gtk_radio_button_group (GTK_RADIO_BUTTON (regexSearch)); + gtk_object_set_data (GTK_OBJECT (mainWindow), "regexSearch", regexSearch); + gtk_widget_show (regexSearch); + gtk_box_pack_start (GTK_BOX (searchTypePanel), regexSearch, FALSE, FALSE, 0); + + +/* + searchOptionsPanel = gtk_vbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "searchOptionsPanel", searchOptionsPanel); + gtk_widget_show (searchOptionsPanel); + gtk_box_pack_start (GTK_BOX (searchSettingsPanel), searchOptionsPanel, FALSE, FALSE, 0); +*/ + + caseSensitive = gtk_check_button_new_with_label ("Case Sensitive"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "caseSensitive", caseSensitive); + gtk_widget_show (caseSensitive); +// gtk_box_pack_start (GTK_BOX (searchOptionsPanel), caseSensitive, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (searchTypePanel), caseSensitive, FALSE, FALSE, 0); + + GtkWidget *resultPanel = gtk_hbox_new (FALSE, 0); + gtk_object_set_data (GTK_OBJECT (mainWindow), "resultPanel", resultPanel); + gtk_widget_show (resultPanel); + gtk_box_pack_start (GTK_BOX (searchPanel), resultPanel, TRUE, TRUE, 0); + resultList = gtk_clist_new(1); + gtk_object_set_data(GTK_OBJECT (mainWindow), "resultList", resultList); +// gtk_clist_set_policy(GTK_CLIST(resultList), GTK_POLICY_AUTOMATIC, 0); +// gtk_clist_set_border(GTK_CLIST(resultList), GTK_SHADOW_ETCHED_IN); + gtk_widget_show (resultList); + gtk_box_pack_start (GTK_BOX (resultPanel), resultList, TRUE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (resultList), "select_row", + GTK_SIGNAL_FUNC (on_resultList_selection_changed), + NULL); + /* Add a vertical scrollbar to the GtkCList widget */ + textScrollbar = gtk_vscrollbar_new (NULL); + gtk_clist_set_vadjustment (GTK_CLIST(resultList), gtk_range_get_adjustment(GTK_RANGE(textScrollbar))); + gtk_box_pack_start (GTK_BOX (resultPanel), textScrollbar, FALSE, FALSE, 0); + gtk_widget_show (textScrollbar); + + +/* + statusbar1 = gtk_statusbar_new (); + gtk_object_set_data (GTK_OBJECT (mainWindow), "statusbar1", statusbar1); + gtk_widget_show (statusbar1); + gtk_box_pack_start (GTK_BOX (mainPanel), statusbar1, FALSE, TRUE, 0); +*/ + +/* + arrow1 = gtk_button_new_with_label ("[<]"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "arrow1", arrow1); + gtk_widget_show (arrow1); + gtk_box_pack_start (GTK_BOX (headerPanel), arrow1, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (arrow1), "clicked", + GTK_SIGNAL_FUNC (on_arrow1_button_press_event), + NULL); + + arrow2 = gtk_button_new_with_label ("[>]"); + gtk_object_set_data (GTK_OBJECT (mainWindow), "arrow2", arrow2); + gtk_widget_show (arrow2); + gtk_box_pack_start (GTK_BOX (headerPanel), arrow2, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (arrow2), "clicked", + GTK_SIGNAL_FUNC (on_arrow2_button_press_event), + NULL); + +*/ + + statusbar1 = gtk_label_new (""); + gtk_object_set_data (GTK_OBJECT (mainWindow), "statusbar1", statusbar1); + gtk_widget_show (statusbar1); + gtk_box_pack_start (GTK_BOX (mainPanel), statusbar1, FALSE, FALSE, 0); + gtk_label_set_justify (GTK_LABEL (statusbar1), GTK_JUSTIFY_LEFT); + gtk_misc_set_padding (GTK_MISC (statusbar1), 2, 0); + + + GTKEntryDisp::__initialize(); + chapDisplay = new GTKChapDisp(moduleText); + entryDisplay = new GTKEntryDisp(moduleText); + + return mainWindow; +} + +void MainWindow::initSWORD() { + + GtkWidget *menuChoice; + int viewNumber = 1; + char menuName[64]; + ModMap::iterator it; + SectionMap::iterator sit; + ConfigEntMap::iterator eit; + char *font; + SWModule *curMod; + + for (it = mainMgr->Modules.begin(); it != mainMgr->Modules.end(); it++) { + curMod = (*it).second; + menuChoice = gtk_menu_item_new_with_label (curMod->Name()); + sprintf(menuName, "viewMod%d", viewNumber++); + gtk_object_set_data (GTK_OBJECT (mainWindow), menuName, menuChoice); + gtk_widget_show (menuChoice); + gtk_signal_connect(GTK_OBJECT (menuChoice), "activate", + GTK_SIGNAL_FUNC (on_viewMod_activate), + g_strdup(curMod->Name())); + + if (!strcmp((*it).second->Type(), "Biblical Texts")) { + gtk_container_add (GTK_CONTAINER (menuView), menuChoice); + font = 0; + if ((sit = mainMgr->config->Sections.find((*it).second->Name())) != mainMgr->config->Sections.end()) { + if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) { + font = (char *)(*eit).second.c_str(); + } + } +// CreateTextPane((*it).second, font); + curMod->Disp(chapDisplay); // set our GTKChapDisp object up for the diplayer of each Biblical Text module + if (!this->curMod) // set currently selected module for app to first module from SWMgr (Bible Texts get first preference + this->curMod = curMod; + } + else { + curMod->Disp(entryDisplay); // set our GTKEntryDisp object up for the diplayer of each module other than Biblical Texts + if (!strcmp((*it).second->Type(), "Commentaries")) { + gtk_container_add (GTK_CONTAINER (menuCommentaries), menuChoice); + // CreateCommentPane((*it).second); + } + if (!strcmp((*it).second->Type(), "Lexicons / Dictionaries")) { + gtk_container_add (GTK_CONTAINER (menuDictionaries), menuChoice); + // CreateLDPane((*it).second); + } + } + + + } + gtk_container_add (GTK_CONTAINER (menuView), commentaries); + gtk_container_add (GTK_CONTAINER (menuView), dictionaries); + if (!this->curMod) // set currently selected module for app to first module from SWMgr + this->curMod = curMod; +} + + +void MainWindow::lookupTextChanged() { + string keyText; + gchar *entryText; + char tmpBuf[255]; + + if (!skipLookup) { + entryText = gtk_entry_get_text(GTK_ENTRY(lookupText)); + keyText = entryText; + entryText = gtk_entry_get_text(GTK_ENTRY(chapBox)); + keyText += " "; + keyText += entryText; + entryText = gtk_entry_get_text(GTK_ENTRY(verseBox)); + keyText += ":"; + keyText += entryText; + + if (curMod) { + curMod->SetKey(keyText.c_str()); + curMod->Display(); + sprintf(tmpBuf, "%s (%s)", curMod->KeyText(), curMod->Name()); + gtk_label_set(GTK_LABEL(statusbar1), tmpBuf); + } + } +} + +void MainWindow::viewModActivate(GtkMenuItem *sender, gchar *modName) { + ModMap::iterator it; + + it = mainMgr->Modules.find(modName); + if (it != mainMgr->Modules.end()) { + curMod = (*it).second; + lookupTextChanged(); + } + else curMod = 0; +} + + +void MainWindow::navigateButtonClicked(int direction) { + if (curMod) { + if (direction) + (*curMod)++; + else (*curMod)--; + (const char *)*curMod; // snap to closest locations + const gchar *text = curMod->KeyText(); + gtk_entry_set_text(GTK_ENTRY(lookupText), text); +// curMod->Display(); + } +} + + +void MainWindow::showSearchButtonClicked() { + static bool showing = false; + if (showing) + gtk_widget_hide(searchPanel); + else gtk_widget_show(searchPanel); + showing = !showing; + +} + +void statusUpdate(char percent, void *userData) { + char buf[5]; + GtkWidget *button = (GtkWidget *)userData; + sprintf(buf, "%d%%", percent); + gtk_label_set_text(GTK_LABEL(GTK_BIN(button)->child), buf); +// gtk_widget_draw_focus(button); +} + + +void MainWindow::searchButtonClicked() { + string srchText; + gchar *entryText; + const gchar *resultText; + gchar **clistText = (gchar **)&resultText; + + + gtk_clist_clear(GTK_CLIST(resultList)); + + entryText = gtk_entry_get_text(GTK_ENTRY(searchText)); + srchText = entryText; + + if (curMod) { + int searchType = GTK_TOGGLE_BUTTON(regexSearch)->active ? 0 : GTK_TOGGLE_BUTTON(phraseSearch)->active ? -1 : -2; + int searchParams = GTK_TOGGLE_BUTTON(caseSensitive)->active ? 0 : REG_ICASE; + gtk_clist_freeze(GTK_CLIST(resultList)); + for (ListKey searchResults = curMod->Search(srchText.c_str(), searchType, searchParams, 0, 0, statusUpdate, searchButton); !searchResults.Error(); searchResults++) { + resultText = (const char *)searchResults; + gtk_clist_append(GTK_CLIST(resultList), clistText); + } + gtk_clist_thaw(GTK_CLIST(resultList)); + gtk_label_set_text(GTK_LABEL(GTK_BIN(searchButton)->child), "Go"); + } +} + + +void MainWindow::resultListSelectionChanged(GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data) { + gchar *text; + char buf[256]; + + gtk_clist_get_text(GTK_CLIST(resultList), row, column, &text); + VerseKey vkey(text); + + if (text) { + skipLookup = true; + memset(buf, 0, 256); + int len = strlen((const char *)vkey); + if (len > 255) len = 255; + strncpy(buf, (const char *)vkey, len-4); + gtk_entry_set_text(GTK_ENTRY(lookupText), vkey.books[vkey.Testament()-1][vkey.Book()-1].name); + sprintf(buf, "%d", vkey.Chapter()); + gtk_entry_set_text(GTK_ENTRY(chapBox), buf); + skipLookup = false; + sprintf(buf, "%d", vkey.Verse()); + gtk_entry_set_text(GTK_ENTRY(verseBox), buf); + } +} + +GdkColor GTKEntryDisp::colourBlue; +GdkColor GTKEntryDisp::colourGreen; + +char GTKEntryDisp::Display(SWModule &imodule) { + char tmpBuf[255]; + + gtk_text_set_point(GTK_TEXT(gtkText), 0); + gtk_text_forward_delete (GTK_TEXT (gtkText), gtk_text_get_length((GTK_TEXT(gtkText)))); + int curPos = 0; + (const char *)imodule; // snap to entry + gtk_text_freeze (GTK_TEXT(gtkText)); + sprintf(tmpBuf, "[%s] ", imodule.KeyText()); + gtk_text_insert(GTK_TEXT(gtkText), NULL, &colourBlue, NULL, tmpBuf, -1); + gtk_text_insert(GTK_TEXT(gtkText), NULL, >kText->style->black, NULL, imodule.StripText(), -1); + gtk_text_set_point(GTK_TEXT(gtkText), curPos); + gtk_text_thaw(GTK_TEXT(gtkText)); +} + + +char GTKChapDisp::Display(SWModule &imodule) { + char tmpBuf[255]; + + gtk_text_set_point(GTK_TEXT(gtkText), 0); + gtk_text_forward_delete (GTK_TEXT (gtkText), gtk_text_get_length((GTK_TEXT(gtkText)))); + VerseKey *key = (VerseKey *)(SWKey *)imodule; + int curVerse = key->Verse(); + int curChapter = key->Chapter(); + int curBook = key->Book(); + int curPos = 0; + gfloat adjVal; + gtk_text_freeze (GTK_TEXT(gtkText)); + for (key->Verse(1); (key->Book() == curBook && key->Chapter() == curChapter && !imodule.Error()); imodule++) { + sprintf(tmpBuf, "%d. ", key->Verse()); + gtk_text_insert(GTK_TEXT(gtkText), NULL, &colourBlue, NULL, tmpBuf, -1); + if (key->Verse() == curVerse) { + gtk_text_thaw(GTK_TEXT(gtkText)); + adjVal = GTK_TEXT(gtkText)->vadj->upper; + curPos = gtk_text_get_length(GTK_TEXT(gtkText)); + gtk_text_insert(GTK_TEXT(gtkText), NULL, &colourGreen, NULL, imodule.StripText(), -1); + gtk_text_freeze (GTK_TEXT(gtkText)); + } + else { + gtk_text_insert(GTK_TEXT(gtkText), NULL, >kText->style->black, NULL, imodule.StripText(), -1); + } + gtk_text_insert(GTK_TEXT(gtkText), NULL, >kText->style->black, NULL, " ", -1); + } + gtk_text_set_point(GTK_TEXT(gtkText), curPos); + gtk_text_thaw(GTK_TEXT(gtkText)); + adjVal -= (GTK_TEXT(gtkText)->vadj->page_size / 2); + gtk_adjustment_set_value(GTK_TEXT(gtkText)->vadj, (adjVal>0)?adjVal:0); + key->Verse(1); + key->Chapter(1); + key->Book(curBook); + key->Chapter(curChapter); + key->Verse(curVerse); +} diff --git a/apps/X11/micros/micros.h b/apps/X11/micros/micros.h new file mode 100644 index 0000000..f7a60aa --- /dev/null +++ b/apps/X11/micros/micros.h @@ -0,0 +1,151 @@ +/* Note: You are free to use whatever license you want. + Eventually you will be able to edit it within Glade. */ + +/* micros + * Copyright (C) <YEAR> <AUTHORS> + * + * 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 <gtk/gtk.h> +#include <swmgr.h> +#include <swdisp.h> + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +GtkWidget* +get_widget (GtkWidget *widget, + gchar *widget_name); + + + /* + * This is an internally used function for setting notebook tabs. It is only + * included in this header file so you don't get compilation warnings + */ +void +set_notebook_tab (GtkWidget *notebook, + gint page_num, + GtkWidget *widget); + +GtkWidget* create_mainWindow (void); + +class GTKEntryDisp : public SWDisplay { +protected: + GtkWidget *gtkText; +public: + static GdkColor colourGreen; + static GdkColor colourBlue; + static void __initialize() { + GdkColormap *cmap; + + cmap = gdk_colormap_get_system(); + colourGreen.red = 0; + colourGreen.green = 0x00ff; + colourGreen.blue = 0xffff; + colourBlue.red = 0; + colourBlue.green = 0; + colourBlue.blue = 0xffff; + if (!gdk_color_alloc(cmap, &colourGreen)) { + g_error("couldn't allocate colour"); + } + if (!gdk_color_alloc(cmap, &colourBlue)) { + g_error("couldn't allocate colour"); + } + } + GTKEntryDisp(GtkWidget *gtkText) { this->gtkText = gtkText; } + virtual char Display(SWModule &imodule); +}; + +class GTKChapDisp : public GTKEntryDisp { +public: + GTKChapDisp(GtkWidget *gtkText) : GTKEntryDisp(gtkText) {} + virtual char Display(SWModule &imodule); +}; + +class MainWindow { + bool skipLookup; + GtkWidget *mainWindow; + GtkWidget *mainPanel; + GtkWidget *headerPanel; + GtkWidget *handlebox3; + GtkWidget *menubar4; + GtkWidget *File3; + GtkWidget *menu13; + GtkWidget *Exit3; + GtkWidget *View3; + GtkWidget *Help; + GtkWidget *menu14; + GtkWidget *menuView; + GtkWidget *menuCommentaries; + GtkWidget *menuDictionaries; + GtkWidget *commentaries; + GtkWidget *dictionaries; + GtkWidget *About; + GtkWidget *handlebox4; + GtkWidget *hbox6; + GtkWidget *label2; + GtkWidget *lookupText; + GtkWidget *chapBox; + GtkWidget *verseBox; + GtkWidget *hbox2; + GtkWidget *moduleText; + GtkWidget *handlebox5; + GtkWidget *showSearchButton; + GtkWidget *searchPanel; + GtkWidget *hbox4; + GtkWidget *searchText; + GtkWidget *searchButton; + GtkWidget *searchSettingsPanel; + GtkWidget *searchTypePanel; + GSList *searchType_group; + GtkWidget *regexSearch; + GtkWidget *phraseSearch; + GtkWidget *multiWordSearch; + GtkWidget *searchOptionsPanel; + GtkWidget *caseSensitive; + GtkWidget *resultList; + GtkWidget *statusbar1; + GtkWidget *textScrolledWindow; + GtkWidget *textScrollbar; + GtkWidget *arrow1; + GtkWidget *arrow2; + + + SWMgr *mainMgr; + SWModule *curMod; + SWDisplay *chapDisplay; + SWDisplay *entryDisplay; +public: + MainWindow(); + ~MainWindow(); + GtkWidget *create(); + void initSWORD(); + void lookupTextChanged(); + void viewModActivate(GtkMenuItem *sender, gchar *modName); + void searchButtonClicked(); + void showSearchButtonClicked(); + void navigateButtonClicked(int direction); + void resultListSelectionChanged(GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data); +}; + + +extern MainWindow *mainWindow; + + + diff --git a/apps/X11/micros/microssig.cpp b/apps/X11/micros/microssig.cpp new file mode 100644 index 0000000..0739901 --- /dev/null +++ b/apps/X11/micros/microssig.cpp @@ -0,0 +1,125 @@ +/* Note: You are free to use whatever license you want. + Eventually you will be able to edit it within Glade. */ + +/* micros + * Copyright (C) <YEAR> <AUTHORS> + * + * 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 <gtk/gtk.h> +#include "micros.h" +#include "microssig.h" + +int +main (int argc, char *argv[]) +{ + GtkWidget *mainWindow; + + gtk_set_locale (); + gtk_init (&argc, &argv); + + /* + * The following code was added by Glade to create one of each component + * (except popup menus), just so that you see something after building + * the project. Delete any components that you don't want shown initially. + */ + mainWindow = create_mainWindow (); + gtk_widget_show (mainWindow); + + gtk_main (); + return 0; +} + + +void +on_Exit3_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_View3_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_Help_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_viewMod_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + mainWindow->viewModActivate(menuitem, (gchar *)user_data); +} + + +void +on_About_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +on_lookupText_changed (GtkEditable *editable, + gpointer user_data) +{ + mainWindow->lookupTextChanged(); +} + + +void +on_showSearchButton_clicked (GtkButton *button, + gpointer user_data) +{ + mainWindow->showSearchButtonClicked(); +} + +void +on_searchButton_clicked (GtkButton *button, + gpointer user_data) +{ + mainWindow->searchButtonClicked(); +} + + +void +on_resultList_selection_changed (GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data) +{ + mainWindow->resultListSelectionChanged(clist, row, column, event, data); +} + + +void on_arrow1_button_press_event(GtkButton *button, gpointer user_data) { + mainWindow->navigateButtonClicked(0); +} + + +void on_arrow2_button_press_event(GtkButton *button, gpointer user_data) { + mainWindow->navigateButtonClicked(1); +} + diff --git a/apps/X11/micros/microssig.h b/apps/X11/micros/microssig.h new file mode 100644 index 0000000..8e29fb7 --- /dev/null +++ b/apps/X11/micros/microssig.h @@ -0,0 +1,67 @@ +/* Note: You are free to use whatever license you want. + Eventually you will be able to edit it within Glade. */ + +/* micros + * Copyright (C) <YEAR> <AUTHORS> + * + * 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 <gtk/gtk.h> + + +void +on_Exit3_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_View3_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_Help_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_viewMod_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_About_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_lookupText_changed (GtkEditable *editable, + gpointer user_data); + +void +on_searchButton_clicked (GtkButton *button, + gpointer user_data); + +void +on_showSearchButton_clicked (GtkButton *button, + gpointer user_data); + +void +on_resultList_selection_changed (GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data); + +void +on_arrow1_button_press_event (GtkButton *button, + gpointer user_data); + +void +on_arrow2_button_press_event (GtkButton *button, + gpointer user_data); + diff --git a/apps/X11/wxSword/Makefile b/apps/X11/wxSword/Makefile new file mode 100644 index 0000000..736cf95 --- /dev/null +++ b/apps/X11/wxSword/Makefile @@ -0,0 +1,26 @@ +root := ../../.. +subdirs := +pre-targets := +targets := gui_sword +bin := gui_sword +include ${root}/Makefile.cfg + +cpp += gui_sword.cpp +CPPFLAGS += -I. -I/usr/local/wxGTK/include -D__WXGTK__ +#CPPFLAGS += -I. -I/usr/local/wxGTK/include -I/usr/local/wxGTK/src/zlib -D__WXGTK__ +LFLAGS += -L/usr/X11/lib + + +s = $(c) $(cpp) +d = $(c:%.c=%.d) $(cpp:%.cpp=%.d) +o = $(c:%.c=%.o) $(cpp:%.cpp=%.o) +l = -lsword -lstdc++-lwx_gtk -lgtk -lgdk -lglib -lXext -lX11 -lm -ldl -lSM -lICE -lpthread-0.7 + + +gui_sword: $(o) + $(CC) -D__WXGTK__ $(LFLAGS) -o $@ $(o) $(l) $(l) + + +ifneq ($(nodeps),yes) +-include $(d) +endif diff --git a/apps/X11/wxSword/bak/gui_sword.mak b/apps/X11/wxSword/bak/gui_sword.mak new file mode 100644 index 0000000..c6805d5 --- /dev/null +++ b/apps/X11/wxSword/bak/gui_sword.mak @@ -0,0 +1,18 @@ +sword.e : sword.o + egcs -pipe -o sword.e gui_sword.o -L. \ + -L/home/lcortes/WXGUI/wxGTK/lib/Linux \ + -L/home/lcortes/SWORD/sword/lib \ + -lwx_gtk -L/usr/lib -L/usr/X11/lib -lgtk \ + -lgdk -lglib -lXext -lX11 -lm -ldl -lSM \ + -lmodules -lswmgr -lutilfuns -lfrontend -lkeys \ + -lICE -lpthread-0.7 -lstdc++ + + +sword.o : gui_sword.C gui_sword.h + egcs -c -pipe -o gui_sword.o -Wall -g -I.. -D__WXGTK__ \ + -I. -I.. -I/home/lcortes/WXGUI/wxGTK/include \ + -I/home/lcortes/WXGUI/wxGTKsrc/zlib \ + -I/home/lcortes/SWORD/sword/include \ + -I/usr/lib/glib/include gui_sword.C + + diff --git a/apps/X11/wxSword/bak/project.prj b/apps/X11/wxSword/bak/project.prj new file mode 100644 index 0000000..8b6e7d5 --- /dev/null +++ b/apps/X11/wxSword/bak/project.prj @@ -0,0 +1,17 @@ +# +# xwpe - project-file: project.prj +# createted by xwpe version Version 1.5.9 +# + + +CMP= egcs +CMPFLAGS= -g -D__WXGTK__ -I. -I.. -I/home/lcortes/WXGUI/wxGTK/include -I/home/lcortes/WXGUI/wxGTKsrc/zlib -I/home/lcortes/SWORD/sword/include -I/usr/lib/glib/include +LDFLAGS= -L. -L/home/lcortes/WXGUI/wxGTK/lib/Linux -L/home/lcortes/SWORD/sword/lib -lwx_gtk -L/usr/lib -L/usr/X11/lib -lgtk -lgdk -lglib -lXext -lX11 -lm -ldl -lSM -lmodules -lswmgr -lutilfuns -lfrontend -lkeys -lICE -lpthread-0.7 -lstdc++ +EXENAME= sword.e +CMPSWTCH= gnu +CMPMESSAGE= '${?*:warning:}\"${FILE}\", line ${LINE}:* at or near * \"${COLUMN=AFTER}\"' + +FILES= gui_sword.C + +install: + diff --git a/apps/X11/wxSword/bitmaps/copy.bmp b/apps/X11/wxSword/bitmaps/copy.bmp Binary files differnew file mode 100644 index 0000000..4551a06 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/copy.bmp diff --git a/apps/X11/wxSword/bitmaps/copy.xpm b/apps/X11/wxSword/bitmaps/copy.xpm new file mode 100644 index 0000000..47565c1 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/copy.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *copy_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c None", +". c Black", +"X c Gray100", +"o c #000080", +/* pixels */ +" ", +" ...... ", +" .XXXX.. ", +" .XXXX.X. ", +" .X..X.oooooo ", +" .XXXXXoXXXXoo ", +" .X....oXXXXoXo ", +" .XXXXXoX..Xoooo", +" .X....oXXXXXXXo", +" .XXXXXoX.....Xo", +" ......oXXXXXXXo", +" oX.....Xo", +" oXXXXXXXo", +" ooooooooo", +" " +}; diff --git a/apps/X11/wxSword/bitmaps/cut.bmp b/apps/X11/wxSword/bitmaps/cut.bmp Binary files differnew file mode 100644 index 0000000..1555433 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/cut.bmp diff --git a/apps/X11/wxSword/bitmaps/cut.xpm b/apps/X11/wxSword/bitmaps/cut.xpm new file mode 100644 index 0000000..bfe7e95 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/cut.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char *cut_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c None", +". c Black", +"X c #000080", +/* pixels */ +" ", +" . . ", +" . . ", +" . . ", +" .. .. ", +" . . ", +" ... ", +" . ", +" X.X ", +" X XXX ", +" XXX X X ", +" X X X X ", +" X X X X ", +" X X XX ", +" XX " +}; diff --git a/apps/X11/wxSword/bitmaps/help.bmp b/apps/X11/wxSword/bitmaps/help.bmp Binary files differnew file mode 100644 index 0000000..2d9e692 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/help.bmp diff --git a/apps/X11/wxSword/bitmaps/help.xpm b/apps/X11/wxSword/bitmaps/help.xpm new file mode 100644 index 0000000..50fdb41 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/help.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *help_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c None", +". c Black", +"X c Blue", +"o c #000080", +/* pixels */ +" ", +" ...... ", +" .XXXXX.. ", +" .XX...oX.. ", +" .X.. .X.. ", +" .X.. .XX.. ", +" .. .XX.. ", +" .XX.. ", +" .X.. ", +" .X.. ", +" .o.. ", +" .. ", +" .XX.. ", +" .XX.. ", +" ... " +}; diff --git a/apps/X11/wxSword/bitmaps/new.bmp b/apps/X11/wxSword/bitmaps/new.bmp Binary files differnew file mode 100644 index 0000000..d66feb2 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/new.bmp diff --git a/apps/X11/wxSword/bitmaps/new.xpm b/apps/X11/wxSword/bitmaps/new.xpm new file mode 100644 index 0000000..754d2d2 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/new.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char *new_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +/* pixels */ +" ", +" ........ ", +" .XXXXXX.. ", +" .XXXXXX.X. ", +" .XXXXXX.... ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" ........... ", +" " +}; diff --git a/apps/X11/wxSword/bitmaps/open.bmp b/apps/X11/wxSword/bitmaps/open.bmp Binary files differnew file mode 100644 index 0000000..bbf93fe --- /dev/null +++ b/apps/X11/wxSword/bitmaps/open.bmp diff --git a/apps/X11/wxSword/bitmaps/open.xpm b/apps/X11/wxSword/bitmaps/open.xpm new file mode 100644 index 0000000..54748e9 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/open.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c None", +". c Black", +"X c Yellow", +"o c Gray100", +"O c #bfbf00", +/* pixels */ +" ", +" ... ", +" . . .", +" ..", +" ... ...", +" .XoX....... ", +" .oXoXoXoXo. ", +" .XoXoXoXoX. ", +" .oXoX..........", +" .XoX.OOOOOOOOO.", +" .oo.OOOOOOOOO. ", +" .X.OOOOOOOOO. ", +" ..OOOOOOOOO. ", +" ........... ", +" " +}; diff --git a/apps/X11/wxSword/bitmaps/page.bmp b/apps/X11/wxSword/bitmaps/page.bmp Binary files differnew file mode 100644 index 0000000..3dbd4b0 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/page.bmp diff --git a/apps/X11/wxSword/bitmaps/paste.bmp b/apps/X11/wxSword/bitmaps/paste.bmp Binary files differnew file mode 100644 index 0000000..564f514 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/paste.bmp diff --git a/apps/X11/wxSword/bitmaps/preview.bmp b/apps/X11/wxSword/bitmaps/preview.bmp Binary files differnew file mode 100644 index 0000000..da1f4db --- /dev/null +++ b/apps/X11/wxSword/bitmaps/preview.bmp diff --git a/apps/X11/wxSword/bitmaps/preview.xpm b/apps/X11/wxSword/bitmaps/preview.xpm new file mode 100644 index 0000000..0dfdca4 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/preview.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *preview_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c Black", +". c None", +"X c Gray100", +"o c #808080", +"O c Cyan", +/* pixels */ +" .......", +" XXXXXXX ......", +" XXXXXXX . .....", +" XXXXXXX ....", +" XXXXXXXXXX ....", +" XXXXXXX ....", +" XXXXXX o..o ...", +" XXXXX oOO.oo ..", +" XXXXX .O..o. ..", +" XXXXX ....o. ..", +" XXXXX o..Ooo ..", +" XXXXXX o..o o..", +" XXXXXXX o .", +" XXXXXXXXXX . ", +" .. " +}; diff --git a/apps/X11/wxSword/bitmaps/print.bmp b/apps/X11/wxSword/bitmaps/print.bmp Binary files differnew file mode 100644 index 0000000..00319b5 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/print.bmp diff --git a/apps/X11/wxSword/bitmaps/print.xpm b/apps/X11/wxSword/bitmaps/print.xpm new file mode 100644 index 0000000..3c2e2be --- /dev/null +++ b/apps/X11/wxSword/bitmaps/print.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *print_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c None", +". c Black", +"X c Gray100", +"o c #808000", +"O c Yellow", +/* pixels */ +" ", +" ......... ", +" .XXXXXXXX. ", +" .X.....X. ", +" .XXXXXXXX. ", +" .X.....X.... ", +" .XXXXXXXX. . .", +" .......... . ..", +". . . .", +"............. .", +". ooo . . ", +". OOO ... ", +"............. . ", +" . . . ", +" ........... " +}; diff --git a/apps/X11/wxSword/bitmaps/save.bmp b/apps/X11/wxSword/bitmaps/save.bmp Binary files differnew file mode 100644 index 0000000..56dd10b --- /dev/null +++ b/apps/X11/wxSword/bitmaps/save.bmp diff --git a/apps/X11/wxSword/bitmaps/save.xpm b/apps/X11/wxSword/bitmaps/save.xpm new file mode 100644 index 0000000..01b18f9 --- /dev/null +++ b/apps/X11/wxSword/bitmaps/save.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *save_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c None", +". c Black", +"X c #808000", +"o c #808080", +/* pixels */ +" ", +" .............. ", +" .X. . . ", +" .X. ... ", +" .X. .X. ", +" .X. .X. ", +" .X. .X. ", +" .X. .X. ", +" .XX........oX. ", +" .XXXXXXXXXXXX. ", +" .XX.........X. ", +" .XX...... .X. ", +" .XX...... .X. ", +" .XX...... .X. ", +" ............. " +}; diff --git a/apps/X11/wxSword/gui_sword.cpp b/apps/X11/wxSword/gui_sword.cpp new file mode 100644 index 0000000..33d50ca --- /dev/null +++ b/apps/X11/wxSword/gui_sword.cpp @@ -0,0 +1,1075 @@ +// -------------------------------------------------------------- +// For compilers that support precompilation, includes "wx/wx.h" + +#include "wx/wxprec.h" + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +// Things for Sword +#include <stdio.h> +#include <iostream.h> +#include <versekey.h> +#include <rawtext.h> +#include <zcom.h> +#include <rawcom.h> +#include <rawgbf.h> +#include <stdlib.h> +#include <rawcom.h> +#include <rawld.h> +#include <regex.h> + +#include <swmgr.h> + +// I added +#include <stl.h> +#include <strstream.h> + +#include "wx/notebook.h" +#include "wx/imaglist.h" +#include "wx/toolbar.h" +#include "gui_sword.h" + + +#ifdef __WXGTK__ +#include "mondrian.xpm" +#include "bitmaps/new.xpm" +#include "bitmaps/open.xpm" +#include "bitmaps/save.xpm" +#include "bitmaps/copy.xpm" +#include "bitmaps/cut.xpm" + +// #include "bitmaps/paste.xpm" + +#include "bitmaps/print.xpm" +#include "bitmaps/preview.xpm" +#include "bitmaps/help.xpm" +#endif + +#include "jptr.h" + + +int ID_CHOICE = 300; + +// =============================================================================== +// Global Declarations +// =============================================================================== +class ttextVec : public vector<clJPTR<wxTextCtrl> > +{ +}; + +class tpanelVec : public vector<clJPTR<wxPanel> > +{ +}; + +class globals +{ +private: + static int id_counter; + +public: + int get_id() + { + return (id_counter ++ ); + } +}; + +int globals::id_counter = 10; +globals gPool; + + +IMPLEMENT_APP(MyApp) + +// ============================================= +// CLASS: cNewNote +// +// Contain all information for a particular +// notebook control. +// +// ============================================= + template< class tType > +class cNewNote +{ +public: + class tVec : public vector< clJPTR<tType> > + { + }; + +private: + ttextVec m_vpTextCtrl; + tpanelVec m_vpPanel; + +private: + clJPTR<wxNotebook> m_notebook; + tVec m_vBookList; + +public: + + cNewNote() + { + } + + void Init( wxPanel* pMainPanel ) + { + assert( m_vBookList.size() > 0 && "use AddPage First!" ); + + // Create a new NOTEBOOK item + m_notebook = new wxNotebook( pMainPanel, gPool.get_id() ); + + // Add all the pages + make_panels (); + + // Layout NoteBook in Main Panel + wxLayoutConstraints *pLayout = new wxLayoutConstraints; + pLayout->left.SameAs ( pMainPanel, wxLeft ); + pLayout->top.SameAs ( pMainPanel, wxTop ); + pLayout->right.SameAs ( pMainPanel, wxRight); + pLayout->bottom.SameAs ( pMainPanel, wxBottom); + m_notebook -> SetConstraints( pLayout ); + + // Create Initial Verse and Populate notebook texts. + // Update all commentaries and bibles + // NewVerse( wxString( "Genesis 1:1" )); + } + + // ----------------------------------------------- + // Create a note book tab, including + // panel, name of tab, and text area. + // + // ----------------------------------------------- + void make_panels() + { + tVec& oList = m_vBookList; + tVec::const_iterator iWalk; + + // For all books in our list do ... + for( iWalk = oList.begin(); iWalk != oList.end(); iWalk ++ ) + { + // Create a new Panel + m_vpPanel.push_back( new wxPanel( m_notebook.ptr() ) ); + m_vpPanel.back() -> SetAutoLayout( TRUE ); + + // Create a Text control for our panel + m_vpTextCtrl.push_back( new wxTextCtrl( (m_vpPanel.back()).ptr(), + gPool.get_id(), "", + wxPoint(-1,-1), wxSize(-1,-1), wxTE_MULTILINE )); + + // Remove right to edit + m_vpTextCtrl.back() -> SetEditable( FALSE ); + + // Set layout for this panel + wxLayoutConstraints *pLayout = new wxLayoutConstraints; + pLayout->left.SameAs ( (m_vpPanel.back()).ptr(), wxLeft ); + pLayout->top.SameAs ( (m_vpPanel.back()).ptr(), wxTop ); + pLayout->right.SameAs ( (m_vpPanel.back()).ptr(), wxRight); + pLayout->bottom.SameAs ( (m_vpPanel.back()).ptr(), wxBottom); + m_vpTextCtrl.back() -> SetConstraints(pLayout); + + // SET: Tab Name + m_notebook->AddPage( (m_vpPanel.back()).ptr(), (*iWalk)->Name(NULL), FALSE); + } + } + + // Adds a book I want to reference in my NoteBook. + void AddBook( tType* pABook ) + { + m_vBookList.push_back( pABook ); + } + + + // --------------------------------------------------------- + // NewVerse + // + // + void CommentaryVerse( wxString sVerse ) + { + VerseKey oKey = (char * ) sVerse.c_str(); + + oKey.Persist(1); + + tVec::iterator iWalk; + + // For every book in my list of books + // set this verse + for( iWalk = m_vBookList.begin(); + iWalk != m_vBookList.end(); + iWalk ++ ) + { + (*iWalk) -> SetKey( oKey ); + } + + ttextVec::iterator iText; + tVec::iterator iBooks = m_vBookList.begin(); + + // For every book, update verse info in text control. + for( iText = m_vpTextCtrl.begin(); + iText != m_vpTextCtrl.end(); + iText ++, iBooks ++ ) + { + // (*iText) -> SetValue( wxString( (*iBooks)->KeyText() )); + (*iText) -> SetValue( wxString( * ((*iBooks).ptr()) )); + } + } + // ---------------------------------------------------- + // Set the chapter in all the relevant note books + // + void BibleVerse( wxString sBook, const int nChapter, const int nVerse ) + { + wxString sTop; + sTop.Printf( "%s %d:%d", sBook.c_str(), nChapter, nVerse ); + + VerseKey oKey = (char * ) sTop.c_str(); + oKey.Persist(1); + + tVec::iterator iWalk; + + // For every book in my list of books + // set this verse + for( iWalk = m_vBookList.begin(); iWalk != m_vBookList.end(); iWalk ++ ) + { + (*iWalk) -> SetKey( oKey ); + } + + ttextVec::iterator iText; + tVec::iterator iBooks = m_vBookList.begin(); + + // For every book, update verse info in text control. + for( iText = m_vpTextCtrl.begin(); + iText != m_vpTextCtrl.end(); + iText ++, iBooks ++ ) + { + int i = 1; + ostrstream oOut; + int nStartPos = 0; + + // Clear Previous Text + (*iText) -> SetValue(""); + + // Add new Text + for( oKey = (char * ) sTop.c_str() ; oKey.Chapter() == nChapter; oKey ++, i++ ) + { + if ( i == nVerse ) + { + // Here is the verse we are interested in, mark it in some special + // way. + oOut << " <" << i << "> "; + } + else + oOut << " [" << i <<"] " ; + + oOut << * ((*iBooks).ptr()); + + if ( i == nVerse ) + { + nStartPos = oOut.pcount(); + } + } + oOut.put(0); + // Write out entire chapter + (*iText) -> WriteText( oOut.str()); + + // @todo: At this point you might want to + // 1. Grab a dynamic scroll bar + // 2. If you have the scroll bar, adjust it to the + // correct position, and with any insight + // the window should scroll to the appropriate + // verse. + // Exercise is left to the reader + + } + } + + + + void DictionaryKey( wxString sWord ) { + ttextVec::iterator iText; + tVec::iterator iBooks = m_vBookList.begin(); + + // For every book, update verse info in text control. + for( iText = m_vpTextCtrl.begin(); iText != m_vpTextCtrl.end(); iText ++, iBooks ++ ) { + ostrstream oOut; + + (*iBooks)->SetKey( sWord.c_str() ); + + // Clear Previous Text + (*iText) -> SetValue(""); + + // Add new Text + // This 'if' checks to make sure we have an entry + // It also forces the module to retrieve its text which forces KeyText to closest + // match. Without it, the call to KeyText would get exactly what we set with + // SetKey, above. + if (strlen(* ((*iBooks).ptr())) > 0) { + oOut << "[ " << ((*iBooks).ptr()) -> KeyText() << " ]" << endl; + oOut << * ((*iBooks).ptr()) << endl; + oOut.put(0); + (*iText) -> WriteText( oOut.str()); + } + } + } + + // NEW UPDATE + + void UpdateSearch( wxString sWord ) + { + ttextVec::iterator iText; + tVec::iterator iBooks = m_vBookList.begin(); + + // For every book, update verse info in text control. + for( iText = m_vpTextCtrl.begin(); + iText != m_vpTextCtrl.end(); + iText ++, iBooks ++ ) + { + ostrstream oOut; + + // Get the search results and start a key here. + SWListKey& oSearchResults = (*iBooks)->Search( sWord ); + oSearchResults.Persist( true ); + (*iBooks)->SetKey( oSearchResults ); + + // Clear Previous Text + (*iText) -> SetValue(""); + + // Add new Text + for( oSearchResults = TOP; + !oSearchResults.Error(); + oSearchResults ++ ) + { + oOut << (const char *) oSearchResults << ":" << endl; + oOut << * ((*iBooks).ptr()) << endl; + } + // Write out all matches + oOut.put(0); + (*iText) -> WriteText( oOut.str()); + } + } + + + + // --------------------------------------------------------- + // UpdateSearch + // Given a word, update all windows to reflect + // that word. + // NOTE: This may only be need by the Definition + // Windows. + // + void OLD_UpdateSearch( const wxString sWord ) + { + SWListKey oList; + tVec::iterator iWalk; + ttextVec::iterator iText = m_vpTextCtrl.begin(); + char szBuff[5000] = { 0 }; + + for( iWalk = m_vBookList.begin(); + iWalk != m_vBookList.end(); + iWalk ++ ) + { + // For all the matches do: + for( SWListKey oListKey = (*iWalk) -> Search( sWord.c_str(), REG_ICASE ); + !oListKey.Error(); + oListKey++ ) + { + strcat( szBuff, (const char *) oListKey ); + strcat( szBuff, "\n\n" ); + } + + // Update Text of Notebook + (*iText) -> SetValue( wxString( szBuff ) ); + } + return; + } + + +}; + + + + +// -------------------------------------------------------- +// CLASS: CHEADLINE +// +// + +class cHeadLine +{ +public: + clJPTR<wxComboBox> m_pBible; + clJPTR<wxComboBox> m_pChapter; + clJPTR<wxComboBox> m_pVerse; +private: + clJPTR<wxButton> m_pButton; + + +private: // member functions + // ---------------------------------------------------------- + // Find Book info in one of our 2 book lists. + // --------------------------------------------------------- + struct sbook* FindBook( const wxString& sBook ) + { + static const VerseKey oStep; + + + for(int i = 0; i < 2; i ++ ) + { + for( int j = 0; j < oStep.BMAX[i]; j ++ ) + { + if ( wxStringEq(sBook, wxString(oStep.books[i][j].name)) ) + { + return &oStep.books[i][j]; + } + } + } + return ( NULL ); + } + +public: + cHeadLine( wxPanel* pPanel) + { + static wxString choices[ 200 ]; + static VerseKey oStep; + int k = 0; + + // Initialize STRINGS of books of bible + for( int i = 0; i < 2; i ++ ) + { + for( int j = 0; j < oStep.BMAX[i]; j ++ ) + { + choices[k++] = wxString( oStep.books[i][j].name ); + } + } + + // Create Bible Book Selector + m_pBible = new wxComboBox( pPanel , + ID_CHOICE+1, choices[0], wxPoint(10,10), + wxSize(200,-1), k, choices ); + + m_pBible -> SetEditable( FALSE ); + + // Create Chapter Selector + m_pChapter = new wxComboBox( pPanel , + ID_CHOICE+2, "", wxPoint(220,10), + wxSize(50,-1) ); + + m_pChapter -> SetEditable( FALSE ); + + // Create Verse Selector + + m_pVerse = new wxComboBox( pPanel , + ID_CHOICE+3, "", wxPoint(280,10), + wxSize(50,-1) ); + + m_pVerse -> SetEditable( FALSE ); + + // Create Button for Search for Verse NOW. + m_pButton = new wxButton( pPanel, + ID_CHOICE+4, "GO!", wxPoint( 340, 10), + wxSize( 60 , -1 )); + + UpdateChapter( choices[0] ); + UpdateVerse( choices[0], 0 ); + } + + // ----------------------------------------------------- + // UpdateChapter + // Set all chapter numbers for the 1st chapter + // of this particular book. + // + // + void UpdateChapter( const wxString& sBook ) + { + struct sbook* pFound = NULL; + wxString sTemp; + + // Find Struct of Book Info + pFound = FindBook( sBook ); + assert( pFound && "This should always find something!"); + + // Remove all elements from chapter control. + m_pChapter->Clear(); + + // Fill List of Chapters + for( int i = 0; i < pFound->chapmax; i ++ ) + { + sTemp.Printf("%2d", i + 1 ); + m_pChapter->Append( sTemp ); + } + } + + + // ----------------------------------------------------- + // UpdateVerse + // Set all verses for the 1st verse of this + // particular chapter, in this particular + // book. + // + UpdateVerse( wxString sBook, const int iChapter ) + { + struct sbook* pFound = NULL; + + // Find Struct of Book Info + pFound = FindBook( sBook ); + assert( pFound && "This should always find something!"); + + wxString sTemp; + + m_pVerse -> Clear(); + for( int i = 0; i < pFound->versemax[iChapter]; i ++ ) + { + sTemp.Printf( "%d", i + 1 ); + m_pVerse->Append( sTemp ); + } + } +}; + + + +// =================================================================== +// CLASS: CDEFHEADLINE +// Contain Headliner information about Definition notebook. +// +// @todo: Looks like a kludge - fix. +int WID_STATICTEXT = 100; +int WID_TEXT = WID_STATICTEXT + 1; + + +class cDefHeadLine +{ +public: + clJPTR<wxTextCtrl> m_pSearchCtrl; + +public: + cDefHeadLine(wxPanel* pPanel) + { + + // Create Bible Book Selector + new wxStaticText( pPanel, + WID_STATICTEXT, "Dictionary Key:", + wxPoint( 10, 15), wxSize( 100, -1 ), + wxRAISED_BORDER); + + m_pSearchCtrl = new wxTextCtrl( pPanel, + WID_TEXT, "", wxPoint(105,10), + wxSize(200,-1), wxTE_PROCESS_ENTER); + } +}; + + +// =================================================================== +// CLASS: MyFrame +// +// Define a new frame +class MyFrame: public wxFrame +{ +public: + wxPanel* m_pBiblePanel; + wxPanel* m_pCommentPanel; + wxPanel* m_pDefPanel; + wxPanel* m_pHeadLine; + wxPanel* m_pDefHeadLine; + + cHeadLine* m_pcHeadLine; + cDefHeadLine* m_pcDefHeadLine; + + cNewNote<SWModule>* m_pcNoteBible; + cNewNote<SWModule>* m_pcNoteCommentary; + cNewNote<SWModule>* m_pcNoteDef; + +public: + MyFrame(wxFrame *parent, wxWindowID id = -1, const wxString& title = "wxToolBar Sample", + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE); + + virtual ~MyFrame(); + +public: + // Event Handlers + void OnCloseWindow(wxCloseEvent& event); + void OnQuit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnToolLeftClick(wxCommandEvent& event); + void OnToolEnter(wxCommandEvent& event); + void OnBookUpdate( wxCommandEvent& event ); + void OnChapterUpdate( wxCommandEvent& event ); + void OnGoButton( wxCommandEvent& event ); + void OnDefinitionSearch( wxCommandEvent& event ); + + DECLARE_EVENT_TABLE() + + + public: + SWMgr *mainMgr; + char CreateTextPane(SWModule *mod, char *font = 0); + char CreateCommentPane(SWModule *mod); + char CreateLDPane(SWModule *mod); +}; + + +// ----------------------------------------------------------------------- +// The `main program' equivalent, creating the windows and returning the +// main frame +// ----------------------------------------------------------------------- +bool MyApp::OnInit(void) +{ + // CREATE Main Frame + MyFrame* pFrame = + new MyFrame((wxFrame *) NULL, -1, + (const wxString) "Sword Project 1.0", + wxPoint(100, 100), wxSize(650, 500)); + + // CREATE Status Line + pFrame -> CreateStatusBar(); + + // SET: Auto Layout + pFrame -> SetAutoLayout( TRUE ); + + // SET: Icon + pFrame->SetIcon( wxIcon(mondrian_xpm) ); + + // CREATE File Menu + wxMenu *fileMenu = new wxMenu; + + fileMenu->Append(wxID_EXIT, "E&xit"); + + // CREATE Help Menu + wxMenu *helpMenu = new wxMenu; + helpMenu->Append(wxID_HELP, "&About"); + + // CREATE Menu Bar + wxMenuBar* menuBar = new wxMenuBar; + + menuBar->Append(fileMenu, "&File"); + menuBar->Append(helpMenu, "&Help"); + + // ASSOCIATE: Menubar and Frame + pFrame->SetMenuBar(menuBar); + + // CREATE: toolbar + pFrame->CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT, ID_TOOLBAR); + + // INITIALIZE: toolbar + InitToolbar(pFrame->GetToolBar()); + + // Text Message + pFrame->SetStatusText("Alpha $Revision: 1.1.1.1 $:Linux Version:Sword Development Team."); + + // Add Panel Info ============================================== + + // CREATE: Bible All Major Panels + pFrame->m_pBiblePanel = new wxPanel(pFrame, 0, 0, 10, 10, wxTAB_TRAVERSAL); + pFrame->m_pCommentPanel = new wxPanel(pFrame, 0, 0, 10, 10, wxTAB_TRAVERSAL); + pFrame->m_pDefPanel = new wxPanel(pFrame, 0, 0, 10, 10, wxTAB_TRAVERSAL); + pFrame->m_pHeadLine = new wxPanel(pFrame, 0, 0, 10, 10, wxRAISED_BORDER); + pFrame->m_pDefHeadLine = new wxPanel(pFrame, 0, 0, 10, 10, wxRAISED_BORDER); + + // pFrame->m_pDefPanel->SetBackgroundColour(wxColour(192, 192, 192)); + + // Set constraints for panel subwindow + wxLayoutConstraints *pLayout = new wxLayoutConstraints; + + // Set constraints for Head Line Window + + pLayout->left.SameAs ( pFrame, wxLeft ); + pLayout->right.SameAs ( pFrame, wxRight); + pLayout->top.SameAs ( pFrame, wxTop ); + pLayout->height.PercentOf ( pFrame, wxHeight, 10 ); + + pFrame-> m_pHeadLine ->SetConstraints( pLayout ); + + // Bible Constraints + pLayout = new wxLayoutConstraints; + pLayout->left.SameAs (pFrame, wxLeft); + pLayout->right.PercentOf (pFrame, wxWidth, 60); + pLayout->top.SameAs ( pFrame -> m_pHeadLine, wxBottom ); + pLayout->height.PercentOf (pFrame, wxHeight, 50); + + pFrame-> m_pBiblePanel -> SetConstraints( pLayout ); + + // Commentary Constraints + pLayout = new wxLayoutConstraints; + + pLayout->left.SameAs ( pFrame->m_pBiblePanel, wxRight ); + pLayout->right.SameAs ( pFrame, wxRight ); + pLayout->top.SameAs ( pFrame -> m_pHeadLine, wxBottom ); + pLayout->height.PercentOf ( pFrame, wxHeight, 50 ); + + pFrame-> m_pCommentPanel -> SetConstraints( pLayout ); + + // Set constraints for Definition Search + pLayout = new wxLayoutConstraints; + + pLayout->left.SameAs ( pFrame, wxLeft ); + pLayout->right.SameAs ( pFrame, wxRight); + pLayout->top.SameAs ( pFrame->m_pBiblePanel, wxBottom ); + pLayout->height.PercentOf ( pFrame, wxHeight, 10 ); + + pFrame -> m_pDefHeadLine -> SetConstraints( pLayout ); + + // Definition Window + pLayout = new wxLayoutConstraints; + pLayout->left.SameAs ( pFrame, wxLeft ); + pLayout->right.SameAs ( pFrame, wxRight); + pLayout->top.SameAs ( pFrame->m_pDefHeadLine, wxBottom ); + pLayout->bottom.SameAs ( pFrame, wxBottom); + + pFrame-> m_pDefPanel ->SetConstraints( pLayout ); + + + // ===================================================== + // Start loading modules. + // + pFrame -> m_pcHeadLine = new cHeadLine( pFrame -> m_pHeadLine ); + pFrame -> m_pcDefHeadLine = new cDefHeadLine( pFrame -> m_pDefHeadLine ); + + pFrame -> m_pcNoteBible = new cNewNote<SWModule>; + pFrame -> m_pcNoteCommentary = new cNewNote<SWModule>; + pFrame -> m_pcNoteDef = new cNewNote<SWModule>; + + ModMap::iterator it; + SectionMap::iterator sit; + ConfigEntMap::iterator eit; + char *font; + + pFrame->mainMgr = new SWMgr(); + + // -------------------------------------------- + // @todo: Need to find a better way to exit. + // + assert( (pFrame -> mainMgr -> Modules.size() > 0) && "No modules found!" ); + + for (it = pFrame->mainMgr->Modules.begin(); + it != pFrame->mainMgr->Modules.end(); it++) + { + if (!strcmp((*it).second->Type(), "Biblical Texts")) + { + font = 0; + if ((sit = pFrame->mainMgr->config->Sections.find((*it).second->Name())) != pFrame->mainMgr->config->Sections.end()) + { + if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) + { + font = (char *)(*eit).second.c_str(); + } + } + + // question: why is font null? + // answer: most of the time, a unique font is not + // specified in mods.conf with 'font=' + cout << font << endl; + pFrame->CreateTextPane((*it).second, font); + } + + if (!strcmp((*it).second->Type(), "Commentaries")) + pFrame->CreateCommentPane((*it).second); + + if (!strcmp((*it).second->Type(), "Lexicons / Dictionaries")) + pFrame->CreateLDPane((*it).second); + } + + // Initialize all views with data + if ( pFrame && pFrame -> m_pcNoteBible ) + pFrame -> m_pcNoteBible -> Init( pFrame -> m_pBiblePanel ); + + if ( pFrame && pFrame -> m_pcNoteCommentary ) + pFrame -> m_pcNoteCommentary -> Init( pFrame -> m_pCommentPanel ); + + if (pFrame && pFrame -> m_pcNoteDef ) + pFrame -> m_pcNoteDef -> Init( pFrame -> m_pDefPanel ); + + // ----------------------------------------------- + // Okay, Initial verse would be a nice touch. + // + wxString sBook = "Genesis"; + wxString sStart = sBook + " 1:1"; + + if (pFrame && pFrame -> m_pcNoteBible ) + pFrame -> m_pcNoteBible -> BibleVerse( sBook, 1, 1 ); + + if (pFrame && pFrame -> m_pcNoteCommentary ) + pFrame -> m_pcNoteCommentary -> CommentaryVerse( sStart ); + + // Force a resize. This should probably be replaced by a call to a wxFrame + // function that lays out default decorations and the remaining content window. + + // pFrame->OnSize(wxSizeEvent(wxSize(-1, -1), pFrame->GetId()) ); + pFrame->Show(TRUE); + + // ================================================= + + SetTopWindow( pFrame ); + return TRUE; +} + + +/****************************************************************************** + * CreateTextPane - creates a new pane in the tabsheet for a Bible Text + * + * mod - Bible text module to associate with this panel + * font - font to use for displaying this module (default = 0) + * + * RETURN: error status + */ + +char MyFrame::CreateTextPane(SWModule *mod, char *font) +{ + // @todo: need to make use of font for displaying Greek MSS + + m_pcNoteBible->AddBook(mod); + return 0; +} + + +/****************************************************************************** + * CreateCommentPane - creates a new pane in the tabsheet for a Bible + * Commentary + * + * mod - Bible commentary module to associate with this panel + * + * RETURN: error status + */ + +char MyFrame::CreateCommentPane(SWModule *mod) +{ + m_pcNoteCommentary->AddBook(mod); + return 0; +} + + +/****************************************************************************** + * CreateLDPane - creates a new pane in the tabsheet for a Bible + * Lexicon or Dictionary + * + * mod - Bible text module to associate with this panel + * + * RETURN: error status + */ + +char MyFrame::CreateLDPane(SWModule *mod) +{ + m_pcNoteDef->AddBook(mod); + return 0; +} + + + + +bool MyApp::InitToolbar(wxToolBar* toolBar) +{ + toolBar->SetMargins(5, 5); + + // Set up toolbar + wxBitmap* toolBarBitmaps[8]; + + toolBarBitmaps[0] = new wxBitmap( new_xpm ); + toolBarBitmaps[1] = new wxBitmap( open_xpm ); + toolBarBitmaps[2] = new wxBitmap( save_xpm ); + toolBarBitmaps[3] = new wxBitmap( copy_xpm ); + toolBarBitmaps[4] = new wxBitmap( cut_xpm ); + // toolBarBitmaps[5] = new wxBitmap( paste_xpm ); + toolBarBitmaps[5] = new wxBitmap( preview_xpm ); + toolBarBitmaps[6] = new wxBitmap( print_xpm ); + toolBarBitmaps[7] = new wxBitmap( help_xpm ); + + int width = 16; + int currentX = 5; + + toolBar->AddTool(wxID_NEW, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "New file"); + currentX += width + 5; + toolBar->AddTool(wxID_OPEN, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Open file"); + currentX += width + 5; + toolBar->AddTool(wxID_SAVE, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Save file"); + currentX += width + 5; + toolBar->AddSeparator(); + toolBar->AddTool(wxID_COPY, *(toolBarBitmaps[3]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Copy"); + currentX += width + 5; + toolBar->AddTool(wxID_CUT, *(toolBarBitmaps[4]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Cut"); + currentX += width + 5; + toolBar->AddTool(wxID_PASTE, *(toolBarBitmaps[5]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Paste"); + currentX += width + 5; + toolBar->AddSeparator(); + toolBar->AddTool(wxID_PRINT, *(toolBarBitmaps[6]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Print"); + currentX += width + 5; + toolBar->AddSeparator(); + toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help"); + + toolBar->Realize(); + + // Can delete the bitmaps since they're reference counted + int i; + for (i = 0; i < 8; i++) + delete toolBarBitmaps[i]; + + return TRUE; +} + +// wxID_HELP will be processed for the 'About' menu and the toolbar help button. + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(wxID_EXIT, MyFrame::OnQuit) + EVT_MENU(wxID_HELP, MyFrame::OnAbout) + EVT_CLOSE(MyFrame::OnCloseWindow) + EVT_TOOL_RANGE(wxID_OPEN, wxID_PASTE, MyFrame::OnToolLeftClick) + EVT_TOOL_ENTER(ID_TOOLBAR, MyFrame::OnToolEnter) + EVT_CHOICE(ID_CHOICE+1, MyFrame::OnBookUpdate) + EVT_CHOICE(ID_CHOICE+2, MyFrame::OnChapterUpdate) + EVT_BUTTON(ID_CHOICE+4, MyFrame::OnGoButton) + + // REQUIREMENT: On enter on text to search + EVT_TEXT(WID_TEXT, MyFrame::OnDefinitionSearch ) + + // End + END_EVENT_TABLE() + + // Define my frame constructor + MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos, + const wxSize& size, long style): + wxFrame(parent, id, title, pos, size, style) +{ + // m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE); + mainMgr = 0; +} + + +MyFrame::~MyFrame() +{ + if (mainMgr) + delete mainMgr; +} + + +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + Close(TRUE); +} + +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +{ + static char * szMess = + { + "Sword Project 1.0\n" + "Linux Version\n" + "Sword Development Team\n" + "LC\n" + }; + + + (void)wxMessageBox( szMess , "About Sword"); +} + +// Define the behaviour for the frame closing +// - must delete all frames except for the main one. +void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + Destroy(); +} + +void MyFrame::OnToolLeftClick(wxCommandEvent& event) +{ + wxString str; + str.Printf("Clicked on tool %d", event.GetId()); + SetStatusText(str); +} + +void MyFrame::OnToolEnter(wxCommandEvent& event) +{ + if (event.GetSelection() > -1) + { + wxString str; + str.Printf("This is tool number %d", event.GetSelection()); + SetStatusText(str); + } + else + SetStatusText(""); +} + + +// ============================================================================ +// OnBookUpdate +// When the book changes we do 3 things. +// 1. Reset verse and chapter to 1 ( all books have 1 chapter 1 verse ). +// 2. Update the valid list of Chapters 1..ChapterMax for this book +// 3. Update the verse list for the first chapter (1..verse max for this chapter). +// +void MyFrame::OnBookUpdate( wxCommandEvent& event ) +{ + if (event.GetSelection() > -1) + { + + if (m_pcHeadLine) + { + // Get book name. + wxString sBook = m_pcHeadLine ->m_pBible->GetString( event.GetSelection() ); + + // Update chapter (automagically calls OnChapterUpdate ) + m_pcHeadLine -> UpdateChapter( sBook ); + } + } +} + +// =============================================================== +// On chapter change we need to do +// 1. Update Verse information for this chapter. +// +void MyFrame::OnChapterUpdate( wxCommandEvent& event ) +{ + if (event.GetSelection() > -1 ) + { + + if (m_pcHeadLine) + { + // Get Book and current chapter + wxString sBook = m_pcHeadLine -> m_pBible -> GetValue(); + int iChapter = event.GetSelection(); + + m_pcHeadLine -> UpdateVerse( sBook, iChapter ); + } + } +} + +void MyFrame::OnGoButton( wxCommandEvent& event ) +{ + wxString sNewVerse; + + // Check for Programmer Error + assert( m_pcHeadLine ); + assert( m_pcNoteBible ); + assert( m_pcNoteCommentary ); + + + // Insanity Check + if ( m_pcHeadLine ) + { + // Get Selection Data + wxString sBook = m_pcHeadLine ->m_pBible-> GetValue(); + int iChapter = atoi(m_pcHeadLine -> m_pChapter -> GetValue()); + int iVerse = atoi(m_pcHeadLine -> m_pVerse -> GetValue()); + + sNewVerse.Printf( "%s %d : %d", sBook.c_str(), iChapter, iVerse ); + + // Update current verse + SetStatusText( "VERSE: " + sNewVerse ); + + // Update all commentaries and bibles + m_pcNoteBible -> BibleVerse( sBook, iChapter, iVerse); + m_pcNoteCommentary -> CommentaryVerse( sNewVerse ); + } +} + + +// ---------------------------------------------------- +// OnDefinitionSearch +// Search for definition of the word in the +// text area. Use the definition NOTEBOOK object. +// +// + +void MyFrame::OnDefinitionSearch( wxCommandEvent& event ) +{ + if (m_pcDefHeadLine) + { + wxString sDefinition = wxString( "Searching for: ") + + m_pcDefHeadLine -> m_pSearchCtrl -> GetValue(); + SetStatusText( sDefinition ); + + m_pcNoteDef -> DictionaryKey( m_pcDefHeadLine -> m_pSearchCtrl -> GetValue() ); + } +} diff --git a/apps/X11/wxSword/gui_sword.h b/apps/X11/wxSword/gui_sword.h new file mode 100644 index 0000000..9cdc152 --- /dev/null +++ b/apps/X11/wxSword/gui_sword.h @@ -0,0 +1,11 @@ +// Define a new application +class MyApp: public wxApp +{ + public: + bool OnInit(void); + bool InitToolbar(wxToolBar* toolBar); +}; + + +#define ID_TOOLBAR 500 + diff --git a/apps/X11/wxSword/jptr.C b/apps/X11/wxSword/jptr.C new file mode 100644 index 0000000..bf2c2c4 --- /dev/null +++ b/apps/X11/wxSword/jptr.C @@ -0,0 +1,199 @@ +// #include "jptr.h" + + +template <class tType> + tType* clJPTR<tType>::ptr() const + { + ldebug(cout<<"MEMBER type*"<<endl, 3 ); + + assert( _pKey && "Key should always have data!" ); + return (_pKey ); + } + +template < class tType > + void clJPTR< tType >::operator=( tType* pMem ) + { + ldebug(cout<<"MEMBER operator=pMemory"<<endl,3); + + // check if new returned null. I really don't know + // if it does or throughs an exception, but just + // in case. + if (!pMem) + { + OutOfMemory(); + return; + } + + // If we where pointing to something else, + // stop point to it, and start pointing to pMEm. + if (_pKey) + remove(); + add( pMem ); + } + +template < class tType > + void clJPTR< tType >::operator=( const clJPTR& oOther ) + { + ldebug(cout<<"MEMBER operator=Java Pointer"<<endl,3); + + // Re-use other code. + *this = oOther._pKey; + } + +template < class tType > + tType* clJPTR< tType >::operator->() const + { + ldebug(cout<<"MEMBER operator ->"<<endl, 3 ); + + assert( _pKey && "Key should always have data!" ); + return (_pKey ); + } + +template < class tType > + tType* clJPTR< tType >::clone() const + { + ldebug( cout<<"MEMBER clone"<<endl,3 ); + assert( _pKey && "This shouldn't be null!" ); + + // DANGER: This assumes that class we point to has + // copy constructor! + return new tType(*_pKey); + } + +template < class tType > + void clJPTR< tType >::add( tType* pMem ) + { + ldebug(cout<<"MEMBER add"<<endl,4); + + // Add key + _pKey = pMem; + + // Add 1 to our count + _oMap[ pMem ] ++; + + ldebug(print(2),2); + } + +template < class tType > + void clJPTR< tType >::remove() + { + ldebug(cout<<"MEMBER remove"<<endl,4); + + // Decrement our reference count + _oMap[ _pKey ] --; + + // Insanity Check + assert( (_oMap[_pKey] >= 0) && "Map value is negative!" ); + + // If 0 then we have just deleted our last pointer + if ( _oMap[_pKey] == 0 ) + { + ldebug( cout<<"DELETEING MEMORY: ",2 ); + assert( _pKey && "Major bug, this should never be NULL" ); + + // Remove Memory + delete _pKey; + + // Remove Key Entry + _oMap.erase( _pKey ); + } + + // undefine key + _pKey = NULL; + + // List table of entries + ldebug( print(2), 2 ); + } + + +template< class tType > + void clJPTR< tType >::print(int level) + { + assert( (level > -1) && "Expecting a non-negative level!" ); + + clMap::const_iterator iWalk; + char cBuff[30] = { 0 }; + char cTabs[20] = { 0 }; + + // Fill fillers + memset( cBuff, '-', sizeof( cBuff ) -1 ); + memset( cTabs, '\t', min( level, (int) sizeof( cTabs ) - 1) ); + + // add a new line + cout << endl; + + // Title of table + cout << cTabs << "Ptr -> Reference Count" << endl; + cout << cTabs << cBuff << endl; + + // Elements of Table + for( iWalk = _oMap.begin(); iWalk != _oMap.end(); iWalk ++ ) + { + cout << cTabs << (*iWalk).first << " -> " << (*iWalk).second << endl; + } + + // Trailer of table + cout << cTabs << cBuff << endl; + } + + + +/* + The reason this is private is so the you the programmer are not + tempted to write something like + clJPTR< xcl > oNew; + + because this pointer will not have an object to after it's + constructor and a little too dangerous. +*/ + +template < class tType > + clJPTR< tType >::clJPTR() + { + ldebug(cout<<"DEFAULT Constructor"<<endl,4); + _pKey = NULL; + }; + +template < class tType > + clJPTR<tType>::clJPTR( tType* pMem ) + { + ldebug(cout<<"MEM Constructor"<<endl,4); + _pKey = NULL; + *this=pMem; + } + +template < class tType > + clJPTR<tType>::clJPTR(const clJPTR<tType>& oThat) + { + ldebug(cout<<"COPY Constructor"<<endl,4); + _pKey = NULL; + *this=oThat; + } + +template <class tType > + clJPTR<tType>::~clJPTR() + { + ldebug(cout<<"Destructor"<<endl,4); + if (_pKey) + remove(); + } + +/* override this method, + it is for the instance when new returns + NULL +*/ + +template <class tType> + void clJPTR<tType>::OutOfMemory() + { + ldebug(cout << "ERROR: Out of Memory" << endl, 1 ); + assert( 0 && "Out of Memory!" ); + } + + +// Wierd but true, global variable declaration for this +// class. +// +template <class tType> + clJPTR<tType>::clMap clJPTR<tType>::_oMap; + diff --git a/apps/X11/wxSword/jptr.h b/apps/X11/wxSword/jptr.h new file mode 100644 index 0000000..2a5a3be --- /dev/null +++ b/apps/X11/wxSword/jptr.h @@ -0,0 +1,95 @@ +// #ifndef __JPTR_H__ +// #define __JPTR_H__ + + + +#include <iostream> +#include <stl.h> +#include <assert.h> +#include <string.h> + +const int gDebugLevel = 0 ; + +// level 0: no Debugging +// level 1: construction of test object +// level 2: list of memory after add or delete of pointer to object +// level 3: Public api of jptr +// level 4: all api of jptr + + +#define ldebug(oRoutine,level) {if (level <= gDebugLevel) \ + {for(int i = 0; i < max(level,1); i++ ) \ + cout << "\t"; \ + cout<<"D"<<level<<": "; oRoutine; }} + + +// =============================================================== +// class template clJPTR +// purpose: simulate symantics of Java Pointers. +// benefits: +// 1. Don't need to worry about freeing the memory. +// 2. Don't need to design ownership models. +// 3. Generic. +// 4. Easy to use, almost fool proof. +// +// =============================================================== +template <class tType> + class clJPTR + { + private: // declarations + // The following is declaration of a global multimap + // for an instanciation of this template class. + // + class clMap : + public map< tType*, int, less< tType* > > + { }; + + + private: // variables + static clMap _oMap; + tType* _pKey; + + + public: // public member functions + void operator=( tType* pMem ); + void operator=( const clJPTR& oOther ); + tType* operator->() const; + tType* clone() const; + tType* ptr() const; + + + private: // private helper functions + void add( tType* pMem ); + void remove(); + void print(int level); + +/* + The reason this is private is so the you the programmer are not + tempted to write something like + clJPTR< xcl > oNew; + + because this pointer will not have an object to after it's + constructor and a little too dangerous. +*/ + + public: // Constructors + clJPTR(); + + clJPTR( tType* pMem ); + clJPTR(const clJPTR<tType>& oThat); + + public: // Virtual Methods! + + virtual ~clJPTR(); + + /* override this method, + it is for the instance when new returns + NULL + */ + virtual void OutOfMemory(); + +}; + +#include "jptr.C" + +// #endif // JPTR diff --git a/apps/X11/wxSword/mondrian.xpm b/apps/X11/wxSword/mondrian.xpm new file mode 100644 index 0000000..409f27a --- /dev/null +++ b/apps/X11/wxSword/mondrian.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *mondrian_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 6 1", +" c Black", +". c Blue", +"X c #00bf00", +"o c Red", +"O c Yellow", +"+ c Gray100", +/* pixels */ +" ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" " +}; |