From 482d903956af4435e3b78e2651c3e0cd3cb2da22 Mon Sep 17 00:00:00 2001 From: kswong Date: Mon, 12 Jun 2000 01:24:01 +0000 Subject: [PATCH] Initial revision --- AUTHORS | 1 + COPYING | 340 +++++ ChangeLog | 144 ++ INSTALL | 182 +++ Makefile.am | 7 + Makefile.in | 390 ++++++ NEWS | 0 README | 37 + aclocal.m4 | 678 ++++++++++ configure | 2545 ++++++++++++++++++++++++++++++++++++ configure.in | 34 + debian/changelog | 21 + debian/control | 13 + debian/copyright | 20 + debian/docs | 1 + debian/menu | 2 + debian/rules | 42 + gtetrinet.desktop | 7 + gtetrinet.png | Bin 0 -> 2349 bytes install-sh | 250 ++++ missing | 188 +++ mkinstalldirs | 40 + src/Makefile.am | 7 + src/Makefile.in | 338 +++++ src/client.c | 434 ++++++ src/client.h | 44 + src/commands.c | 211 +++ src/commands.h | 15 + src/config.c | 227 ++++ src/config.h | 23 + src/dialogs.c | 863 ++++++++++++ src/dialogs.h | 6 + src/fields.c | 584 +++++++++ src/fields.h | 24 + src/gtetrinet.c | 247 ++++ src/gtetrinet.h | 5 + src/images/fields.xpm | 183 +++ src/images/partyline.xpm | 163 +++ src/images/winlist.xpm | 199 +++ src/keys.c | 31 + src/keys.h | 1 + src/keytable.h | 1325 +++++++++++++++++++ src/misc.c | 190 +++ src/misc.h | 10 + src/partyline.c | 252 ++++ src/partyline.h | 8 + src/sound.c | 103 ++ src/sound.h | 25 + src/tetrinet.c | 1680 ++++++++++++++++++++++++ src/tetrinet.h | 32 + src/tetris.c | 412 ++++++ src/tetris.h | 16 + src/winlist.c | 72 + src/winlist.h | 4 + themes/Makefile.am | 1 + themes/Makefile.in | 297 +++++ themes/default/Makefile.am | 3 + themes/default/Makefile.in | 217 +++ themes/default/blocks.png | Bin 0 -> 38065 bytes themes/default/theme.cfg | 8 + 60 files changed, 13202 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 aclocal.m4 create mode 100755 configure create mode 100644 configure.in create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/menu create mode 100755 debian/rules create mode 100644 gtetrinet.desktop create mode 100644 gtetrinet.png create mode 100755 install-sh create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 src/Makefile.am create mode 100644 src/Makefile.in create mode 100644 src/client.c create mode 100644 src/client.h create mode 100644 src/commands.c create mode 100644 src/commands.h create mode 100644 src/config.c create mode 100644 src/config.h create mode 100644 src/dialogs.c create mode 100644 src/dialogs.h create mode 100644 src/fields.c create mode 100644 src/fields.h create mode 100644 src/gtetrinet.c create mode 100644 src/gtetrinet.h create mode 100644 src/images/fields.xpm create mode 100644 src/images/partyline.xpm create mode 100644 src/images/winlist.xpm create mode 100644 src/keys.c create mode 100644 src/keys.h create mode 100644 src/keytable.h create mode 100644 src/misc.c create mode 100644 src/misc.h create mode 100644 src/partyline.c create mode 100644 src/partyline.h create mode 100644 src/sound.c create mode 100644 src/sound.h create mode 100644 src/tetrinet.c create mode 100644 src/tetrinet.h create mode 100644 src/tetris.c create mode 100644 src/tetris.h create mode 100644 src/winlist.c create mode 100644 src/winlist.h create mode 100644 themes/Makefile.am create mode 100644 themes/Makefile.in create mode 100644 themes/default/Makefile.am create mode 100644 themes/default/Makefile.in create mode 100644 themes/default/blocks.png create mode 100644 themes/default/theme.cfg diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..090490b --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Ka-shu Wong (kswong@zip.com.au) diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..eeb586b --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 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. + + , 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/ChangeLog b/ChangeLog new file mode 100644 index 0000000..1a10387 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,144 @@ +2000-06-08 + * Changed website addresses. + * Made configure run properly under GNOME 1.2. + * Changed icons to be friendlier to dark-coloured backgrounds. + +2000-01-12 + * Merged patch for Solaris support from Lars Christensen. + * Made some modifications to the README file. + +1999-12-30 + * Added a couple of checks for null pointers. + +1999-12-21 - version 0.4 + +1999-12-20 + * Fixed bug where the random filled field is not sent after player + loses. + +1999-12-13 + * Changed layout of connection dialog, added teamname entry. + +1999-12-06 + * It is now possible to change teams while not connected. + * Fixed a stupid spectator list bug. + +1999-12-05 + * Fixed a nasty messed-up field bug. (Thanks drslum!) + +1999-11-29 + * Added command line options support. + * Miscellaneous bug fixes. + +1999-11-28 + * Added tetrix server detection. + +1999-11-27 + * Added history to the partyline input box. + +1999-11-26 + * Fixed bugs with gamemsg input box. + +1999-11-25 + * Fixed level displays when in spectator mode. + * Fixed a case when a F line is sent as a spectator. + +1999-11-17 + * Tweaked display of player join, leave, and team lessages. + * Fixed bug where multiple error dialogs are displayed. + +1999-11-16 + * Display of moderator change messages are now delayed, to prevent + multiple messages being displayed on connection to server. + +1999-11-14 + * kick and playerwon messages from the server are now handled. + (appropriate messages are displayed in the partyline screen) + +1999-11-09 + * Most of spectator support done. + +1999-11-08 + * Miscellaneous bug fixes + stuff for spectator support. + +1999-11-06 + * Reduced the number of field updates sent to server. + * Miscellaneous bug fixes. + +1999-08-21 + * Added checkboxes in preferences dialog to enable/disable sound. + +1999-07-27 + * Added debian/ directory. + +1999-07-14 + * Opponent's fields are now correctly displayed when connected while + in game. + * Added a couple of lines of code for debugging. + +1999-07-13 + * Pressing F2 to switch to partyline page now also activates the + entry box. + +1999-07-10 + * GTetrinet no longer requires EsounD to compile. + * Fixed bug where the MIDI is started when theme settings are changed + but game is not in progress. + +1999-07-07 - version 0.3 + * Added icon + GNOME desktop file. + +1999-07-05 + * Player field is now properly cleared when player leaves. + * Improved theme selection page. + * Changed entries in connection and team dialogs to gnome_entrys. + +1999-06-23 + * MIDI player no longer runs if there is no MIDI for the current theme. + +1999-06-08 + * Changed theme file key "Theme/ThemeName" to "Theme/Name". + * Added theme file keys "Theme/Author" and "Theme/Description". + +1999-05-31 + * Found and removed an annoying printf() statement. + * Added keys (F1, F2, F3) to switch between notebook pages. + * Added MIDI support through an external player. + * Changed e-mail addresses. (so many!) + +1999-05-27 + * Updated sound support to use esd's sample caching for faster sound. + +1999-05-16 + * Added sound support through gnome-sound. + * There is now a longer delay between the block hitting something and + the time it solidifies. (should now be the same as Windows Tetrinet) + * Added full stops on every sentence in the ChangeLog. + +1999-04-09 + * Players now immediately lose if there is no space for the next + block. + +1999-04-01 - version 0.2 + * Added preferences dialog. + * Miscellaneous UI changes. + * Updated URLs. + +1999-03-28 + * Changed fields page player name & team display. + * A short description is now displayed for the current special block. + * Miscellaneous bug fixes. (Thanks to drslum for pointing them out) + +1999-03-25 + * Fixed block bomb behaviour - blocks are not scattered to top 6 lines, + and empty squares blown up by other blocks are scattered. + +1999-03-24 + * Classic mode added lines and A-block added lines are now different, + like in original Tetrinet. (Thanks to drslum for info) + * Fixed switch field so that it removes lines at the bottom if there + are < 6 free lines at the top, instead of simply clearing the top 6 + lines. + +1999-03-22 - version 0.1 + * ChangeLog started. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..b42a17a --- /dev/null +++ b/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/Makefile.am b/Makefile.am new file mode 100644 index 0000000..f9206de --- /dev/null +++ b/Makefile.am @@ -0,0 +1,7 @@ +SUBDIRS=src themes + +icon_DATA = gtetrinet.png +icondir = $(datadir)/pixmaps + +util_DATA = gtetrinet.desktop +utildir = $(datadir)/gnome/apps/Games diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..236208e --- /dev/null +++ b/Makefile.in @@ -0,0 +1,390 @@ +# 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@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_CONFIG = @ESD_CONFIG@ +ESD_LIBS = @ESD_LIBS@ +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@ +MAKEINFO = @MAKEINFO@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +ZVT_LIBS = @ZVT_LIBS@ + +SUBDIRS = src themes + +icon_DATA = gtetrinet.png +icondir = $(datadir)/pixmaps + +util_DATA = gtetrinet.desktop +utildir = $(datadir)/gnome/apps/Games +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +DATA = $(icon_DATA) $(util_DATA) + +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 = tar +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) + +install-iconDATA: $(icon_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(icondir) + @list='$(icon_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(icondir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(icondir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(icondir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(icondir)/$$p; \ + fi; fi; \ + done + +uninstall-iconDATA: + @$(NORMAL_UNINSTALL) + list='$(icon_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(icondir)/$$p; \ + done + +install-utilDATA: $(util_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(utildir) + @list='$(util_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(utildir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(utildir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(utildir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(utildir)/$$p; \ + fi; fi; \ + done + +uninstall-utilDATA: + @$(NORMAL_UNINSTALL) + list='$(util_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(utildir)/$$p; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@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) $(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)$$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 + 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 +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-iconDATA install-utilDATA +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-iconDATA uninstall-utilDATA +uninstall: uninstall-recursive +all-am: Makefile $(DATA) +all-redirect: all-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(icondir) $(DESTDIR)$(utildir) + + +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-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: 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: uninstall-iconDATA install-iconDATA uninstall-utilDATA \ +install-utilDATA 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 install-exec-am \ +install-exec 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 + + +# 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/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..a0ef58c --- /dev/null +++ b/README @@ -0,0 +1,37 @@ +GTetrinet v0.4.1 +-------------- + +GTetrinet is a clone of the popular Tetrinet game for Win95/NT. It is +designed to be fully compatible with, and to be identical in gameplay to the +original Tetrinet. + +For information on how to play the game, refer to the tetrinet.txt file that +is included with the original Tetrinet distribution. A copy of this file can +be found on the GTetrinet homepage. + +If you're looking for a popular public server to play on, take a look at +tetrinet.org. + +Tetrinet was originally conceived by St0rmCat. + + +Requirements +------------ + +GTetrinet requires GNOME 1.0 or newer. + +For sound support, ESD is required. However, GTetrinet can be compiled +without sound support. + +For MIDI music, GTetrinet also requires an external MIDI player, such as +playmidi or TiMidity++. + + +Homepage +-------- + +The GTetrinet homepage is at + +http://gtetrinet.sourceforge.net/ + +E-Mail suggestions, bug reports, etc to kswong@zip.com.au diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..6787614 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,678 @@ +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 +#include +#include + +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 +#include +], [ 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 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) +]) + +# 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]) + +# Configure paths for ESD +# Manish Singh 98-9-30 +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS +dnl +AC_DEFUN(AM_PATH_ESD, +[dnl +dnl Get the cflags and libraries from the esd-config script +dnl +AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], + esd_prefix="$withval", esd_prefix="") +AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], + esd_exec_prefix="$withval", esd_exec_prefix="") +AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], + , enable_esdtest=yes) + + if test x$esd_exec_prefix != x ; then + esd_args="$esd_args --exec-prefix=$esd_exec_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_exec_prefix/bin/esd-config + fi + fi + if test x$esd_prefix != x ; then + esd_args="$esd_args --prefix=$esd_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_prefix/bin/esd-config + fi + fi + + AC_PATH_PROG(ESD_CONFIG, esd-config, no) + min_esd_version=ifelse([$1], ,0.2.7,$1) + AC_MSG_CHECKING(for ESD - version >= $min_esd_version) + no_esd="" + if test "$ESD_CONFIG" = "no" ; then + no_esd=yes + else + AC_LANG_SAVE + AC_LANG_C + ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` + ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` + + esd_major_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + esd_minor_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_esdtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" +dnl +dnl Now check if the installed ESD is sufficiently new. (Also sanity +dnl checks the results of esd-config to some extent +dnl + rm -f conf.esdtest + AC_TRY_RUN([ +#include +#include +#include +#include + +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.esdtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_esd_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_esd_version"); + exit(1); + } + + if (($esd_major_version > major) || + (($esd_major_version == major) && ($esd_minor_version > minor)) || + (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); + printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); + printf("*** to point to the correct copy of esd-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + AC_LANG_RESTORE + fi + fi + if test "x$no_esd" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$ESD_CONFIG" = "no" ; then + echo "*** The esd-config script installed by ESD could not be found" + echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ESD_CONFIG environment variable to the" + echo "*** full path to esd-config." + else + if test -f conf.esdtest ; then + : + else + echo "*** Could not run ESD test program, checking why..." + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + AC_LANG_SAVE + AC_LANG_C + AC_TRY_LINK([ +#include +#include +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding ESD or finding the wrong" + echo "*** version of ESD. If it is not finding ESD, 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 ESD was incorrectly installed" + echo "*** or that you have moved ESD since it was installed. In the latter case, you" + echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + AC_LANG_RESTORE + fi + fi + ESD_CFLAGS="" + ESD_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(ESD_CFLAGS) + AC_SUBST(ESD_LIBS) + rm -f conf.esdtest +]) + diff --git a/configure b/configure new file mode 100755 index 0000000..7ff4130 --- /dev/null +++ b/configure @@ -0,0 +1,2545 @@ +#! /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" +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 + --with-esd-prefix=PFX Prefix where ESD is installed (optional)" +ac_help="$ac_help + --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)" +ac_help="$ac_help + --disable-esdtest Do not try to compile and run a test ESD 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=src/gtetrinet.c + +# 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:575: 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:628: 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:685: 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=gtetrinet + +VERSION=0.4.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 <> confdefs.h <&6 +echo "configure:731: 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:744: 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:757: 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:770: 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:783: 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:800: 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:830: 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:881: 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:913: 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 924 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:929: \"$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:955: 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:960: 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 <&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:988: 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:1070: 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:1105: 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 < +#include +#include + +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:1206: \"$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 < +#include + +int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); +; return 0; } +EOF +if { (eval echo configure:1250: \"$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="" + exit 1 + fi + + + rm -f conf.gtktest + + + + + + + + + + + + # 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:1343: 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:1380: 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:1388: 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:1424: 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:1458: 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:1494: 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:1558: 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:1578: 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 + + + +# Check whether --with-esd-prefix or --without-esd-prefix was given. +if test "${with_esd_prefix+set}" = set; then + withval="$with_esd_prefix" + esd_prefix="$withval" +else + esd_prefix="" +fi + +# Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given. +if test "${with_esd_exec_prefix+set}" = set; then + withval="$with_esd_exec_prefix" + esd_exec_prefix="$withval" +else + esd_exec_prefix="" +fi + +# Check whether --enable-esdtest or --disable-esdtest was given. +if test "${enable_esdtest+set}" = set; then + enableval="$enable_esdtest" + : +else + enable_esdtest=yes +fi + + + if test x$esd_exec_prefix != x ; then + esd_args="$esd_args --exec-prefix=$esd_exec_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_exec_prefix/bin/esd-config + fi + fi + if test x$esd_prefix != x ; then + esd_args="$esd_args --prefix=$esd_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_prefix/bin/esd-config + fi + fi + + # Extract the first word of "esd-config", so it can be a program name with args. +set dummy esd-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1637: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ESD_CONFIG" in + /*) + ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_ESD_CONFIG="$ESD_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_ESD_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no" + ;; +esac +fi +ESD_CONFIG="$ac_cv_path_ESD_CONFIG" +if test -n "$ESD_CONFIG"; then + echo "$ac_t""$ESD_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_esd_version=0.2.5 + echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6 +echo "configure:1672: checking for ESD - version >= $min_esd_version" >&5 + no_esd="" + if test "$ESD_CONFIG" = "no" ; then + no_esd=yes + else + + 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 + + ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` + ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` + + esd_major_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + esd_minor_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_esdtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + rm -f conf.esdtest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include +#include +#include + +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.esdtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_esd_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_esd_version"); + exit(1); + } + + if (($esd_major_version > major) || + (($esd_major_version == major) && ($esd_minor_version > minor)) || + (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); + printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); + printf("*** to point to the correct copy of esd-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +EOF +if { (eval echo configure:1762: \"$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_esd=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + 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 + + fi + fi + if test "x$no_esd" = x ; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_ESD 1 +EOF + + else + echo "$ac_t""no" 1>&6 + if test "$ESD_CONFIG" = "no" ; then + echo "*** The esd-config script installed by ESD could not be found" + echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ESD_CONFIG environment variable to the" + echo "*** full path to esd-config." + else + if test -f conf.esdtest ; then + : + else + echo "*** Could not run ESD test program, checking why..." + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + + 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 < +#include + +int main() { + return 0; +; return 0; } +EOF +if { (eval echo configure:1824: \"$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 ESD or finding the wrong" + echo "*** version of ESD. If it is not finding ESD, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "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 ESD was incorrectly installed" + echo "*** or that you have moved ESD since it was installed. In the latter case, you" + echo "*** may want to edit the esd-config script: $ESD_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + 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 + + fi + fi + ESD_CFLAGS="" + ESD_LIBS="" + : + fi + + + rm -f conf.esdtest + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1866: 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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1887: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1904: \"$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 < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1921: \"$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:1946: 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 < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1959: \"$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 +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 +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 < +#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:2026: \"$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 + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:2050: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +for ac_hdr in sys/time.h unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2095: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2105: \"$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 <&6 +fi +done + + +echo $ac_n "checking for putenv""... $ac_c" 1>&6 +echo "configure:2133: checking for putenv" >&5 +if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* 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 putenv(); + +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_putenv) || defined (__stub___putenv) +choke me +#else +putenv(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_putenv=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_putenv=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'putenv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for setenv""... $ac_c" 1>&6 +echo "configure:2181: checking for setenv" >&5 +if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* 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 setenv(); + +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_setenv) || defined (__stub___setenv) +choke me +#else +setenv(); +#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_setenv=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_setenv=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'setenv`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + +if test $ac_cv_func_setenv = no; then + if test $ac_cv_func_putenv = no; then + echo "Error: Couldn't find either putenv() or setenv()" + exit; + else + cat >> confdefs.h <<\EOF +#define HAVE_PUTENV 1 +EOF + + fi +else + cat >> confdefs.h <<\EOF +#define HAVE_SETENV 1 +EOF + +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 </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 +src/Makefile +themes/Makefile +themes/default/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < 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%@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%@ESD_CONFIG@%$ESD_CONFIG%g +s%@ESD_CFLAGS@%$ESD_CFLAGS%g +s%@ESD_LIBS@%$ESD_LIBS%g +s%@CPP@%$CPP%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 <> $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 <> $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/configure.in b/configure.in new file mode 100644 index 0000000..b3ae1f6 --- /dev/null +++ b/configure.in @@ -0,0 +1,34 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(src/gtetrinet.c) + +AM_INIT_AUTOMAKE(gtetrinet, 0.4.1) + +AC_PROG_CC + +AM_PATH_GTK(1.2.0,,exit 1) +GNOME_INIT + +AM_PATH_ESD(0.2.5, AC_DEFINE(HAVE_ESD)) + +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(sys/time.h unistd.h) + +AC_CHECK_FUNC(putenv) +AC_CHECK_FUNC(setenv) +if test $ac_cv_func_setenv = no; then + if test $ac_cv_func_putenv = no; then + echo "Error: Couldn't find either putenv() or setenv()" + exit; + else + AC_DEFINE(HAVE_PUTENV) + fi +else + AC_DEFINE(HAVE_SETENV) +fi + +AC_OUTPUT( +Makefile +src/Makefile +themes/Makefile +themes/default/Makefile) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..20ec60c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,21 @@ +gtetrinet (0.4-2) unstable; urgency=low + + * Add gtetrinet menu file. + + -- Ka-shu Wong Thu, 13 Jan 2000 00:44:26 +1100 + +gtetrinet (0.4-1) unstable; urgency=low + + * New release + + -- Ka-shu Wong Sun, 5 Dec 1999 21:26:06 +1100 + +gtetrinet (0.3-1) unstable; urgency=low + + * Initial release + + -- Ka-shu Wong Tue, 27 Jul 1999 20:06:10 +1000 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..7ab89b0 --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: gtetrinet +Section: games +Priority: optional +Maintainer: Ka-shu Wong +Standards-Version: 2.4.1.0 + +Package: gtetrinet +Architecture: any +Depends: ${shlibs:Depends} +Description: Multiplayer tetris game + GTetrinet is a clone of the popular Tetrinet game for Windows. + It is designed to be both network compatible and identical in + gameplay to the original Tetrinet. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d74d867 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,20 @@ +Copyright (C) 1999 Ka-shu Wong + +This program and its documentation are free software; you can +redistribute them and/or modify them 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 with +your Debian GNU/Linux system, in /usr/doc/copyright/GPL, or with the +Debian GNU/Linux hello source package as the file COPYING. If not, +write to the Free Software Foundation, Inc., 59 Temple Place - Suite +330, Boston, MA 02111-1307, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/doc/copyright/GPL'. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/menu b/debian/menu new file mode 100644 index 0000000..76281fe --- /dev/null +++ b/debian/menu @@ -0,0 +1,2 @@ +?package(gtetrinet):needs=X11 section=Games/Tetris-like title="GTetrinet" \ + command="/usr/bin/gtetrinet" diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..45f134f --- /dev/null +++ b/debian/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f + +INSTALL_BASE=`pwd`/debian/tmp + +package=gtetrinet + +build: + dh_testdir + + ./configure --prefix=/usr + $(MAKE) + touch build + +clean: + dh_testdir + dh_testroot + + rm -f build + -$(MAKE) -i distclean + + dh_clean + +binary-indep: + +binary-arch: build + dh_testdir -a + dh_testroot -a + + $(MAKE) install DESTDIR=$(INSTALL_BASE) + + dh_installdocs -a + dh_installchangelogs -a ChangeLog + dh_installmenu -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch diff --git a/gtetrinet.desktop b/gtetrinet.desktop new file mode 100644 index 0000000..91baee3 --- /dev/null +++ b/gtetrinet.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=GTetrinet +Comment=Tetrinet clone +Exec=gtetrinet +Icon=gtetrinet.png +Terminal=0 +Type=Application diff --git a/gtetrinet.png b/gtetrinet.png new file mode 100644 index 0000000000000000000000000000000000000000..6d96d3325f1109a9c5405c3777f20e2a5be00092 GIT binary patch literal 2349 zcmV+|3DWk7P)LaJ1?Qd=QZ36)An4LtM#l}(7^5Zet&h!aF?CpM1l@q%Z( z&DgWt?et;BgB_eS!A{GOj&w&ebMJS5|Lu1#tkVhw0-?Ki?YjHLXP$X66by#e>%8LY z{?V&x-s+;FjgRcy+1|c)Z~MX9Zab(4gE}4$(aFig4_%4Im{t=xr@6dk;h+_njOXIzGLyFnv=2B{*St zR!^nE(P)${_4Nb-0d!3himD4?x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TN6&??zet)5Yue`~nUb&*EmNoa{V30Rvg+T^B!CgpHDehT6#E>&3Zn|WvQp@ z2Dr2hyd^*d;L$X;H#A61RfVD`h)N*`oaZb^YdSs$H$;&09vnhQSAl*tvPsd7*5wiU^*Y_v3MMxVbD-lNAoSW5GgN5 znkH5@%gE#;T|GTSr>3rI7LqV?t&83WAV6O~yjl%E0tf&B*JVRE%;6(P5T=RDWSEG> zc=yB!E{~0^>Ry)2!YD8g$JY}O3x3f9cYO zXMuNfGoLR<^Ev?nsW?0zg*PLhPXUf?bL`kL`uqBDR=4s1ECQ$UF2Tx~=-=gC%=*6{ z)Zx{8;3*G?Cct+Uwen7#kMm$jNCJNbe*53lTN5DQsf5q>LrpDEz6zY1cgt_(yq^jD z1NbR0alIGO)&OY6;JI;lvwD^490xwio74Q^^T6qw`TA|Ob!iToYhZijvI6J;-Ug;~ z0)8L(RlaEdFROGjO#U3?5s, 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/mkinstalldirs b/mkinstalldirs new file mode 100755 index 0000000..d0fd194 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id$ + +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/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..0a8de58 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,7 @@ +INCLUDES = $(GTK_CFLAGS) $(GNOME_INCLUDEDIR) +LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) $(GTK_LIBS) +CPPFLAGS = -DGTETRINET_DATA=\"$(pkgdatadir)\" + +bin_PROGRAMS = gtetrinet + +gtetrinet_SOURCES = client.c client.h commands.c commands.h config.c config.h dialogs.c dialogs.h fields.c fields.h gtetrinet.c gtetrinet.h keys.c keys.h keytable.h misc.c misc.h partyline.c partyline.h sound.c sound.h tetrinet.c tetrinet.h tetris.c tetris.h winlist.c winlist.h diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..21d6b0d --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,338 @@ +# 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@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_CONFIG = @ESD_CONFIG@ +ESD_LIBS = @ESD_LIBS@ +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@ +MAKEINFO = @MAKEINFO@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +ZVT_LIBS = @ZVT_LIBS@ + +INCLUDES = $(GTK_CFLAGS) $(GNOME_INCLUDEDIR) +LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) $(GTK_LIBS) +CPPFLAGS = -DGTETRINET_DATA=\"$(pkgdatadir)\" + +bin_PROGRAMS = gtetrinet + +gtetrinet_SOURCES = client.c client.h commands.c commands.h config.c config.h dialogs.c dialogs.h fields.c fields.h gtetrinet.c gtetrinet.h keys.c keys.h keytable.h misc.c misc.h partyline.c partyline.h sound.c sound.h tetrinet.c tetrinet.h tetris.c tetris.h winlist.c winlist.h +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +gtetrinet_OBJECTS = client.o commands.o config.o dialogs.o fields.o \ +gtetrinet.o keys.o misc.o partyline.o sound.o tetrinet.o tetris.o \ +winlist.o +gtetrinet_LDADD = $(LDADD) +gtetrinet_DEPENDENCIES = +gtetrinet_LDFLAGS = +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 = tar +GZIP_ENV = --best +DEP_FILES = .deps/client.P .deps/commands.P .deps/config.P \ +.deps/dialogs.P .deps/fields.P .deps/gtetrinet.P .deps/keys.P \ +.deps/misc.P .deps/partyline.P .deps/sound.P .deps/tetrinet.P \ +.deps/tetris.P .deps/winlist.P +SOURCES = $(gtetrinet_SOURCES) +OBJECTS = $(gtetrinet_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .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: + +gtetrinet: $(gtetrinet_OBJECTS) $(gtetrinet_DEPENDENCIES) + @rm -f gtetrinet + $(LINK) $(gtetrinet_LDFLAGS) $(gtetrinet_OBJECTS) $(gtetrinet_LDADD) $(LIBS) + +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 $$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 +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/src/client.c b/src/client.c new file mode 100644 index 0000000..f6be555 --- /dev/null +++ b/src/client.c @@ -0,0 +1,434 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "client.h" +#include "tetrinet.h" +#include "partyline.h" +#include "dialogs.h" +#include "misc.h" + +#define PORT 31457 +#define SPECPORT 31458 + +int fdin[2], fdout[2]; /* two pipes, in and out */ + +int inputcbid; + +int connected; +char server[128]; +int clientpid; + +static int sock, connecterror; + +/* structures and arrays for message translation */ + +struct inmsgt { + enum inmsg_type num; + char *str; +}; + +struct outmsgt { + enum outmsg_type num; + char *str; +}; + +struct inmsgt inmsgtable[] = { + {IN_CONNECT, "connect"}, + {IN_DISCONNECT, "disconnect"}, + + {IN_CONNECTERROR, "noconnecting"}, + {IN_PLAYERNUM, "playernum"}, + {IN_PLAYERJOIN, "playerjoin"}, + {IN_PLAYERLEAVE, "playerleave"}, + {IN_KICK, "kick"}, + {IN_TEAM, "team"}, + {IN_PLINE, "pline"}, + {IN_PLINEACT, "plineact"}, + {IN_PLAYERLOST, "playerlost"}, + {IN_PLAYERWON, "playerwon"}, + {IN_NEWGAME, "newgame"}, + {IN_INGAME, "ingame"}, + {IN_PAUSE, "pause"}, + {IN_ENDGAME, "endgame"}, + {IN_F, "f"}, + {IN_SB, "sb"}, + {IN_LVL, "lvl"}, + {IN_GMSG, "gmsg"}, + {IN_WINLIST, "winlist"}, + + {IN_SPECJOIN, "specjoin"}, + {IN_SPECLEAVE, "specleave"}, + {IN_SPECLIST, "speclist"}, + {IN_SMSG, "smsg"}, + {IN_SACT, "sact"}, + {0, 0} +}; + +struct outmsgt outmsgtable[] = { + {OUT_DISCONNECT, "disconnect"}, + {OUT_CONNECTED, "connected"}, + + {OUT_TEAM, "team"}, + {OUT_PLINE, "pline"}, + {OUT_PLINEACT, "plineact"}, + {OUT_PLAYERLOST, "playerlost"}, + {OUT_F, "f"}, + {OUT_SB, "sb"}, + {OUT_LVL, "lvl"}, + {OUT_STARTGAME, "startgame"}, + {OUT_PAUSE, "pause"}, + {OUT_GMSG, "gmsg"}, + + {OUT_VERSION, "version"}, + {0, 0} +}; + +static void client_inputfunc (gpointer data, gint source, + GdkInputCondition condition); + +/* functions which set up the connection */ +static void client_process (void); +static void client_cleanpipe (void); +static int client_mainloop (void); +static int client_connect (void); +static void client_connected (void); +static int client_disconnect (void); + +/* some other useful functions */ +static int client_sendmsg (char *str); +static int client_readmsg (char *str, int len); +static void server_ip (unsigned char buf[4]); + +enum inmsg_type inmsg_translate (char *str); +char *outmsg_translate (enum outmsg_type); + +void client_initpipes (void) +{ + pipe (fdin); + pipe (fdout); + + inputcbid = gdk_input_add (fdin[0], GDK_INPUT_READ, + (GdkInputFunction)client_inputfunc, NULL); +} + +void client_destroypipes (void) +{ +} + +void client_init (char *s, char *n) +{ + int i; + strcpy (server, s); + strcpy (nick, n); + + /* wipe spaces off the nick */ + for (i = 0; nick[i]; i ++) + if (isspace (nick[i])) nick[i] = 0; + + if (clientpid) { + if (connected) client_destroy (); + else client_connectcancel (); + } + + connectingdialog_new (); + + if ((clientpid = fork()) == 0) { + client_process (); + _exit (0); + } +} + +void client_connectcancel (void) +{ + /* just kill the process */ + if (clientpid) kill (clientpid, SIGTERM); + clientpid = 0; +} + +void client_destroy (void) +{ + /* tell it to disconnect, then wait for it to die */ + client_outmessage (OUT_DISCONNECT, NULL); + waitpid (clientpid, NULL, 0); + clientpid = 0; +} + +/* a function that reads stuff from the pipe */ +static void client_inputfunc (gpointer data, gint source, + GdkInputCondition condition) +{ + char buf[1024]; + char *token; + enum inmsg_type msgtype; + + fdreadline (fdin[0], buf); + + /* split the message */ + token = strtok (buf, " "); + if (token == NULL) return; + msgtype = inmsg_translate (token); + token = strtok (NULL, ""); + + /* process it */ + tetrinet_inmessage (msgtype, token); +} + +void client_outmessage (enum outmsg_type msgtype, char *str) +{ + char buf[1024]; + strcpy (buf, outmsg_translate (msgtype)); + if (str) { + strcat (buf, " "); + strcat (buf, str); + } + write (fdout[1], buf, strlen(buf)); + write (fdout[1], "\n", 1); +} + +void client_inmessage (char *str) +{ + write (fdin[1], str, strlen(str)); + write (fdin[1], "\n", 1); +} + +/* these functions set up the connection */ + +void client_process (void) +{ + errno = 0; + if (client_connect () == -1) { + char errmsg[1024]; + + strcpy (errmsg, "noconnecting "); + + if (errno) strcat (errmsg, strerror (errno)); + else if (h_errno) strcat (errmsg, "Unknown host"); + + client_inmessage (errmsg); + + return; + } + connecterror = 0; + client_cleanpipe (); + client_mainloop (); + client_disconnect (); + return; +} + +void client_cleanpipe () +{ + fd_set rfds; + struct timeval tv; + char buf[1024]; + + while (1) { + FD_ZERO (&rfds); + FD_SET (fdout[0], &rfds); + tv.tv_sec = 0; tv.tv_usec = 0; + if (select (fdout[0]+1, &rfds, NULL, NULL, &tv)) fdreadline (fdout[0], buf); + else return; + } +} + +int client_mainloop (void) +{ + fd_set rfds; + struct timeval tv; + int m; + + /* read in stuff from the socket and the pipe */ + while (1) { + FD_ZERO (&rfds); + FD_SET (sock, &rfds); + FD_SET (fdout[0], &rfds); + m = sock > fdout[0] ? sock : fdout[0]; + tv.tv_sec = 0; + tv.tv_usec = 50000; /* wait a little while */ + if (select (m+1, &rfds, NULL, NULL, &tv)) + { + char buf[1024]; /* a big buffer */ + + /* we have something to read */ + + /* is it the socket?? */ + FD_ZERO (&rfds); FD_SET (sock, &rfds); + tv.tv_sec = 0; tv.tv_usec = 0; + if (select (sock+1, &rfds, NULL, NULL, &tv)) { + if (client_readmsg (buf, sizeof(buf)) < 0) + return -1; + client_inmessage (buf); /* send to parent process */ + if (strncmp ("noconnecting", buf, 12) == 0) { + connecterror = 1; + goto clientend; + } + } + + /* or it the pipe?? */ + FD_ZERO (&rfds); FD_SET (fdout[0], &rfds); + tv.tv_sec = 0; tv.tv_usec = 0; + if (select (fdout[0]+1, &rfds, NULL, NULL, &tv)) { + fdreadline (fdout[0], buf); + if (strcmp (buf, outmsg_translate(OUT_DISCONNECT)) == 0) + goto clientend; + else if (strcmp (buf, outmsg_translate(OUT_CONNECTED)) == 0) + client_connected (); + else + client_sendmsg (buf); + } + } + } +clientend: + return 0; +} + +int client_connect (void) +{ + struct hostent *h; + struct sockaddr_in sa; + + /* set up the connection */ + + h = gethostbyname (server); + if (h == 0) return -1; + memset (&sa, 0, sizeof (sa)); + memcpy (&sa.sin_addr, h->h_addr, h->h_length); + sa.sin_family = h->h_addrtype; + sa.sin_port = htons (spectating?SPECPORT:PORT); + + sock = socket (sa.sin_family, SOCK_STREAM, 0); + if (sock < 0) return -1; + + if (connect (sock, (struct sockaddr *)&sa, sizeof(sa)) < 0) + return -1; + + /* say hello to the server */ + { + char buf[200], buf2[200]; + unsigned char ip[4]; + unsigned char iphashbuf[6]; + int i, l, len; + /* construct message */ + sprintf (buf, "tetrisstart %s 1.13", nick); + /* do that encoding thingy */ + server_ip (ip); + sprintf (iphashbuf, "%d", ip[0]*54 + ip[1]*41 + ip[2]*29 + ip[3]*17); + l = strlen (iphashbuf); + buf2[0] = 0; + for (i = 0; buf[i]; i ++) + buf2[i+1] = (((buf2[i]&0xFF)+(buf[i]&0xFF))%255) ^ iphashbuf[i%l]; + len = i + 1; + for (i = 0; i < len; i ++) + sprintf (buf+i*2, "%02X", buf2[i] & 0xFF); + /* now send to server */ + client_sendmsg (buf); + } + return 0; +} + +void client_connected (void) +{ + connected = 1; + client_inmessage ("connect"); +} + +int client_disconnect (void) +{ + shutdown (sock, 2); + close (sock); + + if (!connecterror || connected) client_inmessage ("disconnect"); + + return 0; +} + + +/* some other useful functions */ + +int client_sendmsg (char *str) +{ + char c = 0xFF; + +#ifdef DEBUG + printf ("> %s\n", str); +#endif + + if (write (sock, str, strlen (str))==-1) return -1; + if (write (sock, &c, 1)==-1) return -1; + + return 0; +} + +int client_readmsg (char *str, int len) +{ + int i = 0; + /* read it in one char at a time */ + for (;i < len-1; i++) { + if (read (sock, &str[i], 1) != 1) + /* we have an error */ + return -1; + if (str[i]==(char)0xFF) break; + } + str[i] = 0; + +#ifdef DEBUG + printf ("< %s\n", str); +#endif + + return i; +} + +void server_ip (unsigned char buf[4]) +{ + struct sockaddr_in sin; + int len = sizeof(sin); + + getpeername (sock, (struct sockaddr *)&sin, &len); + memcpy (buf, &sin.sin_addr, 4); +} + +enum inmsg_type inmsg_translate (char *str) +{ + int i; + for (i = 0; inmsgtable[i].str; i++) { + if (strcmp (inmsgtable[i].str, str) == 0) + return inmsgtable[i].num; + } + return 0; +} + +char *outmsg_translate (enum outmsg_type num) +{ + int i; + for (i = 0; outmsgtable[i].num; i++) { + if (outmsgtable[i].num==num) return outmsgtable[i].str; + } + return NULL; +} diff --git a/src/client.h b/src/client.h new file mode 100644 index 0000000..1dd8915 --- /dev/null +++ b/src/client.h @@ -0,0 +1,44 @@ +extern int fdin[2], fdout[2]; /* two pipes, in and out */ + +extern int connected; +extern char server[128]; + +/* inmsgs are messages coming from the server */ + +enum inmsg_type { + IN_UNUSED, + IN_CONNECT, IN_DISCONNECT, IN_CONNECTERROR, + IN_PLAYERNUM, IN_PLAYERJOIN, IN_PLAYERLEAVE, IN_KICK, + IN_TEAM, + IN_PLINE, IN_PLINEACT, + IN_PLAYERLOST, IN_PLAYERWON, + IN_NEWGAME, IN_INGAME, IN_PAUSE, IN_ENDGAME, + IN_F, IN_SB, IN_LVL, IN_GMSG, + IN_WINLIST, + IN_SPECJOIN, IN_SPECLEAVE, IN_SPECLIST, IN_SMSG, IN_SACT +}; + +/* outmsgs are messages going out to the server */ + +enum outmsg_type { + OUT_UNUSED, OUT_DISCONNECT, OUT_CONNECTED, + OUT_TEAM, + OUT_PLINE, OUT_PLINEACT, + OUT_PLAYERLOST, + OUT_F, OUT_SB, OUT_LVL, OUT_GMSG, + OUT_STARTGAME, OUT_PAUSE, + OUT_VERSION +}; + +/* initalisation functions */ +extern void client_initpipes (void); +extern void client_destroypipes (void); + +/* functions for connecting and disconnecting */ +extern void client_init (char *server, char *nick); +extern void client_connectcancel (void); +extern void client_destroy (void); + +/* for sending stuff back and forth */ +extern void client_outmessage (enum outmsg_type msgtype, char *str); +extern void client_inmessage (char *str); diff --git a/src/commands.c b/src/commands.c new file mode 100644 index 0000000..7f735e4 --- /dev/null +++ b/src/commands.c @@ -0,0 +1,211 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include + +#include "gtetrinet.h" +#include "client.h" +#include "tetrinet.h" +#include "partyline.h" +#include "misc.h" +#include "commands.h" +#include "dialogs.h" + +GnomeUIInfo gamemenu[] = { + GNOMEUIINFO_ITEM(N_("_Connect to Server..."), NULL, connect_command, NULL), + GNOMEUIINFO_ITEM(N_("_Disconnect from Server"), NULL, disconnect_command, NULL), + GNOMEUIINFO_SEPARATOR, + GNOMEUIINFO_ITEM(N_("Change _Team..."), NULL, team_command, NULL), + GNOMEUIINFO_SEPARATOR, + GNOMEUIINFO_ITEM(N_("_Start game"), NULL, start_command, NULL), + GNOMEUIINFO_ITEM(N_("_Pause game"), NULL, pause_command, NULL), + GNOMEUIINFO_ITEM(N_("_End game"), NULL, end_command, NULL), + GNOMEUIINFO_SEPARATOR, + GNOMEUIINFO_MENU_EXIT_ITEM(destroymain, NULL), + GNOMEUIINFO_END +}; + +GnomeUIInfo settingsmenu[] = { + GNOMEUIINFO_MENU_PREFERENCES_ITEM(preferences_command, NULL), + GNOMEUIINFO_END +}; + +GnomeUIInfo helpmenu[] = { + GNOMEUIINFO_MENU_ABOUT_ITEM(about_command, NULL), + GNOMEUIINFO_END +}; + +GnomeUIInfo menubar[] = { + GNOMEUIINFO_MENU_GAME_TREE(gamemenu), + GNOMEUIINFO_MENU_SETTINGS_TREE(settingsmenu), + GNOMEUIINFO_MENU_HELP_TREE(helpmenu), + GNOMEUIINFO_END +}; + +GnomeUIInfo toolbar[] = { + GNOMEUIINFO_ITEM(N_("Connect"), NULL, connect_command, NULL), + GNOMEUIINFO_ITEM(N_("Disconnect"), NULL, disconnect_command, NULL), + GNOMEUIINFO_SEPARATOR, + GNOMEUIINFO_ITEM(N_("Start game"), NULL, start_command, NULL), + GNOMEUIINFO_ITEM(N_("Pause game"), NULL, pause_command, NULL), + GNOMEUIINFO_ITEM(N_("End game"), NULL, end_command, NULL), + GNOMEUIINFO_SEPARATOR, + GNOMEUIINFO_ITEM(N_("Change team"), NULL, team_command, NULL), + GNOMEUIINFO_END +}; + +void make_menus (GnomeApp *app) +{ + gnome_app_create_menus (app, menubar); + gnome_app_create_toolbar (app, toolbar); +} + +/* callbacks */ + +void connect_command (GtkWidget *widget, gpointer data) +{ + connectdialog_new (); +} + +void disconnect_command (GtkWidget *widget, gpointer data) +{ + client_destroy (); +} + +void team_command (GtkWidget *widget, gpointer data) +{ + teamdialog_new (); +} + +void start_command (GtkWidget *widget, gpointer data) +{ + char buf[16]; + sprintf (buf, "%i %i", 1, playernum); + client_outmessage (OUT_STARTGAME, buf); +} + +void end_command (GtkWidget *widget, gpointer data) +{ + char buf[16]; + sprintf (buf, "%i %i", 0, playernum); + client_outmessage (OUT_STARTGAME, buf); +} + +void pause_command (GtkWidget *widget, gpointer data) +{ + char buf[16]; + sprintf (buf, "%i %i", paused?0:1, playernum); + client_outmessage (OUT_PAUSE, buf); +} + +void preferences_command (GtkWidget *widget, gpointer data) +{ + prefdialog_new (); +} + + +/* the following function enable/disable things */ + +void commands_checkstate () +{ + if (connected) { + gtk_widget_set_sensitive (gamemenu[0].widget, FALSE); + gtk_widget_set_sensitive (gamemenu[1].widget, TRUE); + + gtk_widget_set_sensitive (toolbar[0].widget, FALSE); + gtk_widget_set_sensitive (toolbar[1].widget, TRUE); + } + else { + gtk_widget_set_sensitive (gamemenu[0].widget, TRUE); + gtk_widget_set_sensitive (gamemenu[1].widget, FALSE); + + gtk_widget_set_sensitive (toolbar[0].widget, TRUE); + gtk_widget_set_sensitive (toolbar[1].widget, FALSE); + } + if (moderator) { + if (ingame) { + gtk_widget_set_sensitive (gamemenu[5].widget, FALSE); + gtk_widget_set_sensitive (gamemenu[6].widget, TRUE); + gtk_widget_set_sensitive (gamemenu[7].widget, TRUE); + + gtk_widget_set_sensitive (toolbar[3].widget, FALSE); + gtk_widget_set_sensitive (toolbar[4].widget, TRUE); + gtk_widget_set_sensitive (toolbar[5].widget, TRUE); + } + else { + gtk_widget_set_sensitive (gamemenu[5].widget, TRUE); + gtk_widget_set_sensitive (gamemenu[6].widget, FALSE); + gtk_widget_set_sensitive (gamemenu[7].widget, FALSE); + + gtk_widget_set_sensitive (toolbar[3].widget, TRUE); + gtk_widget_set_sensitive (toolbar[4].widget, FALSE); + gtk_widget_set_sensitive (toolbar[5].widget, FALSE); + } + } + else { + gtk_widget_set_sensitive (gamemenu[5].widget, FALSE); + gtk_widget_set_sensitive (gamemenu[6].widget, FALSE); + gtk_widget_set_sensitive (gamemenu[7].widget, FALSE); + + gtk_widget_set_sensitive (toolbar[3].widget, FALSE); + gtk_widget_set_sensitive (toolbar[4].widget, FALSE); + gtk_widget_set_sensitive (toolbar[5].widget, FALSE); + } + if (ingame || spectating) { + gtk_widget_set_sensitive (gamemenu[3].widget, FALSE); + + gtk_widget_set_sensitive (toolbar[7].widget, FALSE); + } + else { + gtk_widget_set_sensitive (gamemenu[3].widget, TRUE); + + gtk_widget_set_sensitive (toolbar[7].widget, TRUE); + } + + partyline_connectstatus (connected); + + if (ingame) partyline_status (_("Game in progress")); + else if (connected) { + char buf[256]; + strcpy (buf, _("Connected to\n")); + strcat (buf, server); + partyline_status (buf); + } + else partyline_status (_("Not connected")); +} + + +/* about... */ + +void about_command (GtkWidget *widget, gpointer data) +{ + GtkWidget *about; + + const char *authors[] = {"Ka-shu Wong (kswong@zip.com.au)", NULL}; + + about = gnome_about_new (APPNAME, APPVERSION, + "(C) 1999, 2000 Ka-shu Wong", + authors, + _("A Tetrinet client for GNOME\n" + "Homepage:\thttp://gtetrinet.sourceforge.net/\n"), + NULL); + gtk_widget_show (about); +} diff --git a/src/commands.h b/src/commands.h new file mode 100644 index 0000000..0ca21e8 --- /dev/null +++ b/src/commands.h @@ -0,0 +1,15 @@ +extern GnomeUIInfo menubar[]; +extern GnomeUIInfo toolbar[]; + +void make_menus (GnomeApp *app); + +void connect_command (GtkWidget *widget, gpointer data); +void disconnect_command (GtkWidget *widget, gpointer data); +void team_command (GtkWidget *widget, gpointer data); +void start_command (GtkWidget *widget, gpointer data); +void end_command (GtkWidget *widget, gpointer data); +void pause_command (GtkWidget *widget, gpointer data); +void preferences_command (GtkWidget *widget, gpointer data); +void about_command (GtkWidget *widget, gpointer data); + +void commands_checkstate (void); diff --git a/src/config.c b/src/config.c new file mode 100644 index 0000000..cdb8720 --- /dev/null +++ b/src/config.c @@ -0,0 +1,227 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include +#include + +#include "config.h" +#include "gtetrinet.h" +#include "client.h" +#include "tetrinet.h" +#include "sound.h" + +char blocksfile[1024]; +int bsize; + +char currenttheme[1024]; + +static char *soundkeys[S_NUM] = { + "Sounds/Drop", + "Sounds/Solidify", + "Sounds/LineClear", + "Sounds/Tetris", + "Sounds/Rotate", + "Sounds/SpecialLine", + "Sounds/YouWin", + "Sounds/YouLose", + "Sounds/Message", + "Sounds/GameStart", +}; + +gint defaultkeys[K_NUM] = { + GDK_Right, + GDK_Left, + GDK_Up, + GDK_Control_R, + GDK_Down, + GDK_space, + GDK_t +}; + +gint keys[K_NUM]; + +/* themedir is assumed to have a trailing slash */ +void config_loadtheme (char *themedir) +{ + char buf[1024], *p; + int i; + + strcpy (buf, "="); + strcat (buf, themedir); + strcat (buf, "theme.cfg=/"); + + gnome_config_push_prefix (buf); + + p = gnome_config_get_string ("Theme/Name"); + if (p == 0) { + GtkWidget *mb; + mb = gnome_message_box_new (_("Warning: theme does not have a name"), + GNOME_MESSAGE_BOX_WARNING, GNOME_STOCK_BUTTON_OK, NULL); + gnome_dialog_run (GNOME_DIALOG(mb)); + } + else g_free (p); + + p = gnome_config_get_string ("Graphics/Blocks=blocks.png"); + strcpy (blocksfile, themedir); + strncat (blocksfile, p, 256); + g_free (p); + bsize = gnome_config_get_int ("Graphics/BlockSize=16"); + + p = gnome_config_get_string ("Sounds/MidiFile"); + if (p) { + strcpy (midifile, themedir); + strncat (midifile, p, 256); + g_free (p); + } + else + midifile[0] = 0; + + for (i = 0; i < S_NUM; i ++) { + p = gnome_config_get_string (soundkeys[i]); + if (p) { + strcpy (soundfiles[i], themedir); + strncat (soundfiles[i], p, 256); + g_free (p); + } + else + soundfiles[i][0] = 0; + } + + sound_cache (); + + gnome_config_pop_prefix (); +} + +int config_getthemeinfo (char *themedir, char *name, char *author, char *desc) +{ + char buf[1024], *p; + + strcpy (buf, "="); + strcat (buf, themedir); + strcat (buf, "theme.cfg=/"); + + gnome_config_push_prefix (buf); + + p = gnome_config_get_string ("Theme/Name"); + if (p == 0) { + gnome_config_pop_prefix (); + return -1; + } + else { + if (name) strcpy (name, p); + g_free (p); + } + if (author) { + p = gnome_config_get_string ("Theme/Author="); + strcpy (author, p); + g_free (p); + } + if (desc) { + p = gnome_config_get_string ("Theme/Description="); + strcpy (desc, p); + g_free (p); + } + + gnome_config_pop_prefix (); + + return 0; +} + +void config_loadconfig (void) +{ + char *p; + int k, l; + + gnome_config_push_prefix ("/"APPID"/"); + + p = gnome_config_get_string ("Themes/ThemeDir="DEFAULTTHEME); + strncpy (currenttheme, p, 1024); + g_free (p); + /* add trailing slash if none exists */ + l = strlen(currenttheme); + if (currenttheme[l-1] != '/') { + currenttheme[l] = '/'; + currenttheme[l+1] = 0; + } + + p = gnome_config_get_string ("Sound/MidiPlayer="DEFAULTMIDICMD); + strncpy (midicmd, p, 1024); + g_free (p); + + soundenable = gnome_config_get_int ("Sound/EnableSound=1"); + midienable = gnome_config_get_int ("Sound/EnableMidi=1"); + + p = gnome_config_get_string ("Player/Nickname"); + if (p) { + strncpy (nick, p, 128); + g_free(p); + } + + p = gnome_config_get_string ("Player/Team"); + if (p) { + strncpy (team, p, 128); + g_free(p); + } + + k = gnome_config_get_int ("Keys/Right"); + keys[K_RIGHT] = k ? k : defaultkeys[K_RIGHT]; + k = gnome_config_get_int ("Keys/Left"); + keys[K_LEFT] = k ? k : defaultkeys[K_LEFT]; + k = gnome_config_get_int ("Keys/RotateRight"); + keys[K_ROTRIGHT] = k ? k : defaultkeys[K_ROTRIGHT]; + k = gnome_config_get_int ("Keys/RotateLeft"); + keys[K_ROTLEFT] = k ? k : defaultkeys[K_ROTLEFT]; + k = gnome_config_get_int ("Keys/Down"); + keys[K_DOWN] = k ? k : defaultkeys[K_DOWN]; + k = gnome_config_get_int ("Keys/Drop"); + keys[K_DROP] = k ? k : defaultkeys[K_DROP]; + k = gnome_config_get_int ("Keys/Message"); + keys[K_GAMEMSG] = k ? k : defaultkeys[K_GAMEMSG]; + + gnome_config_pop_prefix (); + + config_loadtheme (currenttheme); +} + +void config_saveconfig (void) +{ + gnome_config_push_prefix ("/"APPID"/"); + + gnome_config_set_string ("Themes/ThemeDir", currenttheme); + + gnome_config_set_string ("Sound/MidiPlayer", midicmd); + gnome_config_set_int ("Sound/EnableSound", soundenable); + gnome_config_set_int ("Sound/EnableMidi", midienable); + + gnome_config_set_string ("Player/Nickname", nick); + gnome_config_set_string ("Player/Team", team); + + gnome_config_set_int ("Keys/Right", keys[K_RIGHT]); + gnome_config_set_int ("Keys/Left", keys[K_LEFT]); + gnome_config_set_int ("Keys/RotateRight", keys[K_ROTRIGHT]); + gnome_config_set_int ("Keys/RotateLeft", keys[K_ROTLEFT]); + gnome_config_set_int ("Keys/Down", keys[K_DOWN]); + gnome_config_set_int ("Keys/Drop", keys[K_DROP]); + gnome_config_set_int ("Keys/Message", keys[K_GAMEMSG]); + + gnome_config_pop_prefix (); + gnome_config_sync (); +} diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..5ae0c9f --- /dev/null +++ b/src/config.h @@ -0,0 +1,23 @@ +extern char blocksfile[1024]; +extern int bsize; +extern char currenttheme[1024]; +extern gint keys[]; +extern gint defaultkeys[]; + +extern void config_loadtheme (char *themedir); +extern int config_getthemeinfo (char *themedir, char *name, char *author, char *desc); +extern void config_loadconfig (void); +extern void config_saveconfig (void); + +#define GTETRINET_THEMES GTETRINET_DATA"/themes" +#define DEFAULTTHEME GTETRINET_THEMES"/default/" + +#define K_RIGHT 0 +#define K_LEFT 1 +#define K_ROTRIGHT 2 +#define K_ROTLEFT 3 +#define K_DOWN 4 +#define K_DROP 5 +#define K_GAMEMSG 6 +/* not a key but the number of configurable keys */ +#define K_NUM 7 diff --git a/src/dialogs.c b/src/dialogs.c new file mode 100644 index 0000000..a22db13 --- /dev/null +++ b/src/dialogs.c @@ -0,0 +1,863 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include + +#include "gtetrinet.h" +#include "config.h" +#include "client.h" +#include "tetrinet.h" +#include "tetris.h" +#include "fields.h" +#include "misc.h" +#include "keys.h" +#include "sound.h" + +/*****************************************************/ +/* connecting dialog - a dialog with a cancel button */ +/*****************************************************/ +static GtkWidget *connectingdialog = 0; +static GtkWidget *progressbar; +static gint timeouttag = 0; + +void connectingdialog_button (GnomeDialog *dialog, gint button, gpointer data) +{ + switch (button) { + case 0: + gtk_timeout_remove (timeouttag); + timeouttag = 0; + if (connectingdialog == 0) return; + client_connectcancel (); + gtk_widget_destroy (connectingdialog); + connectingdialog = 0; + break; + } +} + +gint connectingdialog_delete (GtkWidget *widget, gpointer data) +{ + return TRUE; /* dont kill me */ +} + +gint connectingdialog_timeout (gpointer data) +{ + GtkAdjustment *adj; + adj = GTK_PROGRESS(progressbar)->adjustment; + gtk_progress_set_value (GTK_PROGRESS(progressbar), + (adj->value+1)>adj->upper ? + adj->lower : adj->value+1); + return TRUE; +} + +void connectingdialog_new (void) +{ + if (connectingdialog) return; + connectingdialog = gnome_dialog_new (_("Connect to Server"), + GNOME_STOCK_BUTTON_CANCEL, + NULL); + progressbar = gtk_progress_bar_new (); + gtk_progress_set_activity_mode (GTK_PROGRESS(progressbar), + TRUE); + gtk_widget_show (progressbar); + gtk_box_pack_start (GTK_BOX(GNOME_DIALOG(connectingdialog)->vbox), + progressbar, TRUE, TRUE, 0); + + timeouttag = gtk_timeout_add (20, (GtkFunction)connectingdialog_timeout, + NULL); + gtk_signal_connect (GTK_OBJECT(connectingdialog), "clicked", + GTK_SIGNAL_FUNC(connectingdialog_button), NULL); + gtk_signal_connect (GTK_OBJECT(connectingdialog), "delete_event", + GTK_SIGNAL_FUNC(connectingdialog_delete), NULL); + gtk_widget_show (connectingdialog); +} + +void connectingdialog_destroy (void) +{ + gtk_timeout_remove (timeouttag); + timeouttag = 0; + if (connectingdialog == 0) return; + gtk_widget_destroy (connectingdialog); + connectingdialog = 0; +} + +/*******************/ +/* the team dialog */ +/*******************/ +void teamdialog_button (GnomeDialog *dialog, gint button, gpointer data) +{ + GtkWidget *entry = GTK_WIDGET(data); + switch (button) { + case 0: + tetrinet_changeteam (gtk_entry_get_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(entry))))); + gtk_widget_destroy (GTK_WIDGET(dialog)); + break; + case 1: + gtk_widget_destroy (GTK_WIDGET(dialog)); + break; + } +} + +void teamdialog_new (void) +{ + GtkWidget *dialog, *table, *widget, *entry; + dialog = gnome_dialog_new (_("Change team"), + GNOME_STOCK_BUTTON_OK, + GNOME_STOCK_BUTTON_CANCEL, + NULL); + gnome_dialog_set_default (GNOME_DIALOG(dialog), 0); + table = gtk_table_new (1, 2, FALSE); + gtk_table_set_col_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + widget = gtk_label_new (_("Team name:")); + gtk_widget_show (widget); + gtk_table_attach_defaults (GTK_TABLE(table), widget, 0, 1, 0, 1); + entry = gnome_entry_new ("Team"); + gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(entry))), + team); + gtk_widget_show (entry); + gtk_table_attach_defaults (GTK_TABLE(table), entry, 1, 2, 0, 1); + gtk_widget_show (table); + gtk_box_pack_start (GTK_BOX(GNOME_DIALOG(dialog)->vbox), + table, TRUE, TRUE, 0); + /* pass the entry in the data pointer */ + gtk_signal_connect (GTK_OBJECT(dialog), "clicked", + GTK_SIGNAL_FUNC(teamdialog_button), (gpointer)entry); + gtk_widget_show (dialog); +} + +/**********************/ +/* the connect dialog */ +/**********************/ +static int connecting; +static GtkWidget *serveraddressentry, *nicknameentry, *teamnameentry, *spectatorcheck, *passwordentry; +static GtkWidget *connectdialog, *passwordlabel, *teamnamelabel; + +void connectdialog_button (GnomeDialog *dialog, gint button, gpointer data) +{ + switch (button) { + case 0: + /* connect now */ + spectating = GTK_TOGGLE_BUTTON(spectatorcheck)->active ? TRUE : FALSE; + strcpy (specpassword, gtk_entry_get_text (GTK_ENTRY(passwordentry))); + strcpy (team, gtk_entry_get_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(teamnameentry))))); + client_init (gtk_entry_get_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(serveraddressentry)))), + gtk_entry_get_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(nicknameentry))))); + break; + case 1: + gtk_widget_destroy (connectdialog); + break; + } +} + +void connectdialog_spectoggle (GtkWidget *widget, gpointer data) +{ + if (GTK_TOGGLE_BUTTON(widget)->active) { + gtk_widget_set_sensitive (passwordentry, TRUE); + gtk_widget_set_sensitive (passwordlabel, TRUE); + gtk_widget_set_sensitive (teamnameentry, FALSE); + gtk_widget_set_sensitive (teamnamelabel, FALSE); + } + else { + gtk_widget_set_sensitive (passwordentry, FALSE); + gtk_widget_set_sensitive (passwordlabel, FALSE); + gtk_widget_set_sensitive (teamnameentry, TRUE); + gtk_widget_set_sensitive (teamnamelabel, TRUE); + } +} + +void connectdialog_cancel (GtkWidget *widget, gpointer data) +{ + gtk_widget_destroy (connectdialog); +} + +void connectdialog_connected (void) +{ + gtk_widget_destroy (connectdialog); +} + +void connectdialog_destroy (GtkWidget *widget, gpointer data) +{ + connecting = FALSE; +} + +void connectdialog_new (void) +{ + GtkWidget *widget, *table1, *table2, *frame; + /* check if dialog is already displayed */ + if (connecting) return; + connecting = TRUE; + /* make dialog that asks for address/nickname */ + connectdialog = gnome_dialog_new (_("Connect to Server"), + GNOME_STOCK_BUTTON_OK, + GNOME_STOCK_BUTTON_CANCEL, + NULL); + gnome_dialog_set_default (GNOME_DIALOG(connectdialog), 0); + gtk_signal_connect (GTK_OBJECT(connectdialog), "clicked", + GTK_SIGNAL_FUNC(connectdialog_button), NULL); + + /* main table */ + table1 = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE(table1), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table1), GNOME_PAD_SMALL); + + /* server address */ + table2 = gtk_table_new (1, 1, FALSE); + + serveraddressentry = gnome_entry_new ("Server"); + gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(serveraddressentry))), + server); + gtk_widget_show (serveraddressentry); + gtk_table_attach (GTK_TABLE(table2), serveraddressentry, + 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, + GTK_FILL | GTK_EXPAND, 0, 0); + + gtk_table_set_row_spacings (GTK_TABLE(table2), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table2), GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER(table2), GNOME_PAD); + gtk_widget_show (table2); + frame = gtk_frame_new (_("Server address")); + gtk_container_add (GTK_CONTAINER(frame), table2); + gtk_widget_show (frame); + gtk_table_attach (GTK_TABLE(table1), frame, 0, 2, 0, 1, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + + /* spectator checkbox + password */ + table2 = gtk_table_new (1, 1, FALSE); + + spectatorcheck = gtk_check_button_new_with_label (_("Connect as a spectator")); + gtk_widget_show (spectatorcheck); + gtk_table_attach (GTK_TABLE(table2), spectatorcheck, 0, 2, 0, 1, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + passwordlabel = gtk_label_new (_("Password:")); + gtk_widget_show (passwordlabel); + gtk_table_attach (GTK_TABLE(table2), passwordlabel, 0, 1, 1, 2, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + passwordentry = gtk_entry_new (); + gtk_entry_set_visibility (GTK_ENTRY(passwordentry), FALSE); + gtk_widget_show (passwordentry); + gtk_table_attach (GTK_TABLE(table2), passwordentry, 1, 2, 1, 2, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + + gtk_table_set_row_spacings (GTK_TABLE(table2), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table2), GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER(table2), GNOME_PAD); + gtk_widget_show (table2); + frame = gtk_frame_new (_("Spectate game")); + gtk_container_add (GTK_CONTAINER(frame), table2); + gtk_widget_show (frame); + gtk_table_attach (GTK_TABLE(table1), frame, 0, 1, 1, 2, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + + /* nickname and teamname entries */ + table2 = gtk_table_new (1, 1, FALSE); + + widget = gtk_label_new (_("Nick name:")); + gtk_widget_show (widget); + gtk_table_attach (GTK_TABLE(table2), widget, 0, 1, 0, 1, + GTK_FILL | GTK_EXPAND, 0, 0, 0); + nicknameentry = gnome_entry_new ("Nickname"); + gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(nicknameentry))), + nick); + gtk_widget_show (nicknameentry); + gtk_table_attach (GTK_TABLE(table2), nicknameentry, 1, 2, 0, 1, + GTK_FILL | GTK_EXPAND, 0, 0, 0); + teamnamelabel = gtk_label_new (_("Team name:")); + gtk_widget_show (teamnamelabel); + gtk_table_attach (GTK_TABLE(table2), teamnamelabel, 0, 1, 1, 2, + GTK_FILL | GTK_EXPAND, 0, 0, 0); + teamnameentry = gnome_entry_new ("Teamname"); + gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(teamnameentry))), + team); + gtk_widget_show (teamnameentry); + gtk_table_attach (GTK_TABLE(table2), teamnameentry, 1, 2, 1, 2, + GTK_FILL | GTK_EXPAND, 0, 0, 0); + + gtk_table_set_row_spacings (GTK_TABLE(table2), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table2), GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER(table2), GNOME_PAD); + gtk_widget_show (table2); + frame = gtk_frame_new (_("Player information")); + gtk_container_add (GTK_CONTAINER(frame), table2); + gtk_widget_show (frame); + gtk_table_attach (GTK_TABLE(table1), frame, 1, 2, 1, 2, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + + + gtk_widget_show (table1); + + gtk_box_pack_start (GTK_BOX(GNOME_DIALOG(connectdialog)->vbox), + table1, TRUE, TRUE, 0); + + gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(spectatorcheck), spectating); + connectdialog_spectoggle (spectatorcheck, NULL); + gtk_signal_connect (GTK_OBJECT(connectdialog), "destroy", + GTK_SIGNAL_FUNC(connectdialog_destroy), NULL); + gtk_signal_connect (GTK_OBJECT(spectatorcheck), "toggled", + GTK_SIGNAL_FUNC(connectdialog_spectoggle), NULL); + gtk_widget_show (connectdialog); +} + +/*************************/ +/* the change key dialog */ +/*************************/ +gint keydialog_key; + +void key_dialog_callback (GtkWidget *widget, GdkEventKey *key) +{ + keydialog_key = key->keyval; + gnome_dialog_close (GNOME_DIALOG(widget)); +} + +gint key_dialog (char *msg) +{ + GtkWidget *dialog, *label; + + dialog = gnome_dialog_new (_("Change Key"), GNOME_STOCK_BUTTON_CANCEL, NULL); + label = gtk_label_new (msg); + gtk_widget_show (label); + gtk_box_pack_start (GTK_BOX(GNOME_DIALOG(dialog)->vbox), + label, TRUE, TRUE, GNOME_PAD_SMALL); + gnome_dialog_set_close (GNOME_DIALOG(dialog), TRUE); + gtk_signal_connect (GTK_OBJECT(dialog), "key_press_event", + GTK_SIGNAL_FUNC(key_dialog_callback), NULL); + gtk_widget_set_events (dialog, GDK_KEY_PRESS_MASK); + keydialog_key = 0; + gnome_dialog_run (GNOME_DIALOG(dialog)); + return keydialog_key; +} + +/**************************/ +/* the preferences dialog */ +/**************************/ +GtkWidget *prefdialog, *themelist, *keyclist; +GtkWidget *midientry, *miditable, *midicheck, *soundcheck; +GtkWidget *namelabel, *authlabel, *desclabel; + +int themechanged, midichanged; + +char *keytitles[] = { + N_("Action"), + N_("Key") +}; + +char *actions[K_NUM] = { + N_("Move right"), + N_("Move left"), + N_("Move down"), + N_("Rotate right"), + N_("Rotate left"), + N_("Drop piece"), + N_("Send Message") +}; + +int actionid[K_NUM] = { + K_RIGHT, + K_LEFT, + K_DOWN, + K_ROTRIGHT, + K_ROTLEFT, + K_DROP, + K_GAMEMSG +}; + +gint newkeys[K_NUM]; +int pk_row; + +struct themelistentry { + char dir[1024]; + char name[1024]; +} themes[64]; + +int themecount; +int theme_select; + +void prefdialog_check (GtkWidget *widget, gpointer data) +{ +} + +void prefdialog_drawkeys (void) +{ + char *array[2]; + int i; + + for (i = 0; i < K_NUM; i ++) { + array[0] = actions[i]; + array[1] = keystr (newkeys[actionid[i]]); + gtk_clist_append (GTK_CLIST(keyclist), array); + } +} + +void prefdialog_clistupdate (int row) +{ + gtk_clist_set_text (GTK_CLIST(keyclist), row, 1, + keystr (newkeys[actionid[row]])); +} + +void prefdialog_restorekeys (GtkWidget *widget, gpointer data) +{ + int i; + for (i = 0; i < K_NUM; i ++) newkeys[i] = defaultkeys[i]; + for (i = 0; i < K_NUM; i ++) prefdialog_clistupdate (i); + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); +} + +void prefdialog_clistselect (GtkWidget *widget, gint row, gint column, + GdkEventButton *event, gpointer data) +{ + pk_row = row; +} + +void prefdialog_clistunselect (GtkWidget *widget, gint row, gint column, + gpointer data) +{ + pk_row = -1; +} + +void prefdialog_changekey (GtkWidget *widget, gpointer data) +{ + char buf[256]; + gint k; + + if (pk_row == -1) return; + + sprintf (buf, _("Press new key for %s"), actions[pk_row]); + k = key_dialog (buf); + if (k) { + newkeys[actionid[pk_row]] = k; + prefdialog_clistupdate (pk_row); + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); + } +} + +void prefdialog_midion () +{ + gtk_widget_set_sensitive (miditable, TRUE); +} + +void prefdialog_midioff () +{ + gtk_widget_set_sensitive (miditable, FALSE); +} + +void prefdialog_soundon () +{ + gtk_widget_set_sensitive (midicheck, TRUE); + if (GTK_TOGGLE_BUTTON(midicheck)->active) { + prefdialog_midion (); + } +} + +void prefdialog_soundoff () +{ + gtk_widget_set_sensitive (midicheck, FALSE); + prefdialog_midioff (); +} + +void prefdialog_soundtoggle (GtkWidget *widget, gpointer data) +{ + if (GTK_TOGGLE_BUTTON(widget)->active) { + prefdialog_soundon (); + } + else { + prefdialog_soundoff (); + } + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); +} + +void prefdialog_miditoggle (GtkWidget *widget, gpointer data) +{ + if (GTK_TOGGLE_BUTTON(widget)->active) { + prefdialog_midion (); + } + else { + prefdialog_midioff (); + } + midichanged = TRUE; + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); +} + + +void prefdialog_midichanged (GtkWidget *widget, gpointer data) +{ + midichanged = TRUE; + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); +} + +void prefdialog_restoremidi (GtkWidget *widget, gpointer data) +{ + gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(midientry))), + DEFAULTMIDICMD); + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); +} + +void prefdialog_themelistselect (int n) +{ + char author[1024], desc[1024]; + + config_getthemeinfo (themes[n].dir, NULL, author, desc); + leftlabel_set (namelabel, themes[n].name); + leftlabel_set (authlabel, author); + leftlabel_set (desclabel, desc); +} + +void prefdialog_themeselect (GtkWidget *widget, gint row, gint column, + GdkEventButton *event, gpointer data) +{ + theme_select = row; + themechanged = TRUE; + prefdialog_themelistselect (row); + gnome_property_box_changed (GNOME_PROPERTY_BOX(prefdialog)); +} + +static int themelistcomp (const void *a1, const void *b1) +{ + const struct themelistentry *a = a1, *b = b1; + return strcmp (a->name, b->name); +} + +void prefdialog_themelist () +{ + DIR *d; + struct dirent *de; + char buf[1024], str[1024], dir[1024]; + int i; + char *basedir[2]; + + strcpy (dir, getenv ("HOME")); + strcat (dir, "/.gtetrinet/themes"); + + basedir[0] = GTETRINET_THEMES; + basedir[1] = dir; + + themecount = 0; + + for (i = 0; i < 2; i ++) { + d = opendir (basedir[i]); + if (d) { + while ((de = readdir(d))) { + strcpy (buf, basedir[i]); + strcat (buf, "/"); + strcat (buf, de->d_name); + strcat (buf, "/"); + + if (config_getthemeinfo(buf, str, NULL, NULL) == 0) { + strcpy (themes[themecount].dir, buf); + strcpy (themes[themecount].name, str); + themecount ++; + } + } + closedir (d); + } + } + qsort (themes, themecount, sizeof(struct themelistentry), themelistcomp); + + theme_select = 0; + gtk_clist_clear (GTK_CLIST(themelist)); + for (i = 0; i < themecount; i ++) { + char *text[2]; + text[0] = themes[i].name; + text[1] = 0; + gtk_clist_append (GTK_CLIST(themelist), text); + if (strcmp(themes[i].dir, currenttheme) == 0) + theme_select = i; + } + gtk_clist_select_row (GTK_CLIST(themelist), theme_select, 0); + prefdialog_themelistselect (theme_select); +} + +void prefdialog_apply (GnomePropertyBox *dialog, gint pagenum) +{ + int i; + char *midi; + + if (pagenum == -1) { + for (i = 0; i < K_NUM; i ++) { + keys[i] = newkeys[i]; + } + + soundenable = GTK_TOGGLE_BUTTON(soundcheck)->active ? 1 : 0; + midienable = GTK_TOGGLE_BUTTON(midicheck)->active ? 1 : 0; + if (!soundenable && midienable) { + midienable = 0; + midichanged = TRUE; + } + + if (themechanged) { + strcpy (currenttheme, themes[theme_select].dir); + config_loadtheme (currenttheme); + + fields_page_destroy_contents (); + fields_cleanup (); + fields_init (); + fields_page_new (); + if (ingame) tetrinet_redrawfields (); + } + + if (midichanged) { + midi = gtk_entry_get_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(midientry)))); + strcpy (midicmd, midi); + } + + if ((themechanged || midichanged) && ingame) { + sound_stopmidi (); + sound_playmidi (midifile); + } + + themechanged = midichanged = FALSE; + } +} + +void prefdialog_new (void) +{ + GtkWidget *label, *table, *frame, *button, *button1, *widget, *table1, *divider; + int i; + + prefdialog = gnome_property_box_new(); + + gtk_window_set_title(GTK_WINDOW(prefdialog), _("GTetrinet Preferences")); + + /* themes */ + themelist = gtk_clist_new (1); + gtk_clist_set_column_width (GTK_CLIST(themelist), 0, 160); + gtk_clist_set_selection_mode (GTK_CLIST(themelist), GTK_SELECTION_SINGLE); + gtk_widget_show (themelist); + + label = leftlabel_new (_("Select a theme from the list.\n" + "Install new themes in ~/.gtetrinet/themes/")); + gtk_widget_show (label); + + table1 = gtk_table_new (3, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER(table1), GNOME_PAD_SMALL); + gtk_table_set_row_spacings (GTK_TABLE(table1), 0); + gtk_table_set_col_spacings (GTK_TABLE(table1), GNOME_PAD_SMALL); + widget = leftlabel_new (_("Name:")); + gtk_widget_show (widget); + gtk_table_attach (GTK_TABLE(table1), widget, 0, 1, 0, 1, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + widget = leftlabel_new (_("Author:")); + gtk_widget_show (widget); + gtk_table_attach (GTK_TABLE(table1), widget, 0, 1, 1, 2, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + widget = leftlabel_new (_("Description:")); + gtk_widget_show (widget); + gtk_table_attach (GTK_TABLE(table1), widget, 0, 1, 2, 3, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + namelabel = leftlabel_new (""); + gtk_widget_show (namelabel); + gtk_table_attach (GTK_TABLE(table1), namelabel, 1, 2, 0, 1, + GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + authlabel = leftlabel_new (""); + gtk_widget_show (authlabel); + gtk_table_attach (GTK_TABLE(table1), authlabel, 1, 2, 1, 2, + GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + desclabel = leftlabel_new (""); + gtk_widget_show (desclabel); + gtk_table_attach (GTK_TABLE(table1), desclabel, 1, 2, 2, 3, + GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (table1); + + frame = gtk_frame_new (_("Selected Theme")); + gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN); + gtk_container_set_border_width (GTK_CONTAINER(frame), GNOME_PAD_SMALL); + gtk_widget_set_usize (frame, 240, 100); + gtk_widget_show (frame); + gtk_container_add (GTK_CONTAINER(frame), table1); + + table = gtk_table_new (2, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER(table), GNOME_PAD); + gtk_table_set_row_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + gtk_table_attach (GTK_TABLE(table), themelist, 0, 1, 0, 2, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE(table), label, 1, 2, 0, 1, + GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE(table), frame, 1, 2, 1, 2, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_show (table); + + frame = gtk_frame_new (NULL); + gtk_container_set_border_width (GTK_CONTAINER(frame), GNOME_PAD); + gtk_container_add (GTK_CONTAINER(frame), table); + gtk_widget_show (frame); + label = gtk_label_new (_("Themes")); + gtk_widget_show (label); + gnome_property_box_append_page (GNOME_PROPERTY_BOX(prefdialog), + frame, label); + + /* keyboard */ + keyclist = gtk_clist_new_with_titles (2, keytitles); + gtk_clist_set_column_width (GTK_CLIST(keyclist), 0, 100); + gtk_clist_set_column_width (GTK_CLIST(keyclist), 1, 80); + gtk_clist_set_selection_mode (GTK_CLIST(keyclist), GTK_SELECTION_SINGLE); + gtk_clist_column_titles_passive (GTK_CLIST(keyclist)); + gtk_signal_connect (GTK_OBJECT(keyclist), "select_row", + GTK_SIGNAL_FUNC (prefdialog_clistselect), NULL); + gtk_signal_connect (GTK_OBJECT(keyclist), "unselect_row", + GTK_SIGNAL_FUNC (prefdialog_clistunselect), NULL); + gtk_widget_show (keyclist); + + label = gtk_label_new (_("Select an action from the list and press Change " + "Key to change the key associated with the action.")); + gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_LEFT); + gtk_label_set_line_wrap (GTK_LABEL(label), TRUE); + gtk_widget_show (label); + + button = gtk_button_new_with_label (_("Change key...")); + gtk_signal_connect (GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC (prefdialog_changekey), NULL); + gtk_widget_show (button); + + button1 = gtk_button_new_with_label (_("Restore defaults")); + gtk_signal_connect (GTK_OBJECT(button1), "clicked", + GTK_SIGNAL_FUNC (prefdialog_restorekeys), NULL); + gtk_widget_show (button1); + + table = gtk_table_new (2, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER(table), GNOME_PAD); + gtk_table_set_row_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + gtk_table_attach (GTK_TABLE(table), keyclist, 0, 1, 0, 2, + GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE(table), label, 1, 2, 0, 1, + GTK_FILL, 0, 0, 0); + frame = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_box_pack_end (GTK_BOX(frame), button1, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX(frame), button, FALSE, FALSE, 0); + gtk_widget_show (frame); + gtk_table_attach (GTK_TABLE(table), frame, 1, 2, 1, 2, + GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_show (table); + + frame = gtk_frame_new (NULL); + gtk_container_set_border_width (GTK_CONTAINER(frame), GNOME_PAD); + gtk_container_add (GTK_CONTAINER(frame), table); + gtk_widget_show (frame); + label = gtk_label_new (_("Keyboard")); + gtk_widget_show (label); + gnome_property_box_append_page (GNOME_PROPERTY_BOX(prefdialog), + frame, label); + + /* sound */ + soundcheck = gtk_check_button_new_with_label (_("Enable Sound")); + gtk_widget_show (soundcheck); + + midicheck = gtk_check_button_new_with_label (_("Enable MIDI")); + gtk_widget_show (midicheck); + + frame = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX(frame), soundcheck, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX(frame), midicheck, FALSE, FALSE, 0); + gtk_widget_show (frame); + + divider = gtk_hseparator_new (); + gtk_widget_show (divider); + + midientry = gnome_entry_new ("MidiCmd"); + gtk_widget_show (midientry); + + widget = leftlabel_new (_("Enter command to play a midi file:")); + gtk_widget_show (widget); + + label = gtk_label_new (_("The above command is run when a midi file is " + "to be played. The name of the midi file is " + "placed in the environment variable MIDIFILE.")); + gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_LEFT); + gtk_label_set_line_wrap (GTK_LABEL(label), TRUE); + gtk_widget_show (label); + + button = gtk_button_new_with_label (_("Restore defaults")); + gtk_signal_connect (GTK_OBJECT(button), "clicked", + GTK_SIGNAL_FUNC (prefdialog_restoremidi), NULL); + gtk_widget_show (button); + + miditable = gtk_table_new (4, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE(miditable), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(miditable), GNOME_PAD_SMALL); + gtk_table_attach (GTK_TABLE(miditable), widget, 0, 2, 0, 1, + GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE(miditable), midientry, 0, 2, 1, 2, + GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE(miditable), label, 0, 1, 2, 4, + GTK_FILL, GTK_FILL, GNOME_PAD_SMALL, GNOME_PAD_SMALL); + gtk_table_attach (GTK_TABLE(miditable), button, 1, 2, 2, 3, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + gtk_widget_show (miditable); + + table = gtk_table_new (3, 1, FALSE); + gtk_container_set_border_width (GTK_CONTAINER(table), GNOME_PAD); + gtk_table_set_row_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE(table), GNOME_PAD_SMALL); + gtk_table_attach (GTK_TABLE(table), frame, 0, 1, 0, 1, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + gtk_table_attach (GTK_TABLE(table), divider, 0, 1, 1, 2, + GTK_EXPAND | GTK_FILL, 0, 0, GNOME_PAD_SMALL); + gtk_table_attach (GTK_TABLE(table), miditable, 0, 1, 2, 3, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_show (table); + + frame = gtk_frame_new (NULL); + gtk_container_set_border_width (GTK_CONTAINER(frame), GNOME_PAD); + gtk_container_add (GTK_CONTAINER(frame), table); + gtk_widget_show (frame); + label = gtk_label_new (_("Sound")); + gtk_widget_show (label); + gnome_property_box_append_page (GNOME_PROPERTY_BOX(prefdialog), + frame, label); + + /* init stuff */ + prefdialog_themelist (); + + gtk_entry_set_text (GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(midientry))), midicmd); + + for (i = 0; i < K_NUM; i ++) newkeys[i] = keys[i]; + prefdialog_drawkeys (); + + gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(soundcheck), soundenable); + gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(midicheck), midienable); + +#ifdef HAVE_ESD + if (midienable) prefdialog_midion (); + else prefdialog_midioff (); + if (soundenable) prefdialog_soundon (); + else prefdialog_soundoff (); +#else + prefdialog_soundoff (); + gtk_widget_set_sensitive (soundcheck, FALSE); +#endif + + pk_row = -1; + themechanged = midichanged = FALSE; + + gtk_signal_connect (GTK_OBJECT(soundcheck), "toggled", + prefdialog_soundtoggle, NULL); + gtk_signal_connect (GTK_OBJECT(midicheck), "toggled", + prefdialog_miditoggle, NULL); + gtk_signal_connect (GTK_OBJECT(gnome_entry_gtk_entry(GNOME_ENTRY(midientry))), + "changed", GTK_SIGNAL_FUNC(prefdialog_midichanged), NULL); + gtk_signal_connect (GTK_OBJECT(themelist), "select_row", + GTK_SIGNAL_FUNC (prefdialog_themeselect), NULL); + gtk_signal_connect (GTK_OBJECT(prefdialog), "apply", + GTK_SIGNAL_FUNC(prefdialog_apply), NULL); + gtk_signal_connect (GTK_OBJECT(GNOME_PROPERTY_BOX(prefdialog)->ok_button), "clicked", + GTK_SIGNAL_FUNC(prefdialog_check), NULL); + gtk_signal_connect (GTK_OBJECT(GNOME_PROPERTY_BOX(prefdialog)->apply_button), "clicked", + GTK_SIGNAL_FUNC(prefdialog_check), NULL); + gtk_widget_show (prefdialog); +} diff --git a/src/dialogs.h b/src/dialogs.h new file mode 100644 index 0000000..6b26acd --- /dev/null +++ b/src/dialogs.h @@ -0,0 +1,6 @@ +extern void teamdialog_new (void); +extern void connectdialog_new (void); +extern void connectingdialog_destroy (void); +extern void connectingdialog_new (void); +extern void connectdialog_connected (void); +extern void prefdialog_new (void); diff --git a/src/fields.c b/src/fields.c new file mode 100644 index 0000000..f211202 --- /dev/null +++ b/src/fields.c @@ -0,0 +1,584 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include + +#include "config.h" +#include "client.h" +#include "tetrinet.h" +#include "tetris.h" +#include "fields.h" +#include "misc.h" + +#define BLOCKSIZE bsize +#define SMALLBLOCKSIZE (BLOCKSIZE/2) + +static GtkWidget *fieldwidgets[6], *nextpiecewidget, *fieldlabels[6][6], + *specialwidget, *speciallabel, *attdefwidget, *lineswidget, *levelwidget, + *activewidget, *activelabel, *gmsgtext, *gmsginput, *fieldspage, *pagecontents; + +static GtkWidget *fields_page_contents (void); + +static gint fields_expose_event (GtkWidget *widget, GdkEventExpose *event, int field); +static gint fields_nextpiece_expose (GtkWidget *widget, GdkEventExpose *event); +static gint fields_specials_expose (GtkWidget *widget, GdkEventExpose *event); + +static void fields_refreshfield (int field); +static void fields_drawblock (int field, int x, int y, char block); + +static gint fields_eatkey (GtkWidget *widget, GdkEventKey *key); + +static GdkPixmap *blockpix; + +static FIELD displayfields[6]; /* what is actually displayed */ +static TETRISBLOCK displayblock; + +void fields_init (void) +{ + GdkBitmap *bmap; + GtkWidget *mb; + if (gdk_imlib_load_file_to_pixmap (blocksfile, &blockpix, &bmap) == 0) { + mb = gnome_message_box_new (_("Error loading theme: cannot load graphics file\n" + "Falling back to default"), + GNOME_MESSAGE_BOX_ERROR, GNOME_STOCK_BUTTON_OK, NULL); + gnome_dialog_run (GNOME_DIALOG(mb)); + config_loadtheme (DEFAULTTHEME); + if (gdk_imlib_load_file_to_pixmap (blocksfile, &blockpix, &bmap) == 0) { + /* shouldnt happen */ + fprintf (stderr, _("Error loading default theme: Aborting...\n" + "Check for installation errors\n")); + exit (0); + } + } + /* we dont want the bitmap mask */ +} + +void fields_cleanup (void) +{ + gdk_imlib_free_pixmap (blockpix); +} + +/* a mess of functions here for creating the fields page */ + +GtkWidget *fields_page_new (void) +{ + pagecontents = fields_page_contents (); + + if (fieldspage == NULL) { + fieldspage = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_container_border_width (GTK_CONTAINER(fieldspage), 2); + } + gtk_container_add (GTK_CONTAINER(fieldspage), pagecontents); + + return fieldspage; +} + +void fields_page_destroy_contents (void) +{ + if (pagecontents) { + gtk_widget_destroy (pagecontents); + pagecontents = NULL; + } +} + +GtkWidget *fields_page_contents (void) +{ + GtkWidget *table, *widget, *align, *border, *box, *table2, *hbox; + table = gtk_table_new (4, 5, FALSE); + + gtk_table_set_row_spacings (GTK_TABLE(table), 2); + gtk_table_set_col_spacings (GTK_TABLE(table), 2); + + /* make fields */ + { + int p[6][4] = { /* table attach positions */ + {0, 1, 0, 2}, + {2, 3, 0, 1}, + {3, 4, 0, 1}, + {4, 5, 0, 1}, + {3, 4, 1, 3}, + {4, 5, 1, 3} + }; + int i; + int blocksize; + float valign; + for (i = 0; i < 6; i ++) { + if (i == 0) blocksize = BLOCKSIZE; + else blocksize = SMALLBLOCKSIZE; + if (i < 4) valign = 0.0; + else valign = 1.0; + /* make the widgets */ + box = gtk_vbox_new (FALSE, 0); + /* the labels */ + fieldlabels[i][0] = gtk_label_new (""); + fieldlabels[i][1] = gtk_vseparator_new (); + fieldlabels[i][2] = gtk_label_new (""); + fieldlabels[i][3] = gtk_label_new (""); + fieldlabels[i][4] = gtk_vseparator_new (); + fieldlabels[i][5] = gtk_label_new (""); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX(hbox), fieldlabels[i][0], FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX(hbox), fieldlabels[i][1], FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX(hbox), fieldlabels[i][2], FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX(hbox), fieldlabels[i][3], TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX(hbox), fieldlabels[i][4], FALSE, FALSE, 2); + gtk_box_pack_start (GTK_BOX(hbox), fieldlabels[i][5], FALSE, FALSE, 0); + gtk_widget_show (hbox); + + fields_setlabel (i, NULL, NULL, 0); + + widget = gtk_event_box_new (); + gtk_container_add (GTK_CONTAINER(widget), hbox); + gtk_widget_set_usize (widget, blocksize * FIELDWIDTH, 0); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0); + /* the field */ + fieldwidgets[i] = gtk_drawing_area_new (); + /* attach the signals */ + gtk_signal_connect (GTK_OBJECT(fieldwidgets[i]), "expose_event", + GTK_SIGNAL_FUNC(fields_expose_event), (gpointer)i); + gtk_widget_set_events (fieldwidgets[i], GDK_EXPOSURE_MASK); + /* set the size */ + gtk_drawing_area_size (GTK_DRAWING_AREA(fieldwidgets[i]), + blocksize * FIELDWIDTH, + blocksize * FIELDHEIGHT); + gtk_widget_show (fieldwidgets[i]); + gtk_box_pack_start (GTK_BOX(box), fieldwidgets[i], FALSE, FALSE, 0); + gtk_widget_show (box); + border = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME(border), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER(border), box); + gtk_widget_show (border); + /* align it */ + align = gtk_alignment_new (0.5, valign, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER(align), border); + gtk_widget_show (align); + gtk_table_attach_defaults (GTK_TABLE(table), align, + p[i][0], p[i][1], p[i][2], p[i][3]); + } + } + /* next block thingy */ + box = gtk_vbox_new (FALSE, 2); + + widget = leftlabel_new (_("Next piece:")); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0); + /* box that displays the next block */ + border = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME(border), GTK_SHADOW_IN); + nextpiecewidget = gtk_drawing_area_new (); + gtk_signal_connect (GTK_OBJECT(nextpiecewidget), "expose_event", + GTK_SIGNAL_FUNC(fields_nextpiece_expose), NULL); + gtk_widget_set_events (nextpiecewidget, GDK_EXPOSURE_MASK); + gtk_drawing_area_size (GTK_DRAWING_AREA(nextpiecewidget), BLOCKSIZE*9/2, BLOCKSIZE*9/2); + gtk_widget_show (nextpiecewidget); + gtk_container_add (GTK_CONTAINER(border), nextpiecewidget); + gtk_widget_show (border); + align = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_container_add (GTK_CONTAINER(align), border); + gtk_widget_show (align); + gtk_box_pack_start (GTK_BOX(box), align, FALSE, FALSE, 0); + /* lines, levels and stuff */ + table2 = gtk_table_new (4, 2, FALSE); + gtk_table_set_col_spacings (GTK_TABLE(table2), 5); + widget = leftlabel_new (_("Lines:")); + gtk_widget_show (widget); + gtk_table_attach_defaults (GTK_TABLE(table2), widget, 0, 1, 0, 1); + widget = gtk_label_new (""); + gtk_widget_show (widget); + gtk_table_attach_defaults (GTK_TABLE(table2), widget, 0, 1, 1, 2); + widget = leftlabel_new (_("Level:")); + gtk_widget_show (widget); + gtk_table_attach_defaults (GTK_TABLE(table2), widget, 0, 1, 2, 3); + activelabel = leftlabel_new (_("Active level:")); + gtk_widget_show (activelabel); + gtk_table_attach_defaults (GTK_TABLE(table2), activelabel, 0, 1, 3, 4); + lineswidget = leftlabel_new (""); + gtk_widget_show (lineswidget); + gtk_table_attach_defaults (GTK_TABLE(table2), lineswidget, 1, 2, 0, 1); + widget = gtk_label_new (""); + gtk_widget_show (widget); + gtk_table_attach_defaults (GTK_TABLE(table2), widget, 1, 2, 1, 2); + levelwidget = leftlabel_new (""); + gtk_widget_show (levelwidget); + gtk_table_attach_defaults (GTK_TABLE(table2), levelwidget, 1, 2, 2, 3); + activewidget = leftlabel_new (""); + gtk_widget_show (activewidget); + gtk_table_attach_defaults (GTK_TABLE(table2), activewidget, 1, 2, 3, 4); + gtk_widget_show (table2); + gtk_box_pack_start (GTK_BOX(box), table2, FALSE, FALSE, 0); + + gtk_widget_show (box); + /* align it */ + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_widget_set_usize (align, BLOCKSIZE*6, BLOCKSIZE*11); + gtk_container_add (GTK_CONTAINER(align), box); + gtk_widget_show (align); + gtk_table_attach_defaults (GTK_TABLE(table), align, 1, 2, 0, 1); + + /* the specials thingy */ + box = gtk_hbox_new (FALSE, 0); + speciallabel = gtk_label_new (""); + gtk_widget_show (speciallabel); + fields_setspeciallabel (NULL); + gtk_box_pack_start (GTK_BOX(box), speciallabel, FALSE, FALSE, 0); + border = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME(border), GTK_SHADOW_IN); + specialwidget = gtk_drawing_area_new (); + gtk_signal_connect (GTK_OBJECT(specialwidget), "expose_event", + GTK_SIGNAL_FUNC(fields_specials_expose), NULL); + gtk_drawing_area_size (GTK_DRAWING_AREA(specialwidget), BLOCKSIZE*18, BLOCKSIZE); + gtk_widget_show (specialwidget); + gtk_container_add (GTK_CONTAINER(border), specialwidget); + gtk_widget_show (border); + gtk_box_pack_end (GTK_BOX(box), border, FALSE, FALSE, 0); + gtk_widget_show (box); + gtk_widget_set_usize (box, BLOCKSIZE*24, 0); + /* align it */ + align = gtk_alignment_new (0.5, 1.0, 0.7, 0.0); + gtk_container_add (GTK_CONTAINER(align), box); + gtk_widget_show (align); + gtk_table_attach_defaults (GTK_TABLE (table), align, 0, 3, 2, 3); + + /* attacks and defenses */ + + box = gtk_vbox_new (FALSE, 0); + widget = gtk_label_new (_("Attacks and defenses:")); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0); + attdefwidget = gtk_text_new (NULL, NULL); + gtk_widget_set_usize (attdefwidget, BLOCKSIZE*12, BLOCKSIZE*10); + gtk_text_set_word_wrap (GTK_TEXT(attdefwidget), TRUE); + GTK_WIDGET_UNSET_FLAGS (attdefwidget, GTK_CAN_FOCUS); + gtk_widget_show (attdefwidget); + gtk_box_pack_start (GTK_BOX(box), attdefwidget, FALSE, FALSE, 0); + gtk_widget_show (box); + align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0); + gtk_container_add (GTK_CONTAINER(align), box); + gtk_widget_show (align); + gtk_table_attach_defaults (GTK_TABLE(table), align, 1, 3, 1, 2); + + /* game messages */ + table2 = gtk_table_new (1, 2, FALSE); + gmsgtext = gtk_text_new (NULL, NULL); + gtk_widget_set_usize (gmsgtext, 0, 46); + gtk_widget_show (gmsgtext); + GTK_WIDGET_UNSET_FLAGS (gmsgtext, GTK_CAN_FOCUS); + gtk_table_attach (GTK_TABLE(table2), gmsgtext, 0, 1, 0, 1, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, + 0, 0); + gmsginput = gtk_entry_new_with_max_length (128); + gtk_widget_show (gmsginput); + /* eat up key messages */ + gtk_signal_connect (GTK_OBJECT(gmsginput), "key_press_event", + GTK_SIGNAL_FUNC(fields_eatkey), NULL); + gtk_table_attach (GTK_TABLE(table2), gmsginput, 0, 1, 1, 2, + GTK_FILL | GTK_EXPAND, 0, 0, 0); + gtk_widget_show (table2); + gtk_widget_set_usize (table2, 0, 48); + gtk_table_attach_defaults (GTK_TABLE(table), table2, 0, 5, 3, 4); + + gtk_widget_show (table); + + fields_setlines (-1); + fields_setlevel (-1); + fields_setactivelevel (-1); + fields_gmsginput (FALSE); + + return table; +} + + +gint fields_expose_event (GtkWidget *widget, GdkEventExpose *event, int field) +{ + fields_refreshfield (field); + + return FALSE; +} + +void fields_refreshfield (int field) +{ + int x, y; + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + fields_drawblock (field, x, y, displayfields[field][y][x]); +} + +void fields_drawfield (int field, FIELD newfield) +{ + int x, y; + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (newfield[y][x] != displayfields[field][y][x]) { + fields_drawblock (field, x, y, newfield[y][x]); + displayfields[field][y][x] = newfield[y][x]; + } +} + +void fields_drawblock (int field, int x, int y, char block) +{ + int srcx, srcy, destx, desty, blocksize; + + if (field == 0) { + blocksize = BLOCKSIZE; + if (block == 0) { + srcx = blocksize*x; + srcy = BLOCKSIZE+SMALLBLOCKSIZE + blocksize*y; + } + else { + srcx = (block-1) * blocksize; + srcy = 0; + } + } + else { + blocksize = SMALLBLOCKSIZE; + if (block == 0) { + srcx = BLOCKSIZE*FIELDWIDTH + blocksize*x; + srcy = BLOCKSIZE+SMALLBLOCKSIZE + blocksize*y; + } + else { + srcx = (block-1) * blocksize; + srcy = BLOCKSIZE; + } + } + destx = blocksize * x; + desty = blocksize * y; + + gdk_draw_pixmap (fieldwidgets[field]->window, + fieldwidgets[field]->style->black_gc, + blockpix, srcx, srcy, destx, desty, + blocksize, blocksize); +} + +void fields_setlabel (int field, char *name, char *team, int num) +{ + char buf[10]; + + sprintf (buf, "%d", num); + + if (name == NULL) { + gtk_widget_hide (fieldlabels[field][0]); + gtk_widget_hide (fieldlabels[field][1]); + gtk_widget_hide (fieldlabels[field][2]); + gtk_widget_show (fieldlabels[field][3]); + gtk_widget_hide (fieldlabels[field][4]); + gtk_widget_hide (fieldlabels[field][5]); + gtk_label_set (GTK_LABEL(fieldlabels[field][0]), ""); + gtk_label_set (GTK_LABEL(fieldlabels[field][2]), ""); + gtk_label_set (GTK_LABEL(fieldlabels[field][3]), _("Not playing")); + gtk_label_set (GTK_LABEL(fieldlabels[field][5]), ""); + } + else { + gtk_widget_show (fieldlabels[field][0]); + gtk_widget_show (fieldlabels[field][1]); + gtk_widget_show (fieldlabels[field][2]); + gtk_widget_hide (fieldlabels[field][3]); + gtk_label_set (GTK_LABEL(fieldlabels[field][0]), buf); + gtk_label_set (GTK_LABEL(fieldlabels[field][2]), nocolor(name)); + gtk_label_set (GTK_LABEL(fieldlabels[field][3]), ""); + if (team == NULL || team[0] == 0) { + gtk_widget_hide (fieldlabels[field][4]); + gtk_widget_hide (fieldlabels[field][5]); + gtk_label_set (GTK_LABEL(fieldlabels[field][5]), ""); + } + else { + gtk_widget_show (fieldlabels[field][4]); + gtk_widget_show (fieldlabels[field][5]); + gtk_label_set (GTK_LABEL(fieldlabels[field][5]), nocolor(team)); + } + } +} + +void fields_setspeciallabel (char *label) +{ + if (label == NULL) { + gtk_label_set (GTK_LABEL(speciallabel), _("Specials:")); + } + else { + gtk_label_set (GTK_LABEL(speciallabel), label); + } +} + +gint fields_nextpiece_expose (GtkWidget *widget, GdkEventExpose *event) +{ + fields_drawnextblock (NULL); + return FALSE; +} + +gint fields_specials_expose (GtkWidget *widget, GdkEventExpose *event) +{ + fields_drawspecials (); + return FALSE; +} + +void fields_drawspecials (void) +{ + int i; + for (i = 0; i < 18; i ++) { + if (i < specialblocknum) { + gdk_draw_pixmap (specialwidget->window, + specialwidget->style->black_gc, + blockpix, (specialblocks[i]-1)*BLOCKSIZE, + 0, BLOCKSIZE*i, 0, BLOCKSIZE, BLOCKSIZE); + } + else { + gdk_draw_rectangle (specialwidget->window, specialwidget->style->black_gc, + TRUE, BLOCKSIZE*i, 0, + BLOCKSIZE*(i+1), BLOCKSIZE); + } + } +} + +void fields_drawnextblock (TETRISBLOCK block) +{ + int x, y, xstart = 4, ystart = 4; + if (block == NULL) block = displayblock; + gdk_draw_rectangle (nextpiecewidget->window, nextpiecewidget->style->black_gc, + TRUE, 0, 0, BLOCKSIZE*9/2, BLOCKSIZE*9/2); + for (y = 0; y < 4; y ++) + for (x = 0; x < 4; x ++) + if (block[y][x]) { + if (y < ystart) ystart = y; + if (x < xstart) xstart = x; + } + for (y = ystart; y < 4; y ++) + for (x = xstart; x < 4; x ++) { + if (block[y][x]) { + gdk_draw_pixmap (nextpiecewidget->window, + nextpiecewidget->style->black_gc, + blockpix, (block[y][x]-1)*BLOCKSIZE, 0, + BLOCKSIZE*(x-xstart)+BLOCKSIZE/4, + BLOCKSIZE*(y-ystart)+BLOCKSIZE/4, + BLOCKSIZE, BLOCKSIZE); + } + } + memcpy (displayblock, block, 16); +} + +void fields_attdefmsg (char *text) +{ + textbox_addtext (GTK_TEXT(attdefwidget), text); + adjust_bottom (GTK_TEXT(attdefwidget)->vadj); +} + +void fields_attdefclear (void) +{ + gtk_text_freeze (GTK_TEXT(attdefwidget)); + gtk_text_backward_delete (GTK_TEXT(attdefwidget), + gtk_text_get_point (GTK_TEXT(attdefwidget))); + gtk_text_thaw (GTK_TEXT(attdefwidget)); +} + +void fields_setlines (int l) +{ + char buf[16] = ""; + if (l >= 0) + sprintf (buf, "%d", l); + leftlabel_set (lineswidget, buf); +} + +void fields_setlevel (int l) +{ + char buf[16] = ""; + if (l > 0) + sprintf (buf, "%d", l); + leftlabel_set (levelwidget, buf); +} + +void fields_setactivelevel (int l) +{ + char buf[16] = ""; + if (l <= 0) { + gtk_widget_hide (activelabel); + gtk_widget_hide (activewidget); + } + else { + sprintf (buf, "%d", l); + leftlabel_set (activewidget, buf); + gtk_widget_show (activelabel); + gtk_widget_show (activewidget); + } +} + +void fields_gmsgadd (char *str) +{ + textbox_addtext (GTK_TEXT(gmsgtext), str); + adjust_bottom (GTK_TEXT(gmsgtext)->vadj); +} + +void fields_gmsgclear (void) +{ + gtk_text_freeze (GTK_TEXT(gmsgtext)); + gtk_text_backward_delete (GTK_TEXT(gmsgtext), + gtk_text_get_point (GTK_TEXT(gmsgtext))); + gtk_text_thaw (GTK_TEXT(gmsgtext)); +} + +void fields_gmsginput (int i) +{ + if (i) { + gtk_widget_show (gmsginput); + } + else + gtk_widget_hide (gmsginput); +} + +void fields_gmsginputclear (void) +{ + gtk_entry_set_text (GTK_ENTRY(gmsginput), ""); + gtk_entry_set_position (GTK_ENTRY(gmsginput), 0); +} + +void fields_gmsginputactivate (int t) +{ + if (t) + gtk_widget_grab_focus (gmsginput); + else + /* do nothing */; +} + +void fields_gmsginputadd (char *c) +{ + gtk_entry_append_text (GTK_ENTRY(gmsginput), c); + gtk_entry_set_position (GTK_ENTRY(gmsginput), + strlen(gtk_entry_get_text(GTK_ENTRY(gmsginput)))); +} + +void fields_gmsginputback (void) +{ + char buf[256]; + strcpy (buf, gtk_entry_get_text(GTK_ENTRY(gmsginput))); + buf[strlen(buf)-1] = 0; + gtk_entry_set_text (GTK_ENTRY(gmsginput), buf); + gtk_entry_set_position (GTK_ENTRY(gmsginput), strlen(buf)); +} + +char *fields_gmsginputtext (void) +{ + return gtk_entry_get_text (GTK_ENTRY(gmsginput)); +} + +gint fields_eatkey (GtkWidget *widget, GdkEventKey *key) +{ + gtk_signal_emit_stop_by_name (GTK_OBJECT(widget), "key_press_event"); + return TRUE; +} diff --git a/src/fields.h b/src/fields.h new file mode 100644 index 0000000..3d82814 --- /dev/null +++ b/src/fields.h @@ -0,0 +1,24 @@ +#include +extern GtkWidget *fields_page_new (void); +extern void fields_page_destroy_contents (void); +extern void fields_init (void); +extern void fields_cleanup (void); + +extern void fields_drawfield (int field, FIELD newfield); +extern void fields_setlabel (int field, char *name, char *team, int num); +extern void fields_setspeciallabel (char *label); +extern void fields_drawspecials (void); +extern void fields_drawnextblock (TETRISBLOCK block); +extern void fields_attdefmsg (char *text); +extern void fields_attdefclear (void); +extern void fields_setlines (int l); +extern void fields_setlevel (int l); +extern void fields_setactivelevel (int l); +extern void fields_gmsgadd (char *str); +extern void fields_gmsgclear (void); +extern void fields_gmsginput (int i); +extern void fields_gmsginputclear (void); +extern void fields_gmsginputactivate (int i); +extern void fields_gmsginputadd (char *c); +extern void fields_gmsginputback (void); +extern char *fields_gmsginputtext (void); diff --git a/src/gtetrinet.c b/src/gtetrinet.c new file mode 100644 index 0000000..67146fb --- /dev/null +++ b/src/gtetrinet.c @@ -0,0 +1,247 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include +#include +#include +#include + +#include "gtetrinet.h" +#include "config.h" +#include "client.h" +#include "tetrinet.h" +#include "tetris.h" +#include "fields.h" +#include "partyline.h" +#include "winlist.h" +#include "misc.h" +#include "commands.h" +#include "sound.h" + +#include "images/fields.xpm" +#include "images/partyline.xpm" +#include "images/winlist.xpm" + +static GtkWidget *pixmapdata_label (char **d, char *str); +static gint keypress (GtkWidget *widget, GdkEventKey *key); +static gint keyrelease (GtkWidget *widget, GdkEventKey *key); +static int gtetrinet_key (int keyval); + +static GtkWidget *app, *notebook, *pfields; + +char *option_connect = 0, *option_nick = 0, *option_team = 0, *option_pass = 0; +int option_spec = 0; + +static const struct poptOption options[] = { + {"connect", 'c', POPT_ARG_STRING, &option_connect, 0, N_("Connect to server"), N_("SERVER")}, + {"nickname", 'n', POPT_ARG_STRING, &option_nick, 0, N_("Set nickname to use"), N_("NICKNAME")}, + {"team", 't', POPT_ARG_STRING, &option_team, 0, N_("Set team name"), N_("TEAM")}, + {"spectate", 's', POPT_ARG_NONE, &option_spec, 0, N_("Connect as spectator"), NULL}, + {"password", 'p', POPT_ARG_STRING, &option_pass, 0, N_("Spectator password"), N_("PASSWORD")}, + {NULL, 0, 0, NULL, 0, NULL, NULL} +}; + +int main (int argc, char *argv[]) +{ + GtkWidget *page, *label; + + srandom (time(NULL)); + + gnome_init_with_popt_table (APPID, APPVERSION, argc, argv, options, 0 , NULL); + gdk_imlib_init (); + + /* load settings */ + config_loadconfig (); + + /* initialise some stuff */ + client_initpipes (); + fields_init (); + + /* first set up the display */ + + /* create the main window */ + app = gnome_app_new (APPID, APPNAME); + + gtk_signal_connect (GTK_OBJECT(app), "destroy", + GTK_SIGNAL_FUNC(destroymain), NULL); + gtk_signal_connect (GTK_OBJECT(app), "key_press_event", + GTK_SIGNAL_FUNC(keypress), NULL); + gtk_signal_connect (GTK_OBJECT(app), "key_release_event", + GTK_SIGNAL_FUNC(keyrelease), NULL); + gtk_widget_set_events (app, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); + + gtk_window_set_policy (GTK_WINDOW(app), FALSE, FALSE, TRUE); + + /* create the notebook */ + notebook = gtk_notebook_new (); + gtk_notebook_set_tab_pos (GTK_NOTEBOOK(notebook), GTK_POS_TOP); + + /* put it in the main window */ + gnome_app_set_contents (GNOME_APP(app), notebook); + + /* make menus + toolbar */ + make_menus (GNOME_APP(app)); + + /* create the pages in the notebook */ + pfields = fields_page_new (); + gtk_widget_set_sensitive (pfields, TRUE); + gtk_widget_show (pfields); + label = pixmapdata_label (fields_xpm, "Playing Fields"); + gtk_widget_show (label); + gtk_notebook_append_page (GTK_NOTEBOOK(notebook), pfields, label); + + page = partyline_page_new (); + gtk_widget_show (page); + label = pixmapdata_label (partyline_xpm, "Partyline"); + gtk_widget_show (label); + gtk_notebook_append_page (GTK_NOTEBOOK(notebook), page, label); + + page = winlist_page_new (); + gtk_widget_show (page); + label = pixmapdata_label (winlist_xpm, "Winlist"); + gtk_widget_show (label); + gtk_notebook_append_page (GTK_NOTEBOOK(notebook), page, label); + + gtk_widget_show (notebook); + gtk_widget_show (app); + + /* initialise some stuff */ + textbox_setup (); + commands_checkstate (); + + /* check command line params */ +#ifdef DEBUG + printf ("option_connect: %s\n" + "option_nick: %s\n" + "option_team: %s\n" + "option_pass: %s\n" + "option_spec: %i\n", + option_connect, option_nick, option_team, + option_pass, option_spec); +#endif + if (option_nick) strcpy (nick, option_nick); + if (option_team) strcpy (team, option_team); + if (option_pass) strcpy (specpassword, option_pass); + if (option_spec) spectating = TRUE; + if (option_connect) { + client_init (option_connect, nick); + } + + /* gtk_main() */ + gtk_main (); + + /* cleanup */ + client_destroypipes (); + fields_cleanup (); + client_connectcancel (); /* kills the client process */ + sound_stopmidi (); + + /* save settings */ + config_saveconfig (); + + return 0; +} + +GtkWidget *pixmapdata_label (char **d, char *str) +{ + GdkPixmap *pm; + GdkBitmap *mask; + + gdk_imlib_data_to_pixmap (d, &pm, &mask); + + return pixmap_label (pm, mask, str); +} + +/* called when the main window is destroyed */ +void destroymain (GtkWidget *widget, gpointer data) +{ + gtk_main_quit (); +} + +/* + The key press/release handlers requires a little hack: + There is no indication whether each keypress/release is a real press + or a real release, or whether it is just typematic action. + However, if it is a result of typematic action, the keyrelease and the + following keypress event have the same value in the time field of the + GdkEventKey struct. + The solution is: when a keyrelease event is received, the event is stored + and a timeout handler is installed. if a subsequent keypress event is + received with the same value in the time field, the keyrelease event is + discarded. The keyrelease event is sent if the timeout is reached without + being cancelled. + This results in slightly slower responses for key releases, but it should not + be a big problem. + */ + +GdkEventKey k; +gint keytimeoutid = 0; + +gint keytimeout (gpointer data) +{ + tetrinet_upkey (k.keyval); + keytimeoutid = 0; + return FALSE; +} + +gint keypress (GtkWidget *widget, GdkEventKey *key) +{ + if (GTK_NOTEBOOK(notebook)->cur_page->child == pfields) + { + /* keys for the playing field - key releases needed - install timeout */ + if (keytimeoutid && key->time == k.time) + gtk_timeout_remove (keytimeoutid); + if (tetrinet_key (key->keyval, key->string)) goto keyprocessed; + } + if (gtetrinet_key(key->keyval)) goto keyprocessed; + return FALSE; +keyprocessed: + gtk_signal_emit_stop_by_name (GTK_OBJECT(widget), "key_press_event"); + return TRUE; +} + +gint keyrelease (GtkWidget *widget, GdkEventKey *key) +{ + if (GTK_NOTEBOOK(notebook)->cur_page->child == pfields) + { + k = *key; + keytimeoutid = gtk_timeout_add (10, keytimeout, 0); + gtk_signal_emit_stop_by_name (GTK_OBJECT(widget), "key_release_event"); + return TRUE; + } + return FALSE; +} + +int gtetrinet_key (int keyval) +{ + switch (keyval) + { + case GDK_F1: gtk_notebook_set_page (GTK_NOTEBOOK(notebook), 0); break; + case GDK_F2: + gtk_notebook_set_page (GTK_NOTEBOOK(notebook), 1); + partyline_entryfocus(); + break; + case GDK_F3: gtk_notebook_set_page (GTK_NOTEBOOK(notebook), 2); break; + default: + return FALSE; + } + return TRUE; +} diff --git a/src/gtetrinet.h b/src/gtetrinet.h new file mode 100644 index 0000000..1b4f2fe --- /dev/null +++ b/src/gtetrinet.h @@ -0,0 +1,5 @@ +#define APPID PACKAGE +#define APPNAME "GTetrinet" +#define APPVERSION VERSION + +void destroymain (GtkWidget *widget, gpointer data); diff --git a/src/images/fields.xpm b/src/images/fields.xpm new file mode 100644 index 0000000..b3f1b24 --- /dev/null +++ b/src/images/fields.xpm @@ -0,0 +1,183 @@ +/* XPM */ +static char * fields_xpm[] = { +"20 20 160 2", +" c None", +". c #FD8D8D", +"+ c #D06767", +"@ c #FFA3A3", +"# c #FFAFAF", +"$ c #C28383", +"% c #5B0000", +"& c #B24040", +"* c #F98585", +"= c #FF9898", +"- c #F49292", +"; c #D76262", +"> c #AF4242", +", c #410000", +"' c #610000", +") c #C04545", +"! c #D14E4E", +"~ c #D45C5C", +"{ c #EF8484", +"] c #FE8E8E", +"^ c #EF7A7A", +"/ c #310404", +"( c #812727", +"_ c #891D1D", +": c #C04C4C", +"< c #FE8A8A", +"[ c #FE8B8B", +"} c #FA8383", +"| c #EC7474", +"1 c #D96262", +"2 c #7C3030", +"3 c #752525", +"4 c #BB4646", +"5 c #D15959", +"6 c #D76060", +"7 c #780E0E", +"8 c #BE4949", +"9 c #F77E7E", +"0 c #F07878", +"a c #E26969", +"b c #C74545", +"c c #AC2121", +"d c #6C0808", +"e c #7E1313", +"f c #9E2626", +"g c #AC3333", +"h c #BB4242", +"i c #CA5252", +"j c #D96060", +"k c #D35D5D", +"l c #7B0D0D", +"m c #B84040", +"n c #D44E4E", +"o c #B82A2A", +"p c #970F0F", +"q c #820202", +"r c #5A0000", +"s c #6F0404", +"t c #9B2323", +"u c #A93030", +"v c #B63D3D", +"w c #C44A4A", +"x c #D05656", +"y c #DD5E5E", +"z c #CE4848", +"A c #921919", +"B c #9B1414", +"C c #800000", +"D c #7E0000", +"E c #7D0000", +"F c #470000", +"G c #4F0000", +"H c #820F0F", +"I c #A62C2C", +"J c #B43A3A", +"K c #D75656", +"L c #E85D5D", +"M c #C04646", +"N c #B94848", +"O c #BC4848", +"P c #770505", +"Q c #5E0000", +"R c #140000", +"S c #280000", +"T c #640000", +"U c #C35252", +"V c #E17070", +"W c #AE3C3C", +"X c #C74C4C", +"Y c #CB5050", +"Z c #CC5151", +"` c #B33C3C", +" . c #610101", +".. c #1E0000", +"+. c #000000", +"@. c #4A0000", +"#. c #973434", +"$. c #9F2A2A", +"%. c #B03535", +"&. c #B83D3D", +"*. c #BE4242", +"=. c #C14646", +"-. c #C24747", +";. c #C04444", +">. c #9E2C2C", +",. c #1B0000", +"'. c #5C0000", +"). c #891313", +"!. c #AB2F2F", +"~. c #B13535", +"{. c #B63A3A", +"]. c #B93D3D", +"^. c #BA3D3D", +"/. c #B83C3C", +"(. c #B43838", +"_. c #8E2222", +":. c #3C0000", +"<. c #6B0000", +"[. c #9B2121", +"}. c #AA2E2E", +"|. c #AF3232", +"1. c #B23535", +"2. c #B13434", +"3. c #BE3838", +"4. c #C73636", +"5. c #831616", +"6. c #530000", +"7. c #790606", +"8. c #A42727", +"9. c #A82B2B", +"0. c #AA2D2D", +"a. c #C23E3E", +"b. c #DB4B4B", +"c. c #C13333", +"d. c #8B0A0A", +"e. c #2D0000", +"f. c #620000", +"g. c #871111", +"h. c #B93B3B", +"i. c #EA5E5E", +"j. c #E55454", +"k. c #A01B1B", +"l. c #7C0000", +"m. c #490000", +"n. c #861717", +"o. c #F77878", +"p. c #BA3535", +"q. c #800202", +"r. c #160000", +"s. c #1F0000", +"t. c #6C0E0E", +"u. c #880A0A", +"v. c #740000", +"w. c #350000", +"x. c #020000", +"y. c #450000", +"z. c #510000", +"A. c #0C0000", +"B. c #690000", +"C. c #200000", +" . . ", +" + . @ # $ ", +" % & * = - ; > ", +" , ' ) ! ~ { ] ^ ", +" / ( _ : < [ } | 1 2 ", +" 3 4 5 6 7 8 9 0 a b c d ", +" e f g h i j k l m n o p q r ", +" s t u v w x y z A B C D E F ", +" G H I J K L M N O P D E Q R ", +" S T U V : W X Y Z ` ...+. ", +" @.#.$.%.&.*.=.-.;.>. ", +" ,.'.).!.~.{.].^./.(._. ", +" :.<.[.}.|.~.1.2.3.4.5. ", +" 6.7.8.9.0.a.b.c.d.% ", +" e.f.g.h.i.j.k.E l.m. ", +" m.n.o.p.q.E l.f.r. ", +" s.t.u.E l.v.w.x. ", +" y.E l.z.A. ", +" B.C. ", +" "}; diff --git a/src/images/partyline.xpm b/src/images/partyline.xpm new file mode 100644 index 0000000..51fc9b6 --- /dev/null +++ b/src/images/partyline.xpm @@ -0,0 +1,163 @@ +/* XPM */ +static char * partyline_xpm[] = { +"20 20 140 2", +" c None", +". c #6F6F45", +"+ c #6E6E3C", +"@ c #68683D", +"# c #686840", +"$ c #686843", +"% c #686845", +"& c #686846", +"* c #686844", +"= c #686842", +"- c #68683E", +"; c #67673A", +"> c #8E8E4B", +", c #686853", +"' c #6D6D4F", +") c #FEFED4", +"! c #FEFED8", +"~ c #FEFEDC", +"{ c #FEFEE0", +"] c #FEFEE2", +"^ c #FEFEE5", +"/ c #FEFEE6", +"( c #FEFEE4", +"_ c #FEFEDE", +": c #FEFEDB", +"< c #FEFE8C", +"[ c #828241", +"} c #6B6B6B", +"| c #4E4E2A", +"1 c #FEFED7", +"2 c #FEFE9B", +"3 c #FEFEA7", +"4 c #FEFEB2", +"5 c #FEFEBC", +"6 c #FEFEC2", +"7 c #FEFEC6", +"8 c #FEFEC5", +"9 c #FEFEC0", +"0 c #FEFEB8", +"a c #FEFEAD", +"b c #FEFEA1", +"c c #FEFE95", +"d c #59594A", +"e c #51512B", +"f c #FEFED9", +"g c #FEFEA2", +"h c #FEFEAF", +"i c #FEFEC7", +"j c #FEFED0", +"k c #FEFED2", +"l c #FEFECC", +"m c #FEFEB6", +"n c #FEFEA9", +"o c #474730", +"p c #51512D", +"q c #FEFEC4", +"r c #FEFED1", +"s c #FEFECB", +"t c #FEFEBE", +"u c #3C3C27", +"v c #FEFEAB", +"w c #FEFEBA", +"x c #FEFEC9", +"y c #FEFEEF", +"z c #FEFEEC", +"A c #FEFEB3", +"B c #FEFEA4", +"C c #FEFEAC", +"D c #FEFEBB", +"E c #FEFEDA", +"F c #FEFEEA", +"G c #FEFEF7", +"H c #FEFEF2", +"I c #FEFEE3", +"J c #FEFED3", +"K c #FEFEB4", +"L c #FEFEA5", +"M c #3C3C28", +"N c #FEFEAA", +"O c #FEFEEE", +"P c #FEFEEB", +"Q c #FEFEDF", +"R c #FEFEA3", +"S c #51512C", +"T c #FEFEB5", +"U c #FEFEC3", +"V c #FEFED6", +"W c #FEFECA", +"X c #FEFEBD", +"Y c #FEFEA0", +"Z c #FEFECE", +"` c #FEFEC1", +" . c #3C3C26", +".. c #4B4B2B", +"+. c #FEFE9A", +"@. c #FEFEA6", +"#. c #FEFEB1", +"$. c #FEFE94", +"%. c #232319", +"&. c #FAFA83", +"*. c #FEFE91", +"=. c #FEFE9C", +"-. c #FEFEAE", +";. c #FEFE97", +">. c #75753A", +",. c #1E1E1E", +"'. c #33331F", +"). c #3F3F22", +"!. c #4A4A2B", +"~. c #4A4A2D", +"{. c #4A4A30", +"]. c #4A4A31", +"^. c #B9B97B", +"/. c #FEFE9E", +"(. c #DEDE84", +"_. c #494929", +":. c #5A5A2F", +"<. c #0D0D06", +"[. c #4D4D4D", +"}. c #818181", +"|. c #3A3A3A", +"1. c #222222", +"2. c #1F1F1F", +"3. c #222220", +"4. c #797949", +"5. c #5F5F34", +"6. c #141414", +"7. c #2A2A2A", +"8. c #525252", +"9. c #4E4E44", +"0. c #818146", +"a. c #FEFE84", +"b. c #5F5F2F", +"c. c #5F5F5F", +"d. c #494938", +"e. c #81813C", +"f. c #67672E", +"g. c #6C6C6C", +"h. c #3C3C2D", +"i. c #555522", +" ", +" . + @ # $ % & & * = - ; > , ", +" ' ) ! ~ { ] ^ / ^ ( ] _ : < [ } ", +" | 1 2 3 4 5 6 7 8 9 0 a b c | d ", +" e f g h 5 i j ) k l 6 m n 2 e o ", +" p : 3 m q r ~ ] { 1 s t h b p u ", +" p ~ v w x ! / y z { r 6 A B p u ", +" p ~ C D s E F G H I J q K L p M ", +" p ~ N w x 1 ^ O P Q r 6 A R p u ", +" S : 3 T U j E { Q V W X h Y S u ", +" e f b h D 7 Z k r s ` T n 2 e . ", +" ..1 +.@.#.w ` q U t m C b $...%. ", +" , &.*.=.@.-.K m T #.v g ;.< >.,. ", +" '.).!.~.{.].^.3 B /.(._.:.<.[. ", +" }.|.1.2.2.2.3.4.;.*.5.6.7.8. ", +" 9.0.a.b.c. ", +" d.e.f.g. ", +" h.i. ", +" ", +" "}; diff --git a/src/images/winlist.xpm b/src/images/winlist.xpm new file mode 100644 index 0000000..16cd86a --- /dev/null +++ b/src/images/winlist.xpm @@ -0,0 +1,199 @@ +/* XPM */ +static char * winlist_xpm[] = { +"20 20 176 2", +" c None", +". c #4A4AAD", +"+ c #6D6DD9", +"@ c #7F7FDB", +"# c #7575B3", +"$ c #2B2B93", +"% c #5252F1", +"& c #6363F1", +"* c #7575F1", +"= c #8888F1", +"- c #9A9AF1", +"; c #AAAAF1", +"> c #7E7EA5", +", c #1A1A6F", +"' c #4040F1", +") c #4F4FF1", +"! c #5F5FF1", +"~ c #7070F1", +"{ c #8282F1", +"] c #9494F1", +"^ c #A4A4F1", +"/ c #B2B2F1", +"( c #676784", +"_ c #2D2DDF", +": c #3C3CF1", +"< c #8C8C98", +"[ c #7676C8", +"} c #6969F1", +"| c #7A7AF1", +"1 c #8E8EEB", +"2 c #B3B3B9", +"3 c #A8A8F1", +"4 c #AEAEE9", +"5 c #2B2BF1", +"6 c #4F4FD3", +"7 c #BEBE51", +"8 c #7D7DB6", +"9 c #ABAB7F", +"0 c #BDBD6E", +"a c #A6A6A7", +"b c #E5E538", +"c c #9C9CF1", +"d c #A7A7F1", +"e c #2B2B3D", +"f c #2626F1", +"g c #3232F1", +"h c #888892", +"i c #7777B6", +"j c #A2A282", +"k c #CBCB50", +"l c #9A9AAF", +"m c #C8C86D", +"n c #8E8EF1", +"o c #9999F1", +"p c #2A2A41", +"q c #2121E8", +"r c #6565B7", +"s c #5E5ECD", +"t c #929292", +"u c #ABAB78", +"v c #7A7AD2", +"w c #BFBF6B", +"x c #7F7FEF", +"y c #8787EE", +"z c #0D0D16", +"A c #12128A", +"B c #2525F1", +"C c #2F2FF1", +"D c #3939F1", +"E c #4444F1", +"F c #5A5AF1", +"G c #6464F1", +"H c #6E6EF1", +"I c #5A54A3", +"J c #000000", +"K c #2F21C0", +"L c #2727F1", +"M c #3030F1", +"N c #3A3AF1", +"O c #4343F1", +"P c #4D4DF1", +"Q c #5656F1", +"R c #6B5CD3", +"S c #A2525C", +"T c #AB3E43", +"U c #613094", +"V c #332BDD", +"W c #3030F0", +"X c #3838F1", +"Y c #4841E2", +"Z c #73469E", +"` c #B04C53", +" . c #D35D5D", +".. c #401C1C", +"+. c #712121", +"@. c #D44545", +"#. c #BE4545", +"$. c #9C3F3F", +"%. c #803242", +"&. c #9C3646", +"*. c #AE3C3C", +"=. c #C14646", +"-. c #D65151", +";. c #E35A5A", +">. c #8F3A3A", +",. c #D13535", +"'. c #E54343", +"). c #DF4949", +"!. c #D14D4D", +"~. c #A44141", +"{. c #D03C3C", +"]. c #D84242", +"^. c #E04848", +"/. c #E64E4E", +"(. c #E75353", +"_. c #D65050", +":. c #E83434", +"<. c #E83C3C", +"[. c #E74444", +"}. c #E54D4D", +"|. c #C74A4A", +"1. c #B53232", +"2. c #E73E3E", +"3. c #E74242", +"4. c #E84646", +"5. c #E84A4A", +"6. c #E84E4E", +"7. c #351111", +"8. c #CB2222", +"9. c #E82C2C", +"0. c #E83535", +"a. c #E83D3D", +"b. c #E74646", +"c. c #AA3939", +"d. c #4D1111", +"e. c #E83636", +"f. c #E83A3A", +"g. c #E83E3E", +"h. c #E84141", +"i. c #E84545", +"j. c #752424", +"k. c #E81F1F", +"l. c #E82626", +"m. c #E82D2D", +"n. c #431414", +"o. c #E22D2D", +"p. c #E83232", +"q. c #8A2020", +"r. c #DE3737", +"s. c #B13030", +"t. c #D61212", +"u. c #C21515", +"v. c #480A0A", +"w. c #BC2020", +"x. c #E82E2E", +"y. c #B72B2B", +"z. c #AB1D1D", +"A. c #D32626", +"B. c #010000", +"C. c #1D0606", +"D. c #A72626", +"E. c #E23636", +"F. c #740606", +"G. c #5B0606", +"H. c #020000", +"I. c #911515", +"J. c #E82828", +"K. c #430D0D", +"L. c #6E0F0F", +"M. c #8C1414", +"N. c #521111", +"O. c #240707", +"P. c #630C0C", +"Q. c #B21919", +"R. c #450808", +"S. c #380606", +" . + @ # ", +" $ % & * = - ; > ", +" , ' ) ! ~ { ] ^ / ( ", +" _ : < [ } | 1 2 3 4 ", +" 5 6 7 8 9 0 a b c d e ", +" f g h i j k l m n o p ", +" q 5 r s t u v w x y z ", +" A B C D E ) F G H I J ", +" K L M N O P Q R S ", +" T U V W X Y Z ` ... ", +" +.@.#.$.%.&.*.=.-.;.>. ", +" ,.'.).!.~.{.].^./.(._. ", +" :.<.[.}.|.1.2.3.4.5.6.7. ", +" 8.9.0.a.b.c.d.e.f.g.h.i.j. ", +" k.l.m.e.g.n. o.p.q.r.a.s. ", +" t.u.v.w.x.y.J z.A.B.C.D.E. ", +" F.G.H. I.J.K. L.M. N.O. ", +" P.Q.J R. ", +" S. ", +" "}; diff --git a/src/keys.c b/src/keys.c new file mode 100644 index 0000000..d77c86d --- /dev/null +++ b/src/keys.c @@ -0,0 +1,31 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 + +#include "keys.h" +#include "keytable.h" + +char *keystr (int id) +{ + int i; + for (i = 0; keytable[i].desc; i ++) + if (keytable[i].id == id) break; + + return keytable[i].desc; +} diff --git a/src/keys.h b/src/keys.h new file mode 100644 index 0000000..862f78b --- /dev/null +++ b/src/keys.h @@ -0,0 +1 @@ +extern char *keystr (int id); diff --git a/src/keytable.h b/src/keytable.h new file mode 100644 index 0000000..0c0ff12 --- /dev/null +++ b/src/keytable.h @@ -0,0 +1,1325 @@ +#include + +struct _keytable { + int id; + char *desc; +} keytable[] = { + {GDK_VoidSymbol, "VoidSymbol"}, + {GDK_BackSpace, "BackSpace"}, + {GDK_Tab, "Tab"}, + {GDK_Linefeed, "Linefeed"}, + {GDK_Clear, "Clear"}, + {GDK_Return, "Return"}, + {GDK_Pause, "Pause"}, + {GDK_Scroll_Lock, "Scroll_Lock"}, + {GDK_Sys_Req, "Sys_Req"}, + {GDK_Escape, "Escape"}, + {GDK_Delete, "Delete"}, + {GDK_Multi_key, "Multi_key"}, + {GDK_SingleCandidate, "SingleCandidate"}, + {GDK_MultipleCandidate, "MultipleCandidate"}, + {GDK_PreviousCandidate, "PreviousCandidate"}, + {GDK_Kanji, "Kanji"}, + {GDK_Muhenkan, "Muhenkan"}, + {GDK_Henkan_Mode, "Henkan_Mode"}, + {GDK_Henkan, "Henkan"}, + {GDK_Romaji, "Romaji"}, + {GDK_Hiragana, "Hiragana"}, + {GDK_Katakana, "Katakana"}, + {GDK_Hiragana_Katakana, "Hiragana_Katakana"}, + {GDK_Zenkaku, "Zenkaku"}, + {GDK_Hankaku, "Hankaku"}, + {GDK_Zenkaku_Hankaku, "Zenkaku_Hankaku"}, + {GDK_Touroku, "Touroku"}, + {GDK_Massyo, "Massyo"}, + {GDK_Kana_Lock, "Kana_Lock"}, + {GDK_Kana_Shift, "Kana_Shift"}, + {GDK_Eisu_Shift, "Eisu_Shift"}, + {GDK_Eisu_toggle, "Eisu_toggle"}, + {GDK_Zen_Koho, "Zen_Koho"}, + {GDK_Mae_Koho, "Mae_Koho"}, + {GDK_Home, "Home"}, + {GDK_Left, "Left"}, + {GDK_Up, "Up"}, + {GDK_Right, "Right"}, + {GDK_Down, "Down"}, + {GDK_Prior, "Prior"}, + {GDK_Page_Up, "Page_Up"}, + {GDK_Next, "Next"}, + {GDK_Page_Down, "Page_Down"}, + {GDK_End, "End"}, + {GDK_Begin, "Begin"}, + {GDK_Select, "Select"}, + {GDK_Print, "Print"}, + {GDK_Execute, "Execute"}, + {GDK_Insert, "Insert"}, + {GDK_Undo, "Undo"}, + {GDK_Redo, "Redo"}, + {GDK_Menu, "Menu"}, + {GDK_Find, "Find"}, + {GDK_Cancel, "Cancel"}, + {GDK_Help, "Help"}, + {GDK_Break, "Break"}, + {GDK_Mode_switch, "Mode_switch"}, + {GDK_script_switch, "script_switch"}, + {GDK_Num_Lock, "Num_Lock"}, + {GDK_KP_Space, "KP_Space"}, + {GDK_KP_Tab, "KP_Tab"}, + {GDK_KP_Enter, "KP_Enter"}, + {GDK_KP_F1, "KP_F1"}, + {GDK_KP_F2, "KP_F2"}, + {GDK_KP_F3, "KP_F3"}, + {GDK_KP_F4, "KP_F4"}, + {GDK_KP_Home, "KP_Home"}, + {GDK_KP_Left, "KP_Left"}, + {GDK_KP_Up, "KP_Up"}, + {GDK_KP_Right, "KP_Right"}, + {GDK_KP_Down, "KP_Down"}, + {GDK_KP_Prior, "KP_Prior"}, + {GDK_KP_Page_Up, "KP_Page_Up"}, + {GDK_KP_Next, "KP_Next"}, + {GDK_KP_Page_Down, "KP_Page_Down"}, + {GDK_KP_End, "KP_End"}, + {GDK_KP_Begin, "KP_Begin"}, + {GDK_KP_Insert, "KP_Insert"}, + {GDK_KP_Delete, "KP_Delete"}, + {GDK_KP_Equal, "KP_Equal"}, + {GDK_KP_Multiply, "KP_Multiply"}, + {GDK_KP_Add, "KP_Add"}, + {GDK_KP_Separator, "KP_Separator"}, + {GDK_KP_Subtract, "KP_Subtract"}, + {GDK_KP_Decimal, "KP_Decimal"}, + {GDK_KP_Divide, "KP_Divide"}, + {GDK_KP_0, "KP_0"}, + {GDK_KP_1, "KP_1"}, + {GDK_KP_2, "KP_2"}, + {GDK_KP_3, "KP_3"}, + {GDK_KP_4, "KP_4"}, + {GDK_KP_5, "KP_5"}, + {GDK_KP_6, "KP_6"}, + {GDK_KP_7, "KP_7"}, + {GDK_KP_8, "KP_8"}, + {GDK_KP_9, "KP_9"}, + {GDK_F1, "F1"}, + {GDK_F2, "F2"}, + {GDK_F3, "F3"}, + {GDK_F4, "F4"}, + {GDK_F5, "F5"}, + {GDK_F6, "F6"}, + {GDK_F7, "F7"}, + {GDK_F8, "F8"}, + {GDK_F9, "F9"}, + {GDK_F10, "F10"}, + {GDK_F11, "F11"}, + {GDK_L1, "L1"}, + {GDK_F12, "F12"}, + {GDK_L2, "L2"}, + {GDK_F13, "F13"}, + {GDK_L3, "L3"}, + {GDK_F14, "F14"}, + {GDK_L4, "L4"}, + {GDK_F15, "F15"}, + {GDK_L5, "L5"}, + {GDK_F16, "F16"}, + {GDK_L6, "L6"}, + {GDK_F17, "F17"}, + {GDK_L7, "L7"}, + {GDK_F18, "F18"}, + {GDK_L8, "L8"}, + {GDK_F19, "F19"}, + {GDK_L9, "L9"}, + {GDK_F20, "F20"}, + {GDK_L10, "L10"}, + {GDK_F21, "F21"}, + {GDK_R1, "R1"}, + {GDK_F22, "F22"}, + {GDK_R2, "R2"}, + {GDK_F23, "F23"}, + {GDK_R3, "R3"}, + {GDK_F24, "F24"}, + {GDK_R4, "R4"}, + {GDK_F25, "F25"}, + {GDK_R5, "R5"}, + {GDK_F26, "F26"}, + {GDK_R6, "R6"}, + {GDK_F27, "F27"}, + {GDK_R7, "R7"}, + {GDK_F28, "F28"}, + {GDK_R8, "R8"}, + {GDK_F29, "F29"}, + {GDK_R9, "R9"}, + {GDK_F30, "F30"}, + {GDK_R10, "R10"}, + {GDK_F31, "F31"}, + {GDK_R11, "R11"}, + {GDK_F32, "F32"}, + {GDK_R12, "R12"}, + {GDK_F33, "F33"}, + {GDK_R13, "R13"}, + {GDK_F34, "F34"}, + {GDK_R14, "R14"}, + {GDK_F35, "F35"}, + {GDK_R15, "R15"}, + {GDK_Shift_L, "Shift_L"}, + {GDK_Shift_R, "Shift_R"}, + {GDK_Control_L, "Control_L"}, + {GDK_Control_R, "Control_R"}, + {GDK_Caps_Lock, "Caps_Lock"}, + {GDK_Shift_Lock, "Shift_Lock"}, + {GDK_Meta_L, "Meta_L"}, + {GDK_Meta_R, "Meta_R"}, + {GDK_Alt_L, "Alt_L"}, + {GDK_Alt_R, "Alt_R"}, + {GDK_Super_L, "Super_L"}, + {GDK_Super_R, "Super_R"}, + {GDK_Hyper_L, "Hyper_L"}, + {GDK_Hyper_R, "Hyper_R"}, + {GDK_ISO_Lock, "ISO_Lock"}, + {GDK_ISO_Level2_Latch, "ISO_Level2_Latch"}, + {GDK_ISO_Level3_Shift, "ISO_Level3_Shift"}, + {GDK_ISO_Level3_Latch, "ISO_Level3_Latch"}, + {GDK_ISO_Level3_Lock, "ISO_Level3_Lock"}, + {GDK_ISO_Group_Shift, "ISO_Group_Shift"}, + {GDK_ISO_Group_Latch, "ISO_Group_Latch"}, + {GDK_ISO_Group_Lock, "ISO_Group_Lock"}, + {GDK_ISO_Next_Group, "ISO_Next_Group"}, + {GDK_ISO_Next_Group_Lock, "ISO_Next_Group_Lock"}, + {GDK_ISO_Prev_Group, "ISO_Prev_Group"}, + {GDK_ISO_Prev_Group_Lock, "ISO_Prev_Group_Lock"}, + {GDK_ISO_First_Group, "ISO_First_Group"}, + {GDK_ISO_First_Group_Lock, "ISO_First_Group_Lock"}, + {GDK_ISO_Last_Group, "ISO_Last_Group"}, + {GDK_ISO_Last_Group_Lock, "ISO_Last_Group_Lock"}, + {GDK_ISO_Left_Tab, "ISO_Left_Tab"}, + {GDK_ISO_Move_Line_Up, "ISO_Move_Line_Up"}, + {GDK_ISO_Move_Line_Down, "ISO_Move_Line_Down"}, + {GDK_ISO_Partial_Line_Up, "ISO_Partial_Line_Up"}, + {GDK_ISO_Partial_Line_Down, "ISO_Partial_Line_Down"}, + {GDK_ISO_Partial_Space_Left, "ISO_Partial_Space_Left"}, + {GDK_ISO_Partial_Space_Right, "ISO_Partial_Space_Right"}, + {GDK_ISO_Set_Margin_Left, "ISO_Set_Margin_Left"}, + {GDK_ISO_Set_Margin_Right, "ISO_Set_Margin_Right"}, + {GDK_ISO_Release_Margin_Left, "ISO_Release_Margin_Left"}, + {GDK_ISO_Release_Margin_Right, "ISO_Release_Margin_Right"}, + {GDK_ISO_Release_Both_Margins, "ISO_Release_Both_Margins"}, + {GDK_ISO_Fast_Cursor_Left, "ISO_Fast_Cursor_Left"}, + {GDK_ISO_Fast_Cursor_Right, "ISO_Fast_Cursor_Right"}, + {GDK_ISO_Fast_Cursor_Up, "ISO_Fast_Cursor_Up"}, + {GDK_ISO_Fast_Cursor_Down, "ISO_Fast_Cursor_Down"}, + {GDK_ISO_Continuous_Underline, "ISO_Continuous_Underline"}, + {GDK_ISO_Discontinuous_Underline, "ISO_Discontinuous_Underline"}, + {GDK_ISO_Emphasize, "ISO_Emphasize"}, + {GDK_ISO_Center_Object, "ISO_Center_Object"}, + {GDK_ISO_Enter, "ISO_Enter"}, + {GDK_dead_grave, "dead_grave"}, + {GDK_dead_acute, "dead_acute"}, + {GDK_dead_circumflex, "dead_circumflex"}, + {GDK_dead_tilde, "dead_tilde"}, + {GDK_dead_macron, "dead_macron"}, + {GDK_dead_breve, "dead_breve"}, + {GDK_dead_abovedot, "dead_abovedot"}, + {GDK_dead_diaeresis, "dead_diaeresis"}, + {GDK_dead_abovering, "dead_abovering"}, + {GDK_dead_doubleacute, "dead_doubleacute"}, + {GDK_dead_caron, "dead_caron"}, + {GDK_dead_cedilla, "dead_cedilla"}, + {GDK_dead_ogonek, "dead_ogonek"}, + {GDK_dead_iota, "dead_iota"}, + {GDK_dead_voiced_sound, "dead_voiced_sound"}, + {GDK_dead_semivoiced_sound, "dead_semivoiced_sound"}, + {GDK_dead_belowdot, "dead_belowdot"}, + {GDK_First_Virtual_Screen, "First_Virtual_Screen"}, + {GDK_Prev_Virtual_Screen, "Prev_Virtual_Screen"}, + {GDK_Next_Virtual_Screen, "Next_Virtual_Screen"}, + {GDK_Last_Virtual_Screen, "Last_Virtual_Screen"}, + {GDK_Terminate_Server, "Terminate_Server"}, + {GDK_AccessX_Enable, "AccessX_Enable"}, + {GDK_AccessX_Feedback_Enable, "AccessX_Feedback_Enable"}, + {GDK_RepeatKeys_Enable, "RepeatKeys_Enable"}, + {GDK_SlowKeys_Enable, "SlowKeys_Enable"}, + {GDK_BounceKeys_Enable, "BounceKeys_Enable"}, + {GDK_StickyKeys_Enable, "StickyKeys_Enable"}, + {GDK_MouseKeys_Enable, "MouseKeys_Enable"}, + {GDK_MouseKeys_Accel_Enable, "MouseKeys_Accel_Enable"}, + {GDK_Overlay1_Enable, "Overlay1_Enable"}, + {GDK_Overlay2_Enable, "Overlay2_Enable"}, + {GDK_AudibleBell_Enable, "AudibleBell_Enable"}, + {GDK_Pointer_Left, "Pointer_Left"}, + {GDK_Pointer_Right, "Pointer_Right"}, + {GDK_Pointer_Up, "Pointer_Up"}, + {GDK_Pointer_Down, "Pointer_Down"}, + {GDK_Pointer_UpLeft, "Pointer_UpLeft"}, + {GDK_Pointer_UpRight, "Pointer_UpRight"}, + {GDK_Pointer_DownLeft, "Pointer_DownLeft"}, + {GDK_Pointer_DownRight, "Pointer_DownRight"}, + {GDK_Pointer_Button_Dflt, "Pointer_Button_Dflt"}, + {GDK_Pointer_Button1, "Pointer_Button1"}, + {GDK_Pointer_Button2, "Pointer_Button2"}, + {GDK_Pointer_Button3, "Pointer_Button3"}, + {GDK_Pointer_Button4, "Pointer_Button4"}, + {GDK_Pointer_Button5, "Pointer_Button5"}, + {GDK_Pointer_DblClick_Dflt, "Pointer_DblClick_Dflt"}, + {GDK_Pointer_DblClick1, "Pointer_DblClick1"}, + {GDK_Pointer_DblClick2, "Pointer_DblClick2"}, + {GDK_Pointer_DblClick3, "Pointer_DblClick3"}, + {GDK_Pointer_DblClick4, "Pointer_DblClick4"}, + {GDK_Pointer_DblClick5, "Pointer_DblClick5"}, + {GDK_Pointer_Drag_Dflt, "Pointer_Drag_Dflt"}, + {GDK_Pointer_Drag1, "Pointer_Drag1"}, + {GDK_Pointer_Drag2, "Pointer_Drag2"}, + {GDK_Pointer_Drag3, "Pointer_Drag3"}, + {GDK_Pointer_Drag4, "Pointer_Drag4"}, + {GDK_Pointer_Drag5, "Pointer_Drag5"}, + {GDK_Pointer_EnableKeys, "Pointer_EnableKeys"}, + {GDK_Pointer_Accelerate, "Pointer_Accelerate"}, + {GDK_Pointer_DfltBtnNext, "Pointer_DfltBtnNext"}, + {GDK_Pointer_DfltBtnPrev, "Pointer_DfltBtnPrev"}, + {GDK_3270_Duplicate, "3270_Duplicate"}, + {GDK_3270_FieldMark, "3270_FieldMark"}, + {GDK_3270_Right2, "3270_Right2"}, + {GDK_3270_Left2, "3270_Left2"}, + {GDK_3270_BackTab, "3270_BackTab"}, + {GDK_3270_EraseEOF, "3270_EraseEOF"}, + {GDK_3270_EraseInput, "3270_EraseInput"}, + {GDK_3270_Reset, "3270_Reset"}, + {GDK_3270_Quit, "3270_Quit"}, + {GDK_3270_PA1, "3270_PA1"}, + {GDK_3270_PA2, "3270_PA2"}, + {GDK_3270_PA3, "3270_PA3"}, + {GDK_3270_Test, "3270_Test"}, + {GDK_3270_Attn, "3270_Attn"}, + {GDK_3270_CursorBlink, "3270_CursorBlink"}, + {GDK_3270_AltCursor, "3270_AltCursor"}, + {GDK_3270_KeyClick, "3270_KeyClick"}, + {GDK_3270_Jump, "3270_Jump"}, + {GDK_3270_Ident, "3270_Ident"}, + {GDK_3270_Rule, "3270_Rule"}, + {GDK_3270_Copy, "3270_Copy"}, + {GDK_3270_Play, "3270_Play"}, + {GDK_3270_Setup, "3270_Setup"}, + {GDK_3270_Record, "3270_Record"}, + {GDK_3270_ChangeScreen, "3270_ChangeScreen"}, + {GDK_3270_DeleteWord, "3270_DeleteWord"}, + {GDK_3270_ExSelect, "3270_ExSelect"}, + {GDK_3270_CursorSelect, "3270_CursorSelect"}, + {GDK_3270_PrintScreen, "3270_PrintScreen"}, + {GDK_3270_Enter, "3270_Enter"}, + {GDK_space, "space"}, + {GDK_exclam, "exclam"}, + {GDK_quotedbl, "quotedbl"}, + {GDK_numbersign, "numbersign"}, + {GDK_dollar, "dollar"}, + {GDK_percent, "percent"}, + {GDK_ampersand, "ampersand"}, + {GDK_apostrophe, "apostrophe"}, + {GDK_quoteright, "quoteright"}, + {GDK_parenleft, "parenleft"}, + {GDK_parenright, "parenright"}, + {GDK_asterisk, "asterisk"}, + {GDK_plus, "plus"}, + {GDK_comma, "comma"}, + {GDK_minus, "minus"}, + {GDK_period, "period"}, + {GDK_slash, "slash"}, + {GDK_0, "0"}, + {GDK_1, "1"}, + {GDK_2, "2"}, + {GDK_3, "3"}, + {GDK_4, "4"}, + {GDK_5, "5"}, + {GDK_6, "6"}, + {GDK_7, "7"}, + {GDK_8, "8"}, + {GDK_9, "9"}, + {GDK_colon, "colon"}, + {GDK_semicolon, "semicolon"}, + {GDK_less, "less"}, + {GDK_equal, "equal"}, + {GDK_greater, "greater"}, + {GDK_question, "question"}, + {GDK_at, "at"}, + {GDK_A, "A"}, + {GDK_B, "B"}, + {GDK_C, "C"}, + {GDK_D, "D"}, + {GDK_E, "E"}, + {GDK_F, "F"}, + {GDK_G, "G"}, + {GDK_H, "H"}, + {GDK_I, "I"}, + {GDK_J, "J"}, + {GDK_K, "K"}, + {GDK_L, "L"}, + {GDK_M, "M"}, + {GDK_N, "N"}, + {GDK_O, "O"}, + {GDK_P, "P"}, + {GDK_Q, "Q"}, + {GDK_R, "R"}, + {GDK_S, "S"}, + {GDK_T, "T"}, + {GDK_U, "U"}, + {GDK_V, "V"}, + {GDK_W, "W"}, + {GDK_X, "X"}, + {GDK_Y, "Y"}, + {GDK_Z, "Z"}, + {GDK_bracketleft, "bracketleft"}, + {GDK_backslash, "backslash"}, + {GDK_bracketright, "bracketright"}, + {GDK_asciicircum, "asciicircum"}, + {GDK_underscore, "underscore"}, + {GDK_grave, "grave"}, + {GDK_quoteleft, "quoteleft"}, + {GDK_a, "a"}, + {GDK_b, "b"}, + {GDK_c, "c"}, + {GDK_d, "d"}, + {GDK_e, "e"}, + {GDK_f, "f"}, + {GDK_g, "g"}, + {GDK_h, "h"}, + {GDK_i, "i"}, + {GDK_j, "j"}, + {GDK_k, "k"}, + {GDK_l, "l"}, + {GDK_m, "m"}, + {GDK_n, "n"}, + {GDK_o, "o"}, + {GDK_p, "p"}, + {GDK_q, "q"}, + {GDK_r, "r"}, + {GDK_s, "s"}, + {GDK_t, "t"}, + {GDK_u, "u"}, + {GDK_v, "v"}, + {GDK_w, "w"}, + {GDK_x, "x"}, + {GDK_y, "y"}, + {GDK_z, "z"}, + {GDK_braceleft, "braceleft"}, + {GDK_bar, "bar"}, + {GDK_braceright, "braceright"}, + {GDK_asciitilde, "asciitilde"}, + {GDK_nobreakspace, "nobreakspace"}, + {GDK_exclamdown, "exclamdown"}, + {GDK_cent, "cent"}, + {GDK_sterling, "sterling"}, + {GDK_currency, "currency"}, + {GDK_yen, "yen"}, + {GDK_brokenbar, "brokenbar"}, + {GDK_section, "section"}, + {GDK_diaeresis, "diaeresis"}, + {GDK_copyright, "copyright"}, + {GDK_ordfeminine, "ordfeminine"}, + {GDK_guillemotleft, "guillemotleft"}, + {GDK_notsign, "notsign"}, + {GDK_hyphen, "hyphen"}, + {GDK_registered, "registered"}, + {GDK_macron, "macron"}, + {GDK_degree, "degree"}, + {GDK_plusminus, "plusminus"}, + {GDK_twosuperior, "twosuperior"}, + {GDK_threesuperior, "threesuperior"}, + {GDK_acute, "acute"}, + {GDK_mu, "mu"}, + {GDK_paragraph, "paragraph"}, + {GDK_periodcentered, "periodcentered"}, + {GDK_cedilla, "cedilla"}, + {GDK_onesuperior, "onesuperior"}, + {GDK_masculine, "masculine"}, + {GDK_guillemotright, "guillemotright"}, + {GDK_onequarter, "onequarter"}, + {GDK_onehalf, "onehalf"}, + {GDK_threequarters, "threequarters"}, + {GDK_questiondown, "questiondown"}, + {GDK_Agrave, "Agrave"}, + {GDK_Aacute, "Aacute"}, + {GDK_Acircumflex, "Acircumflex"}, + {GDK_Atilde, "Atilde"}, + {GDK_Adiaeresis, "Adiaeresis"}, + {GDK_Aring, "Aring"}, + {GDK_AE, "AE"}, + {GDK_Ccedilla, "Ccedilla"}, + {GDK_Egrave, "Egrave"}, + {GDK_Eacute, "Eacute"}, + {GDK_Ecircumflex, "Ecircumflex"}, + {GDK_Ediaeresis, "Ediaeresis"}, + {GDK_Igrave, "Igrave"}, + {GDK_Iacute, "Iacute"}, + {GDK_Icircumflex, "Icircumflex"}, + {GDK_Idiaeresis, "Idiaeresis"}, + {GDK_ETH, "ETH"}, + {GDK_Eth, "Eth"}, + {GDK_Ntilde, "Ntilde"}, + {GDK_Ograve, "Ograve"}, + {GDK_Oacute, "Oacute"}, + {GDK_Ocircumflex, "Ocircumflex"}, + {GDK_Otilde, "Otilde"}, + {GDK_Odiaeresis, "Odiaeresis"}, + {GDK_multiply, "multiply"}, + {GDK_Ooblique, "Ooblique"}, + {GDK_Ugrave, "Ugrave"}, + {GDK_Uacute, "Uacute"}, + {GDK_Ucircumflex, "Ucircumflex"}, + {GDK_Udiaeresis, "Udiaeresis"}, + {GDK_Yacute, "Yacute"}, + {GDK_THORN, "THORN"}, + {GDK_Thorn, "Thorn"}, + {GDK_ssharp, "ssharp"}, + {GDK_agrave, "agrave"}, + {GDK_aacute, "aacute"}, + {GDK_acircumflex, "acircumflex"}, + {GDK_atilde, "atilde"}, + {GDK_adiaeresis, "adiaeresis"}, + {GDK_aring, "aring"}, + {GDK_ae, "ae"}, + {GDK_ccedilla, "ccedilla"}, + {GDK_egrave, "egrave"}, + {GDK_eacute, "eacute"}, + {GDK_ecircumflex, "ecircumflex"}, + {GDK_ediaeresis, "ediaeresis"}, + {GDK_igrave, "igrave"}, + {GDK_iacute, "iacute"}, + {GDK_icircumflex, "icircumflex"}, + {GDK_idiaeresis, "idiaeresis"}, + {GDK_eth, "eth"}, + {GDK_ntilde, "ntilde"}, + {GDK_ograve, "ograve"}, + {GDK_oacute, "oacute"}, + {GDK_ocircumflex, "ocircumflex"}, + {GDK_otilde, "otilde"}, + {GDK_odiaeresis, "odiaeresis"}, + {GDK_division, "division"}, + {GDK_oslash, "oslash"}, + {GDK_ugrave, "ugrave"}, + {GDK_uacute, "uacute"}, + {GDK_ucircumflex, "ucircumflex"}, + {GDK_udiaeresis, "udiaeresis"}, + {GDK_yacute, "yacute"}, + {GDK_thorn, "thorn"}, + {GDK_ydiaeresis, "ydiaeresis"}, + {GDK_Aogonek, "Aogonek"}, + {GDK_breve, "breve"}, + {GDK_Lstroke, "Lstroke"}, + {GDK_Lcaron, "Lcaron"}, + {GDK_Sacute, "Sacute"}, + {GDK_Scaron, "Scaron"}, + {GDK_Scedilla, "Scedilla"}, + {GDK_Tcaron, "Tcaron"}, + {GDK_Zacute, "Zacute"}, + {GDK_Zcaron, "Zcaron"}, + {GDK_Zabovedot, "Zabovedot"}, + {GDK_aogonek, "aogonek"}, + {GDK_ogonek, "ogonek"}, + {GDK_lstroke, "lstroke"}, + {GDK_lcaron, "lcaron"}, + {GDK_sacute, "sacute"}, + {GDK_caron, "caron"}, + {GDK_scaron, "scaron"}, + {GDK_scedilla, "scedilla"}, + {GDK_tcaron, "tcaron"}, + {GDK_zacute, "zacute"}, + {GDK_doubleacute, "doubleacute"}, + {GDK_zcaron, "zcaron"}, + {GDK_zabovedot, "zabovedot"}, + {GDK_Racute, "Racute"}, + {GDK_Abreve, "Abreve"}, + {GDK_Lacute, "Lacute"}, + {GDK_Cacute, "Cacute"}, + {GDK_Ccaron, "Ccaron"}, + {GDK_Eogonek, "Eogonek"}, + {GDK_Ecaron, "Ecaron"}, + {GDK_Dcaron, "Dcaron"}, + {GDK_Dstroke, "Dstroke"}, + {GDK_Nacute, "Nacute"}, + {GDK_Ncaron, "Ncaron"}, + {GDK_Odoubleacute, "Odoubleacute"}, + {GDK_Rcaron, "Rcaron"}, + {GDK_Uring, "Uring"}, + {GDK_Udoubleacute, "Udoubleacute"}, + {GDK_Tcedilla, "Tcedilla"}, + {GDK_racute, "racute"}, + {GDK_abreve, "abreve"}, + {GDK_lacute, "lacute"}, + {GDK_cacute, "cacute"}, + {GDK_ccaron, "ccaron"}, + {GDK_eogonek, "eogonek"}, + {GDK_ecaron, "ecaron"}, + {GDK_dcaron, "dcaron"}, + {GDK_dstroke, "dstroke"}, + {GDK_nacute, "nacute"}, + {GDK_ncaron, "ncaron"}, + {GDK_odoubleacute, "odoubleacute"}, + {GDK_udoubleacute, "udoubleacute"}, + {GDK_rcaron, "rcaron"}, + {GDK_uring, "uring"}, + {GDK_tcedilla, "tcedilla"}, + {GDK_abovedot, "abovedot"}, + {GDK_Hstroke, "Hstroke"}, + {GDK_Hcircumflex, "Hcircumflex"}, + {GDK_Iabovedot, "Iabovedot"}, + {GDK_Gbreve, "Gbreve"}, + {GDK_Jcircumflex, "Jcircumflex"}, + {GDK_hstroke, "hstroke"}, + {GDK_hcircumflex, "hcircumflex"}, + {GDK_idotless, "idotless"}, + {GDK_gbreve, "gbreve"}, + {GDK_jcircumflex, "jcircumflex"}, + {GDK_Cabovedot, "Cabovedot"}, + {GDK_Ccircumflex, "Ccircumflex"}, + {GDK_Gabovedot, "Gabovedot"}, + {GDK_Gcircumflex, "Gcircumflex"}, + {GDK_Ubreve, "Ubreve"}, + {GDK_Scircumflex, "Scircumflex"}, + {GDK_cabovedot, "cabovedot"}, + {GDK_ccircumflex, "ccircumflex"}, + {GDK_gabovedot, "gabovedot"}, + {GDK_gcircumflex, "gcircumflex"}, + {GDK_ubreve, "ubreve"}, + {GDK_scircumflex, "scircumflex"}, + {GDK_kra, "kra"}, + {GDK_kappa, "kappa"}, + {GDK_Rcedilla, "Rcedilla"}, + {GDK_Itilde, "Itilde"}, + {GDK_Lcedilla, "Lcedilla"}, + {GDK_Emacron, "Emacron"}, + {GDK_Gcedilla, "Gcedilla"}, + {GDK_Tslash, "Tslash"}, + {GDK_rcedilla, "rcedilla"}, + {GDK_itilde, "itilde"}, + {GDK_lcedilla, "lcedilla"}, + {GDK_emacron, "emacron"}, + {GDK_gcedilla, "gcedilla"}, + {GDK_tslash, "tslash"}, + {GDK_ENG, "ENG"}, + {GDK_eng, "eng"}, + {GDK_Amacron, "Amacron"}, + {GDK_Iogonek, "Iogonek"}, + {GDK_Eabovedot, "Eabovedot"}, + {GDK_Imacron, "Imacron"}, + {GDK_Ncedilla, "Ncedilla"}, + {GDK_Omacron, "Omacron"}, + {GDK_Kcedilla, "Kcedilla"}, + {GDK_Uogonek, "Uogonek"}, + {GDK_Utilde, "Utilde"}, + {GDK_Umacron, "Umacron"}, + {GDK_amacron, "amacron"}, + {GDK_iogonek, "iogonek"}, + {GDK_eabovedot, "eabovedot"}, + {GDK_imacron, "imacron"}, + {GDK_ncedilla, "ncedilla"}, + {GDK_omacron, "omacron"}, + {GDK_kcedilla, "kcedilla"}, + {GDK_uogonek, "uogonek"}, + {GDK_utilde, "utilde"}, + {GDK_umacron, "umacron"}, + {GDK_overline, "overline"}, + {GDK_kana_fullstop, "kana_fullstop"}, + {GDK_kana_openingbracket, "kana_openingbracket"}, + {GDK_kana_closingbracket, "kana_closingbracket"}, + {GDK_kana_comma, "kana_comma"}, + {GDK_kana_conjunctive, "kana_conjunctive"}, + {GDK_kana_middledot, "kana_middledot"}, + {GDK_kana_WO, "kana_WO"}, + {GDK_kana_a, "kana_a"}, + {GDK_kana_i, "kana_i"}, + {GDK_kana_u, "kana_u"}, + {GDK_kana_e, "kana_e"}, + {GDK_kana_o, "kana_o"}, + {GDK_kana_ya, "kana_ya"}, + {GDK_kana_yu, "kana_yu"}, + {GDK_kana_yo, "kana_yo"}, + {GDK_kana_tsu, "kana_tsu"}, + {GDK_kana_tu, "kana_tu"}, + {GDK_prolongedsound, "prolongedsound"}, + {GDK_kana_A, "kana_A"}, + {GDK_kana_I, "kana_I"}, + {GDK_kana_U, "kana_U"}, + {GDK_kana_E, "kana_E"}, + {GDK_kana_O, "kana_O"}, + {GDK_kana_KA, "kana_KA"}, + {GDK_kana_KI, "kana_KI"}, + {GDK_kana_KU, "kana_KU"}, + {GDK_kana_KE, "kana_KE"}, + {GDK_kana_KO, "kana_KO"}, + {GDK_kana_SA, "kana_SA"}, + {GDK_kana_SHI, "kana_SHI"}, + {GDK_kana_SU, "kana_SU"}, + {GDK_kana_SE, "kana_SE"}, + {GDK_kana_SO, "kana_SO"}, + {GDK_kana_TA, "kana_TA"}, + {GDK_kana_CHI, "kana_CHI"}, + {GDK_kana_TI, "kana_TI"}, + {GDK_kana_TSU, "kana_TSU"}, + {GDK_kana_TU, "kana_TU"}, + {GDK_kana_TE, "kana_TE"}, + {GDK_kana_TO, "kana_TO"}, + {GDK_kana_NA, "kana_NA"}, + {GDK_kana_NI, "kana_NI"}, + {GDK_kana_NU, "kana_NU"}, + {GDK_kana_NE, "kana_NE"}, + {GDK_kana_NO, "kana_NO"}, + {GDK_kana_HA, "kana_HA"}, + {GDK_kana_HI, "kana_HI"}, + {GDK_kana_FU, "kana_FU"}, + {GDK_kana_HU, "kana_HU"}, + {GDK_kana_HE, "kana_HE"}, + {GDK_kana_HO, "kana_HO"}, + {GDK_kana_MA, "kana_MA"}, + {GDK_kana_MI, "kana_MI"}, + {GDK_kana_MU, "kana_MU"}, + {GDK_kana_ME, "kana_ME"}, + {GDK_kana_MO, "kana_MO"}, + {GDK_kana_YA, "kana_YA"}, + {GDK_kana_YU, "kana_YU"}, + {GDK_kana_YO, "kana_YO"}, + {GDK_kana_RA, "kana_RA"}, + {GDK_kana_RI, "kana_RI"}, + {GDK_kana_RU, "kana_RU"}, + {GDK_kana_RE, "kana_RE"}, + {GDK_kana_RO, "kana_RO"}, + {GDK_kana_WA, "kana_WA"}, + {GDK_kana_N, "kana_N"}, + {GDK_voicedsound, "voicedsound"}, + {GDK_semivoicedsound, "semivoicedsound"}, + {GDK_kana_switch, "kana_switch"}, + {GDK_Arabic_comma, "Arabic_comma"}, + {GDK_Arabic_semicolon, "Arabic_semicolon"}, + {GDK_Arabic_question_mark, "Arabic_question_mark"}, + {GDK_Arabic_hamza, "Arabic_hamza"}, + {GDK_Arabic_maddaonalef, "Arabic_maddaonalef"}, + {GDK_Arabic_hamzaonalef, "Arabic_hamzaonalef"}, + {GDK_Arabic_hamzaonwaw, "Arabic_hamzaonwaw"}, + {GDK_Arabic_hamzaunderalef, "Arabic_hamzaunderalef"}, + {GDK_Arabic_hamzaonyeh, "Arabic_hamzaonyeh"}, + {GDK_Arabic_alef, "Arabic_alef"}, + {GDK_Arabic_beh, "Arabic_beh"}, + {GDK_Arabic_tehmarbuta, "Arabic_tehmarbuta"}, + {GDK_Arabic_teh, "Arabic_teh"}, + {GDK_Arabic_theh, "Arabic_theh"}, + {GDK_Arabic_jeem, "Arabic_jeem"}, + {GDK_Arabic_hah, "Arabic_hah"}, + {GDK_Arabic_khah, "Arabic_khah"}, + {GDK_Arabic_dal, "Arabic_dal"}, + {GDK_Arabic_thal, "Arabic_thal"}, + {GDK_Arabic_ra, "Arabic_ra"}, + {GDK_Arabic_zain, "Arabic_zain"}, + {GDK_Arabic_seen, "Arabic_seen"}, + {GDK_Arabic_sheen, "Arabic_sheen"}, + {GDK_Arabic_sad, "Arabic_sad"}, + {GDK_Arabic_dad, "Arabic_dad"}, + {GDK_Arabic_tah, "Arabic_tah"}, + {GDK_Arabic_zah, "Arabic_zah"}, + {GDK_Arabic_ain, "Arabic_ain"}, + {GDK_Arabic_ghain, "Arabic_ghain"}, + {GDK_Arabic_tatweel, "Arabic_tatweel"}, + {GDK_Arabic_feh, "Arabic_feh"}, + {GDK_Arabic_qaf, "Arabic_qaf"}, + {GDK_Arabic_kaf, "Arabic_kaf"}, + {GDK_Arabic_lam, "Arabic_lam"}, + {GDK_Arabic_meem, "Arabic_meem"}, + {GDK_Arabic_noon, "Arabic_noon"}, + {GDK_Arabic_ha, "Arabic_ha"}, + {GDK_Arabic_heh, "Arabic_heh"}, + {GDK_Arabic_waw, "Arabic_waw"}, + {GDK_Arabic_alefmaksura, "Arabic_alefmaksura"}, + {GDK_Arabic_yeh, "Arabic_yeh"}, + {GDK_Arabic_fathatan, "Arabic_fathatan"}, + {GDK_Arabic_dammatan, "Arabic_dammatan"}, + {GDK_Arabic_kasratan, "Arabic_kasratan"}, + {GDK_Arabic_fatha, "Arabic_fatha"}, + {GDK_Arabic_damma, "Arabic_damma"}, + {GDK_Arabic_kasra, "Arabic_kasra"}, + {GDK_Arabic_shadda, "Arabic_shadda"}, + {GDK_Arabic_sukun, "Arabic_sukun"}, + {GDK_Arabic_switch, "Arabic_switch"}, + {GDK_Serbian_dje, "Serbian_dje"}, + {GDK_Macedonia_gje, "Macedonia_gje"}, + {GDK_Cyrillic_io, "Cyrillic_io"}, + {GDK_Ukrainian_ie, "Ukrainian_ie"}, + {GDK_Ukranian_je, "Ukranian_je"}, + {GDK_Macedonia_dse, "Macedonia_dse"}, + {GDK_Ukrainian_i, "Ukrainian_i"}, + {GDK_Ukranian_i, "Ukranian_i"}, + {GDK_Ukrainian_yi, "Ukrainian_yi"}, + {GDK_Ukranian_yi, "Ukranian_yi"}, + {GDK_Cyrillic_je, "Cyrillic_je"}, + {GDK_Serbian_je, "Serbian_je"}, + {GDK_Cyrillic_lje, "Cyrillic_lje"}, + {GDK_Serbian_lje, "Serbian_lje"}, + {GDK_Cyrillic_nje, "Cyrillic_nje"}, + {GDK_Serbian_nje, "Serbian_nje"}, + {GDK_Serbian_tshe, "Serbian_tshe"}, + {GDK_Macedonia_kje, "Macedonia_kje"}, + {GDK_Byelorussian_shortu, "Byelorussian_shortu"}, + {GDK_Cyrillic_dzhe, "Cyrillic_dzhe"}, + {GDK_Serbian_dze, "Serbian_dze"}, + {GDK_numerosign, "numerosign"}, + {GDK_Serbian_DJE, "Serbian_DJE"}, + {GDK_Macedonia_GJE, "Macedonia_GJE"}, + {GDK_Cyrillic_IO, "Cyrillic_IO"}, + {GDK_Ukrainian_IE, "Ukrainian_IE"}, + {GDK_Ukranian_JE, "Ukranian_JE"}, + {GDK_Macedonia_DSE, "Macedonia_DSE"}, + {GDK_Ukrainian_I, "Ukrainian_I"}, + {GDK_Ukranian_I, "Ukranian_I"}, + {GDK_Ukrainian_YI, "Ukrainian_YI"}, + {GDK_Ukranian_YI, "Ukranian_YI"}, + {GDK_Cyrillic_JE, "Cyrillic_JE"}, + {GDK_Serbian_JE, "Serbian_JE"}, + {GDK_Cyrillic_LJE, "Cyrillic_LJE"}, + {GDK_Serbian_LJE, "Serbian_LJE"}, + {GDK_Cyrillic_NJE, "Cyrillic_NJE"}, + {GDK_Serbian_NJE, "Serbian_NJE"}, + {GDK_Serbian_TSHE, "Serbian_TSHE"}, + {GDK_Macedonia_KJE, "Macedonia_KJE"}, + {GDK_Byelorussian_SHORTU, "Byelorussian_SHORTU"}, + {GDK_Cyrillic_DZHE, "Cyrillic_DZHE"}, + {GDK_Serbian_DZE, "Serbian_DZE"}, + {GDK_Cyrillic_yu, "Cyrillic_yu"}, + {GDK_Cyrillic_a, "Cyrillic_a"}, + {GDK_Cyrillic_be, "Cyrillic_be"}, + {GDK_Cyrillic_tse, "Cyrillic_tse"}, + {GDK_Cyrillic_de, "Cyrillic_de"}, + {GDK_Cyrillic_ie, "Cyrillic_ie"}, + {GDK_Cyrillic_ef, "Cyrillic_ef"}, + {GDK_Cyrillic_ghe, "Cyrillic_ghe"}, + {GDK_Cyrillic_ha, "Cyrillic_ha"}, + {GDK_Cyrillic_i, "Cyrillic_i"}, + {GDK_Cyrillic_shorti, "Cyrillic_shorti"}, + {GDK_Cyrillic_ka, "Cyrillic_ka"}, + {GDK_Cyrillic_el, "Cyrillic_el"}, + {GDK_Cyrillic_em, "Cyrillic_em"}, + {GDK_Cyrillic_en, "Cyrillic_en"}, + {GDK_Cyrillic_o, "Cyrillic_o"}, + {GDK_Cyrillic_pe, "Cyrillic_pe"}, + {GDK_Cyrillic_ya, "Cyrillic_ya"}, + {GDK_Cyrillic_er, "Cyrillic_er"}, + {GDK_Cyrillic_es, "Cyrillic_es"}, + {GDK_Cyrillic_te, "Cyrillic_te"}, + {GDK_Cyrillic_u, "Cyrillic_u"}, + {GDK_Cyrillic_zhe, "Cyrillic_zhe"}, + {GDK_Cyrillic_ve, "Cyrillic_ve"}, + {GDK_Cyrillic_softsign, "Cyrillic_softsign"}, + {GDK_Cyrillic_yeru, "Cyrillic_yeru"}, + {GDK_Cyrillic_ze, "Cyrillic_ze"}, + {GDK_Cyrillic_sha, "Cyrillic_sha"}, + {GDK_Cyrillic_e, "Cyrillic_e"}, + {GDK_Cyrillic_shcha, "Cyrillic_shcha"}, + {GDK_Cyrillic_che, "Cyrillic_che"}, + {GDK_Cyrillic_hardsign, "Cyrillic_hardsign"}, + {GDK_Cyrillic_YU, "Cyrillic_YU"}, + {GDK_Cyrillic_A, "Cyrillic_A"}, + {GDK_Cyrillic_BE, "Cyrillic_BE"}, + {GDK_Cyrillic_TSE, "Cyrillic_TSE"}, + {GDK_Cyrillic_DE, "Cyrillic_DE"}, + {GDK_Cyrillic_IE, "Cyrillic_IE"}, + {GDK_Cyrillic_EF, "Cyrillic_EF"}, + {GDK_Cyrillic_GHE, "Cyrillic_GHE"}, + {GDK_Cyrillic_HA, "Cyrillic_HA"}, + {GDK_Cyrillic_I, "Cyrillic_I"}, + {GDK_Cyrillic_SHORTI, "Cyrillic_SHORTI"}, + {GDK_Cyrillic_KA, "Cyrillic_KA"}, + {GDK_Cyrillic_EL, "Cyrillic_EL"}, + {GDK_Cyrillic_EM, "Cyrillic_EM"}, + {GDK_Cyrillic_EN, "Cyrillic_EN"}, + {GDK_Cyrillic_O, "Cyrillic_O"}, + {GDK_Cyrillic_PE, "Cyrillic_PE"}, + {GDK_Cyrillic_YA, "Cyrillic_YA"}, + {GDK_Cyrillic_ER, "Cyrillic_ER"}, + {GDK_Cyrillic_ES, "Cyrillic_ES"}, + {GDK_Cyrillic_TE, "Cyrillic_TE"}, + {GDK_Cyrillic_U, "Cyrillic_U"}, + {GDK_Cyrillic_ZHE, "Cyrillic_ZHE"}, + {GDK_Cyrillic_VE, "Cyrillic_VE"}, + {GDK_Cyrillic_SOFTSIGN, "Cyrillic_SOFTSIGN"}, + {GDK_Cyrillic_YERU, "Cyrillic_YERU"}, + {GDK_Cyrillic_ZE, "Cyrillic_ZE"}, + {GDK_Cyrillic_SHA, "Cyrillic_SHA"}, + {GDK_Cyrillic_E, "Cyrillic_E"}, + {GDK_Cyrillic_SHCHA, "Cyrillic_SHCHA"}, + {GDK_Cyrillic_CHE, "Cyrillic_CHE"}, + {GDK_Cyrillic_HARDSIGN, "Cyrillic_HARDSIGN"}, + {GDK_Greek_ALPHAaccent, "Greek_ALPHAaccent"}, + {GDK_Greek_EPSILONaccent, "Greek_EPSILONaccent"}, + {GDK_Greek_ETAaccent, "Greek_ETAaccent"}, + {GDK_Greek_IOTAaccent, "Greek_IOTAaccent"}, + {GDK_Greek_IOTAdiaeresis, "Greek_IOTAdiaeresis"}, + {GDK_Greek_OMICRONaccent, "Greek_OMICRONaccent"}, + {GDK_Greek_UPSILONaccent, "Greek_UPSILONaccent"}, + {GDK_Greek_UPSILONdieresis, "Greek_UPSILONdieresis"}, + {GDK_Greek_OMEGAaccent, "Greek_OMEGAaccent"}, + {GDK_Greek_accentdieresis, "Greek_accentdieresis"}, + {GDK_Greek_horizbar, "Greek_horizbar"}, + {GDK_Greek_alphaaccent, "Greek_alphaaccent"}, + {GDK_Greek_epsilonaccent, "Greek_epsilonaccent"}, + {GDK_Greek_etaaccent, "Greek_etaaccent"}, + {GDK_Greek_iotaaccent, "Greek_iotaaccent"}, + {GDK_Greek_iotadieresis, "Greek_iotadieresis"}, + {GDK_Greek_iotaaccentdieresis, "Greek_iotaaccentdieresis"}, + {GDK_Greek_omicronaccent, "Greek_omicronaccent"}, + {GDK_Greek_upsilonaccent, "Greek_upsilonaccent"}, + {GDK_Greek_upsilondieresis, "Greek_upsilondieresis"}, + {GDK_Greek_upsilonaccentdieresis, "Greek_upsilonaccentdieresis"}, + {GDK_Greek_omegaaccent, "Greek_omegaaccent"}, + {GDK_Greek_ALPHA, "Greek_ALPHA"}, + {GDK_Greek_BETA, "Greek_BETA"}, + {GDK_Greek_GAMMA, "Greek_GAMMA"}, + {GDK_Greek_DELTA, "Greek_DELTA"}, + {GDK_Greek_EPSILON, "Greek_EPSILON"}, + {GDK_Greek_ZETA, "Greek_ZETA"}, + {GDK_Greek_ETA, "Greek_ETA"}, + {GDK_Greek_THETA, "Greek_THETA"}, + {GDK_Greek_IOTA, "Greek_IOTA"}, + {GDK_Greek_KAPPA, "Greek_KAPPA"}, + {GDK_Greek_LAMDA, "Greek_LAMDA"}, + {GDK_Greek_LAMBDA, "Greek_LAMBDA"}, + {GDK_Greek_MU, "Greek_MU"}, + {GDK_Greek_NU, "Greek_NU"}, + {GDK_Greek_XI, "Greek_XI"}, + {GDK_Greek_OMICRON, "Greek_OMICRON"}, + {GDK_Greek_PI, "Greek_PI"}, + {GDK_Greek_RHO, "Greek_RHO"}, + {GDK_Greek_SIGMA, "Greek_SIGMA"}, + {GDK_Greek_TAU, "Greek_TAU"}, + {GDK_Greek_UPSILON, "Greek_UPSILON"}, + {GDK_Greek_PHI, "Greek_PHI"}, + {GDK_Greek_CHI, "Greek_CHI"}, + {GDK_Greek_PSI, "Greek_PSI"}, + {GDK_Greek_OMEGA, "Greek_OMEGA"}, + {GDK_Greek_alpha, "Greek_alpha"}, + {GDK_Greek_beta, "Greek_beta"}, + {GDK_Greek_gamma, "Greek_gamma"}, + {GDK_Greek_delta, "Greek_delta"}, + {GDK_Greek_epsilon, "Greek_epsilon"}, + {GDK_Greek_zeta, "Greek_zeta"}, + {GDK_Greek_eta, "Greek_eta"}, + {GDK_Greek_theta, "Greek_theta"}, + {GDK_Greek_iota, "Greek_iota"}, + {GDK_Greek_kappa, "Greek_kappa"}, + {GDK_Greek_lamda, "Greek_lamda"}, + {GDK_Greek_lambda, "Greek_lambda"}, + {GDK_Greek_mu, "Greek_mu"}, + {GDK_Greek_nu, "Greek_nu"}, + {GDK_Greek_xi, "Greek_xi"}, + {GDK_Greek_omicron, "Greek_omicron"}, + {GDK_Greek_pi, "Greek_pi"}, + {GDK_Greek_rho, "Greek_rho"}, + {GDK_Greek_sigma, "Greek_sigma"}, + {GDK_Greek_finalsmallsigma, "Greek_finalsmallsigma"}, + {GDK_Greek_tau, "Greek_tau"}, + {GDK_Greek_upsilon, "Greek_upsilon"}, + {GDK_Greek_phi, "Greek_phi"}, + {GDK_Greek_chi, "Greek_chi"}, + {GDK_Greek_psi, "Greek_psi"}, + {GDK_Greek_omega, "Greek_omega"}, + {GDK_Greek_switch, "Greek_switch"}, + {GDK_leftradical, "leftradical"}, + {GDK_topleftradical, "topleftradical"}, + {GDK_horizconnector, "horizconnector"}, + {GDK_topintegral, "topintegral"}, + {GDK_botintegral, "botintegral"}, + {GDK_vertconnector, "vertconnector"}, + {GDK_topleftsqbracket, "topleftsqbracket"}, + {GDK_botleftsqbracket, "botleftsqbracket"}, + {GDK_toprightsqbracket, "toprightsqbracket"}, + {GDK_botrightsqbracket, "botrightsqbracket"}, + {GDK_topleftparens, "topleftparens"}, + {GDK_botleftparens, "botleftparens"}, + {GDK_toprightparens, "toprightparens"}, + {GDK_botrightparens, "botrightparens"}, + {GDK_leftmiddlecurlybrace, "leftmiddlecurlybrace"}, + {GDK_rightmiddlecurlybrace, "rightmiddlecurlybrace"}, + {GDK_topleftsummation, "topleftsummation"}, + {GDK_botleftsummation, "botleftsummation"}, + {GDK_topvertsummationconnector, "topvertsummationconnector"}, + {GDK_botvertsummationconnector, "botvertsummationconnector"}, + {GDK_toprightsummation, "toprightsummation"}, + {GDK_botrightsummation, "botrightsummation"}, + {GDK_rightmiddlesummation, "rightmiddlesummation"}, + {GDK_lessthanequal, "lessthanequal"}, + {GDK_notequal, "notequal"}, + {GDK_greaterthanequal, "greaterthanequal"}, + {GDK_integral, "integral"}, + {GDK_therefore, "therefore"}, + {GDK_variation, "variation"}, + {GDK_infinity, "infinity"}, + {GDK_nabla, "nabla"}, + {GDK_approximate, "approximate"}, + {GDK_similarequal, "similarequal"}, + {GDK_ifonlyif, "ifonlyif"}, + {GDK_implies, "implies"}, + {GDK_identical, "identical"}, + {GDK_radical, "radical"}, + {GDK_includedin, "includedin"}, + {GDK_includes, "includes"}, + {GDK_intersection, "intersection"}, + {GDK_union, "union"}, + {GDK_logicaland, "logicaland"}, + {GDK_logicalor, "logicalor"}, + {GDK_partialderivative, "partialderivative"}, + {GDK_function, "function"}, + {GDK_leftarrow, "leftarrow"}, + {GDK_uparrow, "uparrow"}, + {GDK_rightarrow, "rightarrow"}, + {GDK_downarrow, "downarrow"}, + {GDK_blank, "blank"}, + {GDK_soliddiamond, "soliddiamond"}, + {GDK_checkerboard, "checkerboard"}, + {GDK_ht, "ht"}, + {GDK_ff, "ff"}, + {GDK_cr, "cr"}, + {GDK_lf, "lf"}, + {GDK_nl, "nl"}, + {GDK_vt, "vt"}, + {GDK_lowrightcorner, "lowrightcorner"}, + {GDK_uprightcorner, "uprightcorner"}, + {GDK_upleftcorner, "upleftcorner"}, + {GDK_lowleftcorner, "lowleftcorner"}, + {GDK_crossinglines, "crossinglines"}, + {GDK_horizlinescan1, "horizlinescan1"}, + {GDK_horizlinescan3, "horizlinescan3"}, + {GDK_horizlinescan5, "horizlinescan5"}, + {GDK_horizlinescan7, "horizlinescan7"}, + {GDK_horizlinescan9, "horizlinescan9"}, + {GDK_leftt, "leftt"}, + {GDK_rightt, "rightt"}, + {GDK_bott, "bott"}, + {GDK_topt, "topt"}, + {GDK_vertbar, "vertbar"}, + {GDK_emspace, "emspace"}, + {GDK_enspace, "enspace"}, + {GDK_em3space, "em3space"}, + {GDK_em4space, "em4space"}, + {GDK_digitspace, "digitspace"}, + {GDK_punctspace, "punctspace"}, + {GDK_thinspace, "thinspace"}, + {GDK_hairspace, "hairspace"}, + {GDK_emdash, "emdash"}, + {GDK_endash, "endash"}, + {GDK_signifblank, "signifblank"}, + {GDK_ellipsis, "ellipsis"}, + {GDK_doubbaselinedot, "doubbaselinedot"}, + {GDK_onethird, "onethird"}, + {GDK_twothirds, "twothirds"}, + {GDK_onefifth, "onefifth"}, + {GDK_twofifths, "twofifths"}, + {GDK_threefifths, "threefifths"}, + {GDK_fourfifths, "fourfifths"}, + {GDK_onesixth, "onesixth"}, + {GDK_fivesixths, "fivesixths"}, + {GDK_careof, "careof"}, + {GDK_figdash, "figdash"}, + {GDK_leftanglebracket, "leftanglebracket"}, + {GDK_decimalpoint, "decimalpoint"}, + {GDK_rightanglebracket, "rightanglebracket"}, + {GDK_marker, "marker"}, + {GDK_oneeighth, "oneeighth"}, + {GDK_threeeighths, "threeeighths"}, + {GDK_fiveeighths, "fiveeighths"}, + {GDK_seveneighths, "seveneighths"}, + {GDK_trademark, "trademark"}, + {GDK_signaturemark, "signaturemark"}, + {GDK_trademarkincircle, "trademarkincircle"}, + {GDK_leftopentriangle, "leftopentriangle"}, + {GDK_rightopentriangle, "rightopentriangle"}, + {GDK_emopencircle, "emopencircle"}, + {GDK_emopenrectangle, "emopenrectangle"}, + {GDK_leftsinglequotemark, "leftsinglequotemark"}, + {GDK_rightsinglequotemark, "rightsinglequotemark"}, + {GDK_leftdoublequotemark, "leftdoublequotemark"}, + {GDK_rightdoublequotemark, "rightdoublequotemark"}, + {GDK_prescription, "prescription"}, + {GDK_minutes, "minutes"}, + {GDK_seconds, "seconds"}, + {GDK_latincross, "latincross"}, + {GDK_hexagram, "hexagram"}, + {GDK_filledrectbullet, "filledrectbullet"}, + {GDK_filledlefttribullet, "filledlefttribullet"}, + {GDK_filledrighttribullet, "filledrighttribullet"}, + {GDK_emfilledcircle, "emfilledcircle"}, + {GDK_emfilledrect, "emfilledrect"}, + {GDK_enopencircbullet, "enopencircbullet"}, + {GDK_enopensquarebullet, "enopensquarebullet"}, + {GDK_openrectbullet, "openrectbullet"}, + {GDK_opentribulletup, "opentribulletup"}, + {GDK_opentribulletdown, "opentribulletdown"}, + {GDK_openstar, "openstar"}, + {GDK_enfilledcircbullet, "enfilledcircbullet"}, + {GDK_enfilledsqbullet, "enfilledsqbullet"}, + {GDK_filledtribulletup, "filledtribulletup"}, + {GDK_filledtribulletdown, "filledtribulletdown"}, + {GDK_leftpointer, "leftpointer"}, + {GDK_rightpointer, "rightpointer"}, + {GDK_club, "club"}, + {GDK_diamond, "diamond"}, + {GDK_heart, "heart"}, + {GDK_maltesecross, "maltesecross"}, + {GDK_dagger, "dagger"}, + {GDK_doubledagger, "doubledagger"}, + {GDK_checkmark, "checkmark"}, + {GDK_ballotcross, "ballotcross"}, + {GDK_musicalsharp, "musicalsharp"}, + {GDK_musicalflat, "musicalflat"}, + {GDK_malesymbol, "malesymbol"}, + {GDK_femalesymbol, "femalesymbol"}, + {GDK_telephone, "telephone"}, + {GDK_telephonerecorder, "telephonerecorder"}, + {GDK_phonographcopyright, "phonographcopyright"}, + {GDK_caret, "caret"}, + {GDK_singlelowquotemark, "singlelowquotemark"}, + {GDK_doublelowquotemark, "doublelowquotemark"}, + {GDK_cursor, "cursor"}, + {GDK_leftcaret, "leftcaret"}, + {GDK_rightcaret, "rightcaret"}, + {GDK_downcaret, "downcaret"}, + {GDK_upcaret, "upcaret"}, + {GDK_overbar, "overbar"}, + {GDK_downtack, "downtack"}, + {GDK_upshoe, "upshoe"}, + {GDK_downstile, "downstile"}, + {GDK_underbar, "underbar"}, + {GDK_jot, "jot"}, + {GDK_quad, "quad"}, + {GDK_uptack, "uptack"}, + {GDK_circle, "circle"}, + {GDK_upstile, "upstile"}, + {GDK_downshoe, "downshoe"}, + {GDK_rightshoe, "rightshoe"}, + {GDK_leftshoe, "leftshoe"}, + {GDK_lefttack, "lefttack"}, + {GDK_righttack, "righttack"}, + {GDK_hebrew_doublelowline, "hebrew_doublelowline"}, + {GDK_hebrew_aleph, "hebrew_aleph"}, + {GDK_hebrew_bet, "hebrew_bet"}, + {GDK_hebrew_beth, "hebrew_beth"}, + {GDK_hebrew_gimel, "hebrew_gimel"}, + {GDK_hebrew_gimmel, "hebrew_gimmel"}, + {GDK_hebrew_dalet, "hebrew_dalet"}, + {GDK_hebrew_daleth, "hebrew_daleth"}, + {GDK_hebrew_he, "hebrew_he"}, + {GDK_hebrew_waw, "hebrew_waw"}, + {GDK_hebrew_zain, "hebrew_zain"}, + {GDK_hebrew_zayin, "hebrew_zayin"}, + {GDK_hebrew_chet, "hebrew_chet"}, + {GDK_hebrew_het, "hebrew_het"}, + {GDK_hebrew_tet, "hebrew_tet"}, + {GDK_hebrew_teth, "hebrew_teth"}, + {GDK_hebrew_yod, "hebrew_yod"}, + {GDK_hebrew_finalkaph, "hebrew_finalkaph"}, + {GDK_hebrew_kaph, "hebrew_kaph"}, + {GDK_hebrew_lamed, "hebrew_lamed"}, + {GDK_hebrew_finalmem, "hebrew_finalmem"}, + {GDK_hebrew_mem, "hebrew_mem"}, + {GDK_hebrew_finalnun, "hebrew_finalnun"}, + {GDK_hebrew_nun, "hebrew_nun"}, + {GDK_hebrew_samech, "hebrew_samech"}, + {GDK_hebrew_samekh, "hebrew_samekh"}, + {GDK_hebrew_ayin, "hebrew_ayin"}, + {GDK_hebrew_finalpe, "hebrew_finalpe"}, + {GDK_hebrew_pe, "hebrew_pe"}, + {GDK_hebrew_finalzade, "hebrew_finalzade"}, + {GDK_hebrew_finalzadi, "hebrew_finalzadi"}, + {GDK_hebrew_zade, "hebrew_zade"}, + {GDK_hebrew_zadi, "hebrew_zadi"}, + {GDK_hebrew_qoph, "hebrew_qoph"}, + {GDK_hebrew_kuf, "hebrew_kuf"}, + {GDK_hebrew_resh, "hebrew_resh"}, + {GDK_hebrew_shin, "hebrew_shin"}, + {GDK_hebrew_taw, "hebrew_taw"}, + {GDK_hebrew_taf, "hebrew_taf"}, + {GDK_Hebrew_switch, "Hebrew_switch"}, + {GDK_Thai_kokai, "Thai_kokai"}, + {GDK_Thai_khokhai, "Thai_khokhai"}, + {GDK_Thai_khokhuat, "Thai_khokhuat"}, + {GDK_Thai_khokhwai, "Thai_khokhwai"}, + {GDK_Thai_khokhon, "Thai_khokhon"}, + {GDK_Thai_khorakhang, "Thai_khorakhang"}, + {GDK_Thai_ngongu, "Thai_ngongu"}, + {GDK_Thai_chochan, "Thai_chochan"}, + {GDK_Thai_choching, "Thai_choching"}, + {GDK_Thai_chochang, "Thai_chochang"}, + {GDK_Thai_soso, "Thai_soso"}, + {GDK_Thai_chochoe, "Thai_chochoe"}, + {GDK_Thai_yoying, "Thai_yoying"}, + {GDK_Thai_dochada, "Thai_dochada"}, + {GDK_Thai_topatak, "Thai_topatak"}, + {GDK_Thai_thothan, "Thai_thothan"}, + {GDK_Thai_thonangmontho, "Thai_thonangmontho"}, + {GDK_Thai_thophuthao, "Thai_thophuthao"}, + {GDK_Thai_nonen, "Thai_nonen"}, + {GDK_Thai_dodek, "Thai_dodek"}, + {GDK_Thai_totao, "Thai_totao"}, + {GDK_Thai_thothung, "Thai_thothung"}, + {GDK_Thai_thothahan, "Thai_thothahan"}, + {GDK_Thai_thothong, "Thai_thothong"}, + {GDK_Thai_nonu, "Thai_nonu"}, + {GDK_Thai_bobaimai, "Thai_bobaimai"}, + {GDK_Thai_popla, "Thai_popla"}, + {GDK_Thai_phophung, "Thai_phophung"}, + {GDK_Thai_fofa, "Thai_fofa"}, + {GDK_Thai_phophan, "Thai_phophan"}, + {GDK_Thai_fofan, "Thai_fofan"}, + {GDK_Thai_phosamphao, "Thai_phosamphao"}, + {GDK_Thai_moma, "Thai_moma"}, + {GDK_Thai_yoyak, "Thai_yoyak"}, + {GDK_Thai_rorua, "Thai_rorua"}, + {GDK_Thai_ru, "Thai_ru"}, + {GDK_Thai_loling, "Thai_loling"}, + {GDK_Thai_lu, "Thai_lu"}, + {GDK_Thai_wowaen, "Thai_wowaen"}, + {GDK_Thai_sosala, "Thai_sosala"}, + {GDK_Thai_sorusi, "Thai_sorusi"}, + {GDK_Thai_sosua, "Thai_sosua"}, + {GDK_Thai_hohip, "Thai_hohip"}, + {GDK_Thai_lochula, "Thai_lochula"}, + {GDK_Thai_oang, "Thai_oang"}, + {GDK_Thai_honokhuk, "Thai_honokhuk"}, + {GDK_Thai_paiyannoi, "Thai_paiyannoi"}, + {GDK_Thai_saraa, "Thai_saraa"}, + {GDK_Thai_maihanakat, "Thai_maihanakat"}, + {GDK_Thai_saraaa, "Thai_saraaa"}, + {GDK_Thai_saraam, "Thai_saraam"}, + {GDK_Thai_sarai, "Thai_sarai"}, + {GDK_Thai_saraii, "Thai_saraii"}, + {GDK_Thai_saraue, "Thai_saraue"}, + {GDK_Thai_sarauee, "Thai_sarauee"}, + {GDK_Thai_sarau, "Thai_sarau"}, + {GDK_Thai_sarauu, "Thai_sarauu"}, + {GDK_Thai_phinthu, "Thai_phinthu"}, + {GDK_Thai_maihanakat_maitho, "Thai_maihanakat_maitho"}, + {GDK_Thai_baht, "Thai_baht"}, + {GDK_Thai_sarae, "Thai_sarae"}, + {GDK_Thai_saraae, "Thai_saraae"}, + {GDK_Thai_sarao, "Thai_sarao"}, + {GDK_Thai_saraaimaimuan, "Thai_saraaimaimuan"}, + {GDK_Thai_saraaimaimalai, "Thai_saraaimaimalai"}, + {GDK_Thai_lakkhangyao, "Thai_lakkhangyao"}, + {GDK_Thai_maiyamok, "Thai_maiyamok"}, + {GDK_Thai_maitaikhu, "Thai_maitaikhu"}, + {GDK_Thai_maiek, "Thai_maiek"}, + {GDK_Thai_maitho, "Thai_maitho"}, + {GDK_Thai_maitri, "Thai_maitri"}, + {GDK_Thai_maichattawa, "Thai_maichattawa"}, + {GDK_Thai_thanthakhat, "Thai_thanthakhat"}, + {GDK_Thai_nikhahit, "Thai_nikhahit"}, + {GDK_Thai_leksun, "Thai_leksun"}, + {GDK_Thai_leknung, "Thai_leknung"}, + {GDK_Thai_leksong, "Thai_leksong"}, + {GDK_Thai_leksam, "Thai_leksam"}, + {GDK_Thai_leksi, "Thai_leksi"}, + {GDK_Thai_lekha, "Thai_lekha"}, + {GDK_Thai_lekhok, "Thai_lekhok"}, + {GDK_Thai_lekchet, "Thai_lekchet"}, + {GDK_Thai_lekpaet, "Thai_lekpaet"}, + {GDK_Thai_lekkao, "Thai_lekkao"}, + {GDK_Hangul, "Hangul"}, + {GDK_Hangul_Start, "Hangul_Start"}, + {GDK_Hangul_End, "Hangul_End"}, + {GDK_Hangul_Hanja, "Hangul_Hanja"}, + {GDK_Hangul_Jamo, "Hangul_Jamo"}, + {GDK_Hangul_Romaja, "Hangul_Romaja"}, + {GDK_Hangul_Codeinput, "Hangul_Codeinput"}, + {GDK_Hangul_Jeonja, "Hangul_Jeonja"}, + {GDK_Hangul_Banja, "Hangul_Banja"}, + {GDK_Hangul_PreHanja, "Hangul_PreHanja"}, + {GDK_Hangul_PostHanja, "Hangul_PostHanja"}, + {GDK_Hangul_SingleCandidate, "Hangul_SingleCandidate"}, + {GDK_Hangul_MultipleCandidate, "Hangul_MultipleCandidate"}, + {GDK_Hangul_PreviousCandidate, "Hangul_PreviousCandidate"}, + {GDK_Hangul_Special, "Hangul_Special"}, + {GDK_Hangul_switch, "Hangul_switch"}, + {GDK_Hangul_Kiyeog, "Hangul_Kiyeog"}, + {GDK_Hangul_SsangKiyeog, "Hangul_SsangKiyeog"}, + {GDK_Hangul_KiyeogSios, "Hangul_KiyeogSios"}, + {GDK_Hangul_Nieun, "Hangul_Nieun"}, + {GDK_Hangul_NieunJieuj, "Hangul_NieunJieuj"}, + {GDK_Hangul_NieunHieuh, "Hangul_NieunHieuh"}, + {GDK_Hangul_Dikeud, "Hangul_Dikeud"}, + {GDK_Hangul_SsangDikeud, "Hangul_SsangDikeud"}, + {GDK_Hangul_Rieul, "Hangul_Rieul"}, + {GDK_Hangul_RieulKiyeog, "Hangul_RieulKiyeog"}, + {GDK_Hangul_RieulMieum, "Hangul_RieulMieum"}, + {GDK_Hangul_RieulPieub, "Hangul_RieulPieub"}, + {GDK_Hangul_RieulSios, "Hangul_RieulSios"}, + {GDK_Hangul_RieulTieut, "Hangul_RieulTieut"}, + {GDK_Hangul_RieulPhieuf, "Hangul_RieulPhieuf"}, + {GDK_Hangul_RieulHieuh, "Hangul_RieulHieuh"}, + {GDK_Hangul_Mieum, "Hangul_Mieum"}, + {GDK_Hangul_Pieub, "Hangul_Pieub"}, + {GDK_Hangul_SsangPieub, "Hangul_SsangPieub"}, + {GDK_Hangul_PieubSios, "Hangul_PieubSios"}, + {GDK_Hangul_Sios, "Hangul_Sios"}, + {GDK_Hangul_SsangSios, "Hangul_SsangSios"}, + {GDK_Hangul_Ieung, "Hangul_Ieung"}, + {GDK_Hangul_Jieuj, "Hangul_Jieuj"}, + {GDK_Hangul_SsangJieuj, "Hangul_SsangJieuj"}, + {GDK_Hangul_Cieuc, "Hangul_Cieuc"}, + {GDK_Hangul_Khieuq, "Hangul_Khieuq"}, + {GDK_Hangul_Tieut, "Hangul_Tieut"}, + {GDK_Hangul_Phieuf, "Hangul_Phieuf"}, + {GDK_Hangul_Hieuh, "Hangul_Hieuh"}, + {GDK_Hangul_A, "Hangul_A"}, + {GDK_Hangul_AE, "Hangul_AE"}, + {GDK_Hangul_YA, "Hangul_YA"}, + {GDK_Hangul_YAE, "Hangul_YAE"}, + {GDK_Hangul_EO, "Hangul_EO"}, + {GDK_Hangul_E, "Hangul_E"}, + {GDK_Hangul_YEO, "Hangul_YEO"}, + {GDK_Hangul_YE, "Hangul_YE"}, + {GDK_Hangul_O, "Hangul_O"}, + {GDK_Hangul_WA, "Hangul_WA"}, + {GDK_Hangul_WAE, "Hangul_WAE"}, + {GDK_Hangul_OE, "Hangul_OE"}, + {GDK_Hangul_YO, "Hangul_YO"}, + {GDK_Hangul_U, "Hangul_U"}, + {GDK_Hangul_WEO, "Hangul_WEO"}, + {GDK_Hangul_WE, "Hangul_WE"}, + {GDK_Hangul_WI, "Hangul_WI"}, + {GDK_Hangul_YU, "Hangul_YU"}, + {GDK_Hangul_EU, "Hangul_EU"}, + {GDK_Hangul_YI, "Hangul_YI"}, + {GDK_Hangul_I, "Hangul_I"}, + {GDK_Hangul_J_Kiyeog, "Hangul_J_Kiyeog"}, + {GDK_Hangul_J_SsangKiyeog, "Hangul_J_SsangKiyeog"}, + {GDK_Hangul_J_KiyeogSios, "Hangul_J_KiyeogSios"}, + {GDK_Hangul_J_Nieun, "Hangul_J_Nieun"}, + {GDK_Hangul_J_NieunJieuj, "Hangul_J_NieunJieuj"}, + {GDK_Hangul_J_NieunHieuh, "Hangul_J_NieunHieuh"}, + {GDK_Hangul_J_Dikeud, "Hangul_J_Dikeud"}, + {GDK_Hangul_J_Rieul, "Hangul_J_Rieul"}, + {GDK_Hangul_J_RieulKiyeog, "Hangul_J_RieulKiyeog"}, + {GDK_Hangul_J_RieulMieum, "Hangul_J_RieulMieum"}, + {GDK_Hangul_J_RieulPieub, "Hangul_J_RieulPieub"}, + {GDK_Hangul_J_RieulSios, "Hangul_J_RieulSios"}, + {GDK_Hangul_J_RieulTieut, "Hangul_J_RieulTieut"}, + {GDK_Hangul_J_RieulPhieuf, "Hangul_J_RieulPhieuf"}, + {GDK_Hangul_J_RieulHieuh, "Hangul_J_RieulHieuh"}, + {GDK_Hangul_J_Mieum, "Hangul_J_Mieum"}, + {GDK_Hangul_J_Pieub, "Hangul_J_Pieub"}, + {GDK_Hangul_J_PieubSios, "Hangul_J_PieubSios"}, + {GDK_Hangul_J_Sios, "Hangul_J_Sios"}, + {GDK_Hangul_J_SsangSios, "Hangul_J_SsangSios"}, + {GDK_Hangul_J_Ieung, "Hangul_J_Ieung"}, + {GDK_Hangul_J_Jieuj, "Hangul_J_Jieuj"}, + {GDK_Hangul_J_Cieuc, "Hangul_J_Cieuc"}, + {GDK_Hangul_J_Khieuq, "Hangul_J_Khieuq"}, + {GDK_Hangul_J_Tieut, "Hangul_J_Tieut"}, + {GDK_Hangul_J_Phieuf, "Hangul_J_Phieuf"}, + {GDK_Hangul_J_Hieuh, "Hangul_J_Hieuh"}, + {GDK_Hangul_RieulYeorinHieuh, "Hangul_RieulYeorinHieuh"}, + {GDK_Hangul_SunkyeongeumMieum, "Hangul_SunkyeongeumMieum"}, + {GDK_Hangul_SunkyeongeumPieub, "Hangul_SunkyeongeumPieub"}, + {GDK_Hangul_PanSios, "Hangul_PanSios"}, + {GDK_Hangul_KkogjiDalrinIeung, "Hangul_KkogjiDalrinIeung"}, + {GDK_Hangul_SunkyeongeumPhieuf, "Hangul_SunkyeongeumPhieuf"}, + {GDK_Hangul_YeorinHieuh, "Hangul_YeorinHieuh"}, + {GDK_Hangul_AraeA, "Hangul_AraeA"}, + {GDK_Hangul_AraeAE, "Hangul_AraeAE"}, + {GDK_Hangul_J_PanSios, "Hangul_J_PanSios"}, + {GDK_Hangul_J_KkogjiDalrinIeung, "Hangul_J_KkogjiDalrinIeung"}, + {GDK_Hangul_J_YeorinHieuh, "Hangul_J_YeorinHieuh"}, + {GDK_Korean_Won, "Korean_Won"}, + {0, NULL} +}; diff --git a/src/misc.c b/src/misc.c new file mode 100644 index 0000000..306248d --- /dev/null +++ b/src/misc.c @@ -0,0 +1,190 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include + +#include "misc.h" + +/* a left aligned label */ +GtkWidget *leftlabel_new (char *str) +{ + GtkWidget *label, *align; + label = gtk_label_new (str); + gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_LEFT); + gtk_label_set_line_wrap (GTK_LABEL(label), TRUE); + gtk_widget_show (label); + align = gtk_alignment_new (0.0, 0.5, 0.0, 0.0); + gtk_container_add (GTK_CONTAINER(align), label); + return align; +} + +void leftlabel_set (GtkWidget *align, char *str) +{ + gtk_label_set (GTK_LABEL(GTK_BIN(align)->child), str); +} + +/* returns a random number in the range 0 to n-1 */ +int randomnum (int n) +{ + return (float)n*random()/(RAND_MAX+1.0); +} + +void fdreadline (int fd, char *buf) +{ + int c = 0; + /* read a single line - no overflow check */ + while (1) { + if (read (fd, &buf[c], 1) == 0) break; + if (buf[c] == '\n') break; + c ++; + } + buf[c] = 0; +} + +#define COLORNUM 26 + +static GdkColor colors[] = +{ + {0, 0, 0, 0}, /* ^A */ + {0, 0, 0, 0}, /* ^B */ + {0, 0x0000, 0xFFFF, 0xFFFF}, /* ^C cyan */ + {0, 0x0000, 0x0000, 0x0000}, /* ^D black */ + {0, 0x0000, 0x0000, 0xFFFF}, /* ^E bright blue */ + {0, 0x7FFF, 0x7FFF, 0x7FFF}, /* ^F grey */ + {0, 0, 0, 0}, /* ^G */ + {0, 0xFFFF, 0x0000, 0xFFFF}, /* ^H magenta */ + {0, 0, 0, 0}, /* ^I */ + {0, 0, 0, 0}, /* ^J */ + {0, 0x7FFF, 0x7FFF, 0x7FFF}, /* ^K grey */ + {0, 0x0000, 0x7FFF, 0x0000}, /* ^L dark green */ + {0, 0, 0, 0}, /* ^M */ + {0, 0x0000, 0xFFFF, 0x0000}, /* ^N bright green */ + {0, 0xBFFF, 0xBFFF, 0xBFFF}, /* ^O light grey */ + {0, 0x7FFF, 0x0000, 0x0000}, /* ^P dark red */ + {0, 0x0000, 0x0000, 0x7FFF}, /* ^Q dark blue */ + {0, 0x7FFF, 0x7FFF, 0x0000}, /* ^R brown */ + {0, 0x7FFF, 0x0000, 0x7FFF}, /* ^S purple */ + {0, 0xFFFF, 0x0000, 0x0000}, /* ^T bright red */ + {0, 0xBFFF, 0xBFFF, 0xBFFF}, /* ^U light grey */ + {0, 0, 0, 0}, /* ^V */ + {0, 0x0000, 0x7FFF, 0x7FFF}, /* ^W dark cyan */ + {0, 0xFFFF, 0xFFFF, 0xFFFF}, /* ^X white */ + {0, 0xFFFF, 0xFFFF, 0x0000}, /* ^Y yellow */ + {0, 0, 0, 0} /* ^Z */ +}; + +static GdkFont *fonts[4]; + +void textbox_setup (void) +{ + int n; + GdkColormap *colormap = gdk_colormap_get_system (); + for (n = 0; n < COLORNUM; n ++) + gdk_color_alloc (colormap, &colors[n]); + /* hard coded fonts ?!?!?!? */ + /* normal */ + fonts[0] = gdk_fontset_load("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*--12-*"); + /* bold */ + fonts[1] = gdk_fontset_load("-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*,*--12-*"); + /* italic */ + fonts[2] = gdk_fontset_load("-adobe-helvetica-medium-o-normal--*-120-*-*-*-*-*-*,*--12-*"); + /* bold italic */ + fonts[3] = gdk_fontset_load("-adobe-helvetica-bold-o-normal--*-120-*-*-*-*-*-*,*--12-*"); +} + +void textbox_addtext (GtkText *textbox, char *text) +{ + GdkColor *color, *lastcolor; + int attr; /* bits are used as flags: bold, italic */ + int i, bottom; + char last; + GtkAdjustment *textboxadj = GTK_TEXT(textbox)->vadj; + + /* is the scroll bar at the bottom ?? */ + if ((textboxadj->value+10)>(textboxadj->upper-textboxadj->lower-textboxadj->page_size)) + bottom = TRUE; + else bottom = FALSE; + + lastcolor = color = >K_WIDGET(textbox)->style->black; + last = 0; attr = 0; + gtk_text_freeze (textbox); + + if (gtk_text_get_length (textbox)) /* not first line */ + gtk_text_insert (textbox, fonts[attr], color, NULL, "\n", 1); + for (i = 0; text[i]; i ++) { + if (text[i] < 32) { + switch (text[i]) { + case 0x02: attr = attr ^ 0x01; break; /* bold */ + case 0x16: attr = attr ^ 0x02; break; /* italics */ + case 0x1F: break; /* underline not available */ + case -1: /* reset */ + lastcolor = color = >K_WIDGET(textbox)->style->black; + last = 0; attr = 0; + break; + default: /* it is a color... */ + if (text[i] > 0x1A) goto next; /* bounds checking */ + if (text[i] == last) { + /* restore previous color */ + color = lastcolor; + last = 0; + goto next; + } + /* save color */ + lastcolor = color; + last = text[i]; + /* get new color */ + color = &colors[text[i]-0x01]; + } + } + else gtk_text_insert (textbox, fonts[attr], color, NULL, &text[i], 1); + next: + } + /* scroll to bottom */ + gtk_text_thaw (textbox); + if (bottom) adjust_bottom (textboxadj); +} + +void adjust_bottom (GtkAdjustment *adj) +{ + gtk_adjustment_set_value (adj, adj->upper - adj->lower - adj->page_size); +} + +char *nocolor (char *str) +{ + static char buf[1024], *p; + for (p = buf; *str; str ++) { + if (*str > 0x1F) *p++ = *str; + } + *p = 0; + return buf; +} + +GtkWidget *pixmap_label (GdkPixmap *pm, GdkBitmap *mask, char *str) +{ + GtkWidget *box, *widget; + box = gtk_hbox_new (FALSE, 0); + widget = gtk_pixmap_new (pm, mask); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, TRUE, TRUE, 0); + widget = gtk_label_new (str); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, TRUE, TRUE, 0); + return box; +} diff --git a/src/misc.h b/src/misc.h new file mode 100644 index 0000000..0650d60 --- /dev/null +++ b/src/misc.h @@ -0,0 +1,10 @@ +#include +extern GtkWidget *leftlabel_new (char *str); +extern void leftlabel_set (GtkWidget *align, char *str); +extern int randomnum (int n); +extern void fdreadline (int fd, char *buf); +extern void textbox_setup (void); +extern void textbox_addtext (GtkText *textbox, char *text); +extern void adjust_bottom (GtkAdjustment *adj); +extern char *nocolor (char *str); +extern GtkWidget *pixmap_label (GdkPixmap *pm, GdkBitmap *mask, char *str); diff --git a/src/partyline.c b/src/partyline.c new file mode 100644 index 0000000..839d568 --- /dev/null +++ b/src/partyline.c @@ -0,0 +1,252 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include + +#include "client.h" +#include "tetrinet.h" +#include "partyline.h" +#include "misc.h" +#include "commands.h" + +/* for the player list */ +static char *listtitles[] = { + N_("Name"), + N_("Team") +}; + +/* widgets that we have to do stuff with */ +static GtkWidget *playerlist, *textbox, *entrybox, + *namelabel, *teamlabel, *infolabel; + +/* some more widgets for layout */ +static GtkWidget *table, *leftbox, *rightbox; + +/* stuff for pline history */ +#define PLHSIZE 64 +char plhistory[PLHSIZE][256]; +int plh_start = 0, plh_end = 0, plh_cur = 0; + +/* function prototypes for callbacks */ +static void textentry (GtkWidget *widget, gpointer data); +static gint entrykey (GtkWidget *widget, GdkEventKey *key); + +GtkWidget *partyline_page_new (void) +{ + GtkWidget *widget, *box; /* generic temp variables */ + + /* left box */ + leftbox = gtk_vbox_new (FALSE, 4); + /* chat thingy */ + /* textbox with scrollbars */ + box = gtk_hbox_new (FALSE, 0); + textbox = gtk_text_new (NULL, NULL); + gtk_text_set_word_wrap (GTK_TEXT(textbox), TRUE); + GTK_WIDGET_UNSET_FLAGS(textbox, GTK_CAN_FOCUS); + gtk_signal_connect (GTK_OBJECT(textbox), "button_press_event", + GTK_SIGNAL_FUNC(partyline_entryfocus), NULL); + gtk_widget_show (textbox); + gtk_box_pack_start (GTK_BOX(box), textbox, TRUE, TRUE, 0); + widget = gtk_vscrollbar_new (GTK_TEXT(textbox)->vadj); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0); + gtk_widget_show (box); + gtk_box_pack_start (GTK_BOX(leftbox), box, TRUE, TRUE, 0); + /* entry box */ + entrybox = gtk_entry_new_with_max_length (200); + gtk_signal_connect (GTK_OBJECT(entrybox), "activate", + GTK_SIGNAL_FUNC(textentry), NULL); + gtk_signal_connect (GTK_OBJECT(entrybox), "key_press_event", + GTK_SIGNAL_FUNC(entrykey), NULL); + gtk_widget_show (entrybox); + gtk_box_pack_start (GTK_BOX(leftbox), entrybox, FALSE, FALSE, 0); + gtk_widget_show (leftbox); + + /* player list */ + playerlist = gtk_clist_new_with_titles (2, listtitles); + gtk_clist_set_column_width (GTK_CLIST(playerlist), 0, 60); + gtk_clist_column_titles_passive (GTK_CLIST(playerlist)); + gtk_widget_set_usize (playerlist, 130, 200); + gtk_widget_show (playerlist); + + /* right box */ + box = gtk_vbox_new (FALSE, 2); + + widget = leftlabel_new (_("Your name:")); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0); + namelabel = gtk_label_new (""); + gtk_widget_show (namelabel); + gtk_box_pack_start (GTK_BOX(box), namelabel, FALSE, FALSE, 0); + widget = gtk_vseparator_new (); /* invisible... just needed some space */ + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 2); + widget = leftlabel_new (_("Your team:")); + gtk_widget_show (widget); + gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0); + teamlabel = gtk_label_new (""); + gtk_widget_show (teamlabel); + gtk_box_pack_start (GTK_BOX(box), teamlabel, FALSE, FALSE, 0); + infolabel = gtk_label_new (""); + gtk_label_set_line_wrap (GTK_LABEL(teamlabel), TRUE); + gtk_widget_show (infolabel); + gtk_box_pack_start (GTK_BOX(box), infolabel, TRUE, FALSE, 0); + + gtk_container_border_width (GTK_CONTAINER(box), 4); + gtk_widget_show (box); + rightbox = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME(rightbox), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER(rightbox), box); + gtk_widget_show (rightbox); + + /* stuff all the boxes into the table */ + table = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE(table), 4); + gtk_table_set_col_spacings (GTK_TABLE(table), 4); + gtk_container_border_width (GTK_CONTAINER(table), 4); + gtk_table_attach (GTK_TABLE(table), leftbox, 0, 1, 0, 2, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, + 0, 0); + gtk_table_attach (GTK_TABLE(table), playerlist, 1, 2, 0, 1, + GTK_FILL, GTK_FILL | GTK_EXPAND, 0, 0); + gtk_table_attach (GTK_TABLE(table), rightbox, 1, 2, 1, 2, + GTK_FILL, GTK_FILL | GTK_EXPAND, 0, 0); + + /* set a few things */ + partyline_connectstatus (FALSE); + plhistory[0][0] = 0; + + /* show after we return */ + return table; +} + +void partyline_connectstatus (int status) +{ + if (status) { + gtk_widget_set_sensitive (entrybox, TRUE); + } + else { + gtk_widget_set_sensitive (entrybox, FALSE); + } +} + +void partyline_namelabel (char *nick, char *team) +{ + if (nick) gtk_label_set (GTK_LABEL(namelabel), nocolor(nick)); + else gtk_label_set (GTK_LABEL(namelabel), ""); + if (team) gtk_label_set (GTK_LABEL(teamlabel), nocolor(team)); + else gtk_label_set (GTK_LABEL(teamlabel), ""); +} + +void partyline_status (char *status) +{ + gtk_label_set (GTK_LABEL(infolabel), status); +} + +void partyline_text (char *text) +{ + textbox_addtext (GTK_TEXT(textbox), text); +} + +void partyline_playerlist (char **names, char **teams, int n, char **specs, int sn) +{ + int i; + char buf1[128], buf2[128], *item[2] = {buf1, buf2}; + /* update the playerlist so that it contains only the given names */ + gtk_clist_freeze (GTK_CLIST(playerlist)); + gtk_clist_clear (GTK_CLIST(playerlist)); + for (i = 0; i < n; i ++) { + strcpy (item[0], nocolor(names[i])); + strcpy (item[1], nocolor(teams[i])); + gtk_clist_append (GTK_CLIST(playerlist), item); + } + buf1[0] = buf2[0] = 0; + gtk_clist_append (GTK_CLIST(playerlist), item); + for (i = 0; i < sn; i ++) { + strcpy (item[0], nocolor(specs[i])); + strcpy (item[1], "Spec"); + gtk_clist_append (GTK_CLIST(playerlist), item); + } + gtk_clist_thaw (GTK_CLIST(playerlist)); +} + +void partyline_entryfocus (void) +{ + if (connected) gtk_widget_grab_focus (entrybox); +} + +void textentry (GtkWidget *widget, gpointer data) +{ + char *text; + text = gtk_entry_get_text (GTK_ENTRY(widget)); + + if (strlen(text) == 0) return; + + tetrinet_playerline (text); + strcpy (plhistory[plh_end], text); + gtk_entry_set_text (GTK_ENTRY(widget), ""); + + plh_end ++; + if (plh_end == PLHSIZE) plh_end = 0; + if (plh_end == plh_start) plh_start ++; + if (plh_start == PLHSIZE) plh_start = 0; + plh_cur = plh_end; + plhistory[plh_cur][0] = 0; +} + +static gint entrykey (GtkWidget *widget, GdkEventKey *key) +{ + int keyval = key->keyval; + + if (keyval == GDK_Up || keyval == GDK_Down) { + if (plh_cur == plh_end) { + char *text; + text = gtk_entry_get_text (GTK_ENTRY(widget)); + strcpy (plhistory[plh_end], text); + } + switch (keyval) { + case GDK_Up: + if (plh_cur == plh_start) break; + plh_cur --; + if (plh_cur == -1) plh_cur = PLHSIZE - 1; + break; + case GDK_Down: + if (plh_cur == plh_end) break; + plh_cur ++; + if (plh_cur == PLHSIZE) plh_cur = 0; + break; + } + gtk_entry_set_text (GTK_ENTRY(widget), plhistory[plh_cur]); +#ifdef DEBUG + printf ("history: %d %d %d %s\n", plh_start, plh_end, plh_cur, + plhistory[plh_cur]); +#endif + gtk_signal_emit_stop_by_name (GTK_OBJECT(widget), "key_press_event"); + return TRUE; + } + else if (keyval == GDK_Left || keyval == GDK_Right) { + return FALSE; + } + else { + plh_cur = plh_end; + return FALSE; + } +} diff --git a/src/partyline.h b/src/partyline.h new file mode 100644 index 0000000..d6d1b6e --- /dev/null +++ b/src/partyline.h @@ -0,0 +1,8 @@ +#include +extern GtkWidget *partyline_page_new (void); +extern void partyline_connectstatus (int status); +extern void partyline_namelabel (char *nick, char *team); +extern void partyline_status (char *status); +extern void partyline_text (char *text); +extern void partyline_playerlist (char **names, char **teams, int n, char **specs, int sn); +extern void partyline_entryfocus (void); diff --git a/src/sound.c b/src/sound.c new file mode 100644 index 0000000..75193b0 --- /dev/null +++ b/src/sound.c @@ -0,0 +1,103 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include +#include +#include "sound.h" + +extern char **environ; + +int soundenable, midienable; + +char soundfiles[S_NUM][1024]; +char midifile[1024]; +char midicmd[1024]; + +#ifdef HAVE_ESD + +#include + +static int soundsamples[S_NUM]; +static int midipid = 0; + +void sound_cache (void) +{ + int i; + if (!soundenable) return; + for (i = 0; i < S_NUM; i ++) { + if (soundsamples[i]) + esd_sample_free (gnome_sound_connection, soundsamples[i]); + if (soundfiles[i][0]) + soundsamples[i] = gnome_sound_sample_load (soundfiles[i], soundfiles[i]); + else + soundsamples[i] = 0; + } +} + +void sound_playsound (int id) +{ + if (!soundenable) return; + if (soundsamples[id]) + esd_sample_play (gnome_sound_connection, soundsamples[id]); +} + +void sound_playmidi (char *file) +{ +#ifdef HAVE_PUTENV + char sz[1024]; +#endif + + sound_stopmidi(); + if (!midienable) return; + if (file[0] == 0) return; + if ((midipid = fork()) == 0) { + setsid (); +#ifdef HAVE_SETENV + setenv ("MIDIFILE", file, TRUE); +#elif HAVE_PUTENV + sprintf(sz, "MIDIFILE=%s", file); + putenv(sz); +#else +#error Need either setenv() or putenv() +#endif + execl ("/bin/sh", "sh", "-c", midicmd, NULL); + _exit(0); + } +} + +void sound_stopmidi (void) +{ + if (midipid) { + kill (-midipid, SIGTERM); + waitpid (-midipid, NULL, 0); + midipid = 0; + } +} + +#else + +/* stubs */ +void sound_cache (void) {} +void sound_playsound (int id) {} +void sound_playmidi (char *file) {} +void sound_stopmidi (void) {} + +#endif diff --git a/src/sound.h b/src/sound.h new file mode 100644 index 0000000..e4ca150 --- /dev/null +++ b/src/sound.h @@ -0,0 +1,25 @@ +#define S_NUM 10 + +#define S_DROP 0 +#define S_SOLIDIFY 1 +#define S_LINECLEAR 2 +#define S_TETRIS 3 +#define S_ROTATE 4 +#define S_SPECIALLINE 5 +#define S_YOUWIN 6 +#define S_YOULOSE 7 +#define S_MESSAGE 8 +#define S_GAMESTART 9 + +#define DEFAULTMIDICMD "while true; do playmidi $MIDIFILE; done" + +extern int soundenable, midienable; + +extern char soundfiles[S_NUM][1024]; +extern char midifile[1024]; +extern char midicmd[1024]; + +void sound_cache (void); +void sound_playsound (int id); +void sound_playmidi (char *file); +void sound_stopmidi (void); diff --git a/src/tetrinet.c b/src/tetrinet.c new file mode 100644 index 0000000..e88e46a --- /dev/null +++ b/src/tetrinet.c @@ -0,0 +1,1680 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +#include "gtetrinet.h" +#include "config.h" +#include "client.h" +#include "tetrinet.h" +#include "tetris.h" +#include "fields.h" +#include "partyline.h" +#include "winlist.h" +#include "misc.h" +#include "commands.h" +#include "dialogs.h" +#include "sound.h" + +#define NEXTBLOCKDELAY 1000 +#define DOWNDELAY 100 +#define PARTYLINEDELAY1 100 +#define PARTYLINEDELAY2 200 + +/* all the game state variables goes here */ +int playernum = 0; +int moderatornum = 0; +char team[128], nick[128], specpassword[128]; + +char playernames[7][128]; +char teamnames[7][128]; +int playerlevels[7]; +int playerplaying[7]; +int playercount = 0; + +char spectatorlist[128][128]; +int spectatorcount = 0; + +char specialblocks[256]; +int specialblocknum = 0; + +FIELD fields[7]; + +int moderator; /* are we the moderator ? TRUE : FALSE */ +int spectating; /* are we spectating ? TRUE : FALSE */ +int tetrix; /* are we connected to a tetrix server ? TRUE : FALSE */ + +int linecount, level; +int slines, llines; /* lines still to be used for incrementing level, etc */ +int ingame, playing, paused; +int gmsgstate; +int bigfieldnum; + +/* game options from the server */ +int initialstackheight, initiallevel, linesperlevel, levelinc, + speciallines, specialcount, specialcapacity, levelaverage, classicmode; + +/* these are actually cumulative frequency counts */ +int blockfreq[7]; +int specialfreq[9]; + +static char blocks[] = "012345acnrsbgqo"; + +struct sb { + char *id; + int block; + char *info; +}; + +#define S_ADDALL1 0 +#define S_ADDALL2 1 +#define S_ADDALL4 2 +#define S_ADDLINE 3 +#define S_CLEARLINE 4 +#define S_NUKEFIELD 5 +#define S_CLEARBLOCKS 6 +#define S_SWITCH 7 +#define S_CLEARSPECIAL 8 +#define S_GRAVITY 9 +#define S_BLOCKQUAKE 10 +#define S_BLOCKBOMB 11 + +struct sb sbinfo[] = { + {"cs1", -1, "1 Line Added to All"}, + {"cs2", -1, "2 Lines Added to All"}, + {"cs4", -1, "4 Lines Added to All"}, + {"a", 6, "Add Line"}, + {"c", 7, "Clear Line"}, + {"n", 8, "Nuke Field"}, + {"r", 9, "Clear Random Blocks"}, + {"s", 10, "Switch Fields"}, + {"b", 11, "Clear Special Blocks"}, + {"g", 12, "Block Gravity"}, + {"q", 13, "Blockquake"}, + {"o", 14, "Block Bomb"}, + {0, 0, 0} +}; + +static void tetrinet_updatelevels (void); +static void tetrinet_setspeciallabel (char sb); +static void tetrinet_dospecial (int from, int to, int type); +static void tetrinet_specialkey (int pnum); +static void tetrinet_shiftline (int l, int d, FIELD field); +static void moderatorupdate (int now); +static void partylineupdate (int now); +static void partylineupdate_join (char *name); +static void partylineupdate_team (char *name, char *team); +static void partylineupdate_leave (char *name); +static void playerlistupdate (void); +static void fieldslabelupdate (void); +static void plinemsg (char *name, char *text); +static void plineact (char *name, char *text); +static void plinesmsg (char *name, char *text); +static void plinesact (char *name, char *text); +static char translateblock (char c); +static void clearallfields (void); +static void checkmoderatorstatus (void); +static void speclist_clear (void); +static void speclist_add (char *name); +static void speclist_remove (char *name); + +static FIELD sentfield; /* the field that the server thinks we have */ + +/* + this function processes incoming messages + */ +void tetrinet_inmessage (enum inmsg_type msgtype, char *data) +{ + char buf[1024]; + if (msgtype != IN_PLAYERJOIN && msgtype != IN_PLAYERLEAVE && msgtype != IN_TEAM && + msgtype != IN_PLAYERNUM && msgtype != IN_CONNECT && msgtype != IN_F && msgtype != IN_WINLIST) { + partylineupdate (1); + moderatorupdate (1); + } +#ifdef DEBUG + printf ("%d %s\n", msgtype, data); +#endif + /* process the message */ + switch (msgtype) { + case IN_CONNECT: + /* do nothing - setup is done with the playernum message */ + break; + case IN_DISCONNECT: + if (!connected) { + data = "Server disconnected"; + goto connecterror; + } + if (ingame) tetrinet_endgame (); + connected = ingame = playing = paused = moderator = tetrix = FALSE; + commands_checkstate (); + partyline_playerlist (NULL, NULL, 0, NULL, 0); + partyline_namelabel (NULL, NULL); + playernum = moderatornum = playercount = spectatorcount = 0; + { + /* clear player and team lists */ + int i; + for (i = 0; i <= 6; i ++) + playernames[i][0] = teamnames[i][0] = 0; + fieldslabelupdate (); + } + winlist_clear (); + partyline_text ("\014\02*** Disconnected from server"); + break; + case IN_CONNECTERROR: + connecterror: + { + GtkWidget *dialog; + connectingdialog_destroy (); + strcpy (buf, _("Error connecting: ")); + strcat (buf, data); + dialog = gnome_message_box_new (buf, GNOME_MESSAGE_BOX_ERROR, + GNOME_STOCK_BUTTON_OK, NULL); + gtk_widget_show (dialog); + } + break; + case IN_PLAYERNUM: + bigfieldnum = playernum = atoi (data); + if (!connected) + { + /* we have successfully connected */ + if (spectating) { + sprintf (buf, "%d %s", playernum, specpassword); + client_outmessage (OUT_TEAM, buf); + client_outmessage (OUT_VERSION, APPNAME"-"APPVERSION); + partyline_namelabel (nick, NULL); + } + /* tell everybody of successful connection */ + client_outmessage (OUT_CONNECTED, NULL); + /* set up stuff */ + connected = TRUE; + ingame = playing = paused = FALSE; + playercount = spectating ? 0 : 1; + partyline_text ("\014\02*** Connected to server"); + commands_checkstate (); + connectingdialog_destroy (); + connectdialog_connected (); + if (spectating) tetrix = TRUE; + else tetrix = FALSE; + } + if (!spectating) { + /* set own player/team info */ + strcpy (playernames[playernum], nick); + strcpy (teamnames[playernum], team); + /* send team info */ + sprintf (buf, "%d %s", playernum, team); + client_outmessage (OUT_TEAM, buf); + /* update display */ + playerlistupdate (); + partyline_namelabel (nick, team); + fieldslabelupdate (); + if (connected) { + checkmoderatorstatus (); + partylineupdate_join (nick); + partylineupdate_team (nick, team); + } + } + break; + case IN_PLAYERJOIN: + { + int pnum; + char *token; + /* new player has joined */ + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + token = strtok (NULL, ""); + if (token == NULL) break; + if (playernames[pnum][0] == 0) playercount ++; + strcpy (playernames[pnum], token); + teamnames[pnum][0] = 0; + playerlistupdate (); + /* update fields display */ + fieldslabelupdate (); + /* display */ + partylineupdate_join (playernames[pnum]); + /* check moderator status */ + checkmoderatorstatus (); + /* send out our field */ + if (!spectating) tetrinet_resendfield (); + } + break; + case IN_PLAYERLEAVE: + { + int pnum; + char *token; + /* player has left */ + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + playercount --; + if (playernames[pnum][0]) { + /* display */ + partylineupdate_leave (playernames[pnum]); + } + /* update playerlist */ + playernames[pnum][0] = 0; + teamnames[pnum][0] = 0; + playerlistupdate (); + /* update fields display */ + fieldslabelupdate (); + memset (fields[pnum], 0, FIELDHEIGHT*FIELDWIDTH); + fields_drawfield (playerfield(pnum), fields[pnum]); + /* check moderator status */ + checkmoderatorstatus (); + } + break; + case IN_KICK: + { + int pnum; + char *token; + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + if ((pnum == playernum) && !spectating) + sprintf (buf, "\014\02*** You have been kicked from the game"); + else + sprintf (buf, "\014*** \02%s\377\014 has been kicked from the game", playernames[pnum]); + partyline_text (buf); + /* + mark it so that leave message is not displayed when playerleave + message is received (see above) + */ + playernames[pnum][0] = 0; + } + break; + case IN_TEAM: + { + int pnum; + char *token; + /* parse string */ + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + token = strtok (NULL, ""); + if (token == NULL) token = ""; + strcpy (teamnames[pnum], token); + playerlistupdate (); + /* update fields display */ + fieldslabelupdate (); + /* display */ + partylineupdate_team (playernames[pnum], teamnames[pnum]); + } + break; + case IN_PLINE: + { + int pnum; + char *token; + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + token = strtok (NULL, ""); + if (token == NULL) token = ""; + if (pnum == 0) { + if (strncmp (token, "\04\04\04\04\04\04\04\04", 8) == 0) { + /* tetrix identification string */ + tetrix = TRUE; + } + else if (tetrix) { + sprintf (buf, "*** %s", token); + partyline_text (buf); + break; + } + else plinemsg ("Server", token); + } + else plinemsg (playernames[pnum], token); + } + break; + case IN_PLINEACT: + { + int pnum; + char *token; + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + token = strtok (NULL, ""); + if (token == NULL) token = ""; + /* display it */ + plineact (playernames[pnum], token); + } + break; + case IN_PLAYERLOST: + { + int pnum; + pnum = atoi (data); + /* player is out */ + playerplaying[pnum] = 0; + } + break; + case IN_PLAYERWON: + { + int pnum; + pnum = atoi (data); + if (teamnames[pnum][0]) + sprintf (buf, "\020*** Team \02%s\377\020 has won the game", + teamnames[pnum]); + else + sprintf (buf, "\020*** \02%s\377\020 has won the game", + playernames[pnum]); + partyline_text (buf); + } + break; + case IN_NEWGAME: + { + int i, j; + char bfreq[128], sfreq[128]; + sscanf (data, "%d %d %d %d %d %d %d %s %s %d %d", + &initialstackheight, &initiallevel, + &linesperlevel, &levelinc, &speciallines, + &specialcount, &specialcapacity, + bfreq, sfreq, &levelaverage, &classicmode); + /* + decoding the 11233345666677777 block frequecy thingies: + */ + for (i = 0; i < 7; i ++) blockfreq[i] = 0; + for (i = 0; i < 9; i ++) specialfreq[i] = 0; + /* count frequencies */ + for (i = 0; bfreq[i]; i ++) + blockfreq[bfreq[i]-'1'] ++; + for (i = 0; sfreq[i]; i ++) + specialfreq[sfreq[i]-'1'] ++; + /* make it cumulative */ + for (i = 0, j = 0; i < 7; i ++) { + j += blockfreq[i]; + blockfreq[i] = j; + } + for (i = 0, j = 0; i < 9; i ++) { + j += specialfreq[i]; + specialfreq[i] = j; + } + /* sanity checks */ + if (blockfreq[6] < 100) blockfreq[6] = 100; + if (specialfreq[8] < 100) specialfreq[8] = 100; + tetrinet_startgame (); + commands_checkstate (); + partyline_text ("\024*** The game has \02started"); + } + break; + case IN_INGAME: + { + FIELD field; + int x, y, i; + ingame = TRUE; + playing = paused = FALSE; + if (!spectating) { + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + field[y][x] = randomnum(5) + 1; + tetrinet_updatefield (field); + tetrinet_sendfield (1); + fields_drawfield (playerfield(playernum), fields[playernum]); + } + for (i = 0; i <= 6; i ++) playerlevels[i] = -1; + tetrinet_setspeciallabel (-1); + fields_gmsginput (FALSE); + fields_gmsginputclear (); + commands_checkstate (); + partyline_text ("\024*** The game is \02in progress"); + } + break; + case IN_PAUSE: + if (atoi(data)) { + tetrinet_pausegame (); + partyline_text ("\024*** The game has \02paused"); + } + else { + tetrinet_resumegame (); + partyline_text ("\024*** The game has \02resumed"); + } + commands_checkstate (); + break; + case IN_ENDGAME: + tetrinet_endgame (); + commands_checkstate (); + partyline_text ("\024*** The game has \02ended"); + break; + case IN_F: + { + int pnum; + char *p, *s; + s = strtok (data, " "); + if (s == NULL) break; + pnum = atoi (s); + s = strtok (NULL, ""); + if (s == NULL) break; + if (*s >= '0') { + /* setting entire field */ + p = (char *)fields[pnum]; + for (; *s; s ++, p ++) + *p = translateblock (*s); + } + else { + /* setting specific locations */ + int block = 0, x, y; + for(; *s; s++) { + if (*s < '0' && *s >= '!') block = *s - '!'; + else { + x = *s - '3'; + y = *(++s) - '3'; + if (x >= 0 && x < FIELDWIDTH && y >= 0 && y < FIELDHEIGHT) + fields[pnum][y][x] = block; + } + } + } + if (ingame) fields_drawfield (playerfield(pnum), fields[pnum]); + } + break; + case IN_SB: + /* special block */ + { + int sbnum, to, from; + char *token, *sbid; + token = strtok (data, " "); + if (token == NULL) break; + to = atoi (token); + sbid = strtok (NULL, " "); + if (sbid == NULL) break; + token = strtok (NULL, ""); + if (token == NULL) break; + from = atoi(token); + for (sbnum = 0; sbinfo[sbnum].id; sbnum ++) + if (strcmp (sbid, sbinfo[sbnum].id) == 0) break; + if (!sbinfo[sbnum].id) break; + if (ingame) tetrinet_dospecial (from, to, sbnum); + } + break; + case IN_LVL: + { + char *token; + int pnum; + token = strtok (data, " "); + if (token == NULL) break; + pnum = atoi (token); + token = strtok (NULL, ""); + if (token == NULL) break; + playerlevels[pnum] = atoi (token); + if (ingame) tetrinet_updatelevels (); + } + break; + case IN_GMSG: + fields_gmsgadd (data); + sound_playsound (S_MESSAGE); + break; + case IN_WINLIST: + { + char *token, *token2; + int team, score; + winlist_clear (); + token = strtok (data, " "); + if (token == NULL) break; + do { + switch (*token) { + case 'p': team = FALSE; break; + case 't': team = TRUE; break; + default: team = FALSE; break; + } + token ++; + token2 = token; + while (*token2 != ';' && *token2 != 0) token2 ++; + *token2 = 0; + token2 ++; + score = atoi (token2); + winlist_additem (team, token, score); + } while ((token = strtok (NULL, " ")) != NULL); + } + break; + case IN_SPECLIST: + { + char *token, buf[1024]; + speclist_clear (); + token = strtok (data, " "); + if (token == NULL) break; + sprintf (buf, "\021*** You have joined \02%s", token); + partyline_text (buf); + while ((token = strtok (NULL, " ")) != NULL) speclist_add (token); + playerlistupdate (); + } + break; + case IN_SPECJOIN: + { + char *name, *info, buf[1024]; + name = strtok (data, " "); + if (name == NULL) break; + speclist_add (name); + info = strtok (NULL, ""); + if (info == NULL) info = ""; + sprintf (buf, "\021*** \02%s\377\021 has joined the spectators \06\02(\02%s\337\06\02)", name, info); + partyline_text (buf); + playerlistupdate (); + } + break; + case IN_SPECLEAVE: + { + char *name, *info, buf[1024]; + name = strtok (data, " "); + if (name == NULL) break; + speclist_remove (name); + info = strtok (NULL, ""); + if (info == NULL) info = ""; + sprintf (buf, "\021*** \02%s\377\021 has left the spectators \06\02(\02%s\337\06\02)", name, info); + partyline_text (buf); + playerlistupdate (); + } + break; + case IN_SMSG: + { + char *name, *text; + name = strtok (data, " "); + if (name == NULL) break; + text = strtok (NULL, ""); + if (text == NULL) text = ""; + plinesmsg (name, text); + } + break; + case IN_SACT: + { + char *name, *text; + name = strtok (data, " "); + if (name == NULL) break; + text = strtok (NULL, ""); + if (text == NULL) text = ""; + plinesact (name, text); + } + break; + default: + } +} + +void tetrinet_playerline (char *text) +{ + char buf[1024], *p; + + if (text[0] == '/') { + p = text+1; + if (strncasecmp (p, "me ", 3) == 0) { + p += 3; + while (*p && isspace(*p)) p++; + sprintf (buf, "%d %s", playernum, p); + client_outmessage (OUT_PLINEACT, buf); + if (spectating) + plinesact (nick, p); + else + plineact (nick, p); + return; + } + if (tetrix) { + sprintf (buf, "%d %s", playernum, text); + client_outmessage (OUT_PLINE, buf); + return; + } + } + sprintf (buf, "%d %s", playernum, text); + client_outmessage (OUT_PLINE, buf); + if (spectating) + plinesmsg (nick, text); + else + plinemsg (nick, text); +} + +void tetrinet_changeteam (char *newteam) +{ + char buf[128]; + + strcpy (team, newteam); + + if (connected) { + sprintf (buf, "%d %s", playernum, team); + client_outmessage (OUT_TEAM, buf); + tetrinet_inmessage (IN_TEAM, buf); + partyline_namelabel (nick, team); + } +} + +void tetrinet_sendfield (int reset) +{ + int x, y, i, d = FALSE; + char buf[1024], buf2[1024], *p; + + if (reset) goto sendwholefield; + + sprintf (buf, "%d ", playernum); + /* find differences between the fields */ + for (i = 0; i < 15; i ++) { + p = buf2 + 1; + buf2[0] = '!' + i; + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (sentfield[y][x] != fields[playernum][y][x] + && fields[playernum][y][x] == i) + { + *p++ = x + '3'; + *p++ = y + '3'; + } + if (p > buf2+1) { + *p = 0; + strcat (buf, buf2); + d = TRUE; + } + } + if (!d) return; /* no differences */ + if (strlen (buf) >= FIELDHEIGHT*FIELDWIDTH+2) { + /* sending entire field is more efficient */ + sendwholefield: + p = buf2; + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + *p++ = blocks[(int)fields[playernum][y][x]]; + *p = 0; + sprintf (buf, "%d %s", playernum, buf2); + } + /* send it */ + client_outmessage (OUT_F, buf); + /* update the one in our memory */ + copyfield (sentfield, fields[playernum]); +} + +void tetrinet_updatefield (FIELD field) +{ + copyfield (fields[playernum], field); +} + +void tetrinet_resendfield (void) +{ + char buf[1024], buf2[1024], *p; + int x, y; + p = buf2; + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + *p++ = blocks[(int)sentfield[y][x]]; + *p = 0; + sprintf (buf, "%d %s", playernum, buf2); + client_outmessage (OUT_F, buf); +} + +void tetrinet_redrawfields (void) +{ + int i; + + fieldslabelupdate (); + if (ingame) for (i = 1; i <= 6; i ++) + fields_drawfield (playerfield(i), fields[i]); +} + +static void tetrinet_setspeciallabel (char sb) +{ + int sbnum; + if (sb == -1) { + fields_setspeciallabel (_("No special blocks")); + } + else { + for (sbnum = 0; sbinfo[sbnum].id; sbnum ++) + if (sbinfo[sbnum].block == sb) break; + fields_setspeciallabel (sbinfo[sbnum].info); + } + +} + +/* adds a special block to player's collection */ +static void tetrinet_addspecial (char sb) +{ + int l, i; + if (specialblocknum >= specialcapacity) return; /* too many ! */ + /* add to a random location */ + l = randomnum(specialblocknum); + for (i = specialblocknum; i > l; i --) + specialblocks[i] = specialblocks[i-1]; + specialblocks[l] = sb; + specialblocknum ++; + tetrinet_setspeciallabel (specialblocks[0]); +} + +/* adds a random special block to the field */ +static void tetrinet_addsbtofield (int count) +{ + int s, n, c, x, y, i, j; + char sb; + FIELD field; + copyfield (field, fields[playernum]); + for (i = 0; i < count; i ++) { + /* get a random special block */ + s = 0; + n = randomnum(100); + while (n >= specialfreq[s]) s ++; + sb = 6 + s; + /* sb is the special block that we want */ + /* count the number of non-special blocks on the field */ + c = 0; + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] > 0 && field[y][x] < 6) c ++; + if (c == 0) { /* drop block */ + /* i *think* this is how it works in the original - + blocks are not dropped on existing specials, + and it tries again to find another spot... + this is because... when a large number of + blocks are dropped, usually all columns get 1 block + but sometimes a column or two doesnt get a block */ + for (j = 0; j < 20; j ++) { + n = randomnum (FIELDWIDTH); + for (y = 0; y < FIELDHEIGHT; y ++) + if (field[y][n]) break; + if (y == FIELDHEIGHT || field[y][n] < 6) break; + } + if (j == 20) goto end; + y --; + field[y][n] = sb; + } + else { /* choose a random location */ + n = randomnum (c); + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] > 0 && field[y][x] < 6) { + if (n == 0) { + field[y][x] = sb; + goto next; + } + n --; + } + next: + } + } +end: + tetrinet_updatefield (field); +} + +/* specials */ +void tetrinet_dospecial (int from, int to, int type) +{ + FIELD field; + int x, y, i; + char buf[256], buf2[256]; + + sprintf (buf, "\02\023%s\023\02", sbinfo[type].info); + if (to) { + sprintf (buf2, " on \02\021%s\021\02", playernames[to]); + strcat (buf, buf2); + } + if (from) { + sprintf (buf2, " by \02\021%s\021\02", playernames[from]); + strcat (buf, buf2); + } + fields_attdefmsg (buf); + + if (!playing) return; /* we're not playing !!! */ + + if (from == playernum && type == S_SWITCH) { + /* we have to switch too... */ + from = to; + to = playernum; + } + + if (!(to == 0 && from != playernum) && to != playernum) + return; /* not for this player */ + + if (to == 0) + /* same team */ + if (team[0] && strcmp (teamnames[from], team) == 0) return; + + copyfield (field, fields[playernum]); + + switch (type) + { + /* these add alls need to determine team... */ + case S_ADDALL1: + tetris_addlines (1, 2); + break; + case S_ADDALL2: + tetris_addlines (2, 2); + break; + case S_ADDALL4: + tetris_addlines (4, 2); + break; + case S_ADDLINE: + tetris_addlines (1, 1); + break; + case S_CLEARLINE: + for (y = FIELDHEIGHT-1; y > 0; y --) + for (x = 0; x < FIELDWIDTH; x ++) + field[y][x] = field[y-1][x]; + for (x = 0; x < FIELDWIDTH; x ++) field[0][x] = 0; + tetrinet_updatefield (field); + break; + case S_NUKEFIELD: + memset (field, 0, FIELDWIDTH*FIELDHEIGHT); + tetrinet_updatefield (field); + break; + case S_CLEARBLOCKS: + for (i = 0; i < 10; i ++) + field[randomnum(FIELDHEIGHT)][randomnum(FIELDWIDTH)] = 0; + tetrinet_updatefield (field); + break; + case S_SWITCH: + copyfield (field, fields[from]); + for (y = 0; y < 6; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x]) goto bleep; + bleep: + i = 6 - y; + if (i) { + /* need to move field down i lines */ + for (y = FIELDHEIGHT-1; y >= i; y --) + for (x = 0; x < FIELDWIDTH; x ++) + field[y][x] = field[y-i][x]; + for (y = 0; y < i; y ++) + for (x = 0; x < FIELDWIDTH; x ++) field[y][x] = 0; + } + tetrinet_updatefield (field); + break; + case S_CLEARSPECIAL: + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] > 5) field[y][x] = randomnum (5) + 1; + tetrinet_updatefield (field); + break; + case S_GRAVITY: + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] == 0) { + /* move the above blocks down */ + for (i = y; i > 0; i --) + field[i][x] = field[i-1][x]; + field[0][x] = 0; + } + tetrinet_updatefield (field); + break; + case S_BLOCKQUAKE: + for (y = 0; y < FIELDHEIGHT; y ++) { + /* + note: I actually measured these frequencies - the following + is an approximation of what I measured + */ + int s; + i = randomnum (20); + if (i < 9) s = 0; + else if (i < 15) s = 1; + else if (i < 18) s = 2; + else s = 3; + if (randomnum(2)) s = -s; + tetrinet_shiftline (y, s, field); + } + tetrinet_updatefield (field); + break; + case S_BLOCKBOMB: + { + int ax[] = {-1, 0, 1, 1, 1, 0, -1, -1}; + int ay[] = {-1, -1, -1, 0, 1, 1, 1, 0}; + int c = 0; + char block; + /* find all bomb blocks */ + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] == 14) { + /* remove the bomb */ + field[y][x] = 0; + /* grab the squares around it */ + for (i = 0; i < 8; i ++) { + if (y+ay[i] >= FIELDHEIGHT || y+ay[i] < 0 || + x+ax[i] >= FIELDWIDTH || x+ax[i] < 0) continue; + block = field[y+ay[i]][x+ax[i]]; + if (block == 14) block = 0; + buf[c] = block; + c ++; + } + } + /* scatter blocks */ + for (i = 0; i < c; i ++) + field[randomnum(FIELDHEIGHT-6)+6][randomnum(FIELDWIDTH)] = buf[i]; + } + tetrinet_updatefield (field); + break; + } + tetris_removelines (NULL); + tetrinet_sendfield (0); + tetris_drawcurrentblock (); +} + +static void tetrinet_shiftline (int l, int d, FIELD field) +{ + int i; + if (d > 0) { /* to the right */ + for (i = FIELDWIDTH-1; i >= d; i --) + field[l][i] = field[l][i-d]; + for (; i >= 0; i --) field[l][i] = 0; + } + if (d < 0) { /* to the left */ + for (i = 0; i < FIELDWIDTH+d; i ++) + field[l][i] = field[l][i-d]; + for (; i < FIELDWIDTH; i ++) field[l][i] = 0; + } + /* if d == 0 do nothing */ +} + +/* returns a random block */ +static int tetrinet_getrandomblock (void) +{ + int i = 0, n = randomnum (100); + while (n >= blockfreq[i]) i ++; + return i; +} + +static int tetrinet_timeoutduration (void) +{ + return level<=100 ? 1005-level*10 : 5; +} + + +/*****************/ +/* tetrisy stuff */ +/*****************/ +static void tetrinet_settimeout (int duration); +static gint tetrinet_timeout (gpointer data); +static void tetrinet_solidify (void); +static void tetrinet_nextblock (void); +static gint tetrinet_nextblocktimeout (gpointer data); +static int tetrinet_removelines (void); +static gint tetrinet_removelinestimeout (gpointer data); + +TETRISBLOCK blankblock = +{ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} }; + +gint movedowntimeout = 0, nextblocktimeout = 0; +int downcount = 0, downpressed = 0; +int nextblock, nextorient; + +void tetrinet_startgame (void) +{ + int i; + linecount = slines = llines = 0; + level = initiallevel; + for (i = 0; i <= 6; i ++) playerlevels[i] = initiallevel; + for (i = 0; i <= 6; i ++) + if (playernames[i][0]) playerplaying[i] = TRUE; + tetrinet_updatelevels (); + fields_setlines (0); + tetrinet_setspeciallabel (-1); + fields_gmsginput (FALSE); + fields_gmsginputclear (); + paused = FALSE; + specialblocknum = 0; + ingame = TRUE; + clearallfields (); + if (!spectating) { + playing = TRUE; + nextblock = tetrinet_getrandomblock (); + nextorient = tetris_randomorient (nextblock); + fields_drawnextblock (tetris_getblock(nextblock, nextorient)); + tetris_addlines (initialstackheight, 1); + tetrinet_sendfield (1); + tetrinet_nextblock (); + } + sound_playsound (S_GAMESTART); + sound_playmidi (midifile); +} + +void tetrinet_pausegame (void) +{ + paused = TRUE; +} + +void tetrinet_resumegame (void) +{ + paused = FALSE; +} + +void tetrinet_playerlost (void) +{ + int x, y; + char buf[10]; + FIELD field; + playing = FALSE; + /* fix up the display */ + for (y = 0; y < FIELDHEIGHT; y ++) + for (x = 0; x < FIELDWIDTH; x ++) + field[y][x] = randomnum(5) + 1; + tetrinet_updatefield (field); + fields_drawfield (playerfield(playernum), fields[playernum]); + fields_drawnextblock (blankblock); + /* send field */ + tetrinet_sendfield (1); + /* post message */ + sprintf (buf, "%d", playernum); + client_outmessage (OUT_PLAYERLOST, buf); + /* make a sound */ + sound_playsound (S_YOULOSE); + /* end timeout thingies */ + if (movedowntimeout) + gtk_timeout_remove (movedowntimeout); + if (nextblocktimeout) + gtk_timeout_remove (nextblocktimeout); + movedowntimeout = nextblocktimeout = 0; + tetris_makeblock (-1, 0); +} + +void tetrinet_endgame (void) +{ + int i, c = 0; + for (i = 1; i <= 6; i ++) + if (playerplaying[i]) c ++; + if (playing && playercount > 1 && c == 1) + sound_playsound (S_YOUWIN); + sound_stopmidi (); + ingame = playing = FALSE; + if (movedowntimeout) + gtk_timeout_remove (movedowntimeout); + if (nextblocktimeout) + gtk_timeout_remove (nextblocktimeout); + movedowntimeout = nextblocktimeout = 0; + tetris_makeblock (-1, 0); + fields_drawnextblock (blankblock); + clearallfields (); + fields_attdefclear (); + fields_gmsgclear (); + specialblocknum = 0; + fields_drawspecials (); + fields_setlines (-1); + fields_setlevel (-1); + fields_setactivelevel (-1); + fields_setspeciallabel (NULL); + gmsgstate = 0; + fields_gmsginput (FALSE); + fields_gmsginputclear (); +} + +void tetrinet_updatelevels (void) +{ + int c = 0, t = 0, i; + if (levelaverage) { + /* average levels */ + for (i = 1; i <= 6; i ++) { + if (playerplaying[i]) { + c ++; + t += playerlevels[i]; + } + } + if(c) level = t / c; + fields_setactivelevel (level); + } + fields_setlevel (playerlevels[bigfieldnum]); +} + +void tetrinet_settimeout (int duration) +{ + if (movedowntimeout) + gtk_timeout_remove (movedowntimeout); + movedowntimeout = gtk_timeout_add (duration, (GtkFunction)tetrinet_timeout, + NULL); +} + +void tetrinet_removetimeout (void) +{ + if (movedowntimeout) + gtk_timeout_remove (movedowntimeout); + movedowntimeout = 0; +} + +gint tetrinet_timeout (gpointer data) +{ + if (paused) return TRUE; + if (!playing) return FALSE; + if (downpressed) downpressed ++; + if (tetris_blockdown ()) { + if (!playing) /* player died within tetris_blockdown() */ + return FALSE; + if (downcount) { + tetrinet_solidify (); + downcount = 0; + } + else downcount ++; + } + else downcount = 0; + tetris_drawcurrentblock (); + return TRUE; +} + +void tetrinet_solidify (void) +{ + int sound; + tetris_solidify (); + tetrinet_nextblock (); + sound = tetrinet_removelines (); + if (sound>=0) sound_playsound (sound); + else sound_playsound (S_SOLIDIFY); + tetrinet_sendfield (0); +} + +void tetrinet_nextblock (void) +{ + if (nextblocktimeout) return; + tetrinet_removetimeout (); + nextblocktimeout = + gtk_timeout_add (NEXTBLOCKDELAY, (GtkFunction)tetrinet_nextblocktimeout, + NULL); +} + +gint tetrinet_nextblocktimeout (gpointer data) +{ + if (paused) return TRUE; /* come back later */ + if (!playing) return FALSE; + if (tetris_makeblock (nextblock, nextorient)) { + /* player died */ + return FALSE; + } + nextblock = tetrinet_getrandomblock (); + nextorient = tetris_randomorient (nextblock); + fields_drawnextblock (tetris_getblock(nextblock, nextorient)); + tetris_drawcurrentblock (); + nextblocktimeout = 0; + tetrinet_settimeout (tetrinet_timeoutduration()); + return FALSE; +} + +int tetrinet_removelines () +{ + char buf[256]; + int lines, i, j, sound = -1, slcount; + lines = tetris_removelines (buf); + if (lines) { + linecount += lines; + slines += lines; + llines += lines; + fields_setlines (linecount); + /* save specials */ + for (i = 0; i < lines; i ++) + for (j = 0; buf[j]; j ++) + tetrinet_addspecial (buf[j]); + fields_drawspecials (); + /* add specials to field */ + slcount = slines / speciallines; + slines %= speciallines; + tetrinet_addsbtofield (specialcount * slcount); + /* work out what noise to make */ + if (lines == 4) sound = S_TETRIS; + else if (buf[0]) sound = S_SPECIALLINE; + else sound = S_LINECLEAR; + /* increment level */ + if (llines >= linesperlevel) { + char buf[32]; + while (llines >= linesperlevel) { + playerlevels[playernum] += levelinc; + llines -= linesperlevel; + } + /* tell everybody else */ + sprintf (buf, "%d %d", playernum, playerlevels[playernum]); + client_outmessage (OUT_LVL, buf); + tetrinet_updatelevels (); + } + /* lines to everyone if in classic mode */ + if (classicmode) { + int sbnum; + switch (lines) { + case 2: sbnum = S_ADDALL1; break; + case 3: sbnum = S_ADDALL2; break; + case 4: sbnum = S_ADDALL4; break; + default: goto endremovelines; + } + sprintf (buf, "%i %s %i", 0, sbinfo[sbnum].id, playernum); + client_outmessage (OUT_SB, buf); + tetrinet_dospecial (playernum, 0, sbnum); + } + endremovelines: + } + /* give it a little delay in drawing */ + gtk_timeout_add (40, (GtkFunction)tetrinet_removelinestimeout, + NULL); + return sound; +} + +gint tetrinet_removelinestimeout (gpointer data) +{ + tetris_drawcurrentblock (); + return FALSE; +} + +/* return TRUE if key is processed, FALSE if not */ +int tetrinet_key (int keyval, char *str) +{ + if (spectating) { + /* spectator keys */ + switch (keyval) { + case GDK_1: bigfieldnum = 1; break; + case GDK_2: bigfieldnum = 2; break; + case GDK_3: bigfieldnum = 3; break; + case GDK_4: bigfieldnum = 4; break; + case GDK_5: bigfieldnum = 5; break; + case GDK_6: bigfieldnum = 6; break; + default: goto notfieldkey; + } + tetrinet_updatelevels (); + tetrinet_redrawfields (); + return TRUE; + } +notfieldkey: + if (!ingame) return FALSE; + fields_gmsginputactivate (TRUE); + /* gmsg keys */ + if (gmsgstate == 1) { + switch (keyval) { + case GDK_Return: + { + char buf[256], *s; + s = fields_gmsginputtext (); + if (strlen(s) > 0) { + /* post message */ + sprintf (buf, "<%s> %s", nick, s); + client_outmessage (OUT_GMSG, buf); + } + /* hide input area */ + fields_gmsginput (FALSE); + fields_gmsginputclear (); + gmsgstate = 0; + } + break; + case GDK_Escape: + gmsgstate = 2; + fields_gmsginput (FALSE); + break; + case GDK_BackSpace: + fields_gmsginputback (); + break; + default: + fields_gmsginputadd (str); + break; + } + return TRUE; + } + if (keyval == keys[K_GAMEMSG]) { + fields_gmsginput (TRUE); + gmsgstate = 1; + return TRUE; + } + if (paused || !playing) return FALSE; + /* game keys */ + if (keyval == keys[K_ROTRIGHT]) { + if (!nextblocktimeout) + sound_playsound (S_ROTATE); + tetris_blockrotate (1); + } + else if (keyval == keys[K_ROTLEFT]) { + if (!nextblocktimeout) + sound_playsound (S_ROTATE); + tetris_blockrotate (-1); + } + else if (keyval == keys[K_RIGHT]) { + tetris_blockmove (1); + } + else if (keyval == keys[K_LEFT]) { + tetris_blockmove (-1); + } + else if (keyval == keys[K_DOWN]) { + if (!downpressed) { + tetrinet_timeout (NULL); + downpressed = 1; + tetrinet_settimeout (DOWNDELAY); + } + } + else if (keyval == keys[K_DROP]) { + int sound; + if (!nextblocktimeout) { + tetris_blockdrop (); + tetris_solidify (); + tetrinet_nextblock (); + sound = tetrinet_removelines(); + if (sound >= 0) sound_playsound (sound); + else sound_playsound (S_DROP); + tetrinet_sendfield (0); + } + } + else switch (keyval) { + case GDK_1: tetrinet_specialkey(1); break; + case GDK_2: tetrinet_specialkey(2); break; + case GDK_3: tetrinet_specialkey(3); break; + case GDK_4: tetrinet_specialkey(4); break; + case GDK_5: tetrinet_specialkey(5); break; + case GDK_6: tetrinet_specialkey(6); break; + case GDK_d: tetrinet_specialkey(-1); break; + default: + return FALSE; + } + tetris_drawcurrentblock (); + return TRUE; +} + +void tetrinet_upkey (int keyval) +{ + if (!playing) return; + if (keyval == keys[K_DOWN]) { + /* if it is a quick press, nudge it down one more step */ + if (downpressed == 1) tetrinet_timeout (NULL); + downpressed = 0; + tetrinet_settimeout (tetrinet_timeoutduration()); + } + tetris_drawcurrentblock (); +} + +/* called when player uses a special */ +void tetrinet_specialkey (int pnum) +{ + char buf[64]; + int sbnum, i; + + if (specialblocknum == 0) return; + + if (!playerplaying[pnum]) return; + + /* find which block it is */ + for (sbnum = 0; sbinfo[sbnum].id; sbnum ++) + if (sbinfo[sbnum].block == specialblocks[0]) break; + + /* remove it from the specials bar */ + for (i = 1; i < specialblocknum; i ++) + specialblocks[i-1] = specialblocks[i]; + specialblocknum --; + fields_drawspecials (); + if (specialblocknum > 0) + tetrinet_setspeciallabel (specialblocks[0]); + else + tetrinet_setspeciallabel (-1); + + /* just discarding a block */ + if (pnum == -1) return; + + /* send it out */ + sprintf (buf, "%i %s %i", pnum, sbinfo[sbnum].id, playernum); + client_outmessage (OUT_SB, buf); + + tetrinet_dospecial (playernum, pnum, sbnum); +} + +/******************/ +/* misc functions */ +/******************/ + +int mutimeout = 0; + +/* + this function exists to prevent the flood of moderator change messages + that occur on connecting to a server, by combining them to a single line + */ +int moderatorupdate_timeout (void) +{ + if (moderatornum) { + char buf[256]; + sprintf (buf, "\024*** \02%s\377\024 is the moderator", playernames[moderatornum]); + partyline_text (buf); + } + mutimeout = 0; + return FALSE; +} + +void moderatorupdate (int now) +{ + if (now) { + if (mutimeout) { + gtk_timeout_remove (mutimeout); + moderatorupdate_timeout (); + } + } + else { + if (mutimeout) + gtk_timeout_remove (mutimeout); + mutimeout = gtk_timeout_add (PARTYLINEDELAY2, (GtkFunction)moderatorupdate_timeout, NULL); + } +} + +/* these functions combines consecutive playerjoin and team messages */ +char pjoins[16][128]; +char pteams[16][128]; +int pcount = 0; +char pleaves[16][128]; +int plcount = 0; + +int putimeout = 0; + +int partylineupdate_timeout (void) +{ + int i, j, c; + char buf[1024], buf2[1024], team[128]; + int f[16]; + + if (plcount) { + strcpy (buf, "\014*** "); + for (i = 0; i < plcount; i++) { + sprintf (buf2, "\02%s\377\014, ", pleaves[i]); + strcat (buf, buf2); + } + buf[strlen(buf)-2] = 0; + if (plcount == 1) strcat (buf, " has left the game"); + else strcat (buf, " have left the game"); + plcount = 0; + partyline_text (buf); + } + if (pcount) { + strcpy (buf, "\014*** "); + for (i = 0; i < pcount; i++) { + sprintf (buf2, "\02%s\377\014, ", pjoins[i]); + strcat (buf, buf2); + } + buf[strlen(buf)-2] = 0; + if (pcount == 1) strcat (buf, " has joined the game"); + else strcat (buf, " have joined the game"); + partyline_text (buf); + + for (i = 0; i < pcount; i ++) f[i] = 1; + for (i = 0; i < pcount; i ++) if (f[i]) { + strcpy (team, pteams[i]); + sprintf (buf, "\020*** \02%s\377\020", pjoins[i]); + c = 1; + for (j = i+1; j < pcount; j ++) { + if (strcmp (team, pteams[j]) == 0) { + sprintf (buf2, ", \02%s\377\020", pjoins[j]); + strcat (buf, buf2); + f[j] = 0; + c ++; + } + } + if (c == 1) strcat (buf, " is "); + else strcat (buf, " are "); + if (team[0]) sprintf (buf2, "on team \02%s", team); + else sprintf (buf2, "alone"); + strcat (buf, buf2); + partyline_text (buf); + } + pcount = 0; + } + + putimeout = 0; + return FALSE; +} + +void partylineupdate (int now) +{ + if (putimeout) gtk_timeout_remove (putimeout); + if (now) + partylineupdate_timeout (); + else + putimeout = gtk_timeout_add (PARTYLINEDELAY1, (GtkFunction)partylineupdate_timeout, + NULL); +} + +void partylineupdate_join (char *name) +{ + int i; + if (!connected) return; + for (i = 0; i < pcount; i ++) if (strcmp(pjoins[i], name) == 0) return; + strcpy (pjoins[pcount], name); + pteams[pcount][0] = 0; + pcount ++; + partylineupdate (0); +} + +void partylineupdate_team (char *name, char *team) +{ + int i; + if (!connected) return; + for (i = 0; i < pcount; i ++) + if (strcmp (pjoins[i], name) == 0) break; + if (i == pcount) { + char buf[1024]; + /* player did not just join - display normally */ + if (team[0]) + sprintf (buf, "\020*** \02%s\377\020 is now on team \02%s", + name, team); + else + sprintf (buf, "\020*** \02%s\377\020 is now alone", + name); + partyline_text (buf); + } + strcpy (pteams[i], team); + partylineupdate (0); +} + +void partylineupdate_leave (char *name) +{ + if (!connected) return; + strcpy (pleaves[plcount], name); + plcount ++; + partylineupdate (0); +} + +void playerlistupdate (void) +{ + int i, sn, n = 0; + char *pnames[6], *teams[6], *specs[128]; + for (i = 1; i <= 6; i ++) { + if (playernames[i][0]) { + pnames[n] = playernames[i]; + teams[n] = teamnames[i]; + n ++; + } + } + for (sn = 0; sn < spectatorcount; sn++) specs[sn] = spectatorlist[sn]; + partyline_playerlist (pnames, teams, n, specs, sn); +} + +void fieldslabelupdate (void) +{ + int i; + for (i = 1; i <= 6; i ++) { + if (playernames[i][0] == 0) + fields_setlabel (playerfield(i), NULL, NULL, 0); + else + fields_setlabel (playerfield(i), playernames[i], teamnames[i], i); + } +} + +void checkmoderatorstatus (void) +{ + int i; + /* find the lowest numbered player, or 0 if no players exist */ + for (i = 1; i <= 6; i ++) + if (playernames[i][0]) break; + if (i > 6) i = 0; + if (!spectating && (i == playernum)) moderator = TRUE; + else moderator = FALSE; + commands_checkstate (); + if (moderatornum != i) { + moderatornum = i; + moderatorupdate (0); + } +} + +void plinemsg (char *name, char *text) +{ + char buf[1024]; + sprintf (buf, "\02<%s\377\02>\02 %s", name, text); + partyline_text (buf); +} + +void plinesmsg (char *name, char *text) +{ + char buf[1024]; + sprintf (buf, "\05\02<%s\377\05\02>\02 %s", name, text); + partyline_text (buf); +} + +void plineact (char *name, char *text) +{ + char buf[1024]; + sprintf (buf, "\023* \02%s\377\023 %s", name, text); + partyline_text (buf); +} + +void plinesact (char *name, char *text) +{ + char buf[1024]; + sprintf (buf, "\05* \02%s\377\05 %s", name, text); + partyline_text (buf); +} + +char translateblock (char c) +{ + int i; + for (i = 0; blocks[i]; i ++) + if (c == blocks[i]) return i; + return 0; +} + +int playerfield (int p) +{ + if (p < bigfieldnum) return p; + else if (p == bigfieldnum) return 0; + else return p - 1; +} + +void clearallfields (void) +{ + int i; + memset (fields, 0, 7*FIELDHEIGHT*FIELDWIDTH); + for (i = 1; i <= 6; i ++) + fields_drawfield (playerfield(i), fields[i]); +} + +void speclist_clear (void) +{ + spectatorcount = 0; +} + +void speclist_add (char *name) +{ + int p, i; + for (p = 0; p < spectatorcount; p++) + if (strcasecmp(name, spectatorlist[p]) < 0) break; + for (i = spectatorcount; i > p; i--) + strcpy (spectatorlist[i], spectatorlist[i-1]); + strcpy (spectatorlist[p], name); + spectatorcount ++; +} + +void speclist_remove (char *name) +{ + int i; + for (i = 0; i < spectatorcount; i ++) { + if (strcmp(name, spectatorlist[i]) == 0) { + for (; i < spectatorcount-1; i++) + strcpy (spectatorlist[i], spectatorlist[i+1]); + spectatorcount --; + return; + } + } +} diff --git a/src/tetrinet.h b/src/tetrinet.h new file mode 100644 index 0000000..9450dbd --- /dev/null +++ b/src/tetrinet.h @@ -0,0 +1,32 @@ +#define FIELDWIDTH 12 +#define FIELDHEIGHT 22 + +typedef char FIELD[FIELDHEIGHT][FIELDWIDTH]; + +extern int playernum; +extern char team[128], nick[128], specpassword[128]; +extern FIELD fields[7]; +extern int ingame, playing, paused; +extern int moderator, spectating; +extern int bigfieldnum; + +extern char specialblocks[256]; +extern int specialblocknum; + +extern void tetrinet_inmessage (enum inmsg_type msgtype, char *data); +extern void tetrinet_playerline (char *text); +extern void tetrinet_changeteam (char *newteam); +extern void tetrinet_updatefield (FIELD field); +extern void tetrinet_sendfield (int reset); +extern void tetrinet_resendfield (void); +extern void tetrinet_redrawfields (void); +extern int tetrinet_key (int keyval, char *str); +extern void tetrinet_upkey (int keyval); + +extern void tetrinet_startgame (void); +extern void tetrinet_pausegame (void); +extern void tetrinet_resumegame (void); +extern void tetrinet_playerlost (void); +extern void tetrinet_endgame (void); + +extern int playerfield (int p); diff --git a/src/tetris.c b/src/tetris.c new file mode 100644 index 0000000..a1e2c2b --- /dev/null +++ b/src/tetris.c @@ -0,0 +1,412 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 + +#include "client.h" +#include "tetrinet.h" +#include "tetris.h" +#include "fields.h" +#include "misc.h" + + +TETRISBLOCK b1[2] = { + { + {1,1,1,1}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} + }, { + {0,0,1,0}, + {0,0,1,0}, + {0,0,1,0}, + {0,0,1,0} + } +}; + +TETRISBLOCK b2[1] = { + { + {0,2,2,0}, + {0,2,2,0}, + {0,0,0,0}, + {0,0,0,0} + } +}; + +TETRISBLOCK b3[4] = { + { + {0,0,3,0}, + {0,0,3,0}, + {0,3,3,0}, + {0,0,0,0} + }, { + {0,3,0,0}, + {0,3,3,3}, + {0,0,0,0}, + {0,0,0,0} + }, { + {0,3,3,0}, + {0,3,0,0}, + {0,3,0,0}, + {0,0,0,0} + }, { + {0,3,3,3}, + {0,0,0,3}, + {0,0,0,0}, + {0,0,0,0} + } +}; + +TETRISBLOCK b4[4] = { + { + {0,4,0,0}, + {0,4,0,0}, + {0,4,4,0}, + {0,0,0,0} + }, { + {0,4,4,4}, + {0,4,0,0}, + {0,0,0,0}, + {0,0,0,0} + }, { + {0,4,4,0}, + {0,0,4,0}, + {0,0,4,0}, + {0,0,0,0} + }, { + {0,0,0,4}, + {0,4,4,4}, + {0,0,0,0}, + {0,0,0,0} + } +}; + + +TETRISBLOCK b5[2] = { + { + {0,0,5,0}, + {0,5,5,0}, + {0,5,0,0}, + {0,0,0,0} + }, { + {0,5,5,0}, + {0,0,5,5}, + {0,0,0,0}, + {0,0,0,0} + } +}; + +TETRISBLOCK b6[2] = { + { + {0,1,0,0}, + {0,1,1,0}, + {0,0,1,0}, + {0,0,0,0} + }, { + {0,0,1,1}, + {0,1,1,0}, + {0,0,0,0}, + {0,0,0,0} + } +}; +TETRISBLOCK b7[4] = { + { + {0,0,2,0}, + {0,2,2,0}, + {0,0,2,0}, + {0,0,0,0} + }, { + {0,0,2,0}, + {0,2,2,2}, + {0,0,0,0}, + {0,0,0,0} + }, { + {0,2,0,0}, + {0,2,2,0}, + {0,2,0,0}, + {0,0,0,0} + }, { + {0,2,2,2}, + {0,0,2,0}, + {0,0,0,0}, + {0,0,0,0} + } +}; +static TETRISBLOCK *blocks[7] = { b1, b2, b3, b4, b5, b6, b7 }; +static int blockcount[7] = { 2, 1, 4, 4, 2, 2, 4 }; + +static int blocknum = -1, blockorient; /* which block */ +static int blockx, blocky; /* current location of block */ + +static int blockobstructed (FIELD field, int block, int orient, int bx, int by); +static int obstructed (FIELD field, int x, int y); +static void placeblock (FIELD field, int block, int orient, int bx, int by); + +void tetris_drawcurrentblock (void) +{ + FIELD field; + copyfield (field, fields[playernum]); + if (blocknum >= 0) + placeblock (field, blocknum, blockorient, blockx, blocky); + fields_drawfield (playerfield(playernum), field); +} + +int tetris_makeblock (int block, int orient) +{ + blocknum = block; + blockorient = orient; + blockx = FIELDWIDTH/2-2; + blocky = 0; + + if (block >= 0 && + blockobstructed (fields[playernum], blocknum, + blockorient, blockx, blocky)) + { + /* player is dead */ + tetrinet_playerlost (); + blocknum = -1; + return 1; + } + else return 0; +} + +int tetris_randomorient (int block) +{ + return randomnum (blockcount[block]); +} + +P_TETRISBLOCK tetris_getblock (int block, int orient) +{ + return blocks[block][orient]; +} + +/* returns -1 if block solidifies, 0 otherwise */ +int tetris_blockdown (void) +{ + if (blocknum < 0) return 0; + /* move the block down one */ + if (blockobstructed (fields[playernum], blocknum, + blockorient, blockx, blocky+1)) + { + /* cant move down */ +#ifdef DEBUG + printf ("blockobstructed: %d %d\n", blockx, blocky); +#endif + return -1; + } + else { + blocky ++; + return 0; + } +} + +void tetris_blockmove (int dir) +{ + if (blocknum < 0) return; + if (blockobstructed (fields[playernum], blocknum, + blockorient, blockx+dir, blocky)) + /* do nothing */; + else blockx += dir; +} + +void tetris_blockrotate (int dir) +{ + int neworient = blockorient + dir; + if (blocknum < 0) return; + if (neworient >= blockcount[blocknum]) neworient = 0; + if (neworient < 0) neworient = blockcount[blocknum] - 1; + switch (blockobstructed (fields[playernum], blocknum, + neworient, blockx, blocky)) + { + case 1: return; /* cant rotate if obstructed by blocks */ + case 2: /* obstructed by sides - move block away if possible */ + { + int shifts[4] = {1, -1, 2, -2}; + int i; + for (i = 0; i < 4; i ++) { + if (!blockobstructed (fields[playernum], blocknum, + neworient, blockx+shifts[i], + blocky)) + { + blockx += shifts[i]; + goto end; + } + } + return; /* unsuccessful */ + } + } +end: + blockorient = neworient; +} + +void tetris_blockdrop (void) +{ + if (blocknum < 0) return; + while (tetris_blockdown () == 0); +} + +void tetris_addlines (int count, int type) +{ + int x, y, ok, n, i; + FIELD field; + copyfield (field, fields[playernum]); + for (i = 0; i < count; i ++) { + /* check top row */ + for (x = 0; x < FIELDWIDTH; x ++) { + if (field[0][x]) { + /* player is dead */ + tetrinet_playerlost (); + return; + } + } + /* move everything up one */ + for (y = 0; y < FIELDHEIGHT-1; y ++) { + for (x = 0; x < FIELDWIDTH; x ++) + field[y][x] = field[y+1][x]; + } + /* generate a random line with spaces in it */ + switch (type) { + case 1: /* addline lines */ + ok = FALSE; + while (!ok) { + for (x = 0; x < FIELDWIDTH; x ++) { + n = randomnum (13); + /* in the original tetrinet, spaces seem to have 1.5 times the + probability of other blocks */ + if (n < 10) field[FIELDHEIGHT-1][x] = n/2 + 1; + else { + field[FIELDHEIGHT-1][x] = 0; + ok = TRUE; + } + } + } + break; + case 2: /* classicmode lines */ + /* fill up the line */ + for (x = 0; x < FIELDWIDTH; x ++) { + field[FIELDHEIGHT-1][x] = randomnum(5) + 1; + } + /* add a single space */ + field[FIELDHEIGHT-1][randomnum(FIELDWIDTH)] = 0; + break; + } + } + tetrinet_updatefield (field); +} + +/* this function removes full lines */ +int tetris_removelines (char *specials) +{ + int x, y, o, c = 0, i; + FIELD field; + if (!playing) return 0; + copyfield (field, fields[playernum]); + /* remove full lines */ + for (y = 0; y < FIELDHEIGHT; y ++) { + o = 0; + /* count holes */ + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] == 0) o ++; + if (o) continue; /* if holes */ + /* no holes */ + /* increment line count */ + c ++; + /* grab specials */ + if (specials) + for (x = 0; x < FIELDWIDTH; x ++) + if (field[y][x] > 5) + *specials++ = field[y][x]; + /* move field down */ + for (i = y-1; i >= 0; i --) + for (x = 0; x < FIELDWIDTH; x ++) + field[i+1][x] = field[i][x]; + /* clear top line */ + for (x = 0; x < FIELDWIDTH; x ++) + field[0][x] = 0; + } + if (specials) *specials = 0; /* null terminate */ + if (c) tetrinet_updatefield (field); + return c; +} + +void tetris_solidify (void) +{ + FIELD field; + copyfield (field, fields[playernum]); + if (blocknum < 0) return; + if (blockobstructed (field, blocknum, blockorient, blockx, blocky)) { + /* move block up until we get a free spot */ + for (blocky --; blocky >= 0; blocky --) + if (!blockobstructed (field, blocknum, blockorient, blockx, blocky)) + { + placeblock (field, blocknum, blockorient, blockx, blocky); + break; + } + if (blocky < 0) { + /* no space - player has lost */ + tetrinet_playerlost (); + blocknum = -1; + return; + } + } + else { + placeblock (field, blocknum, blockorient, blockx, blocky); + } + tetrinet_updatefield (field); + blocknum = -1; +} + +static int blockobstructed (FIELD field, int block, int orient, int bx, int by) +{ + int x, y, side = 0; + for (y = 0; y < 4; y ++) + for (x = 0; x < 4; x ++) + if (blocks[block][orient][y][x]) { + switch (obstructed (field, bx+x, by+y)) { + case 0: continue; + case 1: return 1; + case 2: side = 2; + } + } + return side; +} + +static int obstructed (FIELD field, int x, int y) +{ + if (x < 0) return 2; + if (x >= FIELDWIDTH) return 2; + if (y < 0) return 1; + if (y >= FIELDHEIGHT) return 1; + if (field[y][x]) return 1; + return 0; +} + +static void placeblock (FIELD field, int block, int orient, int bx, int by) +{ + int x, y; + for (y = 0; y < 4; y ++) + for (x = 0; x < 4; x ++) { + if (blocks[block][orient][y][x]) + field[y+by][x+bx] = blocks[block][orient][y][x]; + } +} + +void copyfield (FIELD dest, FIELD src) +{ + memcpy ((void *)dest, (void *)src, FIELDHEIGHT*FIELDWIDTH); +} diff --git a/src/tetris.h b/src/tetris.h new file mode 100644 index 0000000..2afb052 --- /dev/null +++ b/src/tetris.h @@ -0,0 +1,16 @@ +typedef char TETRISBLOCK[4][4]; +typedef char (*P_TETRISBLOCK)[4]; + +extern void tetris_drawcurrentblock (void); +extern int tetris_makeblock (int block, int orient); +extern int tetris_randomorient (int block); +extern P_TETRISBLOCK tetris_getblock (int block, int orient); +extern int tetris_blockdown (void); +extern void tetris_blockmove (int dir); +extern void tetris_blockrotate (int dir); +extern void tetris_blockdrop (void); +extern void tetris_solidify (void); +extern void tetris_addlines (int count, int type); +extern int tetris_removelines (char *specials); + +extern void copyfield (FIELD dest, FIELD src); diff --git a/src/winlist.c b/src/winlist.c new file mode 100644 index 0000000..61dee2f --- /dev/null +++ b/src/winlist.c @@ -0,0 +1,72 @@ +/* + * GTetrinet + * Copyright (C) 1999, 2000 Ka-shu Wong (kswong@zip.com.au) + * + * 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 +#include +#include +#include + +#include "client.h" +#include "tetrinet.h" +#include "winlist.h" +#include "misc.h" + +char *winlisttitles[] = { + N_("T"), + N_("Name"), + N_("Score") +}; + +GtkWidget *winlist; + +GtkWidget *winlist_page_new (void) +{ + GtkWidget *align; + + winlist = gtk_clist_new_with_titles (3, winlisttitles); + + gtk_clist_set_column_width (GTK_CLIST(winlist), 0, 8); + gtk_clist_set_column_width (GTK_CLIST(winlist), 1, 120); + gtk_widget_set_usize (winlist, 240, 0); + + gtk_clist_column_titles_passive (GTK_CLIST(winlist)); + + gtk_widget_show (winlist); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.8); + gtk_container_add (GTK_CONTAINER(align), winlist); + gtk_container_border_width (GTK_CONTAINER(align), 2); + + return align; +} + +void winlist_clear (void) +{ + gtk_clist_clear (GTK_CLIST(winlist)); +} + +void winlist_additem (int team, char *name, int score) +{ + char buf[16], *item[3]; + if (team) item[0] = "T"; + else item[0] = ""; + item[1] = nocolor (name); + sprintf (buf, "%d", score); + item[2] = buf; + + gtk_clist_append (GTK_CLIST(winlist), item); +} diff --git a/src/winlist.h b/src/winlist.h new file mode 100644 index 0000000..6992ea2 --- /dev/null +++ b/src/winlist.h @@ -0,0 +1,4 @@ +#include +GtkWidget *winlist_page_new (void); +void winlist_clear (void); +void winlist_additem (int team, char *name, int score); diff --git a/themes/Makefile.am b/themes/Makefile.am new file mode 100644 index 0000000..dcc4764 --- /dev/null +++ b/themes/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = default diff --git a/themes/Makefile.in b/themes/Makefile.in new file mode 100644 index 0000000..e1fb72e --- /dev/null +++ b/themes/Makefile.in @@ -0,0 +1,297 @@ +# 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@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_CONFIG = @ESD_CONFIG@ +ESD_LIBS = @ESD_LIBS@ +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@ +MAKEINFO = @MAKEINFO@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +ZVT_LIBS = @ZVT_LIBS@ + +SUBDIRS = default +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu themes/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +# 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) $(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)$$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 = themes + +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 themes/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 + 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=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: +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 +all-redirect: all-recursive +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-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + +maintainer-clean-am: 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 + +.PHONY: 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 install-exec-am \ +install-exec 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 + + +# 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/themes/default/Makefile.am b/themes/default/Makefile.am new file mode 100644 index 0000000..c578c4b --- /dev/null +++ b/themes/default/Makefile.am @@ -0,0 +1,3 @@ +defaultthemedir = $(pkgdatadir)/themes/default + +defaulttheme_DATA = blocks.png theme.cfg diff --git a/themes/default/Makefile.in b/themes/default/Makefile.in new file mode 100644 index 0000000..0fd707f --- /dev/null +++ b/themes/default/Makefile.in @@ -0,0 +1,217 @@ +# 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@ +ESD_CFLAGS = @ESD_CFLAGS@ +ESD_CONFIG = @ESD_CONFIG@ +ESD_LIBS = @ESD_LIBS@ +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@ +MAKEINFO = @MAKEINFO@ +ORBIT_CFLAGS = @ORBIT_CFLAGS@ +ORBIT_CONFIG = @ORBIT_CONFIG@ +ORBIT_IDL = @ORBIT_IDL@ +ORBIT_LIBS = @ORBIT_LIBS@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +ZVT_LIBS = @ZVT_LIBS@ + +defaultthemedir = $(pkgdatadir)/themes/default + +defaulttheme_DATA = blocks.png theme.cfg +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +DATA = $(defaulttheme_DATA) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu themes/default/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-defaultthemeDATA: $(defaulttheme_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(defaultthemedir) + @list='$(defaulttheme_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(defaultthemedir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(defaultthemedir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(defaultthemedir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(defaultthemedir)/$$p; \ + fi; fi; \ + done + +uninstall-defaultthemeDATA: + @$(NORMAL_UNINSTALL) + list='$(defaulttheme_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(defaultthemedir)/$$p; \ + done +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = themes/default + +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 themes/default/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 +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-defaultthemeDATA +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-defaultthemeDATA +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)$(defaultthemedir) + + +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-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-defaultthemeDATA install-defaultthemeDATA 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 + + +# 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/themes/default/blocks.png b/themes/default/blocks.png new file mode 100644 index 0000000000000000000000000000000000000000..19c1df3f7485b629cacd403e6e2e3e22f1c268d0 GIT binary patch literal 38065 zcmX`S2RxhK`#&7is8veM*pwm-p{8Y(1&bc7HHghchZqBaDAWdr{IB)|qoCRIYh z!LK{k^6K&sNaY8jD^pwugc+i$D6i|8vF(e9XV8CtDqiPJ6|0PVZ_k_BW61O3D~EyL zAuC0UezPgFz>CG8eCCw=cLl8#+;?-e*^7fHbO0g^&oNwz*bW$I~6xU#C{pM!x(=nSV`nd)Hg8n%TSIH>Wp0X^)cF zHOAT1quW&PUI?A%)YaDdU_c zlA__aP$b23=17Xwe6ez3`1Nw%&HiU5PUpmj&T7{Wov~FjIyd{SJW+yf)2o^nFW=se-87f%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L%Gk96?JZ@#1k z5Tc|L$uSS_a1p@@aS!Ar6ZGf@4iz7A7Otv#TC*#Yko`d)PaN_vuWUNbCTo!nsVB7K z;V-fx(yRu_@;gMk(lIxDR>E4p&)6Hu;-ZJ{9cGX3UA-`Y$8(7uGN=T)A+P8$iD${P zBA;TXjk^h|486@5>|lj-I|zAd;I(0Xt70=b8$QR?XCii7FTEgu5j3WLeiyvzm}G(~ z;krdW)qXNlRyFv1<}(D;E>$Gp9Bm%*-;Gw4-0p~t-;{w!8TpC|p11l`8EL@dj9&P@ zP21?w?o`{;f&GP3=H<~Vx{7t`J2%(Db8 z>4TTX|NnPacAGJ`ElyT+q2ZbsS_9f_w+^P z78lpvCRQf^#(>0pQ3BW{fdR_&!7M!Jk>Rkwpl!hQt2whucK&Cx`DIy}3BZ80qY5qQ z!)A-#{83$s^m+BLyqzw$!=+y;i_65kn`2=Dqe4}C{FAnqH(ACF?3uwGP1Op4M7D)< zLXq0lfl8qWtmABRq=9Ws<$lOdRcfl^bc<}%I@;rdp#qv`_$5!jjwv*nLYkr zat}1nqjaoYGLYH`h3*yW_iSg490@TLp_Va4{j`07b5tFUZ(GELnq}!+VLw8 z9ejmz*&hZ`Cx>mU{X5uMFS{CzhCI<_s4EBliJ0I{H?d-Mf}JXLFMgeOx;8E^P;H@8 zUZ?gqeHykqymM8!xMw<>B=~Lr{Z*zC93QYS{h-Ov<#yV9zzuAwR>}CU%VL~IwO4H{ zk`69&LN>m1b#ngw&^c6|QcHpF4^KVjO)WXyn0k%Id8KE?2s0%6jP3lG^Sb89Gp#1%&cZtp3InU3Qwz)lc92XJQ(i0R;Dh~C(S<@L>BZ%e PbzpNo=8ERp`6d4sPijd; literal 0 HcmV?d00001 diff --git a/themes/default/theme.cfg b/themes/default/theme.cfg new file mode 100644 index 0000000..aa11acb --- /dev/null +++ b/themes/default/theme.cfg @@ -0,0 +1,8 @@ +[Theme] +Name=GTetrinet Default Theme +Author=Zillidot (kswong@zip.com.au) +Description=Default GTetrinet Theme (no sound) + +[Graphics] +Blocks=blocks.png +BlockSize=20 -- 2.50.1