diff -Nru liquidwar-5.6.4/bootstrap liquidwar-5.6.5/bootstrap --- liquidwar-5.6.4/bootstrap 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/bootstrap 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,22 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +autoreconf + diff -Nru liquidwar-5.6.4/ChangeLog liquidwar-5.6.5/ChangeLog --- liquidwar-5.6.4/ChangeLog 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/ChangeLog 2018-12-23 19:04:36.000000000 +0000 @@ -1,3 +1,152 @@ +2018-12-23 Christian Mauduit (ufoot@ufoot.org) + + * Released 5.6.5. + +2018-12-22 Christian Mauduit (ufoot@ufoot.org) + + * Code cleanup, updated Allegro calls, indent & lint. + +2016-03-12 Christian Mauduit (ufoot@ufoot.org) + + * Introduced Docker files to build the game and run a server. + + * Fixed PHP metaserver. + +2014-03-30 Christian Mauduit (ufoot@ufoot.org) + + * Fixed DOS & MS-Windows Makefiles to include Polish. + +2014-01-02 Christian Mauduit (ufoot@ufoot.org) + + * Using proper PHP tags. + +2013-12-30 Christian Mauduit (ufoot@ufoot.org) + + * Added make dist to Jenkins script. + +2013-07-10 Christian Mauduit (ufoot@ufoot.org) + + * Fixed Debian issue #716610, was caused by lazy arg parsing. + +2013-01-08 Christian Mauduit (ufoot@ufoot.org) + + * Copyright 2012 -> 2013. + +2012-10-02 Christian Mauduit (ufoot@ufoot.org) + + * First Polish translation by Jan Szenborn. + +2012-09-26 Christian Mauduit (ufoot@ufoot.org) + + * Added Jenkins (continuous integration) script. + +2012-01-01 Christian Mauduit (ufoot@ufoot.org) + + * Copyright 2011 -> 2012. + +2011-12-23 Christian Mauduit (ufoot@ufoot.org) + + * Removed compiler warnings. + +2011-12-22 Christian Mauduit (ufoot@ufoot.org) + + * Added 5 new maps by Joey Dodson (psyforce). + +2011-08-20 Christian Mauduit (ufoot@ufoot.org) + + * Turned on waves by default. Computers are fast now. + +2011-07-22 Christian Mauduit (ufoot@ufoot.org) + + * Trying to fix the game for native GP2X support. + +2011-07-07 Christian Mauduit (ufoot@ufoot.org) + + * Added informations on how to compile for GP2X. + +2011-06-01 Christian Mauduit (ufoot@ufoot.org) + + * German translation update by Jan Gretschuskin. + +2011-05-31 Christian Mauduit (ufoot@ufoot.org) + + * Updated 'upgrade to LW6' message. + + * Added icon support under X-Windows. + + * Doc update. + + * Added hi-res icon. + + * Changed READMEs charset to UTF-8. + + * Makefile distclean fix. + + +2011-05-30 Christian Mauduit (ufoot@ufoot.org) + + * Updated config.guess & other configure scripts. + + * Mac OS X package fix. + + * Fixed RPM generation. + + * target -> host in configure/Makefile + + +2011-04-30 Christian Mauduit (ufoot@ufoot.org) + + * Copyright 2010 -> 2011. + + +2010-08-25 Christian Mauduit (ufoot@ufoot.org) + + * Information "Liquid War 6 is out" when starting game. + + +2009-11-14 Christian Mauduit (ufoot@ufoot.org) + + * Fixed Debian Bug #555468, missing -lm in mapgen Makefile + + +2009-08-19 Christian Mauduit (ufoot@ufoot.org) + + * Makefile updates for native OS/X support. + + +2009-07-31 Christian Mauduit (ufoot@ufoot.org) + + * Security patch by Mikhail Yakshin. + + +2009-04-22 Christian Mauduit (ufoot@ufoot.org) + + * New solsystem map by Rezifull + + +2008-05-10 Christian Mauduit (ufoot@ufoot.org) + + * .desktop patch by SA Gevatter (FreeDesktop.org compliance) + + +2008-03-25 Christian Mauduit (ufoot@ufoot.org) + + * Added sample logrotate.d file. + + +2008-03-24 Christian Mauduit (ufoot@ufoot.org) + + * Liquid War server no more leaves defunct childs on callback. + + * Copyright 2007 -> 2008. + + * Now somewhat version agnostic, will accept 5.6.3 & more. + + +2007-11-16 Christian Mauduit (ufoot@ufoot.org) + + * Fixed CPU detection, ASM was compiled on x86_64 but isn't linkable. + 2007-10-17 Christian Mauduit (ufoot@ufoot.org) @@ -112,11 +261,11 @@ * Waves deactivated by default on x86_64 - + 2005-09-05 Christian Mauduit (ufoot@ufoot.org) * Fixed GUI procs so that 320x240 is correctly displayed. - + * Minor fix, ptr size is checked, instead of long which is useless. @@ -125,17 +274,17 @@ * Fixed my_edit_proc which was wrecked after migration to allegro 4.2 * Characters >= 128 are now filtered in the GUI. - + 2005-08-30 Christian Mauduit (ufoot@ufoot.org) * Fixes in XML doc files, changed the DTD URL. - + 2005-08-28 Christian Mauduit (ufoot@ufoot.org) * Added Solar System map by 2 of omega. - + 2005-06-29 Christian Mauduit (ufoot@ufoot.org) @@ -153,7 +302,7 @@ * Added patches by Dave Vasilevsky to support Mac OS X. - + 2005-06-21 Christian Mauduit (ufoot@ufoot.org) * Game now requires Allegro 4.2.0beta3 to compile @@ -162,7 +311,7 @@ * Fixed alleg2.c to match allegro 4.2 needs. - + 2005-05-29 Christian Mauduit (ufoot@ufoot.org) * Copyright 2004 -> 2005 @@ -171,21 +320,21 @@ * Added Fanfic by Gavin - + 2005-05-07 Christian Mauduit (ufoot@ufoot.org) * Added UWiKiCMS doc generation. - + 2004-08-22 Christian Mauduit (ufoot@ufoot.org) * Added more strategy tips suggested by Jan Samohıl. - + 2004-08-19 Christian Mauduit (ufoot@ufoot.org) * Game defaults to windowed mode under UNIX. - + 2004-07-06 Christian Mauduit (ufoot@ufoot.org) @@ -195,7 +344,7 @@ 2004-02-11 Christian Mauduit (ufoot@ufoot.org) - * Released 5.6.2. + * Released 5.6.2. * Updated docs (allow net bots) @@ -203,13 +352,13 @@ 2004-02-10 Christian Mauduit (ufoot@ufoot.org) - + * Updated lwmapgen to 0.0.1. - + * Updated credits. * Updated translations. - + * Updated network tutorial. @@ -293,8 +442,8 @@ 2003-11-11 Christian Mauduit (ufoot@ufoot.org) - - * Added a "floating gnu" custom map, to show how map associations + + * Added a "floating gnu" custom map, to show how map associations work. * Updated the docs. @@ -303,7 +452,7 @@ now called as an external program. It works much better, and if it ever crashes, it does not impact the parent process (ie the game). - + * The random map generator by David Redick finally works. It's still rather segfault prone for now. @@ -319,24 +468,24 @@ 2003-11-09 Christian Mauduit (ufoot@ufoot.org) - * Added a mutex lock/unlock on the update_choose_map function + * Added a mutex lock/unlock on the update_choose_map function which is suspected to be responsible for crashes under Windows. 2003-11-08 Christian Mauduit (ufoot@ufoot.org) * Implemented some basic mutex support. - + * Game should not eat up 100% off CPU time on UNIX platforms anymore. - + * Prepared stuff to include David Redicks's map generator in Liquid War "natively". - + * Fixed a bug in system name generation for custom maps/textures. - + * Changed map names so that they are sorted by author. - + * Added map generator by David Redick. It's still an external program. @@ -360,7 +509,7 @@ * The "use default texture" option works. Needs enhancements but basically works. - + * Added a "system name" property to textures. @@ -371,7 +520,7 @@ * Fixed puckman and rect maps since they were buggy. * Map checks are now done on both custom and builtin maps. - + * Better checks in the liquidwarmap utility to fix issues with Kaspers' maps. @@ -472,7 +621,7 @@ * Passed all the C source through GNU indent. * More endianess fixes, hopefully network should now work on Mac. - + 2003-03-03 Christian Mauduit (ufoot@ufoot.org) @@ -482,25 +631,25 @@ produce "more random" values. * Minor fix in the meta-server, concerning the fact that "empty" - server lists where not handled correctly since LW supports + server lists where not handled correctly since LW supports HTTP 1.1. * Applied new German translations by Jan Gretschuskin. - + 2003-03-02 Christian Mauduit (ufoot@ufoot.org) * The Windows server is now able to launch a process when someone connects, just like on UNIX. - * Added a javascript script to popup a window under windows, + * Added a javascript script to popup a window under windows, using Windows Scripting Host. * Added support for popup windows on Win32. * Made the game compile under Win32 again 8-) - + 2003-02-28 Christian Mauduit (ufoot@ufoot.org) * Added a sample liquidwar_notify.sh script. @@ -527,7 +676,7 @@ * Changed the serialization method for maps, so that the game can be used in a networked environnement even if some machines are big-endian - and other ones are little-endian. This is an endianness fix, which + and other ones are little-endian. This is an endianness fix, which should hopefully make network available on Mac OS X. * The source now compiles with "-W" gcc option under Linux. @@ -539,7 +688,7 @@ arbitrary actions whenever someone connects on it. Implemented on UNIX only for now. - * Added a "check" target to Makefile, which fires splint and xmllint. + * Added a "check" target to Makefile, which fires splint and xmllint. 2003-02-11 Christian Mauduit (ufoot@ufoot.org) @@ -559,7 +708,7 @@ * Removed all direct calls to sprintf, strcat or strcpy. * Imported an snprintf implementation, for platforms who don't have - native snprintf support. That is -> windows. No wonder they get so + native snprintf support. That is -> windows. No wonder they get so many buffer oveflows and security holes ;-P * Added a dtd to the xml documentation. This is cleaner, and Emacs @@ -679,7 +828,7 @@ 2002-10-11 Christian Mauduit (ufoot@ufoot.org) - + * Added GNU Make automatic detection in configure scripts, for systems that have both make (non-GNU) and gmake (GNU) commands, such as FreeBSD. @@ -697,7 +846,7 @@ * Added the German translation of the GPL * Resized some menu items so that german translations can fit in them. - + * Replaced accents on German characters by their "equivalent" using the plain standard alphabet (ascii<128) @@ -708,7 +857,7 @@ exporting the environnement var "MAKE" before typing ./configure. Usefull for compiling the game when GNU Make is called gmake for instance (think of FreeBSD...). - + * Added German language support. Translation by Jan Gretschuskin. @@ -726,9 +875,9 @@ * The "big data allocation" is now called to automatically double the amount of reserved memory when one tries to start a new game, - and the buffer was to small - this previously resulted in a + and the buffer was to small - this previously resulted in a pathetic almost useless error message... - + * Added more settings for the "min map resolution" feature. * Applied patch from Eugene St Leger. Now the menu water volume is @@ -736,7 +885,7 @@ 2002-08-30 Christian Mauduit (ufoot@ufoot.org) - + * Added the feature suggested by Thomas Harte, which is to magnify small maps so that they are more interesting to play on fast computer. It's still possible to use the original small versions however. @@ -769,7 +918,7 @@ * Fixed a minor bug in the core algorithm (mesh was not spread correctly in the top-left corner of the map). - + * Added a function to dump rules config on stdout. * Fixed a bug concerning the famous "error processing WHO 0" @@ -793,12 +942,12 @@ * Fixed a minor menu issue in the French version (game and menu water labels had been inverted). - + 2002-07-27 Christian Mauduit (ufoot@ufoot.org) * Add 18 and 25 frames/sec display limits, to make more sensible movie captures. - + 2002-07-18 Christian Mauduit (ufoot@ufoot.org) @@ -812,18 +961,18 @@ * Enhanced the "Default" options button, so that settings such as fullscreen mode are immediately applied. - + * Fixed a bug in datafile maps writing/reading. The "size" field which was believed by network to be the size of maps was the size of the background. In practice, size is always > bg_size but this was weird anyway... - + * Fixed a bug in the network map exchange (potential buffer overflow to be very precise) - + * The game now performs a range check on all the config parameters retrieved from the network. - + * Added 4 "World" maps * Fixed a bug which disabled asm assembly by default. Not in 5.5.5. @@ -864,7 +1013,7 @@ 2002-07-13 Christian Mauduit (ufoot@ufoot.org) - * Added a "checksum" system to check that the game behaves the same + * Added a "checksum" system to check that the game behaves the same on every computer in network games. Seems to prove the game is still not bug free 8-( This feature is not in 5.5.4. @@ -880,7 +1029,7 @@ * Updated the meta-server so that it can handle U61 requests. Not really related to Liquid War anyway 8-) - * Added the possibility to abort the connection on a server. This + * Added the possibility to abort the connection on a server. This could indeed take a bunch of time since connect is a blocking call which can take up to a minute before failing... Not in 5.5.4 either... @@ -906,7 +1055,7 @@ would pathetically fail. * Little RPM generation update, to solve a man page compression issue. - + 2002-07-11 Christian Mauduit (ufoot@ufoot.org) @@ -918,7 +1067,7 @@ * French support is now auto-detected under Windows too. * Added informations about my GnuPG public key. - + 2002-07-09 Christian Mauduit (ufoot@ufoot.org) @@ -943,7 +1092,7 @@ * Added a small - yet working - chat system in the connection screen. - + 2002-07-02 Christian Mauduit (ufoot@ufoot.org) * Added 6 maps by Jan Gretschuskin @@ -951,7 +1100,7 @@ 2002-07-01 Christian Mauduit (ufoot@ufoot.org) - * Fixed a score bug (some teams would be considered as playing while + * Fixed a score bug (some teams would be considered as playing while they were inactive). @@ -962,7 +1111,7 @@ 2002-06-28 Christian Mauduit (ufoot@ufoot.org) - * Separated run-time (network fetched for instance) config + * Separated run-time (network fetched for instance) config parameters from the config parameters stored in the config file. * Added an "Assembly or standard C" option in the advanced rules @@ -994,13 +1143,13 @@ * Re-enabled the assembly code for the "wave effects" * Changed the way the "Viewport" size is calculated. - + 2002-06-25 Christian Mauduit (ufoot@ufoot.org) * Liquid War now handles the "Close" button in windowed context. (MS-Windows and X-Windows). - + 2002-06-24 Christian Mauduit (ufoot@ufoot.org) @@ -1018,7 +1167,7 @@ 2002-06-20 Christian Mauduit (ufoot@ufoot.org) - * Bug-fix concerning language detection on Linux, submitted by + * Bug-fix concerning language detection on Linux, submitted by David Turner (the game would segfault if LANG was undefined) Patch not included in 5.5.1. @@ -1034,7 +1183,7 @@ * Replaced truecolor custom/map/pacman.bmp by a 256 colors indexed version (fixes a DOS bug) - * Added informations about IRC + * Added informations about IRC 2002-06-18 Christian Mauduit (ufoot@ufoot.org) @@ -1042,7 +1191,7 @@ * Bug-fixes concerning custom levels loading * Network bug-fix concerning disconnection at game start - + 2002-06-10 Christian Mauduit (ufoot@ufoot.org) @@ -1053,25 +1202,25 @@ which had 15 characters. * Bug-fix in the meta-server (chat messages) - + 2002-06-06 Christian Mauduit (ufoot@ufoot.org) * Applied patch sent by Colin Stewart on dnsutil.c (the game would not compile on Debian Potato). - + 2002-06-04 Christian Mauduit (ufoot@ufoot.org) - * Fixed some custom ressources stuff. + * Fixed some custom ressources stuff. * Released 5.5.0 - - + + 2002-06-03 Christian Mauduit (ufoot@ufoot.org) - * Fixed a "color" bug which occured with 6 teams in a network game. - + * Fixed a "color" bug which occured with 6 teams in a network game. + * Fixed some DOS and Windows bugs * Updated the docs. @@ -1085,12 +1234,12 @@ and therefore does not accept any more teams. * Added date and time to the server log. - + 2002-05-30 Christian Mauduit (ufoot@ufoot.org) * Added a "chat" functionnality to the meta-server - + * Finished the French menus @@ -1102,7 +1251,7 @@ * In a network game, it's now the first connected players who chooses which level will be played - the choice used to be done by the last connected player. - + 2002-05-28 Christian Mauduit (ufoot@ufoot.org) @@ -1152,17 +1301,17 @@ menu. Should prevent from some random GUI errors. * The mouse cursor is now hidden during the game - + * Added player name support in the "Scores" menu. Works in both network and local modes. - + 2002-05-04 Christian Mauduit (ufoot@ufoot.org) - * Updated the "Teams" menu. As suggested by Frode Haugsgjerd, the + * Updated the "Teams" menu. As suggested by Frode Haugsgjerd, the "Human/Cpu" choice has been replaced by a "Human/Cpu/Off" choice. A player name has also been added - however it's not used yet. - + * Removed the "NICKNAME" from network code, which is useless since player names are about to be implemented. @@ -1193,13 +1342,13 @@ * Minor fix in configure.in. - + 2002-04-02 Christian Mauduit (ufoot@ufoot.org) * Added fodder.mid, composed by Tim Chadburn. * Added Tim Chadburn's documentation about OSS midi. - + 2002-03-21 Christian Mauduit (ufoot@ufoot.org) @@ -1229,7 +1378,7 @@ 2002-03-11 Christian Mauduit (ufoot@ufoot.org) - + * Version 5.4.5 rleased * Added midi music support. Midi files contributed by Tim Chadburn. @@ -1258,7 +1407,7 @@ Makefile won't try to build such doc if it's not available. * It's now possible to compile an optimized version of Liquid War - (for i686 for instance) using ./configure --target=xxx. + (for i686 for instance) using ./configure --target=xxx. * Various bug-fixes and enhancements in the ./configure script and in the makefiles. @@ -1289,7 +1438,7 @@ * Added some basic scripts to automatically build the various releases * Added a liquidwar.spec file so that it's easy to build a rpm - + 2001-07-23 Christian Mauduit (ufoot@ufoot.org) @@ -1375,7 +1524,7 @@ * I updated the GNU/Linux version so that it has all the features of the old dos version (including the "wave effect"). - * A starter kit has been prepared, it a lighter version with a + * A starter kit has been prepared, it a lighter version with a pred-built light datafile.It makes it easier to download LW quickly and try it out before downloading the full version. This implies that now one can use datafiles with any number @@ -1447,5 +1596,3 @@ * version 3.0 released * built with borlandc++ 3.0, barely usable. - - diff -Nru liquidwar-5.6.4/config.guess liquidwar-5.6.5/config.guess --- liquidwar-5.6.4/config.guess 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/config.guess 2018-12-23 19:04:36.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -161,6 +162,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -169,7 +171,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -179,7 +181,7 @@ fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -222,7 +224,7 @@ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -268,7 +270,10 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -294,7 +299,7 @@ echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -323,14 +328,33 @@ case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -374,23 +398,23 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -460,8 +484,8 @@ echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -474,7 +498,7 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -531,7 +555,7 @@ echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -574,52 +598,52 @@ 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -639,7 +663,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -710,22 +734,22 @@ exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -749,14 +773,14 @@ exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -780,25 +804,34 @@ i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -828,8 +861,35 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -841,7 +901,18 @@ echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -852,74 +923,33 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + padre:Linux:*:*) + echo sparc-unknown-linux-gnu exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level @@ -929,14 +959,17 @@ *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -944,75 +977,18 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1020,11 +996,11 @@ echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1041,7 +1017,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1056,7 +1032,7 @@ fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1084,10 +1060,13 @@ exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1122,8 +1101,18 @@ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1136,7 +1125,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1156,10 +1145,10 @@ echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1185,11 +1174,11 @@ exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1199,6 +1188,9 @@ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1208,6 +1200,15 @@ SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1217,6 +1218,16 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1232,6 +1243,9 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1277,13 +1291,13 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1298,6 +1312,9 @@ i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1320,11 +1337,11 @@ #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif @@ -1458,9 +1475,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff -Nru liquidwar-5.6.4/config.sub liquidwar-5.6.5/config.sub --- liquidwar-5.6.4/config.sub 2007-10-17 20:00:48.000000000 +0000 +++ liquidwar-5.6.5/config.sub 2018-12-23 19:04:36.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,8 +124,10 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -148,10 +154,13 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -166,10 +175,10 @@ os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -245,17 +254,20 @@ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -268,27 +280,42 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -299,6 +326,18 @@ basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -319,23 +358,26 @@ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -350,27 +392,35 @@ | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -388,7 +438,7 @@ basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -434,6 +484,10 @@ basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -442,10 +496,35 @@ basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -474,8 +553,8 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16 | cr16-*) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -513,6 +592,10 @@ basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -667,6 +750,14 @@ basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -678,10 +769,17 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -778,6 +876,12 @@ np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -808,6 +912,14 @@ basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -852,9 +964,10 @@ ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -909,6 +1022,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -920,6 +1037,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -941,6 +1061,9 @@ basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -997,17 +1120,14 @@ basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown @@ -1076,6 +1196,9 @@ xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1084,6 +1207,10 @@ basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1122,7 +1249,7 @@ we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) @@ -1169,9 +1296,12 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1192,10 +1322,11 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1204,9 +1335,10 @@ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1214,7 +1346,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1253,7 +1385,7 @@ -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1302,7 +1434,7 @@ -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1344,6 +1476,11 @@ -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; -none) ;; *) @@ -1366,7 +1503,10 @@ # system, and we'll never get to this point. case $basic_machine in - spu-*) + score-*) + os=-elf + ;; + spu-*) os=-elf ;; *-acorn) @@ -1378,8 +1518,17 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1406,6 +1555,9 @@ m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1430,7 +1582,7 @@ *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) @@ -1535,7 +1687,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff -Nru liquidwar-5.6.4/configure liquidwar-5.6.5/configure --- liquidwar-5.6.4/configure 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/configure 2018-12-23 19:04:36.000000000 +0000 @@ -1,60 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.69. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -63,20 +84,19 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -87,32 +107,315 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi -done + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -126,13 +429,17 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -147,434 +454,133 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit } -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac -if as_func_ret_success; then - : +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - exitcode=1 - echo as_func_ret_success failed. + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - exitcode=1 - echo positional parameters were not saved. + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS +as_test_x='test -x' +as_executable_p=as_fn_executable_p +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -fi +test -n "$DJDIR" || exec 7<&0 &1 -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -fi +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= # Factoring default headers for most tests. ac_includes_default="\ @@ -612,99 +618,115 @@ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -target -target_cpu -target_vendor -target_os -SNPRINTF -ALLEGRO_CONFIG -ALCFLAGS -ALLIBS -ALLEGRO_DAT -CPP -GREP -EGREP -PTHREAD -GNU_AS -PYTHON -GZIP -LATEX -DVIPS -PDFLATEX -MAKEINFO -ASM -DOC_TXT -DOC_HTML -DOC_MAN -DOC_INFO -DOC_PS -DOC_PDF -DOC_PHP3 -DOC_UWC -DEBUG -EFENCE -STATIC -TARGET_OPT -GMAKE -VERSION -VERSION_REL -VERSION_COMPACT -VERSION_WIN32 +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +VERSION_WIN32 +VERSION_COMPACT +VERSION_REL +VERSION +SRPMS_DIR +RPMS_DIR +GMAKE +GP2X +HOST_OPT +STATIC +EFENCE +DEBUG +DOC_UWC +DOC_PHP +DOC_PDF +DOC_PS +DOC_INFO +DOC_MAN +DOC_HTML +DOC_TXT +ASM +MAKEINFO +PDFLATEX +DVIPS +LATEX +GZIP +PYTHON +GNU_AS +PTHREAD +EGREP +GREP +CPP +ALLEGRO_DAT +ALLIBS +ALCFLAGS +ALLEGRO_CONFIG +SNPRINTF +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_asm +enable_doc_txt +enable_doc_html +enable_doc_man +enable_doc_info +enable_doc_ps +enable_doc_pdf +enable_doc_php +enable_doc_uwc +enable_debug +enable_efence +enable_static +enable_host_opt +' ac_precious_vars='build_alias host_alias target_alias @@ -719,6 +741,8 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -774,8 +798,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -817,13 +842,20 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -836,13 +868,20 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1033,22 +1072,36 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1068,26 +1121,26 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1095,23 +1148,36 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -# Be sure to have absolute directory names. +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1125,8 +1191,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1141,23 +1205,21 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1184,13 +1246,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1230,7 +1290,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1238,9 +1298,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1250,25 +1310,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1276,7 +1336,6 @@ System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi @@ -1285,6 +1344,7 @@ cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-asm Disable assembly code @@ -1294,12 +1354,12 @@ --disable-doc-info Disable info page --disable-doc-ps Disable PostScript doc --disable-doc-pdf Disable PDF doc - --enable-doc-php3 Enable php3 doc + --enable-doc-php Enable php doc --enable-doc-uwc Enable UWiKiCMS doc --enable-debug Enable debug mode --enable-efence Enable electric fence --enable-static Enable static link - --disable-target-opt Disable target specific optimizations + --disable-host-opt Disable host specific optimizations Some influential environment variables: CC C compiler command @@ -1307,13 +1367,14 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1321,15 +1382,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1365,7 +1428,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1375,21 +1438,372 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1425,8 +1839,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1460,12 +1874,12 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1481,13 +1895,13 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1499,11 +1913,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1512,12 +1924,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1536,128 +1949,136 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1671,66 +2092,62 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1742,10 +2159,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1755,25 +2172,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1782,10 +2199,10 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1795,25 +2212,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -1821,12 +2238,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -1839,10 +2252,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1852,25 +2265,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1879,10 +2292,10 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1893,18 +2306,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -1923,11 +2336,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1938,10 +2351,10 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1951,25 +2364,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1982,10 +2395,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1995,25 +2408,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2025,12 +2438,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2040,51 +2449,37 @@ fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2096,42 +2491,38 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2141,14 +2532,14 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2167,78 +2558,41 @@ else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2246,37 +2600,90 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2288,51 +2695,46 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2346,54 +2748,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2404,34 +2786,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2442,35 +2801,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2481,42 +2817,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2532,23 +2844,18 @@ CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2600,31 +2907,9 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -2635,17 +2920,19 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2671,9 +2958,7 @@ fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2687,35 +2972,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2731,28 +3008,24 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2768,133 +3041,10 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6; } -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -{ echo "$as_me:$LINENO: checking for snprintf" >&5 -echo $ECHO_N "checking for snprintf... $ECHO_C" >&6; } -if test "${ac_cv_func_snprintf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define snprintf to an innocuous variant, in case declares snprintf. - For example, HP-UX 11i declares gettimeofday. */ -#define snprintf innocuous_snprintf - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char snprintf (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef snprintf - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char snprintf (); -/* 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_snprintf || defined __stub___snprintf -choke me -#endif - -int -main () -{ -return snprintf (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_snprintf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_snprintf=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_snprintf" >&5 -echo "${ECHO_T}$ac_cv_func_snprintf" >&6; } -if test $ac_cv_func_snprintf = yes; then +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes; then : SNPRINTF=yes else SNPRINTF=no @@ -2903,2795 +3053,654 @@ - -# Extract the first word of "allegro-config", so it can be a program name with args. -set dummy allegro-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ALLEGRO_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ALLEGRO_CONFIG"; then - ac_cv_prog_ALLEGRO_CONFIG="$ALLEGRO_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ALLEGRO_CONFIG="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ALLEGRO_CONFIG" && ac_cv_prog_ALLEGRO_CONFIG="no" -fi -fi -ALLEGRO_CONFIG=$ac_cv_prog_ALLEGRO_CONFIG -if test -n "$ALLEGRO_CONFIG"; then - { echo "$as_me:$LINENO: result: $ALLEGRO_CONFIG" >&5 -echo "${ECHO_T}$ALLEGRO_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -if test $ALLEGRO_CONFIG != "yes"; then - { { echo "$as_me:$LINENO: error: Unable to find allegro-config - this tool is normally installed by Allegro and must be placed in a directory which is in your PATH. Allegro is a game programming library required by Liquid War. It is available on http://www.talula.demon.co.uk/allegro/. You need to install the complete Allegro developpement package to build Liquid War." >&5 -echo "$as_me: error: Unable to find allegro-config - this tool is normally installed by Allegro and must be placed in a directory which is in your PATH. Allegro is a game programming library required by Liquid War. It is available on http://www.talula.demon.co.uk/allegro/. You need to install the complete Allegro developpement package to build Liquid War." >&2;} - { (exit 1); exit 1; }; } -fi; - - -echo -n "checking for Allegro... " -ALCFLAGS=`allegro-config --cflags 2>/dev/null` -ALLIBS=`allegro-config --libs 2>/dev/null` -ALVERSION=`allegro-config --version 2>/dev/null` -ALDVERSION=`echo ALVERSION | awk 'BEGIN { FS = "."; } { printf "%d",($1 * 1000 + $2) * 1000 + $3;}'` - - - - -if test -z "$ALVERSION" ; then - { { echo "$as_me:$LINENO: error: Allegro does not seem to be correctly installed - please reinstall it and keep in mind that you need the complete Allegro developpement package." >&5 -echo "$as_me: error: Allegro does not seem to be correctly installed - please reinstall it and keep in mind that you need the complete Allegro developpement package." >&2;} - { (exit 1); exit 1; }; } -fi - -if test $ALDVERSION -gt 4002000 ; then - { { echo "$as_me:$LINENO: error: An old version of Allegro ($ALVERSION) has been detected - please upgrade to 4.2.0 or better." >&5 -echo "$as_me: error: An old version of Allegro ($ALVERSION) has been detected - please upgrade to 4.2.0 or better." >&2;} - { (exit 1); exit 1; }; } -else - echo "found $ALVERSION". -fi - -#AC_CHECK_HEADER(allegro.h,,[AC_MSG_ERROR(Missing some include file. Please reinstall Allegro.)]) - -#AC_CHECK_LIB(alleg,main,,[AC_MSG_ERROR(Compilation probe failed. Please check your Allegro installation.)]) - -# Extract the first word of "dat", so it can be a program name with args. -set dummy dat; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ALLEGRO_DAT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ALLEGRO_DAT"; then - ac_cv_prog_ALLEGRO_DAT="$ALLEGRO_DAT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ALLEGRO_DAT="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ALLEGRO_DAT" && ac_cv_prog_ALLEGRO_DAT="no" -fi -fi -ALLEGRO_DAT=$ac_cv_prog_ALLEGRO_DAT -if test -n "$ALLEGRO_DAT"; then - { echo "$as_me:$LINENO: result: $ALLEGRO_DAT" >&5 -echo "${ECHO_T}$ALLEGRO_DAT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -if test $ALLEGRO_DAT != "yes"; then - { { echo "$as_me:$LINENO: error: Couldn't find the allegro datafile compiler - please install the complete Allegro package with all its developper tools. The end-user package is not enough to compile Liquid War." >&5 -echo "$as_me: error: Couldn't find the allegro datafile compiler - please install the complete Allegro package with all its developper tools. The end-user package is not enough to compile Liquid War." >&2;} - { (exit 1); exit 1; }; } -fi; - - - -#cat <&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -if test "${ac_cv_header_arpa_inet_h+set}" = set; then - { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 -echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_arpa_inet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 -echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5 -echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5 -echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 -echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_arpa_inet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_arpa_inet_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 -echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; } - -fi -if test $ac_cv_header_arpa_inet_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi - - -if test "${ac_cv_header_ctype_h+set}" = set; then - { echo "$as_me:$LINENO: checking for ctype.h" >&5 -echo $ECHO_N "checking for ctype.h... $ECHO_C" >&6; } -if test "${ac_cv_header_ctype_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_ctype_h" >&5 -echo "${ECHO_T}$ac_cv_header_ctype_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking ctype.h usability" >&5 -echo $ECHO_N "checking ctype.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking ctype.h presence" >&5 -echo $ECHO_N "checking ctype.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: ctype.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ctype.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ctype.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ctype.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ctype.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ctype.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ctype.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ctype.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ctype.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ctype.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ctype.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ctype.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ctype.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ctype.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ctype.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ctype.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for ctype.h" >&5 -echo $ECHO_N "checking for ctype.h... $ECHO_C" >&6; } -if test "${ac_cv_header_ctype_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_ctype_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_ctype_h" >&5 -echo "${ECHO_T}$ac_cv_header_ctype_h" >&6; } - -fi -if test $ac_cv_header_ctype_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi - - -if test "${ac_cv_header_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for errno.h" >&5 -echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; } -if test "${ac_cv_header_errno_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_errno_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking errno.h usability" >&5 -echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking errno.h presence" >&5 -echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for errno.h" >&5 -echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; } -if test "${ac_cv_header_errno_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_errno_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_errno_h" >&6; } - -fi -if test $ac_cv_header_errno_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi - - -if test "${ac_cv_header_fcntl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for fcntl.h" >&5 -echo $ECHO_N "checking for fcntl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_fcntl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_fcntl_h" >&5 -echo "${ECHO_T}$ac_cv_header_fcntl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking fcntl.h usability" >&5 -echo $ECHO_N "checking fcntl.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking fcntl.h presence" >&5 -echo $ECHO_N "checking fcntl.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: fcntl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: fcntl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: fcntl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: fcntl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: fcntl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: fcntl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: fcntl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: fcntl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: fcntl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: fcntl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: fcntl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: fcntl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: fcntl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fcntl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: fcntl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: fcntl.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for fcntl.h" >&5 -echo $ECHO_N "checking for fcntl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_fcntl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +# Extract the first word of "allegro-config", so it can be a program name with args. +set dummy allegro-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ALLEGRO_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_fcntl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_fcntl_h" >&5 -echo "${ECHO_T}$ac_cv_header_fcntl_h" >&6; } + if test -n "$ALLEGRO_CONFIG"; then + ac_cv_prog_ALLEGRO_CONFIG="$ALLEGRO_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ALLEGRO_CONFIG="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + test -z "$ac_cv_prog_ALLEGRO_CONFIG" && ac_cv_prog_ALLEGRO_CONFIG="no" fi -if test $ac_cv_header_fcntl_h = yes; then - : +fi +ALLEGRO_CONFIG=$ac_cv_prog_ALLEGRO_CONFIG +if test -n "$ALLEGRO_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALLEGRO_CONFIG" >&5 +$as_echo "$ALLEGRO_CONFIG" >&6; } else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -if test "${ac_cv_header_netinet_in_h+set}" = set; then - { echo "$as_me:$LINENO: checking for netinet/in.h" >&5 -echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; } -if test "${ac_cv_header_netinet_in_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5 -echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5 -echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi +if test $ALLEGRO_CONFIG != "yes"; then + as_fn_error $? "Unable to find allegro-config - this tool is normally installed by Allegro and must be placed in a directory which is in your PATH. Allegro is a game programming library required by Liquid War. It is available on http://www.talula.demon.co.uk/allegro/. You need to install the complete Allegro developpement package to build Liquid War." "$LINENO" 5 +fi; -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5 -echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +echo -n "checking for Allegro... " +ALCFLAGS=`allegro-config --cflags 2>/dev/null` +ALLIBS=`allegro-config --libs 2>/dev/null` +ALVERSION=`allegro-config --version 2>/dev/null` +ALDVERSION=`echo ALVERSION | awk 'BEGIN { FS = "."; } { printf "%d",($1 * 1000 + $2) * 1000 + $3;}'` - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5 -echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; } -if test "${ac_cv_header_netinet_in_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_netinet_in_h=$ac_header_preproc +if test -z "$ALVERSION" ; then + as_fn_error $? "Allegro does not seem to be correctly installed - please reinstall it and keep in mind that you need the complete Allegro developpement package." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5 -echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; } -fi -if test $ac_cv_header_netinet_in_h = yes; then - : +if test $ALDVERSION -gt 4002000 ; then + as_fn_error $? "An old version of Allegro ($ALVERSION) has been detected - please upgrade to 4.2.0 or better." "$LINENO" 5 else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } + echo "found $ALVERSION". fi +#AC_CHECK_HEADER(allegro.h,,[AC_MSG_ERROR(Missing some include file. Please reinstall Allegro.)]) -if test "${ac_cv_header_pthread_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } +#AC_CHECK_LIB(alleg,main,,[AC_MSG_ERROR(Compilation probe failed. Please check your Allegro installation.)]) + +# Extract the first word of "dat", so it can be a program name with args. +set dummy dat; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ALLEGRO_DAT+:} false; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking pthread.h usability" >&5 -echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + if test -n "$ALLEGRO_DAT"; then + ac_cv_prog_ALLEGRO_DAT="$ALLEGRO_DAT" # Let the user override the test. else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ALLEGRO_DAT="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_header_compiler=no + test -z "$ac_cv_prog_ALLEGRO_DAT" && ac_cv_prog_ALLEGRO_DAT="no" +fi +fi +ALLEGRO_DAT=$ac_cv_prog_ALLEGRO_DAT +if test -n "$ALLEGRO_DAT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALLEGRO_DAT" >&5 +$as_echo "$ALLEGRO_DAT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking pthread.h presence" >&5 -echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi +if test $ALLEGRO_DAT != "yes"; then + as_fn_error $? "Couldn't find the allegro datafile compiler - please install the complete Allegro package with all its developper tools. The end-user package is not enough to compile Liquid War." "$LINENO" 5 +fi; -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } +#cat <&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi -if test "${ac_cv_header_signal_h+set}" = set; then - { echo "$as_me:$LINENO: checking for signal.h" >&5 -echo $ECHO_N "checking for signal.h... $ECHO_C" >&6; } -if test "${ac_cv_header_signal_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_signal_h" >&5 -echo "${ECHO_T}$ac_cv_header_signal_h" >&6; } +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking signal.h usability" >&5 -echo $ECHO_N "checking signal.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_compiler=no +else + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking signal.h presence" >&5 -echo $ECHO_N "checking signal.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: signal.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: signal.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: signal.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: signal.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: signal.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: signal.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: signal.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: signal.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: signal.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: signal.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: signal.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: signal.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: signal.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: signal.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: signal.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: signal.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for signal.h" >&5 -echo $ECHO_N "checking for signal.h... $ECHO_C" >&6; } -if test "${ac_cv_header_signal_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - ac_cv_header_signal_h=$ac_header_preproc + # Passes both tests. +ac_preproc_ok=: +break fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_signal_h" >&5 -echo "${ECHO_T}$ac_cv_header_signal_h" >&6; } +rm -f conftest.err conftest.i conftest.$ac_ext -fi -if test $ac_cv_header_signal_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi + done + ac_cv_prog_CPP=$CPP -if test "${ac_cv_header_stdio_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdio.h" >&5 -echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdio_h" >&6; } + CPP=$ac_cv_prog_CPP else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdio.h usability" >&5 -echo $ECHO_N "checking stdio.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_compiler=no +else + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking stdio.h presence" >&5 -echo $ECHO_N "checking stdio.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdio.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdio.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdio.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdio.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdio.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdio.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdio.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdio.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdio.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdio.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdio.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdio.h: in the future, the compiler will take precedence" >&2;} +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for stdio.h" >&5 -echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdio_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_stdio_h=$ac_header_preproc + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdio_h" >&6; } -fi -if test $ac_cv_header_stdio_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_path_GREP=$GREP +fi - ac_header_compiler=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac - ac_header_preproc=no + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdlib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -fi -if test $ac_cv_header_stdlib_h = yes; then - : +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } -if test "${ac_cv_header_string_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default #include + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : - ac_header_compiler=no +else + ac_cv_header_stdc=no fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +fi -# Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest* - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } -if test "${ac_cv_header_string_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_string_h=$ac_header_preproc + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi -if test $ac_cv_header_string_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test "${ac_cv_header_sys_socket_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/socket.h" >&5 -echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_socket_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/socket.h usability" >&5 -echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +done -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/socket.h presence" >&5 -echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes; then : + +else + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/socket.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;} +ac_fn_c_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" +if test "x$ac_cv_header_ctype_h" = xyes; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/socket.h" >&5 -echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_socket_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_sys_socket_h=$ac_header_preproc + as_fn_error $? "Missing include file." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6; } -fi -if test $ac_cv_header_sys_socket_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi +ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes; then : -if test "${ac_cv_header_sys_time_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/time.h" >&5 -echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_time_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_time_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/time.h usability" >&5 -echo $ECHO_N "checking sys/time.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/time.h presence" >&5 -echo $ECHO_N "checking sys/time.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes; then : - ac_header_preproc=no +else + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/time.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/time.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/time.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/time.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/time.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/time.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/time.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/time.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/time.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/time.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/time.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/time.h: in the future, the compiler will take precedence" >&2;} +ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/time.h" >&5 -echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_time_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_sys_time_h=$ac_header_preproc + as_fn_error $? "Missing include file." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_time_h" >&6; } -fi -if test $ac_cv_header_sys_time_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi +ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : -if test "${ac_cv_header_sys_types_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/types.h" >&5 -echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/types.h usability" >&5 -echo $ECHO_N "checking sys/types.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/types.h presence" >&5 -echo $ECHO_N "checking sys/types.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = xyes; then : - ac_header_preproc=no +else + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/types.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;} +ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_h" = xyes; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/types.h" >&5 -echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_sys_types_h=$ac_header_preproc + as_fn_error $? "Missing include file." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6; } -fi -if test $ac_cv_header_sys_types_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi +ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : -if test "${ac_cv_header_time_h+set}" = set; then - { echo "$as_me:$LINENO: checking for time.h" >&5 -echo $ECHO_N "checking for time.h... $ECHO_C" >&6; } -if test "${ac_cv_header_time_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5 -echo "${ECHO_T}$ac_cv_header_time_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking time.h usability" >&5 -echo $ECHO_N "checking time.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking time.h presence" >&5 -echo $ECHO_N "checking time.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes; then : - ac_header_preproc=no +else + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: time.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: time.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: time.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: time.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: time.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: time.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: time.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: time.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: time.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: time.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: time.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: time.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: time.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: time.h: in the future, the compiler will take precedence" >&2;} +ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for time.h" >&5 -echo $ECHO_N "checking for time.h... $ECHO_C" >&6; } -if test "${ac_cv_header_time_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_time_h=$ac_header_preproc + as_fn_error $? "Missing include file." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5 -echo "${ECHO_T}$ac_cv_header_time_h" >&6; } -fi -if test $ac_cv_header_time_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } -fi +ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes; then : -if test "${ac_cv_header_unistd_h+set}" = set; then - { echo "$as_me:$LINENO: checking for unistd.h" >&5 -echo $ECHO_N "checking for unistd.h... $ECHO_C" >&6; } -if test "${ac_cv_header_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5 -echo "${ECHO_T}$ac_cv_header_unistd_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking unistd.h usability" >&5 -echo $ECHO_N "checking unistd.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking unistd.h presence" >&5 -echo $ECHO_N "checking unistd.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes; then : - ac_header_preproc=no +else + as_fn_error $? "Missing include file." "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: unistd.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: unistd.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: unistd.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: unistd.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: unistd.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: unistd.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: unistd.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: unistd.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: unistd.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: unistd.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: unistd.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: unistd.h: in the future, the compiler will take precedence" >&2;} +ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = xyes; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for unistd.h" >&5 -echo $ECHO_N "checking for unistd.h... $ECHO_C" >&6; } -if test "${ac_cv_header_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_unistd_h=$ac_header_preproc + as_fn_error $? "Missing include file." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5 -echo "${ECHO_T}$ac_cv_header_unistd_h" >&6; } -fi -if test $ac_cv_header_unistd_h = yes; then - : + +ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes; then : + else - { { echo "$as_me:$LINENO: error: Missing include file." >&5 -echo "$as_me: error: Missing include file." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Missing include file." "$LINENO" 5 fi -{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5709,39 +3718,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_create=no + ac_cv_lib_pthread_pthread_create=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } -if test $ac_cv_lib_pthread_pthread_create = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : PTHREAD="-lpthread" else PTHREAD="-pthread" @@ -5753,10 +3741,10 @@ # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_GNU_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GNU_AS+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$GNU_AS"; then ac_cv_prog_GNU_AS="$GNU_AS" # Let the user override the test. @@ -5766,14 +3754,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GNU_AS="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_GNU_AS" && ac_cv_prog_GNU_AS="no" @@ -5781,11 +3769,11 @@ fi GNU_AS=$ac_cv_prog_GNU_AS if test -n "$GNU_AS"; then - { echo "$as_me:$LINENO: result: $GNU_AS" >&5 -echo "${ECHO_T}$GNU_AS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNU_AS" >&5 +$as_echo "$GNU_AS" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5794,10 +3782,10 @@ # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. @@ -5807,14 +3795,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_PYTHON" && ac_cv_prog_PYTHON="no" @@ -5822,20 +3810,20 @@ fi PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then - { echo "$as_me:$LINENO: result: $PYTHON" >&5 -echo "${ECHO_T}$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_GZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GZIP+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$GZIP"; then ac_cv_prog_GZIP="$GZIP" # Let the user override the test. @@ -5845,14 +3833,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GZIP="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_GZIP" && ac_cv_prog_GZIP="no" @@ -5860,20 +3848,20 @@ fi GZIP=$ac_cv_prog_GZIP if test -n "$GZIP"; then - { echo "$as_me:$LINENO: result: $GZIP" >&5 -echo "${ECHO_T}$GZIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5 +$as_echo "$GZIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_LATEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LATEX+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$LATEX"; then ac_cv_prog_LATEX="$LATEX" # Let the user override the test. @@ -5883,14 +3871,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LATEX="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_LATEX" && ac_cv_prog_LATEX="no" @@ -5898,20 +3886,20 @@ fi LATEX=$ac_cv_prog_LATEX if test -n "$LATEX"; then - { echo "$as_me:$LINENO: result: $LATEX" >&5 -echo "${ECHO_T}$LATEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 +$as_echo "$LATEX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DVIPS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DVIPS+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$DVIPS"; then ac_cv_prog_DVIPS="$DVIPS" # Let the user override the test. @@ -5921,14 +3909,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DVIPS="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_DVIPS" && ac_cv_prog_DVIPS="no" @@ -5936,20 +3924,20 @@ fi DVIPS=$ac_cv_prog_DVIPS if test -n "$DVIPS"; then - { echo "$as_me:$LINENO: result: $DVIPS" >&5 -echo "${ECHO_T}$DVIPS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5 +$as_echo "$DVIPS" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_PDFLATEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PDFLATEX+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$PDFLATEX"; then ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test. @@ -5959,14 +3947,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PDFLATEX="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_PDFLATEX" && ac_cv_prog_PDFLATEX="no" @@ -5974,20 +3962,20 @@ fi PDFLATEX=$ac_cv_prog_PDFLATEX if test -n "$PDFLATEX"; then - { echo "$as_me:$LINENO: result: $PDFLATEX" >&5 -echo "${ECHO_T}$PDFLATEX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 +$as_echo "$PDFLATEX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_MAKEINFO+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MAKEINFO+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$MAKEINFO"; then ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. @@ -5997,14 +3985,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MAKEINFO="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="no" @@ -6012,11 +4000,11 @@ fi MAKEINFO=$ac_cv_prog_MAKEINFO if test -n "$MAKEINFO"; then - { echo "$as_me:$LINENO: result: $MAKEINFO" >&5 -echo "${ECHO_T}$MAKEINFO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 +$as_echo "$MAKEINFO" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6024,39 +4012,44 @@ I386="no" -for i in i386 i486 i586 i686 i786 x86_64 ; do - if test "$i" = "$target_cpu" ; then +for i in i386 i486 i586 i686 ; do + if test "$i" = "$host_cpu" ; then I386="yes" fi; done; -ASM_POSSIBLE="\"$GNU_AS\" = \"yes\" -a \"$I386\" = \"yes\"" +OSX="no" +if echo "$host_os" | grep "arwin"; then + OSX="yes" +fi + +ASM_POSSIBLE="\"$GNU_AS\" = \"yes\" -a \"$I386\" = \"yes\" -a \"OSX\" = \"no\"" -{ echo "$as_me:$LINENO: checking for assembly" >&5 -echo $ECHO_N "checking for assembly... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembly" >&5 +$as_echo_n "checking for assembly... " >&6; } # Check whether --enable-asm was given. -if test "${enable_asm+set}" = set; then +if test "${enable_asm+set}" = set; then : enableval=$enable_asm; if test "$enableval" != "no" -a $ASM_POSSIBLE ; then ASM=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else ASM=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $ASM_POSSIBLE ; then ASM=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else ASM=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi @@ -6071,240 +4064,240 @@ DOC_INFO_POSSIBLE="\"$PYTHON\" = \"yes\" -a \"$GZIP\" = \"yes\" -a \"$MAKEINFO\" = \"yes\"" DOC_PS_POSSIBLE="\"$PYTHON\" = \"yes\" -a \"$LATEX\" = \"yes\" -a \"$DVIPS\" = \"yes\"" DOC_PDF_POSSIBLE="\"$PYTHON\" = \"yes\" -a \"$PDFLATEX\" = \"yes\"" -DOC_PHP3_POSSIBLE="\"$PYTHON\" = \"yes\"" +DOC_PHP_POSSIBLE="\"$PYTHON\" = \"yes\"" DOC_UWC_POSSIBLE="\"$PYTHON\" = \"yes\"" -{ echo "$as_me:$LINENO: checking for plain text doc" >&5 -echo $ECHO_N "checking for plain text doc... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for plain text doc" >&5 +$as_echo_n "checking for plain text doc... " >&6; } # Check whether --enable-doc-txt was given. -if test "${enable_doc_txt+set}" = set; then +if test "${enable_doc_txt+set}" = set; then : enableval=$enable_doc_txt; if test "$enableval" != "no" -a $DOC_TXT_POSSIBLE; then DOC_TXT=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_TXT=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $DOC_TXT_POSSIBLE; then DOC_TXT=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_TXT=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi -{ echo "$as_me:$LINENO: checking for HTML doc" >&5 -echo $ECHO_N "checking for HTML doc... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HTML doc" >&5 +$as_echo_n "checking for HTML doc... " >&6; } # Check whether --enable-doc-html was given. -if test "${enable_doc_html+set}" = set; then +if test "${enable_doc_html+set}" = set; then : enableval=$enable_doc_html; if test "$enableval" != "no" -a $DOC_HTML_POSSIBLE; then DOC_HTML=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_HTML=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $DOC_HTML_POSSIBLE; then DOC_HTML=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_HTML=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi -{ echo "$as_me:$LINENO: checking for man page" >&5 -echo $ECHO_N "checking for man page... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for man page" >&5 +$as_echo_n "checking for man page... " >&6; } # Check whether --enable-doc-man was given. -if test "${enable_doc_man+set}" = set; then +if test "${enable_doc_man+set}" = set; then : enableval=$enable_doc_man; if test "$enableval" != "no" -a $DOC_MAN_POSSIBLE; then DOC_MAN=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_MAN=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $DOC_MAN_POSSIBLE; then DOC_MAN=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_MAN=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi -{ echo "$as_me:$LINENO: checking for info page" >&5 -echo $ECHO_N "checking for info page... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for info page" >&5 +$as_echo_n "checking for info page... " >&6; } # Check whether --enable-doc-info was given. -if test "${enable_doc_info+set}" = set; then +if test "${enable_doc_info+set}" = set; then : enableval=$enable_doc_info; if test "$enableval" != "no" -a $DOC_INFO_POSSIBLE; then DOC_INFO=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_INFO=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $DOC_INFO_POSSIBLE; then DOC_INFO=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_INFO=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi -{ echo "$as_me:$LINENO: checking for PostScript doc" >&5 -echo $ECHO_N "checking for PostScript doc... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostScript doc" >&5 +$as_echo_n "checking for PostScript doc... " >&6; } # Check whether --enable-doc-ps was given. -if test "${enable_doc_ps+set}" = set; then +if test "${enable_doc_ps+set}" = set; then : enableval=$enable_doc_ps; if test "$enableval" != "no" -a $DOC_PS_POSSIBLE; then DOC_PS=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_PS=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $DOC_PS_POSSIBLE; then DOC_PS=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_PS=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi -{ echo "$as_me:$LINENO: checking for PDF doc" >&5 -echo $ECHO_N "checking for PDF doc... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PDF doc" >&5 +$as_echo_n "checking for PDF doc... " >&6; } # Check whether --enable-doc-pdf was given. -if test "${enable_doc_pdf+set}" = set; then +if test "${enable_doc_pdf+set}" = set; then : enableval=$enable_doc_pdf; if test "$enableval" != "no" -a $DOC_PDF_POSSIBLE; then DOC_PDF=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_PDF=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test $DOC_PDF_POSSIBLE; then DOC_PDF=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_PDF=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi -{ echo "$as_me:$LINENO: checking for php3 doc" >&5 -echo $ECHO_N "checking for php3 doc... $ECHO_C" >&6; } -# Check whether --enable-doc-php3 was given. -if test "${enable_doc_php3+set}" = set; then - enableval=$enable_doc_php3; - if test "$enableval" != "no" -a DOC_PHP3_POSSIBLE; then - DOC_PHP3=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for php doc" >&5 +$as_echo_n "checking for php doc... " >&6; } +# Check whether --enable-doc-php was given. +if test "${enable_doc_php+set}" = set; then : + enableval=$enable_doc_php; + if test "$enableval" != "no" -a DOC_PHP_POSSIBLE; then + DOC_PHP=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else - DOC_PHP3=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + DOC_PHP=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else - DOC_PHP3=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + DOC_PHP=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi -{ echo "$as_me:$LINENO: checking for UWiKiCMS doc" >&5 -echo $ECHO_N "checking for UWiKiCMS doc... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UWiKiCMS doc" >&5 +$as_echo_n "checking for UWiKiCMS doc... " >&6; } # Check whether --enable-doc-uwc was given. -if test "${enable_doc_uwc+set}" = set; then +if test "${enable_doc_uwc+set}" = set; then : enableval=$enable_doc_uwc; if test "$enableval" != "no" -a DOC_UWC_POSSIBLE; then DOC_UWC=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DOC_UWC=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else DOC_UWC=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi @@ -6312,106 +4305,106 @@ -{ echo "$as_me:$LINENO: checking for debug mode" >&5 -echo $ECHO_N "checking for debug mode... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug mode" >&5 +$as_echo_n "checking for debug mode... " >&6; } # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; if test "$enableval" != "no"; then DEBUG=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else DEBUG=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else DEBUG=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi -{ echo "$as_me:$LINENO: checking wether electric fence should be used" >&5 -echo $ECHO_N "checking wether electric fence should be used... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking wether electric fence should be used" >&5 +$as_echo_n "checking wether electric fence should be used... " >&6; } # Check whether --enable-efence was given. -if test "${enable_efence+set}" = set; then +if test "${enable_efence+set}" = set; then : enableval=$enable_efence; if test "$enableval" != "no"; then EFENCE=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else EFENCE=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else EFENCE=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi -{ echo "$as_me:$LINENO: checking for static link" >&5 -echo $ECHO_N "checking for static link... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for static link" >&5 +$as_echo_n "checking for static link... " >&6; } # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; if test "$enableval" != "no"; then STATIC=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else STATIC=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else STATIC=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi -{ echo "$as_me:$LINENO: checking for target specific optimizations" >&5 -echo $ECHO_N "checking for target specific optimizations... $ECHO_C" >&6; } -# Check whether --enable-target-opt was given. -if test "${enable_target_opt+set}" = set; then - enableval=$enable_target_opt; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for host specific optimizations" >&5 +$as_echo_n "checking for host specific optimizations... " >&6; } +# Check whether --enable-host-opt was given. +if test "${enable_host_opt+set}" = set; then : + enableval=$enable_host_opt; if test "$I386" == "yes" && test "$enableval" != "no" ; then - TARGET_OPT=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + HOST_OPT=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else - TARGET_OPT=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + HOST_OPT=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi else if test "$I386" == "yes" ; then - TARGET_OPT=yes - { echo "$as_me:$LINENO: result: enabled" >&5 -echo "${ECHO_T}enabled" >&6; } + HOST_OPT=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } else - TARGET_OPT=no - { echo "$as_me:$LINENO: result: disabled" >&5 -echo "${ECHO_T}disabled" >&6; } + HOST_OPT=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } fi fi @@ -6420,12 +4413,27 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gp2x support" >&5 +$as_echo_n "checking for gp2x support... " >&6; } +if echo "$host" | grep "open2x" ; then + GP2X=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5 +$as_echo "enabled" >&6; } +else + GP2X=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } +fi + + + + # Extract the first word of "gmake", so it can be a program name with args. set dummy gmake; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_GMAKE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GMAKE+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$GMAKE"; then ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test. @@ -6435,14 +4443,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GMAKE="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_GMAKE" && ac_cv_prog_GMAKE="no" @@ -6450,17 +4458,17 @@ fi GMAKE=$ac_cv_prog_GMAKE if test -n "$GMAKE"; then - { echo "$as_me:$LINENO: result: $GMAKE" >&5 -echo "${ECHO_T}$GMAKE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 +$as_echo "$GMAKE" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for which GNU Make to use" >&5 -echo $ECHO_N "checking for which GNU Make to use... $ECHO_C" >&6; } -if test "$MAKE" != "" ; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which GNU Make to use" >&5 +$as_echo_n "checking for which GNU Make to use... " >&6; } +if test -n "$MAKE" && which "$MAKE"; then GMAKE=$MAKE else if test "$GMAKE" = "yes" ; then @@ -6469,16 +4477,39 @@ GMAKE=make fi fi -{ echo "$as_me:$LINENO: result: $GMAKE" >&5 -echo "${ECHO_T}$GMAKE" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 +$as_echo "$GMAKE" >&6; } + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for RPMS dir" >&5 +$as_echo_n "checking checking for RPMS dir... " >&6; } +if test -d /root/rpmbuild/RPMS ; then + RPMS_DIR=/root/rpmbuild/RPMS +else + RPMS_DIR=/usr/src/rpm/RPMS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPMS_DIR" >&5 +$as_echo "$RPMS_DIR" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for SRPMS dir" >&5 +$as_echo_n "checking checking for SRPMS dir... " >&6; } +if test -d /root/rpmbuild/SRPMS ; then + SRPMS_DIR=/root/rpmbuild/SRPMS +else + SRPMS_DIR=/usr/src/rpm/SRPMS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SRPMS_DIR" >&5 +$as_echo "$SRPMS_DIR" >&6; } -VERSION="5.6.4" +VERSION="5.6.5" VERSION_REL="1" -VERSION_COMPACT="564" -VERSION_WIN32="5, 6, 4, 1" +VERSION_COMPACT="565" +VERSION_WIN32="5, 6, 5, 1" @@ -6486,7 +4517,7 @@ -ac_config_files="$ac_config_files Makefile src/Makefile src/Makefile.dep src/base.h src/lwwin.rc utils/Makefile data/Makefile data/back/Makefile data/font/Makefile data/map/Makefile data/sfx/Makefile data/texture/Makefile data/maptex/Makefile data/water/Makefile data/music/Makefile doc/Makefile doc/html/index.html doc/tex/liquidwar.tex doc/man/begin.man doc/texi/begin.texi misc/liquidward misc/macosx_info.plist misc/liquidwar.nsi liquidwar.spec" +ac_config_files="$ac_config_files Makefile src/Makefile src/Makefile.dep src/base.h src/lwwin.rc utils/Makefile data/Makefile data/back/Makefile data/font/Makefile data/map/Makefile data/sfx/Makefile data/texture/Makefile data/maptex/Makefile data/water/Makefile data/music/Makefile doc/Makefile doc/html/index.html doc/tex/liquidwar.tex doc/man/begin.man doc/texi/begin.texi misc/liquidward misc/macosx_info.plist misc/liquidwar.nsi misc/docker/Dockerfile-build misc/docker/Dockerfile-server misc/docker/Dockerfile-metaserver liquidwar.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6515,12 +4546,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -6528,8 +4560,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -6551,13 +4583,24 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -6574,6 +4617,12 @@ # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -6600,14 +4649,15 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -6615,12 +4665,14 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -6630,59 +4682,79 @@ debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -6691,20 +4763,19 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -6715,32 +4786,111 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -6754,13 +4904,17 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -6775,131 +4929,118 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -6909,13 +5050,19 @@ exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6928,59 +5075,74 @@ _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files -Report bugs to ." +Report bugs to the package provider." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -6993,25 +5155,30 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -7026,30 +5193,32 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -7078,11 +5247,12 @@ "misc/liquidward") CONFIG_FILES="$CONFIG_FILES misc/liquidward" ;; "misc/macosx_info.plist") CONFIG_FILES="$CONFIG_FILES misc/macosx_info.plist" ;; "misc/liquidwar.nsi") CONFIG_FILES="$CONFIG_FILES misc/liquidwar.nsi" ;; + "misc/docker/Dockerfile-build") CONFIG_FILES="$CONFIG_FILES misc/docker/Dockerfile-build" ;; + "misc/docker/Dockerfile-server") CONFIG_FILES="$CONFIG_FILES misc/docker/Dockerfile-server" ;; + "misc/docker/Dockerfile-metaserver") CONFIG_FILES="$CONFIG_FILES misc/docker/Dockerfile-metaserver" ;; "liquidwar.spec") CONFIG_FILES="$CONFIG_FILES liquidwar.spec" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -7103,203 +5273,194 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -target!$target$ac_delim -target_cpu!$target_cpu$ac_delim -target_vendor!$target_vendor$ac_delim -target_os!$target_os$ac_delim -SNPRINTF!$SNPRINTF$ac_delim -ALLEGRO_CONFIG!$ALLEGRO_CONFIG$ac_delim -ALCFLAGS!$ALCFLAGS$ac_delim -ALLIBS!$ALLIBS$ac_delim -ALLEGRO_DAT!$ALLEGRO_DAT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -PTHREAD!$PTHREAD$ac_delim -GNU_AS!$GNU_AS$ac_delim -PYTHON!$PYTHON$ac_delim -GZIP!$GZIP$ac_delim -LATEX!$LATEX$ac_delim -DVIPS!$DVIPS$ac_delim -PDFLATEX!$PDFLATEX$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -ASM!$ASM$ac_delim -DOC_TXT!$DOC_TXT$ac_delim -DOC_HTML!$DOC_HTML$ac_delim -DOC_MAN!$DOC_MAN$ac_delim -DOC_INFO!$DOC_INFO$ac_delim -DOC_PS!$DOC_PS$ac_delim -DOC_PDF!$DOC_PDF$ac_delim -DOC_PHP3!$DOC_PHP3$ac_delim -DOC_UWC!$DOC_UWC$ac_delim -DEBUG!$DEBUG$ac_delim -EFENCE!$EFENCE$ac_delim -STATIC!$STATIC$ac_delim -TARGET_OPT!$TARGET_OPT$ac_delim -GMAKE!$GMAKE$ac_delim -VERSION!$VERSION$ac_delim -VERSION_REL!$VERSION_REL$ac_delim -VERSION_COMPACT!$VERSION_COMPACT$ac_delim -VERSION_WIN32!$VERSION_WIN32$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES +eval set X " :F $CONFIG_FILES " +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -7318,7 +5479,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -7327,26 +5488,34 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -7356,42 +5525,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7409,20 +5543,15 @@ q } s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -7458,12 +5587,12 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -7471,36 +5600,37 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -7509,21 +5639,25 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -7533,11 +5667,13 @@ done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -7557,7 +5693,11 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff -Nru liquidwar-5.6.4/configure.ac liquidwar-5.6.5/configure.ac --- liquidwar-5.6.4/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/configure.ac 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,560 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +dnl Process this file with autoconf to produce a configure script. + +AC_INIT() + +AC_PROG_CC + +AC_CANONICAL_HOST + +dnl Now we check if we need to use ou own snprintf function +AC_CHECK_FUNC(snprintf,[SNPRINTF=yes],[SNPRINTF=no]) +AC_SUBST(SNPRINTF) + + +dnl Checking for allegro-config, the very-needed Allegro file + +AC_CHECK_PROG(ALLEGRO_CONFIG,allegro-config,yes,no) + +if test $ALLEGRO_CONFIG != "yes"; then + AC_MSG_ERROR(Unable to find allegro-config - this tool is normally installed by Allegro and must be placed in a directory which is in your PATH. Allegro is a game programming library required by Liquid War. It is available on http://www.talula.demon.co.uk/allegro/. You need to install the complete Allegro developpement package to build Liquid War.) +fi; + +dnl Various checks for Allegro + +echo -n "checking for Allegro... " +ALCFLAGS=`allegro-config --cflags 2>/dev/null` +ALLIBS=`allegro-config --libs 2>/dev/null` +ALVERSION=`allegro-config --version 2>/dev/null` +ALDVERSION=`echo ALVERSION | awk 'BEGIN { FS = "."; } { printf "%d",($1 * 1000 + $2) * 1000 + $3;}'` + +AC_SUBST(ALCFLAGS) +AC_SUBST(ALLIBS) + +dnl +dnl main check +dnl +if test -z "$ALVERSION" ; then + AC_MSG_ERROR(Allegro does not seem to be correctly installed - please reinstall it and keep in mind that you need the complete Allegro developpement package.) +fi + +dnl +dnl version check +dnl +if test $ALDVERSION -gt 4002000 ; then + AC_MSG_ERROR(An old version of Allegro ($ALVERSION) has been detected - please upgrade to 4.2.0 or better.) +else + echo "found $ALVERSION". +fi + +dnl disabled this. assume allegro-config doesn't lie and all files are +dnl available +#AC_CHECK_HEADER(allegro.h,,[AC_MSG_ERROR(Missing some include file. Please reinstall Allegro.)]) + +dnl disabled this. assume allegro-config doesn't lie and all files are +dnl available +#AC_CHECK_LIB(alleg,main,,[AC_MSG_ERROR(Compilation probe failed. Please check your Allegro installation.)]) + +dnl very often, dat (the datafile compiler) is not installed, +dnl and we _really_ need it... +AC_CHECK_PROG(ALLEGRO_DAT,dat,yes,no) + +if test $ALLEGRO_DAT != "yes"; then + AC_MSG_ERROR(Couldn't find the allegro datafile compiler - please install the complete Allegro package with all its developper tools. The end-user package is not enough to compile Liquid War.) +fi; + + + +dnl Uncomment this if you want to shock your users +#cat </dev/null` -ALLIBS=`allegro-config --libs 2>/dev/null` -ALVERSION=`allegro-config --version 2>/dev/null` -ALDVERSION=`echo ALVERSION | awk 'BEGIN { FS = "."; } { printf "%d",($1 * 1000 + $2) * 1000 + $3;}'` - -AC_SUBST(ALCFLAGS) -AC_SUBST(ALLIBS) - -dnl -dnl main check -dnl -if test -z "$ALVERSION" ; then - AC_MSG_ERROR(Allegro does not seem to be correctly installed - please reinstall it and keep in mind that you need the complete Allegro developpement package.) -fi - -dnl -dnl version check -dnl -if test $ALDVERSION -gt 4002000 ; then - AC_MSG_ERROR(An old version of Allegro ($ALVERSION) has been detected - please upgrade to 4.2.0 or better.) -else - echo "found $ALVERSION". -fi - -dnl disabled this. assume allegro-config doesn't lie and all files are -dnl available -#AC_CHECK_HEADER(allegro.h,,[AC_MSG_ERROR(Missing some include file. Please reinstall Allegro.)]) - -dnl disabled this. assume allegro-config doesn't lie and all files are -dnl available -#AC_CHECK_LIB(alleg,main,,[AC_MSG_ERROR(Compilation probe failed. Please check your Allegro installation.)]) - -dnl very often, dat (the datafile compiler) is not installed, -dnl and we _really_ need it... -AC_CHECK_PROG(ALLEGRO_DAT,dat,yes,no) - -if test $ALLEGRO_DAT != "yes"; then - AC_MSG_ERROR(Couldn't find the allegro datafile compiler - please install the complete Allegro package with all its developper tools. The end-user package is not enough to compile Liquid War.) -fi; - - - -dnl Uncomment this if you want to shock your users -#cat < Sat, 24 Aug 2019 00:00:27 +0200 + liquidwar (5.6.4-6) unstable; urgency=medium * Team upload. @@ -99,11 +121,11 @@ + replace {Source-Version} by {source:Version} for liquidwar-data + replace {Source-Version} by {binary:Version} for liquidwar-server + Build-depend on quilt. - + * 010_doc.diff: (new patch from old diff.gz) + documentation fixes. - - * 010_misc.diff: (new patch from old diff.gz) + + * 010_misc.diff: (new patch from old diff.gz) + changed color palette of liquidwar_32x32.xpm -- Alexandre Pineau Wed, 25 Oct 2006 01:17:05 +0200 @@ -112,7 +134,7 @@ * Non-maintainer upload. * Add Replaces for liquidwar << 5.6.2-2 in order to ensure - upgradeability from sarge (Closes: #391237) + upgradeability from sarge (Closes: #391237) -- Michael Ablassmeier Fri, 13 Oct 2006 11:29:09 +0200 @@ -129,14 +151,14 @@ liquidwar (5.6.3-1) unstable; urgency=low * New upstream release - - Fixed Joystick support (Closes: 179090) + - Fixed Joystick support (Closes: 179090) * Liquidwar 5.6.3 requires Allegro 4.2, so update Build-Depends to reflect this (Closes: #350859) * update copyright * use debhelper compatibility version 5 - update Build-Depends: debhelper (>= 5) * in doc/xml/rules.xml, correct the name 'Samohyl' to avoid warning in - man page + man page -- Alexandre Pineau Thu, 9 Feb 2006 22:34:33 +0100 @@ -144,14 +166,14 @@ * default screen is now "Windowed" instead of "full screen" (Closes: #262732) - * use quoted strings in menu.liquidwar + * use quoted strings in menu.liquidwar * Standards-Version bumped to 3.6.2.1 -- no changes. * create a liquidwar-server package. Indeed, liquidwar server doesn't depend on X11, so it can be installed now on a server without X Window system. - (Closes: #321812) - * Build-Depend on debhelper (>=4.9.0) to follow the move of menus to - /usr/share/menu - + (Closes: #321812) + * Build-Depend on debhelper (>=4.9.0) to follow the move of menus to + /usr/share/menu + -- Alexandre Pineau Sat, 27 Aug 2005 00:03:28 +0200 liquidwar (5.6.2-1) unstable; urgency=low @@ -165,7 +187,7 @@ * change the call of configure (for autoconf 2.52) * remove the link to PostScript and PDF documentations from HTML documentation * remove autotools from PHONY target - * add 'touch autotools' to autools rule and add autotools to clean target + * add 'touch autotools' to autools rule and add autotools to clean target -- Alexandre Pineau Sun, 15 Feb 2004 18:46:28 +0100 @@ -193,15 +215,15 @@ closes: #198214 * use dpkg-architecture for package building. * add autotools-dev to Build-Depends. - * apply patch from Eduard Bloch to correct some mistakes in the - german translation, closes: #187586 + * apply patch from Eduard Bloch to correct some mistakes in the + german translation, closes: #187586 * Standards-Version bumped to 3.5.10 -- no changes. -- Alexandre Pineau Sat, 12 Jul 2003 20:16:20 +0200 liquidwar (5.5.9-2) unstable; urgency=low - * fixed an issue with gcc 3.3, closes: #197967 + * fixed an issue with gcc 3.3, closes: #197967 -- Alexandre Pineau Thu, 19 Jun 2003 20:15:44 +0200 @@ -209,9 +231,9 @@ * New upstream release, closes: #158143 * New maintainer, closes: #185193 - * Standards-Version bumped to 3.5.9 -- no changes. + * Standards-Version bumped to 3.5.9 -- no changes. * add HTML documentation to doc-base - + -- Alexandre Pineau Sat, 29 Mar 2003 17:47:27 +0100 liquidwar (5.5.8-1) unstable; urgency=low diff -Nru liquidwar-5.6.4/debian/clean liquidwar-5.6.5/debian/clean --- liquidwar-5.6.4/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/debian/clean 2019-08-23 22:00:25.000000000 +0000 @@ -0,0 +1,2 @@ +test +doc/__pycache__/ diff -Nru liquidwar-5.6.4/debian/compat liquidwar-5.6.5/debian/compat --- liquidwar-5.6.4/debian/compat 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -9 diff -Nru liquidwar-5.6.4/debian/control liquidwar-5.6.5/debian/control --- liquidwar-5.6.4/debian/control 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/control 2019-08-23 22:00:25.000000000 +0000 @@ -1,20 +1,19 @@ Source: liquidwar Section: games -Priority: extra +Priority: optional Maintainer: Debian Games Team Uploaders: Barry deFreese , Eduard Bloch Build-Depends: - autotools-dev, - debhelper (>= 9), + debhelper-compat (= 12), liballegro4-dev, - python (>= 2.4), - quilt -Standards-Version: 3.9.8 -Homepage: http://www.ufoot.org/liquidwar/v5 -Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/liquidwar/ -Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/liquidwar/ + python3 +Standards-Version: 4.4.0 +Homepage: https://ufoot.org/liquidwar/v5 +Rules-Requires-Root: no +Vcs-Git: https://salsa.debian.org/games-team/liquidwar.git +Vcs-Browser: https://salsa.debian.org/games-team/liquidwar Package: liquidwar Architecture: any diff -Nru liquidwar-5.6.4/debian/copyright liquidwar-5.6.5/debian/copyright --- liquidwar-5.6.4/debian/copyright 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/copyright 2019-08-23 22:00:25.000000000 +0000 @@ -1,30 +1,159 @@ -This package was debianized by Yann Dirson on -Sun, 1 Oct 2000. - -It was downloaded from http://www.ufoot.org/liquidwar/ - -Upstream Author: Christian Mauduit - -Copyright: -utils/snprintf/snprintf.c: Copyright 1999 Mark Martinec -utils/lwmapgen/*: Copyright 2003 David Redick, Chris Guirl, Christian Mauduit -All others: Copyright 1998-2007 Christian Mauduit - -License: - - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian systems, the complete text of the GNU General Public License -can be found in /usr/share/common-licenses/GPL-2 +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Liquid War +Upstream-Contact: Christian Mauduit +Source: https://ufoot.org/liquidwar/v5 + +Files: * +Copyright: 1998-2018 Christian Mauduit (ufoot@ufoot.org) +License: GPL-2+ + +Files: debian/* +Copyright: 2000-2001 Yann Dirson +License: GPL-2+ + +Files: utils/snprintf/* +Copyright: 1999 Mark Martinec +License: FAL or GPL-2+ + + +Files: utils/lwmapgen/* +Copyright: 2003 David Redick + 2003 Chris Guirl + 2003 Christian Mauduit +License: GPL-2+ + +License: GPL-2+ + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian systems, the complete text of the GNU General Public License + can be found in /usr/share/common-licenses/GPL-2. + +License: FAL + The Frontier Artistic License Version 1.0 + Derived from the Artistic License at OpenSource.org. + Submitted to OpenSource.org for Open Source Initiative certification. + . + Preamble + . + The intent of this document is to state the conditions under which a + Package may be copied, such that the Copyright Holder maintains some + semblance of artistic control over the development of the package, + while giving the users of the package the right to use and distribute + the Package in a more-or-less customary fashion, plus the right to + make reasonable modifications. + . + Definitions + . + "Package" refers to the script, suite, file, or collection of + scripts, suites, and/or files distributed by the Copyright Holder, + and to derivatives of that Package created through textual modification. + . + "Standard Version" refers to such a Package if it has not been + modified, or has been modified in accordance with the wishes of + the Copyright Holder. + . + "Copyright Holder" is whoever is named in the copyright statement + or statements for the package. + . + "You" is you, if you're thinking about copying or distributing + this Package. + . + "Reasonable copying fee" is whatever you can justify on the basis + of media cost, duplication charges, time of people involved, and + so on. (You will not be required to justify it to the Copyright + Holder, but only to the computing community at large as a market + that must bear the fee.) + . + "Freely Available" means that no fee is charged for the item + itself, though there may be fees involved in handling the item. + It also means that recipients of the item may redistribute it under + the same conditions they received it. + . + . + Terms + . + 1. You may make and give away verbatim copies of the source form of + the Standard Version of this Package without restriction, provided + that you duplicate all of the original copyright notices and + associated disclaimers. + . + 2. You may apply bug fixes, portability fixes, and other modifications + derived from the Public Domain or from the Copyright Holder. A Package + modified in such a way shall still be considered the Standard Version. + . + 3. You may otherwise modify your copy of this Package in any way, + provided that you insert a prominent notice in each changed script, + suite, or file stating how and when you changed that script, suite, + or file, and provided that you do at least ONE of the following: + . + a) Use the modified Package only within your corporation or + organization, or retain the modified Package solely for personal use. + . + b) Place your modifications in the Public Domain or otherwise make + them Freely Available, such as by posting said modifications to Usenet + or an equivalent medium, or placing the modifications on a major archive + site such as ftp.uu.net, or by allowing the Copyright Holder to include + your modifications in the Standard Version of the Package. + . + c) Rename any non-standard executables so the names do not conflict + with standard executables, which must also be provided, and provide + a separate manual page (or equivalent) for each non-standard executable + that clearly documents how it differs from the Standard Version. + . + d) Make other distribution arrangements with the Copyright Holder. + . + 4. You may distribute the programs of this Package in object code or + executable form, provided that you do at least ONE of the following: + . + a) Distribute a Standard Version of the executables and library + files, together with instructions (in the manual page or + equivalent) on where to get the Standard Version. + . + b) Accompany the distribution with the machine-readable source of + the Package with your modifications. + . + c) Accompany any non-standard executables with their corresponding + Standard Version executables, give the non-standard executables + non-standard names, and clearly document the differences in manual + pages (or equivalent), together with instructions on where to get + the Standard Version. + . + d) Make other distribution arrangements with the Copyright Holder. + . + 5. You may charge a reasonable copying fee for any distribution of + this Package. You may charge any fee you choose for support of this + Package. You may not charge a fee for this Package itself. However, + you may distribute this Package in aggregate with other (possibly + commercial) programs as part of a larger (possibly commercial) + software distribution provided that you do not advertise this Package + as a product of your own. + . + 6. The scripts and library files supplied as input to or produced as + output from the programs of this Package do not automatically fall + under the copyright of this Package, but belong to whomever generated + them, and may be sold commercially, and may be aggregated with this + Package. + . + 7. Scripts, suites, or programs supplied by you that depend on or + otherwise make use of this Package shall not be considered part of + this Package. + . + 8. The name of the Copyright Holder may not be used to endorse or + promote products derived from this software without specific prior + written permission. + . + 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff -Nru liquidwar-5.6.4/debian/liquidwar-data.dirs liquidwar-5.6.5/debian/liquidwar-data.dirs --- liquidwar-5.6.4/debian/liquidwar-data.dirs 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar-data.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share diff -Nru liquidwar-5.6.4/debian/liquidwar-data.docs liquidwar-5.6.5/debian/liquidwar-data.docs --- liquidwar-5.6.4/debian/liquidwar-data.docs 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar-data.docs 2019-08-23 22:00:25.000000000 +0000 @@ -1,4 +1 @@ -README -README.de -README.dk -README.fr +usr/share/doc/liquidwar/README* diff -Nru liquidwar-5.6.4/debian/liquidwar.dirs liquidwar-5.6.5/debian/liquidwar.dirs --- liquidwar-5.6.4/debian/liquidwar.dirs 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -usr/games -usr/share/applications -usr/share/doc -usr/share/pixmaps diff -Nru liquidwar-5.6.4/debian/liquidwar.install liquidwar-5.6.5/debian/liquidwar.install --- liquidwar-5.6.4/debian/liquidwar.install 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar.install 2019-08-23 22:00:25.000000000 +0000 @@ -1,2 +1,4 @@ usr/games/liquidwar usr/games/liquidwar-mapgen +usr/share/applications +usr/share/pixmaps diff -Nru liquidwar-5.6.4/debian/liquidwar.links liquidwar-5.6.5/debian/liquidwar.links --- liquidwar-5.6.4/debian/liquidwar.links 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar.links 2019-08-23 22:00:25.000000000 +0000 @@ -0,0 +1,3 @@ +usr/share/doc/liquidwar-data usr/share/doc/liquidwar +usr/share/man/man6/liquidwar-server.6.gz usr/share/man/man6/liquidwar-mapgen.6.gz +usr/share/man/man6/liquidwar-server.6.gz usr/share/man/man6/liquidwar.6.gz diff -Nru liquidwar-5.6.4/debian/liquidwar.menu liquidwar-5.6.5/debian/liquidwar.menu --- liquidwar-5.6.4/debian/liquidwar.menu 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar.menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -?package(liquidwar):needs="X11" section="Games/Strategy"\ - title="liquidwar" command="/usr/games/liquidwar"\ - icon="/usr/share/pixmaps/lw_32x32.xpm" diff -Nru liquidwar-5.6.4/debian/liquidwar-server.dirs liquidwar-5.6.5/debian/liquidwar-server.dirs --- liquidwar-5.6.4/debian/liquidwar-server.dirs 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar-server.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/games diff -Nru liquidwar-5.6.4/debian/liquidwar-server.manpages liquidwar-5.6.5/debian/liquidwar-server.manpages --- liquidwar-5.6.4/debian/liquidwar-server.manpages 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/debian/liquidwar-server.manpages 2019-08-23 22:00:25.000000000 +0000 @@ -0,0 +1 @@ +doc/man/liquidwar-server.6.gz diff -Nru liquidwar-5.6.4/debian/not-installed liquidwar-5.6.5/debian/not-installed --- liquidwar-5.6.4/debian/not-installed 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/debian/not-installed 2019-08-23 22:00:25.000000000 +0000 @@ -0,0 +1 @@ +usr/share/doc/liquidwar/COPYING diff -Nru liquidwar-5.6.4/debian/patches/010_doc.diff liquidwar-5.6.5/debian/patches/010_doc.diff --- liquidwar-5.6.4/debian/patches/010_doc.diff 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/010_doc.diff 2019-08-23 22:00:25.000000000 +0000 @@ -7,14 +7,12 @@ doc/html/index.html.in | 2 -- 1 file changed, 2 deletions(-) -diff --git a/doc/html/index.html.in b/doc/html/index.html.in -index 60ca662..3a67d34 100644 --- a/doc/html/index.html.in +++ b/doc/html/index.html.in -@@ -17,8 +17,6 @@ should help you to understand and use Liquid War. +@@ -17,8 +17,6 @@ It is also available: diff -Nru liquidwar-5.6.4/debian/patches/020_misc.diff liquidwar-5.6.5/debian/patches/020_misc.diff --- liquidwar-5.6.4/debian/patches/020_misc.diff 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/020_misc.diff 2019-08-23 22:00:25.000000000 +0000 @@ -6,389 +6,371 @@ misc/liquidwar_32x32.xpm | 425 ++++++----------------------------------------- 1 file changed, 47 insertions(+), 378 deletions(-) -diff --git a/misc/liquidwar_32x32.xpm b/misc/liquidwar_32x32.xpm -index 7c57dc9..6070e5b 100644 --- a/misc/liquidwar_32x32.xpm +++ b/misc/liquidwar_32x32.xpm -@@ -1,380 +1,49 @@ +@@ -1,364 +1,49 @@ /* XPM */ static char * liquidwar_32x32_xpm[] = { --"32 32 345 2", +-"32 32 329 2", -" c None", --". c #005630", --"+ c #000A87", --"@ c #0000CE", --"# c #0000F8", +-". c #00791F", +-"+ c #0001A0", +-"@ c #0000D7", +-"# c #0000FF", -"$ c #0000FE", --"% c #0000FF", --"& c #0000EC", --"* c #0000E6", --"= c #03C906", --"- c #00DF04", --"; c #00FA01", --"> c #00B607", --", c #00474A", --"' c #00009F", --") c #0000DC", --"! c #0000FA", --"~ c #0000F9", --"{ c #476902", --"] c #00F500", --"^ c #00FE00", --"/ c #00E200", --"( c #00681B", --"_ c #00008C", --": c #0000B7", --"< c #0000E3", --"[ c #B60009", --"} c #AF0000", --"| c #4E5200", --"1 c #00EB00", --"2 c #00F000", --"3 c #00772B", --"4 c #000089", --"5 c #0000AE", --"6 c #0000FD", --"7 c #000BB6", --"8 c #B8000C", --"9 c #EE0000", --"0 c #9B0000", --"a c #474A00", --"b c #00DD00", --"c c #007925", --"d c #0000B2", --"e c #0000F4", --"f c #001688", --"g c #00A51C", --"h c #FD0001", --"i c #E90000", --"j c #8E0000", --"k c #355900", --"l c #00DA00", --"m c #00D900", --"n c #00583C", --"o c #0000C4", --"p c #0000E9", --"q c #00186C", --"r c #00A913", --"s c #00F101", --"t c #F10005", +-"% c #05D003", +-"& c #00FE00", +-"* c #01C901", +-"= c #024244", +-"- c #010098", +-"; c #0000E3", +-"> c #764001", +-", c #00EA01", +-"' c #00F400", +-") c #007310", +-"! c #00037A", +-"~ c #0000B4", +-"{ c #0000FA", +-"] c #0000F2", +-"^ c #F90000", +-"/ c #D00000", +-"( c #5C3500", +-"_ c #01EE00", +-": c #00FF00", +-"< c #00861D", +-"[ c #00017B", +-"} c #0000A8", +-"| c #0000F5", +-"1 c #0003D2", +-"2 c #009C40", +-"3 c #FA0000", +-"4 c #FF0000", +-"5 c #B70000", +-"6 c #562800", +-"7 c #00DD00", +-"8 c #00F800", +-"9 c #008B1D", +-"0 c #000780", +-"a c #0000AA", +-"b c #0000F6", +-"c c #0100FC", +-"d c #0105A7", +-"e c #00991F", +-"f c #FD0000", +-"g c #F70000", +-"h c #950000", +-"i c #3C3800", +-"j c #00D700", +-"k c #00ED00", +-"l c #00642B", +-"m c #000082", +-"n c #0000BA", +-"o c #0000FD", +-"p c #0000F0", +-"q c #020383", +-"r c #019D11", +-"s c #00FC00", +-"t c #FB0000", -"u c #FE0000", --"v c #F80000", --"w c #B50000", --"x c #1F7400", --"y c #00DF00", --"z c #00DB01", --"A c #003F4D", --"B c #000096", --"C c #0000DF", --"D c #0000F0", --"E c #00245C", --"F c #00A60A", --"G c #00FB00", --"H c #00CF02", --"I c #CC0008", --"J c #F70000", --"K c #A50000", --"L c #117500", --"M c #00D100", --"N c #00D903", --"O c #003B57", --"P c #0000AC", --"Q c #003B46", --"R c #009702", --"S c #00F100", --"T c #DF0004", --"U c #930000", --"V c #096D02", --"W c #00B200", --"X c #00FC00", --"Y c #00AD08", --"Z c #002865", --"` c #0000B8", --" . c #004F30", --".. c #00BC00", --"+. c #00FF00", --"@. c #00E303", --"#. c #FB0001", --"$. c #CC0000", --"%. c #750700", --"&. c #006002", --"*. c #00AE00", --"=. c #00F600", --"-. c #008F0D", --";. c #002170", --">. c #0000D0", --",. c #0000DD", --"'. c #000295", --"). c #007708", --"!. c #00D500", --"~. c #00C803", --"{. c #B00017", --"]. c #FD0000", --"^. c #590B02", --"/. c #006200", --"(. c #00EF00", --"_. c #007C0D", --":. c #001D73", --"<. c #0000B4", --"[. c #0000ED", --"}. c #0000EF", --"|. c #0000CC", --"1. c #0000CA", --"2. c #0000E5", --"3. c #0000EA", --"4. c #0000B9", --"5. c #002965", --"6. c #008C00", --"7. c #00D000", --"8. c #DB001A", --"9. c #A90000", --"0. c #420D0E", --"a. c #006D00", --"b. c #00CF00", --"c. c #007B0B", --"d. c #00175C", --"e. c #0000A0", --"f. c #0000CF", --"g. c #0008AA", --"h. c #002A68", --"i. c #00345B", --"j. c #003161", --"k. c #0006A5", --"l. c #0000AF", --"m. c #00028B", --"n. c #004933", --"o. c #00BA00", --"p. c #00D300", --"q. c #00690F", --"r. c #F60000", --"s. c #9E0000", --"t. c #4D2B04", --"u. c #008900", --"v. c #00E500", --"w. c #00B809", --"x. c #002448", --"y. c #000070", --"z. c #00097B", --"A. c #006326", --"B. c #008A01", --"C. c #008700", --"D. c #007B00", --"E. c #00502E", --"F. c #000A7A", --"G. c #001256", --"H. c #005C11", --"I. c #00CC00", --"J. c #005628", --"K. c #F30000", --"L. c #980000", --"M. c #3C4800", --"N. c #00AA00", --"O. c #00DF01", --"P. c #004D2A", --"Q. c #001555", --"R. c #004A2F", --"S. c #008D00", --"T. c #00A900", --"U. c #00BE00", --"V. c #00A400", --"W. c #006F03", --"X. c #00312C", --"Y. c #002B43", --"Z. c #008104", --"`. c #00EE00", --" + c #00F700", --".+ c #00AB01", --"++ c #003742", --"@+ c #FF0000", --"#+ c #FB0000", --"$+ c #304400", --"%+ c #00A700", --"&+ c #00F800", --"*+ c #00DE00", --"=+ c #00B800", --"-+ c #00AB00", --";+ c #00C200", --">+ c #00F400", --",+ c #00FD00", --"'+ c #00D700", --")+ c #008406", --"!+ c #005A10", --"~+ c #009600", --"{+ c #00F900", --"]+ c #008808", --"^+ c #002654", --"/+ c #FE0001", --"(+ c #FC0000", --"_+ c #A60000", --":+ c #3A3700", --"<+ c #009500", --"[+ c #00F300", --"}+ c #00BF00", --"|+ c #007912", --"1+ c #001C5E", --"2+ c #E1000A", --"3+ c #F10000", --"4+ c #B00000", --"5+ c #6D0D00", --"6+ c #046500", --"7+ c #00CA00", --"8+ c #00E900", --"9+ c #006726", --"0+ c #DF0006", --"a+ c #E20000", --"b+ c #2E3800", --"c+ c #00B000", --"d+ c #00CB00", --"e+ c #009400", --"f+ c #068900", --"g+ c #097C00", --"h+ c #00AF00", --"i+ c #00EC00", --"j+ c #00A800", --"k+ c #005041", --"l+ c #F70002", --"m+ c #DF0000", --"n+ c #720B00", --"o+ c #1D6B00", --"p+ c #00E400", --"q+ c #00CD00", --"r+ c #027A00", --"s+ c #0E6F00", --"t+ c #224F00", --"u+ c #4E1900", --"v+ c #491600", --"w+ c #0D6C00", --"x+ c #008606", --"y+ c #001790", --"z+ c #F60002", --"A+ c #B60000", --"B+ c #611400", --"C+ c #2D6C00", --"D+ c #068300", --"E+ c #018600", --"F+ c #0F6800", --"G+ c #462C00", --"H+ c #671900", --"I+ c #770900", --"J+ c #780000", --"K+ c #6D0300", --"L+ c #414200", --"M+ c #00B900", --"N+ c #00E600", --"O+ c #00C400", --"P+ c #007D01", --"Q+ c #005549", --"R+ c #0001DC", --"S+ c #F00000", --"T+ c #8F0000", --"U+ c #8E0200", --"V+ c #7F0C00", --"W+ c #900100", --"X+ c #9F0000", --"Y+ c #9C0000", --"Z+ c #9A0000", --"`+ c #890000", --" @ c #75000F", --".@ c #004025", --"+@ c #007A02", --"@@ c #007800", --"#@ c #007A04", --"$@ c #003F58", --"%@ c #0005D0", --"&@ c #DA0008", --"*@ c #EF0000", --"=@ c #C20000", --"-@ c #AA0000", --";@ c #AB0000", --">@ c #CF0000", --",@ c #EA0000", --"'@ c #E60000", --")@ c #D10000", --"!@ c #7D0000", --"~@ c #490035", --"{@ c #000C66", --"]@ c #003A35", --"^@ c #006517", --"/@ c #006B11", --"(@ c #005B1C", --"_@ c #00304F", --":@ c #0006BF", --"<@ c #0000E2", --"[@ c #F20003", --"}@ c #BC0000", --"|@ c #5C000B", --"1@ c #190062", --"2@ c #0000BA", --"3@ c #0000D7", --"4@ c #0000B0", --"5@ c #0000D6", --"6@ c #0000D3", --"7@ c #FB0003", --"8@ c #DC0000", --"9@ c #880000", --"0@ c #41003F", --"a@ c #0500C1", --"b@ c #0000F5", --"c@ c #0000FC", --"d@ c #0000F2", --"e@ c #0000F1", --"f@ c #EF0003", --"g@ c #F90000", --"h@ c #E10000", --"i@ c #820002", --"j@ c #4C0025", --"k@ c #0600B6", --"l@ c #0000D9", --"m@ c #CA0008", --"n@ c #850000", --"o@ c #4E0029", --"p@ c #0F0089", --"q@ c #0000D2", --"r@ c #0000F7", --"s@ c #EC0002", --"t@ c #E90004", --"u@ c #D30000", --"v@ c #7E0002", --"w@ c #500024", --"x@ c #250068", --"y@ c #0200C2", --"z@ c #0000E0", --"A@ c #2C002D", --"B@ c #0F007D", --"C@ c #0100A1", --"D@ c #0000D5", +-"v c #C00000", +-"w c #2E5300", +-"x c #00DF00", +-"y c #004F3C", +-"z c #00008C", +-"A c #0000D3", +-"B c #0000F7", +-"C c #000A7A", +-"D c #019B06", +-"E c #00FD00", +-"F c #BA0000", +-"G c #1C5900", +-"H c #00D400", +-"I c #00F500", +-"J c #004C42", +-"K c #0000A2", +-"L c #0000EE", +-"M c #002264", +-"N c #008F00", +-"O c #01EB00", +-"P c #FC0000", +-"Q c #A20100", +-"R c #135501", +-"S c #00B100", +-"T c #00FA00", +-"U c #00D100", +-"V c #003250", +-"W c #0000D5", +-"X c #0000CF", +-"Y c #002F49", +-"Z c #00AF00", +-"` c #00F700", +-" . c #00F200", +-".. c #E20000", +-"+. c #7D0400", +-"@. c #0A4802", +-"#. c #00A500", +-"$. c #00FB00", +-"%. c #00A900", +-"&. c #002560", +-"*. c #0000FC", +-"=. c #000097", +-"-. c #005617", +-";. c #00D500", +-">. c #02FF00", +-",. c #00CE03", +-"'. c #00B400", +-"). c #F80001", +-"!. c #C70000", +-"~. c #5F0700", +-"{. c #074900", +-"]. c #00AD00", +-"^. c #009401", +-"/. c #002167", +-"(. c #0000EF", +-"_. c #0000C7", +-":. c #0000DB", +-"<. c #0000D6", +-"[. c #001674", +-"}. c #007309", +-"|. c #00D000", +-"1. c #01FF00", +-"2. c #00D800", +-"3. c #006870", +-"4. c #C30000", +-"5. c #41050A", +-"6. c #035004", +-"7. c #00C700", +-"8. c #009001", +-"9. c #001654", +-"0. c #00009F", +-"a. c #0000D4", +-"b. c #0000C9", +-"c. c #001E6D", +-"d. c #002C59", +-"e. c #002A64", +-"f. c #0009A4", +-"g. c #0000B8", +-"h. c #0000A1", +-"i. c #00353F", +-"j. c #00E400", +-"k. c #064E4C", +-"l. c #B50000", +-"m. c #501805", +-"n. c #026E02", +-"o. c #00C902", +-"p. c #002042", +-"q. c #000079", +-"r. c #000093", +-"s. c #004245", +-"t. c #008502", +-"u. c #008003", +-"v. c #007800", +-"w. c #004F2C", +-"x. c #00028C", +-"y. c #00016C", +-"z. c #004A16", +-"A. c #00CA00", +-"B. c #01E600", +-"C. c #005B26", +-"D. c #F40000", +-"E. c #AD0000", +-"F. c #4A3500", +-"G. c #00A200", +-"H. c #005025", +-"I. c #00005D", +-"J. c #003436", +-"K. c #008700", +-"L. c #00A400", +-"M. c #00BA00", +-"N. c #009E00", +-"O. c #00262C", +-"P. c #001352", +-"Q. c #007B04", +-"R. c #00E000", +-"S. c #01C400", +-"T. c #003A43", +-"U. c #B30000", +-"V. c #343400", +-"W. c #01FB00", +-"X. c #00D301", +-"Y. c #009C0C", +-"Z. c #009802", +-"`. c #00EA00", +-" + c #00D900", +-".+ c #007304", +-"++ c #003A18", +-"@+ c #008200", +-"#+ c #00EF00", +-"$+ c #019A00", +-"%+ c #002C54", +-"&+ c #BB0000", +-"*+ c #382800", +-"=+ c #008D00", +-"-+ c #00A700", +-";+ c #00D600", +-">+ c #00C800", +-",+ c #018406", +-"'+ c #001F64", +-")+ c #F60000", +-"!+ c #BC0000", +-"~+ c #650C00", +-"{+ c #055600", +-"]+ c #00F000", +-"^+ c #00DA00", +-"/+ c #00F100", +-"(+ c #01CA00", +-"_+ c #007315", +-":+ c #000AB5", +-"<+ c #EB0000", +-"[+ c #A20000", +-"}+ c #2F2200", +-"|+ c #00AC00", +-"1+ c #00F900", +-"2+ c #048800", +-"3+ c #087600", +-"4+ c #00AB00", +-"5+ c #02B900", +-"6+ c #005C2C", +-"7+ c #790000", +-"8+ c #0F6E00", +-"9+ c #00E500", +-"0+ c #00DE00", +-"a+ c #00D200", +-"b+ c #009700", +-"c+ c #027E00", +-"d+ c #0D6700", +-"e+ c #3E2700", +-"f+ c #4B1100", +-"g+ c #066900", +-"h+ c #00C500", +-"i+ c #00C200", +-"j+ c #018D00", +-"k+ c #002A72", +-"l+ c #0000E7", +-"m+ c #C90000", +-"n+ c #590F00", +-"o+ c #296D00", +-"p+ c #078900", +-"q+ c #028700", +-"r+ c #096C00", +-"s+ c #2E3100", +-"t+ c #591C00", +-"u+ c #740C00", +-"v+ c #760000", +-"w+ c #730000", +-"x+ c #443700", +-"y+ c #019500", +-"z+ c #00C100", +-"A+ c #00EC00", +-"B+ c #00E100", +-"C+ c #00B900", +-"D+ c #008900", +-"E+ c #015D35", +-"F+ c #0005E0", +-"G+ c #A70000", +-"H+ c #820000", +-"I+ c #771200", +-"J+ c #641D00", +-"K+ c #760F00", +-"L+ c #920000", +-"M+ c #9B0000", +-"N+ c #940000", +-"O+ c #930000", +-"P+ c #900000", +-"Q+ c #820108", +-"R+ c #113C19", +-"S+ c #008400", +-"T+ c #00A600", +-"U+ c #006D00", +-"V+ c #015B24", +-"W+ c #000AC4", +-"X+ c #F30000", +-"Y+ c #C10000", +-"Z+ c #A40000", +-"`+ c #E80000", +-" @ c #E30000", +-".@ c #D40000", +-"+@ c #8F0000", +-"@@ c #540028", +-"#@ c #04036B", +-"$@ c #003B2B", +-"%@ c #00640D", +-"&@ c #006A09", +-"*@ c #00650A", +-"=@ c #013A32", +-"-@ c #0009B5", +-";@ c #F20000", +-">@ c #D60000", +-",@ c #700000", +-"'@ c #230041", +-")@ c #0000AB", +-"!@ c #0000CC", +-"~@ c #000BB4", +-"{@ c #00119B", +-"]@ c #000E8E", +-"^@ c #0100CB", +-"/@ c #0400F8", +-"(@ c #FA0002", +-"_@ c #F10000", +-":@ c #4C001E", +-"<@ c #0600B6", +-"[@ c #0100FF", +-"}@ c #0100F5", +-"|@ c #FA0001", +-"1@ c #F50000", +-"2@ c #56000A", +-"3@ c #12008E", +-"4@ c #0000FB", +-"5@ c #0100FD", +-"6@ c #EF0000", +-"7@ c #C60000", +-"8@ c #59000F", +-"9@ c #110078", +-"0@ c #0100FE", +-"a@ c #E70000", +-"b@ c #910000", +-"c@ c #5D000B", +-"d@ c #2F0049", +-"e@ c #0C00A6", +-"f@ c #0000DE", +-"g@ c #F30001", +-"h@ c #EC0000", +-"i@ c #600024", +-"j@ c #0C0076", +-"k@ c #0000B2", +-"l@ c #0000DF", +-"m@ c #0100F8", +-"n@ c #0000F4", -" ", -" ", --" . + @ # $ % & * ", --" = - ; > , ' ) $ % % % ! ~ ", --" { ] ^ ^ / ( _ : $ % % % % % % < ", --" [ } | 1 ^ ^ 2 3 4 5 6 % % % % % % 6 7 ", --" 8 9 0 a b ^ ^ / c _ d 6 % % % % % % 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 u u J K L M ^ ^ N O P D $ % % % % % % D Q R S ^ ", --" T u u i U V W ^ X Y Z ) 6 $ % % % % % D ` ...X +.@. ", --" #.u u $.%.&.*.^ =.-.;.>.~ $ % 6 $ % % ,.'.).!.+.^ ~. ", --" {.u u ].} ^./...^ (._.:.<.[.}.|.<.1.2.3.4.5.6.m +.+.7. ", --" 8.u u u 9.0.a.b.^ =.c.d.e.f.g.h.i.j.k.l.m.n.o.] +.+.p.q. ", --" u u u r.s.t.u.v.^ ^ w.x.y.z.A.B.C.D.E.F.G.H.l ^ +.^ I.J. ", --" u u u K.L.M.N.=.^ ^ O.P.Q.R.S.T.U.V.W.X.Y.Z.`.+.+. +.+++ ", --" @+@+@+#+0 $+%+&++.+.G *+=+-+;+>+^ ,+'+)+!+~+{++.X p.]+^+ ", --" /+@+@+(+_+:+<+2 +.+.+.^ {+[+&+^ ^ +.X b =+/ +.+.&+}+|+1+ ", --" 2+@+@+3+4+5+6+7.+.+.^ ^ ,+{+b 7+7+8++.+.^ +.+.+. +..9+ ", --" 0+@+@+#+a+0 b+c+^ ^ ,+G `.d+e+f+g+h+&++.+.+.+.+.i+j+k+ ", --" l+@+@+].m+n+o+p+b.q+=+r+s+t+u+v+w+;+[+^ ^ X `.j+x+y+ ", --" z+@+@+@+].A+B+C+D+E+F+G+H+I+J+K+L+~+M+N+!.O+h+P+Q+R+ ", --" @+@+@+@+S+} T+U+V+W+s.X+Y+Z+`+ @.@+@e+@@a.#@$@%@ ", --" &@@+@+@+u *@=@-@;@>@,@,@'@)@!@~@{@]@^@/@(@_@:@<@ ", --" [@@+@+@+@+u #+#+u @+@+v }@|@1@2@3@1.: 4@5@6@ ", --" 7@@+@+@+@+@+@+@+@+@+8@9@0@a@b@$ c@d@e@D ", --" f@@+@+@+@+@+u g@h@i@j@k@b@% % % % l@ ", --" m@/+@+@+(+h@4+n@o@p@q@c@% % ! r@ ", --" s@t@u@v@w@x@y@z@! % d@~ ", --" A@B@C@5@D@ ", +-" . + @ # # $ # $ $ ", +-" % & & * = - ; # # $ # # # $ ", +-" > , & & ' ) ! ~ { # $ $ $ $ # $ ] ", +-" ^ / ( _ : & : < [ } | # # $ $ $ # # 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 4 v w x : : ' y z A # # $ # o $ # B C D & E ", +-" ^ f u 4 F G H : : I J K L # # $ $ o o # { M N O & s ", +-" P f u f Q R S T : U V W # $ # # # $ # o X Y Z ` & . ", +-" P f u 4 ..+.@.#.s $.%.&.A *.# # $ # # # L =.-.;.: >.,.'. ", +-" ).u u 4 !.~.{.].: ' ^./.~ (.# ; _.:.] b <.[.}.|.: 1.2.3. ", +-" t u u 4 4.5.6.7.: T 8.9.0.a.b.c.d.e.f.g.h.i.].I : 1.j.k. ", +-" u f 4 3 l.m.n.7 : : o.p.q.r.s.t.u.v.w.x.y.z.A.: : : B.C. ", +-" u f 4 D.E.F.G.8 : : I H.I.J.K.L.M.N.v.O.P.Q.R.: : s S.T. ", +-" u u 4 P U.V.G.W.: & : X.Y.Z.%.`.: s +.+++@+#+: : R.$+%+ ", +-" u u 4 4 &+*+=+ .: & & : : ' 8 : : : : R.-+;+: : : >+,+'+ ", +-" P u 4 )+!+~+{+|.: & & E : : ]+^+j /+: : : : & & : (+_+:+ ", +-" P f 4 P <+[+}+|+: : : : 1+2.N.2+3+4+` : & & E : T 5+6+:. ", +-" P P f 4 4 ..7+8+` 9+0+a+b+c+d+e+f+g+h+E : : : $.i+j+k+l+ ", +-" f f u 4 4 m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+U C+D+E+F+ ", +-" P f u 4 4 )+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+@+U+K.V+W+# ", +-" t f u f 4 X+Y+G+Z+m+`+`+ @.@+@@@#@$@%@&@*@=@-@b ", +-" ^ f u 4 u 4 u X+;@u 4 4 4 >@,@'@)@!@~@{@]@^@# /@ ", +-" 3 (@u f 4 4 4 4 4 4 4 _@N+:@<@B [@# { }@# # ", +-" |@f f 4 4 4 u 4 4 1@Z+2@3@4@# $ 5@# # # ", +-" P P f u u 4 6@7@O+8@9@!@5@$ 0@*.*.$ ", +-" P P 4 a@b@c@d@e@f@b $ # *.4@ ", +-" g@h@i@j@k@l@; m@# n@ ", -" ", -" "}; +"32 32 14 1", diff -Nru liquidwar-5.6.4/debian/patches/030_desktop.diff liquidwar-5.6.5/debian/patches/030_desktop.diff --- liquidwar-5.6.4/debian/patches/030_desktop.diff 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/030_desktop.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -From: Debian Games Team -Date: Sat, 20 Aug 2016 03:03:34 +0200 -Subject: _desktop - -=================================================================== ---- - misc/liquidwar.desktop | 15 +++------------ - 1 file changed, 3 insertions(+), 12 deletions(-) - -diff --git a/misc/liquidwar.desktop b/misc/liquidwar.desktop -index 08c89f6..e05215f 100644 ---- a/misc/liquidwar.desktop -+++ b/misc/liquidwar.desktop -@@ -1,19 +1,10 @@ - [Desktop Entry] -+Type=Application - Version=1.0 --Encoding=UTF-8 -- - Name=Liquid War --#Name[fr]=French translation of Name -- - Comment=A unique multiplayer wargame --#Name[fr]=French translation of Comment -- --Type=Application --Categories=Application;Game;ArcadeGame; -- -+Categories=Game;ArcadeGame; - TryExec=liquidwar - Exec=liquidwar --FilePattern=liquidwar -- --Icon=liquidwar.xpm -+Icon=liquidwar - Terminal=false diff -Nru liquidwar-5.6.4/debian/patches/040_nostrip.diff liquidwar-5.6.5/debian/patches/040_nostrip.diff --- liquidwar-5.6.4/debian/patches/040_nostrip.diff 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/040_nostrip.diff 2019-08-23 22:00:25.000000000 +0000 @@ -7,11 +7,9 @@ Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/Makefile.in b/Makefile.in -index d2beb28..9898541 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -109,9 +109,9 @@ install_nolink: install_bin install_data install_custom_map install_custom_textu +@@ -136,9 +136,9 @@ install_bin: src/liquidwar src/liquidwar-server src/liquidwar-mapgen @echo "Installing liquidwar binaries in $(GAMEDIR)." @install -d $(DESTDIR)$(GAMEDIR) diff -Nru liquidwar-5.6.4/debian/patches/050_binutils-gold.diff liquidwar-5.6.5/debian/patches/050_binutils-gold.diff --- liquidwar-5.6.4/debian/patches/050_binutils-gold.diff 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/050_binutils-gold.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -From: Debian Games Team -Date: Sat, 20 Aug 2016 03:03:35 +0200 -Subject: _binutils-gold - ---- - src/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile.in b/src/Makefile.in -index e3a84b8..3df0421 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -250,7 +250,7 @@ liquidwar-server: $(OBJ_FILES_SRV) - - liquidwar-mapgen: $(OBJ_FILES_MAPGEN) - @echo "Linking $@ (target=$(TARGET), debug=$(DEBUG), static=$(STATIC))" -- @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES_MAPGEN) $(PTHREAD) $(EXTERN_LIBS) -+ @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES_MAPGEN) -lm $(PTHREAD) $(EXTERN_LIBS) - - dep: - @find . \ diff -Nru liquidwar-5.6.4/debian/patches/buildflags.patch liquidwar-5.6.5/debian/patches/buildflags.patch --- liquidwar-5.6.4/debian/patches/buildflags.patch 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/buildflags.patch 2019-08-23 22:00:25.000000000 +0000 @@ -0,0 +1,16 @@ +Author: Reiner Herrmann +Description: Honour CPPFLAGS during compilation + Preprocessor flags are passed in CPPFLAGS by the build system, which + for example includes hardening-related flags. + +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -245,7 +245,7 @@ + -DCONFIG_UNIX_SRV=\"$(GAMEDIR)/liquidwar-server\" \ + -DCONFIG_UNIX_GEN=\"$(GAMEDIR)/liquidwar-mapgen\" + +-CMD_CC = $(CC) $(CFLAGS) $(ALCFLAGS) -c $(DEBUG_FLAGS) -Wall -W $(HOST_CPU_CC) $(CONFIG_OPTIONS) $(DEBUG_OPTIONS) $(SPRINTF_OPTIONS) $(ASM_OPTIONS) $(GP2X_OPTIONS) -DUNIX -D_THREAD_SAFE ++CMD_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(ALCFLAGS) -c $(DEBUG_FLAGS) -Wall -W $(HOST_CPU_CC) $(CONFIG_OPTIONS) $(DEBUG_OPTIONS) $(SPRINTF_OPTIONS) $(ASM_OPTIONS) $(GP2X_OPTIONS) -DUNIX -D_THREAD_SAFE + CMD_AS = $(AS) $(ASFLAGS) --32 + + all: $(EXE_FILES) diff -Nru liquidwar-5.6.4/debian/patches/fix_building_with_fix_versions_of_functions.patch liquidwar-5.6.5/debian/patches/fix_building_with_fix_versions_of_functions.patch --- liquidwar-5.6.4/debian/patches/fix_building_with_fix_versions_of_functions.patch 2018-12-09 14:58:54.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/fix_building_with_fix_versions_of_functions.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ ---- a/src/distor.c -+++ b/src/distor.c -@@ -194,7 +194,7 @@ - cycle_tmp /= 2; - speed--; - } -- cycle_tmp = fsqrt (fsqrt (cycle_tmp)) / 2; -+ cycle_tmp = fixsqrt (fixsqrt (cycle_tmp)) / 2; - cycle_tmp /= SCREEN_W; - cycle_tmp *= period; - if (cycle_tmp <= 0) -@@ -203,8 +203,8 @@ - } - cycle_coef = sens * 256 * (itofix (GLOBAL_TICKER % cycle_tmp) / cycle_tmp); - -- f0 = fsin (cycle_coef + freq_coef * period2); -- fp0x0 = (PI_1024 * fcos (cycle_coef + freq_coef * period2)) / 1024; -+ f0 = fixsin (cycle_coef + freq_coef * period2); -+ fp0x0 = (PI_1024 * fixcos (cycle_coef + freq_coef * period2)) / 1024; - - alphax03 = (ampli_cst / 256) * ((fp0x0 - 2 * f0) / 256); - betax02 = (ampli_cst / 256) * ((-fp0x0 + 3 * f0) / 256); -@@ -217,7 +217,7 @@ - } - for (i = period2; i < real_length - period2; ++i) - { -- temp = ((ampli_cos) / 256) * (fcos (cycle_coef + freq_coef * i) / 256); -+ temp = ((ampli_cos) / 256) * (fixcos (cycle_coef + freq_coef * i) / 256); - buffer2[i] = temp / WAVE_SIZE_SCALE; - } - ---- a/src/fighter.c -+++ b/src/fighter.c -@@ -335,7 +335,7 @@ - coef += 256; - - attack[i] = (coef * -- fsqrt (fsqrt (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack -+ fixsqrt (fixsqrt (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack - + cpu_influence[i])))) / (256 * 8); - if (attack[i] >= MAX_FIGHTER_HEALTH) - attack[i] = MAX_FIGHTER_HEALTH - 1; -@@ -343,7 +343,7 @@ - attack[i] = 1; - - defense[i] = (coef * -- fsqrt (fsqrt -+ fixsqrt (fixsqrt - (1 << - (LW_CONFIG_CURRENT_RULES.fighter_defense + - cpu_influence[i])))) / (256 * 256); -@@ -353,7 +353,7 @@ - defense[i] = 1; - - new_health[i] = (coef * -- fsqrt (fsqrt -+ fixsqrt (fixsqrt - (1 << - (LW_CONFIG_CURRENT_RULES.fighter_new_health + - cpu_influence[i])))) / (256 * 4); ---- a/src/palette.c -+++ b/src/palette.c -@@ -88,7 +88,7 @@ - { - int result; - -- result = fsqrt (i * 256) / 256; -+ result = fixsqrt (i * 256) / 256; - if (result > 255) - result = 255; - diff -Nru liquidwar-5.6.4/debian/patches/man-page-has-errors.patch liquidwar-5.6.5/debian/patches/man-page-has-errors.patch --- liquidwar-5.6.4/debian/patches/man-page-has-errors.patch 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/man-page-has-errors.patch 2019-08-23 22:00:25.000000000 +0000 @@ -6,11 +6,9 @@ doc/xml/bugs.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/doc/xml/bugs.xml b/doc/xml/bugs.xml -index 478710d..7a768cd 100644 --- a/doc/xml/bugs.xml +++ b/doc/xml/bugs.xml -@@ -154,7 +154,7 @@ +@@ -139,7 +139,7 @@ @@ -19,17 +17,17 @@ and for the rest of us... -@@ -162,14 +162,14 @@ +@@ -147,14 +147,14 @@ -- ...which creates audio from MIDI using a set of patches -+ which creates audio from MIDI using a set of patches - (more info here: "http://www.talula.demon.co.uk/allegro/digmid.html") +- ...which creates audio from MIDI using a set of patches ++ which creates audio from MIDI using a set of patches + (more info here: "http://www.talula.demon.co.uk/allegro/digmid.html") and plays back through your sound card's audio. - + - ...Which is comprised of the following steps: + Which is comprised of the following steps: diff -Nru liquidwar-5.6.4/debian/patches/python3.patch liquidwar-5.6.5/debian/patches/python3.patch --- liquidwar-5.6.4/debian/patches/python3.patch 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/python3.patch 2019-08-23 22:00:25.000000000 +0000 @@ -0,0 +1,235 @@ +Author: Reiner Herrmann +Description: Port makedoc.py to Python 3 + +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -110,31 +110,31 @@ + + html/%.html: xml/%.xml makedoc.py html/header.inc html/footer.inc + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')" ++ @python3 -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')" + + php/%.php: xml/%.xml makedoc.py + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_php('$@','$<')" ++ @python3 -c "import makedoc; makedoc.make_php('$@','$<')" + + tex/%.tex: xml/%.xml makedoc.py + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_tex('$@','$<')" ++ @python3 -c "import makedoc; makedoc.make_tex('$@','$<')" + + man/%.man: xml/%.xml makedoc.py + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_man('$@','$<')" ++ @python3 -c "import makedoc; makedoc.make_man('$@','$<')" + + txt/%.txt: xml/%.xml makedoc.py + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_txt('$@','$<','Liquid War (v$(VERSION))')" ++ @python3 -c "import makedoc; makedoc.make_txt('$@','$<','Liquid War (v$(VERSION))')" + + texi/%.texi: xml/%.xml makedoc.py + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_texi('$@','$<')" ++ @python3 -c "import makedoc; makedoc.make_texi('$@','$<')" + + uwc/%.uwc: xml/%.xml makedoc.py + @echo Creating $@ from $< +- @python -c "import makedoc; makedoc.make_uwc('$@','$<')" ++ @python3 -c "import makedoc; makedoc.make_uwc('$@','$<')" + + %.gz: % + @if [ -f $< ]; then echo "Compressing $@..."; gzip -c -9 $< > $@; fi +--- a/doc/makedoc.py ++++ b/doc/makedoc.py +@@ -16,14 +16,14 @@ + def remove_duplicate_blanks(text): + result=text + +- result=string.replace(result,"\t"," ") +- result=string.replace(result,"\n"," ") ++ result=result.replace("\t"," ") ++ result=result.replace("\n"," ") + + if (result!=""): + temp="" + while temp!=result: + temp=result +- result=string.replace(result," "," ") ++ result=result.replace(" "," ") + + return result + +@@ -74,11 +74,11 @@ + def format_html(text): + result=text + +- result=string.replace(result,"<","ufoot_html_lt") +- result=string.replace(result,">","ufoot_html_gt") +- result=string.replace(result,"&","&") +- result=string.replace(result,"ufoot_html_lt","<") +- result=string.replace(result,"ufoot_html_gt",">") ++ result=result.replace("<","ufoot_html_lt") ++ result=result.replace(">","ufoot_html_gt") ++ result=result.replace("&","&") ++ result=result.replace("ufoot_html_lt","<") ++ result=result.replace("ufoot_html_gt",">") + + # Uncomment this to make mailing list adresses look like "xxx at xxx" + # instead of "xxx@xxx". This can prevent spammers from harvesting +@@ -97,31 +97,31 @@ + def format_tex(text): + result=text + +- result=string.replace(result,"\\","$\\backslash$") +- result=string.replace(result,"_","\\_") +- result=string.replace(result,"#","\\#") +- result=string.replace(result,"%","\\%") +- result=string.replace(result,"}","\\}") +- result=string.replace(result,"<","$<$") +- result=string.replace(result,">","$>$") +- result=string.replace(result,"~","$\\tilde{}$") ++ result=result.replace("\\","$\\backslash$") ++ result=result.replace("_","\\_") ++ result=result.replace("#","\\#") ++ result=result.replace("%","\\%") ++ result=result.replace("}","\\}") ++ result=result.replace("<","$<$") ++ result=result.replace(">","$>$") ++ result=result.replace("~","$\\tilde{}$") + + return result + + def format_texi(text): + result=text + +- result=string.replace(result,"@","@@") +- result=string.replace(result,"}","@}") +- result=string.replace(result,"{","@{") ++ result=result.replace("@","@@") ++ result=result.replace("}","@}") ++ result=result.replace("{","@{") + + return result + + def format_uwc(text): + result=text + +- result=string.replace(result,"]","]") +- result=string.replace(result,"[","[[") ++ result=result.replace("]","]") ++ result=result.replace("[","[[") + + return result + +@@ -139,8 +139,8 @@ + result=text + + result=format_uwc(result) +- result=string.replace(result,"\n"," ") +- result=string.replace(result,"\r"," ") ++ result=result.replace("\n"," ") ++ result=result.replace("\r"," ") + result=remove_duplicate_blanks(result) + + return result +@@ -208,7 +208,7 @@ + if tag=="code": + self.start_code() + def endElement(self,tag): +- data=string.strip(self.charbuf) ++ data=self.charbuf.strip() + if (data!=""): + self.write(self.translate(data,self.stack[-1])) + self.charbuf="" +@@ -366,7 +366,7 @@ + self.write("\n\\end{verbatim}\n") + def translate(self,data,tag): + result=data +- result=format_email_and_url(result) ++ result=format_email_and_url(result) + if (tag!="code"): + result=format_tex(result) + return result +@@ -405,12 +405,12 @@ + self.write("\n") + def translate(self,data,tag): + result=data +- result=format_email_and_url(result) +- result=string.replace(result,"\\","\\\\") +- result=string.replace(result,".","\.") +- result=string.replace(result,"-","\-") ++ result=format_email_and_url(result) ++ result=result.replace("\\","\\\\") ++ result=result.replace(".","\.") ++ result=result.replace("-","\-") + if (tag=="code"): +- result=string.replace(result,"\n","\n.br\n") ++ result=result.replace("\n","\n.br\n") + else: + result=remove_duplicate_blanks(result) + return result +@@ -460,10 +460,10 @@ + self.write("\n") + def translate(self,data,tag): + result=data +- result=format_email_and_url(result) ++ result=format_email_and_url(result) + if (tag=="code"): + result=" "*self.indent+\ +- string.replace(result,"\n","\n"+" "*self.indent) ++ result.replace("\n","\n"+" "*self.indent) + else: + result=format_text(result,self.indent,80) + if (tag=="elem"): +@@ -505,7 +505,7 @@ + self.write("\n@end example\n") + def translate(self,data,tag): + result=data +- result=format_email_and_url(result) ++ result=format_email_and_url(result) + + if (tag!="code"): + result=remove_duplicate_blanks(result) +@@ -548,7 +548,7 @@ + self.write("\n") + def translate(self,data,tag): + result=data +- result=format_email_and_url(result) ++ result=format_email_and_url(result) + + if (tag=="code"): + result=format_uwc_code(result) +@@ -560,7 +560,7 @@ + return result + + def run_parser(handler,dst,src): +- dst_file=open(dst,"w") ++ dst_file=open(dst,"wb") + src_file=open(src,"r") + #src_code=src_file.read() + parser=xml.sax.make_parser() +@@ -602,8 +602,8 @@ + run_parser(handler,txt_file,xml_file) + + def make_texi(texi_file,xml_file): +- node=string.replace(xml_file,".xml","") +- node=string.replace(node,"xml/","") ++ node=xml_file.replace(".xml","") ++ node=node.replace("xml/","") + parser=xml.sax.make_parser() + handler=XMLToTexi(node) + run_parser(handler,texi_file,xml_file) +--- a/configure.ac ++++ b/configure.ac +@@ -123,7 +123,7 @@ + + + dnl Various checks which will enable/disable some of the doc targets +-AC_CHECK_PROG(PYTHON,python,yes,no) ++AC_CHECK_PROG(PYTHON,python3,yes,no) + AC_CHECK_PROG(GZIP,gzip,yes,no) + AC_CHECK_PROG(LATEX,latex,yes,no) + AC_CHECK_PROG(DVIPS,dvips,yes,no) diff -Nru liquidwar-5.6.4/debian/patches/series liquidwar-5.6.5/debian/patches/series --- liquidwar-5.6.4/debian/patches/series 2018-12-09 14:51:19.000000000 +0000 +++ liquidwar-5.6.5/debian/patches/series 2019-08-23 22:00:25.000000000 +0000 @@ -1,7 +1,6 @@ 010_doc.diff 020_misc.diff -030_desktop.diff 040_nostrip.diff -050_binutils-gold.diff man-page-has-errors.patch -fix_building_with_fix_versions_of_functions.patch +buildflags.patch +python3.patch diff -Nru liquidwar-5.6.4/debian/rules liquidwar-5.6.5/debian/rules --- liquidwar-5.6.4/debian/rules 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/rules 2019-08-23 22:00:25.000000000 +0000 @@ -1,152 +1,28 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# This has to be exported to make some magic below work. -#export DH_OPTIONS +export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -# FOR AUTOCONF 2.52 AND NEWER ONLY -ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) - confflags += --build $(DEB_HOST_GNU_TYPE) -else - confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) -endif - -# disable assembly for amd64, won't work -ifeq ($(DEB_HOST_ARCH_CPU),amd64) - confflags += --disable-asm -endif - -configure: configure-stamp -configure-stamp: autotools - dh_testdir - dh_quilt_patch - ./configure $(confflags) \ - --prefix=/usr --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --bindir=\$${prefix}/games \ - --disable-target-opt \ - CFLAGS="$(CFLAGS)" - sed -i 's/install_nolink: install_bin/install_nolink: /' Makefile - - touch configure-stamp - -# The autotools target adds forced build-time dependencies on -# autotools-dev (for /usr/share/misc/config.*) -# It's also a .PHONY make target. -autotools: - -rm -f config.sub config.guess - ln -s /usr/share/misc/config.sub config.sub - ln -s /usr/share/misc/config.guess config.guess - - touch autotools - -build-indep: build-indep-stamp -build-indep-stamp: configure - dh_testdir -i - $(MAKE) build_data - cd doc; make html_yes - - touch build-indep-stamp - -build-arch: build-arch-stamp -build-arch-stamp: configure - dh_testdir -a - - $(MAKE) build_bin - cd doc; make man/liquidwar.6.gz - - touch build-arch-stamp - -build: build-indep build-arch - -clean: - dh_testdir - dh_testroot - - [ ! -f Makefile ] || $(MAKE) distclean - dh_quilt_unpatch - - rm -f build-arch-stamp build-indep-stamp configure-stamp autotools - rm -f config.sub config.guess - rm -rf .pc - - dh_clean - -#install: DH_OPTIONS= -install-indep: build-indep - dh_testdir -i - dh_testroot -i - dh_prep -i - dh_installdirs -i +%: + dh $@ +override_dh_auto_configure: + dh_auto_configure -- \ + --disable-host-opt \ + --disable-doc-txt \ + --disable-doc-info \ + --disable-doc-ps \ + --disable-doc-pdf + +override_dh_auto_install: $(MAKE) install_nolink DESTDIR=$(CURDIR)/debian/tmp -install-arch: build-arch - dh_testdir -i - dh_testroot -i - dh_prep - dh_installdirs - - $(MAKE) install_bin install_doc DESTDIR=$(CURDIR)/debian/tmp - -install: install-indep install-arch - -# Build architecture-independent files here. -# Pass -i to all debhelper commands in this target to reduce clutter. -binary-indep: #DH_OPTIONS=-i -binary-indep: install-indep - dh_testdir -i - dh_testroot -i - dh_installdocs -i - dh_installchangelogs ChangeLog -i - dh_compress -i - dh_install --sourcedir=debian/tmp -i - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -# Pass -a to all debhelper commands in this target to reduce clutter. -binary-arch: #DH_OPTIONS=-a -binary-arch: install-arch - dh_testdir -a - dh_testroot -a - dh_install --sourcedir=debian/tmp -a - mv doc/man/liquidwar.6.gz doc/man/liquidwar-server.6.gz - dh_installman -pliquidwar-server doc/man/liquidwar-server.6.gz - dh_link -pliquidwar usr/share/man/man6/liquidwar-server.6.gz usr/share/man/man6/liquidwar-mapgen.6.gz - dh_link -pliquidwar usr/share/man/man6/liquidwar-server.6.gz usr/share/man/man6/liquidwar.6.gz - cp misc/liquidwar_32x32.xpm debian/liquidwar/usr/share/pixmaps/lw_32x32.xpm - cp misc/liquidwar.xpm debian/liquidwar/usr/share/pixmaps/ - cp misc/liquidwar.desktop debian/liquidwar/usr/share/applications/ - ln -s liquidwar-data debian/liquidwar/usr/share/doc/liquidwar - dh_installdocs -a - dh_installchangelogs -pliquidwar-server ChangeLog - dh_installmenu -pliquidwar - dh_strip -a - dh_compress -a - dh_fixperms -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a +override_dh_link: + rm -rf debian/liquidwar/usr/share/doc/liquidwar + dh_link -binary: binary-indep binary-arch -.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install-indep install-arch install #autotools +override_dh_installman: + rm -rf debian/tmp/usr/share/man + mv doc/man/liquidwar.6.gz doc/man/liquidwar-server.6.gz + dh_installman diff -Nru liquidwar-5.6.4/debian/watch liquidwar-5.6.5/debian/watch --- liquidwar-5.6.4/debian/watch 2016-08-21 13:23:04.000000000 +0000 +++ liquidwar-5.6.5/debian/watch 2019-08-23 22:00:25.000000000 +0000 @@ -1,3 +1,2 @@ -version=3 - -http://download.savannah.gnu.org/releases/liquidwar/liquidwar-([\d.]+)\.tar\.gz +version=4 +https://ufoot.org/liquidwar/v5 .*/liquidwar-@ANY_VERSION@@ARCHIVE_EXT@ diff -Nru liquidwar-5.6.4/doc/html/footer.inc liquidwar-5.6.5/doc/html/footer.inc --- liquidwar-5.6.4/doc/html/footer.inc 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/html/footer.inc 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@
This documentation is also available on: -www.ufoot.org/liquidwar/v5. +www.ufoot.org/liquidwar/v5.
\ No newline at end of file diff -Nru liquidwar-5.6.4/doc/html/index.html.in liquidwar-5.6.5/doc/html/index.html.in --- liquidwar-5.6.4/doc/html/index.html.in 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/html/index.html.in 2018-12-23 19:04:36.000000000 +0000 @@ -16,7 +16,7 @@

It is also available:

@@ -42,7 +42,7 @@
This documentation is also available on: -www.ufoot.org/liquidwar/v5. +www.ufoot.org/liquidwar/v5.
diff -Nru liquidwar-5.6.4/doc/makedoc.py liquidwar-5.6.5/doc/makedoc.py --- liquidwar-5.6.4/doc/makedoc.py 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/makedoc.py 2018-12-23 19:04:36.000000000 +0000 @@ -284,7 +284,7 @@ result=format_html(result) return result -class XMLToPHP3(XMLToX): +class XMLToPHP(XMLToX): def __init__(self): XMLToX.__init__(self) def start_file(self,title): @@ -581,10 +581,10 @@ header_file.close() footer_file.close() -def make_php3(php3_file,xml_file): +def make_php(php_file,xml_file): parser=xml.sax.make_parser() - handler=(XMLToPHP3()) - run_parser(handler,php3_file,xml_file) + handler=(XMLToPHP()) + run_parser(handler,php_file,xml_file) def make_tex(tex_file,xml_file): parser=xml.sax.make_parser() diff -Nru liquidwar-5.6.4/doc/Makefile.in liquidwar-5.6.5/doc/Makefile.in --- liquidwar-5.6.4/doc/Makefile.in 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/Makefile.in 2018-12-23 19:04:36.000000000 +0000 @@ -5,7 +5,7 @@ DOC_INFO = @DOC_INFO@ DOC_PS = @DOC_PS@ DOC_PDF = @DOC_PDF@ -DOC_PHP3 = @DOC_PHP3@ +DOC_PHP = @DOC_PHP@ DOC_UWC = @DOC_UWC@ VERSION = @VERSION@ @@ -27,7 +27,7 @@ copying HTML_FILES = $(addprefix html/,$(addsuffix .html,$(FILES))) -PHP3_FILES = $(addprefix php3/,$(addsuffix .php3,$(FILES))) +PHP_FILES = $(addprefix php/,$(addsuffix .php,$(FILES))) TEX_FILES = $(addprefix tex/,$(addsuffix .tex,$(FILES))) MAN_FILES = $(addprefix man/,$(addsuffix .man,$(FILES))) TXT_FILES = $(addprefix txt/,$(addsuffix .txt,$(FILES))) @@ -42,7 +42,7 @@ # - if format xxx must be skipped, then the ./configure # script has set $(XXX) to "no" so we build target # xxx_no, which is a "fake" empty target. -all: txt_$(DOC_TXT) html_$(DOC_HTML) man_$(DOC_MAN) info_$(DOC_INFO) ps_$(DOC_PS) pdf_$(DOC_PDF) php3_$(DOC_PHP3) uwc_$(DOC_UWC) +all: txt_$(DOC_TXT) html_$(DOC_HTML) man_$(DOC_MAN) info_$(DOC_INFO) ps_$(DOC_PS) pdf_$(DOC_PDF) php_$(DOC_PHP) uwc_$(DOC_UWC) txt_yes: $(TXT_FILES) @@ -56,7 +56,7 @@ pdf_yes: pdf/liquidwar.pdf -php3_yes: $(PHP3_FILES) +php_yes: $(PHP_FILES) uwc_yes: $(UWC_FILES) @@ -72,7 +72,7 @@ pdf_no: -php3_no: +php_no: uwc_no: @@ -112,9 +112,9 @@ @echo Creating $@ from $< @python -c "import makedoc; makedoc.make_html('$@','$<','html/header.inc','html/footer.inc')" -php3/%.php3: xml/%.xml makedoc.py +php/%.php: xml/%.xml makedoc.py @echo Creating $@ from $< - @python -c "import makedoc; makedoc.make_php3('$@','$<')" + @python -c "import makedoc; makedoc.make_php('$@','$<')" tex/%.tex: xml/%.xml makedoc.py @echo Creating $@ from $< @@ -144,7 +144,7 @@ clean: @rm -f *~ */*~ @rm -f makedoc.pyc - @rm -f $(HTML_FILES) $(PHP3_FILES) $(TEX_FILES) $(MAN_FILES) $(TXT_FILES) $(TEXI_FILES) $(UWC_FILES) + @rm -f $(HTML_FILES) $(PHP_FILES) $(TEX_FILES) $(MAN_FILES) $(TXT_FILES) $(TEXI_FILES) $(UWC_FILES) @rm -f tex/liquidwar.toc tex/liquidwar.log tex/liquidwar.dvi tex/liquidwar.aux ps/liquidwar.ps pdf/liquidwar.pdf man/liquidwar.6 man/liquidwar.6.gz man/liquidwar-server.6.gz man/liquidwar-mapgen.6.gz man/liquidwar.man info/liquidwar.info* texi/liquidwar.texi texi/liquidwar.info* distclean: diff -Nru liquidwar-5.6.4/doc/README liquidwar-5.6.5/doc/README --- liquidwar-5.6.4/doc/README 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/README 2018-12-23 19:04:36.000000000 +0000 @@ -15,7 +15,7 @@ small one indeed) I use is *really* basic, so writting docs is really an easy and quick task for me. 3 - sgmltools was not flexible enough for me. Indeed, I use my little - doc generator to create some of the pages of http://www.ufoot.org. + doc generator to create some of the pages of https://ufoot.org. Therefore I the parser to be able to generate pages with a given look and feel, and for instance I do not like the "prev" and "next" buttons generated on HTML pages by sgmltools. Rather than wasting @@ -31,7 +31,7 @@ - txt : universal reference, readable on *any* computer - man : doc for die-hard man-page users =8-) - texi : texinfo doc (the GNU projet documentation format) -- php3 : what I upload on http://www.ufoot.org +- php : what I upload on https://ufoot.org Note that the parser currently uses xmllib, which is shipped with Python 1.5.2 but is marked as deprecated in Python 2.x. I don't feel diff -Nru liquidwar-5.6.4/doc/xml/algorithm.xml liquidwar-5.6.5/doc/xml/algorithm.xml --- liquidwar-5.6.4/doc/xml/algorithm.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/algorithm.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -37,7 +37,7 @@ The Liquid War algorithm has been invented by my friend - Thomas Colcombet + Thomas Colcombet In fact the Liquid War algorithm has been invented before the game itself. The game came as a consequence of the algorithm, he just thought @@ -57,7 +57,7 @@ - When you have to move lots of different points + When you have to move lots of different points toward one single point. Good thing that's the rule of Liquid War! @@ -213,7 +213,7 @@ Because it allows the module which calculates the gradient to work much faster. With this system, the number of zones is reduced a lot, and calculus on the mesh can go very fast. At the same time, this mesh structure is complicated to understand - by us humans but it's very easy for the computer. + by us humans but it's very easy for the computer.
@@ -239,7 +239,7 @@ pick up a direction between the 12 defined directions. - They have to be chosen is a peculiar order to avoid + They have to be chosen is a peculiar order to avoid weird behaviors from fighters, but let's suppose we just pick up the "next" direction, ie if WSW was chosen the last time, we pick up WNW. @@ -256,7 +256,7 @@ to the cursor, estimated by the algorithm's last pass". - If potential_of_the_neighbor_zone > (potential_of_the_current_zone + size_of_the_current_zone) then potentiel_of_the_neighbor_zone = potential_of_the_current_zone + size_of_the_current_zone + If potential_of_the_neighbor_zone > (potential_of_the_current_zone + size_of_the_current_zone) then potentiel_of_the_neighbor_zone = potential_of_the_current_zone + size_of_the_current_zone
@@ -374,4 +374,3 @@ - diff -Nru liquidwar-5.6.4/doc/xml/authors.xml liquidwar-5.6.5/doc/xml/authors.xml --- liquidwar-5.6.4/doc/xml/authors.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/authors.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -31,11 +31,11 @@ Christian Mauduit -E-mail: "ufoot@ufoot.org" -Web site: "http://www.ufoot.org" +E-mail: "ufoot@ufoot.org" +Web site: "https://ufoot.org" -GnuPG public key: FD409E94 - "http://www.ufoot.org/gnupg.pub" -GnuPG fingerprint: 4762 1EBA 5FA3 E62F 299C B0BB DE3F 2BCD FD40 9E94 +GnuPG public key: CA272B47 - "https://ufoot.org/gnupg.pub" +GnuPG fingerprint: 71AD 4CBB 345A 5F15 6D03 AA6D 1050 9F67 CA27 2B47 Snail mail: 32 rue Jean Moulin 95100 Argenteuil FRANCE @@ -45,7 +45,7 @@ As Liquid War is now free software, protected by the GPL, anyone is allowed to view, edit, modify, re-compile - the source code, and distribute it, as long as Liquid + the source code, and distribute it, as long as Liquid War is still distributed under the GPL. @@ -70,7 +70,7 @@ Jan Gretschuskin : contributed 11 maps, and made the German translation. So if you run Liquid War with German menus, you - know who you have to thank -> Jan! 8-) + know who you have to thank -> Jan! 8-) Also do not forget to visit "http://www.game-factor.de" @@ -86,7 +86,7 @@ Ryan D. Brown : ported Liquid War to Mac OS X. - Eduard Bloch : maintained the Debian package, + Eduard Bloch : maintained the Debian package, and helped with German support. @@ -132,6 +132,9 @@ Joan Dolc : helped with Mac OS/X port + + Jan Szenborn : Polish translation. + Many other people helped me by submitting bug reports and patches, diff -Nru liquidwar-5.6.4/doc/xml/bugs.xml liquidwar-5.6.5/doc/xml/bugs.xml --- liquidwar-5.6.4/doc/xml/bugs.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/bugs.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -18,10 +18,8 @@ valuable feedback source. - Additionnaly, on online bug tracking system has been set up. - It uses Flyspray "http://flyspray.rocks.cc/". - It's accessible on "http://www.ufoot.org/bugtracker/" or - "http://www.ufoot.org/bugtracker/index.php?project=2". + Additionnaly, on online bug tracking system is availalable + on "https://github.com/ufoot/liquidwar5/issues". I try to collect everything here : bugs reported on the mailing-list, bugs from Debian, and bugs I found myself. Alternatively you can report bugs directly on it 8-) @@ -95,19 +93,6 @@ - - - It's been reported that Liquid War can run very slowly on Windows - when some other programs (Mozilla for instance) are running. - So if Liquid War's menus seem to be really really slow, then - try to shut down other applications and run the game again. - - - This problem does not seem to apply on GNU/Linux - at least if you - do not run 300 daemons together on your machine 8-) - - - Sometimes there are some problems when compiling the datafile, @@ -121,7 +106,7 @@ The background image sometimes ends up using the wrong palette, - which has a very nasty consequence: it looks ugly. + which has a very nasty consequence: it looks ugly. @@ -134,17 +119,17 @@ - IF your midi music on Liquid War, or indeed any other - Allegro game, doesn't work and you are using the OSS - (Open Sound System) drivers (these are the sound drivers + IF your midi music on Liquid War, or indeed any other + Allegro game, doesn't work and you are using the OSS + (Open Sound System) drivers (these are the sound drivers which come with the standard kernel distribution), this may - well be because Allegro only supports "FM synthesis" - and not "wavetable" when it is using OSS. FM synthesis - is a very old method of making sound from MIDI and + well be because Allegro only supports "FM synthesis" + and not "wavetable" when it is using OSS. FM synthesis + is a very old method of making sound from MIDI and has long since been replaced by wavetable synthesis, with the net - result that it's quite possible you've got OSS MIDI - working nicely in other applications without having FM - support set up at all. This is what I found. (It has + result that it's quite possible you've got OSS MIDI + working nicely in other applications without having FM + support set up at all. This is what I found. (It has to be said that I didn't find the FM sound quality quite as bad as people have said, though). @@ -162,12 +147,12 @@ - ...which creates audio from MIDI using a set of patches - (more info here: "http://www.talula.demon.co.uk/allegro/digmid.html") + ...which creates audio from MIDI using a set of patches + (more info here: "http://www.talula.demon.co.uk/allegro/digmid.html") and plays back through your sound card's audio. - + ...Which is comprised of the following steps: @@ -204,7 +189,7 @@ - + --IMPORTANT-- If you are using Liquid War, your FM will only work if you go to the map 'Elephant inside a boa' and proceed to chase each other round in circles for at least 10 minutes. This cures a bug in the design of the OPL3 interface which @@ -215,7 +200,7 @@ Many roads a man must take. Those with one-track minds are DOOMED, I tells ya. - + ---- The Liquid War algorithm calculates distances to one place, the cursor. diff -Nru liquidwar-5.6.4/doc/xml/copying.xml liquidwar-5.6.5/doc/xml/copying.xml --- liquidwar-5.6.4/doc/xml/copying.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/copying.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,12 +1,12 @@ - + - + Liquid War is a multiplayer wargame. - Copyright (C) 1998-2007 Christian Mauduit ("ufoot@ufoot.org") + Copyright (C) 1998-2018 Christian Mauduit ("ufoot@ufoot.org") This program is free software; you can redistribute it and/or @@ -22,8 +22,8 @@ You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + diff -Nru liquidwar-5.6.4/doc/xml/fanfic.xml liquidwar-5.6.5/doc/xml/fanfic.xml --- liquidwar-5.6.4/doc/xml/fanfic.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/fanfic.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ "We have an alliance..." Orange's voice was unsure now. -Time for some sarcasm to through her even more off balance, thought the General, +Time for some sarcasm to through her even more off balance, thought the General, "I gathered", he spoke softly, slowly, and with too much meaning. Then closing the channel he turned his attention back to his escape. @@ -92,4 +92,4 @@ - \ No newline at end of file + diff -Nru liquidwar-5.6.4/doc/xml/mailinglists.xml liquidwar-5.6.5/doc/xml/mailinglists.xml --- liquidwar-5.6.4/doc/xml/mailinglists.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/mailinglists.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,13 +1,13 @@ - + This list is for general discussions about Liquid War. - Here you can make suggestions, submit bug reports, - ask for help, find players, etc... + Here you can make suggestions, submit bug reports, + ask for help, find players, etc... Basically, any question or remark which concerns the game is welcomed on this list. @@ -15,14 +15,14 @@ You can't send messages to the list without subscribing. - The only reason for this is that it's one of the only + The only reason for this is that it's one of the only way to block spam efficiently. I first thought it could be OK to allow anyone to post, but liquidwar-user seems to have be harvested by robots, so now I - need to restrict posters. + need to restrict posters. However, I insist on the fact that anyone can subscribe, and the subscription to the list is not moderated. - So if you are a human being and not a stupid spam robot, + So if you are a human being and not a stupid spam robot, you're welcome on the list 8-) @@ -32,12 +32,12 @@ To (un)subscribe: "http://mail.nongnu.org/mailman/listinfo/liquidwar-user" - + To consult archives: "http://mail.nongnu.org/pipermail/liquidwar-user/" - + To post on the list: "liquidwar-user@nongnu.org" - + @@ -46,11 +46,11 @@ I have have set up a web-based chat-box which is accessible here: - "http://www.ufoot.org/liquidwar/v5/metaserver.php3" + "https://ufoot.org/liquidwar/v5/metaserver.php" It's not as good as a good old IRC channel but not everybody can - use IRC (because of firewalls and the likes), + use IRC (because of firewalls and the likes), and I like the idea that people can chat and have the list of available servers in one single web page. @@ -71,9 +71,9 @@ to find players and chat while playing. - #netgame_players : general channel for players + #netgame_players : general channel for players who want to play Internet games - - Free Software and/or Open Source games of course, + - Free Software and/or Open Source games of course, we're on freenode.net 8-) diff -Nru liquidwar-5.6.4/doc/xml/network.xml liquidwar-5.6.5/doc/xml/network.xml --- liquidwar-5.6.4/doc/xml/network.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/network.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -69,7 +69,7 @@ $ liquidwar-server -How many teams will connect to this server? +How many teams will connect to this server? At this point you must enter a number between 2 and 6, and then @@ -81,21 +81,21 @@ It's possible to skip this question by typing "liquidwar-server -2" instead of a plain "liquidwar-server". - + Use "-2" to get rid of this question. -Register on "www.ufoot.org/metaserver/" (y/n)? - +Register on "www.ufoot.org/metaserver/" (y/n)? + Now if we answer "y", then the server will automatically contact the "meta-server" and it will be listed on - "http://www.ufoot.org/liquidwar/v5/metaserver.php3" + "https://ufoot.org/liquidwar/v5/metaserver.php" This can be convenient for people who want to find other gamers to play with on the Net. For now, let's answer "n", we'll test this meta-server stuff later 8-) - + Use "-private" to get rid of this question. 2002-06-03 16:43:00: Listening on port 8035... 2002-06-03 16:43:00: Waiting for 2 teams... @@ -109,14 +109,14 @@ - Start the client on computer A normally by typing + Start the client on computer A normally by typing "liquidwar" on GNU/Linux or double-click "lwwin.exe" on Windows. Go to the "Teams" menu and select 2 teams, a red human and a blue CPU for instance. - If you don't know how to do this, then try and play Liquid War on + If you don't know how to do this, then try and play Liquid War on a single computer first. It's important to notice that by default the "blue CPU" won't connect on the network game. It's possible to allow bots to @@ -180,7 +180,7 @@ And on the client you should see a screen which says "Waiting for 1 team(s)" with the list of connected players - below (Napoleon). You do not need to click + below (Napoleon). You do not need to click on the "Start now" button. @@ -204,7 +204,7 @@ Once the game is over, you can start another network game on - the clients without touching the server, because the server + the clients without touching the server, because the server automatically restarts and waits for players to connect. @@ -213,6 +213,37 @@ CTRL-C. + + + Docker (see "http://docs.docker.com/" for details) is a convenient + way to launch a server without re-inventing (rather, re-compiling) + the wheel. + + + You might want to run the server this way if, for instance, you + need to have it run on a remote box where you do not wish to install + a complex Liquid War stack, Allegro and the rest. + + + Please visit "https://hub.docker.com/r/ufoot/liquidwar-server/" for a list + of available images, once it's installed, running the server + should amount to something like: + + +docker pull ufoot/liquidwar-server +docker run -p 8035:8035 ufoot/liquidwar-server + + + Additionnally, images are provided to run the metaserver, which + is responsible for registering and listing all running games. + While there's no real reason to run your own since one should permanently + be available on ufoot.org, it's quite straightforward to run your own: + + +docker pull ufoot/liquidwar-metaserver +docker run -p 8053:8053 ufoot/liquidwar-metaserver + + @@ -232,7 +263,7 @@ source package of Liquid War, so you might run such a server yourself if you want to. However, by default, servers will register themselves on my web site, and will be listed on - "http://www.ufoot.org/liquidwar/v5/metaserver.php3" + "https://ufoot.org/liquidwar/v5/metaserver.php" @@ -240,10 +271,10 @@ Launch the server, and when you get the question: -Register on "www.ufoot.org/metaserver/" (y/n)? +Register on "www.ufoot.org/metaserver/" (y/n)? - answer "y". + answer "y". Note that if you're behind a proxy or a firewall, the server @@ -255,7 +286,7 @@ - In the main menu, click on "Net Game" and then + In the main menu, click on "Net Game" and then "Search for internet games". @@ -267,7 +298,7 @@ Now you get on a "Waiting for teams" screen. You might be interested in using the "Start now" button. Indeed, if - you are 4 players connected on a server that accepts up to 6 + you are 4 players connected on a server that accepts up to 6 players, maybe you'll want to start the game right away without waiting for 2 more players. In this case, every player must click "Start now". A "*" character will replace the "-" @@ -276,14 +307,14 @@ You can also chat with other players by entering text in - the area above the "Send message" button, and then click on + the area above the "Send message" button, and then click on this button. Keep in mind that this is a very primitive chat and that the best way to chat efficiently is IMHO to play in windowed mode and have an IRC client at hand. Note that you can also get the list of available servers - from "http://www.ufoot.org/liquidwar/v5/metaserver.php3" + from "https://ufoot.org/liquidwar/v5/metaserver.php" There you'll also find a little chat-box which will allow you to send exchange messages with other players. @@ -342,12 +373,12 @@ password to be able to connect on the server. - "-callback cmd" : with this option, the command "cmd" will + "-callback cmd" : with this option, the command "cmd" will be launched whenever someone connects on an empty server. For instance, if you want to run a permanent server and want to know when someone connects but do not wish to permanently keep an eye on the server's log, you might use this option - and put in "cmd" a command that automatically sends you a + and put in "cmd" a command that automatically sends you a mail. You might also use a command that fires a popup window. It's up to you. 2 sample scripts are available in the "misc" directory of the Liquid War source distribution. One is @@ -368,7 +399,7 @@ Usefull if you want to use your own meta-server. - "-netlog" : + "-netlog" : if you use this option, the server will dump all the network traffic on the standard output. This is usefull for debugging. @@ -376,7 +407,7 @@ "-nobeep" : Disables the system beeps that the application might fire. - These beeps are mostly used on the server to notify clients + These beeps are mostly used on the server to notify clients connections. @@ -430,15 +461,15 @@ So if it takes 200 msec to send and then receive data from the server (approx the time returned by the "ping" command) then - with a lag of 6, you can theorically play at a rate of + with a lag of 6, you can theorically play at a rate of (1/0.2)*6=30 rounds/sec. - On one hand, setting the lag parameter to a high value will avoid many + On one hand, setting the lag parameter to a high value will avoid many network errors and allow you to play at a very fast pace, but the big drawback is that there will be quite a long time between the instant you send a key stroke to the server and the moment it comes back to you. - On the other hand, setting the lag to a low value will limit + On the other hand, setting the lag to a low value will limit drastically he number of rounds per second, but make the game more "responsive". @@ -460,11 +491,11 @@ - Liquid War uses a "light" server, and one of the + Liquid War uses a "light" server, and one of the advantages of this solution is that it allows you to run the server on low-end computers. I personnally run a permanent server on a 486 DX2, and it runs like - a charm. + a charm. The only thing you have to take care of when @@ -473,13 +504,13 @@ and receives 12 bytes of data at each round. If you add TCP/IP headers and the facts that stuff will probably be bundled in bigger packets, a client must deliver - about 15 Kbit/sec (up and down) for a game that + about 15 Kbit/sec (up and down) for a game that runs at 100 frames/sec. A 56K V90 modem is enough for this. So if you run a server with 2 clients connected, the server will need to deliver 30 Kbit/sec in both ways. A 56K V90 - modem _can_ do that, but your provider needs to be a good one 8-) + modem _can_ do that, but your provider needs to be a good one 8-) And if you run a server with 6 clients, you simply won't @@ -522,9 +553,9 @@ - Liquid War 5.4.0 and 5.4.1 were very hard to play over the Internet. - The reason is that the network routines did not do enough error - checking, and therefore there were very often errors when sending + Liquid War 5.4.0 and 5.4.1 were very hard to play over the Internet. + The reason is that the network routines did not do enough error + checking, and therefore there were very often errors when sending and/or receiving the map to the server. Hopefully, this bug should not appear anymore in 5.4.2 or any other recent release. @@ -566,7 +597,7 @@ a permanent public server on my personnal computer 8-) - FYI, here are some things which I think make Liquid War rather safe + FYI, here are some things which I think make Liquid War rather safe to run: @@ -588,7 +619,7 @@ the network, you can't have long nicknames, and so on. But another consequence is that if you try to send garbage in the buffer, it will be truncated. Liquid War will protest with a "network error" - message and the connection will be closed, but there will be no + message and the connection will be closed, but there will be no easy exploit possible here. @@ -608,7 +639,7 @@ However, I have not - and I know nobody who has - audited Liquid War - for security holes. So there might be some. Therefore you should + for security holes. So there might be some. Therefore you should respect a few things while running Liquid War: @@ -629,7 +660,7 @@ password. Use something simple like "hello" or "goodbye". - Keep in mind that Liquid War is a game, and not a bullet proof + Keep in mind that Liquid War is a game, and not a bullet proof professionnal server. @@ -669,7 +700,7 @@ Apart from this, I can hardly see any way to cheat. Why? Because the Liquid War server does not store any information about the game. It's not aware of who wins, who looses, it knows nothing. The only thing it does is to - transmit key presses between client computers. + transmit key presses between client computers. This way, if someone plays with a tweaked release of Liquid War, thinking diff -Nru liquidwar-5.6.4/doc/xml/options.xml liquidwar-5.6.5/doc/xml/options.xml --- liquidwar-5.6.4/doc/xml/options.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/options.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ and also since it's somewhat hard for me to figure out what is user-friendly and what's not, Liquid War's menus are not always self-explanatory. I'll just try and do something - better next time! + better next time! @@ -33,11 +33,11 @@ A texture for the zone where fighters are allowed to move. - + In the middle of the screen, there is a preview of the level. In this menu, the values of the parameters can be independently changed by: - + Moving a slider. @@ -71,7 +71,7 @@ You'll also notice that a "Random map" button is available. This button generates a new random map using an external program, "lwmapgen", developped by David Redick, available on - "http://www.cs.clemson.edu/~dredick/lwmapgen/" + "http://www.cs.clemson.edu/~dredick/lwmapgen/" This program supports many command line options, and if you want @@ -106,7 +106,7 @@ The computer plays poorly, so remember that Liquid War is basically - a multiplayer game, and that the cpu control is dedicated to beginners only. + a multiplayer game, and that the cpu control is dedicated to beginners only. You can also choose the color associated to each team by clicking on one @@ -120,7 +120,7 @@ You can disable the joystick with the button which is at the bottom left of the menu. Mouse input is also possible, and mouse movements are considered as keys too. To define mouse control, click on the button associated to the direction - you want to control, and then move the mouse. + you want to control, and then move the mouse. Then the button should display something like "M->". Mouse sensibility can be set with the little slider at the bottom right of the menu. @@ -142,7 +142,7 @@ you're running the game on. - I personnaly think the menus look best with the 640x480 resolution, + I personnaly think the menus look best with the 640x480 resolution, but some may prefer higher resolutions. Lower resolutions should only be used if you have problems using SVGA video modes. @@ -183,12 +183,12 @@ do this while playing, by simply pressing F4. - + This section allows you to set the sound volumes. There are 4 sliders, which are: - + "Sfx": sets the volume of all the sfx sounds, thats to say'the sounds you hear when the game starts, when you loose etc... @@ -234,7 +234,7 @@ than if there had only been 2 teams. - The "Cursor x" slider controls the speed of your cursor. + The "Cursor x" slider controls the speed of your cursor. @@ -266,7 +266,7 @@ and keep the rest of your configuration options untouched. - + The "frames/s" slider allows you to limit the number of frames per second. @@ -277,7 +277,7 @@ So this paramters limits the refreshment rate, so that there can be several logical moves of the fichters for only one screen refreshing. If it is set on its right, the display is limite to 10 fps, - so you'll have to find your setting. + so you'll have to find your setting. I personnally set it right in the middle, and get 40 fps. If you press "F5", you'll get the number of frames per second, and if you press "F6", you'll get the number of logical moves per second. @@ -332,7 +332,7 @@ The wave effects can be toggled during the game by pressing the "F4" key. - + This menu allows the user to change the behaviour of the fighters. @@ -356,7 +356,7 @@ The "Winner help" slider controls a parameter which causes fighters to attack with various strength depending on how many fighters belong to their team. - Not very clear... + Not very clear... Let's just say that: @@ -367,7 +367,7 @@ If it is centered, all the fighters of every team will - always attack with the same strength. + always attack with the same strength. If it is set on the left, @@ -437,7 +437,7 @@ - F1: toggles the "info" zone where the game time and the + F1: toggles the "info" zone where the game time and the state of each team is displayed. @@ -471,7 +471,7 @@ bitmaps. - F10: quits the game right away without any confirmation prompt, + F10: quits the game right away without any confirmation prompt, also known as the "my boss is coming here!" function. @@ -484,4 +484,3 @@ - diff -Nru liquidwar-5.6.4/doc/xml/parameters.xml liquidwar-5.6.5/doc/xml/parameters.xml --- liquidwar-5.6.4/doc/xml/parameters.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/parameters.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,8 +1,8 @@ - + - - + + When you launch Liquid War 5, you can use command line options. If you have no problems launching Liquid War, @@ -94,7 +94,7 @@ "-vga" : This option forces Liquid War to use your video card - as if it was only a basic VGA card. + as if it was only a basic VGA card. This option is required if you play Liquid War from Windows NT. @@ -158,7 +158,7 @@ "-auto" : If you set this option, Liquid War won't generate - any error while allocating memory or loading data. + any error while allocating memory or loading data. "-safe" : @@ -193,7 +193,7 @@ - + These options are usefull if you want to debug the game and @@ -208,7 +208,7 @@ - + The server command line options are described in the section @@ -242,12 +242,12 @@ "-tombola" : - Activates a special mode where scores are not displayed + Activates a special mode where scores are not displayed normally. Instead, the game displays 3 random numbers between 1 - 500. - + The external lwmapgen program by David Redick accepts a diff -Nru liquidwar-5.6.4/doc/xml/platforms.xml liquidwar-5.6.5/doc/xml/platforms.xml --- liquidwar-5.6.4/doc/xml/platforms.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/platforms.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -8,7 +8,7 @@ So now you can play under different OS. - The same source tree will compile on all supported platforms, + The same source tree will compile on all supported platforms, but with slight differences when running. C preprocessor #defines are used to code some platform specific stuff, and in some cases there are different files for the @@ -117,7 +117,7 @@ One thing you might ask is: "why do you provide the binary as a plain - .tgz file, it would be much nicer if a standard FreeBSD port was + .tgz file, it would be much nicer if a standard FreeBSD port was provided instead!". The answer is that the statically linked binary should work flawlessly and does not raise any dependency problem. Also I don't know how to make a BSD port @@ -125,7 +125,7 @@ can simply do it and send it back to me. If it's hard to do, then I do not really have the time nor motivation to do it. What I did is make the code and install scripts FreeBSD friendly so that it would be possible to - compile the game under FreeBSD. Packaging is another story. + compile the game under FreeBSD. Packaging is another story. @@ -138,7 +138,7 @@ expecially concerning networking. - There were some byte endianess problems in previous ( <=5.5.8 ) + There were some byte endianess problems in previous ( <=5.5.8 ) releases of LW, but I tried to fix them and they should be gone now. @@ -148,5 +148,25 @@ + + + Liquid War has been ported to the GP2X handheld gaming platform, thanks + to the fact George Foot ported Allegro to this platform. + More informations on "http://www.glost.eclipse.co.uk/gfoot/gp2x/allegro.html" + + + Assuming the environment variables GP2X_USER_PREFIX (where you want Allegro to + be installed) and OPEN2X_SYSTEM_PREFIX (where your open2x cross-compiler is) + are defined, the following might be used to compile Allegro: + + +LDFLAGS=-static ./configure --prefix=$GP2X_USER_PREFIX --build=x86_64-pc-linux-gnu --host=arm-open2x-linux --enable-lgp2x=$OPEN2X_SYSTEM_PREFIX --without-x --enable-static --disable-shared --disable-modules --enable-dbglib + + + Then Liquid War itself can be compiled using: + + +./configure --prefix=$GP2X_USER_PREFIX --build=x86_64-pc-linux-gnu --host=arm-open2x-linux + + - diff -Nru liquidwar-5.6.4/doc/xml/rules.xml liquidwar-5.6.5/doc/xml/rules.xml --- liquidwar-5.6.4/doc/xml/rules.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/rules.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,11 +1,11 @@ - + - Liquid War is a wargame. - But it is different from common wargames. + Liquid War is a wargame. + But it is different from common wargames. When playing Liquid War, one has to eat one's opponent. @@ -19,20 +19,20 @@ belong to the same team. One very often controls several thousands fighters at the same time. - And when fighters from different teams meet, + And when fighters from different teams meet, they eat each other, it is as simple as that. - + Teams are composed of little fighters. - These fighters all act independently, + These fighters all act independently, so it can happen that one single fighters does something different from what all the other do. - The main goal of these fighters is to reach the cursor you control. + The main goal of these fighters is to reach the cursor you control. And to do that, they are in a way quite clever, for they choose the shortest way to reach it. Check it if you want, but it is true, they *really* @@ -47,14 +47,14 @@ their way, they won't have the idea to choose another way, which is free from fighters but would have been longer otherwise. - So fighters can be blocked. + So fighters can be blocked. When two fighters from different team meet each other, - they first try to avoid fighting, and they dodge. + they first try to avoid fighting, and they dodge. But if there is no way for them to move, they get angry and attack the guy which is blocking them. Sometimes, they attack each other and both loose health. @@ -63,7 +63,7 @@ Here is an example of this behaviour: - A blue fighter and a red fighter both want to move to + A blue fighter and a red fighter both want to move to their right, for that would be the shortest way to reach their cursor if there was nobody on the battlefield. But they are blocked by other fighters. @@ -78,12 +78,12 @@ and he becomes a member of the team by which he has been attacked. Therefore the number of fighters on the battlefield - always remains the same. + always remains the same. When fighters of a same team get stuck together and block each other, then they regenerate, - that is to say that they get brighter. + that is to say that they get brighter. However, I think the best way for you to understand @@ -94,7 +94,7 @@ When I play Liquid War, I always try to surround my opponents, - and it usually works. + and it usually works. By the way, the computer has no strategy at all, diff -Nru liquidwar-5.6.4/doc/xml/source.xml liquidwar-5.6.5/doc/xml/source.xml --- liquidwar-5.6.4/doc/xml/source.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/source.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -22,7 +22,7 @@ - use the GNUish-style indentation - the default Emacs mode in fact + use the GNUish-style indentation - the default Emacs mode in fact prefix global functions / variables / constants / types with @@ -61,15 +61,15 @@ - base.h: + base.h: contains global constants used in many different files. - game.c / game.h: + game.c / game.h: contains the main game loop. - main.c / main.h: + main.c / main.h: the file where the main C function is declared. Doesn't contain much except calling init functions and running the GUI. @@ -92,78 +92,78 @@ - about.c / about.h: + about.c / about.h: contains the code for the about menu. - advanced.c / advanced.h: - contains the GUI advanced options menu. + advanced.c / advanced.h: + contains the GUI advanced options menu. - connect.c / connect.h: + connect.c / connect.h: contains code for the "connect" menu which displays which players are connected to the server, before the game actually starts. - controls.c / controls.h: + controls.c / controls.h: contains the code for the controls menu. - graphics.c / graphics.h: + graphics.c / graphics.h: code for the graphic options menu. - internet.c / internet.h: + internet.c / internet.h: contains the code for the "Search for Internet games" menu, where one can pick up a running server automatically with the help of the meta-server. - language.c / language.h: + language.c / language.h: contains the code for the "Language" menu. - level.c / level.h: + level.c / level.h: contains code for the menu where the player can select a level and its options (texture or color). - menu.c / menu.h: + menu.c / menu.h: contains the code for the main menu. - netgame.c / netgame.h: + netgame.c / netgame.h: contains the code for the net game menu. - options.c / options.h: + options.c / options.h: contains the code for the options menu. - play.c / play.h: + play.c / play.h: contains the code which ties the menu to the main gameloop. - rules.c / rules.h: + rules.c / rules.h: code for the rules menu. - score.c / score.h: + score.c / score.h: functions to display the scores at the end of the game. - speeds.c / speeds.h: + speeds.c / speeds.h: contains the code for the speeds menu. - team.c / team.h: + team.c / team.h: code for the team menu, where one choses which teams will play. - volume.c / volume.h: + volume.c / volume.h: code for the sound menu. - wave.c / wave.h: + wave.c / wave.h: code for the wave menu. @@ -176,7 +176,7 @@ - alleg2.c / alleg2.h: + alleg2.c / alleg2.h: contains some tweaked allegro functions. I wanted to use bitmaps with sevral colors for my fonts, and change some of the allegro default behavior. So rather than modifying @@ -184,20 +184,20 @@ it in this file and then modified it. - back.c / back.h: + back.c / back.h: this modules displays the background image. - dialog.c / dialog.h: + dialog.c / dialog.h: contains code for standard dialog boxes. - error.c / error.h: + error.c / error.h: contains functions to display error messages once the game is in graphical mode. - help.c / help.h: + help.c / help.h: generic functions to display the various help pages. @@ -225,30 +225,30 @@ - fighter.c / fighter.h: + fighter.c / fighter.h: contains code to move the armies, once the gradient has been calculated. - grad.c / grad.h: + grad.c / grad.h: this module calculates the gradient for each team. One could say it's the "kernel" of the game, since most of the CPU time is spent in this module (except if you have a slow display...). - mesh.c / mesh.h: + mesh.c / mesh.h: contains code to set up a usable mesh with a map. Mesh are re-calculated at each time a new game is started, the reason for this being that meshes are *very* big so it would not be reasonnable to save them directly on the HD. - monster.s / monster.h: + monster.s / monster.h: assembly functions to speed-up the game. It's a replacement for some fighter.c functions. - spread.s / spread.h: + spread.s / spread.h: contains assembly replacements for some functions of grad.c. These replacements do the same than the original ones from grad.c, but faster. Could still be optimized. @@ -264,13 +264,13 @@ - autoplay.c / autoplay.h: + autoplay.c / autoplay.h: contains the code for the computer AI. This module simulates keypresses from the computer, then the computer is handled as any other player. - move.c / move.h: + move.c / move.h: provides an API to move the cursors. @@ -288,22 +288,22 @@ This explains why there's so much code for user input, - when one would think at first sight that + when one would think at first sight that "polling the keyboard is enough". - joystick.c / joystick.h: + joystick.c / joystick.h: contains code to support joystick input. It wraps joystick buttons to virtual keyboard keys, so that joystick and keyboard behave exactly the same. - keyboard.c / keyboard.h: + keyboard.c / keyboard.h: contains code to handle key presses. - mouse.c / mouse.h: + mouse.c / mouse.h: wraps the mouse movements to virtual keyboard keys. This way the mouse can be used to control the players. @@ -317,24 +317,24 @@ - area.c / area.h: + area.c / area.h: contains functions to create the game area. Basically it contains functions to create the data structures in which the level is stored during the game. - army.c / army.h: + army.c / army.h: functions to create the armies, and place them on the battlefield. - asm.c / asm.h: + asm.c / asm.h: various constants, macros and utilities to ensure that asembly code works correctly. - bigdata.c / bigdata.h: + bigdata.c / bigdata.h: I had a really hard time with the malloc function with DJGPP under Win95 dos box. I tried to have it working for hours and hours but my program kept being buggy. So I decided to allocate @@ -343,18 +343,18 @@ and then give parts of it to the rest of the program. - config.c / config.h: + config.c / config.h: contains everything that is related to the game configuration. This module contains in global variables all the parameters that are stored in the config file. - cursor.c / cursor.h: + cursor.c / cursor.h: contains the code to init the cursors and place them on the battlefield at the beginning of the game. - decal.c / decal.h: + decal.c / decal.h: This module makes the link between teams and players. Its coding is quite ugly, for some modules in LW assume that when 2 teams are playing they are always teams 0 and 1. @@ -363,21 +363,21 @@ That's what this module is for. - exit.c / exit.h: + exit.c / exit.h: contains code that is executed when the game ends, it shuts down Allegro and displays messages on the console. - gfxmode.c / gfxmode.h: + gfxmode.c / gfxmode.h: contains code to set up the various video modes, and defines which modes are available for each platform. - init.c / init.h: + init.c / init.h: contains code to initialize Allegro with proper options and analyze failures. - palette.c / palette.h: + palette.c / palette.h: contains function to set up the current color palette. Liquid War uses different palettes, depending on what colors are chosen for teams. @@ -398,38 +398,38 @@ - disp.c / disp.h: + disp.c / disp.h: contains functions to display the battlefield. - distor.c / distor.h: + distor.c / distor.h: this module contains code to create the "wave effect". It uses a lot of data tables, and is quite complicated to understand... - glouglou.s / glouglou.h: + glouglou.s / glouglou.h: assembly module, it is a replacement for some functions of distor.c. It goes much faster but does the same. - info.c / info.h: + info.c / info.h: contains code to display the info bar. The info bar is the bar which display the time left and the amount of players for each team while the game is running. - message.c / message.h: + message.c / message.h: provides an API to display messages during the game. Very useful if you want to debug the game: you can trace and display anything. - pion.c / pion.h: + pion.c / pion.h: contains code to display the cursors. - viewport.c / vieport.h: + viewport.c / vieport.h: code to allocate and resize the zone where the map is displayed, also called "viewport". @@ -444,11 +444,11 @@ - music.c / music.h: + music.c / music.h: contains the code to control MIDI playback. - sound.c / sound.h: + sound.c / sound.h: functions to play sound. @@ -469,24 +469,24 @@ - disk.c / disk.h: + disk.c / disk.h: contains all the code to access data from the hard drive. In fact, all the HD access is done at startup. - map.c / map.h: + map.c / map.h: contains code to load the maps from a datafile raw data or a user defined bitmap to a usable structure in RAM. - maptex.c / maptex.h: + maptex.c / maptex.h: contains code to handle the "use default texture" option, and associate a map with a given texture automatically. - texture.c / texture.h: + texture.c / texture.h: contains code to handle textures. Textures are stored in a special format which uses 5 bits per pixel. @@ -507,14 +507,14 @@ The random map generator within Liquid War - which of course - works on any platform support by LW - uses for its greater + works on any platform support by LW - uses for its greater part the same source code as the external lwmapgen program. random.c / random.h: wrapper for the map generator written by David Redick. - It basically does the same as ./utils/lwmapgen/main.c + It basically does the same as ./utils/lwmapgen/main.c except that it does it within Liquid War as it is running and not in an external independant program. @@ -529,21 +529,21 @@ Note that on the client, I use 2 "different" clocks. The first - counts the "real" time, in seconds. The second one is counts "rounds" + counts the "real" time, in seconds. The second one is counts "rounds" and is incremented by 1 at each game round. - srvtime.c / srvtime.h: + srvtime.c / srvtime.h: code used to handle time on the server, where Allegro's functions are not available. - ticker.c / ticker.h: + ticker.c / ticker.h: sets up a timer callback. - time.c / time.h: + time.c / time.h: functions to know how long the game has been running, knowing that it can be interrupted. @@ -553,32 +553,32 @@ These are various utilities use to monitor and control - the game while one's playing. + the game while one's playing. - capture.c / capture.h: + capture.c / capture.h: code used to capture the video output of the game and store it in .bmp files while playing. - checksum.c / checksum.h: + checksum.c / checksum.h: utilities to generate a checksum from a given game state. Used in network code to make sure all the clients stay synchronized. - code.c / code.h: + code.c / code.h: This file contains the code to handle key presses during the game. That's to say the pause key for instance. - profile.c / profile.h: + profile.c / profile.h: provides tools to calculate how fast the game is runnning and what operations slow it down. - watchdog.c / watchdog.h: + watchdog.c / watchdog.h: this module waits for "secret codes" to be typed while the game is running, and traps them. @@ -599,15 +599,15 @@ - basicopt.c / basicopt.h: + basicopt.c / basicopt.h: handles basic command line parameters such as "-v" or "-h". - parser.c / parser.h: + parser.c / parser.h: contains code to parse and analyze the command line parameters. - startup.c / startup.h: + startup.c / startup.h: analyzes the command line parameters and stores them into global variables. @@ -624,20 +624,20 @@ Note to translators: if you decide to translate the menus in another language, keep in mind that all the translations must fit in the various buttons and textboxes. - The best resolution to test this + The best resolution to test this - the one where letters take most place - is 640x480. - lang.c / lang.h: + lang.c / lang.h: contains code to handle language dependant stuff. - langen.c / langen.h: + langen.c / langen.h: contains code to handle English specific stuff. - langfr.c / langfr.h: + langfr.c / langfr.h: contains code to handle French specific stuff. @@ -660,18 +660,18 @@ - log.h: + log.h: common header for logcli.c and logsrv.c. - logcli.c: + logcli.c: contains code to display messages on the console. It's usefull for console may have different behaviors when the games is used on different platforms. This file is used to compile the client. - logsrv.c: + logsrv.c: contains code to display messages on the console. This file is used to compile the server, which does not use Allegro at all. @@ -709,7 +709,7 @@ It's also important to note that Liquid War uses snprintf instead of sprintf, for using the latter is very likely to cause buffer - overflows. Under Linux glibc provides this function but Microsoft + overflows. Under Linux glibc provides this function but Microsoft does not provide it natively on Windows. Therefore I used a third party snprintf implementation by Mark Martinec: "http://www.ijs.si/software/snprintf/" and its source is available @@ -754,37 +754,37 @@ - mutxdos.c: + mutxdos.c: provides fake mutex support under DOS. This module is here only to make compilation easier. - mutxgen.h: + mutxgen.h: header for mutxdos.c, mutxunix.c and mutxw32.c. - mutxunix.c: + mutxunix.c: provides mutex support on UNIX. - mutxw32.c: + mutxw32.c: provides mutex support on Win32. - thrddos.c: + thrddos.c: provides fake thread support under DOS. This module is here only to make compilation easier. - thrdgen.h: + thrdgen.h: header for thrddos.c, thrdunix.c and thrdw32.c. - thrdunix.c: + thrdunix.c: provides thread support on UNIX. - thrdw32.c: + thrdw32.c: provides thread support on Win32. @@ -847,40 +847,40 @@ - dnsutil.c / dnsutil.h: + dnsutil.c / dnsutil.h: wrapper code to issue DNS requests, without having to handle the hostent struct. - sock2cli.c: + sock2cli.c: sode used to wrap low-level network function on the client. - sock2gen.h: + sock2gen.h: header for sock2cli.c and sock2srv.c. - sock2srv.c: + sock2srv.c: code used to wrap low-level network function on the server. - sockdos.c: + sockdos.c: network API for DOS. - sockex.c: + sockex.c: netowrk routines shared by sockunix and sockw32. - sockgen.h: + sockgen.h: header for sockdos.c, sockunix.c and sockw32.c. - sockunix.c: + sockunix.c: network API for UNIX. - sockw32.c: + sockw32.c: network API for Win32. @@ -888,57 +888,57 @@ - These files contains network utilities + These files contains network utilities which are Liquid War specific. - chat.c / chat.h: + chat.c / chat.h: functions used to handle chat messages in network games. - keyexch.c / keyexch.h: + keyexch.c / keyexch.h: functions to send and receive keys to the server. Used on the client. - netconf.c / netconf.h: + netconf.c / netconf.h: code to send and receive the config of the clients over the network. - netkey.c / netkey.h: + netkey.c / netkey.h: contains some tools to manipulate key strokes over the network. - netmap.c / netmap.h: + netmap.c / netmap.h: code to send and receive the maps over the network. - netmess.c / netmess.h: + netmess.c / netmess.h: contains a parser to interpret plain text messages. Used when exhanging information over the network. - netplay.c / netplay.h: + netplay.c / netplay.h: contains the code to set up and start network games. - network.c / network.h: + network.c / network.h: contains some network related functions and constants used on the client. - ping.c / ping.h: + ping.c / ping.h: code used on the client to estimate the average ping time with a server. - protocol.c / protocol.h: + protocol.c / protocol.h: contains the sequence of messages send and recevied by the client when connecting on the server. - startinf.c / startinf.h: + startinf.c / startinf.h: contains struct and tools to handle some network informations while starting a network game. @@ -965,15 +965,15 @@ - httputil.c / httputil.h: + httputil.c / httputil.h: low level functions to handle http requests. - wwwcli.c / wwwcli.h: + wwwcli.c / wwwcli.h: code used on the client to communicate with the meta-server. - wwwsrv.c / wwwsrv.h: + wwwsrv.c / wwwsrv.h: code used on the server to communicate with the meta-server. @@ -998,20 +998,20 @@ - server.c / server.h: + server.c / server.h: main code for the server (equivalent of main.c for the client). - srvchan.c / srvchan.h: + srvchan.c / srvchan.h: code used to handles channels on the server. A channel is associated to a given computer and may manage several teams. - srvcont.c / srvcont.h: + srvcont.c / srvcont.h: global network controler used on the server. - srvteam.c / srvteam.h: + srvteam.c / srvteam.h: code used to handle teams on the server. diff -Nru liquidwar-5.6.4/doc/xml/todo.xml liquidwar-5.6.5/doc/xml/todo.xml --- liquidwar-5.6.4/doc/xml/todo.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/todo.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,10 +1,10 @@ - + - In its latest releases Liquid War is quite stable IMHO. + In its latest releases Liquid War is quite stable IMHO. However there are still some issues with network under Windows for instance. I'm aware of these bugs and I'm trying to fix them but this does really take time. @@ -36,9 +36,9 @@ Since summer 2005, Liquid War 6, a complete rewrite of Liquid War, - is on its way. See + is on its way. See "http://www.gnu.org/software/liquidwar6/" or - "http://www.ufoot.org/liquidwar/v6" + "https://ufoot.org/liquidwar/v6" for more informations. diff -Nru liquidwar-5.6.4/doc/xml/userlevels.xml liquidwar-5.6.5/doc/xml/userlevels.xml --- liquidwar-5.6.4/doc/xml/userlevels.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/userlevels.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,8 +1,8 @@ - + - + You can use your own levels whith Liquid War 5. The only thing you have to do is to put your own 256-colors vbitmap files @@ -24,10 +24,10 @@ - + Liquid War 5 does many checks on user levels and is much safer than Liquid War 3. - Still, try and help the program not to crash, if possible. + Still, try and help the program not to crash, if possible. Liquid War considers that dark colors are walls @@ -59,9 +59,9 @@ - + All you have to do is put a bitmap in the default directory - which is "custom\texture\" on windows, and + which is "custom\texture\" on windows, and "/usr/local/share/games/liquidwar/texture" on GNU/Linux. @@ -107,7 +107,7 @@ Still, to be included in Liquid War's mainstream distribution, - your maps will need to be placed under the terms of the + your maps will need to be placed under the terms of the GNU General Public License, or at least a compatible license. You should have received a copy of this license with Liquid War anyway. Read it 8-) diff -Nru liquidwar-5.6.4/doc/xml/wip.xml liquidwar-5.6.5/doc/xml/wip.xml --- liquidwar-5.6.4/doc/xml/wip.xml 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/doc/xml/wip.xml 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -7,7 +7,7 @@ the good news to Freshmeat ( "http://freshmeat.net/projects/liquidwar/" ). Then all releases are accessible from the main - download page, which is "http://www.ufoot.org/liquidwar/v5/download". + download page, which is "https://ufoot.org/liquidwar/v5/download". Releasing the game takes time, for I want all binaries @@ -21,50 +21,34 @@ to access the source repository directly. - + - I use GNU Arch (Tom Lord's Arch in fact, - "http://www.gnu.org/software/gnu-arch/" ) instead of the - previously used CVS. Indeed, tla has some very fancy features - such as signing patches with gpg, and I'm tired of suffering - CVS limitations. + Historically, Liquid War has used CVS, GNU Arch (aka tla), + and now uses git "http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html". - So FYI the previously active CVS repositories, on Sourceforge - and Savannah, are currently unmaintained. + So FYI the previously active CVS and GNU Arch repositories, on Sourceforge + and Savannah, are currently unmaintained. It has moved to Github. - - - Step 1: read the excellent Arch tutorial - "http://regexps.srparish.net/www/tutorial/html/arch.html" - if you are not familiar with tla. I admit there's - a steep learning curve, but it's yet clear and understandable. - - - Step 2: point on the repository, which is accessible (read-only) on - "http://arch.sv.gnu.org/archives/liquidwar/". - - - A typical set of tla commands would be: + A typical git command would be: -tla register-archive http://arch.sv.gnu.org/archives/liquidwar -tla get -A liquidwar@sv.gnu.org liquidwar6--stable +git clone https://github.com/ufoot/liquidwar5.git If you are interested, I can open this repository in read/write - mode, however one of the points of GNU Arch is that it allows - cooperative developpement with multiple depots, so this isn't + mode, however one of the points of git is that it is distributed and + allows cooperative developpement with multiple depots, so this isn't mandatory. And anyways, importing myself patches received by email has never been a real burden. Besides, most developpement is now done on Liquid War 6. See "http://www.gnu.org/software/liquidwar6/" or - "http://www.ufoot.org/liquidwar/v6" for more informations. + "https://ufoot.org/liquidwar/v6" for more informations. diff -Nru liquidwar-5.6.4/install-sh liquidwar-5.6.5/install-sh --- liquidwar-5.6.4/install-sh 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/install-sh 2018-12-23 19:04:36.000000000 +0000 @@ -1,250 +1,518 @@ -#! /bin/sh -# +#!/bin/sh # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2018-03-11.20; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Copyright 1991 by the Massachusetts Institute of Technology +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +tab=' ' +nl=' +' +IFS=" $tab$nl" -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +# Set DOITPROG to "echo" to test this script. +doit=${DOITPROG-} +doit_exec=${doit:-exec} -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi fi -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done fi -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi -# Now rename the file to the real destination. +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; + esac -fi && + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + trap '' 0 + fi +done -exit 0 +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru liquidwar-5.6.4/liquidwar.spec liquidwar-5.6.5/liquidwar.spec --- liquidwar-5.6.4/liquidwar.spec 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/liquidwar.spec 2018-12-23 19:04:36.000000000 +0000 @@ -2,12 +2,12 @@ Summary(fr): Un "wargame" multijoueur inédit. Summary(de): Ein einzigartiges Kriegspiel für mehrere Spieler. Name: liquidwar -Version: 5.6.4 +Version: 5.6.5 Release: 1 License: GPL Group: Amusements/Games -Source: http://freesoftware.fsf.org/download/liquidwar/liquidwar-5.6.4.tar.gz -URL: http://www.ufoot.org/liquidwar/v5 +Source: http://freesoftware.fsf.org/download/liquidwar/liquidwar-5.6.5.tar.gz +URL: https://ufoot.org/liquidwar/v5 Vendor: Christian Mauduit Packager: Christian Mauduit BuildRoot: %{_tmppath}/%{name}-buildroot diff -Nru liquidwar-5.6.4/liquidwar.spec.in liquidwar-5.6.5/liquidwar.spec.in --- liquidwar-5.6.4/liquidwar.spec.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/liquidwar.spec.in 2018-12-23 19:04:36.000000000 +0000 @@ -7,7 +7,7 @@ License: GPL Group: Amusements/Games Source: http://freesoftware.fsf.org/download/liquidwar/liquidwar-@VERSION@.tar.gz -URL: http://www.ufoot.org/liquidwar/v5 +URL: https://ufoot.org/liquidwar/v5 Vendor: Christian Mauduit Packager: Christian Mauduit BuildRoot: %{_tmppath}/%{name}-buildroot diff -Nru liquidwar-5.6.4/Makefile.dj liquidwar-5.6.5/Makefile.dj --- liquidwar-5.6.4/Makefile.dj 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/Makefile.dj 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ # Liquid War is a multiplayer wargame -# Copyright (C) 1998-2007 Christian Mauduit +# Copyright (C) 1998-2018 Christian Mauduit # # 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 @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Liquid War homepage : http://www.ufoot.org/liquidwar/v5 +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # Contact author : ufoot@ufoot.org # # This Makefile is used to compile the MS DOS 32-bit executable binary. @@ -102,9 +102,11 @@ langdk \ langen \ langfr \ +langpl \ language \ level \ logcli \ +lw6 \ main \ map \ maptex \ diff -Nru liquidwar-5.6.4/Makefile.in liquidwar-5.6.5/Makefile.in --- liquidwar-5.6.4/Makefile.in 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/Makefile.in 2018-12-23 19:04:36.000000000 +0000 @@ -1,7 +1,27 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ +datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ infodir = @infodir@ @@ -24,13 +44,8 @@ INFODIR = $(datadir)/info INFODIRDIR = $(infodir) -ifeq (@TARGET_OPT@,yes) - TARGET = @target@ - TARGET_CPU = @target_cpu@ -else - TARGET = unknown - TARGET_CPU = unknown -endif +HOST = @host@ +HOST_CPU = @host_cpu@ VERSION = @VERSION@ VERSION_REL = @VERSION_REL@ @@ -38,18 +53,27 @@ GMAKE = @GMAKE@ +RPMS_DIR = @RPMS_DIR@ +SRPMS_DIR = @SRPMS_DIR@ + MAKE_BIN_DIR = ./src MAKE_DATA_DIR = ./data MAKE_UTILS_DIR = ./utils MAKE_DOC_DIR = ./doc MAKE_DIRS = $(MAKE_BIN_DIR) $(MAKE_UTILS_DIR) $(MAKE_DATA_DIR) $(MAKE_DOC_DIR) +DOCKER_DIR = ./misc/docker + PACKAGE_SOURCE_DIR = liquidwar-$(VERSION) PACKAGE_SOURCE_TAR = $(PACKAGE_SOURCE_DIR).tar PACKAGE_SOURCE_TARGZ = $(PACKAGE_SOURCE_TAR).gz -PACKAGE_BINARY_TAR = liquidwar-$(VERSION).$(TARGET).tar -PACKAGE_BINARY_TGZ = liquidwar-$(VERSION).$(TARGET).tgz +PACKAGE_DOCKER_SOURCE_TARGZ = $(DOCKER_DIR)/$(PACKAGE_SOURCE_TARGZ) +PACKAGE_DOCKER_METASERVER_TARGZ = $(DOCKER_DIR)/metaserver.tar.gz +PACKAGE_DOCKER_TABLES_SQL = $(DOCKER_DIR)/tables.sql + +PACKAGE_BINARY_TAR = liquidwar-$(VERSION).$(HOST).tar +PACKAGE_BINARY_TGZ = liquidwar-$(VERSION).$(HOST).tgz PACKAGE_DOS_DIR = LW5 PACKAGE_DOS_EXE = lwdos.exe lwdosmap.exe @@ -65,16 +89,19 @@ PACKAGE_NSIS_EXE = lw$(VERSION_COMPACT).exe -PACKAGE_SOURCE_RPM_TARGET = /usr/src/rpm/SRPMS +PACKAGE_SOURCE_RPM_TARGET = $(SRPMS_DIR) PACKAGE_SOURCE_RPM = liquidwar-$(VERSION)-$(VERSION_REL).src.rpm -PACKAGE_BINARY_RPM_TARGET = /usr/src/rpm/RPMS/$(TARGET_CPU) -PACKAGE_BINARY_RPM = liquidwar-$(VERSION)-$(VERSION_REL).$(TARGET_CPU).rpm +PACKAGE_BINARY_RPM_TARGET = $(RPMS_DIR)/$(HOST_CPU) +PACKAGE_BINARY_RPM = liquidwar-$(VERSION)-$(VERSION_REL).$(HOST_CPU).rpm -PACKAGE_MACOSX_TAR = liquidwar-$(VERSION).macosx.tar -PACKAGE_MACOSX_TGZ = liquidwar-$(VERSION).macosx.tgz +PACKAGE_MACOSX_TAR = liquidwar-$(VERSION)-macosx.tar +PACKAGE_MACOSX_TGZ = liquidwar-$(VERSION)-macosx.tgz PACKAGE_MACOSX_DMG = liquidwar-$(VERSION).dmg +PACKAGE_GP2X_DIR = liquidwar-$(VERSION)-gp2x +PACKAGE_GP2X_ZIP = liquidwar-$(VERSION)-gp2x.zip + PACKAGE_TMP = /tmp/liquidwar-$(VERSION).tmp all: build_bin build_data build_doc @@ -82,7 +109,7 @@ @echo "Build complete." @echo "Type \"$(GMAKE) install\" to install Liquid War $(VERSION)." -world: clean world_clean all package_source package_win32 package_dos package_binary package_source_rpm package_binary_rpm +world: clean world_clean all package_source package_win32 package_dos package_binary package_source_rpm package_binary_rpm package_gp2x build_bin: @$(GMAKE) -C $(MAKE_BIN_DIR) @@ -172,10 +199,11 @@ install_readme: @echo "Installing README in $(DOCDIR)." @install -d $(DESTDIR)$(DOCDIR) - @install -c -m 0644 README $(DESTDIR)$(DOCDIR) + @install -c -m 0644 README.md $(DESTDIR)$(DOCDIR)/README @install -c -m 0644 README.fr $(DESTDIR)$(DOCDIR) @install -c -m 0644 README.de $(DESTDIR)$(DOCDIR) @install -c -m 0644 README.dk $(DESTDIR)$(DOCDIR) + @install -c -m 0644 README.pl $(DESTDIR)$(DOCDIR) uninstall: @echo "Removing binary $(GAMEDIR)/liquidwar." @@ -206,25 +234,32 @@ clean: @for d in $(MAKE_DIRS); do $(GMAKE) -C $$d clean; done - @find . -name "*~" -o -name "*#*" -o -name ".*#*" | xargs rm -f + @find . -name "*~" -o -name "*#*" -o -name ".*#*" | xargs rm -f + @rm -f $(PACKAGE_DOCKER_SOURCE_TARGZ) $(PACKAGE_DOCKER_METASERVER_TARGZ) $(PACKAGE_DOCKER_TABLES_SQL) world_clean: @rm -f $(PACKAGE_SOURCE_TARGZ) + @rm -f $(PACKAGE_DOCKER_SOURCE_TARGZ) + @rm -f $(PACKAGE_DOCKER_METASERVER_TARGZ) + @rm -f $(PACKAGE_DOCKER_TABLES_SQL) @rm -f $(PACKAGE_BINARY_TGZ) @rm -f $(PACKAGE_SOURCE_RPM) @rm -f $(PACKAGE_BINARY_RPM) @rm -f $(PACKAGE_DOS_ZIP) @rm -f $(PACKAGE_WIN32_ZIP) @rm -f $(PACKAGE_NSIS_EXE) + @rm -f $(PACKAGE_MACOSX_TGZ) + @rm -f $(PACKAGE_MACOSX_DMG) + @rm -f $(PACKAGE_GP2X_ZIP) -# target used when preparing packages +# used when preparing packages packageclean: clean world_clean @rm -r -f Makefile config.cache config.status config.log autom4te.cache - @rm -f misc/liquidward misc/macosx_info.plist misc/liquidwar.nsi + @rm -f misc/liquidward misc/macosx_info.plist misc/liquidwar.nsi misc/docker/Dockerfile-build misc/docker/Dockerfile-server misc/docker/Dockerfile-metaserver @find . -name "*.o" -o -name "*.obj" | xargs rm -f @find . -name "*.tar.gz" -o -name "*.tgz" -o -name "*.zip" -o -name "*.rpm" -o -name "*.deb" -o -name "*.tgz" | xargs rm -f @find . -name ".xvpics" | xargs rm -rf - @find . -name "lwmap.bmp" | xargs rm -rf + @find . -name "lwmap.bmp" | xargs rm -f @rm -rf LW5 lwdos*exe lwwin*exe _tmpfile.arg *.log vc60.* *.idb *.pch @rm -rf data/lwwin* data/lwdos* @rm -rf starter @@ -271,8 +306,8 @@ @echo "Cleaning up." @$(GMAKE) -C $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) packageclean @touch $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/.cvsignore - @find $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) -name .cvsignore -o -name CVS -o -name .arch-ids -o -name "{arch}" | xargs rm -rf - @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && ./fix.sh unix + @find $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) -name .cvsignore -o -name CVS -o -name .arch-ids -o -name "{arch}" -o -name ".git" -o -name ".gitignore" | xargs rm -rf + @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) @echo "Creating tarball." @cd $(PACKAGE_TMP) && tar cf $(PACKAGE_SOURCE_TAR) $(PACKAGE_SOURCE_DIR) @echo "Compressing." @@ -294,10 +329,11 @@ @echo "Copying files." @cp $(PACKAGE_DOS_EXE) $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR) @cp $(PACKAGE_DOS_CWSDPMI) $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR) - @cp README $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/readme.txt + @cp README.md $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/readme.txt @cp README.fr $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/readmefr.txt @cp README.de $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/readmede.txt @cp README.dk $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/readmedk.txt + @cp README.pl $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/readmepl.txt @cp COPYING $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/license.txt @cp ChangeLog $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/changes.txt @cp misc/liquidwar.ico $(PACKAGE_TMP)/$(PACKAGE_DOS_DIR)/lw.ico @@ -333,10 +369,11 @@ @echo "Copying files." @cp $(PACKAGE_WIN32_EXE) $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR) @cp $(PACKAGE_WIN32_ALLEGDLL) $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR) - @cp README $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/readme.txt + @cp README.md $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/readme.txt @cp README.fr $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/readmefr.txt @cp README.de $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/readmede.txt @cp README.dk $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/readmedk.txt + @cp README.pl $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/readmepl.txt @cp COPYING $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/license.txt @cp ChangeLog $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/changes.txt @install -d $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/data @@ -346,7 +383,7 @@ @cp -r custom/texture $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/custom @cp -r custom/music $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/custom @install -d $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/doc - @cp -r doc/html doc/txt doc/ps doc/pdf $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/doc + @cp -r doc/html doc/txt doc/pdf $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/doc @install -d $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/misc @cp -r misc/lwserver.bat misc/lwpopup.js $(PACKAGE_TMP)/$(PACKAGE_WIN32_DIR)/misc @echo "Cleaning up." @@ -383,7 +420,7 @@ @echo "Preparing source." @cp $(PACKAGE_SOURCE_TARGZ) $(PACKAGE_TMP) @cd $(PACKAGE_TMP) && tar xzf $(PACKAGE_SOURCE_TARGZ) - @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && ./configure --enable-static --disable-doc-info --target=$(TARGET) --prefix=$(prefix) + @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && ./configure --enable-static --disable-doc-info --host=$(HOST) --prefix=$(prefix) @echo "Compiling." @$(GMAKE) -C $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) @echo "Cleaning up install directories." @@ -405,7 +442,7 @@ @echo "Checking permissions." @if [ `whoami` != root ] ; then echo "You need to be root to build $@." && exit 1 ; fi @echo "Building source rpm." - @rpm -ts --sign $(PACKAGE_SOURCE_TARGZ) + @rpmbuild -ts --sign $(PACKAGE_SOURCE_TARGZ) @echo "Copying source rpm." @cp $(PACKAGE_SOURCE_RPM_TARGET)/$(PACKAGE_SOURCE_RPM) . @@ -415,7 +452,7 @@ @echo "Checking permissions." @if [ `whoami` != root ] ; then echo "You need to be root to build $@." && exit 1 ; fi @echo "Building binary rpm." - @rpm -tb --sign --target $(TARGET) $(PACKAGE_SOURCE_TARGZ) + @rpmbuild -tb --sign $(PACKAGE_SOURCE_TARGZ) @echo "Copying binary rpm." @cp $(PACKAGE_BINARY_RPM_TARGET)/$(PACKAGE_BINARY_RPM) . @@ -428,9 +465,7 @@ @echo "Preparing source." @cp $(PACKAGE_SOURCE_TARGZ) $(PACKAGE_TMP) @cd $(PACKAGE_TMP) && tar xzf $(PACKAGE_SOURCE_TARGZ) - # Static builds do not seem to work well on Mac OS X yet. - #@cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && ./configure --enable-static --disable-doc-info --target=$(TARGET) --prefix=$(prefix) - @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && ./configure --disable-doc-info --target=$(TARGET) --prefix=$(prefix) + @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && ./configure --disable-doc-info --host=$(HOST) --prefix=/opt @echo "Compiling." @$(GMAKE) -C $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) @echo "Creating directory structure." @@ -438,24 +473,38 @@ @install -d "$(PACKAGE_TMP)/Liquid War.app/Contents" @install -d "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS" @install -d "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" + @install -d "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/data" + @install -d "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/custom" + @install -d "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc" @echo "Copying files." - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar-server "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar-mapgen "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/data/liquidwar.dat "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/custom/map "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/custom/texture "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/custom/music "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/misc/globe.icns "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/Liquid War.icns" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/misc/macosx_launcher.sh "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/Liquid War" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar-server "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar-mapgen "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/data/liquidwar.dat "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/data/" + @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/custom/map "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/custom/" + @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/custom/texture "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/custom/" + @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/custom/music "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/custom/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/misc/liquidwar.icns "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/" @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/misc/macosx_info.plist "$(PACKAGE_TMP)/Liquid War.app/Contents/Info.plist" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/misc/macosx_readme.rtf "$(PACKAGE_TMP)/Readme.rtf" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/COPYING "$(PACKAGE_TMP)/gpl.txt" - @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/doc/pdf/liquidwar.pdf "$(PACKAGE_TMP)" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/COPYING "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/COPYING "$(PACKAGE_TMP)/License.txt" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/ChangeLog "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/README.md "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/README" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/README.de "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/README.dk "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/README.fr "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/README.pl "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp -r $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/doc/html $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/doc/txt $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/doc/pdf "$(PACKAGE_TMP)/Liquid War.app/Contents/Resources/doc/" + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/doc/pdf/liquidwar.pdf "$(PACKAGE_TMP)/Liquid War.pdf" + @echo "Updating dynamic libraries dependencies" + @if which otool; then for i in `otool -L $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar | grep dylib | grep -v /usr | grep /opt | cut -d "(" -f 1` ; do j=$${i##*/}; cp $$i "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/"; chmod 644 "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/$$j"; install_name_tool -id @executable_path/$$j "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/$$j"; install_name_tool -change $$i @executable_path/$$j "$(PACKAGE_TMP)/Liquid War.app/Contents/MacOS/liquidwar"; done ; fi # yes, this is complicated, the idea is to run otool -L to find every library dependency, keep only those in /opt installed by macports or from source, then run install_name_tool to change references to a path relative to the executable path, so that it's findable within the package and does not rely on some developper's local install. One more point: we can't put libs outsite @executable_path (./MacOS) because if path is too long install_name_path won't work... See -headerpad_max_install_names option in LDFLAGS, might help too @echo "Cleaning up." - @find $(PACKAGE_TMP) -name CVS -o -name .arch-ids -o -name "{arch}" | xargs rm -rf + @find $(PACKAGE_TMP) -name DUMMY -exec rm -f "{}" \; + @find $(PACKAGE_TMP) -name "*.in" -exec rm -f "{}" \; + @find $(PACKAGE_TMP) -name "*.inc" -exec rm -f "{}" \; @echo "Removing source." @rm -rf $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) + @rm -f $(PACKAGE_TMP)/$(PACKAGE_SOURCE_TARGZ) @echo "Creating tarball." @cd $(PACKAGE_TMP) && tar cf $(PACKAGE_MACOSX_TAR) * @echo "Compressing." @@ -465,9 +514,70 @@ package_macosx_dmg: $(PACKAGE_MACOSX_DMG) -$(PACKAGE_MACOSX_DMG): - @echo "Under construction..." - # There's a script which can be used to generate .dmg files on: - # http://www.omnigroup.com/mailman/archive/macosx-talk/2002-November/001271.html - # Definitely need to take a look a at it. +$(PACKAGE_MACOSX_DMG): $(PACKAGE_MACOSX_TGZ) + @echo "Creating temporary directory." + @rm -rf $(PACKAGE_TMP) + @install -d $(PACKAGE_TMP) + @echo "Preparing binary." + @cp $(PACKAGE_MACOSX_TGZ) $(PACKAGE_TMP) + @cd $(PACKAGE_TMP) && tar xzf $(PACKAGE_MACOSX_TGZ) + @rm -f $(PACKAGE_TMP)/$(PACKAGE_MACOSX_TGZ) + @echo "Creating disk image." + @rm -f $@ && if which hdiutil ; then hdiutil create -srcfolder "$(PACKAGE_TMP)" $@ ; fi + @echo "Deleting temporary directory." + @rm -rf $(PACKAGE_TMP) + +package_gp2x: $(PACKAGE_GP2X_ZIP) + +$(PACKAGE_GP2X_ZIP): $(PACKAGE_SOURCE_TARGZ) + @echo "Compiling dat file." + @$(GMAKE) -C data + @echo "Creating temporary directory." + @rm -rf $(PACKAGE_TMP) + @install -d $(PACKAGE_TMP) + @echo "Preparing source." + @cp $(PACKAGE_SOURCE_TARGZ) $(PACKAGE_TMP) + @cd $(PACKAGE_TMP) && tar xzf $(PACKAGE_SOURCE_TARGZ) + @echo "Compiling binary." + @cd $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR) && sh -c ". /opt/open2x/bin/env-apps.sh && ./configure --prefix=/opt --build=x86_64-pc-linux-gnu --host=arm-open2x-linux && make -C src" + @install -d $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR) + @cp $(PACKAGE_TMP)/$(PACKAGE_SOURCE_DIR)/src/liquidwar* $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/ + @cp data/liquidwar.dat $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/ + @cp misc/liquidwar.gpe $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/ + @cp COPYING $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/license.txt + @cp ChangeLog $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/changes.txt + @cp README.md $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/readme.txt + @cp README.fr $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/readmefr.txt + @cp README.de $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/readmede.txt + @cp README.dk $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/readmedk.txt + @cp README.pl $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/readmepl.txt + @cp -r doc/html $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR)/doc + @find $(PACKAGE_TMP)/$(PACKAGE_GP2X_DIR) -name .cvsignore -o -name CVS -o -name .arch-ids -o -name "{arch}" -o -name DUMMY -o -name "*.inc" -o -name "*.in" | xargs rm -rf + @cd $(PACKAGE_TMP) && zip -r $(PACKAGE_GP2X_ZIP) $(PACKAGE_GP2X_DIR) + @cp $(PACKAGE_TMP)/$(PACKAGE_GP2X_ZIP) . + @rm -rf $(PACKAGE_TMP) + +$(PACKAGE_DOCKER_SOURCE_TARGZ): $(PACKAGE_SOURCE_TARGZ) + @cp $< $@ + +$(PACKAGE_DOCKER_METASERVER_TARGZ): www/php/metaserver.php + @cd www && rm -rf metaserver && install -d metaserver && cp php/*.php metaserver/ && cp php/favicon.ico metaserver/ && cp php/robots.txt metaserver/ && chmod 644 metaserver/* && tar --owner=root --group=staff -czf metaserver.tar.gz metaserver && rm -rf metaserver + @mv -f www/metaserver.tar.gz $@ + +$(PACKAGE_DOCKER_TABLES_SQL): www/mysql/tables.sql + cp $< $@ + +docker: docker-build docker-server docker-metaserver + +docker-build: $(PACKAGE_DOCKER_SOURCE_TARGZ) + @cd $(DOCKER_DIR) && docker build -f Dockerfile-build -t ufoot/liquidwar-build:$(VERSION) . + @cd $(DOCKER_DIR) && docker build -f Dockerfile-build -t ufoot/liquidwar-build:latest . + +docker-server: $(PACKAGE_DOCKER_SOURCE_TARGZ) + @cd $(DOCKER_DIR) && docker build -f Dockerfile-server -t ufoot/liquidwar-server:$(VERSION) . + @cd $(DOCKER_DIR) && docker build -f Dockerfile-server -t ufoot/liquidwar-server:latest . + +docker-metaserver: $(PACKAGE_DOCKER_METASERVER_TARGZ) $(PACKAGE_DOCKER_TABLES_SQL) + @cd $(DOCKER_DIR) && docker build -f Dockerfile-metaserver -t ufoot/liquidwar-metaserver:$(VERSION) . + @cd $(DOCKER_DIR) && docker build -f Dockerfile-metaserver -t ufoot/liquidwar-metaserver:latest . diff -Nru liquidwar-5.6.4/Makefile.mgw liquidwar-5.6.5/Makefile.mgw --- liquidwar-5.6.4/Makefile.mgw 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/Makefile.mgw 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ # Liquid War is a multiplayer wargame -# Copyright (C) 1998-2007 Christian Mauduit +# Copyright (C) 1998-2018 Christian Mauduit # # 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 @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Liquid War homepage : http://www.ufoot.org/liquidwar/v5 +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # Contact author : ufoot@ufoot.org # This Makefile is used to compile the MS Windows 32-bit executable binary. @@ -89,9 +89,11 @@ langdk \ langen \ langfr \ +langpl \ language \ level \ logcli \ +lw6 \ main \ map \ maptex \ diff -Nru liquidwar-5.6.4/misc/allegro-gp2x/allegro-accel.html liquidwar-5.6.5/misc/allegro-gp2x/allegro-accel.html --- liquidwar-5.6.4/misc/allegro-gp2x/allegro-accel.html 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/allegro-gp2x/allegro-accel.html 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,76 @@ + + + GP2X Hardware Acceleration in Allegro + + + +

GP2X Hardware Acceleration in Allegro

+ +

Credits

+ +

The hardware acceleration in GP2X Allegro is heavily based on +paeryn's code for SDL. He did all the hard work! + +

What is accelerated

+ +
    + +
  • Trivial filling operations - rectfill, +hline, vline, clear_to_color - when applied to a bitmap in +video memory, i.e. the screen, a video bitmap, or a subbitmap +of either. + +
  • Blitting operations - blit, masked_blit, +draw_sprite - where the source and destination are both in +video memory. + +
+ +

Acceleration is only supported in 8bpp and 16bpp modes; GP2X +Allegro only supports those modes anyway, so that's OK. + +

Allegro uses 5Mb for video memory, and you can set a graphics +mode with any virtual size you like subject to available memory. + +

To take advantage of hardware accelerated blitting, it's +easiest to use video bitmaps. First create one the size of the +visible screen (SCREEN_W x SCREEN_H), then use show_video_bitmap +to ensure the screen is scrolled properly, and do all your +drawing there. Then create additional video bitmaps for your +sprites, etc, and use blit or draw_sprite as normal to draw them +to your primary video bitmap. + +

You can combine that with page flipping by creating two +screen-sized video bitmaps, and drawing to one while the other +is visible, swapping which is which each frame. + + +

Hardware Scrolling

+ +

If you're not using video bitmaps, you can scroll the visible +screen around the virtual screen, but there's a 32-bit granularity so +you're restricted to even X coordinates in 16bpp or multiples of +4 in 8bpp. + +

It's not trivial to combine this with using video bitmaps, +though it can be done. + + +

Example - Parallax Demo

+ +

I've uploaded an example which uses page flipped video +bitmaps to take advantage of the hardware acceleration. It +draws lots of layers of random pipe-like tiles, using +accelerated masked blits or sprites or something, I don't +totally remember! + +

+ + + + + + \ No newline at end of file diff -Nru liquidwar-5.6.4/misc/allegro-gp2x/allegro-building.html liquidwar-5.6.5/misc/allegro-gp2x/allegro-building.html --- liquidwar-5.6.4/misc/allegro-gp2x/allegro-building.html 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/allegro-gp2x/allegro-building.html 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,63 @@ + + + Building Allegro for GP2X + + + +

Building Allegro for GP2X

+ +

by George Foot + + +

Don't Panic

+ +

It's really not very hard... + +

    + +
  1. Unpack the Allegro sources, e.g. tar -xzf allegro-4.2.0.tar.gz + +
  2. Apply my patches, e.g. cd allegro-4.2.0 ; patch -p1 < gp2xallegro-0.3.diff + +
  3. Configure properly - this is the hard bit, so unless you + know better, stick to the following command: + +

    LDFLAGS=-static ./configure --host arm-open2x-linux + --without-x --enable-static --disable-shared --enable-lgp2x + --disable-modules --prefix=/opt/gp2x + --enable-dbglib + +

    This will build static libraries, not shared libraries, + in debug and release modes, and link the various programs + (demo game, examples, tests) with the release version, + totally staticly. Everything gets installed to + subdirectories (bin, lib, include, share) of /opt/gp2x. + +

    If you want, you can --enable-dbgprog to build the + programs in debug mode too, and link them to the debug + library. Up to you. + +

  4. make depend - sort out dependencies, write + makefiles + +
  5. make - build everything + +
  6. make install - copy relevant stuff to /opt/gp2x or + whatever you set --prefix to +
+ +After installation, you probably want to add the relevant bin +directory to your path. Don't worry about the include or lib +directories, gp2x-allegro-config handles that for you! So it +doesn't matter if you choose to install Allegro off by itself +somewhere, away from all your precious devkitgp2x libraries. + + +

Using Allegro for GP2X

+ +

See Using Allegro for GP2X + + + + + diff -Nru liquidwar-5.6.4/misc/allegro-gp2x/allegro.html liquidwar-5.6.5/misc/allegro-gp2x/allegro.html --- liquidwar-5.6.4/misc/allegro-gp2x/allegro.html 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/allegro-gp2x/allegro.html 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,56 @@ + + + GP2X Allegro + + + +

GP2X Allegro v0.3

+ +

by George Foot + +

I've ported Allegro to the GP2X. Thanks must go to rlyeh, +whose "minimal" library was a great reference for +setting the video mode beyond what fbdev can do, and paeryn, +whose 2D acceleration routines in SDL provided the basis of the +routines Allegro is using now. + +

Links and Downloads

+ + +

If you don't know Allegro, but want to +learn, have a look around the website, and get the main +distribution and install it on your dev PC. You might want to +get a zip version instead of the .tar.gz linked above, if you're +using Windows. Then get the binary archive above, and use that +when developing for GP2X. Use the documentation from the core +Allegro distribution, which gets built in various formats as +part of the build process. + +

If you know Allegro and just want to develop +for the GP2X, you can just get the binary package - it includes +all the headers too, but no docs. Use the documentation from +core Allegro, which you'll probably want to install on your dev +PC anyway as above (if you haven't already got it). + +

If you're an advanced user who might want to +hack the library itself, you'll need the original sources and my +patches, but not the binary archive. It's not too hard to build it yourself. + + +

Using Allegro for GP2X

+ +

See Using Allegro for GP2X + +

Hardware Acceleration

+ +

See GP2X Hardware Acceleration in Allegro + + + + +

\ No newline at end of file diff -Nru liquidwar-5.6.4/misc/allegro-gp2x/allegro-prebuilt.html liquidwar-5.6.5/misc/allegro-gp2x/allegro-prebuilt.html --- liquidwar-5.6.4/misc/allegro-gp2x/allegro-prebuilt.html 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/allegro-gp2x/allegro-prebuilt.html 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,47 @@ + + + Pre-built GP2X Allegro v0.2 + + + +

Pre-built GP2X Allegro v0.3

+ +

by George Foot + + +

Introduction

+ +

This is aimed at Windows users who lack the software to +crosscompile Unix Allegro themselves. It's particularly aimed +at devkitGP2X users, but it may also work with other toolchains, +if they are sufficiently advanced; the GPH toolchain is not +advanced though, so don't use that. + + +

Download

+ +

I'd recommend also installing Allegro 4.2.0, as that's what this is based on - then you'll have the docs and examples, not to mention the ability to test your games on your PC! +

+ + +

Installing

+ +

You can install this wherever you like, including into your +devkitGP2X directories. You need to edit the +gp2x-allegro-config script, in the bin directory, and set the +prefix to the parent of the bin directory. You may want to add +the bin directory to your path. + + +

Using Allegro for GP2X

+ +

See Using Allegro for GP2X + + + + + diff -Nru liquidwar-5.6.4/misc/allegro-gp2x/allegro-using.html liquidwar-5.6.5/misc/allegro-gp2x/allegro-using.html --- liquidwar-5.6.4/misc/allegro-gp2x/allegro-using.html 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/allegro-gp2x/allegro-using.html 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,56 @@ + + + Using Allegro for GP2X + + + +

Using Allegro for GP2X

+ +

Building your own programs

+ +

Generally you should use the gp2x-allegro-config script in +your compile and link command lines. It fills out include and +library paths, and links the right libraries for you. The main +options are: + +

+
--cflags
pass this when compiling +
--libs
pass this when linking +
debug
pass this to enable debugging, and link + against the debug library +
+ +

If it's one command which is both compiling and linking, pass +both flags. + +

As a side effect of the configure line above, +gp2x-allegro-config will also force your binaries to link +staticly. If you don't like it, edit the script and take out +the -static option. + +

Example: building the joystick example program

+ +

The examples will have been built automatically, but as an +example of building your own program, try copying the exjoy.c +file from the examples directory to somewhere fresh. Then you +can compile it: + +

gcc -o exjoy.o -c exjoy.c -O2 -Wall -Werror -g +`gp2x-allegro-config --cflags debug` + +

And link it: + +

gcc -o exjoy exjoy.o `gp2x-allegro-config --libs` + +

Then write a .gpe wrapper script that runs './exjoy' and +chains back to the gp2xmenu. + +

Note that it's OK to pass 'debug' when compiling yet not when +linking - your own code's TRACE calls will then output to +allegro.log, while the library itself will not. Quite a useful +setup. + + + + +

\ No newline at end of file diff -Nru liquidwar-5.6.4/misc/docker/010-metaserver.conf liquidwar-5.6.5/misc/docker/010-metaserver.conf --- liquidwar-5.6.4/misc/docker/010-metaserver.conf 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/docker/010-metaserver.conf 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,29 @@ +Listen 0.0.0.0:8053 + +ServerName localhost +ServerSignature Off +ServerTokens Prod +#Header Unset "X-Powered-By" + + + RewriteEngine On + RewriteCond %{REQUEST_METHOD} !^(HEAD|GET|POST) + RewriteRule .* - [F,L] + + ServerAdmin admin@localhost + ServerName localhost + + DocumentRoot /var/www/metaserver + + AllowOverride None + + + Order allow,deny + allow from all + + + LogLevel warn + ErrorLog /var/log/apache2/error-metaserver.log + CustomLog /var/log/apache2/access-metaserver.log combined + + diff -Nru liquidwar-5.6.4/misc/docker/Dockerfile-build.in liquidwar-5.6.5/misc/docker/Dockerfile-build.in --- liquidwar-5.6.4/misc/docker/Dockerfile-build.in 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/docker/Dockerfile-build.in 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,36 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +FROM debian +MAINTAINER Christian Mauduit "ufoot@ufoot.org" +LABEL package="liquidwar" version="@VERSION@" org.ufoot.liquidwar.os="debian" org.ufoot.liquidwar.type="build" description="Liquid War build image, contains all the requirements to build the program, and has it built once. Homepage https://ufoot.org/liquidwar/v5" + +ENV DEBIAN_FRONTEND noninteractive +RUN (apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get -y autoclean && apt-get -y autoremove) + +# complete build requirements +RUN apt-get install -y gcc make liballegro4-dev python texinfo texlive texlive-latex-base +RUN apt-get clean + +# our build +RUN install -d /usr/local/src +COPY liquidwar-@VERSION@.tar.gz /usr/local/src/liquidwar-@VERSION@.tar.gz +RUN cd /usr/local/src && tar xzf liquidwar-@VERSION@.tar.gz +RUN cd /usr/local/src/liquidwar-@VERSION@ && ./configure && make && make install diff -Nru liquidwar-5.6.4/misc/docker/Dockerfile-metaserver.in liquidwar-5.6.5/misc/docker/Dockerfile-metaserver.in --- liquidwar-5.6.4/misc/docker/Dockerfile-metaserver.in 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/docker/Dockerfile-metaserver.in 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,53 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +FROM debian +MAINTAINER Christian Mauduit "ufoot@ufoot.org" +LABEL package="liquidwar" version="@VERSION@" org.ufoot.liquidwar.os="debian" org.ufoot.liquidwar.type="metaserver" description="Liquid War metaserver image, runs a metaserver on a LAMP stack (Linux/Apache/MySQL/PHP) listening on port 8053. Homepage https://ufoot.org/liquidwar/v5" + +ENV DEBIAN_FRONTEND noninteractive +RUN (apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get -y autoclean && apt-get -y autoremove) + +# typical LAMP install +RUN apt-get install -y apache2 mysql-server libapache2-mod-php7.0 php7.0-mysql +RUN apt-get clean + +# set up Apache +COPY 010-metaserver.conf /etc/apache2/sites-available/010-metaserver.conf +RUN cd /etc/apache2/sites-enabled && ln -s ../sites-available/010-metaserver.conf . +RUN cd /etc/apache2/mods-enabled && ln -s ../mods-available/rewrite.load . +COPY metaserver.tar.gz /root/metaserver.tar.gz +RUN cd /var/www && tar xzf /root/metaserver.tar.gz + +# set up Mysql, note the clear password, as the MySQL server is sandboxed +# within Docker, revealing this is not that bad, one could typically imagine +# a no-password through UNIX socket connection, but doing this with an exposed +# password represents the same threat and is much easier to handle. Use at your +# own risk anyway, this is not a stronghold, you've been warned. +COPY tables.sql /root/tables.sql +RUN /etc/init.d/mysql start && mysqladmin create metaserver && (mysql < /root/tables.sql metaserver) && (echo "GRANT SELECT, INSERT, UPDATE, DELETE ON metaserver.* TO www IDENTIFIED BY 'dd02c7c2232759874e1c205587017bed';" | mysql) && (echo "FLUSH PRIVILEGES;" | mysql ) && echo "done" ; /etc/init.d/mysql stop + +# startup script +RUN install -d /usr/local/bin +COPY lamp.sh /usr/local/bin/lamp.sh + +# run server on default port +EXPOSE 8053 +ENTRYPOINT /usr/local/bin/lamp.sh diff -Nru liquidwar-5.6.4/misc/docker/Dockerfile-server.in liquidwar-5.6.5/misc/docker/Dockerfile-server.in --- liquidwar-5.6.4/misc/docker/Dockerfile-server.in 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/docker/Dockerfile-server.in 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,41 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +FROM debian +MAINTAINER Christian Mauduit "ufoot@ufoot.org" +LABEL package="liquidwar" version="@VERSION@" org.ufoot.liquidwar.os="debian" org.ufoot.liquidwar.type="server" description="Liquid War server image, contains a running instance of the program, listening on default port 8035. Homepage https://ufoot.org/liquidwar/v5" + +ENV DEBIAN_FRONTEND noninteractive +RUN (apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get -y autoclean && apt-get -y autoremove) + +# minimal build requirements +RUN apt-get install -y gcc make liballegro4-dev +RUN apt-get clean + +# our build +RUN install -d /usr/local/src +COPY liquidwar-@VERSION@.tar.gz /usr/local/src/liquidwar-@VERSION@.tar.gz +RUN cd /usr/local/src && tar xzf liquidwar-@VERSION@.tar.gz +RUN cd /usr/local/src/liquidwar-@VERSION@ && ./configure && make && make install + +# run server on default port +EXPOSE 8035 +USER nobody +ENTRYPOINT /usr/local/bin/liquidwar-server -2 -public -comment Public_Liquid_War_5_server_running_in_Docker_instance diff -Nru liquidwar-5.6.4/misc/docker/lamp.sh liquidwar-5.6.5/misc/docker/lamp.sh --- liquidwar-5.6.4/misc/docker/lamp.sh 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/docker/lamp.sh 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,33 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +#!/bin/sh +if /etc/init.d/mysql start ; then + if /etc/init.d/apache2 start ; then + tail -f /var/log/mysql/error.log & + tail -f /var/log/apache2/access-metaserver.log & + while [ $(ps auxwww | grep mysqld | grep -v grep | wc -l) -ge 1 ] && [ $(ps auxwww | grep apache2 | grep -v grep | wc -l) -ge 1 ] ; do + sleep 1 + done + fi +fi + +exit 1 + diff -Nru liquidwar-5.6.4/misc/fix_map_palette.sh liquidwar-5.6.5/misc/fix_map_palette.sh --- liquidwar-5.6.4/misc/fix_map_palette.sh 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/fix_map_palette.sh 2018-12-23 19:04:36.000000000 +0000 @@ -2,7 +2,7 @@ ############################################################################# # Liquid War is a multiplayer wargame # -# Copyright (C) 1998-2007 Christian Mauduit # +# Copyright (C) 1998-2018 Christian Mauduit # # # # 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 # @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # -# Liquid War homepage : http://www.ufoot.org/liquidwar/v5 # +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # # Contact author : ufoot@ufoot.org # ############################################################################# diff -Nru liquidwar-5.6.4/misc/liquidwar_32x32.xpm liquidwar-5.6.5/misc/liquidwar_32x32.xpm --- liquidwar-5.6.4/misc/liquidwar_32x32.xpm 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar_32x32.xpm 2018-12-23 19:04:36.000000000 +0000 @@ -1,380 +1,364 @@ /* XPM */ static char * liquidwar_32x32_xpm[] = { -"32 32 345 2", +"32 32 329 2", " c None", -". c #005630", -"+ c #000A87", -"@ c #0000CE", -"# c #0000F8", +". c #00791F", +"+ c #0001A0", +"@ c #0000D7", +"# c #0000FF", "$ c #0000FE", -"% c #0000FF", -"& c #0000EC", -"* c #0000E6", -"= c #03C906", -"- c #00DF04", -"; c #00FA01", -"> c #00B607", -", c #00474A", -"' c #00009F", -") c #0000DC", -"! c #0000FA", -"~ c #0000F9", -"{ c #476902", -"] c #00F500", -"^ c #00FE00", -"/ c #00E200", -"( c #00681B", -"_ c #00008C", -": c #0000B7", -"< c #0000E3", -"[ c #B60009", -"} c #AF0000", -"| c #4E5200", -"1 c #00EB00", -"2 c #00F000", -"3 c #00772B", -"4 c #000089", -"5 c #0000AE", -"6 c #0000FD", -"7 c #000BB6", -"8 c #B8000C", -"9 c #EE0000", -"0 c #9B0000", -"a c #474A00", -"b c #00DD00", -"c c #007925", -"d c #0000B2", -"e c #0000F4", -"f c #001688", -"g c #00A51C", -"h c #FD0001", -"i c #E90000", -"j c #8E0000", -"k c #355900", -"l c #00DA00", -"m c #00D900", -"n c #00583C", -"o c #0000C4", -"p c #0000E9", -"q c #00186C", -"r c #00A913", -"s c #00F101", -"t c #F10005", +"% c #05D003", +"& c #00FE00", +"* c #01C901", +"= c #024244", +"- c #010098", +"; c #0000E3", +"> c #764001", +", c #00EA01", +"' c #00F400", +") c #007310", +"! c #00037A", +"~ c #0000B4", +"{ c #0000FA", +"] c #0000F2", +"^ c #F90000", +"/ c #D00000", +"( c #5C3500", +"_ c #01EE00", +": c #00FF00", +"< c #00861D", +"[ c #00017B", +"} c #0000A8", +"| c #0000F5", +"1 c #0003D2", +"2 c #009C40", +"3 c #FA0000", +"4 c #FF0000", +"5 c #B70000", +"6 c #562800", +"7 c #00DD00", +"8 c #00F800", +"9 c #008B1D", +"0 c #000780", +"a c #0000AA", +"b c #0000F6", +"c c #0100FC", +"d c #0105A7", +"e c #00991F", +"f c #FD0000", +"g c #F70000", +"h c #950000", +"i c #3C3800", +"j c #00D700", +"k c #00ED00", +"l c #00642B", +"m c #000082", +"n c #0000BA", +"o c #0000FD", +"p c #0000F0", +"q c #020383", +"r c #019D11", +"s c #00FC00", +"t c #FB0000", "u c #FE0000", -"v c #F80000", -"w c #B50000", -"x c #1F7400", -"y c #00DF00", -"z c #00DB01", -"A c #003F4D", -"B c #000096", -"C c #0000DF", -"D c #0000F0", -"E c #00245C", -"F c #00A60A", -"G c #00FB00", -"H c #00CF02", -"I c #CC0008", -"J c #F70000", -"K c #A50000", -"L c #117500", -"M c #00D100", -"N c #00D903", -"O c #003B57", -"P c #0000AC", -"Q c #003B46", -"R c #009702", -"S c #00F100", -"T c #DF0004", -"U c #930000", -"V c #096D02", -"W c #00B200", -"X c #00FC00", -"Y c #00AD08", -"Z c #002865", -"` c #0000B8", -" . c #004F30", -".. c #00BC00", -"+. c #00FF00", -"@. c #00E303", -"#. c #FB0001", -"$. c #CC0000", -"%. c #750700", -"&. c #006002", -"*. c #00AE00", -"=. c #00F600", -"-. c #008F0D", -";. c #002170", -">. c #0000D0", -",. c #0000DD", -"'. c #000295", -"). c #007708", -"!. c #00D500", -"~. c #00C803", -"{. c #B00017", -"]. c #FD0000", -"^. c #590B02", -"/. c #006200", -"(. c #00EF00", -"_. c #007C0D", -":. c #001D73", -"<. c #0000B4", -"[. c #0000ED", -"}. c #0000EF", -"|. c #0000CC", -"1. c #0000CA", -"2. c #0000E5", -"3. c #0000EA", -"4. c #0000B9", -"5. c #002965", -"6. c #008C00", -"7. c #00D000", -"8. c #DB001A", -"9. c #A90000", -"0. c #420D0E", -"a. c #006D00", -"b. c #00CF00", -"c. c #007B0B", -"d. c #00175C", -"e. c #0000A0", -"f. c #0000CF", -"g. c #0008AA", -"h. c #002A68", -"i. c #00345B", -"j. c #003161", -"k. c #0006A5", -"l. c #0000AF", -"m. c #00028B", -"n. c #004933", -"o. c #00BA00", -"p. c #00D300", -"q. c #00690F", -"r. c #F60000", -"s. c #9E0000", -"t. c #4D2B04", -"u. c #008900", -"v. c #00E500", -"w. c #00B809", -"x. c #002448", -"y. c #000070", -"z. c #00097B", -"A. c #006326", -"B. c #008A01", -"C. c #008700", -"D. c #007B00", -"E. c #00502E", -"F. c #000A7A", -"G. c #001256", -"H. c #005C11", -"I. c #00CC00", -"J. c #005628", -"K. c #F30000", -"L. c #980000", -"M. c #3C4800", -"N. c #00AA00", -"O. c #00DF01", -"P. c #004D2A", -"Q. c #001555", -"R. c #004A2F", -"S. c #008D00", -"T. c #00A900", -"U. c #00BE00", -"V. c #00A400", -"W. c #006F03", -"X. c #00312C", -"Y. c #002B43", -"Z. c #008104", -"`. c #00EE00", -" + c #00F700", -".+ c #00AB01", -"++ c #003742", -"@+ c #FF0000", -"#+ c #FB0000", -"$+ c #304400", -"%+ c #00A700", -"&+ c #00F800", -"*+ c #00DE00", -"=+ c #00B800", -"-+ c #00AB00", -";+ c #00C200", -">+ c #00F400", -",+ c #00FD00", -"'+ c #00D700", -")+ c #008406", -"!+ c #005A10", -"~+ c #009600", -"{+ c #00F900", -"]+ c #008808", -"^+ c #002654", -"/+ c #FE0001", -"(+ c #FC0000", -"_+ c #A60000", -":+ c #3A3700", -"<+ c #009500", -"[+ c #00F300", -"}+ c #00BF00", -"|+ c #007912", -"1+ c #001C5E", -"2+ c #E1000A", -"3+ c #F10000", -"4+ c #B00000", -"5+ c #6D0D00", -"6+ c #046500", -"7+ c #00CA00", -"8+ c #00E900", -"9+ c #006726", -"0+ c #DF0006", -"a+ c #E20000", -"b+ c #2E3800", -"c+ c #00B000", -"d+ c #00CB00", -"e+ c #009400", -"f+ c #068900", -"g+ c #097C00", -"h+ c #00AF00", -"i+ c #00EC00", -"j+ c #00A800", -"k+ c #005041", -"l+ c #F70002", -"m+ c #DF0000", -"n+ c #720B00", -"o+ c #1D6B00", -"p+ c #00E400", -"q+ c #00CD00", -"r+ c #027A00", -"s+ c #0E6F00", -"t+ c #224F00", -"u+ c #4E1900", -"v+ c #491600", -"w+ c #0D6C00", -"x+ c #008606", -"y+ c #001790", -"z+ c #F60002", -"A+ c #B60000", -"B+ c #611400", -"C+ c #2D6C00", -"D+ c #068300", -"E+ c #018600", -"F+ c #0F6800", -"G+ c #462C00", -"H+ c #671900", -"I+ c #770900", -"J+ c #780000", -"K+ c #6D0300", -"L+ c #414200", -"M+ c #00B900", -"N+ c #00E600", -"O+ c #00C400", -"P+ c #007D01", -"Q+ c #005549", -"R+ c #0001DC", -"S+ c #F00000", -"T+ c #8F0000", -"U+ c #8E0200", -"V+ c #7F0C00", -"W+ c #900100", -"X+ c #9F0000", -"Y+ c #9C0000", -"Z+ c #9A0000", -"`+ c #890000", -" @ c #75000F", -".@ c #004025", -"+@ c #007A02", -"@@ c #007800", -"#@ c #007A04", -"$@ c #003F58", -"%@ c #0005D0", -"&@ c #DA0008", -"*@ c #EF0000", -"=@ c #C20000", -"-@ c #AA0000", -";@ c #AB0000", -">@ c #CF0000", -",@ c #EA0000", -"'@ c #E60000", -")@ c #D10000", -"!@ c #7D0000", -"~@ c #490035", -"{@ c #000C66", -"]@ c #003A35", -"^@ c #006517", -"/@ c #006B11", -"(@ c #005B1C", -"_@ c #00304F", -":@ c #0006BF", -"<@ c #0000E2", -"[@ c #F20003", -"}@ c #BC0000", -"|@ c #5C000B", -"1@ c #190062", -"2@ c #0000BA", -"3@ c #0000D7", -"4@ c #0000B0", -"5@ c #0000D6", -"6@ c #0000D3", -"7@ c #FB0003", -"8@ c #DC0000", -"9@ c #880000", -"0@ c #41003F", -"a@ c #0500C1", -"b@ c #0000F5", -"c@ c #0000FC", -"d@ c #0000F2", -"e@ c #0000F1", -"f@ c #EF0003", -"g@ c #F90000", -"h@ c #E10000", -"i@ c #820002", -"j@ c #4C0025", -"k@ c #0600B6", -"l@ c #0000D9", -"m@ c #CA0008", -"n@ c #850000", -"o@ c #4E0029", -"p@ c #0F0089", -"q@ c #0000D2", -"r@ c #0000F7", -"s@ c #EC0002", -"t@ c #E90004", -"u@ c #D30000", -"v@ c #7E0002", -"w@ c #500024", -"x@ c #250068", -"y@ c #0200C2", -"z@ c #0000E0", -"A@ c #2C002D", -"B@ c #0F007D", -"C@ c #0100A1", -"D@ c #0000D5", +"v c #C00000", +"w c #2E5300", +"x c #00DF00", +"y c #004F3C", +"z c #00008C", +"A c #0000D3", +"B c #0000F7", +"C c #000A7A", +"D c #019B06", +"E c #00FD00", +"F c #BA0000", +"G c #1C5900", +"H c #00D400", +"I c #00F500", +"J c #004C42", +"K c #0000A2", +"L c #0000EE", +"M c #002264", +"N c #008F00", +"O c #01EB00", +"P c #FC0000", +"Q c #A20100", +"R c #135501", +"S c #00B100", +"T c #00FA00", +"U c #00D100", +"V c #003250", +"W c #0000D5", +"X c #0000CF", +"Y c #002F49", +"Z c #00AF00", +"` c #00F700", +" . c #00F200", +".. c #E20000", +"+. c #7D0400", +"@. c #0A4802", +"#. c #00A500", +"$. c #00FB00", +"%. c #00A900", +"&. c #002560", +"*. c #0000FC", +"=. c #000097", +"-. c #005617", +";. c #00D500", +">. c #02FF00", +",. c #00CE03", +"'. c #00B400", +"). c #F80001", +"!. c #C70000", +"~. c #5F0700", +"{. c #074900", +"]. c #00AD00", +"^. c #009401", +"/. c #002167", +"(. c #0000EF", +"_. c #0000C7", +":. c #0000DB", +"<. c #0000D6", +"[. c #001674", +"}. c #007309", +"|. c #00D000", +"1. c #01FF00", +"2. c #00D800", +"3. c #006870", +"4. c #C30000", +"5. c #41050A", +"6. c #035004", +"7. c #00C700", +"8. c #009001", +"9. c #001654", +"0. c #00009F", +"a. c #0000D4", +"b. c #0000C9", +"c. c #001E6D", +"d. c #002C59", +"e. c #002A64", +"f. c #0009A4", +"g. c #0000B8", +"h. c #0000A1", +"i. c #00353F", +"j. c #00E400", +"k. c #064E4C", +"l. c #B50000", +"m. c #501805", +"n. c #026E02", +"o. c #00C902", +"p. c #002042", +"q. c #000079", +"r. c #000093", +"s. c #004245", +"t. c #008502", +"u. c #008003", +"v. c #007800", +"w. c #004F2C", +"x. c #00028C", +"y. c #00016C", +"z. c #004A16", +"A. c #00CA00", +"B. c #01E600", +"C. c #005B26", +"D. c #F40000", +"E. c #AD0000", +"F. c #4A3500", +"G. c #00A200", +"H. c #005025", +"I. c #00005D", +"J. c #003436", +"K. c #008700", +"L. c #00A400", +"M. c #00BA00", +"N. c #009E00", +"O. c #00262C", +"P. c #001352", +"Q. c #007B04", +"R. c #00E000", +"S. c #01C400", +"T. c #003A43", +"U. c #B30000", +"V. c #343400", +"W. c #01FB00", +"X. c #00D301", +"Y. c #009C0C", +"Z. c #009802", +"`. c #00EA00", +" + c #00D900", +".+ c #007304", +"++ c #003A18", +"@+ c #008200", +"#+ c #00EF00", +"$+ c #019A00", +"%+ c #002C54", +"&+ c #BB0000", +"*+ c #382800", +"=+ c #008D00", +"-+ c #00A700", +";+ c #00D600", +">+ c #00C800", +",+ c #018406", +"'+ c #001F64", +")+ c #F60000", +"!+ c #BC0000", +"~+ c #650C00", +"{+ c #055600", +"]+ c #00F000", +"^+ c #00DA00", +"/+ c #00F100", +"(+ c #01CA00", +"_+ c #007315", +":+ c #000AB5", +"<+ c #EB0000", +"[+ c #A20000", +"}+ c #2F2200", +"|+ c #00AC00", +"1+ c #00F900", +"2+ c #048800", +"3+ c #087600", +"4+ c #00AB00", +"5+ c #02B900", +"6+ c #005C2C", +"7+ c #790000", +"8+ c #0F6E00", +"9+ c #00E500", +"0+ c #00DE00", +"a+ c #00D200", +"b+ c #009700", +"c+ c #027E00", +"d+ c #0D6700", +"e+ c #3E2700", +"f+ c #4B1100", +"g+ c #066900", +"h+ c #00C500", +"i+ c #00C200", +"j+ c #018D00", +"k+ c #002A72", +"l+ c #0000E7", +"m+ c #C90000", +"n+ c #590F00", +"o+ c #296D00", +"p+ c #078900", +"q+ c #028700", +"r+ c #096C00", +"s+ c #2E3100", +"t+ c #591C00", +"u+ c #740C00", +"v+ c #760000", +"w+ c #730000", +"x+ c #443700", +"y+ c #019500", +"z+ c #00C100", +"A+ c #00EC00", +"B+ c #00E100", +"C+ c #00B900", +"D+ c #008900", +"E+ c #015D35", +"F+ c #0005E0", +"G+ c #A70000", +"H+ c #820000", +"I+ c #771200", +"J+ c #641D00", +"K+ c #760F00", +"L+ c #920000", +"M+ c #9B0000", +"N+ c #940000", +"O+ c #930000", +"P+ c #900000", +"Q+ c #820108", +"R+ c #113C19", +"S+ c #008400", +"T+ c #00A600", +"U+ c #006D00", +"V+ c #015B24", +"W+ c #000AC4", +"X+ c #F30000", +"Y+ c #C10000", +"Z+ c #A40000", +"`+ c #E80000", +" @ c #E30000", +".@ c #D40000", +"+@ c #8F0000", +"@@ c #540028", +"#@ c #04036B", +"$@ c #003B2B", +"%@ c #00640D", +"&@ c #006A09", +"*@ c #00650A", +"=@ c #013A32", +"-@ c #0009B5", +";@ c #F20000", +">@ c #D60000", +",@ c #700000", +"'@ c #230041", +")@ c #0000AB", +"!@ c #0000CC", +"~@ c #000BB4", +"{@ c #00119B", +"]@ c #000E8E", +"^@ c #0100CB", +"/@ c #0400F8", +"(@ c #FA0002", +"_@ c #F10000", +":@ c #4C001E", +"<@ c #0600B6", +"[@ c #0100FF", +"}@ c #0100F5", +"|@ c #FA0001", +"1@ c #F50000", +"2@ c #56000A", +"3@ c #12008E", +"4@ c #0000FB", +"5@ c #0100FD", +"6@ c #EF0000", +"7@ c #C60000", +"8@ c #59000F", +"9@ c #110078", +"0@ c #0100FE", +"a@ c #E70000", +"b@ c #910000", +"c@ c #5D000B", +"d@ c #2F0049", +"e@ c #0C00A6", +"f@ c #0000DE", +"g@ c #F30001", +"h@ c #EC0000", +"i@ c #600024", +"j@ c #0C0076", +"k@ c #0000B2", +"l@ c #0000DF", +"m@ c #0100F8", +"n@ c #0000F4", " ", " ", -" . + @ # $ % & * ", -" = - ; > , ' ) $ % % % ! ~ ", -" { ] ^ ^ / ( _ : $ % % % % % % < ", -" [ } | 1 ^ ^ 2 3 4 5 6 % % % % % % 6 7 ", -" 8 9 0 a b ^ ^ / c _ d 6 % % % % % % 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 u u J K L M ^ ^ N O P D $ % % % % % % D Q R S ^ ", -" T u u i U V W ^ X Y Z ) 6 $ % % % % % D ` ...X +.@. ", -" #.u u $.%.&.*.^ =.-.;.>.~ $ % 6 $ % % ,.'.).!.+.^ ~. ", -" {.u u ].} ^./...^ (._.:.<.[.}.|.<.1.2.3.4.5.6.m +.+.7. ", -" 8.u u u 9.0.a.b.^ =.c.d.e.f.g.h.i.j.k.l.m.n.o.] +.+.p.q. ", -" u u u r.s.t.u.v.^ ^ w.x.y.z.A.B.C.D.E.F.G.H.l ^ +.^ I.J. ", -" u u u K.L.M.N.=.^ ^ O.P.Q.R.S.T.U.V.W.X.Y.Z.`.+.+. +.+++ ", -" @+@+@+#+0 $+%+&++.+.G *+=+-+;+>+^ ,+'+)+!+~+{++.X p.]+^+ ", -" /+@+@+(+_+:+<+2 +.+.+.^ {+[+&+^ ^ +.X b =+/ +.+.&+}+|+1+ ", -" 2+@+@+3+4+5+6+7.+.+.^ ^ ,+{+b 7+7+8++.+.^ +.+.+. +..9+ ", -" 0+@+@+#+a+0 b+c+^ ^ ,+G `.d+e+f+g+h+&++.+.+.+.+.i+j+k+ ", -" l+@+@+].m+n+o+p+b.q+=+r+s+t+u+v+w+;+[+^ ^ X `.j+x+y+ ", -" z+@+@+@+].A+B+C+D+E+F+G+H+I+J+K+L+~+M+N+!.O+h+P+Q+R+ ", -" @+@+@+@+S+} T+U+V+W+s.X+Y+Z+`+ @.@+@e+@@a.#@$@%@ ", -" &@@+@+@+u *@=@-@;@>@,@,@'@)@!@~@{@]@^@/@(@_@:@<@ ", -" [@@+@+@+@+u #+#+u @+@+v }@|@1@2@3@1.: 4@5@6@ ", -" 7@@+@+@+@+@+@+@+@+@+8@9@0@a@b@$ c@d@e@D ", -" f@@+@+@+@+@+u g@h@i@j@k@b@% % % % l@ ", -" m@/+@+@+(+h@4+n@o@p@q@c@% % ! r@ ", -" s@t@u@v@w@x@y@z@! % d@~ ", -" A@B@C@5@D@ ", +" . + @ # # $ # $ $ ", +" % & & * = - ; # # $ # # # $ ", +" > , & & ' ) ! ~ { # $ $ $ $ # $ ] ", +" ^ / ( _ : & : < [ } | # # $ $ $ # # 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 4 v w x : : ' y z A # # $ # o $ # B C D & E ", +" ^ f u 4 F G H : : I J K L # # $ $ o o # { M N O & s ", +" P f u f Q R S T : U V W # $ # # # $ # o X Y Z ` & . ", +" P f u 4 ..+.@.#.s $.%.&.A *.# # $ # # # L =.-.;.: >.,.'. ", +" ).u u 4 !.~.{.].: ' ^./.~ (.# ; _.:.] b <.[.}.|.: 1.2.3. ", +" t u u 4 4.5.6.7.: T 8.9.0.a.b.c.d.e.f.g.h.i.].I : 1.j.k. ", +" u f 4 3 l.m.n.7 : : o.p.q.r.s.t.u.v.w.x.y.z.A.: : : B.C. ", +" u f 4 D.E.F.G.8 : : I H.I.J.K.L.M.N.v.O.P.Q.R.: : s S.T. ", +" u u 4 P U.V.G.W.: & : X.Y.Z.%.`.: s +.+++@+#+: : R.$+%+ ", +" u u 4 4 &+*+=+ .: & & : : ' 8 : : : : R.-+;+: : : >+,+'+ ", +" P u 4 )+!+~+{+|.: & & E : : ]+^+j /+: : : : & & : (+_+:+ ", +" P f 4 P <+[+}+|+: : : : 1+2.N.2+3+4+` : & & E : T 5+6+:. ", +" P P f 4 4 ..7+8+` 9+0+a+b+c+d+e+f+g+h+E : : : $.i+j+k+l+ ", +" f f u 4 4 m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+U C+D+E+F+ ", +" P f u 4 4 )+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+@+U+K.V+W+# ", +" t f u f 4 X+Y+G+Z+m+`+`+ @.@+@@@#@$@%@&@*@=@-@b ", +" ^ f u 4 u 4 u X+;@u 4 4 4 >@,@'@)@!@~@{@]@^@# /@ ", +" 3 (@u f 4 4 4 4 4 4 4 _@N+:@<@B [@# { }@# # ", +" |@f f 4 4 4 u 4 4 1@Z+2@3@4@# $ 5@# # # ", +" P P f u u 4 6@7@O+8@9@!@5@$ 0@*.*.$ ", +" P P 4 a@b@c@d@e@f@b $ # *.4@ ", +" g@h@i@j@k@l@; m@# n@ ", " ", " "}; diff -Nru liquidwar-5.6.4/misc/liquidwar.desktop liquidwar-5.6.5/misc/liquidwar.desktop --- liquidwar-5.6.4/misc/liquidwar.desktop 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar.desktop 2018-12-23 19:04:36.000000000 +0000 @@ -1,19 +1,10 @@ [Desktop Entry] +Type=Application Version=1.0 -Encoding=UTF-8 - Name=Liquid War -#Name[fr]=French translation of Name - Comment=A unique multiplayer wargame -#Name[fr]=French translation of Comment - -Type=Application -Categories=Application;Game;ArcadeGame; - TryExec=liquidwar Exec=liquidwar -FilePattern=liquidwar - -Icon=liquidwar.xpm +Icon=liquidwar +Categories=Game;ArcadeGame; Terminal=false diff -Nru liquidwar-5.6.4/misc/liquidward.in liquidwar-5.6.5/misc/liquidward.in --- liquidwar-5.6.4/misc/liquidward.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidward.in 2018-12-23 19:04:36.000000000 +0000 @@ -2,7 +2,7 @@ ############################################################################# # Liquid War is a multiplayer wargame # -# Copyright (C) 1998-2007 Christian Mauduit # +# Copyright (C) 1998-2018 Christian Mauduit # # # # 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 # @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # -# Liquid War homepage : http://www.ufoot.org/liquidwar/v5 # +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # # Contact author : ufoot@ufoot.org # ############################################################################# @@ -83,7 +83,7 @@ # the comment which will be associated to the server # by default, it contains the name of the machine, but you might # want to put your e-mail here for instance -COMMENT="Public_server_running_on_"`hostname` +COMMENT="Public_Liquid_War_5_server_running_on_host_"`hostname` # the user which should be used to start the daemon # by default, it is set to "nobody:games", this assumes that @@ -93,7 +93,7 @@ # or change the $USER value, but remember: do *not* set it to root! USER=nobody:games -# if you want the server to warn you whenevver someone connects on it, +# if you want the server to warn you whenever someone connects on it, # you might set up a callback script by uncommenting the line below. # You'll also need to edit and install the liquidwar_notify.sh script # manually diff -Nru liquidwar-5.6.4/misc/liquidward.logrotate liquidwar-5.6.5/misc/liquidward.logrotate --- liquidwar-5.6.4/misc/liquidward.logrotate 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidward.logrotate 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,10 @@ +/var/games/liquidwar/liquidward.log { + daily + missingok + rotate 31 + postrotate + /etc/init.d/liquidward restart + endscript + compress + notifempty +} diff -Nru liquidwar-5.6.4/misc/liquidwar.gpe liquidwar-5.6.5/misc/liquidwar.gpe --- liquidwar-5.6.4/misc/liquidwar.gpe 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar.gpe 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,52 @@ +#! /bin/sh + +############################################################################# +# Liquid War is a multiplayer wargame # +# Copyright (C) 1998-2018 Christian Mauduit # +# # +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# # +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # +# Contact author : ufoot@ufoot.org # +############################################################################# + +LIQUIDWAR_BIN=./liquidwar +LIQUIDWAR_DAT=./liquidwar.dat +LIQUIDWAR_LOG=./liquidwar.log +LIQUIDWAR_DEV=./liquidwar.dev + +#clear_screen () { +# dd if=/dev/zero of=/dev/fb0 count=1536 bs=100 +# dd if=/dev/zero of=/dev/fb1 count=1536 bs=100 +#} +# +#clear +#clear_screen + +if test -f $LIQUIDWAR_BIN -a -x $LIQUIDWAR_BIN -a -f $LIQUIDWAR_DAT +then + #$LIQUIDWAR_BIN -dat $LIQUIDWAR_DAT > $LIQUIDWAR_LOG 2>&1 + ls -al /dev > $LIQUIDWAR_DEV + echo mknod >> $LIQUIDWAR_DEV + mknod /dev/fb1 c 29 32 >> $LIQUIDWAR_DEV + ls -al /dev >> $LIQUIDWAR_DEV + $LIQUIDWAR_BIN -silent -dat $LIQUIDWAR_DAT > $LIQUIDWAR_LOG 2>&1 + #sync + #clear_screen +fi + +cd /usr/gp2x +exec ./gp2xmenu + Binary files /tmp/tmpRPCzp_/uN9QuQu3uQ/liquidwar-5.6.4/misc/liquidwar.icns and /tmp/tmpRPCzp_/QzKThTqrGr/liquidwar-5.6.5/misc/liquidwar.icns differ Binary files /tmp/tmpRPCzp_/uN9QuQu3uQ/liquidwar-5.6.4/misc/liquidwar.ico and /tmp/tmpRPCzp_/QzKThTqrGr/liquidwar-5.6.5/misc/liquidwar.ico differ diff -Nru liquidwar-5.6.4/misc/liquidwar-jenkins.sh liquidwar-5.6.5/misc/liquidwar-jenkins.sh --- liquidwar-5.6.4/misc/liquidwar-jenkins.sh 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar-jenkins.sh 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,67 @@ +#!/bin/sh + +############################################################################# +# Liquid War is a multiplayer wargame # +# Copyright (C) 1998-2018 Christian Mauduit # +# # +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # +# # +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # +# Contact author : ufoot@ufoot.org # +############################################################################# + +# Script used by Jenkins daemon to autobuild the program in +# continuous integration mode. http://jenkins-ci.org/ + +echo "******** $0 $(date) ********" +if cd liquidwar ; then + echo "******** $0 $(date) ********" + if ./bootstrap; then + echo "******** $0 $(date) ********" + if ./configure --prefix=$WORKSPACE/local ; then + echo "******** $0 $(date) ********" + if make ; then + echo "******** $0 $(date) ********" + if make install; then + echo "******** $0 $(date) ********" + if make dist; then + echo "******** $0 $(date) ********" + else + echo "make dist failed" + exit 6 + fi + else + echo "make install failed" + exit 5 + fi + else + echo "make failed" + exit 4 + fi + else + echo "./configure failed" + exit 3 + fi + else + echo "./bootstrap failed" + exit 2 + fi +else + echo "cd failed" + exit 1 +fi + +echo "OK" +exit 0 diff -Nru liquidwar-5.6.4/misc/liquidwar_notify.sh liquidwar-5.6.5/misc/liquidwar_notify.sh --- liquidwar-5.6.4/misc/liquidwar_notify.sh 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar_notify.sh 2018-12-23 19:04:36.000000000 +0000 @@ -2,7 +2,7 @@ ############################################################################# # Liquid War is a multiplayer wargame # -# Copyright (C) 1998-2007 Christian Mauduit # +# Copyright (C) 1998-2018 Christian Mauduit # # # # 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 # @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # -# Liquid War homepage : http://www.ufoot.org/liquidwar/v5 # +# Liquid War homepage : https://ufoot.org/liquidwar/v5 # # Contact author : ufoot@ufoot.org # ############################################################################# diff -Nru liquidwar-5.6.4/misc/liquidwar.nsi.in liquidwar-5.6.5/misc/liquidwar.nsi.in --- liquidwar-5.6.4/misc/liquidwar.nsi.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar.nsi.in 2018-12-23 19:04:36.000000000 +0000 @@ -97,7 +97,6 @@ Delete "$INSTDIR\data\*.*" Delete "$INSTDIR\doc\html\*.*" Delete "$INSTDIR\doc\pdf\*.*" - Delete "$INSTDIR\doc\ps\*.*" Delete "$INSTDIR\doc\txt\*.*" Delete "$INSTDIR\misc\*.*" @@ -112,7 +111,6 @@ RMDir "$INSTDIR\data" RMDir "$INSTDIR\doc\html" RMDir "$INSTDIR\doc\pdf" - RMDir "$INSTDIR\doc\ps" RMDir "$INSTDIR\doc\txt" RMDir "$INSTDIR\doc" RMDir "$INSTDIR\misc" Binary files /tmp/tmpRPCzp_/uN9QuQu3uQ/liquidwar-5.6.4/misc/liquidwar.png and /tmp/tmpRPCzp_/QzKThTqrGr/liquidwar-5.6.5/misc/liquidwar.png differ diff -Nru liquidwar-5.6.4/misc/liquidwar.xpm liquidwar-5.6.5/misc/liquidwar.xpm --- liquidwar-5.6.4/misc/liquidwar.xpm 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/liquidwar.xpm 2018-12-23 19:04:36.000000000 +0000 @@ -1,586 +1,692 @@ /* XPM */ static char * liquidwar_xpm[] = { -"48 48 535 2", +"48 48 641 2", " c None", -". c #004F20", -"+ c #000179", -"@ c #00009C", -"# c #0000D0", -"$ c #0000FA", -"% c #0000FE", -"& c #0000FF", -"* c #0000F3", -"= c #0000C0", -"- c #00800E", -"; c #00E20C", -"> c #00F900", -", c #00B900", -"' c #00533B", -") c #00018F", -"! c #00009A", -"~ c #0000D7", -"{ c #0000FC", -"] c #0000D4", -"^ c #097A07", -"/ c #00F006", -"( c #00FE00", -"_ c #00DC00", -": c #009900", -"< c #003E51", -"[ c #000092", -"} c #0000A3", -"| c #0000E9", -"1 c #0000DD", -"2 c #6B2F04", -"3 c #00EC00", -"4 c #00AD00", -"5 c #00442A", -"6 c #00008F", -"7 c #000091", -"8 c #990001", -"9 c #682600", -"0 c #00D400", -"a c #00FC00", -"b c #00BE00", -"c c #004126", -"d c #00007F", -"e c #000090", -"f c #0000D8", -"g c #9A000E", -"h c #EE0000", -"i c #9B0000", -"j c #7B0F00", -"k c #00C100", -"l c #00E300", -"m c #004B4D", -"n c #000089", -"o c #0000BC", -"p c #0000FB", -"q c #0000CA", -"r c #002B6E", -"s c #950012", -"t c #FD0000", -"u c #DB0000", -"v c #880000", -"w c #721400", -"x c #00AF00", -"y c #00F700", -"z c #00C400", -"A c #006033", -"B c #00008B", -"C c #0000BE", -"D c #0000F7", -"E c #0000B4", -"F c #004052", -"G c #00D505", -"H c #FE0000", -"I c #FB0000", -"J c #BF0000", -"K c #6E0000", -"L c #5D2200", -"M c #00A700", -"N c #00F400", -"O c #00EF00", -"P c #004742", -"Q c #000088", -"R c #0000CD", -"S c #0000FD", -"T c #0000DE", -"U c #004642", -"V c #00DA00", -"W c #00F101", -"X c #F90003", -"Y c #FC0000", -"Z c #C80000", -"` c #750000", -" . c #483A00", -".. c #00F300", -"+. c #00EE00", -"@. c #002165", -"#. c #000087", -"$. c #000097", -"%. c #0000E3", -"&. c #000083", -"*. c #004B33", -"=. c #00D900", -"-. c #00D603", -";. c #E0000C", -">. c #EB0000", -",. c #9A0000", -"'. c #325600", -"). c #00AC00", -"!. c #00F600", -"~. c #00F000", -"{. c #00A702", -"]. c #000970", -"^. c #0000A8", -"/. c #0000F4", -"(. c #0000EA", -"_. c #000382", -":. c #005126", -"<. c #00D700", -"[. c #00FF00", -"}. c #009505", -"|. c #81000D", -"1. c #F00000", -"2. c #970000", -"3. c #285A00", -"4. c #00B100", -"5. c #00B503", -"6. c #000A77", -"7. c #00166B", -"8. c #00660E", -"9. c #00F100", -"0. c #00FC01", -"a. c #F10006", -"b. c #E40000", -"c. c #7A0000", -"d. c #136300", -"e. c #009700", -"f. c #00F200", -"g. c #009B0B", -"h. c #000682", -"i. c #00009B", -"j. c #002862", -"k. c #007203", -"l. c #00A500", -"m. c #00E800", -"n. c #00B20F", -"o. c #80000E", -"p. c #D30000", -"q. c #7E0000", -"r. c #146500", -"s. c #008A00", -"t. c #00C800", -"u. c #00FD00", -"v. c #00D300", -"w. c #007E11", -"x. c #00018A", -"y. c #0000C6", -"z. c #0000E7", -"A. c #0000B9", -"B. c #00245A", -"C. c #007B00", -"D. c #00C900", -"E. c #00F802", -"F. c #E2000C", -"G. c #F40000", -"H. c #B60000", -"I. c #6C0000", -"J. c #025709", -"K. c #007F00", -"L. c #00F800", -"M. c #006722", -"N. c #0000DA", -"O. c #0000F8", -"P. c #000084", -"Q. c #004C23", -"R. c #00A800", -"S. c #006E0D", -"T. c #D40000", -"U. c #9E0000", -"V. c #550F00", -"W. c #005700", -"X. c #006B00", -"Y. c #00CE00", -"Z. c #00A000", -"`. c #005F29", -" + c #000095", -".+ c #0000B3", -"++ c #0000EE", -"@+ c #0000B0", -"#+ c #000485", -"$+ c #006C01", -"%+ c #009E00", -"&+ c #00E600", -"*+ c #008D09", -"=+ c #7E001A", -"-+ c #C40000", -";+ c #890000", -">+ c #4B1000", -",+ c #006E00", -"'+ c #009300", -")+ c #005C2A", -"!+ c #0000A7", -"~+ c #0000DB", -"{+ c #0000C5", -"]+ c #0000C8", -"^+ c #0000F5", -"/+ c #0000D5", -"(+ c #000093", -"_+ c #002E5E", -":+ c #007200", -"<+ c #00EA00", -"[+ c #9F0035", -"}+ c #CD0000", -"|+ c #6F0000", -"1+ c #3C100B", -"2+ c #005B00", -"3+ c #008500", -"4+ c #00E900", -"5+ c #008800", -"6+ c #004924", -"7+ c #0000A2", -"8+ c #0000BB", -"9+ c #0000B5", -"0+ c #0000C4", -"a+ c #00008E", -"b+ c #005E2F", -"c+ c #008E00", -"d+ c #00CB00", -"e+ c #009B00", -"f+ c #DF001F", -"g+ c #C60000", -"h+ c #660000", -"i+ c #271619", -"j+ c #005C00", -"k+ c #004520", -"l+ c #00006D", -"m+ c #0000AB", -"n+ c #0000D3", -"o+ c #00226A", -"p+ c #004E3D", -"q+ c #004E41", -"r+ c #004E3F", -"s+ c #004843", -"t+ c #000E91", -"u+ c #0000A5", -"v+ c #00009F", -"w+ c #000082", -"x+ c #000A6D", -"y+ c #007102", -"z+ c #00AE00", -"A+ c #00A300", -"B+ c #003F1A", -"C+ c #F50000", -"D+ c #AE0000", -"E+ c #830000", -"F+ c #34300A", -"G+ c #006300", -"H+ c #005F24", -"I+ c #000061", -"J+ c #00006B", -"K+ c #003655", -"L+ c #008603", -"M+ c #008900", -"N+ c #008200", -"O+ c #008100", -"P+ c #006A1A", -"Q+ c #00058D", -"R+ c #000068", -"S+ c #002440", -"T+ c #006500", -"U+ c #00BF00", -"V+ c #003C34", -"W+ c #9D0000", -"X+ c #920000", -"Y+ c #276000", -"Z+ c #008B00", -"`+ c #00F500", -" @ c #00850D", -".@ c #000058", -"+@ c #00005E", -"@@ c #000067", -"#@ c #002747", -"$@ c #008C00", -"%@ c #009000", -"&@ c #007600", -"*@ c #006A00", -"=@ c #00461C", -"-@ c #000367", -";@ c #000066", -">@ c #005A1D", -",@ c #00D100", -"'@ c #009200", -")@ c #001F4E", -"!@ c #8A0000", -"~@ c #0A7100", -"{@ c #00ED00", -"]@ c #003030", -"^@ c #001552", -"/@ c #003447", -"(@ c #007908", -"_@ c #00C700", -":@ c #00DF00", -"<@ c #00CF00", -"[@ c #00B800", -"}@ c #008600", -"|@ c #002E29", -"1@ c #000E5A", -"2@ c #007703", -"3@ c #008406", -"4@ c #00056A", -"5@ c #FF0000", -"6@ c #F80000", -"7@ c #AC0000", -"8@ c #800000", -"9@ c #086B00", -"0@ c #00EB00", -"a@ c #00BD00", -"b@ c #009600", -"c@ c #008F00", -"d@ c #00580D", -"e@ c #004125", -"f@ c #006000", -"g@ c #009500", -"h@ c #007811", -"i@ c #000071", -"j@ c #AF0000", -"k@ c #630000", -"l@ c #185D00", -"m@ c #00E700", -"n@ c #00E500", -"o@ c #00FA00", -"p@ c #009F00", -"q@ c #006F00", -"r@ c #00B300", -"s@ c #006623", -"t@ c #000075", -"u@ c #FC0002", -"v@ c #FA0000", -"w@ c #790000", -"x@ c #214E00", -"y@ c #006C00", -"z@ c #00A200", -"A@ c #004B3E", -"B@ c #E4000E", -"C@ c #E80000", -"D@ c #B10000", -"E@ c #8D0000", -"F@ c #4B1D00", -"G@ c #005800", -"H@ c #00DE00", -"I@ c #002466", -"J@ c #B0000F", -"K@ c #F10000", -"L@ c #700000", -"M@ c #144500", -"N@ c #00FB00", -"O@ c #00B700", -"P@ c #00A600", -"Q@ c #008A02", -"R@ c #000B83", -"S@ c #DA0000", -"T@ c #8C0000", -"U@ c #5D0D00", -"V@ c #026100", -"W@ c #00CA00", -"X@ c #008700", -"Y@ c #0D7F00", -"Z@ c #146700", -"`@ c #007A00", -" # c #008D00", -".# c #006D1C", -"+# c #0000AA", -"@# c #FB0003", -"## c #F70000", -"$# c #293300", -"%# c #00AB00", -"&# c #00E400", -"*# c #00CD00", -"=# c #009100", -"-# c #007900", -";# c #154E00", -"># c #5F1000", -",# c #5A0500", -"'# c #124B00", -")# c #002D69", -"!# c #0000AC", -"~# c #C30010", -"{# c #B20000", -"]# c #640100", -"^# c #285900", -"/# c #00BC00", -"(# c #00B500", -"_# c #006100", -":# c #134E00", -"<# c #374A00", -"[# c #532900", -"}# c #610100", -"|# c #5D0000", -"1# c #5B0000", -"2# c #4F1800", -"3# c #018500", -"4# c #00D600", -"5# c #00711C", -"6# c #0003C2", -"7# c #583000", -"8# c #1A6F00", -"9# c #007E00", -"0# c #037D00", -"a# c #215300", -"b# c #5B1E00", -"c# c #7C0000", -"d# c #840000", -"e# c #850000", -"f# c #730000", -"g# c #3D4C00", -"h# c #00D500", -"i# c #00AA00", -"j# c #009400", -"k# c #007100", -"l# c #007C04", -"m# c #002894", -"n# c #D2000A", -"o# c #C30000", -"p# c #8B0400", -"q# c #701900", -"r# c #860300", -"s# c #8E0000", -"t# c #8B0000", -"u# c #8F0000", -"v# c #900000", -"w# c #7C0005", -"x# c #00441E", -"y# c #006D00", -"z# c #007000", -"A# c #006700", -"B# c #00760C", -"C# c #001589", -"D# c #0000EB", -"E# c #F90000", -"F# c #960000", -"G# c #AA0000", -"H# c #BE0000", -"I# c #CF0000", -"J# c #C00000", -"K# c #BC0000", -"L# c #BA0000", -"M# c #4B0039", -"N# c #000463", -"O# c #00500F", -"P# c #007300", -"Q# c #006900", -"R# c #006800", -"S# c #006512", -"T# c #001B88", -"U# c #AD0012", -"V# c #E20000", -"W# c #C50000", -"X# c #CB0000", -"Y# c #F30000", -"Z# c #D60000", -"`# c #7B0000", -" $ c #24005A", -".$ c #00007A", -"+$ c #00086D", -"@$ c #00323D", -"#$ c #005827", -"$$ c #00601A", -"%$ c #006D1A", -"&$ c #006120", -"*$ c #003940", -"=$ c #000488", -"-$ c #0000C1", -";$ c #0000ED", -">$ c #DC0008", -",$ c #B30000", +". c #009314", +"+ c #00256C", +"@ c #0000B5", +"# c #0000D8", +"$ c #0100F4", +"% c #0000FF", +"& c #0000FE", +"* c #00F900", +"= c #00FF00", +"- c #00F800", +"; c #00AD09", +"> c #004B3C", +", c #000F7F", +"' c #0000AE", +") c #0100DB", +"! c #318A04", +"~ c #00E002", +"{ c #00FE00", +"] c #01E400", +"^ c #02980D", +"/ c #023C48", +"( c #010389", +"_ c #0100B1", +": c #0000E3", +"< c #0000FD", +"[ c #962B01", +"} c #2B9702", +"| c #00F001", +"1 c #00FD00", +"2 c #00C000", +"3 c #015A20", +"4 c #000970", +"5 c #000098", +"6 c #0000C3", +"7 c #0000F6", +"8 c #0000FC", +"9 c #F30000", +"0 c #D10000", +"a c #782600", +"b c #1DAB00", +"c c #00FA00", +"d c #00CE00", +"e c #005D20", +"f c #00066A", +"g c #000092", +"h c #0000B7", +"i c #0000F0", +"j c #0000EC", +"k c #0021C8", +"l c #F90000", +"m c #F10000", +"n c #BF0000", +"o c #711B00", +"p c #1F9700", +"q c #00F500", +"r c #00DF02", +"s c #006C2E", +"t c #000874", +"u c #000091", +"v c #0000B2", +"w c #0000DA", +"x c #003E84", +"y c #00C020", +"z c #FE0000", +"A c #F00000", +"B c #AF0000", +"C c #681600", +"D c #1F8800", +"E c #00ED00", +"F c #00D901", +"G c #00732E", +"H c #000F77", +"I c #000093", +"J c #0000B3", +"K c #0000ED", +"L c #0100FA", +"M c #0102C0", +"N c #003A61", +"O c #00BA14", +"P c #FC0000", +"Q c #FD0000", +"R c #D70000", +"S c #8D0000", +"T c #551B00", +"U c #1A8600", +"V c #00E800", +"W c #00C202", +"X c #00612F", +"Y c #000D76", +"Z c #000094", +"` c #0000BB", +" . c #0000F3", +".. c #0201A4", +"+. c #003C4C", +"@. c #00B60E", +"#. c #00FB00", +"$. c #FB0001", +"%. c #FF0000", +"&. c #FB0000", +"*. c #8A0000", +"=. c #462900", +"-. c #128E00", +";. c #00E500", +">. c #00F400", +",. c #00B406", +"'. c #004541", +"). c #00017F", +"!. c #000097", +"~. c #0000CB", +"{. c #0000FB", +"]. c #0100FE", +"^. c #0000E6", +"/. c #010096", +"(. c #023A3F", +"_. c #00BA0A", +":. c #00FC00", +"<. c #FA0000", +"[. c #EB0000", +"}. c #A60100", +"|. c #423C00", +"1. c #089D00", +"2. c #00B20B", +"3. c #00344D", +"4. c #000087", +"5. c #0000A3", +"6. c #0000DD", +"7. c #000394", +"8. c #004032", +"9. c #02B704", +"0. c #F70000", +"a. c #AF0300", +"b. c #394300", +"c. c #02A400", +"d. c #00EA00", +"e. c #00B80D", +"f. c #003450", +"g. c #00008D", +"h. c #0000B4", +"i. c #0000F1", +"j. c #000D8B", +"k. c #004D20", +"l. c #00AA00", +"m. c #02EF00", +"n. c #9C0500", +"o. c #2A4600", +"p. c #009900", +"q. c #00DA00", +"r. c #00AF0F", +"s. c #002E57", +"t. c #00009E", +"u. c #0000CF", +"v. c #0000F7", +"w. c #0000EF", +"x. c #001880", +"y. c #005716", +"z. c #009E00", +"A. c #01E000", +"B. c #E30000", +"C. c #8C0700", +"D. c #224600", +"E. c #008900", +"F. c #01C100", +"G. c #00F600", +"H. c #008E11", +"I. c #002165", +"J. c #0000C1", +"K. c #0000F5", +"L. c #0000CD", +"M. c #001F68", +"N. c #006911", +"O. c #00B500", +"P. c #01FE00", +"Q. c #00EE01", +"R. c #F80000", +"S. c #CF0000", +"T. c #7B0600", +"U. c #1B4003", +"V. c #007C01", +"W. c #00B800", +"X. c #00CB00", +"Y. c #007118", +"Z. c #001971", +"`. c #0000D2", +" + c #0000FA", +".+ c #0000DB", +"++ c #00009C", +"@+ c #002F3E", +"#+ c #008B06", +"$+ c #00EA01", +"%+ c #00BE05", +"&+ c #E40000", +"*+ c #B20000", +"=+ c #650A00", +"-+ c #123C01", +";+ c #006F01", +">+ c #01B600", +",+ c #00F700", +"'+ c #00B700", +")+ c #006421", +"!+ c #001776", +"~+ c #0000C2", +"{+ c #0000EA", +"]+ c #0000F2", +"^+ c #0000C7", +"/+ c #000481", +"(+ c #004722", +"_+ c #009B00", +":+ c #00E000", +"<+ c #02FF00", +"[+ c #00DE01", +"}+ c #00AA04", +"|+ c #00C200", +"1+ c #F60001", +"2+ c #D50000", +"3+ c #980000", +"4+ c #530E00", +"5+ c #0F3E00", +"6+ c #007000", +"7+ c #00BD00", +"8+ c #00A900", +"9+ c #005B25", +"0+ c #001679", +"a+ c #0000B1", +"b+ c #0000F8", +"c+ c #0000E7", +"d+ c #0000D5", +"e+ c #0000D6", +"f+ c #0000E4", +"g+ c #0000AF", +"h+ c #001A68", +"i+ c #005F15", +"j+ c #00DB00", +"k+ c #01FF00", +"l+ c #00E100", +"m+ c #00AB11", +"n+ c #00746A", +"o+ c #F70002", +"p+ c #870001", +"q+ c #3F0B05", +"r+ c #0B4103", +"s+ c #007F00", +"t+ c #00CD00", +"u+ c #00EC00", +"v+ c #009F00", +"w+ c #004C20", +"x+ c #001174", +"y+ c #0000A9", +"z+ c #0000EE", +"A+ c #0002AA", +"B+ c #000596", +"C+ c #000597", +"D+ c #0003B1", +"E+ c #0000C9", +"F+ c #003947", +"G+ c #008307", +"H+ c #00B900", +"I+ c #029C1A", +"J+ c #032BA5", +"K+ c #D30000", +"L+ c #7D0003", +"M+ c #320B0D", +"N+ c #064308", +"O+ c #008A00", +"P+ c #00D900", +"Q+ c #00AB00", +"R+ c #004B1C", +"S+ c #000D60", +"T+ c #0000C6", +"U+ c #001682", +"V+ c #003351", +"W+ c #003D47", +"X+ c #003854", +"Y+ c #001888", +"Z+ c #0000B0", +"`+ c #000873", +" @ c #004A27", +".@ c #00A400", +"+@ c #00F000", +"@@ c #03A903", +"#@ c #044252", +"$@ c #C50000", +"%@ c #830102", +"&@ c #3C1C08", +"*@ c #065705", +"=@ c #00E600", +"-@ c #00D300", +";@ c #006A1A", +">@ c #00114F", +",@ c #000077", +"'@ c #00246B", +")@ c #006024", +"!@ c #007E08", +"~@ c #007D07", +"{@ c #007707", +"]@ c #007505", +"^@ c #00532D", +"/@ c #001876", +"(@ c #000095", +"_@ c #000079", +":@ c #001547", +"<@ c #00570F", +"[@ c #01F200", +"}@ c #00AA02", +"|@ c #004937", +"1@ c #000C9E", +"2@ c #EE0000", +"3@ c #B80000", +"4@ c #890600", +"5@ c #423800", +"6@ c #047F00", +"7@ c #00F200", +"8@ c #009111", +"9@ c #001944", +"0@ c #00006B", +"a@ c #000073", +"b@ c #001959", +"c@ c #00621D", +"d@ c #008E00", +"e@ c #009500", +"f@ c #008700", +"g@ c #007C00", +"h@ c #006C01", +"i@ c #003D2B", +"j@ c #000868", +"k@ c #00026C", +"l@ c #003231", +"m@ c #00C500", +"n@ c #01E500", +"o@ c #009907", +"p@ c #003652", +"q@ c #0001BB", +"r@ c #ED0000", +"s@ c #840A00", +"t@ c #324800", +"u@ c #00D700", +"v@ c #00BC04", +"w@ c #004529", +"x@ c #000950", +"y@ c #001B4B", +"z@ c #004F1F", +"A@ c #008300", +"B@ c #00B300", +"C@ c #00C900", +"D@ c #005C03", +"E@ c #001F30", +"F@ c #000F51", +"G@ c #004723", +"H@ c #008B00", +"I@ c #00D500", +"J@ c #01F500", +"K@ c #01CA00", +"L@ c #00810C", +"M@ c #002465", +"N@ c #0000CC", +"O@ c #F50000", +"P@ c #C10000", +"Q@ c #7A0A00", +"R@ c #254600", +"S@ c #009300", +"T@ c #00D800", +"U@ c #00B107", +"V@ c #008014", +"W@ c #007F11", +"X@ c #008B01", +"Y@ c #009A00", +"Z@ c #00BE00", +"`@ c #00E900", +" # c #00F300", +".# c #00D400", +"+# c #009800", +"@# c #00550D", +"## c #003222", +"$# c #004F0F", +"%# c #009100", +"&# c #01A900", +"*# c #006E14", +"=# c #001C71", +"-# c #C70000", +";# c #720800", +"># c #223F00", +",# c #008D00", +"'# c #00D000", +")# c #00DF00", +"!# c #009E01", +"~# c #006904", +"{# c #007401", +"]# c #019400", +"^# c #00611D", +"/# c #001873", +"(# c #CC0000", +"_# c #7C0500", +":# c #2C3200", +"<# c #007600", +"[# c #00BF00", +"}# c #01F600", +"|# c #00C800", +"1# c #00EB00", +"2# c #01BA00", +"3# c #018A03", +"4# c #00532C", +"5# c #001182", +"6# c #0100CE", +"7# c #F20000", +"8# c #C60000", +"9# c #910100", +"0# c #4C1800", +"a# c #0A5000", +"b# c #00E400", +"c# c #00EF00", +"d# c #00E300", +"e# c #00E200", +"f# c #01BD00", +"g# c #00830B", +"h# c #003C51", +"i# c #0007BD", +"j# c #D40000", +"k# c #B00000", +"l# c #720400", +"m# c #202F00", +"n# c #007800", +"o# c #00D100", +"p# c #00F100", +"q# c #01CE00", +"r# c #00AD00", +"s# c #00A700", +"t# c #00DE00", +"u# c #02BF00", +"v# c #007D10", +"w# c #002A70", +"x# c #0000E5", +"y# c #D90000", +"z# c #9B0000", +"A# c #491100", +"B# c #0D5600", +"C# c #00C300", +"D# c #0C7900", +"E# c #116800", +"F# c #047800", +"G# c #00AE00", +"H# c #02A800", +"I# c #01681F", +"J# c #001B89", +"K# c #0000E8", +"L# c #CD0000", +"M# c #800000", +"N# c #312900", +"O# c #059700", +"P# c #00E700", +"Q# c #00B000", +"R# c #018900", +"S# c #047600", +"T# c #145700", +"U# c #3D2D00", +"V# c #491900", +"W# c #1D3D00", +"X# c #017F00", +"Y# c #00AC00", +"Z# c #028901", +"`# c #004449", +" $ c #0008B2", +".$ c #F40000", +"+$ c #B60000", +"@$ c #630800", +"#$ c #265100", +"$$ c #07B800", +"%$ c #00B400", +"&$ c #00B100", +"*$ c #056600", +"=$ c #125000", +"-$ c #264E00", +";$ c #3C3D00", +">$ c #4E1900", +",$ c #630100", "'$ c #670000", -")$ c #560009", -"!$ c #02006A", -"~$ c #0000C9", -"{$ c #0000C3", -"]$ c #0000B6", -"^$ c #00009E", -"/$ c #000094", -"($ c #0000A9", -"_$ c #EE0005", -":$ c #D80000", -"<$ c #860000", -"[$ c #310053", -"}$ c #0000B1", -"|$ c #0000D9", -"1$ c #0000F9", -"2$ c #0000F2", -"3$ c #0000C7", -"4$ c #F70007", -"5$ c #ED0000", -"6$ c #9C0000", -"7$ c #6A0000", -"8$ c #540025", -"9$ c #0000F0", -"0$ c #0000E4", -"a$ c #F00003", -"b$ c #A60000", -"c$ c #690000", -"d$ c #5B0010", -"e$ c #0D0094", -"f$ c #0000E2", -"g$ c #D0000B", -"h$ c #F60000", -"i$ c #A70000", -"j$ c #560013", -"k$ c #0C007C", -"l$ c #0000AF", -"m$ c #0000F1", -"n$ c #0000A0", -"o$ c #8B0011", -"p$ c #FA0004", -"q$ c #A10000", -"r$ c #740000", -"s$ c #680000", -"t$ c #5E0013", -"u$ c #0D0089", -"v$ c #0000AD", -"w$ c #BB0006", -"x$ c #550010", -"y$ c #270065", -"z$ c #0400A5", -"A$ c #0000DF", -"B$ c #0000F6", -"C$ c #87000F", -"D$ c #D8000C", -"E$ c #58000A", -"F$ c #410048", -"G$ c #080094", -"H$ c #01004A", -"I$ c #0000CF", -"J$ c #0000BD", +")$ c #451900", +"!$ c #126400", +"~$ c #00A500", +"{$ c #00CF00", +"]$ c #01EE00", +"^$ c #00A600", +"/$ c #029000", +"($ c #016F1D", +"_$ c #002191", +":$ c #E10000", +"<$ c #930000", +"[$ c #5D0F00", +"}$ c #3F4500", +"|$ c #227000", +"1$ c #0E7700", +"2$ c #087A00", +"3$ c #0A7500", +"4$ c #175600", +"5$ c #372D00", +"6$ c #561600", +"7$ c #6D1100", +"8$ c #7B0900", +"9$ c #7E0000", +"0$ c #780000", +"a$ c #760000", +"b$ c #730700", +"c$ c #443F00", +"d$ c #0A8400", +"e$ c #00A000", +"f$ c #01BB00", +"g$ c #00BC00", +"h$ c #027508", +"i$ c #004264", +"j$ c #0008DB", +"k$ c #C80000", +"l$ c #920000", +"m$ c #7C0000", +"n$ c #721100", +"o$ c #622300", +"p$ c #532D00", +"q$ c #582600", +"r$ c #691600", +"s$ c #810400", +"t$ c #950000", +"u$ c #900000", +"v$ c #8E0000", +"w$ c #8B0000", +"x$ c #710B08", +"y$ c #1D3E11", +"z$ c #006D06", +"A$ c #009000", +"B$ c #007200", +"C$ c #008000", +"D$ c #01710C", +"E$ c #00395A", +"F$ c #000CC7", +"G$ c #9E0000", +"H$ c #970000", +"I$ c #940000", +"J$ c #8C0000", +"K$ c #A90000", +"L$ c #BB0000", +"M$ c #B40000", +"N$ c #B50000", +"O$ c #AB0000", +"P$ c #960000", +"Q$ c #8C0002", +"R$ c #650026", +"S$ c #180D46", +"T$ c #003F21", +"U$ c #007100", +"V$ c #006A00", +"W$ c #006C00", +"X$ c #00680A", +"Y$ c #013B53", +"Z$ c #000AB8", +"`$ c #BC0000", +" % c #AD0000", +".% c #DA0000", +"+% c #EF0000", +"@% c #D20000", +"#% c #700003", +"$% c #3C003A", +"%% c #060072", +"&% c #001160", +"*% c #013636", +"=% c #00551D", +"-% c #005D17", +";% c #006415", +">% c #006015", +",% c #004724", +"'% c #022458", +")% c #0007B6", +"!% c #0100F5", +"~% c #E80000", +"{% c #E70000", +"]% c #CE0000", +"^% c #810000", +"/% c #51000B", +"(% c #1C004C", +"_% c #0000B6", +":% c #0004B1", +"<% c #00129B", +"[% c #001A8D", +"}% c #001F7D", +"|% c #001C75", +"1% c #010D8D", +"2% c #0100C6", +"3% c #0500F5", +"4% c #A60000", +"5% c #690000", +"6% c #39002F", +"7% c #0B0089", +"8% c #0100EE", +"9% c #0000D7", +"0% c #0100CC", +"a% c #0100E5", +"b% c #0200FD", +"c% c #FA0001", +"d% c #F90002", +"e% c #FC0001", +"f% c #820000", +"g% c #51001A", +"h% c #1C007B", +"i% c #0100D6", +"j% c #0100FF", +"k% c #0100F8", +"l% c #F60000", +"m% c #C00000", +"n% c #58000B", +"o% c #250063", +"p% c #0300CC", +"q% c #C40000", +"r% c #880000", +"s% c #55000C", +"t% c #270048", +"u% c #0400A5", +"v% c #0000E9", +"w% c #DD0000", +"x% c #580013", +"y% c #290051", +"z% c #060099", +"A% c #0100ED", +"B% c #0100FD", +"C% c #0000F9", +"D% c #6E0003", +"E% c #530013", +"F% c #35003F", +"G% c #1A007F", +"H% c #0600B5", +"I% c #0000D9", +"J% c #0100F9", +"K% c #E50000", +"L% c #A80000", +"M% c #5D0008", +"N% c #37002F", +"O% c #1F0063", +"P% c #08009A", +"Q% c #0000D3", +"R% c #C60006", +"S% c #420040", +"T% c #06007C", +"U% c #0200A7", +"V% c #0000BC", +"W% c #0000E2", +"X% c #0000DF", " ", " ", " ", -" . + @ # $ % % & & * = ", -" - ; > , ' ) ! ~ { % & & & & & & ] ", -" ^ / ( ( ( _ : < [ } | % & & & & & & & & 1 ", -" 2 3 ( ( ( ( > 4 5 6 7 # % & & & & & & & & & & = ", -" 8 9 0 ( ( ( ( a b c d e = { & & & & & & & & & & % f ", -" g h i j k a ( ( ( ( l m n e o p & & & & & & & & & & { q r ", -" s t u v w x y ( ( ( y z A B 6 C p & & & & & & & & & % D E F G ", -" H I J K L M N ( ( ( O x P Q e R S & & & & & & & & & S T B U V W ", -" X H Y Z ` .M ..( ( ( +.4 @.#.$.%.% & & & & & & & & & % T &.*.=.( -. ", -" ;.H H H >.,.'.).!.( ( ( ~.{.].#.^./.% & & & & & & & & & % (._.:.<.( [.}. ", -" |.H H H H 1.2.3.4.> ( ( ( > 5.6.B = p % & & & & & & & & & % | 7.8., 9.( 0. ", -" a.H H H H b.c.d.e.l ( ( ( f.g.h.i.%.% % & & & & & & & & & % | j.k.l.m.( [.n. ", -" o.H H H H Y p.q.r.s.t.( ( u.v.w.x.y.p % % & & & & & & & & S z.A.B.C.D.> ( [.E. ", -" F.H H H H G.H.I.J.K.D.( ( L.4.M.[ N.{ % % & & & & & & & & O.= P.Q.R.O ( [.( f.S. ", -" H H H H t T.U.V.W.X.Y.( ( ~.Z.`. +.+(.% % & % { S % & & % ++@+#+$+%++.[.[.( &+*+ ", -" =+H H H H Y -+;+>+W.,+V ( ( &+'+)+@ !+~+% % /.N.{+]+(.D ^+{ /+(+_+:+Z.<+[.[.[.<+%+ ", -" [+H H H H H }+|+1+2+3+<+( ( 4+5+6+(+7+8+/.| 9+ +e e ^.0+8+] 8+a+b+c+d+L.[.[.[.4+e+ ", -" f+H H H H H g+h+i+j+'+..( ( y e+k+l+(+m+n+!+o+p+q+r+s+t+u+v+w+x+y+z+!.( [.[.[.+.A+B+ ", -" H H H H H C+D+E+F+G+R.> ( ( ( v.H+I+J+e 6 K+L+s.M+N+O+P+Q+7 R+S+T+U+u.[.[.[.( 3 l.V+ ", -" H H H H H >.W+X+Y+Z+_ ( ( ( ( `+ @.@+@@@#@5+s.$@%@&@*@*@=@-@;@>@O+V ( [.[.[.a ,@'@)@ ", -" H H H H H h U.!@~@$@{@( ( ( ( u., ]@^@/@(@s.e+_@:@<@[@}@j+|@1@2@%@3 [.[.[.( O 4.3@4@ ", -" 5@5@5@5@5@6@7@8@9@N+0@( [.[.[.( 9.a@Z.b@c@: 0 a ( u.a l c@d@e@f@g@..[.[.[.> _@g@h@i@ ", -" 5@5@5@5@5@Y j@k@l@$@m.[.[.[.[.[.( a ..m@V n@o@[.[.[.[.( 3 p@q@5+0 u.[.[.[...r@c+s@t@ ", -" u@5@5@5@H v@Z w@x@y@t.( [.[.[.[.[.[.[.( ( ( [.( ( ( [.[.( m.,@m.a [.[.[.( 4+z@Z+A@i@ ", -" B@5@5@5@H C@D@E@F@G@e.y [.[.[.( ( ( u.( ( > 3 :@H@<+a [.[.( ( ( [.[.[.[.( m.l.c@I@ ", -" J@5@5@5@H K@p.7@L@M@&@m@[.[.[.( u.[.( N@m.O@p@g@g@l.n@( [.[.[.[.[.[.[.[.( m.P@Q@R@ ", -" 5@5@5@5@H Y S@T@U@V@W@( ( ( ( a > 3 V R.X@}@Y@Z@`@4.~.( [.[.[.[.[.[.[.> k #.#+# ", -" @#5@5@5@5@5@##J c.$#%#o@L.&#<++.*#=#-#3+&@;#>#,#'#3+O@..( [.[.[.[.( y _@'+s.)#!# ", -" ~#5@5@5@5@5@H ##{#]#^#/#(#M+'@=#*@_#:#<#[#}#|#1#2#3#e+4#{@a u.N@o@f.D.'@3+5#6# ", -" H 5@5@5@5@5@H C@q.|+7#8#9#O+0#a#b#c#;+;+d#e#f#8@g#3+'@).H@h#[@%#i#j#k#l#m#| ", -" n#5@5@5@5@5@5@Y o#;+;+X+p#q#r#v !@s#t#t#u#v#;+;+w#x#y#%@M j#z#A#K.X@B#C#D# ", -" H 5@5@5@5@5@5@E#o#F#v#E@t#X+G#H#I#J#K#L#G#!@v M#N#O#z#O+X.P#Q#R#S#T#]+%. ", -" U#5@5@5@5@5@5@5@v@V#W#{#{#X#Y#Y H Y Y v@Z#`#L@ $.$+$@$#$$$%$&$*$=$-$;$ ", -" >$5@5@5@5@5@5@5@H Y 6@6@I H 5@5@5@H C+,$'$)$!$(+~${$]$@+^$/$($n+* v+ ", -" _$5@5@5@5@5@5@5@5@5@5@5@5@5@5@5@t :$<$k@[$}$|$1${ $ 2$] # ++{ 3$ ", -" 4$5@5@5@5@5@5@5@5@5@5@5@5@5@H 5$6$7$8$($9$% & & & % p { % 0$ ", -" a$5@5@5@5@5@5@5@5@5@5@5@H 1.b$c$d$e$f${ & & & & & & & 3$ ", -" g$5@5@5@5@5@5@5@H I h$u i$c$j$k$l$m$% & & & & & & n$ ", -" o$p$5@5@5@5@H G.-+q$r$s$t$u$v$~$1$& & & & & (. ", -" w$I 5@H 6@H#L@h+x$y$z$8+A$^+% & & & B$ ", -" C$D$Z 8@E$F$G$}$(.^+{ % & & q ", -" H$w+i.v+]+I$J$ ", -" ", +" . + @ # $ % % & % % & & ", +" * = - ; > , ' ) & % & % & % % & & & ", +" ! ~ { { = ] ^ / ( _ : % % & % & & % % % & < ", +" [ } | = 1 = - 2 3 4 5 6 7 % & & & & & & % & % 8 ", +" 9 0 a b c = 1 = 1 d e f g h i % & % % & & & & & % < j k ", +" l m n o p q = 1 = = r s t u v j % & & & % & & % & % % w x y ", +" l z A B C D E = { = 1 F G H I J K % & & & % & & & & % L M N O = ", +" P Q Q R S T U V = = = q W X Y Z ` .% & & & % % % % & % j ..+.@.#.{ ", +" $.%.&.0 *.=.-.;.= = = >.,.'.).!.~.{.% & & & ].& & ].% % ^./.(._.= { :. ", +" <.P %.%.[.}.|.1.V = = = - 2.3.4.5.6.% % % & & % < < & & % K 7.8.9.{ { :. ", +" 9 P Q z %.0.a.b.c.d.= = = 1 e.f.g.h.j % % % & & % & < & & % i.j.k.l.m.{ :.:. ", +" &.Q z %.%.m n.o.p.q.{ = = * r.s.t.u.v.% & % & & & < < < % % w.x.y.z.A.:.1 1 ", +" 0.Q Q Q %.%.B.C.D.E.F.G.= = ;.H.I.J.i & & & % & & & & & % & K.L.M.N.O.E P.{ c Q. ", +" l Q z z %.R.S.T.U.V.W.>.= #.X.Y.Z.`. +% & & % % % % % % % +.+++@+#+q.= = = $+%+ ", +" P z z %.z &+*+=+-+;+>+,+= >.'+)+!+~+{+< % % % 8 8 % % % % ]+^+/+(+_+:+= = <+[+}+|+ ", +" 1+Q z z %.P 2+3+4+5+6+7+:.= E 8+9+0+a+`.v.% b+c+d+e+{+v.b+8 f+g+h+i+z.j+= = k+l+m+n+ ", +" o+Q z z %.%.2+p+q+r+s+t+= = u+v+w+x+y+~+z+v.`.A+B+C+D+u.d+# E+C+F+G+H+d.= = k+V I+J+ ", +" &.Q z z %.%.K+L+M+N+O+P+= = G.Q+R+S+Z a+e+T+U+V+W+W+X+Y+g+Z+++`+ @.@:+#.= = k++@@@#@ ", +" z Q Q z %.R.$@%@&@*@v+=@= = = -@;@>@,@I t.'@)@!@~@{@]@^@/@(@_@:@<@O.>.= = = = [@}@|@1@ ", +" %.z Q z %.2@3@4@5@6@|+q = { = 7@8@9@0@a@b@c@d@e@e@f@g@h@i@j@k@l@]@m@* = = = = n@o@p@q@ ", +" z z Q Q z %.r@3@s@t@e@u@1 = 1 = 1 v@w@x@y@z@A@p.B@C@2 8+E.D@E@F@G@H@I@1 = { = J@K@L@M@N@ ", +" z z z z z %.O@P@Q@R@S@T@P.= { = = u+U@V@W@X@Y@Z@`@1 #. #.#+#@###$#%#l+= = = #.j+&#*#=#`. ", +" %.%.%.z %.P -#;#>#,#I@1 = = { = = - d.j+X.'#u+= = = = { )#!#~#{#O. #= = = >.m@]#^#/#N@ ", +" z Q z z %.P (#_#:#<#[#}#= { 1 { { = = :.* :.= = = = = = 1 :+Z@|#1#= = = = E 2#3#4#5#6# ", +" P P z %.%.7#8#9#0#a#+#b#= = { { 1 { = = = #.c#d#e#1#* = = = #.{ = = { = = 1#f#g#h#i# ", +" P P z %.z 9 j#k#l#m#n#o#= = = = { = = = p#q#'+r#s#O.t#{ = = = = = { 1 = = u+u#v#w#x# ", +" P Q Q z %.Q O@y#z#A#B#Z@= = = = = = >.d#C#_+E.D#E#F#G#d.= = { { { 1 { = #.u@H#I#J#K# ", +" Q P Q %.%.%.R.L#M#N#O#>.1 `@P#u+P+Q#e@R#S#T#U#V#W#X#2 c#= = = = = = #.T@Y#Z#`# ${+ ", +" &.Q Q z z %.%..$+$@$#$$$o#%$r#&$S@*$=$-$;$>$,$'$)$!$~${$]$:.= :.* q T@^$/$($_$c+ ", +" &.Q Q z %.z %.%.:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$)#b#t+Z@g$s#E.h$i$j$% ", +" P Q z z %.%.%.l k$l$m$n$o$p$q$r$s$<$t$l$u$v$w$l$x$y$z$A$G#^$A@B$C$H@D$E$F$% % ", +" P Q Q z z z %.%.9 8#G$H$I$J$I$K$L$P@L$M$N$O$P$Q$R$S$T$U$f@s+U$V$W$X$Y$Z$]+% ", +" <.Q Q %.z z %.%.9 2+`$ %O$`$.%+%9 A r@+%@%P$#%$%%%&%*%=%-%;%>%,%'%)%z+!% ", +" 1+P Q z %.z z %.%.z 9 ~%{%m Q %.%.%.%.%.]%^%/%(%(@_%:%<%[%}%|%1%2%8 % 3% ", +" P &.P %.%.z z %.%.%.%.%.%.%.%.%.%.%.{%4%5%6%7%L.8%b+K.j 9%0%a%8 % b% ", +" c%d%e%z Q z %.z z z z z z %.%.%.9 L$f%g%h%i%{.% j%% % +k%% % & ", +" c%c%Q Q z %.z %.%.z z %.%.%.l%m%f%n%o%p%8 % % & ].% % % % % ", +" P Q P Q %.%.z z %.%.%.0.{%q%r%s%t%u%v%% % b%b%< & % % & ", +" P P Q z z %.%.l w%L$z#m$x%y%z%E+A%B%% & & 8 C%8 & ", +" P P P z %..$(#t$D%E%F%G%H%I%z+J%& % % 8 {.C% ", +" P <.c%K%L%M%N%O%P%Q%v%w.L b%% {. +< ", +" 9 R%S%T%U%V%9%W%X%]+% < K. ", +" e+X% ", " ", " "}; diff -Nru liquidwar-5.6.4/misc/macosx_info.plist.in liquidwar-5.6.5/misc/macosx_info.plist.in --- liquidwar-5.6.4/misc/macosx_info.plist.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/macosx_info.plist.in 2018-12-23 19:04:36.000000000 +0000 @@ -1,24 +1,50 @@ + CFBundleExecutable - Liquid War + liquidwar CFBundleIconFile - Liquid War.icns + liquidwar.icns CFBundleIdentifier com.ufoot.liquidwar CFBundleInfoDictionaryVersion 6.0 CFBundleName - Liquid War + @PACKAGE_NAME@ + CFBundleDisplayName + @PACKAGE_STRING@ CFBundlePackageType APPL CFBundleShortVersionString - @VERSION@ + @PACKAGE_VERSION@ CFBundleSignature RRdb CFBundleVersion 4 + NSAppleScriptEnabled + false + NSHumanReadableCopyright + Copyright (C) 1998 - 2016 Christian Mauduit <ufoot@ufoot.org> + NSPrincipalClass + NSApplication diff -Nru liquidwar-5.6.4/misc/macosx_readme.rtf liquidwar-5.6.5/misc/macosx_readme.rtf --- liquidwar-5.6.4/misc/macosx_readme.rtf 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/misc/macosx_readme.rtf 2018-12-23 19:04:36.000000000 +0000 @@ -13,7 +13,7 @@ \ This is application bundle attempts to detect if the X server and esd are running. If not, it will try to start them before running Liquid War. This works on my computer, there's no guarantee it will work on yours. If you have problems, try manually starting esd and X. Sometimes there seems to be a delay between launching X and launching Liquid War. Moving the mouse around and clicking on the menu bar usually make Liquid War start. Sometimes there will be no sound even though esd is running. I have no clue why. \ \ -For more information, go to http://www.ufoot.org/liquidwar/v5/\ +For more information, go to https://ufoot.org/liquidwar/v5/\ \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural diff -Nru liquidwar-5.6.4/misc/xfixicon.sh liquidwar-5.6.5/misc/xfixicon.sh --- liquidwar-5.6.4/misc/xfixicon.sh 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/misc/xfixicon.sh 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,50 @@ +#! /bin/sh + +# Generate X11 icon +# Usage: xfixicon iconfile + +if test -z "$1"; then + echo "Usage:" + echo " xfixicon iconfile [-o outputfile]" + echo "this will generate a C file that can be linked with your application" + echo "to set the X11 icon automatically." + echo "" + echo "Options:" + echo " -o Set the name of the output file. Default name is allegro_icon.c" + exit +fi + +outfile="allegro_icon.c" + +while !(test -z "$1"); do + if (test "$1" = "-o"); then + outfile=$2 + shift + else + file=$1 + fi + shift +done + +if !(test -e "$file"); then + echo "File not found: $file" + exit 1 +fi + +if !(convert -transparent "magenta" "$file" "/tmp/allegico_xpm.xpm"); then + echo "Conversion failed" + exit 1 +fi + +echo "#include " > $outfile +cat /tmp/allegico_xpm.xpm | sed -e 's,static char,static const char,' >> $outfile +echo "#if defined ALLEGRO_WITH_XWINDOWS && defined ALLEGRO_USE_CONSTRUCTOR" >> $outfile +echo "extern void *allegro_icon;" >> $outfile +echo "CONSTRUCTOR_FUNCTION(static void _set_allegro_icon(void));" >> $outfile +echo "static void _set_allegro_icon(void)" >> $outfile +echo "{" >> $outfile +echo " allegro_icon = allegico_xpm;" >> $outfile +echo "}" >> $outfile +echo "#endif" >> $outfile + +rm /tmp/allegico_xpm.xpm diff -Nru liquidwar-5.6.4/README liquidwar-5.6.5/README --- liquidwar-5.6.4/README 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -Liquid War is a unique multiplayer wargame. Its rules are -truely original and have been invented by Thomas Colcombet. -You control an army of liquid and have to try and eat your -opponents. A single player mode is available, but the game is -definitely designed to be multiplayer, and has network support. - -Liquid War homepage : http://www.ufoot.org/liquidwar/v5 -Contact author : ufoot@ufoot.org - -If you have any questions or remarks about Liquid War, you can -get help and informations on the Liquid War user mailing list: - -http://mail.nongnu.org/mailman/listinfo/liquidwar-user - -Have a good day, - -U-Foot - - ------------------ L E G A L I N F O R M A T I O N ---------------- - -Liquid War is a multiplayer wargame. -Copyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org) - -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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff -Nru liquidwar-5.6.4/README.de liquidwar-5.6.5/README.de --- liquidwar-5.6.4/README.de 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/README.de 2018-12-23 19:04:36.000000000 +0000 @@ -1,10 +1,10 @@ -Liquid War ist ein einzigartiges Kriegsspiel für mehrere Spieler. Die +Liquid War ist ein einzigartiges Kriegsspiel für mehrere Spieler. Die Regeln sind wahrhaft neuartig und wurden von Thomas Colcombet entwickelt. -Man steuert eine flüssige Armee und muss versuchen die Gegner aufzufressen. +Man steuert eine flüssige Armee und muss versuchen die Gegner aufzufressen. Es gibt einen Einzelspielermodus, aber das Spiel ist eindeutig auf mehrere -Spieler ausgelegt und unterstützt das Spielen über Netzwerk. +Spieler ausgelegt und unterstützt das Spielen über Netzwerk. -Homepage : http://www.ufoot.org/liquidwar/v5 +Homepage : https://ufoot.org/liquidwar/v5 Autor : ufoot@ufoot.org Mailingliste : http://mail.nongnu.org/mailman/listinfo/liquidwar-user (*) @@ -13,19 +13,19 @@ ----------- W I C H T I G E I N F O R M A T I O N E N ------------ -Liquid War is ein Kriegspiel für mehrere. -Copyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org) +Liquid War is ein Kriegspiel für mehrere. +Copyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org) -Dieses Programm ist freie Software. Sie können es unter den +Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License, wie von der Free -Software Foundation veröffentlicht, weitergeben und/oder -modifizieren, entweder gemäß Version 2 der Lizenz oder (nach Ihrer -Option) jeder späteren Version. +Software Foundation veröffentlicht, weitergeben und/oder +modifizieren, entweder gemäß Version 2 der Lizenz oder (nach Ihrer +Option) jeder späteren Version. -Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, daß +Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, daß es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT -FÜR EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General +FÃœR EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License. Sie sollten eine Kopie der GNU General Public License zusammen mit diff -Nru liquidwar-5.6.4/README.dk liquidwar-5.6.5/README.dk --- liquidwar-5.6.4/README.dk 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/README.dk 2018-12-23 19:04:36.000000000 +0000 @@ -1,11 +1,11 @@ Liquid war er et unikt multiplayer krigsspil. Reglerne er uhyre originale og er opfundet af Thomas Colcombet. Du styrer -en hær af væske og skal prøve at æde dine modstandere. +en hær af væske og skal prøve at æde dine modstandere. Liquid War kan spilles alene, men er helt afgjort designet -til multiplayer, og har netværks-support. +til multiplayer, og har netværks-support. -Hjemmeside : http://www.ufoot.org/liquidwar/v5 -Programmør : ufoot@ufoot.org +Hjemmeside : https://ufoot.org/liquidwar/v5 +Programmør : ufoot@ufoot.org Mailing list : http://mail.nongnu.org/mailman/listinfo/liquidwar-user @@ -13,7 +13,7 @@ ----------------- L E G A L I N F O R M A T I O N ---------------- Liquid War er et flerpersoners krigsspil. -Copyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org) +Copyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org) Dette program er frit software; Du kan kopiere og aendre det under betingelserne i GNU General Public License, udgivet af Free Software diff -Nru liquidwar-5.6.4/README.fr liquidwar-5.6.5/README.fr --- liquidwar-5.6.4/README.fr 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/README.fr 2018-12-23 19:04:36.000000000 +0000 @@ -1,19 +1,19 @@ -Liquid War est un "wargame" multijoueur inédit. Ses règles sont vraiment -originales et ont été inventées par Thomas Colcombet. L'idée est de -contrôler une armée de liquide et d'essayer de "manger" ses adversaires. -Il est possible de jouer seul, mais le jeux est conçu pour se jouer à -plusieurs, un mode réseau étant disponible. +Liquid War est un "wargame" multijoueur inédit. Ses règles sont vraiment +originales et ont été inventées par Thomas Colcombet. L'idée est de +contrôler une armée de liquide et d'essayer de "manger" ses adversaires. +Il est possible de jouer seul, mais le jeux est conçu pour se jouer à +plusieurs, un mode réseau étant disponible. -Site web de Liquid War : http://www.ufoot.org/liquidwar/v5 +Site web de Liquid War : https://ufoot.org/liquidwar/v5 Pour contacter l'auteur : ufoot@ufoot.org -Si vous avez des questions ou des remarques à propos de Liquid War, +Si vous avez des questions ou des remarques à propos de Liquid War, vous pouvez obtenir de l'aide et des infos sur la liste de diffusion "Liquid War user", mais attention, on y parle anglais : http://mail.nongnu.org/mailman/listinfo/liquidwar-user -Bonne journée, +Bonne journée, U-Foot @@ -21,18 +21,18 @@ -------------- I N F O R M A T I O N S L E G A L E S ------------- Liquid War est un "wargame" multijoueur. -Copyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org) +Copyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org) Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le -modifier conformément aux dispositions de la Licence Publique Générale GNU, -telle que publiée par la Free Software Foundation ; version 2 de la licence, -ou encore (à votre choix) toute version ultérieure. +modifier conformément aux dispositions de la Licence Publique Générale GNU, +telle que publiée par la Free Software Foundation ; version 2 de la licence, +ou encore (à votre choix) toute version ultérieure. -Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE -GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou -D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence -Publique Générale GNU . +Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE +GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou +D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence +Publique Générale GNU . -Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en -même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free +Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en +même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis. diff -Nru liquidwar-5.6.4/README.md liquidwar-5.6.5/README.md --- liquidwar-5.6.4/README.md 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/README.md 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,87 @@ +Liquid War 5 +============ + +![Liquid War 5 icon](https://raw.githubusercontent.com/ufoot/liquidwar5/master/misc/liquidwar.png) + +Liquid War is a unique multiplayer wargame. Its rules are +truely original and have been invented by Thomas Colcombet. +You control an army of liquid and have to try and eat your +opponents. A single player mode is available, but the game is +definitely designed to be multiplayer, and has network support. + +* Liquid War homepage : https://ufoot.org/liquidwar/v5 +* Contact author : ufoot@ufoot.org + +If you have any questions or remarks about Liquid War, you can +get help and informations on the Liquid War user mailing list: + +* http://mail.nongnu.org/mailman/listinfo/liquidwar-user + +Have a good day, + +U-Foot + +Status +------ + +[![Build Status](https://travis-ci.org/ufoot/liquidwar5.svg?branch=master)](https://travis-ci.org/ufoot/liquidwar5/branches) + +Liquid War 5 is now (at least) 20 years old. Some files probably +remained unchanged through all those years but yet, apparently, +still compile and run. Don't trust the git log for activity, +this thing used to be on [Source Forge](https://sourceforge.net/projects/liquidwar/) +and even before that it was developped without any source control system, back in 1998. + +Since 2005, [Liquid War 6](https://www.gnu.org/software/liquidwar6) +has been released, trying to get a better interfaces and technology +to that program. + +It happens Liquid War 5 is still the de facto best implementation +around, usually available for major Linux distros, and Windows or +Mac binaries usually work. Your mileage may vary, I'm definitely +not actively developping this, however I'm still experimenting on new +Liquid War ideas, I even have a `liquidwar7` folder somewhere on +my laptop where I'm hacking random things. + +My overall advice would be to use this game and have fun with it, +but if you want to hack around, there might be better things to +do than touching this old and dusty code base. Please +[contact me](mailto:ufoot@ufoot.org) if you want to know more. + +Install +------- + +Get files [here](https://ufoot.org/liquidwar/v5/download) for Windows or Mac users. +For GNU/Linux users, most of the time, something like this is enough: + +``` +sudo apt-get install liquidwar # .deb distro (Debian, Ubuntu, ...) +sudo yum install liquidwar # .rpm distro (Fedora, ...) +``` + +Documentation +------------- + +* [user documentation](https://ufoot.org/liquidwar/v5/doc) +* [code algorithm](https://ufoot.org/liquidwar/v5/techinfo/algorithm) +* [source code](https://ufoot.org/liquidwar/v5/techinfo/source) + +License +------- + +Liquid War is a multiplayer wargame. +Copyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org) + +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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff -Nru liquidwar-5.6.4/README.pl liquidwar-5.6.5/README.pl --- liquidwar-5.6.4/README.pl 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/README.pl 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,41 @@ +Liquid War is a unique multiplayer wargame. Its rules are +truely original and have been invented by Thomas Colcombet. +You control an army of liquid and have to try and eat your +opponents. A single player mode is available, but the game is +definitely designed to be multiplayer, and has network support. + +Liquid War homepage : https://ufoot.org/liquidwar/v5 +Contact author : ufoot@ufoot.org + +If you have any questions or remarks about Liquid War, you can +get help and informations on the Liquid War user mailing list: + +http://mail.nongnu.org/mailman/listinfo/liquidwar-user + +Have a good day, + +U-Foot + + +----------------- L E G A L I N F O R M A T I O N ---------------- + +Liquid War jest wojennÄ… grÄ… multiplayer. +Copyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org) + +Niniejszy program jest wolnym oprogramowaniem; możesz go +rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej +Licencji Publicznej GNU, wydanej przez FundacjÄ™ Wolnego +Oprogramowania - wedÅ‚ug wersji 2-giej tej Licencji lub którejÅ› +z późniejszych wersji. + +Niniejszy program rozpowszechniany jest z nadziejÄ…, iż bÄ™dzie on +użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyÅ›lnej +gwarancji PRZYDATNOÅšCI HANDLOWEJ albo PRZYDATNOÅšCI DO OKREÅšLONYCH +ZASTOSOWAŃ. W celu uzyskania bliższych informacji - Powszechna +Licencja Publiczna GNU. + +Z pewnoÅ›ciÄ… wraz z niniejszym programem otrzymaÅ‚eÅ› też egzemplarz +Powszechnej Licencji Publicznej GNU (GNU General Public License); +jeÅ›li nie - napisz do Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. + diff -Nru liquidwar-5.6.4/src/about.c liquidwar-5.6.5/src/about.c --- liquidwar-5.6.4/src/about.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/about.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -86,7 +86,7 @@ while (retour == 0) { for (i = 0; i < 4; ++i) - standard_button (d + i + 4, 0, i, 1, 4); + standard_button (d + i + 4, 0, i, 1, 4); quick_buttons (d); d[4].dp = lw_lang_string (LW_LANG_STRING_ABOUT_CREDITS); @@ -97,40 +97,40 @@ choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 4: - retour = - display_help (lw_lang_string (LW_LANG_STRING_HELP_CREDITS)); - break; - case 5: - retour = - display_help (lw_lang_string (LW_LANG_STRING_HELP_COPYRIGHT)); - break; - case 6: - retour = - display_help (lw_lang_string (LW_LANG_STRING_HELP_LICENSE)); - break; - case 7: - retour = - display_help (lw_lang_string (LW_LANG_STRING_HELP_VERSION)); - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 4: + retour = + display_help (lw_lang_string (LW_LANG_STRING_HELP_CREDITS)); + break; + case 5: + retour = + display_help (lw_lang_string (LW_LANG_STRING_HELP_COPYRIGHT)); + break; + case 6: + retour = + display_help (lw_lang_string (LW_LANG_STRING_HELP_LICENSE)); + break; + case 7: + retour = + display_help (lw_lang_string (LW_LANG_STRING_HELP_VERSION)); + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/about.h liquidwar-5.6.5/src/about.h --- liquidwar-5.6.4/src/about.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/about.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/advanced.c liquidwar-5.6.5/src/advanced.c --- liquidwar-5.6.4/src/advanced.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/advanced.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -178,43 +178,43 @@ { choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 17: - CONFIG_CPU_VS_HUMAN = (CONFIG_CPU_VS_HUMAN + 1) % 3; - d[17].dp = get_cpu_vs_human_str (); - scare_mouse (); - my_button_proc (MSG_DRAW, d + 17, 0); - unscare_mouse (); - break; - case 18: - CONFIG_ALLOW_NETWORK_BOTS = CONFIG_ALLOW_NETWORK_BOTS ? 0 : 1; - d[18].dp = get_allow_network_bots_str (); - scare_mouse (); - my_button_proc (MSG_DRAW, d + 18, 0); - unscare_mouse (); - break; - case 19: - CONFIG_ASM_ALGORITHM = CONFIG_ASM_ALGORITHM ? 0 : 1; - d[19].dp = get_asm_algorithm_str (); - scare_mouse (); - my_button_proc (MSG_DRAW, d + 19, 0); - unscare_mouse (); - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 17: + CONFIG_CPU_VS_HUMAN = (CONFIG_CPU_VS_HUMAN + 1) % 3; + d[17].dp = get_cpu_vs_human_str (); + scare_mouse (); + my_button_proc (MSG_DRAW, d + 17, 0); + unscare_mouse (); + break; + case 18: + CONFIG_ALLOW_NETWORK_BOTS = CONFIG_ALLOW_NETWORK_BOTS ? 0 : 1; + d[18].dp = get_allow_network_bots_str (); + scare_mouse (); + my_button_proc (MSG_DRAW, d + 18, 0); + unscare_mouse (); + break; + case 19: + CONFIG_ASM_ALGORITHM = CONFIG_ASM_ALGORITHM ? 0 : 1; + d[19].dp = get_asm_algorithm_str (); + scare_mouse (); + my_button_proc (MSG_DRAW, d + 19, 0); + unscare_mouse (); + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/advanced.h liquidwar-5.6.5/src/advanced.h --- liquidwar-5.6.4/src/advanced.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/advanced.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/alleg2.c liquidwar-5.6.5/src/alleg2.c --- liquidwar-5.6.4/src/alleg2.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/alleg2.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -69,14 +69,14 @@ /* variables statiques */ /*==================================================================*/ extern void _draw_scrollable_frame (DIALOG * d, - int listsize, int offset, int height, - int fg_color, int bg); + int listsize, int offset, int height, + int fg_color, int bg); extern int isspace (int c); static void my_handle_scrollable_scroll_click (DIALOG * d, int listsize, - int *offset, int height); + int *offset, int height); static void my_handle_scrollable_scroll (DIALOG * d, int listsize, int *index, - int *offset); + int *offset); static void my_handle_listbox_click (DIALOG * d); @@ -116,8 +116,8 @@ */ static void my_draw_textbox (char *thetext, int *listsize, int draw, int offset, - int wword, int tabsize, int x, int y, int w, int h, - int disabled, int fore, int deselect, int disable) + int wword, int tabsize, int x, int y, int w, int h, + int disabled, int fore, int deselect, int disable) { BITMAP *gui_bmp = gui_get_screen (); int fg = fore; @@ -160,6 +160,14 @@ if (disabled) fg = disable; + if (fg) + { + /* + * Not elegant, but test above here just to get + * rid of compiler warning about fg not being used. + */ + } + /* loop over the entire string */ while (1) { @@ -167,138 +175,138 @@ /* find the next break */ while (ugetc (scanned)) - { - /* check for a forced break */ - if (ugetc (scanned) == '\n') - { - scanned += uwidth (scanned); - - /* we are done parsing the line end */ - break; - } - - /* the next character length */ - usetc (s + usetc (s, ugetc (scanned)), 0); - len = text_length (font, s); - - /* modify length if its a tab */ - if (ugetc (s) == '\t') - len = tabsize * text_length (font, space); - - /* check for the end of a line by excess width of next char */ - if (width + len >= ww) - { - /* we have reached end of line do we go back to find start */ - if (wword) - { - /* remember where we were */ - oldscan = scanned; - noignore = FALSE; - - /* go backwards looking for start of word */ - while (!uisspace (ugetc (scanned))) - { - /* don't wrap too far */ - if (scanned == printed) - { - /* the whole line is filled, so stop here */ - tmp = ptmp = scanned; - while (ptmp != oldscan) - { - ptmp = tmp; - tmp += uwidth (tmp); - } - scanned = ptmp; - noignore = TRUE; - break; - } - /* look further backwards to wrap */ - tmp = ptmp = printed; - while (tmp < scanned) - { - ptmp = tmp; - tmp += uwidth (tmp); - } - scanned = ptmp; - } - /* put the space at the end of the line */ - if (!noignore) - { - ignore = scanned; - scanned += uwidth (scanned); - } - else - ignore = NULL; - - /* check for endline at the convenient place */ - if (ugetc (scanned) == '\n') - scanned += uwidth (scanned); - } - /* we are done parsing the line end */ - break; - } - - /* the character can be added */ - scanned += uwidth (scanned); - width += len; - } + { + /* check for a forced break */ + if (ugetc (scanned) == '\n') + { + scanned += uwidth (scanned); + + /* we are done parsing the line end */ + break; + } + + /* the next character length */ + usetc (s + usetc (s, ugetc (scanned)), 0); + len = text_length (font, s); + + /* modify length if its a tab */ + if (ugetc (s) == '\t') + len = tabsize * text_length (font, space); + + /* check for the end of a line by excess width of next char */ + if (width + len >= ww) + { + /* we have reached end of line do we go back to find start */ + if (wword) + { + /* remember where we were */ + oldscan = scanned; + noignore = FALSE; + + /* go backwards looking for start of word */ + while (!uisspace (ugetc (scanned))) + { + /* don't wrap too far */ + if (scanned == printed) + { + /* the whole line is filled, so stop here */ + tmp = ptmp = scanned; + while (ptmp != oldscan) + { + ptmp = tmp; + tmp += uwidth (tmp); + } + scanned = ptmp; + noignore = TRUE; + break; + } + /* look further backwards to wrap */ + tmp = ptmp = printed; + while (tmp < scanned) + { + ptmp = tmp; + tmp += uwidth (tmp); + } + scanned = ptmp; + } + /* put the space at the end of the line */ + if (!noignore) + { + ignore = scanned; + scanned += uwidth (scanned); + } + else + ignore = NULL; + + /* check for endline at the convenient place */ + if (ugetc (scanned) == '\n') + scanned += uwidth (scanned); + } + /* we are done parsing the line end */ + break; + } + + /* the character can be added */ + scanned += uwidth (scanned); + width += len; + } /* check if we are to print it */ //if ((draw) && (line >= offset) // && (y1 + text_height (font) < (y + h - 3))) - if ((draw) && (line >= offset) && (((y1 + text_height (font) < (y + h - 3))) || (line == 0))) // ufoot - { - x1 = x + 4; - - /* the initial blank bit */ - rectfill (gui_bmp, x + 2, y1, x1 - 1, y1 + text_height (font), - deselect); - - /* print up to the marked character */ - while (printed != scanned) - { - /* do special stuff for each charater */ - switch (ugetc (printed)) - { - - case '\r': - case '\n': - /* don't print endlines in the text */ - break; - - /* possibly expand the tabs */ - case '\t': - for (i = 0; i < tabsize; i++) - { - usetc (s + usetc (s, ' '), 0); - //textout_ex(gui_bmp, font, s, x1, y1, fg, deselect); - textout_ex (gui_bmp, font, s, x1, y1, -1, deselect); // ufoot - x1 += text_length (font, s); - } - break; - - /* print a normal character */ - default: - if (printed != ignore) - { - usetc (s + usetc (s, ugetc (printed)), 0); - //textout_ex(gui_bmp, font, s, x1, y1, fg, deselect); - textout_ex (gui_bmp, font, s, x1, y1, -1, deselect); // ufoot - x1 += text_length (font, s); - } - } - - /* goto the next character */ - printed += uwidth (printed); - } - /* the last blank bit */ - if (x1 <= x + w - 3) - rectfill (gui_bmp, x1, y1, x + w - 3, y1 + text_height (font) - 1, - deselect); - - /* print the line end */ - y1 += text_height (font); - } + if ((draw) && (line >= offset) && (((y1 + text_height (font) < (y + h - 3))) || (line == 0))) // ufoot + { + x1 = x + 4; + + /* the initial blank bit */ + rectfill (gui_bmp, x + 2, y1, x1 - 1, y1 + text_height (font), + deselect); + + /* print up to the marked character */ + while (printed != scanned) + { + /* do special stuff for each charater */ + switch (ugetc (printed)) + { + + case '\r': + case '\n': + /* don't print endlines in the text */ + break; + + /* possibly expand the tabs */ + case '\t': + for (i = 0; i < tabsize; i++) + { + usetc (s + usetc (s, ' '), 0); + //textout_ex(gui_bmp, font, s, x1, y1, fg, deselect); + textout_ex (gui_bmp, font, s, x1, y1, -1, deselect); // ufoot + x1 += text_length (font, s); + } + break; + + /* print a normal character */ + default: + if (printed != ignore) + { + usetc (s + usetc (s, ugetc (printed)), 0); + //textout_ex(gui_bmp, font, s, x1, y1, fg, deselect); + textout_ex (gui_bmp, font, s, x1, y1, -1, deselect); // ufoot + x1 += text_length (font, s); + } + } + + /* goto the next character */ + printed += uwidth (printed); + } + /* the last blank bit */ + if (x1 <= x + w - 3) + rectfill (gui_bmp, x1, y1, x + w - 3, y1 + text_height (font) - 1, + deselect); + + /* print the line end */ + y1 += text_height (font); + } printed = scanned; /* we have done a line */ @@ -306,15 +314,15 @@ /* check if we are at the end of the string */ if (!ugetc (printed)) - { - /* the under blank bit */ - if (draw) - rectfill (gui_bmp, x + 1, y1, x + w - 3, y + h - 1, deselect); - - /* tell how many lines we found */ - *listsize = line; - return; - } + { + /* the under blank bit */ + if (draw) + rectfill (gui_bmp, x + 1, y1, x + w - 3, y + h - 1, deselect); + + /* tell how many lines we found */ + *listsize = line; + return; + } } } @@ -347,54 +355,54 @@ case MSG_START: /* measure how many lines of text we contain */ - my_draw_textbox (d->dp, &d->d1, 0, /* DONT DRAW anything */ - d->d2, !(d->flags & D_SELECTED), 8, - d->x, d->y, d->w, d->h, - (d->flags & D_DISABLED), 0, 0, 0); + my_draw_textbox (d->dp, &d->d1, 0, /* DONT DRAW anything */ + d->d2, !(d->flags & D_SELECTED), 8, + d->x, d->y, d->w, d->h, + (d->flags & D_DISABLED), 0, 0, 0); break; case MSG_DRAW: /* tell the object to sort of draw, but only calculate the listsize */ - my_draw_textbox (d->dp, &d->d1, 0, /* DONT DRAW anything */ - d->d2, !(d->flags & D_SELECTED), 8, - d->x, d->y, d->w, d->h, - (d->flags & D_DISABLED), 0, 0, 0); - - if (d->d1 > height && d->d1 > 1) // ufoot - { - bar = 12; - } + my_draw_textbox (d->dp, &d->d1, 0, /* DONT DRAW anything */ + d->d2, !(d->flags & D_SELECTED), 8, + d->x, d->y, d->w, d->h, + (d->flags & D_DISABLED), 0, 0, 0); + + if (d->d1 > height && d->d1 > 1) // ufoot + { + bar = 12; + } else - { - bar = 0; - d->d2 = 0; - } + { + bar = 0; + d->d2 = 0; + } if (d->d1 <= 1) - { - rectfill (screen, d->x, d->y, d->x + d->w, d->y + d->h, d->bg); // ufoot - } + { + rectfill (screen, d->x, d->y, d->x + d->w, d->y + d->h, d->bg); // ufoot + } /* now do the actual drawing */ my_draw_textbox (d->dp, &d->d1, 1, d->d2, - !(d->flags & D_SELECTED), 8, - d->x, d->y, d->w - bar, d->h, - (d->flags & D_DISABLED), - fg_color, d->bg, gui_mg_color); + !(d->flags & D_SELECTED), 8, + d->x, d->y, d->w - bar, d->h, + (d->flags & D_DISABLED), + fg_color, d->bg, gui_mg_color); if (d->d1 <= 1) - { - /* - * If there's only one line, skip the scroll bar. Patched - * for LW by ufoot, to handle 320x240 in a nicer way. - */ - rect (screen, d->x, d->y, d->x + d->w, d->y + d->h, fg_color); // ufoot - } + { + /* + * If there's only one line, skip the scroll bar. Patched + * for LW by ufoot, to handle 320x240 in a nicer way. + */ + rect (screen, d->x, d->y, d->x + d->w, d->y + d->h, fg_color); // ufoot + } else - { - /* draw the frame around */ - _draw_scrollable_frame (d, d->d1, d->d2, height, fg_color, d->bg); - } + { + /* draw the frame around */ + _draw_scrollable_frame (d, d->d1, d->d2, height, fg_color, d->bg); + } break; case MSG_CLICK: @@ -402,15 +410,15 @@ bar = (d->d1 > height); if ((!bar) || (gui_mouse_x () < d->x + d->w - 13)) - { - /* clicked on the text area */ - ret = D_O_K; - } + { + /* clicked on the text area */ + ret = D_O_K; + } else - { - /* clicked on the scroll area */ - my_handle_scrollable_scroll_click (d, d->d1, &d->d2, height); - } + { + /* clicked on the scroll area */ + my_handle_scrollable_scroll_click (d, d->d1, &d->d2, height); + } break; case MSG_CHAR: @@ -418,47 +426,47 @@ used = D_USED_CHAR; if (d->d1 > 0) - { - if (d->d2 > 0) - top = d->d2 + 1; - else - top = 0; - - l = (d->h - 8) / text_height (font); - - bottom = d->d2 + l - 1; - if (bottom >= d->d1 - 1) - bottom = d->d1 - 1; - else - bottom--; - - if ((c >> 8) == KEY_UP) - d->d2--; - else if ((c >> 8) == KEY_DOWN) - d->d2++; - else if ((c >> 8) == KEY_HOME) - d->d2 = 0; - else if ((c >> 8) == KEY_END) - d->d2 = d->d1 - l; - else if ((c >> 8) == KEY_PGUP) - d->d2 -= (bottom - top) ? bottom - top : 1; - else if ((c >> 8) == KEY_PGDN) - d->d2 += (bottom - top) ? bottom - top : 1; - else - used = D_O_K; - - /* make sure that the list stays in bounds */ - if (d->d2 > d->d1 - l) - d->d2 = d->d1 - l; - if (d->d2 < 0) - d->d2 = 0; - } + { + if (d->d2 > 0) + top = d->d2 + 1; + else + top = 0; + + l = (d->h - 8) / text_height (font); + + bottom = d->d2 + l - 1; + if (bottom >= d->d1 - 1) + bottom = d->d1 - 1; + else + bottom--; + + if ((c >> 8) == KEY_UP) + d->d2--; + else if ((c >> 8) == KEY_DOWN) + d->d2++; + else if ((c >> 8) == KEY_HOME) + d->d2 = 0; + else if ((c >> 8) == KEY_END) + d->d2 = d->d1 - l; + else if ((c >> 8) == KEY_PGUP) + d->d2 -= (bottom - top) ? bottom - top : 1; + else if ((c >> 8) == KEY_PGDN) + d->d2 += (bottom - top) ? bottom - top : 1; + else + used = D_O_K; + + /* make sure that the list stays in bounds */ + if (d->d2 > d->d1 - l) + d->d2 = d->d1 - l; + if (d->d2 < 0) + d->d2 = 0; + } else - used = D_O_K; + used = D_O_K; /* if we changed something, better redraw... */ if (d->d2 != start) - d->flags |= D_DIRTY; + d->flags |= D_DIRTY; ret = used; break; @@ -470,11 +478,11 @@ /* scroll, making sure that the list stays in bounds */ start = d->d2; d->d2 = - (c > 0) ? MAX (0, d->d2 - delta) : MIN (d->d1 - l, d->d2 + delta); + (c > 0) ? MAX (0, d->d2 - delta) : MIN (d->d1 - l, d->d2 + delta); /* if we changed something, better redraw... */ if (d->d2 != start) - d->flags |= D_DIRTY; + d->flags |= D_DIRTY; ret = D_O_K; break; @@ -482,7 +490,7 @@ case MSG_WANTFOCUS: /* if we don't have a scrollbar we can't do anything with the focus */ if (d->d1 > height) - ret = D_WANTFOCUS; + ret = D_WANTFOCUS; break; default: @@ -508,7 +516,7 @@ int g; ASSERT (d); - LW_MACRO_NOP (c); // ufoot + LW_MACRO_NOP (c); // ufoot gui_bmp = gui_get_screen (); @@ -517,40 +525,40 @@ case MSG_DRAW: if (d->flags & D_SELECTED) - { - g = 1; - state1 = d->bg; - state2 = (d->flags & D_DISABLED) ? gui_mg_color : d->fg; - } + { + g = 1; + state1 = d->bg; + state2 = (d->flags & D_DISABLED) ? gui_mg_color : d->fg; + } else - { - g = 0; - state1 = (d->flags & D_DISABLED) ? gui_mg_color : d->fg; - state2 = d->bg; - } + { + g = 0; + state1 = (d->flags & D_DISABLED) ? gui_mg_color : d->fg; + state2 = d->bg; + } rectfill (gui_bmp, d->x + 1 + g, d->y + 1 + g, d->x + d->w - 3 + g, - d->y + d->h - 3 + g, state2); + d->y + d->h - 3 + g, state2); rect (gui_bmp, d->x + g, d->y + g, d->x + d->w - 2 + g, - d->y + d->h - 2 + g, state1); + d->y + d->h - 2 + g, state1); //gui_textout_ex(gui_bmp, d->dp, d->x+d->w/2+g, d->y+d->h/2-text_height(font)/2+g, state1, -1, TRUE); - gui_textout_ex (gui_bmp, d->dp, d->x + d->w / 2 + g, d->y + d->h / 2 - text_height (font) / 2 + g, -1, -1, TRUE); // ufoot + gui_textout_ex (gui_bmp, d->dp, d->x + d->w / 2 + g, d->y + d->h / 2 - text_height (font) / 2 + g, -1, -1, TRUE); // ufoot if (d->flags & D_SELECTED) - { - vline (gui_bmp, d->x, d->y, d->y + d->h - 2, d->bg); - hline (gui_bmp, d->x, d->y, d->x + d->w - 2, d->bg); - } + { + vline (gui_bmp, d->x, d->y, d->y + d->h - 2, d->bg); + hline (gui_bmp, d->x, d->y, d->x + d->w - 2, d->bg); + } else - { - black = makecol (0, 0, 0); - vline (gui_bmp, d->x + d->w - 1, d->y + 1, d->y + d->h - 2, black); - hline (gui_bmp, d->x + 1, d->y + d->h - 1, d->x + d->w - 1, black); - } + { + black = makecol (0, 0, 0); + vline (gui_bmp, d->x + d->w - 1, d->y + 1, d->y + d->h - 2, black); + hline (gui_bmp, d->x + 1, d->y + d->h - 1, d->x + d->w - 1, black); + } if ((d->flags & D_GOTFOCUS) && - (!(d->flags & D_SELECTED) || !(d->flags & D_EXIT))) - my_dotted_rect (d->x + 1 + g, d->y + 1 + g, d->x + d->w - 3 + g, - d->y + d->h - 3 + g, state1, state2); + (!(d->flags & D_SELECTED) || !(d->flags & D_EXIT))) + my_dotted_rect (d->x + 1 + g, d->y + 1 + g, d->x + d->w - 3 + g, + d->y + d->h - 3 + g, state1, state2); break; case MSG_WANTFOCUS: @@ -559,9 +567,9 @@ case MSG_KEY: /* close dialog? */ if (d->flags & D_EXIT) - { - return D_CLOSE; - } + { + return D_CLOSE; + } /* or just toggle */ d->flags ^= D_SELECTED; @@ -572,37 +580,37 @@ /* what state was the button originally in? */ state1 = d->flags & D_SELECTED; if (d->flags & D_EXIT) - swap = FALSE; + swap = FALSE; else - swap = state1; + swap = state1; /* track the mouse until it is released */ while (gui_mouse_b ()) - { - state2 = ((gui_mouse_x () >= d->x) && (gui_mouse_y () >= d->y) && - (gui_mouse_x () < d->x + d->w) - && (gui_mouse_y () < d->y + d->h)); - if (swap) - state2 = !state2; - - /* redraw? */ - if (((state1) && (!state2)) || ((state2) && (!state1))) - { - d->flags ^= D_SELECTED; - state1 = d->flags & D_SELECTED; - object_message (d, MSG_DRAW, 0); - } - - /* let other objects continue to animate */ - broadcast_dialog_message (MSG_IDLE, 0); - } + { + state2 = ((gui_mouse_x () >= d->x) && (gui_mouse_y () >= d->y) && + (gui_mouse_x () < d->x + d->w) + && (gui_mouse_y () < d->y + d->h)); + if (swap) + state2 = !state2; + + /* redraw? */ + if (((state1) && (!state2)) || ((state2) && (!state1))) + { + d->flags ^= D_SELECTED; + state1 = d->flags & D_SELECTED; + object_message (d, MSG_DRAW, 0); + } + + /* let other objects continue to animate */ + broadcast_dialog_message (MSG_IDLE, 0); + } /* should we close the dialog? */ if ((d->flags & D_SELECTED) && (d->flags & D_EXIT)) - { - d->flags ^= D_SELECTED; - return D_CLOSE; - } + { + d->flags ^= D_SELECTED; + return D_CLOSE; + } break; } @@ -616,7 +624,7 @@ int my_text_proc (int msg, DIALOG * d, int c) { - LW_MACRO_NOP (c); // ufoot + LW_MACRO_NOP (c); // ufoot ASSERT (d); if (msg == MSG_DRAW) @@ -625,10 +633,10 @@ FONT *oldfont = font; if (d->dp2) - font = d->dp2; + font = d->dp2; //gui_textout_ex(gui_get_screen(), d->dp, d->x, d->y, fg, d->bg, FALSE); - gui_textout_ex (gui_get_screen (), d->dp, d->x, d->y, -1, d->bg, FALSE); // ufoot + gui_textout_ex (gui_get_screen (), d->dp, d->x, d->y, -1, d->bg, FALSE); // ufoot font = oldfont; } @@ -643,7 +651,7 @@ int my_ctext_proc (int msg, DIALOG * d, int c) { - LW_MACRO_NOP (c); // ufoot + LW_MACRO_NOP (c); // ufoot ASSERT (d); if (msg == MSG_DRAW) @@ -652,10 +660,10 @@ FONT *oldfont = font; if (d->dp2) - font = d->dp2; + font = d->dp2; //gui_textout_ex(gui_get_screen(), d->dp, d->x + d->w/2, d->y, fg, d->bg, TRUE); - gui_textout_ex (gui_get_screen (), d->dp, d->x + d->w / 2, d->y, -1, d->bg, TRUE); // ufoot + gui_textout_ex (gui_get_screen (), d->dp, d->x + d->w / 2, d->y, -1, d->bg, TRUE); // ufoot font = oldfont; } @@ -683,12 +691,12 @@ BITMAP *gui_bmp = gui_get_screen (); BITMAP *slhan = NULL; int oldpos, newpos; - int sfg; /* slider foreground color */ - int vert = TRUE; /* flag: is slider vertical? */ - int hh = 7; /* handle height (width for horizontal sliders) */ - int hmar; /* handle margin */ - int slp; /* slider position */ - int mp; /* mouse position */ + int sfg; /* slider foreground color */ + int vert = TRUE; /* flag: is slider vertical? */ + int hh = 7; /* handle height (width for horizontal sliders) */ + int hmar; /* handle margin */ + int slp; /* slider position */ + int mp; /* mouse position */ int irange; int slx, sly, slh, slw; int msx, msy; @@ -711,9 +719,9 @@ { slhan = (BITMAP *) d->dp; if (vert) - hh = slhan->h; + hh = slhan->h; else - hh = slhan->w; + hh = slhan->w; } hmar = hh / 2; @@ -730,76 +738,76 @@ sfg = (d->flags & D_DISABLED) ? gui_mg_color : d->fg; if (vert) - { - rectfill (gui_bmp, d->x, d->y, d->x + d->w / 2 - 2, d->y + d->h - 1, - d->bg); - rectfill (gui_bmp, d->x + d->w / 2 - 1, d->y, d->x + d->w / 2 + 1, - d->y + d->h - 1, sfg); - rectfill (gui_bmp, d->x + d->w / 2 + 2, d->y, d->x + d->w - 1, - d->y + d->h - 1, d->bg); - } + { + rectfill (gui_bmp, d->x, d->y, d->x + d->w / 2 - 2, d->y + d->h - 1, + d->bg); + rectfill (gui_bmp, d->x + d->w / 2 - 1, d->y, d->x + d->w / 2 + 1, + d->y + d->h - 1, sfg); + rectfill (gui_bmp, d->x + d->w / 2 + 2, d->y, d->x + d->w - 1, + d->y + d->h - 1, d->bg); + } else - { - rectfill (gui_bmp, d->x, d->y, d->x + d->w - 1, d->y + d->h / 2 - 2, - d->bg); - rectfill (gui_bmp, d->x, d->y + d->h / 2 - 1, d->x + d->w - 1, - d->y + d->h / 2 + 1, sfg); - rectfill (gui_bmp, d->x, d->y + d->h / 2 + 2, d->x + d->w - 1, - d->y + d->h - 1, d->bg); - } + { + rectfill (gui_bmp, d->x, d->y, d->x + d->w - 1, d->y + d->h / 2 - 2, + d->bg); + rectfill (gui_bmp, d->x, d->y + d->h / 2 - 1, d->x + d->w - 1, + d->y + d->h / 2 + 1, sfg); + rectfill (gui_bmp, d->x, d->y + d->h / 2 + 2, d->x + d->w - 1, + d->y + d->h - 1, d->bg); + } /* * Following line added to draw a box arround the slider */ - rect (screen, d->x, d->y, d->x + d->w, d->y + d->h, sfg); // ufoot + rect (screen, d->x, d->y, d->x + d->w, d->y + d->h, sfg); // ufoot /* okay, background and slot are drawn, now draw the handle */ if (slhan) - { - if (vert) - { - slx = d->x + (d->w / 2) - (slhan->w / 2); - sly = d->y + (d->h - 1) - (hh + slp); - } - else - { - slx = d->x + slp; - sly = d->y + (d->h / 2) - (slhan->h / 2); - } - draw_sprite (gui_bmp, slhan, slx, sly); - } + { + if (vert) + { + slx = d->x + (d->w / 2) - (slhan->w / 2); + sly = d->y + (d->h - 1) - (hh + slp); + } + else + { + slx = d->x + slp; + sly = d->y + (d->h / 2) - (slhan->h / 2); + } + draw_sprite (gui_bmp, slhan, slx, sly); + } else - { - /* draw default handle */ - if (vert) - { - slx = d->x; - sly = d->y + (d->h) - (hh + slp); - slw = d->w - 1; - slh = hh - 1; - } - else - { - slx = d->x + slp; - sly = d->y; - slw = hh - 1; - slh = d->h - 1; - } - - /* draw body */ - rectfill (gui_bmp, slx + 2, sly, slx + (slw - 2), sly + slh, sfg); - vline (gui_bmp, slx + 1, sly + 1, sly + slh - 1, sfg); - vline (gui_bmp, slx + slw - 1, sly + 1, sly + slh - 1, sfg); - vline (gui_bmp, slx, sly + 2, sly + slh - 2, sfg); - vline (gui_bmp, slx + slw, sly + 2, sly + slh - 2, sfg); - vline (gui_bmp, slx + 1, sly + 2, sly + slh - 2, d->bg); - hline (gui_bmp, slx + 2, sly + 1, slx + slw - 2, d->bg); - putpixel (gui_bmp, slx + 2, sly + 2, d->bg); - } + { + /* draw default handle */ + if (vert) + { + slx = d->x; + sly = d->y + (d->h) - (hh + slp); + slw = d->w - 1; + slh = hh - 1; + } + else + { + slx = d->x + slp; + sly = d->y; + slw = hh - 1; + slh = d->h - 1; + } + + /* draw body */ + rectfill (gui_bmp, slx + 2, sly, slx + (slw - 2), sly + slh, sfg); + vline (gui_bmp, slx + 1, sly + 1, sly + slh - 1, sfg); + vline (gui_bmp, slx + slw - 1, sly + 1, sly + slh - 1, sfg); + vline (gui_bmp, slx, sly + 2, sly + slh - 2, sfg); + vline (gui_bmp, slx + slw, sly + 2, sly + slh - 2, sfg); + vline (gui_bmp, slx + 1, sly + 2, sly + slh - 2, d->bg); + hline (gui_bmp, slx + 2, sly + 1, slx + slw - 2, d->bg); + putpixel (gui_bmp, slx + 2, sly + 2, d->bg); + } if (d->flags & D_GOTFOCUS) - // my_dotted_rect(d->x, d->y, d->x+d->w-1, d->y+d->h-1, sfg, d->bg); - my_dotted_rect (d->x + 1, d->y + 1, d->x + d->w - 1, d->y + d->h - 1, sfg, d->bg); // ufoot + // my_dotted_rect(d->x, d->y, d->x+d->w-1, d->y+d->h-1, sfg, d->bg); + my_dotted_rect (d->x + 1, d->y + 1, d->x + d->w - 1, d->y + d->h - 1, sfg, d->bg); // ufoot break; case MSG_WANTFOCUS: @@ -808,97 +816,97 @@ case MSG_KEY: if (!(d->flags & D_GOTFOCUS)) - return D_WANTFOCUS; + return D_WANTFOCUS; else - return D_O_K; + return D_O_K; case MSG_CHAR: /* handle movement keys to move slider */ c >>= 8; if (vert) - { - upkey = KEY_UP; - downkey = KEY_DOWN; - pgupkey = KEY_PGUP; - pgdnkey = KEY_PGDN; - homekey = KEY_END; - endkey = KEY_HOME; - } + { + upkey = KEY_UP; + downkey = KEY_DOWN; + pgupkey = KEY_PGUP; + pgdnkey = KEY_PGDN; + homekey = KEY_END; + endkey = KEY_HOME; + } else - { - upkey = KEY_RIGHT; - downkey = KEY_LEFT; - pgupkey = KEY_PGDN; - pgdnkey = KEY_PGUP; - homekey = KEY_HOME; - endkey = KEY_END; - } + { + upkey = KEY_RIGHT; + downkey = KEY_LEFT; + pgupkey = KEY_PGDN; + pgdnkey = KEY_PGUP; + homekey = KEY_HOME; + endkey = KEY_END; + } if (c == upkey) - delta = 1; + delta = 1; else if (c == downkey) - delta = -1; + delta = -1; else if (c == pgdnkey) - delta = -d->d1 / 16; + delta = -d->d1 / 16; else if (c == pgupkey) - delta = d->d1 / 16; + delta = d->d1 / 16; else if (c == homekey) - delta = -d->d2; + delta = -d->d2; else if (c == endkey) - delta = d->d1 - d->d2; + delta = d->d1 - d->d2; else - delta = 0; + delta = 0; if (delta) - { - oldpos = slp; - oldval = d->d2; - - while (1) - { - d->d2 = d->d2 + delta; - slpos = slratio * d->d2; - slp = fixtoi (slpos); - if ((slp != oldpos) || (d->d2 <= 0) || (d->d2 >= d->d1)) - break; - } - - if (d->d2 < 0) - d->d2 = 0; - if (d->d2 > d->d1) - d->d2 = d->d1; - - retval = D_USED_CHAR; - - if (d->d2 != oldval) - { - /* call callback function here */ - if (d->dp2) - { - proc = d->dp2; - retval |= (*proc) (d->dp3, d->d2); - } - - object_message (d, MSG_DRAW, 0); - } - } + { + oldpos = slp; + oldval = d->d2; + + while (1) + { + d->d2 = d->d2 + delta; + slpos = slratio * d->d2; + slp = fixtoi (slpos); + if ((slp != oldpos) || (d->d2 <= 0) || (d->d2 >= d->d1)) + break; + } + + if (d->d2 < 0) + d->d2 = 0; + if (d->d2 > d->d1) + d->d2 = d->d1; + + retval = D_USED_CHAR; + + if (d->d2 != oldval) + { + /* call callback function here */ + if (d->dp2) + { + proc = d->dp2; + retval |= (*proc) (d->dp3, d->d2); + } + + object_message (d, MSG_DRAW, 0); + } + } break; case MSG_WHEEL: oldval = d->d2; d->d2 = MID (0, d->d2 + c, d->d1); if (d->d2 != oldval) - { - /* call callback function here */ - if (d->dp2) - { - proc = d->dp2; - retval |= (*proc) (d->dp3, d->d2); - } + { + /* call callback function here */ + if (d->dp2) + { + proc = d->dp2; + retval |= (*proc) (d->dp3, d->d2); + } - object_message (d, MSG_DRAW, 0); - } + object_message (d, MSG_DRAW, 0); + } break; case MSG_CLICK: @@ -906,38 +914,38 @@ mp = slp; while (gui_mouse_b ()) - { - msx = gui_mouse_x (); - msy = gui_mouse_y (); - oldval = d->d2; - if (vert) - mp = (d->y + d->h - hmar) - msy; - else - mp = msx - (d->x + hmar); - if (mp < 0) - mp = 0; - if (mp > irange - hh) - mp = irange - hh; - slpos = itofix (mp); - slmax = fixdiv (slpos, slratio); - newpos = fixtoi (slmax); - if (newpos != oldval) - { - d->d2 = newpos; - - /* call callback function here */ - if (d->dp2 != NULL) - { - proc = d->dp2; - retval |= (*proc) (d->dp3, d->d2); - } - - object_message (d, MSG_DRAW, 0); - } - - /* let other objects continue to animate */ - broadcast_dialog_message (MSG_IDLE, 0); - } + { + msx = gui_mouse_x (); + msy = gui_mouse_y (); + oldval = d->d2; + if (vert) + mp = (d->y + d->h - hmar) - msy; + else + mp = msx - (d->x + hmar); + if (mp < 0) + mp = 0; + if (mp > irange - hh) + mp = irange - hh; + slpos = itofix (mp); + slmax = fixdiv (slpos, slratio); + newpos = fixtoi (slmax); + if (newpos != oldval) + { + d->d2 = newpos; + + /* call callback function here */ + if (d->dp2 != NULL) + { + proc = d->dp2; + retval |= (*proc) (d->dp3, d->d2); + } + + object_message (d, MSG_DRAW, 0); + } + + /* let other objects continue to animate */ + broadcast_dialog_message (MSG_IDLE, 0); + } break; } @@ -958,7 +966,8 @@ static int ignore_next_uchar = FALSE; BITMAP *gui_bmp; int last_was_space, new_pos, i, k; - int f, l, p, w, x, fg, b, scroll; + int f, l, p, w, x, b, scroll; + int fg; char buf[16]; char *s, *t; ASSERT (d); @@ -987,7 +996,7 @@ x += text_length (font, buf); b++; if (x > d->w) - break; + break; } if (x <= d->w) @@ -1013,48 +1022,48 @@ x = 0; if (scroll) - { - p = d->d2 - b + 1; - b = d->d2; - } + { + p = d->d2 - b + 1; + b = d->d2; + } else - p = 0; + p = 0; for (; p <= b; p++) - { - f = ugetat (s, p); - usetc (buf + usetc (buf, (f) ? f : ' '), 0); - w = text_length (font, buf); - if (x + w > d->w) - break; - f = ((p == d->d2) && (d->flags & D_GOTFOCUS)); - //textout_ex(gui_bmp, font, buf, d->x+x, d->y, (f) ? d->bg : fg, (f) ? fg : d->bg); - textout_ex (gui_bmp, font, buf, d->x + x, d->y, -1, (f) ? d->fg : d->bg); // ufoot - x += w; - } + { + f = ugetat (s, p); + usetc (buf + usetc (buf, (f) ? f : ' '), 0); + w = text_length (font, buf); + if (x + w > d->w) + break; + f = ((p == d->d2) && (d->flags & D_GOTFOCUS)); + //textout_ex(gui_bmp, font, buf, d->x+x, d->y, (f) ? d->bg : fg, (f) ? fg : d->bg); + textout_ex (gui_bmp, font, buf, d->x + x, d->y, -1, (f) ? d->fg : d->bg); // ufoot + x += w; + } if (x < d->w) - rectfill (gui_bmp, d->x + x, d->y, d->x + d->w - 1, - d->y + text_height (font) - 1, d->bg); + rectfill (gui_bmp, d->x + x, d->y, d->x + d->w - 1, + d->y + text_height (font) - 1, d->bg); break; case MSG_CLICK: x = d->x; if (scroll) - { - p = d->d2 - b + 1; - b = d->d2; - } + { + p = d->d2 - b + 1; + b = d->d2; + } else - p = 0; + p = 0; for (; p < b; p++) - { - usetc (buf + usetc (buf, ugetat (s, p)), 0); - x += text_length (font, buf); - if (x > gui_mouse_x ()) - break; - } + { + usetc (buf + usetc (buf, ugetat (s, p)), 0); + x += text_length (font, buf); + if (x > gui_mouse_x ()) + break; + } d->d2 = MID (0, p, l); object_message (d, MSG_DRAW, 0); break; @@ -1068,107 +1077,115 @@ ignore_next_uchar = FALSE; if ((c >> 8) == KEY_LEFT) - { - if (d->d2 > 0) - { - if (key_shifts & KB_CTRL_FLAG) - { - last_was_space = TRUE; - new_pos = 0; - t = s; - for (i = 0; i < d->d2; i++) - { - k = ugetx (&t); - if (uisspace (k)) - last_was_space = TRUE; - else if (last_was_space) - { - last_was_space = FALSE; - new_pos = i; - } - } - d->d2 = new_pos; - } - else - d->d2--; - } - } + { + if (d->d2 > 0) + { + if (key_shifts & KB_CTRL_FLAG) + { + last_was_space = TRUE; + new_pos = 0; + t = s; + for (i = 0; i < d->d2; i++) + { + k = ugetx (&t); + if (uisspace (k)) + last_was_space = TRUE; + else if (last_was_space) + { + last_was_space = FALSE; + new_pos = i; + } + } + d->d2 = new_pos; + } + else + d->d2--; + } + } else if ((c >> 8) == KEY_RIGHT) - { - if (d->d2 < l) - { - if (key_shifts & KB_CTRL_FLAG) - { - t = s + uoffset (s, d->d2); - for (k = ugetx (&t); uisspace (k); k = ugetx (&t)) - d->d2++; - for (; k && !uisspace (k); k = ugetx (&t)) - d->d2++; - } - else - d->d2++; - } - } + { + if (d->d2 < l) + { + if (key_shifts & KB_CTRL_FLAG) + { + t = s + uoffset (s, d->d2); + for (k = ugetx (&t); uisspace (k); k = ugetx (&t)) + d->d2++; + for (; k && !uisspace (k); k = ugetx (&t)) + d->d2++; + } + else + d->d2++; + } + } else if ((c >> 8) == KEY_HOME) - { - d->d2 = 0; - } + { + d->d2 = 0; + } else if ((c >> 8) == KEY_END) - { - d->d2 = l; - } + { + d->d2 = l; + } else if ((c >> 8) == KEY_DEL) - { - if (d->d2 < l) - uremove (s, d->d2); - } + { + if (d->d2 < l) + uremove (s, d->d2); + } else if ((c >> 8) == KEY_BACKSPACE) - { - if (d->d2 > 0) - { - d->d2--; - uremove (s, d->d2); - } - } + { + if (d->d2 > 0) + { + d->d2--; + uremove (s, d->d2); + } + } else if ((c >> 8) == KEY_ENTER) - { - if (d->flags & D_EXIT) - { - object_message (d, MSG_DRAW, 0); - return D_CLOSE; - } - else - return D_O_K; - } + { + if (d->flags & D_EXIT) + { + object_message (d, MSG_DRAW, 0); + return D_CLOSE; + } + else + return D_O_K; + } else if ((c >> 8) == KEY_TAB) - { - ignore_next_uchar = TRUE; - return D_O_K; - } + { + ignore_next_uchar = TRUE; + return D_O_K; + } else - { - /* don't process regular keys here: MSG_UCHAR will do that */ - break; - } + { + /* don't process regular keys here: MSG_UCHAR will do that */ + break; + } object_message (d, MSG_DRAW, 0); return D_USED_CHAR; case MSG_UCHAR: // if ((c >= ' ') && (uisok (c)) && (!ignore_next_uchar)) - if ((c >= ' ') && (c < 128) && (uisok (c)) && (!ignore_next_uchar)) // ufoot - { - if (l < d->d1) - { - uinsert (s, d->d2, c); - d->d2++; - - object_message (d, MSG_DRAW, 0); - } - return D_USED_CHAR; - } + if ((c >= ' ') && (c < 128) && (uisok (c)) && (!ignore_next_uchar)) // ufoot + { + if (l < d->d1) + { + uinsert (s, d->d2, c); + d->d2++; + + object_message (d, MSG_DRAW, 0); + } + return D_USED_CHAR; + } break; } + if (fg) + { + /* + * Not elegant, but test above here just to get + * rid of compiler warning about fg not being used. + */ + } + return D_O_K; } @@ -1179,7 +1196,7 @@ */ static void my_handle_scrollable_scroll_click (DIALOG * d, int listsize, int *offset, - int height) + int height) { int xx, yy; int hh = d->h - 5; @@ -1190,47 +1207,47 @@ int len = (hh * (*offset) + listsize / 2) / listsize + 2; if ((gui_mouse_y () >= d->y + len) - && (gui_mouse_y () <= d->y + len + i)) - { - xx = gui_mouse_y () - len + 2; - while (gui_mouse_b ()) - { - yy = (listsize * (gui_mouse_y () - xx) + hh / 2) / hh; - if (yy > listsize - height) - yy = listsize - height; - - if (yy < 0) - yy = 0; - - if (yy != *offset) - { - *offset = yy; - object_message (d, MSG_DRAW, 0); - } - - /* let other objects continue to animate */ - broadcast_dialog_message (MSG_IDLE, 0); - } - } + && (gui_mouse_y () <= d->y + len + i)) + { + xx = gui_mouse_y () - len + 2; + while (gui_mouse_b ()) + { + yy = (listsize * (gui_mouse_y () - xx) + hh / 2) / hh; + if (yy > listsize - height) + yy = listsize - height; + + if (yy < 0) + yy = 0; + + if (yy != *offset) + { + *offset = yy; + object_message (d, MSG_DRAW, 0); + } + + /* let other objects continue to animate */ + broadcast_dialog_message (MSG_IDLE, 0); + } + } else - { - if (gui_mouse_y () <= d->y + len) - yy = *offset - height; - else - yy = *offset + height; - - if (yy > listsize - height) - yy = listsize - height; - - if (yy < 0) - yy = 0; - - if (yy != *offset) - { - *offset = yy; - object_message (d, MSG_DRAW, 0); - } - } + { + if (gui_mouse_y () <= d->y + len) + yy = *offset - height; + else + yy = *offset + height; + + if (yy > listsize - height) + yy = listsize - height; + + if (yy < 0) + yy = 0; + + if (yy != *offset) + { + *offset = yy; + object_message (d, MSG_DRAW, 0); + } + } /* let other objects continue to animate */ broadcast_dialog_message (MSG_IDLE, 0); @@ -1243,7 +1260,7 @@ */ static void my_handle_scrollable_scroll (DIALOG * d, int listsize, int *index, - int *offset) + int *offset) { int height = (d->h - 4) / text_height (font); @@ -1266,14 +1283,14 @@ if (*offset >= *index) { if (*index < 0) - *offset = 0; + *offset = 0; else - *offset = *index; + *offset = *index; } else { while ((*offset + height - 1) < *index) - (*offset)++; + (*offset)++; } } @@ -1307,16 +1324,16 @@ height = (d->h - 4) / text_height (font); i = MID (0, ((gui_mouse_y () - d->y - 2) / text_height (font)), - ((d->h - 4) / text_height (font) - 1)); + ((d->h - 4) / text_height (font) - 1)); i += d->d2; if (i < d->d2) i = d->d2; else { if (i > d->d2 + height - 1) - i = d->d2 + height - 1; + i = d->d2 + height - 1; if (i >= listsize) - i = listsize - 1; + i = listsize - 1; } if (gui_mouse_y () <= d->y) @@ -1327,20 +1344,20 @@ if (i != d->d1) { if (sel) - { - if (key_shifts & (KB_SHIFT_FLAG | KB_CTRL_FLAG)) - { - if ((key_shifts & KB_SHIFT_FLAG) || (d->flags & D_INTERNAL)) - { - for (j = MIN (i, d->d1); j <= MAX (i, d->d1); j++) - sel[j] = TRUE; - } - else - sel[i] = !sel[i]; - } - else - sel[i] = TRUE; - } + { + if (key_shifts & (KB_SHIFT_FLAG | KB_CTRL_FLAG)) + { + if ((key_shifts & KB_SHIFT_FLAG) || (d->flags & D_INTERNAL)) + { + for (j = MIN (i, d->d1); j <= MAX (i, d->d1); j++) + sel[j] = TRUE; + } + else + sel[i] = !sel[i]; + } + else + sel[i] = TRUE; + } d->d1 = i; i = d->d2; @@ -1349,23 +1366,23 @@ d->flags |= D_DIRTY; if (i != d->d2) - rest_callback (MID (10, text_height (font) * 16 - d->h - 1, 100), - my_idle_cb); + rest_callback (MID (10, text_height (font) * 16 - d->h - 1, 100), + my_idle_cb); } else { if (!(d->flags & D_INTERNAL)) - { - if (sel) - { - if ((key_shifts & KB_CTRL_FLAG)) - sel[i] = !sel[i]; - else - sel[i] = TRUE; - - d->flags |= D_DIRTY; - } - } + { + if (sel) + { + if ((key_shifts & KB_CTRL_FLAG)) + sel[i] = !sel[i]; + else + sel[i] = TRUE; + + d->flags |= D_DIRTY; + } + } } } @@ -1379,7 +1396,8 @@ { BITMAP *gui_bmp = gui_get_screen (); int height, listsize, i, len, bar, x, y, w; - int fg_color, fg, bg; + int fg_color, bg; + int fg; char *sel = d->dp2; char s[1024]; @@ -1393,70 +1411,78 @@ for (i = 0; i < height; i++) { if (d->d2 + i < listsize) - { - if (sel) - { - if ((sel[d->d2 + i]) && (d->d2 + i == d->d1)) - { - fg = d->bg; - bg = fg_color; - } - else if (sel[d->d2 + i]) - { - fg = d->bg; - bg = gui_mg_color; - } - else - { - fg = fg_color; - bg = d->bg; - } - } - else if (d->d2 + i == d->d1) - { - fg = d->bg; - bg = fg_color; - } - else - { - fg = fg_color; - bg = d->bg; - } - ustrzcpy (s, sizeof (s), - (*(my_getfuncptr) d->dp) (i + d->d2, NULL)); - x = d->x + 2; - y = d->y + 2 + i * text_height (font); - rectfill (gui_bmp, x, y, x + 7, y + text_height (font) - 1, bg); - x += 8; - len = ustrlen (s); - while (text_length (font, s) >= MAX (d->w - 1 - (bar ? 22 : 10), 1)) - { - len--; - usetat (s, len, 0); - } - //textout_ex(gui_bmp, font, s, x, y, fg, bg); - textout_ex (gui_bmp, font, s, x, y, -1, bg); // ufoot - x += text_length (font, s); - if (x <= d->x + w) - rectfill (gui_bmp, x, y, d->x + w, y + text_height (font) - 1, - bg); - if (d->d2 + i == d->d1) - my_dotted_rect (d->x + 1, y, d->x + d->w - (bar ? 12 : 0), - y + text_height (font) - 1, d->fg, d->bg); - } + { + if (sel) + { + if ((sel[d->d2 + i]) && (d->d2 + i == d->d1)) + { + fg = d->bg; + bg = fg_color; + } + else if (sel[d->d2 + i]) + { + fg = d->bg; + bg = gui_mg_color; + } + else + { + fg = fg_color; + bg = d->bg; + } + } + else if (d->d2 + i == d->d1) + { + fg = d->bg; + bg = fg_color; + } + else + { + fg = fg_color; + bg = d->bg; + } + ustrzcpy (s, sizeof (s), + (*(my_getfuncptr) d->dp) (i + d->d2, NULL)); + x = d->x + 2; + y = d->y + 2 + i * text_height (font); + rectfill (gui_bmp, x, y, x + 7, y + text_height (font) - 1, bg); + x += 8; + len = ustrlen (s); + while (text_length (font, s) >= MAX (d->w - 1 - (bar ? 22 : 10), 1)) + { + len--; + usetat (s, len, 0); + } + //textout_ex(gui_bmp, font, s, x, y, fg, bg); + textout_ex (gui_bmp, font, s, x, y, -1, bg); // ufoot + x += text_length (font, s); + if (x <= d->x + w) + rectfill (gui_bmp, x, y, d->x + w, y + text_height (font) - 1, + bg); + if (d->d2 + i == d->d1) + my_dotted_rect (d->x + 1, y, d->x + d->w - (bar ? 12 : 0), + y + text_height (font) - 1, d->fg, d->bg); + } else - { - rectfill (gui_bmp, d->x + 2, d->y + 2 + i * text_height (font), - d->x + w, d->y + 1 + (i + 1) * text_height (font), d->bg); - } + { + rectfill (gui_bmp, d->x + 2, d->y + 2 + i * text_height (font), + d->x + w, d->y + 1 + (i + 1) * text_height (font), d->bg); + } } if (d->y + 2 + i * text_height (font) <= d->y + d->h - 3) rectfill (gui_bmp, d->x + 2, d->y + 2 + i * text_height (font), - d->x + w, d->y + d->h - 3, d->bg); + d->x + w, d->y + d->h - 3, d->bg); /* draw frame, maybe with scrollbar */ _draw_scrollable_frame (d, listsize, d->d2, height, fg_color, d->bg); + + if (fg) + { + /* + * Not elegant, but test above here just to get + * rid of compiler warning about fg not being used. + */ + } } @@ -1499,33 +1525,33 @@ height = (d->h - 4) / text_height (font); bar = (listsize > height); if ((!bar) || (gui_mouse_x () < d->x + d->w - 13)) - { - if ((sel) && (!(key_shifts & KB_CTRL_FLAG))) - { - for (i = 0; i < listsize; i++) - { - if (sel[i]) - { - redraw = TRUE; - sel[i] = FALSE; - } - } - if (redraw) - object_message (d, MSG_DRAW, 0); - } - my_handle_listbox_click (d); - while (gui_mouse_b ()) - { - broadcast_dialog_message (MSG_IDLE, 0); - d->flags |= D_INTERNAL; - my_handle_listbox_click (d); - d->flags &= ~D_INTERNAL; - } - } + { + if ((sel) && (!(key_shifts & KB_CTRL_FLAG))) + { + for (i = 0; i < listsize; i++) + { + if (sel[i]) + { + redraw = TRUE; + sel[i] = FALSE; + } + } + if (redraw) + object_message (d, MSG_DRAW, 0); + } + my_handle_listbox_click (d); + while (gui_mouse_b ()) + { + broadcast_dialog_message (MSG_IDLE, 0); + d->flags |= D_INTERNAL; + my_handle_listbox_click (d); + d->flags &= ~D_INTERNAL; + } + } else - { - my_handle_scrollable_scroll_click (d, listsize, &d->d2, height); - } + { + my_handle_scrollable_scroll_click (d, listsize, &d->d2, height); + } break; case MSG_DCLICK: @@ -1533,42 +1559,42 @@ height = (d->h - 4) / text_height (font); bar = (listsize > height); if ((!bar) || (gui_mouse_x () < d->x + d->w - 13)) - { - if (d->flags & D_EXIT) - { - if (listsize) - { - i = d->d1; - object_message (d, MSG_CLICK, 0); - if (i == d->d1) - return D_CLOSE; - } - } - } + { + if (d->flags & D_EXIT) + { + if (listsize) + { + i = d->d1; + object_message (d, MSG_CLICK, 0); + if (i == d->d1) + return D_CLOSE; + } + } + } break; case MSG_WHEEL: (*(my_getfuncptr) d->dp) (-1, &listsize); height = (d->h - 4) / text_height (font); if (height < listsize) - { - int delta = (height > 3) ? 3 : 1; - if (c > 0) - i = MAX (0, d->d2 - delta); - else - i = MIN (listsize - height, d->d2 + delta); - if (i != d->d2) - { - d->d2 = i; - object_message (d, MSG_DRAW, 0); - } - } + { + int delta = (height > 3) ? 3 : 1; + if (c > 0) + i = MAX (0, d->d2 - delta); + else + i = MIN (listsize - height, d->d2 + delta); + if (i != d->d2) + { + d->d2 = i; + object_message (d, MSG_DRAW, 0); + } + } break; case MSG_KEY: (*(my_getfuncptr) d->dp) (-1, &listsize); if ((listsize) && (d->flags & D_EXIT)) - return D_CLOSE; + return D_CLOSE; break; case MSG_WANTFOCUS: @@ -1578,64 +1604,64 @@ (*(my_getfuncptr) d->dp) (-1, &listsize); if (listsize) - { - c >>= 8; + { + c >>= 8; - bottom = d->d2 + (d->h - 4) / text_height (font) - 1; - if (bottom >= listsize - 1) - bottom = listsize - 1; - - orig = d->d1; - - if (c == KEY_UP) - d->d1--; - else if (c == KEY_DOWN) - d->d1++; - else if (c == KEY_HOME) - d->d1 = 0; - else if (c == KEY_END) - d->d1 = listsize - 1; - else if (c == KEY_PGUP) - { - if (d->d1 > d->d2) - d->d1 = d->d2; - else - d->d1 -= (bottom - d->d2) ? bottom - d->d2 : 1; - } - else if (c == KEY_PGDN) - { - if (d->d1 < bottom) - d->d1 = bottom; - else - d->d1 += (bottom - d->d2) ? bottom - d->d2 : 1; - } - else - return D_O_K; - - if (sel) - { - if (!(key_shifts & (KB_SHIFT_FLAG | KB_CTRL_FLAG))) - { - for (i = 0; i < listsize; i++) - sel[i] = FALSE; - } - else if (key_shifts & KB_SHIFT_FLAG) - { - for (i = MIN (orig, d->d1); i <= MAX (orig, d->d1); i++) - { - if (key_shifts & KB_CTRL_FLAG) - sel[i] = (i != d->d1); - else - sel[i] = TRUE; - } - } - } - - /* if we changed something, better redraw... */ - my_handle_scrollable_scroll (d, listsize, &d->d1, &d->d2); - d->flags |= D_DIRTY; - return D_USED_CHAR; - } + bottom = d->d2 + (d->h - 4) / text_height (font) - 1; + if (bottom >= listsize - 1) + bottom = listsize - 1; + + orig = d->d1; + + if (c == KEY_UP) + d->d1--; + else if (c == KEY_DOWN) + d->d1++; + else if (c == KEY_HOME) + d->d1 = 0; + else if (c == KEY_END) + d->d1 = listsize - 1; + else if (c == KEY_PGUP) + { + if (d->d1 > d->d2) + d->d1 = d->d2; + else + d->d1 -= (bottom - d->d2) ? bottom - d->d2 : 1; + } + else if (c == KEY_PGDN) + { + if (d->d1 < bottom) + d->d1 = bottom; + else + d->d1 += (bottom - d->d2) ? bottom - d->d2 : 1; + } + else + return D_O_K; + + if (sel) + { + if (!(key_shifts & (KB_SHIFT_FLAG | KB_CTRL_FLAG))) + { + for (i = 0; i < listsize; i++) + sel[i] = FALSE; + } + else if (key_shifts & KB_SHIFT_FLAG) + { + for (i = MIN (orig, d->d1); i <= MAX (orig, d->d1); i++) + { + if (key_shifts & KB_CTRL_FLAG) + sel[i] = (i != d->d1); + else + sel[i] = TRUE; + } + } + } + + /* if we changed something, better redraw... */ + my_handle_scrollable_scroll (d, listsize, &d->d1, &d->d2); + d->flags |= D_DIRTY; + return D_USED_CHAR; + } break; } diff -Nru liquidwar-5.6.4/src/alleg2.h liquidwar-5.6.5/src/alleg2.h --- liquidwar-5.6.4/src/alleg2.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/alleg2.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/area.c liquidwar-5.6.5/src/area.c --- liquidwar-5.6.4/src/area.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/area.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -85,7 +85,7 @@ int create_game_area (void) { - int x, y, i, test; + int x, y, i; CURRENT_AREA = malloc_in_big_data_bottom (CURRENT_AREA_W * CURRENT_AREA_H * sizeof (PLACE)); @@ -94,20 +94,19 @@ { i = 0; for (y = 0; y < CURRENT_AREA_H; ++y) - for (x = 0; x < CURRENT_AREA_W; ++x) - { - CURRENT_AREA[i].mesh = NULL; - CURRENT_AREA[i].fighter = NULL; - i++; - } + for (x = 0; x < CURRENT_AREA_W; ++x) + { + CURRENT_AREA[i].mesh = NULL; + CURRENT_AREA[i].fighter = NULL; + i++; + } for (i = 0; i < CURRENT_MESH_SIZE; ++i) - for (y = 0; y < CURRENT_MESH[i].side.size; ++y) - for (x = 0; x < CURRENT_MESH[i].side.size; ++x) - { - CURRENT_AREA[(CURRENT_MESH[i].y + y) * CURRENT_AREA_W - + CURRENT_MESH[i].x + x].mesh = CURRENT_MESH + i; - test = CURRENT_MESH[i].info[0].state.grad; - } + for (y = 0; y < CURRENT_MESH[i].side.size; ++y) + for (x = 0; x < CURRENT_MESH[i].side.size; ++x) + { + CURRENT_AREA[(CURRENT_MESH[i].y + y) * CURRENT_AREA_W + + CURRENT_MESH[i].x + x].mesh = CURRENT_MESH + i; + } } return (CURRENT_AREA ? 0 : -1); diff -Nru liquidwar-5.6.4/src/area.h liquidwar-5.6.5/src/area.h --- liquidwar-5.6.4/src/area.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/area.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/army.c liquidwar-5.6.5/src/army.c --- liquidwar-5.6.4/src/army.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/army.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -162,28 +162,28 @@ while (placed < fighters) { for (x = x_min; x <= x_max && placed < fighters; ++x) - placed += add_fighter - (pos + placed * PLAYING_TEAMS, team, x, y_min, health); + placed += add_fighter + (pos + placed * PLAYING_TEAMS, team, x, y_min, health); if (x_max < CURRENT_AREA_W - 2) - ++x_max; + ++x_max; for (y = y_min; y <= y_max && placed < fighters; ++y) - placed += add_fighter - (pos + placed * PLAYING_TEAMS, team, x_max, y, health); + placed += add_fighter + (pos + placed * PLAYING_TEAMS, team, x_max, y, health); if (y_max < CURRENT_AREA_H - 2) - ++y_max; + ++y_max; for (x = x_max; x >= x_min && placed < fighters; --x) - placed += add_fighter - (pos + placed * PLAYING_TEAMS, team, x, y_max, health); + placed += add_fighter + (pos + placed * PLAYING_TEAMS, team, x, y_max, health); if (x_min > 1) - --x_min; + --x_min; for (y = y_max; y >= y_min && placed < fighters; --y) - placed += add_fighter - (pos + placed * PLAYING_TEAMS, team, x_min, y, health); + placed += add_fighter + (pos + placed * PLAYING_TEAMS, team, x_min, y, health); if (y_min > 1) - --y_min; + --y_min; } } @@ -206,32 +206,32 @@ * or the behavior would not be the same on all the computers. */ for (j = 0; j < NB_TEAMS && n < NB_TEAMS; ++j) - { - for (i = 0; i < NB_TEAMS && n < NB_TEAMS; ++i) - { - if (LW_NETWORK_INFO[i].active && LW_NETWORK_INFO[i].part == j) - { - place_team (LW_NETWORK_INFO[i].part, - LW_NETWORK_INFO[i].server_id); - auto_cursor (i, - LW_NETWORK_INFO[i].server_id, - LW_NETWORK_INFO[i].name); - n++; - } - } - } + { + for (i = 0; i < NB_TEAMS && n < NB_TEAMS; ++i) + { + if (LW_NETWORK_INFO[i].active && LW_NETWORK_INFO[i].part == j) + { + place_team (LW_NETWORK_INFO[i].part, + LW_NETWORK_INFO[i].server_id); + auto_cursor (i, + LW_NETWORK_INFO[i].server_id, + LW_NETWORK_INFO[i].name); + n++; + } + } + } } else { for (i = 0; i < NB_TEAMS && n < NB_TEAMS; ++i) - { - if (CONFIG_CONTROL_TYPE[i] != CONFIG_CONTROL_TYPE_OFF) - { - place_team (i, n); - auto_cursor (i, n, CONFIG_PLAYER_NAME[i]); - n++; - } - } + { + if (CONFIG_CONTROL_TYPE[i] != CONFIG_CONTROL_TYPE_OFF) + { + place_team (i, n); + auto_cursor (i, n, CONFIG_PLAYER_NAME[i]); + n++; + } + } } } @@ -239,22 +239,28 @@ void test_army (void) { - int i, k, test, x, y; + int i, k, x, y; FIGHTER f; - FIGHTER *fp; MESH *m; for (i = 0; i < CURRENT_ARMY_SIZE; ++i) { - test = f.team = CURRENT_ARMY[i].team; + f.team = CURRENT_ARMY[i].team; x = f.x = CURRENT_ARMY[i].x; y = f.y = CURRENT_ARMY[i].y; - test = f.health = CURRENT_ARMY[i].health; + f.health = CURRENT_ARMY[i].health; k = y * CURRENT_AREA_W + x; - fp = CURRENT_AREA[k].fighter; m = CURRENT_AREA[k].mesh; if (m) - test = m->info[0].state.grad; + if (m->info[0].state.grad) + { + /* + * test above does nothing, but at least + * it queries memory, should we have an + * ugly bug, at least it would reveal + * it now rather than show up later. + */ + } } } @@ -271,7 +277,7 @@ }; CURRENT_ARMY_SIZE = (get_battle_room () * - fill_table[LW_CONFIG_CURRENT_RULES.fighter_number]) / + fill_table[LW_CONFIG_CURRENT_RULES.fighter_number]) / 100; CURRENT_ARMY_SIZE /= PLAYING_TEAMS; @@ -283,13 +289,13 @@ (CURRENT_ARMY_SIZE * sizeof (FIGHTER))) != 0) { for (i = 0; i < CURRENT_ARMY_SIZE; ++i) - { - CURRENT_ARMY[i].health = 0; - CURRENT_ARMY[i].team = -1; - CURRENT_ARMY[i].x = 0; - CURRENT_ARMY[i].y = 0; - CURRENT_ARMY[i].last_dir = 0; - } + { + CURRENT_ARMY[i].health = 0; + CURRENT_ARMY[i].team = -1; + CURRENT_ARMY[i].x = 0; + CURRENT_ARMY[i].y = 0; + CURRENT_ARMY[i].last_dir = 0; + } ret = 0; } return ret; diff -Nru liquidwar-5.6.4/src/army.h liquidwar-5.6.5/src/army.h --- liquidwar-5.6.4/src/army.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/army.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/asm.c liquidwar-5.6.5/src/asm.c --- liquidwar-5.6.4/src/asm.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/asm.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -119,14 +119,14 @@ offset_bitmap_line = ((char *) &(bmp->line)) - ((char *) bmp); if (offset_bitmap_line != LW_ASM_OFFSET_BITMAP_LINE) { - result = 0; + result = 0; - log_print_str ("Error: offset for BITMAP->line is "); - log_print_int (offset_bitmap_line); - log_print_str (" and should be "); - log_println_int (LW_ASM_OFFSET_BITMAP_LINE); + log_print_str ("Error: offset for BITMAP->line is "); + log_print_int (offset_bitmap_line); + log_print_str (" and should be "); + log_println_int (LW_ASM_OFFSET_BITMAP_LINE); - STARTUP_ASM = 0; + STARTUP_ASM = 0; } } #endif @@ -135,7 +135,7 @@ { log_println_str ("WARNING!!!"); log_println_str - ("Liquid War might crash unexpectedly... Please read previous error messages."); + ("Liquid War might crash unexpectedly... Please read previous error messages."); log_println (); } diff -Nru liquidwar-5.6.4/src/asm.h liquidwar-5.6.5/src/asm.h --- liquidwar-5.6.4/src/asm.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/asm.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/autoplay.c liquidwar-5.6.5/src/autoplay.c --- liquidwar-5.6.4/src/autoplay.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/autoplay.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -111,54 +111,54 @@ path_mesh = CURRENT_AREA[y * CURRENT_AREA_W + x].mesh; if (path_mesh) - { - COMPUTER_PATH_KEYS[cursor][pos] = 0; - if (dy > 0) - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_UP; - if (dx < 0) - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_RIGHT; - if (dy < 0) - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_DOWN; - if (dx > 0) - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_LEFT; - pos++; - } + { + COMPUTER_PATH_KEYS[cursor][pos] = 0; + if (dy > 0) + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_UP; + if (dx < 0) + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_RIGHT; + if (dy < 0) + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_DOWN; + if (dx > 0) + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_LEFT; + pos++; + } start++; if (start == NB_DIRS) - { - start = 0; - sens = !sens; - } + { + start = 0; + sens = !sens; + } } if (path_mesh == src_mesh) { while (pos < COMPUTER_PATH_MAX && (x != src_x || y != src_y)) - { - COMPUTER_PATH_KEYS[cursor][pos] = 0; + { + COMPUTER_PATH_KEYS[cursor][pos] = 0; - if (y < src_y) - { - y++; - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_UP; - } - if (x > src_x) - { - x--; - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_RIGHT; - } - if (y > src_y) - { - y--; - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_DOWN; - } - if (x < src_x) - { - x++; - COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_LEFT; - } - pos++; - } + if (y < src_y) + { + y++; + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_UP; + } + if (x > src_x) + { + x--; + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_RIGHT; + } + if (y > src_y) + { + y--; + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_DOWN; + } + if (x < src_x) + { + x++; + COMPUTER_PATH_KEYS[cursor][pos] += CURSOR_KEY_LEFT; + } + pos++; + } COMPUTER_PATH_SIZE[cursor] = pos; } else @@ -196,19 +196,19 @@ for (i = 0; i < NB_TEAMS; ++i) { if ((CURRENT_CURSOR[i].control_type == control_type - || control_type == CONFIG_CONTROL_TYPE_OFF) - && CURRENT_CURSOR[i].active) - { - control_type_array[CURRENT_CURSOR[i].team] = control_type; - } + || control_type == CONFIG_CONTROL_TYPE_OFF) + && CURRENT_CURSOR[i].active) + { + control_type_array[CURRENT_CURSOR[i].team] = control_type; + } } for (i = 0; i < CURRENT_ARMY_SIZE && !foundable; ++i) { foundable |= ((CURRENT_ARMY[i].team != team) && - (control_type_array[(int) (CURRENT_ARMY[i].team)] == - control_type - || control_type == CONFIG_CONTROL_TYPE_OFF)); + (control_type_array[(int) (CURRENT_ARMY[i].team)] == + control_type + || control_type == CONFIG_CONTROL_TYPE_OFF)); } if (foundable) @@ -216,13 +216,13 @@ random_limit = 0; while ((!found) && random_limit < LW_AUTOPLAY_RANDOM_LIMIT) - { - i = random () % CURRENT_ARMY_SIZE; - found = ((CURRENT_ARMY[i].team != team) && - (control_type_array[(int) (CURRENT_ARMY[i].team)] == - control_type || control_type == CONFIG_CONTROL_TYPE_OFF)); - random_limit++; - } + { + i = random () % CURRENT_ARMY_SIZE; + found = ((CURRENT_ARMY[i].team != team) && + (control_type_array[(int) (CURRENT_ARMY[i].team)] == + control_type || control_type == CONFIG_CONTROL_TYPE_OFF)); + random_limit++; + } } if (!found) @@ -286,16 +286,16 @@ key_info = 0; team = CURRENT_CURSOR[cursor].team; f = CURRENT_AREA[CURRENT_CURSOR[cursor].y * CURRENT_AREA_W - + CURRENT_CURSOR[cursor].x].fighter; + + CURRENT_CURSOR[cursor].x].fighter; if (f) - meme_equipe = (f->team == team); + meme_equipe = (f->team == team); else - meme_equipe = 1; + meme_equipe = 1; if ((--COMPUTER_PATH_WAIT[cursor]) < 0 || meme_equipe) - { - random_free_xy_different_team (&x, &y, team); - calculate_computer_path (x, y, cursor); - } + { + random_free_xy_different_team (&x, &y, team); + calculate_computer_path (x, y, cursor); + } } return key_info; diff -Nru liquidwar-5.6.4/src/autoplay.h liquidwar-5.6.5/src/autoplay.h --- liquidwar-5.6.4/src/autoplay.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/autoplay.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/back.c liquidwar-5.6.5/src/back.c --- liquidwar-5.6.4/src/back.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/back.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -74,7 +74,7 @@ { scare_mouse (); stretch_blit (bmp, screen, 0, 0, bmp->w, bmp->h, - 0, PAGE_FLIP_H, SCREEN_W, SCREEN_H); + 0, PAGE_FLIP_H, SCREEN_W, SCREEN_H); unscare_mouse (); } diff -Nru liquidwar-5.6.4/src/back.h liquidwar-5.6.5/src/back.h --- liquidwar-5.6.4/src/back.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/back.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/base.h liquidwar-5.6.5/src/base.h --- liquidwar-5.6.4/src/base.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/base.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -75,7 +75,7 @@ #define DIR_NNW 11 #define LW_PROGRAM "liquidwar" -#define LW_VERSION "5.6.4" +#define LW_VERSION "5.6.5" #define NAME_SIZE 10 #define PASSWORD_SIZE 20 diff -Nru liquidwar-5.6.4/src/base.h.in liquidwar-5.6.5/src/base.h.in --- liquidwar-5.6.4/src/base.h.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/base.h.in 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/basicopt.c liquidwar-5.6.5/src/basicopt.c --- liquidwar-5.6.4/src/basicopt.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/basicopt.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -94,7 +94,7 @@ lw_basicopt_legal_info (name); log_println (); log_println_str - ("Documentation is available in HTML, ascii text, PostScript, PDF... Read it 8-)"); + ("Documentation is available in HTML, ascii text, PostScript, PDF... Read it 8-)"); } /* @@ -124,7 +124,7 @@ log_println_str (name); log_println (); log_println_str ("v" LW_VERSION " compiled on " __DATE__ " at " __TIME__); - log_println_str ("Copyright (C) 1998-2007 Christian Mauduit"); + log_println_str ("Copyright (C) 1998-2018 Christian Mauduit"); log_println (); log_println_str ("This program is free software; you can redistribute it and/or modify"); @@ -151,6 +151,6 @@ log_println_str ("Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"); log_println (); - log_println_str ("Liquid War homepage : http://www.ufoot.org/liquidwar/v5"); + log_println_str ("Liquid War homepage : https://ufoot.org/liquidwar/v5"); log_println_str ("Contact author : ufoot@ufoot.org"); } diff -Nru liquidwar-5.6.4/src/basicopt.h liquidwar-5.6.5/src/basicopt.h --- liquidwar-5.6.4/src/basicopt.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/basicopt.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/bigdata.c liquidwar-5.6.5/src/bigdata.c --- liquidwar-5.6.4/src/bigdata.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/bigdata.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -119,7 +119,7 @@ STARTUP_BIG_DATA++; while (STARTUP_BIG_DATA >= 2 && - BIG_DATA_PTR == NULL && (STARTUP_AUTO || nb_try == 0)) + BIG_DATA_PTR == NULL && (STARTUP_AUTO || nb_try == 0)) { nb_try++; STARTUP_BIG_DATA--; diff -Nru liquidwar-5.6.4/src/bigdata.h liquidwar-5.6.5/src/bigdata.h --- liquidwar-5.6.4/src/bigdata.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/bigdata.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/capture.c liquidwar-5.6.5/src/capture.c --- liquidwar-5.6.4/src/capture.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/capture.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -113,7 +113,6 @@ { int result = 1; static int last_dump_time = 0; - int dummy; /* * We don't dump stuff if the last dump is too recent. @@ -129,9 +128,9 @@ * We do nothing if we're not in capture mode */ if (LW_CAPTURE_MODE) - { - lw_capture_dump_game (); - } + { + lw_capture_dump_game (); + } } /* @@ -141,14 +140,14 @@ if (key[KEY_F9]) { while (key[KEY_F9]) - { - /* - * Force a all to poll_keyboard if needed - */ - dummy = keypressed (); + { + /* + * Force a all to poll_keyboard if needed + */ + keypressed (); - rest (10); - } + rest (10); + } LW_CAPTURE_MODE = !LW_CAPTURE_MODE; } @@ -176,7 +175,7 @@ * Prepare a nice filename */ LW_MACRO_SPRINTF1 (buffer, LW_CAPTURE_FILENAME_FORMAT_STRING, - frame_number++); + frame_number++); /* * Log on the console @@ -189,20 +188,20 @@ * Create a sub-bitmap with the right size */ screenshot = - create_sub_bitmap (screen, 0, PAGE_FLIP_H, SCREEN_W, SCREEN_H); + create_sub_bitmap (screen, 0, PAGE_FLIP_H, SCREEN_W, SCREEN_H); if (screenshot) - { - /* - * Write to disk - */ - result = !save_bitmap (buffer, screenshot, GLOBAL_PALETTE); - destroy_bitmap (screenshot); - } + { + /* + * Write to disk + */ + result = !save_bitmap (buffer, screenshot, GLOBAL_PALETTE); + destroy_bitmap (screenshot); + } else - { - result = 0; - } + { + result = 0; + } display_success (result); } diff -Nru liquidwar-5.6.4/src/capture.h liquidwar-5.6.5/src/capture.h --- liquidwar-5.6.4/src/capture.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/capture.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/chat.c liquidwar-5.6.5/src/chat.c --- liquidwar-5.6.4/src/chat.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/chat.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -91,7 +91,7 @@ strncpy (history->messages[history->n].author, author, NAME_SIZE); history->messages[history->n].author[NAME_SIZE] = '\0'; strncpy (history->messages[history->n].content, content, - LW_CHAT_MESSAGE_SIZE); + LW_CHAT_MESSAGE_SIZE); history->messages[history->n].content[LW_CHAT_MESSAGE_SIZE] = '\0'; history->n++; @@ -114,10 +114,10 @@ memcpy (message, &(history->messages[0]), sizeof (LW_CHAT_MESSAGE)); for (i = 1; i < history->n; ++i) - { - memcpy (&(history->messages[i - 1]), - &(history->messages[i]), sizeof (LW_CHAT_MESSAGE)); - } + { + memcpy (&(history->messages[i - 1]), + &(history->messages[i]), sizeof (LW_CHAT_MESSAGE)); + } history->n--; diff -Nru liquidwar-5.6.4/src/chat.h liquidwar-5.6.5/src/chat.h --- liquidwar-5.6.4/src/chat.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/chat.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/checksum.c liquidwar-5.6.5/src/checksum.c --- liquidwar-5.6.4/src/checksum.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/checksum.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -96,23 +96,23 @@ if (!(GLOBAL_CLOCK % LW_CHECKSUM_PERIOD)) { for (i = 0; i < army_size; ++i) - { - f = army + i; + { + f = army + i; - value = (0xFF & - (((unsigned int) f->x) + - ((unsigned int) f->y) + - ((unsigned int) f->health) + - ((unsigned int) f->team) + ((unsigned int) f->last_dir))); - - /* - * Got this algorithm in old notes I had taken long time - * ago when I was at school. - */ - cipher = (value ^ (rval >> 8)); - rval = (cipher + rval) * cst1 + cst2; - checksum += cipher; - } + value = (0xFF & + (((unsigned int) f->x) + + ((unsigned int) f->y) + + ((unsigned int) f->health) + + ((unsigned int) f->team) + ((unsigned int) f->last_dir))); + + /* + * Got this algorithm in old notes I had taken long time + * ago when I was at school. + */ + cipher = (value ^ (rval >> 8)); + rval = (cipher + rval) * cst1 + cst2; + checksum += cipher; + } } return checksum; diff -Nru liquidwar-5.6.4/src/checksum.h liquidwar-5.6.5/src/checksum.h --- liquidwar-5.6.4/src/checksum.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/checksum.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/code.c liquidwar-5.6.5/src/code.c --- liquidwar-5.6.4/src/code.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/code.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -95,18 +95,18 @@ { global = get_profile (GLOBAL_PROFILE); if (global <=0) - global = 1; + global = 1; message_str_int (lw_lang_string (LW_LANG_STRING_CODE_FPS), - 1000 / global); + 1000 / global); } if (WATCHDOG_SCANCODE[KEY_F6]) { global = get_logic_rate (); if (global <=0) - global = 1; + global = 1; message_str_int (lw_lang_string (LW_LANG_STRING_CODE_RPS), - 1000 / global); + 1000 / global); } if (WATCHDOG_SCANCODE[KEY_F7]) @@ -115,9 +115,9 @@ spread = get_profile (SPREAD_PROFILE); move = get_profile (MOVE_PROFILE); if (global <=0) - global = 1; + global = 1; message_str_int (lw_lang_string (LW_LANG_STRING_CODE_PERCENTCALC), - (100 * (spread + move)) / global); + (100 * (spread + move)) / global); } if (WATCHDOG_SCANCODE[KEY_F8]) @@ -126,9 +126,9 @@ disp = get_profile (DISP_PROFILE); flip = get_profile (FLIP_PROFILE); if (global <=0) - global = 1; + global = 1; message_str_int (lw_lang_string (LW_LANG_STRING_CODE_PERCENTDISPLAY), - (100 * (disp + flip)) / global); + (100 * (disp + flip)) / global); } if (watchdog_is_keyword (LW_CODE_KEYWORD_SPEED)) @@ -140,16 +140,16 @@ flip = get_profile (FLIP_PROFILE); message_str_int (lw_lang_string (LW_LANG_STRING_CODE_SPREADGRADTIME), - spread); + spread); message_str_int (lw_lang_string (LW_LANG_STRING_CODE_MOVEARMYTIME), - move); + move); message_str_int (lw_lang_string (LW_LANG_STRING_CODE_DISPLAYTIME), - disp); + disp); message_str_int (lw_lang_string (LW_LANG_STRING_CODE_FLIPTIME), flip); message_str_int (lw_lang_string (LW_LANG_STRING_CODE_OTHERCALCTIME), - global -spread - move - disp - flip); + global -spread - move - disp - flip); message_str_int (lw_lang_string (LW_LANG_STRING_CODE_GLOBALTIME), - global); + global); } } @@ -166,7 +166,7 @@ { grad_codes[4] = '0' + i; if (watchdog_is_keyword (grad_codes)) - GRAD_TO_DISP = i; + GRAD_TO_DISP = i; } if (GRAD_TO_DISP > 0 && GRAD_TO_DISP <= 6 && GRAD_TO_DISP > PLAYING_TEAMS) GRAD_TO_DISP = 0; @@ -175,32 +175,32 @@ switch (GRAD_TO_DISP) { case 0: - message_str (lw_lang_string (LW_LANG_STRING_CODE_STANDARDDISPLAY)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_STANDARDDISPLAY)); + break; case 1: - message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT1)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT1)); + break; case 2: - message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT2)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT2)); + break; case 3: - message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT3)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT3)); + break; case 4: - message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT4)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT4)); + break; case 5: - message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT5)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT5)); + break; case 6: - message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT6)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_GRADIENT6)); + break; case 7: - message_str (lw_lang_string (LW_LANG_STRING_CODE_MESHSIZE)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_MESHSIZE)); + break; case 8: - message_str (lw_lang_string (LW_LANG_STRING_CODE_MESHSTRUCTURE)); - break; + message_str (lw_lang_string (LW_LANG_STRING_CODE_MESHSTRUCTURE)); + break; } } @@ -214,41 +214,41 @@ if (WATCHDOG_SCANCODE[KEY_F3] && !LW_NETWORK_ON) { if (PAUSE_ON) - { - PAUSE_ON = 0; - message_str (lw_lang_string (LW_LANG_STRING_CODE_PAUSEOFF)); - } + { + PAUSE_ON = 0; + message_str (lw_lang_string (LW_LANG_STRING_CODE_PAUSEOFF)); + } else - { - PAUSE_ON = 1; - message_str (lw_lang_string (LW_LANG_STRING_CODE_PAUSEON)); - } + { + PAUSE_ON = 1; + message_str (lw_lang_string (LW_LANG_STRING_CODE_PAUSEON)); + } } if (WATCHDOG_SCANCODE[KEY_F4]) { if (CONFIG_WAVE_ON) - { - CONFIG_WAVE_ON = 0; - message_str (lw_lang_string (LW_LANG_STRING_CODE_WAVEEFFECTSOFF)); - } + { + CONFIG_WAVE_ON = 0; + message_str (lw_lang_string (LW_LANG_STRING_CODE_WAVEEFFECTSOFF)); + } else - { - CONFIG_WAVE_ON = 1; - message_str (lw_lang_string (LW_LANG_STRING_CODE_WAVEEFFECTSON)); - } + { + CONFIG_WAVE_ON = 1; + message_str (lw_lang_string (LW_LANG_STRING_CODE_WAVEEFFECTSON)); + } } if (WATCHDOG_SCANCODE[KEY_F9]) { if (lw_capture_get_mode ()) - { - lw_capture_set_mode (0); - message_str (lw_lang_string (LW_LANG_STRING_CODE_CAPTUREOFF)); - } + { + lw_capture_set_mode (0); + message_str (lw_lang_string (LW_LANG_STRING_CODE_CAPTUREOFF)); + } else - { - lw_capture_set_mode (1); - message_str (lw_lang_string (LW_LANG_STRING_CODE_CAPTUREON)); - } + { + lw_capture_set_mode (1); + message_str (lw_lang_string (LW_LANG_STRING_CODE_CAPTUREON)); + } } } diff -Nru liquidwar-5.6.4/src/code.h liquidwar-5.6.5/src/code.h --- liquidwar-5.6.4/src/code.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/code.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/config.c liquidwar-5.6.5/src/config.c --- liquidwar-5.6.4/src/config.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/config.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -121,6 +121,8 @@ #define LABEL_MIN_MAP_RES "MIN_MAP_RES" #define LABEL_USE_DEFAULT_TEXTURE "USE_DEFAULT_TEXTURE" #define LABEL_ALLOW_NETWORK_BOTS "ALLOW_NETWORK_BOTS" +#define LABEL_LW6_ADVERTISING_SKIP "LW6_ADVERTISING_SKIP" +#define LABEL_LW6_ADVERTISING_DONE "LW6_ADVERTISING_DONE" int CONFIG_GFX_GAME; int CONFIG_GFX_MENU; @@ -169,6 +171,8 @@ int CONFIG_MIN_MAP_RES; int CONFIG_USE_DEFAULT_TEXTURE; int CONFIG_ALLOW_NETWORK_BOTS; +int CONFIG_LW6_ADVERTISING_SKIP; +int CONFIG_LW6_ADVERTISING_DONE; LW_NETCONF LW_CONFIG_CURRENT_RULES; @@ -179,6 +183,7 @@ int DISPLAY_DELAY_MIN[9] = { 0, 10, 15, 20, 25, 33, 40, 55, 100 }; + int LOGIC_DELAY_MIN[9] = { 0, 1, 2, 5, 10, 15, 20, 33, 50 }; @@ -290,15 +295,13 @@ CONFIG_JOYSTICK_ON = 1; CONFIG_PAGE_FLIP = 0; CONFIG_LANGUAGE = LW_LANG_LANGUAGE_AUTO; -#ifdef ASM /* - * We activate waves only if assembly code is available, - * else it's not a good idea for it's too slow. + * Previous versions used to have waves disabled on behalf + * of performance, with today computers being 100 times faster + * than primitive stuff that ran LW in the first place, one + * might admit this is on by default. Looks better. */ - CONFIG_WAVE_ON = STARTUP_ASM ? 1 : 0; -#else - CONFIG_WAVE_ON = 0; -#endif + CONFIG_WAVE_ON = 1; CONFIG_FRAMES_PER_SEC_LIMIT = 6; CONFIG_ROUNDS_PER_SEC_LIMIT = 4; @@ -310,6 +313,15 @@ CONFIG_USE_DEFAULT_TEXTURE = 1; + /* + * TBH I'm really questionning myself wether I should advertise + * for LW6 at this stage. Given the fact, very likely, if I push + * something strong, it might be called Liquid War 7. Even numbers + * are cursed in the LW series. + */ + CONFIG_LW6_ADVERTISING_SKIP = 1; + CONFIG_LW6_ADVERTISING_DONE = 0; + load_default_rules (); } @@ -344,150 +356,156 @@ if (get_config_int (LABEL_MAIN, LABEL_DUMMY, 0) == DUMMY_VALUE) { CONFIG_GFX_GAME = - get_config_int (LABEL_MAIN, LABEL_GFX_GAME, CONFIG_GFX_GAME); + get_config_int (LABEL_MAIN, LABEL_GFX_GAME, CONFIG_GFX_GAME); CONFIG_GFX_MENU = - get_config_int (LABEL_MAIN, LABEL_GFX_MENU, CONFIG_GFX_MENU); + get_config_int (LABEL_MAIN, LABEL_GFX_MENU, CONFIG_GFX_MENU); CONFIG_FULLSCREEN = - get_config_int (LABEL_MAIN, LABEL_FULLSCREEN, CONFIG_FULLSCREEN); + get_config_int (LABEL_MAIN, LABEL_FULLSCREEN, CONFIG_FULLSCREEN); CONFIG_VIEWPORT_SIZE = - get_config_int (LABEL_MAIN, LABEL_VIEWPORT_SIZE, - CONFIG_VIEWPORT_SIZE); + get_config_int (LABEL_MAIN, LABEL_VIEWPORT_SIZE, + CONFIG_VIEWPORT_SIZE); for (i = 0; i < 4; ++i) - { - number_string[0] = '0' + i; + { + number_string[0] = '0' + i; - CONFIG_WAVE_NUMBER[i] = - get_config_int (LABEL_WAVE_NUMBER, number_string, - CONFIG_WAVE_NUMBER[i]); - CONFIG_WAVE_AMPLI[i] = - get_config_int (LABEL_WAVE_AMPLI, number_string, - CONFIG_WAVE_AMPLI[i]); - CONFIG_WAVE_SPEED[i] = - get_config_int (LABEL_WAVE_SPEED, number_string, - CONFIG_WAVE_SPEED[i]); - } + CONFIG_WAVE_NUMBER[i] = + get_config_int (LABEL_WAVE_NUMBER, number_string, + CONFIG_WAVE_NUMBER[i]); + CONFIG_WAVE_AMPLI[i] = + get_config_int (LABEL_WAVE_AMPLI, number_string, + CONFIG_WAVE_AMPLI[i]); + CONFIG_WAVE_SPEED[i] = + get_config_int (LABEL_WAVE_SPEED, number_string, + CONFIG_WAVE_SPEED[i]); + } CONFIG_BRIGHTNESS = - get_config_int (LABEL_MAIN, LABEL_BRIGHTNESS, CONFIG_BRIGHTNESS); + get_config_int (LABEL_MAIN, LABEL_BRIGHTNESS, CONFIG_BRIGHTNESS); CONFIG_CURSOR_INCREASE_SPEED = - get_config_int (LABEL_MAIN, LABEL_CURSOR_INCREASE_SPEED, - CONFIG_CURSOR_INCREASE_SPEED); + get_config_int (LABEL_MAIN, LABEL_CURSOR_INCREASE_SPEED, + CONFIG_CURSOR_INCREASE_SPEED); CONFIG_FIGHTER_ATTACK = - get_config_int (LABEL_MAIN, LABEL_FIGHTER_ATTACK, - CONFIG_FIGHTER_ATTACK); + get_config_int (LABEL_MAIN, LABEL_FIGHTER_ATTACK, + CONFIG_FIGHTER_ATTACK); CONFIG_FIGHTER_DEFENSE = - get_config_int (LABEL_MAIN, LABEL_FIGHTER_DEFENSE, - CONFIG_FIGHTER_DEFENSE); + get_config_int (LABEL_MAIN, LABEL_FIGHTER_DEFENSE, + CONFIG_FIGHTER_DEFENSE); CONFIG_FIGHTER_NEW_HEALTH = - get_config_int (LABEL_MAIN, LABEL_FIGHTER_NEW_HEALTH, - CONFIG_FIGHTER_NEW_HEALTH); + get_config_int (LABEL_MAIN, LABEL_FIGHTER_NEW_HEALTH, + CONFIG_FIGHTER_NEW_HEALTH); CONFIG_NUMBER_INFLUENCE = - get_config_int (LABEL_MAIN, LABEL_NUMBER_INFLUENCE, - CONFIG_NUMBER_INFLUENCE); + get_config_int (LABEL_MAIN, LABEL_NUMBER_INFLUENCE, + CONFIG_NUMBER_INFLUENCE); CONFIG_SFX_VOLUME = - get_config_int (LABEL_MAIN, LABEL_SFX_VOLUME, CONFIG_SFX_VOLUME); + get_config_int (LABEL_MAIN, LABEL_SFX_VOLUME, CONFIG_SFX_VOLUME); CONFIG_CLICK_VOLUME = - get_config_int (LABEL_MAIN, LABEL_CLICK_VOLUME, CONFIG_CLICK_VOLUME); + get_config_int (LABEL_MAIN, LABEL_CLICK_VOLUME, CONFIG_CLICK_VOLUME); CONFIG_WATER_VOLUME_MENU = - get_config_int (LABEL_MAIN, LABEL_WATER_VOLUME_MENU, - CONFIG_WATER_VOLUME_MENU); + get_config_int (LABEL_MAIN, LABEL_WATER_VOLUME_MENU, + CONFIG_WATER_VOLUME_MENU); CONFIG_WATER_VOLUME_GAME = - get_config_int (LABEL_MAIN, LABEL_WATER_VOLUME_GAME, - CONFIG_WATER_VOLUME_GAME); + get_config_int (LABEL_MAIN, LABEL_WATER_VOLUME_GAME, + CONFIG_WATER_VOLUME_GAME); CONFIG_MUSIC_VOLUME = - get_config_int (LABEL_MAIN, LABEL_MUSIC_VOLUME, CONFIG_MUSIC_VOLUME); + get_config_int (LABEL_MAIN, LABEL_MUSIC_VOLUME, CONFIG_MUSIC_VOLUME); CONFIG_LEVEL_MAP = - get_config_int (LABEL_MAIN, LABEL_LEVEL_MAP, CONFIG_LEVEL_MAP); + get_config_int (LABEL_MAIN, LABEL_LEVEL_MAP, CONFIG_LEVEL_MAP); CONFIG_LEVEL_FG = - get_config_int (LABEL_MAIN, LABEL_LEVEL_FG, CONFIG_LEVEL_FG); + get_config_int (LABEL_MAIN, LABEL_LEVEL_FG, CONFIG_LEVEL_FG); CONFIG_LEVEL_BG = - get_config_int (LABEL_MAIN, LABEL_LEVEL_BG, CONFIG_LEVEL_BG); + get_config_int (LABEL_MAIN, LABEL_LEVEL_BG, CONFIG_LEVEL_BG); CONFIG_FIGHTER_NUMBER = - get_config_int (LABEL_MAIN, LABEL_FIGHTER_NUMBER, - CONFIG_FIGHTER_NUMBER); + get_config_int (LABEL_MAIN, LABEL_FIGHTER_NUMBER, + CONFIG_FIGHTER_NUMBER); for (i = 0; i < 6; ++i) - { - number_string[0] = '0' + i; + { + number_string[0] = '0' + i; - CONFIG_KEY_UP[i] = - get_config_int (LABEL_KEY_UP, number_string, CONFIG_KEY_UP[i]); - CONFIG_KEY_LEFT[i] = - get_config_int (LABEL_KEY_LEFT, number_string, - CONFIG_KEY_LEFT[i]); - CONFIG_KEY_DOWN[i] = - get_config_int (LABEL_KEY_DOWN, number_string, - CONFIG_KEY_DOWN[i]); - CONFIG_KEY_RIGHT[i] = - get_config_int (LABEL_KEY_RIGHT, number_string, - CONFIG_KEY_RIGHT[i]); - CONFIG_TEAM_COLOR[i] = - get_config_int (LABEL_TEAM_COLOR, number_string, - CONFIG_TEAM_COLOR[i]); - CONFIG_CONTROL_TYPE[i] = - get_config_int (LABEL_CONTROL_TYPE, number_string, - CONFIG_CONTROL_TYPE[i]); - strncpy (CONFIG_PLAYER_NAME[i], - get_config_string (LABEL_PLAYER_NAME, number_string, - CONFIG_PLAYER_NAME[i]), NAME_SIZE); - CONFIG_PLAYER_NAME[i][NAME_SIZE] = '\0'; - } + CONFIG_KEY_UP[i] = + get_config_int (LABEL_KEY_UP, number_string, CONFIG_KEY_UP[i]); + CONFIG_KEY_LEFT[i] = + get_config_int (LABEL_KEY_LEFT, number_string, + CONFIG_KEY_LEFT[i]); + CONFIG_KEY_DOWN[i] = + get_config_int (LABEL_KEY_DOWN, number_string, + CONFIG_KEY_DOWN[i]); + CONFIG_KEY_RIGHT[i] = + get_config_int (LABEL_KEY_RIGHT, number_string, + CONFIG_KEY_RIGHT[i]); + CONFIG_TEAM_COLOR[i] = + get_config_int (LABEL_TEAM_COLOR, number_string, + CONFIG_TEAM_COLOR[i]); + CONFIG_CONTROL_TYPE[i] = + get_config_int (LABEL_CONTROL_TYPE, number_string, + CONFIG_CONTROL_TYPE[i]); + strncpy (CONFIG_PLAYER_NAME[i], + get_config_string (LABEL_PLAYER_NAME, number_string, + CONFIG_PLAYER_NAME[i]), NAME_SIZE); + CONFIG_PLAYER_NAME[i][NAME_SIZE] = '\0'; + } CONFIG_GAME_TIME = - get_config_int (LABEL_MAIN, LABEL_GAME_TIME, CONFIG_GAME_TIME); + get_config_int (LABEL_MAIN, LABEL_GAME_TIME, CONFIG_GAME_TIME); CONFIG_INFO_BAR = - get_config_int (LABEL_MAIN, LABEL_INFO_BAR, CONFIG_INFO_BAR); + get_config_int (LABEL_MAIN, LABEL_INFO_BAR, CONFIG_INFO_BAR); CONFIG_MOUSE_GAP = - get_config_int (LABEL_MAIN, LABEL_MOUSE_GAP, CONFIG_MOUSE_GAP); + get_config_int (LABEL_MAIN, LABEL_MOUSE_GAP, CONFIG_MOUSE_GAP); CONFIG_JOYSTICK_ON = - get_config_int (LABEL_MAIN, LABEL_JOYSTICK_ON, CONFIG_JOYSTICK_ON); + get_config_int (LABEL_MAIN, LABEL_JOYSTICK_ON, CONFIG_JOYSTICK_ON); CONFIG_CPU_ADVANTAGE = - get_config_int (LABEL_MAIN, LABEL_CPU_ADVANTAGE, - CONFIG_CPU_ADVANTAGE); + get_config_int (LABEL_MAIN, LABEL_CPU_ADVANTAGE, + CONFIG_CPU_ADVANTAGE); CONFIG_CPU_VS_HUMAN = - get_config_int (LABEL_MAIN, LABEL_CPU_VS_HUMAN, CONFIG_CPU_VS_HUMAN); + get_config_int (LABEL_MAIN, LABEL_CPU_VS_HUMAN, CONFIG_CPU_VS_HUMAN); CONFIG_PAGE_FLIP = - get_config_int (LABEL_MAIN, LABEL_PAGE_FLIP, CONFIG_PAGE_FLIP); + get_config_int (LABEL_MAIN, LABEL_PAGE_FLIP, CONFIG_PAGE_FLIP); CONFIG_LANGUAGE = - get_config_int (LABEL_MAIN, LABEL_LANGUAGE, CONFIG_LANGUAGE); + get_config_int (LABEL_MAIN, LABEL_LANGUAGE, CONFIG_LANGUAGE); CONFIG_WAVE_ON = - get_config_int (LABEL_MAIN, LABEL_WAVE_ON, CONFIG_WAVE_ON); + get_config_int (LABEL_MAIN, LABEL_WAVE_ON, CONFIG_WAVE_ON); CONFIG_FRAMES_PER_SEC_LIMIT = - get_config_int (LABEL_MAIN, LABEL_FRAMES_PER_SEC_LIMIT, - CONFIG_FRAMES_PER_SEC_LIMIT); + get_config_int (LABEL_MAIN, LABEL_FRAMES_PER_SEC_LIMIT, + CONFIG_FRAMES_PER_SEC_LIMIT); CONFIG_ROUNDS_PER_SEC_LIMIT = - get_config_int (LABEL_MAIN, LABEL_ROUNDS_PER_SEC_LIMIT, - CONFIG_ROUNDS_PER_SEC_LIMIT); + get_config_int (LABEL_MAIN, LABEL_ROUNDS_PER_SEC_LIMIT, + CONFIG_ROUNDS_PER_SEC_LIMIT); strncpy (CONFIG_SERVER_ADDRESS, - get_config_string (LABEL_MAIN, LABEL_SERVER_ADDRESS, - CONFIG_SERVER_ADDRESS), - sizeof (CONFIG_SERVER_ADDRESS)); + get_config_string (LABEL_MAIN, LABEL_SERVER_ADDRESS, + CONFIG_SERVER_ADDRESS), + sizeof (CONFIG_SERVER_ADDRESS)); CONFIG_SERVER_ADDRESS[sizeof (CONFIG_SERVER_ADDRESS) - 1] = '\0'; CONFIG_SERVER_PORT = - get_config_int (LABEL_MAIN, LABEL_SERVER_PORT, CONFIG_SERVER_PORT); + get_config_int (LABEL_MAIN, LABEL_SERVER_PORT, CONFIG_SERVER_PORT); CONFIG_ASM_ALGORITHM = - get_config_int (LABEL_MAIN, LABEL_ASM_ALGORITHM, - CONFIG_ASM_ALGORITHM); + get_config_int (LABEL_MAIN, LABEL_ASM_ALGORITHM, + CONFIG_ASM_ALGORITHM); strncpy (CONFIG_PASSWORD, - get_config_string (LABEL_MAIN, LABEL_PASSWORD, - CONFIG_PASSWORD), sizeof (CONFIG_PASSWORD)); + get_config_string (LABEL_MAIN, LABEL_PASSWORD, + CONFIG_PASSWORD), sizeof (CONFIG_PASSWORD)); CONFIG_PASSWORD[sizeof (CONFIG_PASSWORD) - 1] = '\0'; CONFIG_MIN_MAP_RES = - get_config_int (LABEL_MAIN, LABEL_MIN_MAP_RES, CONFIG_MIN_MAP_RES); + get_config_int (LABEL_MAIN, LABEL_MIN_MAP_RES, CONFIG_MIN_MAP_RES); CONFIG_USE_DEFAULT_TEXTURE = - get_config_int (LABEL_MAIN, LABEL_USE_DEFAULT_TEXTURE, - CONFIG_USE_DEFAULT_TEXTURE); + get_config_int (LABEL_MAIN, LABEL_USE_DEFAULT_TEXTURE, + CONFIG_USE_DEFAULT_TEXTURE); CONFIG_ALLOW_NETWORK_BOTS = - get_config_int (LABEL_MAIN, LABEL_ALLOW_NETWORK_BOTS, - CONFIG_ALLOW_NETWORK_BOTS); + get_config_int (LABEL_MAIN, LABEL_ALLOW_NETWORK_BOTS, + CONFIG_ALLOW_NETWORK_BOTS); + CONFIG_LW6_ADVERTISING_SKIP = + get_config_int (LABEL_MAIN, LABEL_LW6_ADVERTISING_SKIP, + CONFIG_LW6_ADVERTISING_SKIP); + CONFIG_LW6_ADVERTISING_DONE = + get_config_int (LABEL_MAIN, LABEL_LW6_ADVERTISING_DONE, + CONFIG_LW6_ADVERTISING_DONE); return 1; } @@ -534,26 +552,26 @@ number_string[0] = '0' + i; set_config_int (LABEL_WAVE_NUMBER, number_string, - CONFIG_WAVE_NUMBER[i]); + CONFIG_WAVE_NUMBER[i]); set_config_int (LABEL_WAVE_AMPLI, number_string, CONFIG_WAVE_AMPLI[i]); set_config_int (LABEL_WAVE_SPEED, number_string, CONFIG_WAVE_SPEED[i]); } set_config_int (LABEL_MAIN, LABEL_BRIGHTNESS, CONFIG_BRIGHTNESS); set_config_int (LABEL_MAIN, LABEL_CURSOR_INCREASE_SPEED, - CONFIG_CURSOR_INCREASE_SPEED); + CONFIG_CURSOR_INCREASE_SPEED); set_config_int (LABEL_MAIN, LABEL_FIGHTER_ATTACK, CONFIG_FIGHTER_ATTACK); set_config_int (LABEL_MAIN, LABEL_FIGHTER_DEFENSE, CONFIG_FIGHTER_DEFENSE); set_config_int (LABEL_MAIN, LABEL_FIGHTER_NEW_HEALTH, - CONFIG_FIGHTER_NEW_HEALTH); + CONFIG_FIGHTER_NEW_HEALTH); set_config_int (LABEL_MAIN, LABEL_NUMBER_INFLUENCE, - CONFIG_NUMBER_INFLUENCE); + CONFIG_NUMBER_INFLUENCE); set_config_int (LABEL_MAIN, LABEL_SFX_VOLUME, CONFIG_SFX_VOLUME); set_config_int (LABEL_MAIN, LABEL_CLICK_VOLUME, CONFIG_CLICK_VOLUME); set_config_int (LABEL_MAIN, LABEL_WATER_VOLUME_MENU, - CONFIG_WATER_VOLUME_MENU); + CONFIG_WATER_VOLUME_MENU); set_config_int (LABEL_MAIN, LABEL_WATER_VOLUME_GAME, - CONFIG_WATER_VOLUME_GAME); + CONFIG_WATER_VOLUME_GAME); set_config_int (LABEL_MAIN, LABEL_MUSIC_VOLUME, CONFIG_MUSIC_VOLUME); set_config_int (LABEL_MAIN, LABEL_LEVEL_MAP, CONFIG_LEVEL_MAP); @@ -572,9 +590,9 @@ set_config_int (LABEL_KEY_RIGHT, number_string, CONFIG_KEY_RIGHT[i]); set_config_int (LABEL_TEAM_COLOR, number_string, CONFIG_TEAM_COLOR[i]); set_config_int (LABEL_CONTROL_TYPE, number_string, - CONFIG_CONTROL_TYPE[i]); + CONFIG_CONTROL_TYPE[i]); set_config_string (LABEL_PLAYER_NAME, number_string, - CONFIG_PLAYER_NAME[i]); + CONFIG_PLAYER_NAME[i]); } set_config_int (LABEL_MAIN, LABEL_GAME_TIME, CONFIG_GAME_TIME); @@ -588,9 +606,9 @@ set_config_int (LABEL_MAIN, LABEL_WAVE_ON, CONFIG_WAVE_ON); set_config_int (LABEL_MAIN, LABEL_FRAMES_PER_SEC_LIMIT, - CONFIG_FRAMES_PER_SEC_LIMIT); + CONFIG_FRAMES_PER_SEC_LIMIT); set_config_int (LABEL_MAIN, LABEL_ROUNDS_PER_SEC_LIMIT, - CONFIG_ROUNDS_PER_SEC_LIMIT); + CONFIG_ROUNDS_PER_SEC_LIMIT); set_config_string (LABEL_MAIN, LABEL_SERVER_ADDRESS, CONFIG_SERVER_ADDRESS); set_config_int (LABEL_MAIN, LABEL_SERVER_PORT, CONFIG_SERVER_PORT); @@ -601,9 +619,13 @@ set_config_int (LABEL_MAIN, LABEL_MIN_MAP_RES, CONFIG_MIN_MAP_RES); set_config_int (LABEL_MAIN, LABEL_USE_DEFAULT_TEXTURE, - CONFIG_USE_DEFAULT_TEXTURE); + CONFIG_USE_DEFAULT_TEXTURE); set_config_int (LABEL_MAIN, LABEL_ALLOW_NETWORK_BOTS, - CONFIG_ALLOW_NETWORK_BOTS); + CONFIG_ALLOW_NETWORK_BOTS); + set_config_int (LABEL_MAIN, LABEL_LW6_ADVERTISING_SKIP, + CONFIG_LW6_ADVERTISING_SKIP); + set_config_int (LABEL_MAIN, LABEL_LW6_ADVERTISING_DONE, + CONFIG_LW6_ADVERTISING_DONE); return 0; } diff -Nru liquidwar-5.6.4/src/config.h liquidwar-5.6.5/src/config.h --- liquidwar-5.6.4/src/config.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/config.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -115,6 +115,8 @@ extern int CONFIG_MIN_MAP_RES; extern int CONFIG_USE_DEFAULT_TEXTURE; extern int CONFIG_ALLOW_NETWORK_BOTS; +extern int CONFIG_LW6_ADVERTISING_SKIP; +extern int CONFIG_LW6_ADVERTISING_DONE; #define CONFIG_CONTROL_TYPE_OFF 0 #define CONFIG_CONTROL_TYPE_HUMAN 1 diff -Nru liquidwar-5.6.4/src/connect.c liquidwar-5.6.5/src/connect.c --- liquidwar-5.6.4/src/connect.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/connect.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -113,10 +113,10 @@ static void connect_on_server_keepalive (void *args); static int update_connect_menu (DIALOG * d, - int waited_teams, - LW_TEAMSTARTINFO * team_start_info, - LW_CHAT_HISTORY * chat_history, - int *connected_teams_prev); + int waited_teams, + LW_TEAMSTARTINFO * team_start_info, + LW_CHAT_HISTORY * chat_history, + int *connected_teams_prev); static void position_players_list (DIALOG * d); static void position_chat_history (DIALOG * d); @@ -187,125 +187,125 @@ d[10].dp = lw_lang_string (LW_LANG_STRING_CONNECT_SENDMESSAGE); if (hide_start_button) - { - /* - * We disactivate these buttons. If we did not do it - * it would lead to network errors if someone would - * press them twice. - */ - d[6].proc = my_textbox_proc; - d[6].dp = lw_lang_string (LW_LANG_STRING_CONNECT_WAITING); - d[MENU_QUICK_PLAY].flags = D_HIDDEN; - } + { + /* + * We disactivate these buttons. If we did not do it + * it would lead to network errors if someone would + * press them twice. + */ + d[6].proc = my_textbox_proc; + d[6].dp = lw_lang_string (LW_LANG_STRING_CONNECT_WAITING); + d[MENU_QUICK_PLAY].flags = D_HIDDEN; + } d[11].proc = 0; if (first_display) - { - display_back_image (); - first_display = 0; - } + { + display_back_image (); + first_display = 0; + } dp = my_init_dialog (d, choix); while (my_update_dialog (dp) && !data->finished) - { - show_mouse (screen); - if (!data->thread_running && !data->finished) - { - if (!first_getinfo) - { - if (data->result == 0) - { - network_error = 1; - } - else - { - update_connect_menu (d, - data->waited_teams, - data->team_start_info, - &(data->chat_history), - &connected_teams_prev); - } - } - data->thread_running = 1; - if (lw_thread_start (connect_on_server_keepalive, data)) - { - first_getinfo = 0; - } - else - { - data->thread_running = 0; - } - } - rest (10); - } + { + show_mouse (screen); + if (!data->thread_running && !data->finished) + { + if (!first_getinfo) + { + if (data->result == 0) + { + network_error = 1; + } + else + { + update_connect_menu (d, + data->waited_teams, + data->team_start_info, + &(data->chat_history), + &connected_teams_prev); + } + } + data->thread_running = 1; + if (lw_thread_start (connect_on_server_keepalive, data)) + { + first_getinfo = 0; + } + else + { + data->thread_running = 0; + } + } + rest (10); + } choix = shutdown_dialog (dp); if (network_error) - { - error_network_problem (); - lw_sock_close (&(data->sock)); - retour = 1; - } + { + error_network_problem (); + lw_sock_close (&(data->sock)); + retour = 1; + } else - { - /* - * If 0 teams are waited for, then the game must start, so - * we simulate a key press on the "start" button. - */ - if (data->waited_teams == 0) - { - retour = MENU_OK; - } - else - { - switch (choix) - { - case -1: - case MENU_QUICK_BACK: - lw_sock_close (&(data->sock)); - retour = 1; - break; - case MENU_QUICK_MAIN: - lw_sock_close (&(data->sock)); - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - lw_sock_close (&(data->sock)); - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - /* - * Pressing Play or Start has the same effect here - * so there's no "break;" - */ - case 6: - if (data->waited_teams > 0) - { - data->force_start = 1; - hide_start_button = 1; - display_back_image (); - } - break; - case 9: - case 10: - if (strlen (d[9].dp) && !data->chat_send) - { - data->chat_send = 1; - - strncpy (data->chat_buffer, d[9].dp, - LW_CHAT_MESSAGE_SIZE); - data->chat_buffer[LW_CHAT_MESSAGE_SIZE] = '\0'; - ((char *) (d[9].dp))[0] = '\0'; - d[9].d2 = 0; - d[9].proc (MSG_DRAW, d + 9, 0); - } - break; - } - } - } + { + /* + * If 0 teams are waited for, then the game must start, so + * we simulate a key press on the "start" button. + */ + if (data->waited_teams == 0) + { + retour = MENU_OK; + } + else + { + switch (choix) + { + case -1: + case MENU_QUICK_BACK: + lw_sock_close (&(data->sock)); + retour = 1; + break; + case MENU_QUICK_MAIN: + lw_sock_close (&(data->sock)); + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + lw_sock_close (&(data->sock)); + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + /* + * Pressing Play or Start has the same effect here + * so there's no "break;" + */ + case 6: + if (data->waited_teams > 0) + { + data->force_start = 1; + hide_start_button = 1; + display_back_image (); + } + break; + case 9: + case 10: + if (strlen (d[9].dp) && !data->chat_send) + { + data->chat_send = 1; + + strncpy (data->chat_buffer, d[9].dp, + LW_CHAT_MESSAGE_SIZE); + data->chat_buffer[LW_CHAT_MESSAGE_SIZE] = '\0'; + ((char *) (d[9].dp))[0] = '\0'; + d[9].d2 = 0; + d[9].proc (MSG_DRAW, d + 9, 0); + } + break; + } + } + } } while (data->thread_running) @@ -329,10 +329,10 @@ */ static int update_connect_menu (DIALOG * d, - int waited_teams, - LW_TEAMSTARTINFO * team_start_info, - LW_CHAT_HISTORY * chat_history, - int *connected_teams_prev) + int waited_teams, + LW_TEAMSTARTINFO * team_start_info, + LW_CHAT_HISTORY * chat_history, + int *connected_teams_prev) { int result = 0; int i; @@ -345,43 +345,43 @@ int connected_teams = 0; LW_MACRO_SNPRINTF3 ((char *) d[4].dp, - CONNECT_BUF_SIZE, - "%s%d%s", - lw_lang_string (LW_LANG_STRING_CONNECT_WAITINGFOR), - waited_teams, - lw_lang_string (LW_LANG_STRING_CONNECT_TEAMS)); + CONNECT_BUF_SIZE, + "%s%d%s", + lw_lang_string (LW_LANG_STRING_CONNECT_WAITINGFOR), + waited_teams, + lw_lang_string (LW_LANG_STRING_CONNECT_TEAMS)); ((char *) (d[5].dp))[0] = '\0'; for (i = 0; i < NB_TEAMS; ++i) { if (team_start_info[i].active) - { - if (team_start_info[i].start) - { - sep = "*"; - } - else - { - sep = "-"; - } + { + if (team_start_info[i].start) + { + sep = "*"; + } + else + { + sep = "-"; + } - LW_MACRO_SPRINTF3 (buf, "%d %s %s\n", - i + 1, sep, team_start_info[i].name); + LW_MACRO_SPRINTF3 (buf, "%d %s %s\n", + i + 1, sep, team_start_info[i].name); - LW_MACRO_STRNCAT ((char *) d[5].dp, buf, - NB_TEAMS * CONNECT_BUF_SIZE); + LW_MACRO_STRNCAT ((char *) d[5].dp, buf, + NB_TEAMS * CONNECT_BUF_SIZE); - connected_teams++; - } + connected_teams++; + } } ((char *) (d[7].dp))[0] = '\0'; for (i = 0; lw_chat_get (chat_history, &chat_mess, i); ++i) { LW_MACRO_SPRINTF2 (buf, "%s: %s\n", - chat_mess.author, chat_mess.content); + chat_mess.author, chat_mess.content); LW_MACRO_STRNCAT ((char *) d[7].dp, buf, - LW_CHAT_HISTORY_SIZE * CONNECT_BUF_SIZE); + LW_CHAT_HISTORY_SIZE * CONNECT_BUF_SIZE); } /* * Now if the length of the string has changed, we @@ -419,9 +419,9 @@ * nothing */ if ((*connected_teams_prev) >= 0) - { - play_connect (); - } + { + play_connect (); + } (*connected_teams_prev) = connected_teams; } else @@ -431,9 +431,9 @@ * note to overwrite it if it's -1 */ if ((*connected_teams_prev) >= 0) - { - (*connected_teams_prev) = connected_teams; - } + { + (*connected_teams_prev) = connected_teams; + } } return result; @@ -456,91 +456,91 @@ if (!data->finished) { if (result == 1) - { - if (!lw_protocol_waiting (&data->sock, &(data->waited_teams))) - { - result = 0; - } - } + { + if (!lw_protocol_waiting (&data->sock, &(data->waited_teams))) + { + result = 0; + } + } if (result == 1) - { - if (data->waited_teams > 0) - { - /* - * We are still waiting for teams - */ - for (i = 0; i < NB_TEAMS; ++i) - { - if (result == 1) - { - if (!lw_protocol_ask_teamstartinfo (&data->sock, i, - &(data-> - team_start_info - [i]))) - { - result = 0; - } - } - } - - if (result == 1 && data->chat_send) - { - lw_netmess_cleanup_arg (data->chat_buffer); - - if (!lw_protocol_chat_talk (&data->sock, data->chat_buffer)) - { - result = 0; - } - - data->chat_send = 0; - } - - if (result == 1) - { - if (!lw_protocol_chat_listen - (&data->sock, &(data->chat_history))) - { - result = 0; - } - } - - if (result == 1 && data->force_start) - { - if (!lw_protocol_force_start (&data->sock)) - { - result = 0; - } - /* - * It's useless to keep on sending the START message, once is - * just enough, let's save bandwidth! - */ - data->force_start = 0; - } - - if (result == 1) - { - if (!lw_protocol_next (&data->sock)) - { - result = 0; - } - } - } - else - { - /* - * No more teams waited, we say we're ready - */ - if (result == 1) - { - if (!lw_protocol_i_am_ready (&data->sock)) - { - result = 0; - } - data->finished = 1; - } - } - } + { + if (data->waited_teams > 0) + { + /* + * We are still waiting for teams + */ + for (i = 0; i < NB_TEAMS; ++i) + { + if (result == 1) + { + if (!lw_protocol_ask_teamstartinfo (&data->sock, i, + & + (data->team_start_info + [i]))) + { + result = 0; + } + } + } + + if (result == 1 && data->chat_send) + { + lw_netmess_cleanup_arg (data->chat_buffer); + + if (!lw_protocol_chat_talk (&data->sock, data->chat_buffer)) + { + result = 0; + } + + data->chat_send = 0; + } + + if (result == 1) + { + if (!lw_protocol_chat_listen + (&data->sock, &(data->chat_history))) + { + result = 0; + } + } + + if (result == 1 && data->force_start) + { + if (!lw_protocol_force_start (&data->sock)) + { + result = 0; + } + /* + * It's useless to keep on sending the START message, once is + * just enough, let's save bandwidth! + */ + data->force_start = 0; + } + + if (result == 1) + { + if (!lw_protocol_next (&data->sock)) + { + result = 0; + } + } + } + else + { + /* + * No more teams waited, we say we're ready + */ + if (result == 1) + { + if (!lw_protocol_i_am_ready (&data->sock)) + { + result = 0; + } + data->finished = 1; + } + } + } } data->result = result; diff -Nru liquidwar-5.6.4/src/connect.h liquidwar-5.6.5/src/connect.h --- liquidwar-5.6.4/src/connect.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/connect.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/controls.c liquidwar-5.6.5/src/controls.c --- liquidwar-5.6.4/src/controls.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/controls.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -109,20 +109,20 @@ d[4].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_JOYSTICK); switch (CONFIG_JOYSTICK_ON) - { - case 1: - d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_2JOYSTICKS); - break; - case 2: - d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_4BUTTONS); - break; - case 3: - d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_STANDARD); - break; - default: - d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_OFF); - break; - } + { + case 1: + d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_2JOYSTICKS); + break; + case 2: + d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_4BUTTONS); + break; + case 3: + d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_STANDARD); + break; + default: + d[5].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_OFF); + break; + } d[6].proc = my_textbox_proc; d[6].dp = lw_lang_string (LW_LANG_STRING_CONTROLS_MOUSESENSIB); @@ -138,30 +138,30 @@ choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 5: - CONFIG_JOYSTICK_ON++; - if (CONFIG_JOYSTICK_ON > 3) - CONFIG_JOYSTICK_ON = 0; - my_initialise_joystick (); - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 5: + CONFIG_JOYSTICK_ON++; + if (CONFIG_JOYSTICK_ON > 3) + CONFIG_JOYSTICK_ON = 0; + my_initialise_joystick (); + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/controls.h liquidwar-5.6.5/src/controls.h --- liquidwar-5.6.4/src/controls.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/controls.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/cursor.c liquidwar-5.6.5/src/cursor.c --- liquidwar-5.6.4/src/cursor.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/cursor.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -160,24 +160,24 @@ for (i = 0; i < NB_TEAMS; ++i) if (CURRENT_CURSOR[i].active) { - /* - * x and y hold the position of the cursor - */ - x = CURRENT_CURSOR[i].x; - y = CURRENT_CURSOR[i].y; - /* - * sanity check, in case the cursor is not on a valid part - * of the map. It should not happen but I hate protection - * faults! - */ - if ((temp = CURRENT_AREA[y * CURRENT_AREA_W + x].mesh) != NULL) - /* - * we just poke the value of the cursor into its - * corresponding position in the map - * very simple, eh? - */ - temp->info[CURRENT_CURSOR[i].team].state.grad - = CURRENT_CURSOR[i].val; + /* + * x and y hold the position of the cursor + */ + x = CURRENT_CURSOR[i].x; + y = CURRENT_CURSOR[i].y; + /* + * sanity check, in case the cursor is not on a valid part + * of the map. It should not happen but I hate protection + * faults! + */ + if ((temp = CURRENT_AREA[y * CURRENT_AREA_W + x].mesh) != NULL) + /* + * we just poke the value of the cursor into its + * corresponding position in the map + * very simple, eh? + */ + temp->info[CURRENT_CURSOR[i].team].state.grad + = CURRENT_CURSOR[i].val; } } @@ -202,14 +202,14 @@ */ if (CURRENT_ARMY[i].team == team) { - /* - * the following totals will be used to get the center - * of all the fighters belonging to this army - * of course it implies fighters have been placed - */ - x += CURRENT_ARMY[i].x; - y += CURRENT_ARMY[i].y; - n++; + /* + * the following totals will be used to get the center + * of all the fighters belonging to this army + * of course it implies fighters have been placed + */ + x += CURRENT_ARMY[i].x; + y += CURRENT_ARMY[i].y; + n++; } /* @@ -232,65 +232,65 @@ * try and find a good spot going right */ for (x = x_min; x <= x_max && !ok; ++x) - if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) - { - ok = 1; - x0 = x; - y0 = y; - } + if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) + { + ok = 1; + x0 = x; + y0 = y; + } /* * if we did not touch the right side yet, let's increase the limit */ if (x_max < CURRENT_AREA_W - 1) - ++x_max; + ++x_max; /* * try and find a good spot going down */ for (y = y_min; y <= y_max && !ok; ++y) - if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) - { - ok = 1; - x0 = x; - y0 = y; - } + if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) + { + ok = 1; + x0 = x; + y0 = y; + } /* * if we did not touch the bottom side yet, let's increase the limit */ if (y_max < CURRENT_AREA_H - 1) - ++y_max; + ++y_max; /* * try and find a good spot going left */ for (x = x_max; x >= x_min && !ok; --x) - if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) - { - ok = 1; - x0 = x; - y0 = y; - } + if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) + { + ok = 1; + x0 = x; + y0 = y; + } /* * if we did not touch the left side yet, let's decrease the limit */ if (x_min > 0) - --x_min; + --x_min; /* * try and find a good spot going up */ for (y = y_max; y >= y_min && !ok; --y) - if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) - { - ok = 1; - x0 = x; - y0 = y; - } + if (CURRENT_AREA[y * CURRENT_AREA_W + x].mesh != NULL) + { + ok = 1; + x0 = x; + y0 = y; + } /* * if we did not touch the top side yet, let's decrease the limit */ if (y_min > 0) - --y_min; + --y_min; } init_cursor (index, team, x0, y0, name); diff -Nru liquidwar-5.6.4/src/cursor.h liquidwar-5.6.5/src/cursor.h --- liquidwar-5.6.4/src/cursor.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/cursor.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/decal.c liquidwar-5.6.5/src/decal.c --- liquidwar-5.6.4/src/decal.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/decal.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -94,28 +94,28 @@ { PLAYING_TEAMS--; for (i = 0; i < NB_TEAMS; ++i) - if (CURRENT_CURSOR[i].team == team && CURRENT_CURSOR[i].active) - { - CURRENT_CURSOR[i].active = 0; - CURRENT_CURSOR[i].loose_time = TIME_ELAPSED; - CURRENT_CURSOR[i].score_order = PLAYING_TEAMS + 1; - } + if (CURRENT_CURSOR[i].team == team && CURRENT_CURSOR[i].active) + { + CURRENT_CURSOR[i].active = 0; + CURRENT_CURSOR[i].loose_time = TIME_ELAPSED; + CURRENT_CURSOR[i].score_order = PLAYING_TEAMS + 1; + } for (i = 0; i < NB_TEAMS; ++i) - if (CURRENT_CURSOR[i].team > team) - CURRENT_CURSOR[i].team--; + if (CURRENT_CURSOR[i].team > team) + CURRENT_CURSOR[i].team--; for (i = 0; i < CURRENT_ARMY_SIZE; ++i) - if (CURRENT_ARMY[i].team > team) - CURRENT_ARMY[i].team--; + if (CURRENT_ARMY[i].team > team) + CURRENT_ARMY[i].team--; for (j = team; j < PLAYING_TEAMS; ++j) - { - ACTIVE_FIGHTERS[j] = ACTIVE_FIGHTERS[j + 1]; - COLOR_FIRST_ENTRY[j] = COLOR_FIRST_ENTRY[j + 1]; - - for (i = 0; i < CURRENT_MESH_SIZE; ++i) - { - CURRENT_MESH[i].info[j] = CURRENT_MESH[i].info[j + 1]; - } - } + { + ACTIVE_FIGHTERS[j] = ACTIVE_FIGHTERS[j + 1]; + COLOR_FIRST_ENTRY[j] = COLOR_FIRST_ENTRY[j + 1]; + + for (i = 0; i < CURRENT_MESH_SIZE; ++i) + { + CURRENT_MESH[i].info[j] = CURRENT_MESH[i].info[j + 1]; + } + } return 0; } diff -Nru liquidwar-5.6.4/src/decal.h liquidwar-5.6.5/src/decal.h --- liquidwar-5.6.4/src/decal.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/decal.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/dialog.c liquidwar-5.6.5/src/dialog.c --- liquidwar-5.6.4/src/dialog.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/dialog.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -173,14 +173,14 @@ d->proc = my_button_proc; center_one_dialog (d, - find_center (x_pos, x_num, - MENU_W_STANDARD + MENU_W_SPACE, - MENU_VIRTUAL_W), find_center (y_pos, y_num, - MENU_H_STANDARD - + - MENU_H_SPACE, - MENU_VIRTUAL_H), - MENU_W_STANDARD, MENU_H_STANDARD); + find_center (x_pos, x_num, + MENU_W_STANDARD + MENU_W_SPACE, + MENU_VIRTUAL_W), find_center (y_pos, y_num, + MENU_H_STANDARD + + + MENU_H_SPACE, + MENU_VIRTUAL_H), + MENU_W_STANDARD, MENU_H_STANDARD); color_one_dialog (d); menu_real_coord (d); d->key = 0; @@ -195,14 +195,14 @@ d->proc = my_button_proc; center_one_dialog (d, - find_center (x_pos, x_num, - MENU_W_STANDARD / 2 + MENU_W_SPACE, - MENU_VIRTUAL_W), find_center (y_pos, y_num, - MENU_H_STANDARD - + - MENU_H_SPACE, - MENU_VIRTUAL_H), - MENU_W_STANDARD / 2, MENU_H_STANDARD); + find_center (x_pos, x_num, + MENU_W_STANDARD / 2 + MENU_W_SPACE, + MENU_VIRTUAL_W), find_center (y_pos, y_num, + MENU_H_STANDARD + + + MENU_H_SPACE, + MENU_VIRTUAL_H), + MENU_W_STANDARD / 2, MENU_H_STANDARD); color_one_dialog (d); menu_real_coord (d); d->key = 0; @@ -217,14 +217,14 @@ d->proc = my_button_proc; center_one_dialog (d, - find_center (x_pos, x_num, - MENU_W_STANDARD * 2 + MENU_W_SPACE, - MENU_VIRTUAL_W), find_center (y_pos, y_num, - MENU_H_STANDARD - + - MENU_H_SPACE, - MENU_VIRTUAL_H), - MENU_W_STANDARD * 2, MENU_H_STANDARD); + find_center (x_pos, x_num, + MENU_W_STANDARD * 2 + MENU_W_SPACE, + MENU_VIRTUAL_W), find_center (y_pos, y_num, + MENU_H_STANDARD + + + MENU_H_SPACE, + MENU_VIRTUAL_H), + MENU_W_STANDARD * 2, MENU_H_STANDARD); color_one_dialog (d); menu_real_coord (d); d->key = 0; diff -Nru liquidwar-5.6.4/src/dialog.h liquidwar-5.6.5/src/dialog.h --- liquidwar-5.6.4/src/dialog.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/dialog.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -107,9 +107,9 @@ void quick_buttons (DIALOG * d); void standard_button (DIALOG * d, int x_pos, int y_pos, int x_num, int y_num); void standard_small_button (DIALOG * d, int x_pos, int y_pos, - int x_num, int y_num); + int x_num, int y_num); void standard_big_button (DIALOG * d, int x_pos, int y_pos, - int x_num, int y_num); + int x_num, int y_num); void main_message (DIALOG * d, char *str); void main_info (DIALOG * d, char *str); DIALOG_PLAYER *my_init_dialog (DIALOG * d, int f); diff -Nru liquidwar-5.6.4/src/disk.c liquidwar-5.6.5/src/disk.c --- liquidwar-5.6.4/src/disk.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/disk.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -250,7 +250,7 @@ for (x = 0; x < BACK_IMAGE->w; ++x) for (y = 0; y < BACK_IMAGE->w; ++y) { - putpixel (BACK_IMAGE, x, y, getpixel (BACK_IMAGE, x, y) + 18); + putpixel (BACK_IMAGE, x, y, getpixel (BACK_IMAGE, x, y) + 18); } } @@ -327,7 +327,7 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "font_dat"); if (result &= (df != NULL)) - read_font_dat (df[0].dat); + read_font_dat (df[0].dat); display_success (df != NULL); } if (loadable) @@ -336,7 +336,7 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "map_dat"); if (result &= (df != NULL)) - read_map_dat (df[0].dat); + read_map_dat (df[0].dat); display_success (df != NULL); } @@ -346,15 +346,15 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "back_dat"); if (df != NULL) - { - read_back_dat (df[0].dat); - LOADED_BACK = 1; - } + { + read_back_dat (df[0].dat); + LOADED_BACK = 1; + } else - { - create_default_back (); - result &= !STARTUP_CHECK; - } + { + create_default_back (); + result &= !STARTUP_CHECK; + } display_success (df != NULL); } else @@ -365,12 +365,12 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "sfx_dat"); if (df != NULL) - { - read_sfx_dat (df[0].dat); - LOADED_SFX = 1; - } + { + read_sfx_dat (df[0].dat); + LOADED_SFX = 1; + } else - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (df != NULL); } if (loadable && STARTUP_TEXTURE_STATE) @@ -379,24 +379,24 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "texture_dat"); if (df != NULL) - { - read_texture_dat (df[0].dat); - LOADED_TEXTURE = 1; - } + { + read_texture_dat (df[0].dat); + LOADED_TEXTURE = 1; + } else - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (df != NULL); log_print_str ("Loading map textures"); log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "maptex_dat"); if (df != NULL) - { - read_maptex_dat (df[0].dat); - LOADED_MAPTEX = 1; - } + { + read_maptex_dat (df[0].dat); + LOADED_MAPTEX = 1; + } else - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (df != NULL); } @@ -406,12 +406,12 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "water_dat"); if (df != NULL) - { - read_water_dat (df[0].dat); - LOADED_WATER = 1; - } + { + read_water_dat (df[0].dat); + LOADED_WATER = 1; + } else - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (df != NULL); } @@ -421,12 +421,12 @@ log_flush (); df = load_datafile_object (STARTUP_DAT_PATH, "music_dat"); if (df != NULL) - { - read_music_dat (df[0].dat); - LOADED_MUSIC = 1; - } + { + read_music_dat (df[0].dat); + LOADED_MUSIC = 1; + } else - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (df != NULL); } @@ -575,7 +575,7 @@ log_flush (); success = load_custom_texture (); if (!success) - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (success); } @@ -587,7 +587,7 @@ log_flush (); success = load_custom_map (); if (!success) - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (success); } @@ -599,7 +599,7 @@ log_flush (); success = load_custom_music (); if (!success) - result &= !STARTUP_CHECK; + result &= !STARTUP_CHECK; display_success (success); } @@ -628,17 +628,17 @@ incorrect_order = 0; for (i = 0; i < RAW_MAP_NUMBER - 1; ++i) - { - LW_MACRO_STRCPY (name1, lw_map_get_readable_name (i, 0, 0)); - LW_MACRO_STRCPY (name2, lw_map_get_readable_name (i + 1, 0, 0)); - if (strcmp (name1, name2) > 0) - { - incorrect_order = 1; - - temp = RAW_MAP_ORDERED[i]; - RAW_MAP_ORDERED[i] = RAW_MAP_ORDERED[i + 1]; - RAW_MAP_ORDERED[i + 1] = temp; - } - } + { + LW_MACRO_STRCPY (name1, lw_map_get_readable_name (i, 0, 0)); + LW_MACRO_STRCPY (name2, lw_map_get_readable_name (i + 1, 0, 0)); + if (strcmp (name1, name2) > 0) + { + incorrect_order = 1; + + temp = RAW_MAP_ORDERED[i]; + RAW_MAP_ORDERED[i] = RAW_MAP_ORDERED[i + 1]; + RAW_MAP_ORDERED[i + 1] = temp; + } + } } } diff -Nru liquidwar-5.6.4/src/disk.h liquidwar-5.6.5/src/disk.h --- liquidwar-5.6.4/src/disk.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/disk.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/disp.c liquidwar-5.6.5/src/disp.c --- liquidwar-5.6.4/src/disp.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/disp.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -73,8 +73,8 @@ disp_stretch_area (void) { stretch_blit (CURRENT_AREA_DISP, NEXT_SCREEN, 0, 0, - CURRENT_AREA_W, CURRENT_AREA_H, - 0, 0, NEXT_SCREEN->w, NEXT_SCREEN->h); + CURRENT_AREA_W, CURRENT_AREA_H, + 0, 0, NEXT_SCREEN->w, NEXT_SCREEN->h); } /*------------------------------------------------------------------*/ @@ -99,7 +99,7 @@ if (bmp) { stretch_blit (bmp, NEXT_SCREEN, 0, 0, bmp->w, bmp->h, - 0, 0, NEXT_SCREEN->w, NEXT_SCREEN->h); + 0, 0, NEXT_SCREEN->w, NEXT_SCREEN->h); destroy_bitmap (bmp); } } @@ -114,7 +114,7 @@ if (bmp) { stretch_blit (bmp, NEXT_SCREEN, 0, 0, bmp->w, bmp->h, - 0, 0, NEXT_SCREEN->w, NEXT_SCREEN->h); + 0, 0, NEXT_SCREEN->w, NEXT_SCREEN->h); destroy_bitmap (bmp); } } diff -Nru liquidwar-5.6.4/src/disp.h liquidwar-5.6.5/src/disp.h --- liquidwar-5.6.4/src/disp.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/disp.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/distor.c liquidwar-5.6.5/src/distor.c --- liquidwar-5.6.4/src/distor.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/distor.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -105,12 +105,12 @@ else { if (DISTORSION_TARGET->w != NEXT_SCREEN->w || - DISTORSION_TARGET->h != NEXT_SCREEN->h) - { - destroy_bitmap (DISTORSION_TARGET); - DISTORSION_TARGET = my_create_bitmap (NEXT_SCREEN->w, - NEXT_SCREEN->h); - } + DISTORSION_TARGET->h != NEXT_SCREEN->h) + { + destroy_bitmap (DISTORSION_TARGET); + DISTORSION_TARGET = my_create_bitmap (NEXT_SCREEN->w, + NEXT_SCREEN->h); + } } } @@ -157,7 +157,7 @@ /*------------------------------------------------------------------*/ static void create_wave_line (int *buffer, - int length, int number, int ampli, int speed, int sens) + int length, int number, int ampli, int speed, int sens) { int i, period, period2, cycle_tmp; int ampli_cst, ampli_cos, freq_coef, cycle_coef; @@ -194,7 +194,7 @@ cycle_tmp /= 2; speed--; } - cycle_tmp = fsqrt (fsqrt (cycle_tmp)) / 2; + cycle_tmp = fixsqrt (fixsqrt (cycle_tmp)) / 2; cycle_tmp /= SCREEN_W; cycle_tmp *= period; if (cycle_tmp <= 0) @@ -203,8 +203,8 @@ } cycle_coef = sens * 256 * (itofix (GLOBAL_TICKER % cycle_tmp) / cycle_tmp); - f0 = fsin (cycle_coef + freq_coef * period2); - fp0x0 = (PI_1024 * fcos (cycle_coef + freq_coef * period2)) / 1024; + f0 = fixsin (cycle_coef + freq_coef * period2); + fp0x0 = (PI_1024 * fixcos (cycle_coef + freq_coef * period2)) / 1024; alphax03 = (ampli_cst / 256) * ((fp0x0 - 2 * f0) / 256); betax02 = (ampli_cst / 256) * ((-fp0x0 + 3 * f0) / 256); @@ -217,7 +217,8 @@ } for (i = period2; i < real_length - period2; ++i) { - temp = ((ampli_cos) / 256) * (fcos (cycle_coef + freq_coef * i) / 256); + temp = + ((ampli_cos) / 256) * (fixcos (cycle_coef + freq_coef * i) / 256); buffer2[i] = temp / WAVE_SIZE_SCALE; } @@ -248,22 +249,22 @@ h = DISTORSION_TARGET->h; create_wave_line (WAVE_SHAPE_WX, w, - CONFIG_WAVE_NUMBER[0], - CONFIG_WAVE_AMPLI[0] * CURRENT_AREA_W, - CONFIG_WAVE_SPEED[0], +1); + CONFIG_WAVE_NUMBER[0], + CONFIG_WAVE_AMPLI[0] * CURRENT_AREA_W, + CONFIG_WAVE_SPEED[0], +1); create_wave_line (WAVE_SHAPE_HY, h, - CONFIG_WAVE_NUMBER[1], - CONFIG_WAVE_AMPLI[1] * CURRENT_AREA_H, - CONFIG_WAVE_SPEED[1], +1); + CONFIG_WAVE_NUMBER[1], + CONFIG_WAVE_AMPLI[1] * CURRENT_AREA_H, + CONFIG_WAVE_SPEED[1], +1); create_wave_line (WAVE_SHAPE_WY[DISTORSION_H + 1], w, - CONFIG_WAVE_NUMBER[2], - CONFIG_WAVE_AMPLI[2] * CURRENT_AREA_H, - CONFIG_WAVE_SPEED[2], +1); + CONFIG_WAVE_NUMBER[2], + CONFIG_WAVE_AMPLI[2] * CURRENT_AREA_H, + CONFIG_WAVE_SPEED[2], +1); create_wave_line (WAVE_SHAPE_HX[DISTORSION_W + 1], h, - CONFIG_WAVE_NUMBER[3], - CONFIG_WAVE_AMPLI[3] * CURRENT_AREA_W, - CONFIG_WAVE_SPEED[3], +1); + CONFIG_WAVE_NUMBER[3], + CONFIG_WAVE_AMPLI[3] * CURRENT_AREA_W, + CONFIG_WAVE_SPEED[3], +1); for (x = 0; x < w; ++x) { @@ -271,7 +272,7 @@ WAVE_SHAPE_WY[0][x] = 0; WAVE_SHAPE_WY[1][x] = WAVE_SHAPE_WY[DISTORSION_H + 1][x] / DISTORSION_H; for (i = 1; i < DISTORSION_H; ++i) - WAVE_SHAPE_WY[i + 1][x] = WAVE_SHAPE_WY[i][x] + WAVE_SHAPE_WY[1][x]; + WAVE_SHAPE_WY[i + 1][x] = WAVE_SHAPE_WY[i][x] + WAVE_SHAPE_WY[1][x]; } for (y = 0; y < h; ++y) @@ -280,7 +281,7 @@ WAVE_SHAPE_HX[0][y] = 0; WAVE_SHAPE_HX[1][y] = WAVE_SHAPE_HX[DISTORSION_W + 1][y] / DISTORSION_W; for (i = 1; i < DISTORSION_W; ++i) - WAVE_SHAPE_HX[i + 1][y] = WAVE_SHAPE_HX[i][y] + WAVE_SHAPE_HX[1][y]; + WAVE_SHAPE_HX[i + 1][y] = WAVE_SHAPE_HX[i][y] + WAVE_SHAPE_HX[1][y]; } } @@ -291,9 +292,11 @@ char *src; int x, y, w, h, lim_w, lim_h, init_w, init_h; int *y_corres; - int fp_x, ip_x, fp_y, ip_y, fp_y0, ip_y0; + int fp_x, fp_y, fp_y0, ip_y0; int fp_x0[MAX_W_DISPLAY]; int reste_x; +#ifdef ASM + int ip_x, ip_y; int temp = 0; int bmp_color_depth; int bmp_linear; @@ -302,6 +305,7 @@ bmp_color_depth = bitmap_color_depth (DISTORSION_TARGET); bmp_linear = is_linear_bitmap (DISTORSION_TARGET); bmp_memory = is_memory_bitmap (DISTORSION_TARGET); +#endif w = DISTORSION_TARGET->w; h = DISTORSION_TARGET->h; @@ -319,76 +323,74 @@ for (y = 0; y < h; ++y) { fp_y = fp_y0; - ip_y = ip_y0; fp_x = init_w; - ip_x = 0; src = (char *) CURRENT_AREA_DISP->dat + ip_y0 * CURRENT_AREA_W; y_corres = WAVE_SHAPE_Y_CORRES[y]; #ifdef ASM + ip_x = 0; + ip_y = ip_y0; /* * draw_distor_line works on memory 8-bit bitmaps only */ - if (STARTUP_ASM && bmp_memory && bmp_color_depth == 8) - { - draw_distor_line (DISTORSION_TARGET, - CURRENT_AREA_W, - w, - y, - fp_x, - ip_x, - fp_y, - ip_y, - lim_w, - lim_h, - fp_x0, - y_corres, - WAVE_SHAPE_WX, - WAVE_SHAPE_X_CORRES, - src, temp, temp, temp, temp, temp); - } + if (STARTUP_ASM && bmp_memory && bmp_linear && bmp_color_depth == 8) + { + draw_distor_line (DISTORSION_TARGET, + CURRENT_AREA_W, + w, + y, + fp_x, + ip_x, + fp_y, + ip_y, + lim_w, + lim_h, + fp_x0, + y_corres, + WAVE_SHAPE_WX, + WAVE_SHAPE_X_CORRES, + src, temp, temp, temp, temp, temp); + } else -#else - temp = 0; #endif - for (x = 0; x < w; ++x) - { - putpixel (DISTORSION_TARGET, x, y, *src); - - reste_x = fp_x0[x] += WAVE_SHAPE_X_CORRES[x][y]; - fp_x += WAVE_SHAPE_WX[x]; - while (reste_x < -fp_x) - { - fp_x += lim_w; - src--; - } - while (reste_x + fp_x >= lim_w) - { - fp_x -= lim_w; - src++; - } - - fp_y += y_corres[x]; - while (fp_y < 0) - { - fp_y += lim_h; - src -= CURRENT_AREA_W; - } - while (fp_y >= lim_h) - { - fp_y -= lim_h; - src += CURRENT_AREA_W; - } - } + for (x = 0; x < w; ++x) + { + putpixel (DISTORSION_TARGET, x, y, *src); + + reste_x = fp_x0[x] += WAVE_SHAPE_X_CORRES[x][y]; + fp_x += WAVE_SHAPE_WX[x]; + while (reste_x < -fp_x) + { + fp_x += lim_w; + src--; + } + while (reste_x + fp_x >= lim_w) + { + fp_x -= lim_w; + src++; + } + + fp_y += y_corres[x]; + while (fp_y < 0) + { + fp_y += lim_h; + src -= CURRENT_AREA_W; + } + while (fp_y >= lim_h) + { + fp_y -= lim_h; + src += CURRENT_AREA_W; + } + } fp_y0 += WAVE_SHAPE_HY[y]; while (fp_y0 >= lim_h) - { - fp_y0 -= lim_h; - ip_y0++; - } + { + fp_y0 -= lim_h; + ip_y0++; + } } blit (DISTORSION_TARGET, NEXT_SCREEN, 0, 0, 0, 0, - DISTORSION_TARGET->w, DISTORSION_TARGET->h); + DISTORSION_TARGET->w, DISTORSION_TARGET->h); } diff -Nru liquidwar-5.6.4/src/distor.h liquidwar-5.6.5/src/distor.h --- liquidwar-5.6.4/src/distor.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/distor.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/dnsutil.c liquidwar-5.6.5/src/dnsutil.c --- liquidwar-5.6.4/src/dnsutil.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/dnsutil.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/dnsutil.h liquidwar-5.6.5/src/dnsutil.h --- liquidwar-5.6.4/src/dnsutil.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/dnsutil.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/error.c liquidwar-5.6.5/src/error.c --- liquidwar-5.6.4/src/error.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/error.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -113,7 +113,7 @@ error_not_enough_teams (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_NOTENOUGHTEAMS))); + (LW_LANG_STRING_ERROR_NOTENOUGHTEAMS))); } /*------------------------------------------------------------------*/ @@ -121,7 +121,7 @@ error_not_enough_big_data (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_NOTENOUGHBIGDATA))); + (LW_LANG_STRING_ERROR_NOTENOUGHBIGDATA))); } /*------------------------------------------------------------------*/ @@ -129,7 +129,7 @@ error_graphics_init_failed (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_GRAPHICSINITFAILED))); + (LW_LANG_STRING_ERROR_GRAPHICSINITFAILED))); } /*------------------------------------------------------------------*/ @@ -137,7 +137,7 @@ error_no_network_support (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_NONETWORKSUPPORT))); + (LW_LANG_STRING_ERROR_NONETWORKSUPPORT))); } /*------------------------------------------------------------------*/ @@ -145,7 +145,7 @@ error_unable_to_connect (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_UNABLETOCONNECT))); + (LW_LANG_STRING_ERROR_UNABLETOCONNECT))); } /*------------------------------------------------------------------*/ @@ -153,7 +153,7 @@ error_not_a_liquidwar_server (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_NOTALIQUIDWARSERVER))); + (LW_LANG_STRING_ERROR_NOTALIQUIDWARSERVER))); } /*------------------------------------------------------------------*/ @@ -161,7 +161,7 @@ error_wrong_version (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_WRONGVERSION))); + (LW_LANG_STRING_ERROR_WRONGVERSION))); } /*------------------------------------------------------------------*/ @@ -169,7 +169,7 @@ error_network_problem (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_NETWORKPROBLEM))); + (LW_LANG_STRING_ERROR_NETWORKPROBLEM))); } /*------------------------------------------------------------------*/ @@ -184,7 +184,7 @@ error_cant_receive_map (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_CANTRECEIVEMAP))); + (LW_LANG_STRING_ERROR_CANTRECEIVEMAP))); } /*------------------------------------------------------------------*/ @@ -206,5 +206,5 @@ error_bad_config_range (void) { return (standard_error (lw_lang_string - (LW_LANG_STRING_ERROR_BADCONFIGRANGE))); + (LW_LANG_STRING_ERROR_BADCONFIGRANGE))); } diff -Nru liquidwar-5.6.4/src/error.h liquidwar-5.6.5/src/error.h --- liquidwar-5.6.4/src/error.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/error.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/exec2.c liquidwar-5.6.5/src/exec2.c --- liquidwar-5.6.4/src/exec2.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/exec2.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -94,16 +94,16 @@ startupinfo.cb = sizeof (STARTUPINFO); startupinfo.dwFlags = STARTF_USESHOWWINDOW; startupinfo.wShowWindow = SW_HIDE; - result = CreateProcess (file, // lpApplicationName - commandline, // lpCommandLine - NULL, // lpProcessAttributes - NULL, // lpThreadAttributes - FALSE, // bInheritHandles - CREATE_NO_WINDOW, // dwCreationFlags - NULL, // lpEnvironment - NULL, // lpCurrentDirectory - &startupinfo, // lpStartupInfo - &process_information // lpProcessInformation + result = CreateProcess (file, // lpApplicationName + commandline, // lpCommandLine + NULL, // lpProcessAttributes + NULL, // lpThreadAttributes + FALSE, // bInheritHandles + CREATE_NO_WINDOW, // dwCreationFlags + NULL, // lpEnvironment + NULL, // lpCurrentDirectory + &startupinfo, // lpStartupInfo + &process_information // lpProcessInformation ); } #endif diff -Nru liquidwar-5.6.4/src/exec2.h liquidwar-5.6.5/src/exec2.h --- liquidwar-5.6.4/src/exec2.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/exec2.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/execgen.h liquidwar-5.6.5/src/execgen.h --- liquidwar-5.6.4/src/execgen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/execgen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/execunix.c liquidwar-5.6.5/src/execunix.c --- liquidwar-5.6.4/src/execunix.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/execunix.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -52,9 +52,11 @@ /*==================================================================*/ #include +#include #include #include #include +#include #include "execgen.h" #include "log.h" @@ -72,6 +74,14 @@ /* static functions */ /*==================================================================*/ +static void +handler_sigchld (int sig) +{ + sig = sig; // useless parameter + wait (NULL); + return; +} + /*==================================================================*/ /* global functions */ /*==================================================================*/ @@ -86,6 +96,16 @@ int result = 0; pid_t pid; char error_str[LW_EXEC_ERROR_SIZE]; + struct sigaction action; + + sigemptyset (&action.sa_mask); + action.sa_flags = 0; + action.sa_handler = handler_sigchld; + + if (sigaction (SIGCHLD, &action, NULL) == -1) + { + log_println_str ("Unable to set SIGCHLD callback!"); + } pid = fork (); @@ -96,16 +116,16 @@ * We're in the child */ execl (LW_EXECUNIX_SHELL_CMD, - LW_EXECUNIX_SHELL_CMD, LW_EXECUNIX_SHELL_ARG1, cmd, NULL); + LW_EXECUNIX_SHELL_CMD, LW_EXECUNIX_SHELL_ARG1, cmd, NULL); /* * If we get here, it means launching the command failed... */ LW_MACRO_SPRINTF5 (error_str, - "Can't execute \"%s %s %s\", error %d: \"%s\"", - LW_EXECUNIX_SHELL_CMD, - LW_EXECUNIX_SHELL_ARG1, - cmd, errno, strerror (errno)); + "Can't execute \"%s %s %s\", error %d: \"%s\"", + LW_EXECUNIX_SHELL_CMD, + LW_EXECUNIX_SHELL_ARG1, + cmd, errno, strerror (errno)); log_println_str (error_str); exit (1); break; diff -Nru liquidwar-5.6.4/src/execw32.c liquidwar-5.6.5/src/execw32.c --- liquidwar-5.6.4/src/execw32.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/execw32.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -90,16 +90,16 @@ startup_info.cb = sizeof (STARTUPINFO); - create_process_ret = CreateProcess (NULL, //lpApplicationName - cmd, //lpCommandLine - NULL, //lpProcessAttributes - NULL, //lpThreadAttributes - FALSE, //bInheritHandles - 0, //dwCreationFlags - NULL, //lpEnvironment - NULL, //lpCurrentDirectory - &startup_info, //lpStartupInfo - &process_info //lpProcessInformation + create_process_ret = CreateProcess (NULL, //lpApplicationName + cmd, //lpCommandLine + NULL, //lpProcessAttributes + NULL, //lpThreadAttributes + FALSE, //bInheritHandles + 0, //dwCreationFlags + NULL, //lpEnvironment + NULL, //lpCurrentDirectory + &startup_info, //lpStartupInfo + &process_info //lpProcessInformation ); @@ -113,37 +113,37 @@ error_int = (int) GetLastError (); - if (FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_int, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) & message_buf, 0, NULL)) - { - LW_MACRO_SPRINTF2 (error_str, "%d: \"%s", error_int, - (char *) message_buf); - LocalFree (message_buf); - - /* - * Now we trim ending CR-LF chars - */ - crlf_found = 1; - while (crlf_found) - { - error_len = strlen (error_str); - crlf_found = 0; - if (error_len > 1) - { - if (error_str[error_len - 1] == '\n' - || error_str[error_len - 1] == '\r') - { - error_str[error_len - 1] = '\0'; - crlf_found = 1; - } - } - } - LW_MACRO_STRCAT (error_str, "\""); - } + if (FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_int, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR) & message_buf, 0, NULL)) + { + LW_MACRO_SPRINTF2 (error_str, "%d: \"%s", error_int, + (char *) message_buf); + LocalFree (message_buf); + + /* + * Now we trim ending CR-LF chars + */ + crlf_found = 1; + while (crlf_found) + { + error_len = strlen (error_str); + crlf_found = 0; + if (error_len > 1) + { + if (error_str[error_len - 1] == '\n' + || error_str[error_len - 1] == '\r') + { + error_str[error_len - 1] = '\0'; + crlf_found = 1; + } + } + } + LW_MACRO_STRCAT (error_str, "\""); + } else - { - LW_MACRO_SPRINTF1 (error_str, "%d", error_int); - } + { + LW_MACRO_SPRINTF1 (error_str, "%d", error_int); + } log_print_str ("Can't execute \""); log_print_str (cmd); diff -Nru liquidwar-5.6.4/src/exit.c liquidwar-5.6.5/src/exit.c --- liquidwar-5.6.4/src/exit.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/exit.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -109,7 +109,7 @@ log_println (); log_println_str - ("Leaving Allegro (http://www.talula.demon.co.uk/allegro)"); + ("Leaving Allegro (http://www.talula.demon.co.uk/allegro)"); save_config_options (); stop_water (); stop_ticker (); @@ -298,26 +298,26 @@ log_println (); log_flush (); switch (code) - { - case EXIT_CODE_INIT_FAIL: - disp_init_fail_message (); - break; - case EXIT_CODE_MEM_TROUBLE: - disp_mem_trouble_message (); - break; - case EXIT_CODE_BIG_DATA: - disp_big_data_message (); - break; - case EXIT_CODE_LOAD_FAIL: - disp_load_fail_message (); - break; - case EXIT_CODE_CUSTOM_FAIL: - disp_custom_fail_message (); - break; - case EXIT_CODE_GRAPHICS_FAIL: - disp_graphics_fail_message (); - break; - } + { + case EXIT_CODE_INIT_FAIL: + disp_init_fail_message (); + break; + case EXIT_CODE_MEM_TROUBLE: + disp_mem_trouble_message (); + break; + case EXIT_CODE_BIG_DATA: + disp_big_data_message (); + break; + case EXIT_CODE_LOAD_FAIL: + disp_load_fail_message (); + break; + case EXIT_CODE_CUSTOM_FAIL: + disp_custom_fail_message (); + break; + case EXIT_CODE_GRAPHICS_FAIL: + disp_graphics_fail_message (); + break; + } #ifdef DOS getch (); #endif diff -Nru liquidwar-5.6.4/src/exit.h liquidwar-5.6.5/src/exit.h --- liquidwar-5.6.4/src/exit.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/exit.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/fighter.c liquidwar-5.6.5/src/fighter.c --- liquidwar-5.6.4/src/fighter.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/fighter.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -129,7 +129,7 @@ erase_fighter (FIGHTER * f) { putpixel (CURRENT_AREA_DISP, f->x, f->y, - getpixel (CURRENT_AREA_BACK, f->x, f->y)); + getpixel (CURRENT_AREA_BACK, f->x, f->y)); } /*------------------------------------------------------------------*/ @@ -137,8 +137,8 @@ disp_fighter (FIGHTER * f) { putpixel (CURRENT_AREA_DISP, f->x, f->y, - COLOR_FIRST_ENTRY[(int) (f->team)] - + (f->health * COLORS_PER_TEAM) / MAX_FIGHTER_HEALTH); + COLOR_FIRST_ENTRY[(int) (f->team)] + + (f->health * COLORS_PER_TEAM) / MAX_FIGHTER_HEALTH); } /*------------------------------------------------------------------*/ @@ -150,26 +150,26 @@ for (k = 0; k < NB_SENS_MOVE; ++k) for (i = 0; i < NB_DIRS; ++i) for (j = 0; j < NB_TRY_MOVE; ++j) - { - dir = FIGHTER_MOVE_DIR[k][i][j]; - FIGHTER_MOVE_X[k][i][j] = FIGHTER_MOVE_X_REF[dir]; - FIGHTER_MOVE_Y[k][i][j] = FIGHTER_MOVE_Y_REF[dir]; - - FIGHTER_MOVE_OFFSET[k][i][j] = 0; - if (FIGHTER_MOVE_X[k][i][j] == 1) - ++(FIGHTER_MOVE_OFFSET[k][i][j]); - if (FIGHTER_MOVE_X[k][i][j] == -1) - --(FIGHTER_MOVE_OFFSET[k][i][j]); - if (FIGHTER_MOVE_Y[k][i][j] == 1) - FIGHTER_MOVE_OFFSET[k][i][j] += CURRENT_AREA_W; - if (FIGHTER_MOVE_Y[k][i][j] == -1) - FIGHTER_MOVE_OFFSET[k][i][j] -= CURRENT_AREA_W; - - FIGHTER_MOVE_OFFSET_ASM[k][i * NB_TRY_MOVE + j] = - FIGHTER_MOVE_OFFSET[k][i][j]; - FIGHTER_MOVE_XY_ASM[k][i * NB_TRY_MOVE + j] = - FIGHTER_MOVE_Y[k][i][j] * 65536 + FIGHTER_MOVE_X[k][i][j]; - } + { + dir = FIGHTER_MOVE_DIR[k][i][j]; + FIGHTER_MOVE_X[k][i][j] = FIGHTER_MOVE_X_REF[dir]; + FIGHTER_MOVE_Y[k][i][j] = FIGHTER_MOVE_Y_REF[dir]; + + FIGHTER_MOVE_OFFSET[k][i][j] = 0; + if (FIGHTER_MOVE_X[k][i][j] == 1) + ++(FIGHTER_MOVE_OFFSET[k][i][j]); + if (FIGHTER_MOVE_X[k][i][j] == -1) + --(FIGHTER_MOVE_OFFSET[k][i][j]); + if (FIGHTER_MOVE_Y[k][i][j] == 1) + FIGHTER_MOVE_OFFSET[k][i][j] += CURRENT_AREA_W; + if (FIGHTER_MOVE_Y[k][i][j] == -1) + FIGHTER_MOVE_OFFSET[k][i][j] -= CURRENT_AREA_W; + + FIGHTER_MOVE_OFFSET_ASM[k][i * NB_TRY_MOVE + j] = + FIGHTER_MOVE_OFFSET[k][i][j]; + FIGHTER_MOVE_XY_ASM[k][i * NB_TRY_MOVE + j] = + FIGHTER_MOVE_Y[k][i][j] * 65536 + FIGHTER_MOVE_X[k][i][j]; + } for (i = 0; i < CURRENT_ARMY_SIZE; ++i) disp_fighter (CURRENT_ARMY + i); @@ -186,37 +186,37 @@ for (i = 1; i <= NB_LOCAL_DIRS; ++i) { for (j = 0; j < 2; ++j) - { - k = -1; - switch (i) - { - case 1: - k = j ? DIR_NNW : DIR_NNE; - break; - case 3: - k = DIR_NE; - break; - case 2: - k = j ? DIR_ENE : DIR_ESE; - break; - case 6: - k = DIR_SE; - break; - case 4: - k = j ? DIR_SSE : DIR_SSW; - break; - case 12: - k = DIR_SW; - break; - case 8: - k = j ? DIR_WSW : DIR_WNW; - break; - case 9: - k = DIR_NW; - break; - } - LOCAL_DIR[(i - 1) * 2 + j] = k; - } + { + k = -1; + switch (i) + { + case 1: + k = j ? DIR_NNW : DIR_NNE; + break; + case 3: + k = DIR_NE; + break; + case 2: + k = j ? DIR_ENE : DIR_ESE; + break; + case 6: + k = DIR_SE; + break; + case 4: + k = j ? DIR_SSE : DIR_SSW; + break; + case 12: + k = DIR_SW; + break; + case 8: + k = j ? DIR_WSW : DIR_WNW; + break; + case 9: + k = DIR_NW; + break; + } + LOCAL_DIR[(i - 1) * 2 + j] = k; + } } } @@ -234,29 +234,29 @@ if (sens) { do - { - if ((mesh2 = mesh->link[i])) - if (mesh2->info[team].state.grad < dist) - { - dir = i; - dist = mesh2->info[team].state.grad; - } - i = (i < NB_DIRS - 1) ? i + 1 : 0; - } + { + if ((mesh2 = mesh->link[i])) + if (mesh2->info[team].state.grad < dist) + { + dir = i; + dist = mesh2->info[team].state.grad; + } + i = (i < NB_DIRS - 1) ? i + 1 : 0; + } while (i != start); } else { do - { - if ((mesh2 = mesh->link[i])) - if (mesh2->info[team].state.grad < dist) - { - dir = i; - dist = mesh2->info[team].state.grad; - } - i = (i > 0) ? i - 1 : NB_DIRS - 1; - } + { + if ((mesh2 = mesh->link[i])) + if (mesh2->info[team].state.grad < dist) + { + dir = i; + dist = mesh2->info[team].state.grad; + } + i = (i > 0) ? i - 1 : NB_DIRS - 1; + } while (i != start); } @@ -306,15 +306,17 @@ int *move_offset, *move_x, *move_y; int sens, start, table; int cpu_influence[NB_TEAMS] = { 0, 0, 0, 0, 0, 0 }; +#ifdef ASM int temp = 0; +#endif sens = 0; for (i = 0; i < NB_TEAMS; ++i) if (CURRENT_CURSOR[i].control_type == CONFIG_CONTROL_TYPE_CPU - && CURRENT_CURSOR[i].active) + && CURRENT_CURSOR[i].active) cpu_influence[CURRENT_CURSOR[i].team] = - LW_CONFIG_CURRENT_RULES.cpu_advantage; + LW_CONFIG_CURRENT_RULES.cpu_advantage; for (i = 0; i < PLAYING_TEAMS; ++i) { @@ -322,45 +324,47 @@ coef *= 256; coef /= CURRENT_ARMY_SIZE; if (coef > 256) - coef = 256; + coef = 256; coef *= - (LW_CONFIG_CURRENT_RULES.number_influence - - 8) * (LW_CONFIG_CURRENT_RULES.number_influence - 8); + (LW_CONFIG_CURRENT_RULES.number_influence - + 8) * (LW_CONFIG_CURRENT_RULES.number_influence - 8); coef /= 64; if (LW_CONFIG_CURRENT_RULES.number_influence < 8) - coef = -coef; + coef = -coef; if (coef < 0) - coef /= 2; + coef /= 2; coef += 256; attack[i] = (coef * - fsqrt (fsqrt (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack - + cpu_influence[i])))) / (256 * 8); + fixsqrt (fixsqrt + (1 << + (LW_CONFIG_CURRENT_RULES.fighter_attack + + cpu_influence[i])))) / (256 * 8); if (attack[i] >= MAX_FIGHTER_HEALTH) - attack[i] = MAX_FIGHTER_HEALTH - 1; + attack[i] = MAX_FIGHTER_HEALTH - 1; if (attack[i] < 1) - attack[i] = 1; + attack[i] = 1; defense[i] = (coef * - fsqrt (fsqrt - (1 << - (LW_CONFIG_CURRENT_RULES.fighter_defense + - cpu_influence[i])))) / (256 * 256); + fixsqrt (fixsqrt + (1 << + (LW_CONFIG_CURRENT_RULES.fighter_defense + + cpu_influence[i])))) / (256 * 256); if (defense[i] >= MAX_FIGHTER_HEALTH) - defense[i] = MAX_FIGHTER_HEALTH - 1; + defense[i] = MAX_FIGHTER_HEALTH - 1; if (defense[i] < 1) - defense[i] = 1; + defense[i] = 1; new_health[i] = (coef * - fsqrt (fsqrt - (1 << - (LW_CONFIG_CURRENT_RULES.fighter_new_health + - cpu_influence[i])))) / (256 * 4); + fixsqrt (fixsqrt + (1 << + (LW_CONFIG_CURRENT_RULES.fighter_new_health + + cpu_influence[i])))) / (256 * 4); if (new_health[i] >= MAX_FIGHTER_HEALTH) - new_health[i] = MAX_FIGHTER_HEALTH - 1; + new_health[i] = MAX_FIGHTER_HEALTH - 1; if (new_health[i] < 1) - new_health[i] = 1; + new_health[i] = 1; ACTIVE_FIGHTERS[i] = 0; } @@ -371,177 +375,177 @@ #ifdef ASM if (STARTUP_ASM && LW_CONFIG_CURRENT_RULES.asm_algorithm) boost_move_fighters (CURRENT_ARMY, - CURRENT_ARMY_SIZE, - CURRENT_AREA, - CURRENT_AREA_W, - ACTIVE_FIGHTERS, - attack, - defense, - new_health, - MAX_FIGHTER_HEALTH - 1, - sens, - start, - -GLOBAL_CLOCK, - FIGHTER_MOVE_XY_ASM[table], - FIGHTER_MOVE_OFFSET_ASM[table], - CURRENT_AREA_BACK->dat, - CURRENT_AREA_DISP->dat, - COLOR_FIRST_ENTRY, - COLORS_PER_TEAM, - LOCAL_DIR, - temp, temp, temp, temp, temp, temp, temp, temp); + CURRENT_ARMY_SIZE, + CURRENT_AREA, + CURRENT_AREA_W, + ACTIVE_FIGHTERS, + attack, + defense, + new_health, + MAX_FIGHTER_HEALTH - 1, + sens, + start, + -GLOBAL_CLOCK, + FIGHTER_MOVE_XY_ASM[table], + FIGHTER_MOVE_OFFSET_ASM[table], + CURRENT_AREA_BACK->dat, + CURRENT_AREA_DISP->dat, + COLOR_FIRST_ENTRY, + COLORS_PER_TEAM, + LOCAL_DIR, + temp, temp, temp, temp, temp, temp, temp, temp); else -#else - temp = 0; #endif - for (i = 0; i < CURRENT_ARMY_SIZE; ++i) - { - team = f->team; - ACTIVE_FIGHTERS[team]++; - start = (start < NB_DIRS - 1) ? start + 1 : 0; - - p = CURRENT_AREA + (f->y * CURRENT_AREA_W + f->x); - - if (p->mesh->info[team].update.time >= 0) - { - p->mesh->info[team].state.dir = - get_close_dir (p->mesh, f, team, (sens++) % 2, start); - } - else if ((-p->mesh->info[team].update.time) < GLOBAL_CLOCK) - { - p->mesh->info[team].state.dir = - get_main_dir (p->mesh, team, (sens++) % 2, start); - p->mesh->info[team].update.time = -GLOBAL_CLOCK; - } - - dir = p->mesh->info[team].state.dir; - - move_offset = FIGHTER_MOVE_OFFSET[table][dir]; - move_x = FIGHTER_MOVE_X[table][dir]; - move_y = FIGHTER_MOVE_Y[table][dir]; - - if (((p0 = p + move_offset[0])->mesh) && (!p0->fighter)) - { - erase_fighter (f); - p0->fighter = f; - p->fighter = NULL; - f->x += move_x[0]; - f->y += move_y[0]; - disp_fighter (f); - } - else - { - if (((p1 = p + move_offset[1])->mesh) && (!p1->fighter)) - { - erase_fighter (f); - p1->fighter = f; - p->fighter = NULL; - f->x += move_x[1]; - f->y += move_y[1]; - disp_fighter (f); - } - else - { - if (((p2 = p + move_offset[2])->mesh) && (!p2->fighter)) - { - erase_fighter (f); - p2->fighter = f; - p->fighter = NULL; - f->x += move_x[2]; - f->y += move_y[2]; - disp_fighter (f); - } - else - { - if (((p3 = p + move_offset[3])->mesh) && (!p3->fighter)) - { - erase_fighter (f); - p3->fighter = f; - p->fighter = NULL; - f->x += move_x[3]; - f->y += move_y[3]; - disp_fighter (f); - } - else - { - if (((p4 = p + move_offset[4])->mesh) && (!p4->fighter)) - { - erase_fighter (f); - p4->fighter = f; - p->fighter = NULL; - f->x += move_x[4]; - f->y += move_y[4]; - disp_fighter (f); - } - else - { - if (p0->mesh - && p0->fighter && p0->fighter->team != team) - { - p0->fighter->health -= attack[team]; - if (p0->fighter->health < 0) - { - while (p0->fighter->health < 0) - p0->fighter->health += new_health[team]; - p0->fighter->team = team; - } - disp_fighter (p0->fighter); - } - else - { - if (p1->mesh - && p1->fighter && p1->fighter->team != team) - { - p1->fighter->health -= attack[team] - >> SIDE_ATTACK_FACTOR; - if (p1->fighter->health < 0) - { - while (p1->fighter->health < 0) - p1->fighter->health += - new_health[team]; - p1->fighter->team = team; - } - disp_fighter (p1->fighter); - } - else - { - if (p2->mesh - && p2->fighter - && p2->fighter->team != team) - { - p2->fighter->health -= attack[team] - >> SIDE_ATTACK_FACTOR; - if (p2->fighter->health < 0) - { - while (p2->fighter->health < 0) - p2->fighter->health += - new_health[team]; - p2->fighter->team = team; - } - disp_fighter (p2->fighter); - } - else - { - if (p0->mesh - && p0->fighter - && p0->fighter->team == team) - { - p0->fighter->health += - defense[team]; - if (p0->fighter->health >= - MAX_FIGHTER_HEALTH) - p0->fighter->health = - MAX_FIGHTER_HEALTH - 1; - disp_fighter (p0->fighter); - } - } - } - } - } - } - } - } - } - f++; - } + for (i = 0; i < CURRENT_ARMY_SIZE; ++i) + { + team = f->team; + ACTIVE_FIGHTERS[team]++; + start = (start < NB_DIRS - 1) ? start + 1 : 0; + + p = CURRENT_AREA + (f->y * CURRENT_AREA_W + f->x); + + if (p->mesh->info[team].update.time >= 0) + { + p->mesh->info[team].state.dir = + get_close_dir (p->mesh, f, team, (sens++) % 2, start); + } + else if ((-p->mesh->info[team].update.time) < GLOBAL_CLOCK) + { + p->mesh->info[team].state.dir = + get_main_dir (p->mesh, team, (sens++) % 2, start); + p->mesh->info[team].update.time = -GLOBAL_CLOCK; + } + + dir = p->mesh->info[team].state.dir; + + move_offset = FIGHTER_MOVE_OFFSET[table][dir]; + move_x = FIGHTER_MOVE_X[table][dir]; + move_y = FIGHTER_MOVE_Y[table][dir]; + + if (((p0 = p + move_offset[0])->mesh) && (!p0->fighter)) + { + erase_fighter (f); + p0->fighter = f; + p->fighter = NULL; + f->x += move_x[0]; + f->y += move_y[0]; + disp_fighter (f); + } + else + { + if (((p1 = p + move_offset[1])->mesh) && (!p1->fighter)) + { + erase_fighter (f); + p1->fighter = f; + p->fighter = NULL; + f->x += move_x[1]; + f->y += move_y[1]; + disp_fighter (f); + } + else + { + if (((p2 = p + move_offset[2])->mesh) && (!p2->fighter)) + { + erase_fighter (f); + p2->fighter = f; + p->fighter = NULL; + f->x += move_x[2]; + f->y += move_y[2]; + disp_fighter (f); + } + else + { + if (((p3 = p + move_offset[3])->mesh) && (!p3->fighter)) + { + erase_fighter (f); + p3->fighter = f; + p->fighter = NULL; + f->x += move_x[3]; + f->y += move_y[3]; + disp_fighter (f); + } + else + { + if (((p4 = p + move_offset[4])->mesh) + && (!p4->fighter)) + { + erase_fighter (f); + p4->fighter = f; + p->fighter = NULL; + f->x += move_x[4]; + f->y += move_y[4]; + disp_fighter (f); + } + else + { + if (p0->mesh + && p0->fighter && p0->fighter->team != team) + { + p0->fighter->health -= attack[team]; + if (p0->fighter->health < 0) + { + while (p0->fighter->health < 0) + p0->fighter->health += new_health[team]; + p0->fighter->team = team; + } + disp_fighter (p0->fighter); + } + else + { + if (p1->mesh + && p1->fighter + && p1->fighter->team != team) + { + p1->fighter->health -= attack[team] + >> SIDE_ATTACK_FACTOR; + if (p1->fighter->health < 0) + { + while (p1->fighter->health < 0) + p1->fighter->health += + new_health[team]; + p1->fighter->team = team; + } + disp_fighter (p1->fighter); + } + else + { + if (p2->mesh + && p2->fighter + && p2->fighter->team != team) + { + p2->fighter->health -= attack[team] + >> SIDE_ATTACK_FACTOR; + if (p2->fighter->health < 0) + { + while (p2->fighter->health < 0) + p2->fighter->health += + new_health[team]; + p2->fighter->team = team; + } + disp_fighter (p2->fighter); + } + else + { + if (p0->mesh + && p0->fighter + && p0->fighter->team == team) + { + p0->fighter->health += + defense[team]; + if (p0->fighter->health >= + MAX_FIGHTER_HEALTH) + p0->fighter->health = + MAX_FIGHTER_HEALTH - 1; + disp_fighter (p0->fighter); + } + } + } + } + } + } + } + } + } + f++; + } } diff -Nru liquidwar-5.6.4/src/fighter.h liquidwar-5.6.5/src/fighter.h --- liquidwar-5.6.4/src/fighter.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/fighter.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/game.c liquidwar-5.6.5/src/game.c --- liquidwar-5.6.4/src/game.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/game.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -129,25 +129,25 @@ for (i = 0; i < NB_TEAMS; ++i) { if (LW_NETWORK_ON) - { - /* - * We're in a network game - */ - if (LW_NETWORK_INFO[i].active) - { - PLAYING_TEAMS++; - } - } + { + /* + * We're in a network game + */ + if (LW_NETWORK_INFO[i].active) + { + PLAYING_TEAMS++; + } + } else - { - /* - * Not a network game, we only check the local config - */ - if (CONFIG_CONTROL_TYPE[i] != CONFIG_CONTROL_TYPE_OFF) - { - PLAYING_TEAMS++; - } - } + { + /* + * Not a network game, we only check the local config + */ + if (CONFIG_CONTROL_TYPE[i] != CONFIG_CONTROL_TYPE_OFF) + { + PLAYING_TEAMS++; + } + } } } @@ -172,18 +172,18 @@ for (i = 0; i < NB_TEAMS; ++i) { if (LW_NETWORK_ON) - { - CURRENT_CURSOR[i].from_network = LW_NETWORK_INFO[i].network; - CURRENT_CURSOR[i].control_type = LW_NETWORK_INFO[i].control_type; - } + { + CURRENT_CURSOR[i].from_network = LW_NETWORK_INFO[i].network; + CURRENT_CURSOR[i].control_type = LW_NETWORK_INFO[i].control_type; + } else - { - /* - * local teams - */ - CURRENT_CURSOR[i].from_network = 0; - CURRENT_CURSOR[i].control_type = CONFIG_CONTROL_TYPE[i]; - } + { + /* + * local teams + */ + CURRENT_CURSOR[i].from_network = 0; + CURRENT_CURSOR[i].control_type = CONFIG_CONTROL_TYPE[i]; + } } } @@ -213,15 +213,15 @@ * if there are no fighters left, then the game is lost */ if (ACTIVE_FIGHTERS[i] == 0) - { - /* - * nothing will be calculated for this team anymore - */ - eliminate_team (i); - lost = 1; - } + { + /* + * nothing will be calculated for this team anymore + */ + eliminate_team (i); + lost = 1; + } else - ++i; + ++i; } /* * now we check if the previous loop has given some results @@ -276,13 +276,13 @@ if (!message && (CURRENT_AREA_BACK = lw_maptex_create_map (CONFIG_LEVEL_MAP, - CONFIG_LEVEL_FG, - CONFIG_LEVEL_BG, - LW_NETWORK_ON, - LW_RANDOM_ON, - MIN_MAP_RES_W[LW_CONFIG_CURRENT_RULES.min_map_res], - MIN_MAP_RES_H[LW_CONFIG_CURRENT_RULES.min_map_res], - CONFIG_USE_DEFAULT_TEXTURE)) == NULL) + CONFIG_LEVEL_FG, + CONFIG_LEVEL_BG, + LW_NETWORK_ON, + LW_RANDOM_ON, + MIN_MAP_RES_W[LW_CONFIG_CURRENT_RULES.min_map_res], + MIN_MAP_RES_H[LW_CONFIG_CURRENT_RULES.min_map_res], + CONFIG_USE_DEFAULT_TEXTURE)) == NULL) message = lw_lang_string (LW_LANG_STRING_GAME_BACKMEMFAIL); /* @@ -293,92 +293,92 @@ if (!message && (CURRENT_AREA_DISP = lw_maptex_create_map (CONFIG_LEVEL_MAP, - CONFIG_LEVEL_FG, - CONFIG_LEVEL_BG, - LW_NETWORK_ON, - LW_RANDOM_ON, - MIN_MAP_RES_W[LW_CONFIG_CURRENT_RULES.min_map_res], - MIN_MAP_RES_H[LW_CONFIG_CURRENT_RULES.min_map_res], - CONFIG_USE_DEFAULT_TEXTURE)) == NULL) + CONFIG_LEVEL_FG, + CONFIG_LEVEL_BG, + LW_NETWORK_ON, + LW_RANDOM_ON, + MIN_MAP_RES_W[LW_CONFIG_CURRENT_RULES.min_map_res], + MIN_MAP_RES_H[LW_CONFIG_CURRENT_RULES.min_map_res], + CONFIG_USE_DEFAULT_TEXTURE)) == NULL) message = lw_lang_string (LW_LANG_STRING_GAME_DISPMEMFAIL); if (!message) { for (i = 0; !max_mem_reached && !ok; ++i) - { - message = NULL; - reset_big_data (); - - /* - * creation of the mesh, see mesh.c for details - */ - if (!message && create_mesh ()) - message = lw_lang_string (LW_LANG_STRING_GAME_MESHMEMFAIL); - - /* - * creation of the game area, see area.c for details - */ - if (!message && create_game_area ()) - message = lw_lang_string (LW_LANG_STRING_GAME_AREAMEMFAIL); - - /* - * creation of the armies, see army.c for details - */ - if (!message && create_army ()) - message = lw_lang_string (LW_LANG_STRING_GAME_ARMYMEMFAIL); - - if (message) - { - /* - * There's an error. - */ - if (last_try) - { - /* - * OK, last time we allocated memory, we couldn't - * allocate all we wanted to, and this is not - * enough -> we give up... - */ - max_mem_reached = 0; - } - else - { - /* - * We increase the amount of allocated memory - */ - STARTUP_BIG_DATA += LW_STARTUP_MEM_STEP; - if (STARTUP_BIG_DATA > LW_STARTUP_MEM_MAX) - { - last_try = 1; - STARTUP_BIG_DATA = LW_STARTUP_MEM_MAX; - } - big_data = STARTUP_BIG_DATA; - if (malloc_big_data ()) - { - if (STARTUP_BIG_DATA != big_data) - { - /* - * not all the memory could be - * allocated, we consider this is - * the last try. - */ - last_try = 1; - } - } - else - { - /* - * memory allocation failed... - */ - max_mem_reached = 1; - } - } - } - else - { - ok = 1; - } - } + { + message = NULL; + reset_big_data (); + + /* + * creation of the mesh, see mesh.c for details + */ + if (!message && create_mesh ()) + message = lw_lang_string (LW_LANG_STRING_GAME_MESHMEMFAIL); + + /* + * creation of the game area, see area.c for details + */ + if (!message && create_game_area ()) + message = lw_lang_string (LW_LANG_STRING_GAME_AREAMEMFAIL); + + /* + * creation of the armies, see army.c for details + */ + if (!message && create_army ()) + message = lw_lang_string (LW_LANG_STRING_GAME_ARMYMEMFAIL); + + if (message) + { + /* + * There's an error. + */ + if (last_try) + { + /* + * OK, last time we allocated memory, we couldn't + * allocate all we wanted to, and this is not + * enough -> we give up... + */ + max_mem_reached = 0; + } + else + { + /* + * We increase the amount of allocated memory + */ + STARTUP_BIG_DATA += LW_STARTUP_MEM_STEP; + if (STARTUP_BIG_DATA > LW_STARTUP_MEM_MAX) + { + last_try = 1; + STARTUP_BIG_DATA = LW_STARTUP_MEM_MAX; + } + big_data = STARTUP_BIG_DATA; + if (malloc_big_data ()) + { + if (STARTUP_BIG_DATA != big_data) + { + /* + * not all the memory could be + * allocated, we consider this is + * the last try. + */ + last_try = 1; + } + } + else + { + /* + * memory allocation failed... + */ + max_mem_reached = 1; + } + } + } + else + { + ok = 1; + } + } } /* @@ -761,90 +761,90 @@ * - the game time is elapsed */ while ((!WATCHDOG_SCANCODE[KEY_ESC]) - && (PLAYING_TEAMS >= 2) - && (TIME_LEFT > 0) && (!LW_NETWORK_ERROR_DETECTED)) - { - /* - * global time checking - */ - start_profile (GLOBAL_PROFILE); - - /* - * will contain how mush called to logic have been performed - */ - lr = 0; - do - { - /* - * we call logic, calculates stuff, move players etc... - */ - logic (); - - /* - * Now we decide to go idel if it happens that the computer - * is calculating this "too fast". This will enable people - * too play Liquid War even on a very very fast machine - */ - while (get_ticker () < last_logic_time - + LOGIC_DELAY_MIN[CONFIG_ROUNDS_PER_SEC_LIMIT]) - { + && (PLAYING_TEAMS >= 2) + && (TIME_LEFT > 0) && (!LW_NETWORK_ERROR_DETECTED)) + { + /* + * global time checking + */ + start_profile (GLOBAL_PROFILE); + + /* + * will contain how mush called to logic have been performed + */ + lr = 0; + do + { + /* + * we call logic, calculates stuff, move players etc... + */ + logic (); + + /* + * Now we decide to go idel if it happens that the computer + * is calculating this "too fast". This will enable people + * too play Liquid War even on a very very fast machine + */ + while (get_ticker () < last_logic_time + + LOGIC_DELAY_MIN[CONFIG_ROUNDS_PER_SEC_LIMIT]) + { #ifdef UNIX - /* - * The usleep calls prevents the game from eating 100% of the - * CPU time on UNIX platforms. - */ - usleep (1000); + /* + * The usleep calls prevents the game from eating 100% of the + * CPU time on UNIX platforms. + */ + usleep (1000); #else - /* - * Rest does not seem to spare CPU time, but at least it - * slows the game down - */ - rest (1); + /* + * Rest does not seem to spare CPU time, but at least it + * slows the game down + */ + rest (1); #endif - //yield_timeslice (); deprecated - } - last_logic_time = get_ticker (); - - lr++; - } - while - /* - * if CONFIG_FPS_LIMIT is 0 we stop right away, ie - * there will be one logic() operation for each display() - * if it is 1, we keep going until we exceed the - * CONFIG_FPS_LIMIT value. this way we avoid drawing - * 300 frames / second, which is useless - * this method speeds the game on powerfull machines - * for one can limit the display to 20 frames / seconds - * and keep the rest of the CPU for calls to logic() - */ - (CONFIG_FRAMES_PER_SEC_LIMIT - && (get_ticker () < last_display_time - + DISPLAY_DELAY_MIN[CONFIG_FRAMES_PER_SEC_LIMIT])); - /* - * tells the profile module about how much logic operations - * have been done for this display - */ - update_logic_rate (lr); - - /* - * we get the information "when has the last call to display() - * been done" - */ - last_display_time = get_ticker (); - - /* - * now we really display stuff, (takes time...) - */ - display (); - - /* - * Now we check if the "Close" button has been clicked - */ - my_exit_poll (); + //yield_timeslice (); deprecated + } + last_logic_time = get_ticker (); + + lr++; + } + while + /* + * if CONFIG_FPS_LIMIT is 0 we stop right away, ie + * there will be one logic() operation for each display() + * if it is 1, we keep going until we exceed the + * CONFIG_FPS_LIMIT value. this way we avoid drawing + * 300 frames / second, which is useless + * this method speeds the game on powerfull machines + * for one can limit the display to 20 frames / seconds + * and keep the rest of the CPU for calls to logic() + */ + (CONFIG_FRAMES_PER_SEC_LIMIT + && (get_ticker () < last_display_time + + DISPLAY_DELAY_MIN[CONFIG_FRAMES_PER_SEC_LIMIT])); + /* + * tells the profile module about how much logic operations + * have been done for this display + */ + update_logic_rate (lr); + + /* + * we get the information "when has the last call to display() + * been done" + */ + last_display_time = get_ticker (); + + /* + * now we really display stuff, (takes time...) + */ + display (); + + /* + * Now we check if the "Close" button has been clicked + */ + my_exit_poll (); - stop_profile (GLOBAL_PROFILE); - } + stop_profile (GLOBAL_PROFILE); + } } /* * cleans up the double buffer system diff -Nru liquidwar-5.6.4/src/game.h liquidwar-5.6.5/src/game.h --- liquidwar-5.6.4/src/game.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/game.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/gfxmode.c liquidwar-5.6.5/src/gfxmode.c --- liquidwar-5.6.4/src/gfxmode.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/gfxmode.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -79,9 +79,14 @@ #endif #ifdef UNIX +#ifdef GP2X +int GFX_MODE_W[5] = { 320, 320, 320, 320, 320 }; +int GFX_MODE_H[5] = { 240, 240, 240, 240, 240 }; +#else int GFX_MODE_W[5] = { 320, 512, 640, 800, 1024 }; int GFX_MODE_H[5] = { 240, 384, 480, 600, 768 }; #endif +#endif #ifdef DOS static int GFX_MODE_TYPE_FULLSCREEN[] = { GFX_MODEX, @@ -90,6 +95,7 @@ GFX_VESA2L, GFX_VESA2L }; + static int GFX_MODE_TYPE_WINDOWED[] = { GFX_MODEX, GFX_MODEX, GFX_VESA2L, @@ -105,6 +111,7 @@ GFX_DIRECTX, GFX_DIRECTX }; + static int GFX_MODE_TYPE_WINDOWED[] = { GFX_DIRECTX_WIN, GFX_DIRECTX_WIN, GFX_DIRECTX_WIN, @@ -114,12 +121,28 @@ #endif #ifdef UNIX +#ifdef GP2X +static int GFX_MODE_TYPE_FULLSCREEN[] = { GFX_GP2X, + GFX_GP2X, + GFX_GP2X, + GFX_GP2X, + GFX_GP2X +}; + +static int GFX_MODE_TYPE_WINDOWED[] = { GFX_GP2X, + GFX_GP2X, + GFX_GP2X, + GFX_GP2X, + GFX_GP2X +}; +#else static int GFX_MODE_TYPE_FULLSCREEN[] = { GFX_AUTODETECT_FULLSCREEN, GFX_AUTODETECT_FULLSCREEN, GFX_AUTODETECT_FULLSCREEN, GFX_AUTODETECT_FULLSCREEN, GFX_AUTODETECT_FULLSCREEN }; + static int GFX_MODE_TYPE_WINDOWED[] = { GFX_AUTODETECT_WINDOWED, GFX_AUTODETECT_WINDOWED, GFX_AUTODETECT_WINDOWED, @@ -127,6 +150,7 @@ GFX_AUTODETECT_WINDOWED }; #endif +#endif /*==================================================================*/ /* fonctions */ @@ -190,6 +214,10 @@ int toggle; int i; +#ifdef GP2X + fullscreen = 1; +#endif + if (flip_enabled) { *flip_enabled = 0; @@ -198,35 +226,35 @@ for (toggle = 0; toggle < 2; ++toggle, fullscreen = !fullscreen) { for (i = res; i >= 0 && ret; --i) - { - if (flip) - { - ret = try_one_mode (i, 1, fullscreen); - if (flip_enabled && !ret) - { - *flip_enabled = 1; - } - } - if (ret) - { - ret = try_one_mode (i, 0, fullscreen); - } - } + { + if (flip) + { + ret = try_one_mode (i, 1, fullscreen); + if (flip_enabled && !ret) + { + *flip_enabled = 1; + } + } + if (ret) + { + ret = try_one_mode (i, 0, fullscreen); + } + } for (i = res + 1; i < 5 && ret; ++i) - { - if (flip) - { - ret = try_one_mode (i, 1, fullscreen); - if (flip_enabled && !ret) - { - *flip_enabled = 1; - } - } - if (ret) - { - ret = try_one_mode (i, 0, fullscreen); - } - } + { + if (flip) + { + ret = try_one_mode (i, 1, fullscreen); + if (flip_enabled && !ret) + { + *flip_enabled = 1; + } + } + if (ret) + { + ret = try_one_mode (i, 0, fullscreen); + } + } } if (!ret) @@ -234,13 +262,13 @@ set_palette (black_palette); if (SCREEN_W >= 640) - { - font = BIG_FONT; - } + { + font = BIG_FONT; + } else - { - font = SMALL_FONT; - } + { + font = SMALL_FONT; + } lw_mouse_show (); diff -Nru liquidwar-5.6.4/src/gfxmode.h liquidwar-5.6.5/src/gfxmode.h --- liquidwar-5.6.4/src/gfxmode.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/gfxmode.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/glouglou.h liquidwar-5.6.5/src/glouglou.h --- liquidwar-5.6.4/src/glouglou.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/glouglou.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -63,22 +63,22 @@ /*==================================================================*/ extern void LW_ASM_FUNC draw_distor_line (BITMAP * distorsion_target, - int current_area_w, - int w, - int u, - int fp_x, - int ip_x, - int fp_y, - int ip_y, - int lim_w, - int lim_h, - int *fp_x0, - int *y_corres, - int *WAVE_SHAPE_WX, - int **WAVE_SHAPE_X_CORRES, - char *src, - int temp1, - int temp2, - int temp3, int temp4, int temp5); + int current_area_w, + int w, + int u, + int fp_x, + int ip_x, + int fp_y, + int ip_y, + int lim_w, + int lim_h, + int *fp_x0, + int *y_corres, + int *WAVE_SHAPE_WX, + int **WAVE_SHAPE_X_CORRES, + char *src, + int temp1, + int temp2, + int temp3, int temp4, int temp5); #endif diff -Nru liquidwar-5.6.4/src/glouglou.s liquidwar-5.6.5/src/glouglou.s --- liquidwar-5.6.4/src/glouglou.s 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/glouglou.s 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/grad.c liquidwar-5.6.5/src/grad.c --- liquidwar-5.6.4/src/grad.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/grad.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -87,17 +87,17 @@ { i = 0; for (y = 0; y < CURRENT_AREA_H; ++y) - for (x = 0; x < CURRENT_AREA_W; ++x) - { - if ((temp = CURRENT_AREA[i++].mesh) != NULL) - { - color = (temp->info[team].state.grad - + AREA_START_GRADIENT) % COLORS_PER_TEAM; - putpixel (result, x, y, color + COLOR_FIRST_ENTRY[team]); - } - else - putpixel (result, x, y, MENU_BG); - } + for (x = 0; x < CURRENT_AREA_W; ++x) + { + if ((temp = CURRENT_AREA[i++].mesh) != NULL) + { + color = (temp->info[team].state.grad + + AREA_START_GRADIENT) % COLORS_PER_TEAM; + putpixel (result, x, y, color + COLOR_FIRST_ENTRY[team]); + } + else + putpixel (result, x, y, MENU_BG); + } } return result; @@ -117,10 +117,10 @@ for (y = 0; y < CURRENT_AREA_H; ++y) for (x = 0; x < CURRENT_AREA_W; ++x) { - if ((temp = CURRENT_AREA[i++].mesh) != NULL) - putpixel (result, x, y, 134 - + (temp->info[team].state.dir / 4) * 42 - + (temp->info[team].state.dir % 4) * 10); + if ((temp = CURRENT_AREA[i++].mesh) != NULL) + putpixel (result, x, y, 134 + + (temp->info[team].state.dir / 4) * 42 + + (temp->info[team].state.dir % 4) * 10); } return result; @@ -151,41 +151,41 @@ last = CURRENT_MESH + CURRENT_MESH_SIZE; #ifdef ASM if (STARTUP_ASM && LW_CONFIG_CURRENT_RULES.asm_algorithm) - switch (PLAYING_TEAMS) - { - case 6: - boost_gradient_down_6 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - case 5: - boost_gradient_down_5 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - case 4: - boost_gradient_down_4 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - case 3: - boost_gradient_down_3 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - default: - boost_gradient_down_2 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - } + switch (PLAYING_TEAMS) + { + case 6: + boost_gradient_down_6 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + case 5: + boost_gradient_down_5 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + case 4: + boost_gradient_down_4 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + case 3: + boost_gradient_down_3 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + default: + boost_gradient_down_2 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + } else #endif - while (pos != last) - { - for (i = 0; i < PLAYING_TEAMS; ++i) - if ((temp = (pos->link[dir])) - && (temp->info[i].state.grad - > (new_grad = - pos->info[i].state.grad + pos->side.size))) - temp->info[i].state.grad = new_grad; - pos++; - } + while (pos != last) + { + for (i = 0; i < PLAYING_TEAMS; ++i) + if ((temp = (pos->link[dir])) + && (temp->info[i].state.grad + > (new_grad = + pos->info[i].state.grad + pos->side.size))) + temp->info[i].state.grad = new_grad; + pos++; + } break; case DIR_WSW: case DIR_WNW: @@ -197,41 +197,41 @@ last = CURRENT_MESH - 1; #ifdef ASM if (STARTUP_ASM && LW_CONFIG_CURRENT_RULES.asm_algorithm) - switch (PLAYING_TEAMS) - { - case 6: - boost_gradient_up_6 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - case 5: - boost_gradient_up_5 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - case 4: - boost_gradient_up_4 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - case 3: - boost_gradient_up_3 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - default: - boost_gradient_up_2 - (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); - break; - } + switch (PLAYING_TEAMS) + { + case 6: + boost_gradient_up_6 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + case 5: + boost_gradient_up_5 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + case 4: + boost_gradient_up_4 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + case 3: + boost_gradient_up_3 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + default: + boost_gradient_up_2 + (pos, CURRENT_MESH_SIZE - 1, OFFSET_TO_FIRST_LINK + dir * 4); + break; + } else #endif - while (pos != last) - { - for (i = 0; i < PLAYING_TEAMS; ++i) - if ((temp = (pos->link[dir])) - && (temp->info[i].state.grad - > (new_grad = - pos->info[i].state.grad + pos->side.size))) - temp->info[i].state.grad = new_grad; - pos--; - } + while (pos != last) + { + for (i = 0; i < PLAYING_TEAMS; ++i) + if ((temp = (pos->link[dir])) + && (temp->info[i].state.grad + > (new_grad = + pos->info[i].state.grad + pos->side.size))) + temp->info[i].state.grad = new_grad; + pos--; + } break; } } diff -Nru liquidwar-5.6.4/src/grad.h liquidwar-5.6.5/src/grad.h --- liquidwar-5.6.4/src/grad.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/grad.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/graphics.c liquidwar-5.6.5/src/graphics.c --- liquidwar-5.6.4/src/graphics.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/graphics.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -83,9 +83,9 @@ static char str[30]; LW_MACRO_SPRINTF3 (str, "%s:%dx%d", - lw_lang_string (LW_LANG_STRING_GRAPHICS_GAME), - GFX_MODE_W[CONFIG_GFX_GAME], - GFX_MODE_H[CONFIG_GFX_GAME]); + lw_lang_string (LW_LANG_STRING_GRAPHICS_GAME), + GFX_MODE_W[CONFIG_GFX_GAME], + GFX_MODE_H[CONFIG_GFX_GAME]); return str; } @@ -97,9 +97,9 @@ static char str[30]; LW_MACRO_SPRINTF3 (str, "%s:%dx%d", - lw_lang_string (LW_LANG_STRING_GRAPHICS_MENU), - GFX_MODE_W[CONFIG_GFX_MENU], - GFX_MODE_H[CONFIG_GFX_MENU]); + lw_lang_string (LW_LANG_STRING_GRAPHICS_MENU), + GFX_MODE_W[CONFIG_GFX_MENU], + GFX_MODE_H[CONFIG_GFX_MENU]); return str; } @@ -204,15 +204,15 @@ while (retour == 0) { for (i = 0; i < 7; ++i) - { - standard_button (d + i + 4, 0, y_pos[i], 2, 10); - d[i + 4].proc = my_textbox_proc; - } + { + standard_button (d + i + 4, 0, y_pos[i], 2, 10); + d[i + 4].proc = my_textbox_proc; + } for (i = 0; i < 7; ++i) - { - standard_button (d + i + 11, 1, y_pos[i], 2, 10); - d[i + 11].proc = my_slider_proc; - } + { + standard_button (d + i + 11, 1, y_pos[i], 2, 10); + d[i + 11].proc = my_slider_proc; + } standard_button (d + 18, 0, 9, 1, 10); d[18].dp = lw_lang_string (LW_LANG_STRING_GRAPHICS_ADVANCED); @@ -226,19 +226,19 @@ d[9].dp = lw_lang_string (LW_LANG_STRING_GRAPHICS_PAGEFLIPPING); d[10].dp = lw_lang_string (LW_LANG_STRING_GRAPHICS_WAVES); d[11].dp = d[12].dp = d[13].dp = d[14].dp = d[15].dp = d[16].dp = - d[17].dp = NULL; + d[17].dp = NULL; d[12].d1 = 18; d[13].d1 = d[14].d1 = 4; d[15].d1 = 8; d[16].d1 = 8; d[15].dp3 = &CONFIG_VIEWPORT_SIZE; for (i = 15; i < 16; ++i) - { - d[i].dp = NULL; - d[i].dp2 = slider_int; - temp = d[i].dp3; - d[i].d2 = *temp; - } + { + d[i].dp = NULL; + d[i].dp2 = slider_int; + temp = d[i].dp3; + d[i].d2 = *temp; + } d[12].dp = d[13].dp = d[14].dp = NULL; d[12].d2 = CONFIG_BRIGHTNESS; d[13].d2 = CONFIG_GFX_MENU; @@ -274,95 +274,95 @@ game_res_changed = 0; if (menu_res_changed || fullscreen_changed) - { - menu_res_changed = 0; - fullscreen_changed = 0; - display_back_image (); - dp = my_init_dialog (d, choix); - my_fade_in (); - } + { + menu_res_changed = 0; + fullscreen_changed = 0; + display_back_image (); + dp = my_init_dialog (d, choix); + my_fade_in (); + } else - dp = my_init_dialog (d, choix); + dp = my_init_dialog (d, choix); show_mouse (screen); while ((menu_res_changed == 0) && - (game_res_changed == 0) && my_update_dialog (dp)) - ; + (game_res_changed == 0) && my_update_dialog (dp)) + ; choix = shutdown_dialog (dp); if (menu_res_changed) - { - if (d[13].d2 != CONFIG_GFX_MENU) - { - my_fade_out (); - if (set_resolution (d[13].d2, 0, CONFIG_FULLSCREEN, NULL)) - CONFIG_GFX_MENU = 0; - else - CONFIG_GFX_MENU = d[13].d2; - } - d[13].dp = get_menu_res_str (); - } + { + if (d[13].d2 != CONFIG_GFX_MENU) + { + my_fade_out (); + if (set_resolution (d[13].d2, 0, CONFIG_FULLSCREEN, NULL)) + CONFIG_GFX_MENU = 0; + else + CONFIG_GFX_MENU = d[13].d2; + } + d[13].dp = get_menu_res_str (); + } else - { - if (game_res_changed) - { - CONFIG_GFX_GAME = d[14].d2; - d[14].dp = get_game_res_str (); - retour = 0; - } - else - { - play_click (); - switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 11: - CONFIG_FULLSCREEN = CONFIG_FULLSCREEN ? 0 : 1; - d[11].dp = get_fullscreen_str (); - scare_mouse (); - my_button_proc (MSG_DRAW, d + 11, 0); - unscare_mouse (); - fullscreen_changed = 1; - my_fade_out (); - set_resolution (d[13].d2, 0, CONFIG_FULLSCREEN, NULL); - break; - case 16: - CONFIG_PAGE_FLIP = CONFIG_PAGE_FLIP ? 0 : 1; - d[16].dp = get_page_flip_str (); - scare_mouse (); - my_button_proc (MSG_DRAW, d + 16, 0); - unscare_mouse (); - break; - case 17: - CONFIG_WAVE_ON = CONFIG_WAVE_ON ? 0 : 1; - d[17].dp = get_wave_mode_str (); - scare_mouse (); - my_button_proc (MSG_DRAW, d + 17, 0); - unscare_mouse (); - break; - case 18: - retour = wave_options (); - display_back_image (); - break; - } - } - } + { + if (game_res_changed) + { + CONFIG_GFX_GAME = d[14].d2; + d[14].dp = get_game_res_str (); + retour = 0; + } + else + { + play_click (); + switch (choix) + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 11: + CONFIG_FULLSCREEN = CONFIG_FULLSCREEN ? 0 : 1; + d[11].dp = get_fullscreen_str (); + scare_mouse (); + my_button_proc (MSG_DRAW, d + 11, 0); + unscare_mouse (); + fullscreen_changed = 1; + my_fade_out (); + set_resolution (d[13].d2, 0, CONFIG_FULLSCREEN, NULL); + break; + case 16: + CONFIG_PAGE_FLIP = CONFIG_PAGE_FLIP ? 0 : 1; + d[16].dp = get_page_flip_str (); + scare_mouse (); + my_button_proc (MSG_DRAW, d + 16, 0); + unscare_mouse (); + break; + case 17: + CONFIG_WAVE_ON = CONFIG_WAVE_ON ? 0 : 1; + d[17].dp = get_wave_mode_str (); + scare_mouse (); + my_button_proc (MSG_DRAW, d + 17, 0); + unscare_mouse (); + break; + case 18: + retour = wave_options (); + display_back_image (); + break; + } + } + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/graphics.h liquidwar-5.6.5/src/graphics.h --- liquidwar-5.6.4/src/graphics.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/graphics.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/help.c liquidwar-5.6.5/src/help.c --- liquidwar-5.6.4/src/help.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/help.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -107,22 +107,22 @@ { choix = my_do_dialog_no_clear (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + break; + } } if (retour > 0) retour--; diff -Nru liquidwar-5.6.4/src/help.h liquidwar-5.6.5/src/help.h --- liquidwar-5.6.4/src/help.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/help.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/httputil.c liquidwar-5.6.5/src/httputil.c --- liquidwar-5.6.4/src/httputil.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/httputil.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -68,7 +68,7 @@ /*==================================================================*/ #define LW_HTTPUTIL_PORT 80 -#define LW_HTTPUTIL_HOST_SIZE 200 +#define LW_HTTPUTIL_HOST_PORT_SIZE 200 #define LW_HTTPUTIL_REQUEST_SIZE 1000 #define LW_HTTPUTIL_EMPTY_LINES_LIMIT 10 #define LW_HTTPUTIL_MIN_LEN 1 @@ -105,112 +105,129 @@ { int result = 0; char ip[LW_SOCK_IP_SIZE]; - char host[LW_HTTPUTIL_HOST_SIZE + 1]; + char host_port[LW_HTTPUTIL_HOST_PORT_SIZE + 1]; + char host_only[LW_HTTPUTIL_HOST_PORT_SIZE + 1]; char request[LW_HTTPUTIL_REQUEST_SIZE + 1]; char data[LW_SOCK_MESSAGE_SIZE]; int data_len; char *search; int sock; int empty_lines = 0; + int port = LW_HTTPUTIL_PORT; memset (content, 0, size); - LW_MACRO_STRCPY (host, url); + LW_MACRO_STRCPY (host_port, url); - search = strchr (host, '/'); + search = strchr (host_port, '/'); if (search) { (*search) = '\0'; } + search = NULL; - LW_MACRO_SPRINTF2 (request, LW_HTTPUTIL_GET_CMD, url, host); + memcpy (host_only, host_port, LW_HTTPUTIL_HOST_PORT_SIZE + 1); + search = strchr (host_only, ':'); + if (search) + { + (*search) = '\0'; + port = atoi (search + 1); + if (port < 1 || port > 65535) + { + port = LW_HTTPUTIL_PORT; + } + } + search = NULL; + + LW_MACRO_SPRINTF2 (request, LW_HTTPUTIL_GET_CMD, url, host_only); - if (lw_dnsutil_name_to_ip (ip, host)) + if (lw_dnsutil_name_to_ip (ip, host_only)) { - if (lw_sock_connect (&sock, ip, LW_HTTPUTIL_PORT)) - { - if (lw_sock_send_str (&sock, request)) - { - result = 1; - /* read status line */ - if (result && lw_sock_recv_str (&sock, data) != 1) - { - result = 0; - LW_MACRO_SNPRINTF0 (content, size, - "Failed to read status line"); - } - /* make sure status code starts with 2 */ - if (result && - !((search = strchr (data, ' ')) && search[1] == '2')) - { - result = 0; - LW_MACRO_SNPRINTF2 (content, size, - "Failure from web server \"%s\": \"%s\"", - host, data); - } - if (result) - { - /* skip past headers */ - while ((result = - (result && (lw_sock_recv_str (&sock, data) == 1))) - && data[0]) - { - /* nothing to do here */ - } - - if (result) - { - /* finally, we read the list of servers */ - while (lw_sock_recv_str (&sock, data) == 1 && - empty_lines < LW_HTTPUTIL_EMPTY_LINES_LIMIT) - { - data_len = strlen (data); - /* - * If the line is too short, we ignore it, - * in fact, we get many "too short" lines - * such as the size of the file for instance, - * which is shown as an hex number in HTTP 1.1 - * - * No "usefull" line should be smaller than - * LW_HTTPUTIL_MIN_LEN however. - */ - if (data_len > LW_HTTPUTIL_MIN_LEN) - { - if ((int) (strlen (content) + data_len) < - size - 2) - { - LW_MACRO_STRNCAT (content, data, size); - LW_MACRO_STRNCAT (content, "\n", size); - } - } - if (data_len == 0) - { - empty_lines++; - } - } - } - else - { - LW_MACRO_SNPRINTF0 (content, size, - "Failed to read headers"); - } - } - } - else - { - LW_MACRO_SNPRINTF1 (content, size, "Request \"%s\" failed!", - request); - } - lw_sock_close (&sock); - } + if (lw_sock_connect (&sock, ip, port)) + { + if (lw_sock_send_str (&sock, request)) + { + result = 1; + /* read status line */ + if (result && lw_sock_recv_str (&sock, data) != 1) + { + result = 0; + LW_MACRO_SNPRINTF0 (content, size, + "Failed to read status line"); + } + /* make sure status code starts with 2 */ + if (result && + !((search = strchr (data, ' ')) && search[1] == '2')) + { + result = 0; + LW_MACRO_SNPRINTF2 (content, size, + "Failure from web server \"%s\": \"%s\"", + host_port, data); + } + if (result) + { + /* skip past headers */ + while ((result = + (result && (lw_sock_recv_str (&sock, data) == 1))) + && data[0]) + { + /* nothing to do here */ + } + + if (result) + { + /* finally, we read the list of servers */ + while (lw_sock_recv_str (&sock, data) == 1 && + empty_lines < LW_HTTPUTIL_EMPTY_LINES_LIMIT) + { + data_len = strlen (data); + /* + * If the line is too short, we ignore it, + * in fact, we get many "too short" lines + * such as the size of the file for instance, + * which is shown as an hex number in HTTP 1.1 + * + * No "usefull" line should be smaller than + * LW_HTTPUTIL_MIN_LEN however. + */ + if (data_len > LW_HTTPUTIL_MIN_LEN) + { + if ((int) (strlen (content) + data_len) < + size - 2) + { + LW_MACRO_STRNCAT (content, data, size); + LW_MACRO_STRNCAT (content, "\n", size); + } + } + if (data_len == 0) + { + empty_lines++; + } + } + } + else + { + LW_MACRO_SNPRINTF0 (content, size, + "Failed to read headers"); + } + } + } + else + { + LW_MACRO_SNPRINTF1 (content, size, "Request \"%s\" failed!", + request); + } + lw_sock_close (&sock); + } else - { - LW_MACRO_SNPRINTF1 (content, size, "Can't connect to \"%s\"!", ip); - } + { + LW_MACRO_SNPRINTF1 (content, size, "Can't connect to \"%s\"!", ip); + } } else { - LW_MACRO_SNPRINTF1 (content, size, "Unable to find host \"%s\"!", host); + LW_MACRO_SNPRINTF1 (content, size, "Unable to find host \"%s\"!", + host_only); } return result; @@ -238,29 +255,29 @@ for (i = 0; text[i] && j < size; ++i) { if (text[i] == '_') - { - c = ' '; - } + { + c = ' '; + } else - { - c = text[i]; - } + { + c = text[i]; + } if (isalnum (c)) - { - urlparam[j] = c; - j++; - } + { + urlparam[j] = c; + j++; + } else - { - if (j < size - 2) - { - LW_MACRO_SPRINTF1 (buffer, "%X", c); - urlparam[j] = '%'; - urlparam[j + 1] = buffer[0]; - urlparam[j + 2] = buffer[1]; - } - j += 3; - } + { + if (j < size - 2) + { + LW_MACRO_SPRINTF1 (buffer, "%X", c); + urlparam[j] = '%'; + urlparam[j + 1] = buffer[0]; + urlparam[j + 2] = buffer[1]; + } + j += 3; + } } } diff -Nru liquidwar-5.6.4/src/httputil.h liquidwar-5.6.5/src/httputil.h --- liquidwar-5.6.4/src/httputil.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/httputil.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/info.c liquidwar-5.6.5/src/info.c --- liquidwar-5.6.4/src/info.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/info.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -107,85 +107,85 @@ if (INFO_BAR && INFO_BAR_BACK) { if (w > h) - { - rectfill (INFO_BAR, 0, 0, epaisseur - 1, h - 1, MENU_BG); - vline (INFO_BAR, epaisseur, 0, h - 1, MENU_FG); - - front = - lw_maptex_create_fg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, - LW_NETWORK_ON, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); - back = - lw_maptex_create_bg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, - LW_NETWORK_ON, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); - - for (y = 0; y < h; y += front->h) - for (x = epaisseur + 1; x < w; x += front->w) - draw_sprite (INFO_BAR, front, x, y); - - INFO_BAR_POS_W = w - epaisseur - 5; - INFO_BAR_POS_H = (h - 1) / PLAYING_TEAMS - 1; - for (i = 0; i < PLAYING_TEAMS; ++i) - { - INFO_BAR_POS_X[i] = epaisseur + 3; - INFO_BAR_POS_Y[i] = (h + 1 - PLAYING_TEAMS - * (INFO_BAR_POS_H + 1)) / 2 - + i * (INFO_BAR_POS_H + 1); - - for (y = INFO_BAR_POS_Y[i]; - y < INFO_BAR_POS_Y[i] + INFO_BAR_POS_H; y++) - for (x = INFO_BAR_POS_X[i]; - x < INFO_BAR_POS_X[i] + INFO_BAR_POS_W; x++) - putpixel (INFO_BAR, x, y, - getpixel (back, - (x - epaisseur - 1) % back->w, - y % back->h)); - } - - destroy_bitmap (back); - destroy_bitmap (front); - } + { + rectfill (INFO_BAR, 0, 0, epaisseur - 1, h - 1, MENU_BG); + vline (INFO_BAR, epaisseur, 0, h - 1, MENU_FG); + + front = + lw_maptex_create_fg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, + LW_NETWORK_ON, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); + back = + lw_maptex_create_bg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, + LW_NETWORK_ON, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); + + for (y = 0; y < h; y += front->h) + for (x = epaisseur + 1; x < w; x += front->w) + draw_sprite (INFO_BAR, front, x, y); + + INFO_BAR_POS_W = w - epaisseur - 5; + INFO_BAR_POS_H = (h - 1) / PLAYING_TEAMS - 1; + for (i = 0; i < PLAYING_TEAMS; ++i) + { + INFO_BAR_POS_X[i] = epaisseur + 3; + INFO_BAR_POS_Y[i] = (h + 1 - PLAYING_TEAMS + * (INFO_BAR_POS_H + 1)) / 2 + + i * (INFO_BAR_POS_H + 1); + + for (y = INFO_BAR_POS_Y[i]; + y < INFO_BAR_POS_Y[i] + INFO_BAR_POS_H; y++) + for (x = INFO_BAR_POS_X[i]; + x < INFO_BAR_POS_X[i] + INFO_BAR_POS_W; x++) + putpixel (INFO_BAR, x, y, + getpixel (back, + (x - epaisseur - 1) % back->w, + y % back->h)); + } + + destroy_bitmap (back); + destroy_bitmap (front); + } else - { - rectfill (INFO_BAR, 0, 0, w - 1, epaisseur - 1, MENU_BG); - hline (INFO_BAR, 0, epaisseur, w - 1, MENU_FG); - - front = - lw_maptex_create_fg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, - LW_NETWORK_ON, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); - back = - lw_maptex_create_bg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, - LW_NETWORK_ON, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); - - for (y = epaisseur + 1; y < h; y += front->h) - for (x = 0; x < w; x += front->w) - draw_sprite (INFO_BAR, front, x, y); - - INFO_BAR_POS_W = (w - 1) / PLAYING_TEAMS - 1; - INFO_BAR_POS_H = h - epaisseur - 5; - for (i = 0; i < PLAYING_TEAMS; ++i) - { - INFO_BAR_POS_X[i] = (w + 1 - PLAYING_TEAMS - * (INFO_BAR_POS_W + 1)) / 2 - + i * (INFO_BAR_POS_W + 1); - INFO_BAR_POS_Y[i] = epaisseur + 3; - - for (y = INFO_BAR_POS_Y[i]; - y < INFO_BAR_POS_Y[i] + INFO_BAR_POS_H; y++) - for (x = INFO_BAR_POS_X[i]; - x < INFO_BAR_POS_X[i] + INFO_BAR_POS_W; x++) - putpixel (INFO_BAR, x, y, - getpixel (back, - x % back->w, - (y - epaisseur - 1) % back->h)); - } - - destroy_bitmap (back); - destroy_bitmap (front); - } + { + rectfill (INFO_BAR, 0, 0, w - 1, epaisseur - 1, MENU_BG); + hline (INFO_BAR, 0, epaisseur, w - 1, MENU_FG); + + front = + lw_maptex_create_fg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, + LW_NETWORK_ON, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); + back = + lw_maptex_create_bg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, + LW_NETWORK_ON, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); + + for (y = epaisseur + 1; y < h; y += front->h) + for (x = 0; x < w; x += front->w) + draw_sprite (INFO_BAR, front, x, y); + + INFO_BAR_POS_W = (w - 1) / PLAYING_TEAMS - 1; + INFO_BAR_POS_H = h - epaisseur - 5; + for (i = 0; i < PLAYING_TEAMS; ++i) + { + INFO_BAR_POS_X[i] = (w + 1 - PLAYING_TEAMS + * (INFO_BAR_POS_W + 1)) / 2 + + i * (INFO_BAR_POS_W + 1); + INFO_BAR_POS_Y[i] = epaisseur + 3; + + for (y = INFO_BAR_POS_Y[i]; + y < INFO_BAR_POS_Y[i] + INFO_BAR_POS_H; y++) + for (x = INFO_BAR_POS_X[i]; + x < INFO_BAR_POS_X[i] + INFO_BAR_POS_W; x++) + putpixel (INFO_BAR, x, y, + getpixel (back, + x % back->w, + (y - epaisseur - 1) % back->h)); + } + + destroy_bitmap (back); + destroy_bitmap (front); + } draw_sprite (INFO_BAR_BACK, INFO_BAR, 0, 0); } return (INFO_BAR && INFO_BAR_BACK); @@ -252,15 +252,15 @@ for (i = 0; i < PLAYING_TEAMS; ++i) { barre_w = (ACTIVE_FIGHTERS[i] * (INFO_BAR_POS_W - 1)) - / CURRENT_ARMY_SIZE + 1; + / CURRENT_ARMY_SIZE + 1; barre_x = INFO_BAR_POS_X[i] + INFO_BAR_POS_W - barre_w; barre_y = INFO_BAR_POS_Y[i]; rectfill (INFO_BAR, - barre_x, - barre_y, - barre_x + barre_w - 1, - barre_y + INFO_BAR_POS_H - 1, - COLOR_FIRST_ENTRY[i] + COLORS_PER_TEAM - 1); + barre_x, + barre_y, + barre_x + barre_w - 1, + barre_y + INFO_BAR_POS_H - 1, + COLOR_FIRST_ENTRY[i] + COLORS_PER_TEAM - 1); } } @@ -280,15 +280,15 @@ for (i = 0; i < PLAYING_TEAMS; ++i) { barre_h = (ACTIVE_FIGHTERS[i] * (INFO_BAR_POS_H - 1)) - / CURRENT_ARMY_SIZE + 1; + / CURRENT_ARMY_SIZE + 1; barre_y = INFO_BAR_POS_Y[i] + INFO_BAR_POS_H - barre_h; barre_x = INFO_BAR_POS_X[i]; rectfill (INFO_BAR, - barre_x, - barre_y, - barre_x + INFO_BAR_POS_W - 1, - barre_y + barre_h - 1, - COLOR_FIRST_ENTRY[i] + COLORS_PER_TEAM - 1); + barre_x, + barre_y, + barre_x + INFO_BAR_POS_W - 1, + barre_y + barre_h - 1, + COLOR_FIRST_ENTRY[i] + COLORS_PER_TEAM - 1); } } @@ -304,57 +304,57 @@ temp_h = text_height (font) + 2; switch (CONFIG_INFO_BAR) - { - case 0: - case 2: - w = SCREEN_W; - h = temp_h; - if (h < 13) - h = 13; - epaisseur = temp_w; - break; - case 1: - default: - w = temp_w; - if (w < 13) - w = 13; - h = SCREEN_H; - epaisseur = temp_h; - break; - } + { + case 0: + case 2: + w = SCREEN_W; + h = temp_h; + if (h < 13) + h = 13; + epaisseur = temp_w; + break; + case 1: + default: + w = temp_w; + if (w < 13) + w = 13; + h = SCREEN_H; + epaisseur = temp_h; + break; + } if (!INFO_BAR) - init_info_bar (w, h, epaisseur); + init_info_bar (w, h, epaisseur); draw_sprite (INFO_BAR, INFO_BAR_BACK, 0, 0); switch (CONFIG_INFO_BAR) - { - case 0: - x = 0; - y = PAGE_FLIP_H; - hline (screen, x, y + h, x + w - 1, MENU_FG); - display_horizontal_info (w, h, epaisseur); - break; - case 1: - x = SCREEN_W - w; - y = PAGE_FLIP_H; - vline (screen, x - 1, y, y + h - 1, MENU_FG); - display_vertical_info (w, h, epaisseur); - break; - case 2: - x = 0; - y = PAGE_FLIP_H + SCREEN_H - h; - hline (screen, x, y - 1, x + w - 1, MENU_FG); - display_horizontal_info (w, h, epaisseur); - break; - default: - x = 0; - y = PAGE_FLIP_H; - vline (screen, x + w, y, y + h - 1, MENU_FG); - display_vertical_info (w, h, epaisseur); - break; - } + { + case 0: + x = 0; + y = PAGE_FLIP_H; + hline (screen, x, y + h, x + w - 1, MENU_FG); + display_horizontal_info (w, h, epaisseur); + break; + case 1: + x = SCREEN_W - w; + y = PAGE_FLIP_H; + vline (screen, x - 1, y, y + h - 1, MENU_FG); + display_vertical_info (w, h, epaisseur); + break; + case 2: + x = 0; + y = PAGE_FLIP_H + SCREEN_H - h; + hline (screen, x, y - 1, x + w - 1, MENU_FG); + display_horizontal_info (w, h, epaisseur); + break; + default: + x = 0; + y = PAGE_FLIP_H; + vline (screen, x + w, y, y + h - 1, MENU_FG); + display_vertical_info (w, h, epaisseur); + break; + } draw_sprite (screen, INFO_BAR, x, y); } } @@ -371,42 +371,42 @@ temp_h = text_height (font) + 2; if (temp_h < 13) - { - temp_h = 13; - } + { + temp_h = 13; + } if (temp_w < 13) - { - temp_w = 13; - } + { + temp_w = 13; + } switch (CONFIG_INFO_BAR) - { - case 0: - *x = 0; - *y = temp_h + 1; - *w = SCREEN_W; - *h = SCREEN_H - temp_h - 1; - break; - case 1: - *x = 0; - *y = 0; - *w = SCREEN_W - temp_w - 1; - *h = SCREEN_H; - break; - case 2: - *x = 0; - *y = 0; - *w = SCREEN_W; - *h = SCREEN_H - temp_h - 1; - break; - default: - *x = temp_w + 1; - *y = 0; - *w = SCREEN_W - temp_w - 1; - *h = SCREEN_H; - break; - } + { + case 0: + *x = 0; + *y = temp_h + 1; + *w = SCREEN_W; + *h = SCREEN_H - temp_h - 1; + break; + case 1: + *x = 0; + *y = 0; + *w = SCREEN_W - temp_w - 1; + *h = SCREEN_H; + break; + case 2: + *x = 0; + *y = 0; + *w = SCREEN_W; + *h = SCREEN_H - temp_h - 1; + break; + default: + *x = temp_w + 1; + *y = 0; + *w = SCREEN_W - temp_w - 1; + *h = SCREEN_H; + break; + } } else { @@ -426,9 +426,9 @@ if (WATCHDOG_SCANCODE[KEY_F1]) { if (CONFIG_INFO_BAR >= 4) - CONFIG_INFO_BAR -= 4; + CONFIG_INFO_BAR -= 4; else - CONFIG_INFO_BAR += 4; + CONFIG_INFO_BAR += 4; free_info_bar (); changed = CONFIG_PAGE_FLIP ? 2 : 1; lw_viewport_register_change (changed); @@ -437,9 +437,9 @@ { CONFIG_INFO_BAR++; if (CONFIG_INFO_BAR == 4) - CONFIG_INFO_BAR = 0; + CONFIG_INFO_BAR = 0; if (CONFIG_INFO_BAR == 8) - CONFIG_INFO_BAR = 4; + CONFIG_INFO_BAR = 4; free_info_bar (); changed = CONFIG_PAGE_FLIP ? 2 : 1; lw_viewport_register_change (changed); diff -Nru liquidwar-5.6.4/src/info.h liquidwar-5.6.5/src/info.h --- liquidwar-5.6.4/src/info.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/info.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/init.c liquidwar-5.6.5/src/init.c --- liquidwar-5.6.4/src/init.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/init.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -167,75 +167,75 @@ log_print_str ("Installing timer"); timer = !install_timer (); if (timer) - { - display_success_driver ((char *) timer_driver->ascii_name); - } + { + display_success_driver ((char *) timer_driver->ascii_name); + } else - { - display_success (0); - } + { + display_success (0); + } start_ticker (); log_print_str ("Installing keyboard"); keyboard = !install_keyboard (); if (keyboard) - { - display_success_driver ((char *) keyboard_driver->ascii_name); - } + { + display_success_driver ((char *) keyboard_driver->ascii_name); + } else - { - display_success (0); - } + { + display_success (0); + } log_print_str ("Installing mouse"); mouse = install_mouse () != -1; if (mouse) - { - display_success_driver ((char *) mouse_driver->ascii_name); - } + { + display_success_driver ((char *) mouse_driver->ascii_name); + } else - { - display_success (0); - } + { + display_success (0); + } if (STARTUP_DIGI_CARD != DIGI_NONE || STARTUP_MIDI_CARD != MIDI_NONE) - { - log_print_str ("Installing sound"); - sound = !install_sound (STARTUP_DIGI_CARD, STARTUP_MIDI_CARD, ""); - if (!sound) - { - /* - * OK, first init failed, now we try without the MIDI card, which - * is where problems usually come from, especially under Linux - */ - sound = !install_sound (STARTUP_DIGI_CARD, MIDI_NONE, ""); - } - if (sound) - { - log_print_str (" (digi=\""); - log_print_str ((char *) digi_driver->ascii_name); - log_print_str ("\", midi=\""); - log_print_str ((char *) midi_driver->ascii_name); - log_print_str ("\")"); - } - display_success (sound); - } + { + log_print_str ("Installing sound"); + sound = !install_sound (STARTUP_DIGI_CARD, STARTUP_MIDI_CARD, ""); + if (!sound) + { + /* + * OK, first init failed, now we try without the MIDI card, which + * is where problems usually come from, especially under Linux + */ + sound = !install_sound (STARTUP_DIGI_CARD, MIDI_NONE, ""); + } + if (sound) + { + log_print_str (" (digi=\""); + log_print_str ((char *) digi_driver->ascii_name); + log_print_str ("\", midi=\""); + log_print_str ((char *) midi_driver->ascii_name); + log_print_str ("\")"); + } + display_success (sound); + } if (STARTUP_JOYSTICK_ON) - { - log_print_str ("Installing joystick"); - if (STARTUP_JOYSTICK_ON) - joystick = !my_initialise_joystick (); - if (joystick) - { - display_success_driver ((char *) joystick_driver->ascii_name); - } - else - { - display_success (0); - } - } + { + log_print_str ("Installing joystick"); + if (STARTUP_JOYSTICK_ON) + joystick = !my_initialise_joystick (); + if (joystick) + { + display_success_driver ((char *) joystick_driver->ascii_name); + } + else + { + display_success (0); + } + } log_print_str ("Setting up network"); display_success (network = lw_sock_init ()); diff -Nru liquidwar-5.6.4/src/init.h liquidwar-5.6.5/src/init.h --- liquidwar-5.6.4/src/init.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/init.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/internet.c liquidwar-5.6.5/src/internet.c --- liquidwar-5.6.4/src/internet.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/internet.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -150,10 +150,10 @@ standard_button (d + 10, 1, 6, 2, 10); for (i = 0; i < 6; ++i) - { - d[5 + i].w = - menu_real_x ((MENU_W_INTERNET_LIST + MENU_W_STANDARD) / 2); - } + { + d[5 + i].w = + menu_real_x ((MENU_W_INTERNET_LIST + MENU_W_STANDARD) / 2); + } position_comment (d + 11); @@ -173,7 +173,7 @@ d[10].dp = buffer_uptime; d[11].dp = buffer_comment; d[7].proc = d[8].proc = d[9].proc = d[10].proc = d[11].proc = - my_textbox_proc; + my_textbox_proc; d[12].proc = 0; dialog_list = d + 4; @@ -197,46 +197,46 @@ */ cur = d[4].d1; if (choix == MENU_QUICK_PLAY || choix == 4 || choix == 6) - { - if (cur >= 0 && cur < size) - { - strncpy (CONFIG_SERVER_ADDRESS, data[cur].ip, - SERVER_ADDRESS_SIZE); - CONFIG_SERVER_ADDRESS[SERVER_ADDRESS_SIZE] = '\0'; - CONFIG_SERVER_PORT = data[cur].port; - } - } + { + if (cur >= 0 && cur < size) + { + strncpy (CONFIG_SERVER_ADDRESS, data[cur].ip, + SERVER_ADDRESS_SIZE); + CONFIG_SERVER_ADDRESS[SERVER_ADDRESS_SIZE] = '\0'; + CONFIG_SERVER_PORT = data[cur].port; + } + } switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = netplay_sequence (); - break; - case 5: - size = LW_INTERNET_LIST_SIZE; - lw_wwwcli_get_games (data, &size); - break; - case 4: - case 6: - if (cur >= 0 && cur < size) - { - retour = netplay_sequence (); - } - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = netplay_sequence (); + break; + case 5: + size = LW_INTERNET_LIST_SIZE; + lw_wwwcli_get_games (data, &size); + break; + case 4: + case 6: + if (cur >= 0 && cur < size) + { + retour = netplay_sequence (); + } + break; + } } if (retour > 0) @@ -290,42 +290,42 @@ if (index >= 0) { if (index < *list_size) - { - result = list_data[index].label; + { + result = list_data[index].label; - /* - * Now this _is_ a hack: I wanted the port - * password, uptime and comment fields to - * be updated automatically when selecting - * a line in the list, without even double-clicking - * it. So what I did is that when the list engine - * asks for the label of the current line, I - * automatically recalculate and redraw these fields. - * Since the list engine has to hilight the current - * label, I assume it asks for the current label - * everytime the selection is changed. - */ - if (index == dialog_list->d1) - { - update_text_ping (dialog_list->d1); - update_text_port (dialog_list->d1); - update_text_password (dialog_list->d1); - update_text_uptime (dialog_list->d1); - update_text_comment (dialog_list->d1); - - scare_mouse (); - my_textbox_proc (MSG_DRAW, dialog_ping, 0); - my_textbox_proc (MSG_DRAW, dialog_port, 0); - my_textbox_proc (MSG_DRAW, dialog_password, 0); - my_textbox_proc (MSG_DRAW, dialog_uptime, 0); - my_textbox_proc (MSG_DRAW, dialog_comment, 0); - unscare_mouse (); - } - } + /* + * Now this _is_ a hack: I wanted the port + * password, uptime and comment fields to + * be updated automatically when selecting + * a line in the list, without even double-clicking + * it. So what I did is that when the list engine + * asks for the label of the current line, I + * automatically recalculate and redraw these fields. + * Since the list engine has to hilight the current + * label, I assume it asks for the current label + * everytime the selection is changed. + */ + if (index == dialog_list->d1) + { + update_text_ping (dialog_list->d1); + update_text_port (dialog_list->d1); + update_text_password (dialog_list->d1); + update_text_uptime (dialog_list->d1); + update_text_comment (dialog_list->d1); + + scare_mouse (); + my_textbox_proc (MSG_DRAW, dialog_ping, 0); + my_textbox_proc (MSG_DRAW, dialog_port, 0); + my_textbox_proc (MSG_DRAW, dialog_password, 0); + my_textbox_proc (MSG_DRAW, dialog_uptime, 0); + my_textbox_proc (MSG_DRAW, dialog_comment, 0); + unscare_mouse (); + } + } else - { - result = ""; - } + { + result = ""; + } } else { @@ -342,29 +342,29 @@ if (i >= 0) { if (i < *list_size) - { - if (list_data[i].ping_delay >= 0) - { - LW_MACRO_SPRINTF3 (buffer_ping, "%s: %d %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_PING), - list_data[i].ping_delay, - lw_lang_string - (LW_LANG_STRING_INTERNET_MSEC)); - } - else - { - LW_MACRO_STRCPY (buffer_ping, - lw_lang_string - (LW_LANG_STRING_INTERNET_UNREACHABLE)); - } - } + { + if (list_data[i].ping_delay >= 0) + { + LW_MACRO_SPRINTF3 (buffer_ping, "%s: %d %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_PING), + list_data[i].ping_delay, + lw_lang_string + (LW_LANG_STRING_INTERNET_MSEC)); + } + else + { + LW_MACRO_STRCPY (buffer_ping, + lw_lang_string + (LW_LANG_STRING_INTERNET_UNREACHABLE)); + } + } else - { - LW_MACRO_SPRINTF1 (buffer_ping, - "%s:", - lw_lang_string (LW_LANG_STRING_INTERNET_PING)); - } + { + LW_MACRO_SPRINTF1 (buffer_ping, + "%s:", + lw_lang_string (LW_LANG_STRING_INTERNET_PING)); + } } } @@ -375,19 +375,19 @@ if (i >= 0) { if (i < *list_size) - { - LW_MACRO_SPRINTF2 (buffer_port, - "%s: %d", - lw_lang_string - (LW_LANG_STRING_INTERNET_PORT), - list_data[i].port); - } + { + LW_MACRO_SPRINTF2 (buffer_port, + "%s: %d", + lw_lang_string + (LW_LANG_STRING_INTERNET_PORT), + list_data[i].port); + } else - { - LW_MACRO_SPRINTF1 (buffer_port, - "%s:", - lw_lang_string (LW_LANG_STRING_INTERNET_PORT)); - } + { + LW_MACRO_SPRINTF1 (buffer_port, + "%s:", + lw_lang_string (LW_LANG_STRING_INTERNET_PORT)); + } } } @@ -398,32 +398,32 @@ if (i >= 0) { if (i < *list_size) - { - if (list_data[i].password) - { - LW_MACRO_SPRINTF2 (buffer_password, - "%s: %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_PASSWORD), - lw_lang_string - (LW_LANG_STRING_INTERNET_YES)); - } - else - { - LW_MACRO_SPRINTF2 (buffer_password, - "%s: %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_PASSWORD), - lw_lang_string (LW_LANG_STRING_INTERNET_NO)); - } - } + { + if (list_data[i].password) + { + LW_MACRO_SPRINTF2 (buffer_password, + "%s: %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_PASSWORD), + lw_lang_string + (LW_LANG_STRING_INTERNET_YES)); + } + else + { + LW_MACRO_SPRINTF2 (buffer_password, + "%s: %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_PASSWORD), + lw_lang_string (LW_LANG_STRING_INTERNET_NO)); + } + } else - { - LW_MACRO_SPRINTF1 (buffer_password, - "%s:", - lw_lang_string - (LW_LANG_STRING_INTERNET_PASSWORD)); - } + { + LW_MACRO_SPRINTF1 (buffer_password, + "%s:", + lw_lang_string + (LW_LANG_STRING_INTERNET_PASSWORD)); + } } } @@ -435,70 +435,70 @@ if (i >= 0) { if (i < *list_size) - { - seconds = list_data[i].uptime % 60; - minutes = (list_data[i].uptime / 60) % 60; - hours = (list_data[i].uptime / 3600) % 24; - days = (list_data[i].uptime / (24 * 3600)); - if (days > 0) - { - if (days > 1) - { - LW_MACRO_SPRINTF3 (buffer_uptime, - "%s: %d %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_UPTIME), - days, - lw_lang_string - (LW_LANG_STRING_INTERNET_DAYS)); - } - else - { - LW_MACRO_SPRINTF2 (buffer_uptime, - "%s: 1 %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_UPTIME), - lw_lang_string - (LW_LANG_STRING_INTERNET_DAY)); - } - } - else if (hours > 0) - { - LW_MACRO_SPRINTF3 (buffer_uptime, - "%s: %d %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_UPTIME), - hours, - lw_lang_string - (LW_LANG_STRING_INTERNET_HOURS)); - } - else if (minutes > 0) - { - LW_MACRO_SPRINTF3 (buffer_uptime, - "%s: %d %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_UPTIME), - minutes, - lw_lang_string - (LW_LANG_STRING_INTERNET_MINUTES)); - } - else - { - LW_MACRO_SPRINTF3 (buffer_uptime, - "%s: %d %s", - lw_lang_string - (LW_LANG_STRING_INTERNET_UPTIME), - seconds, - lw_lang_string - (LW_LANG_STRING_INTERNET_SECONDS)); - } - } + { + seconds = list_data[i].uptime % 60; + minutes = (list_data[i].uptime / 60) % 60; + hours = (list_data[i].uptime / 3600) % 24; + days = (list_data[i].uptime / (24 * 3600)); + if (days > 0) + { + if (days > 1) + { + LW_MACRO_SPRINTF3 (buffer_uptime, + "%s: %d %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_UPTIME), + days, + lw_lang_string + (LW_LANG_STRING_INTERNET_DAYS)); + } + else + { + LW_MACRO_SPRINTF2 (buffer_uptime, + "%s: 1 %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_UPTIME), + lw_lang_string + (LW_LANG_STRING_INTERNET_DAY)); + } + } + else if (hours > 0) + { + LW_MACRO_SPRINTF3 (buffer_uptime, + "%s: %d %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_UPTIME), + hours, + lw_lang_string + (LW_LANG_STRING_INTERNET_HOURS)); + } + else if (minutes > 0) + { + LW_MACRO_SPRINTF3 (buffer_uptime, + "%s: %d %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_UPTIME), + minutes, + lw_lang_string + (LW_LANG_STRING_INTERNET_MINUTES)); + } + else + { + LW_MACRO_SPRINTF3 (buffer_uptime, + "%s: %d %s", + lw_lang_string + (LW_LANG_STRING_INTERNET_UPTIME), + seconds, + lw_lang_string + (LW_LANG_STRING_INTERNET_SECONDS)); + } + } else - { - LW_MACRO_SPRINTF1 (buffer_uptime, - "%s:", - lw_lang_string (LW_LANG_STRING_INTERNET_UPTIME)); - } + { + LW_MACRO_SPRINTF1 (buffer_uptime, + "%s:", + lw_lang_string (LW_LANG_STRING_INTERNET_UPTIME)); + } } } @@ -509,12 +509,12 @@ if (i >= 0) { if (i < *list_size) - { - LW_MACRO_SPRINTF1 (buffer_comment, "%s", list_data[i].comment); - } + { + LW_MACRO_SPRINTF1 (buffer_comment, "%s", list_data[i].comment); + } else - { - LW_MACRO_SPRINTF0 (buffer_comment, ""); - } + { + LW_MACRO_SPRINTF0 (buffer_comment, ""); + } } } diff -Nru liquidwar-5.6.4/src/internet.h liquidwar-5.6.5/src/internet.h --- liquidwar-5.6.4/src/internet.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/internet.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/joystick.c liquidwar-5.6.5/src/joystick.c --- liquidwar-5.6.4/src/joystick.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/joystick.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -140,17 +140,17 @@ int type = JOY_TYPE_AUTODETECT; switch (CONFIG_JOYSTICK_ON) - { - case 1: - type = JOY_TYPE0; - break; - case 2: - type = JOY_TYPE1; - break; - case 3: - type = JOY_TYPE2; - break; - } + { + case 1: + type = JOY_TYPE0; + break; + case 2: + type = JOY_TYPE1; + break; + case 3: + type = JOY_TYPE2; + break; + } result = install_joystick (type); } else @@ -162,32 +162,32 @@ if (num_joysticks >= 1) { if (joy[0].num_sticks >= 1) - { - if (joy[0].stick[0].num_axis >= 2) - { - JOY1_MIN_X = joy[0].stick[0].axis[0].pos; - JOY1_MID_X = joy[0].stick[0].axis[0].pos; - JOY1_MAX_X = joy[0].stick[0].axis[0].pos; - JOY1_MIN_Y = joy[0].stick[0].axis[1].pos; - JOY1_MID_Y = joy[0].stick[0].axis[1].pos; - JOY1_MAX_Y = joy[0].stick[0].axis[1].pos; - } - } + { + if (joy[0].stick[0].num_axis >= 2) + { + JOY1_MIN_X = joy[0].stick[0].axis[0].pos; + JOY1_MID_X = joy[0].stick[0].axis[0].pos; + JOY1_MAX_X = joy[0].stick[0].axis[0].pos; + JOY1_MIN_Y = joy[0].stick[0].axis[1].pos; + JOY1_MID_Y = joy[0].stick[0].axis[1].pos; + JOY1_MAX_Y = joy[0].stick[0].axis[1].pos; + } + } } if (num_joysticks >= 2) { if (joy[1].num_sticks >= 1) - { - if (joy[1].stick[0].num_axis >= 2) - { - JOY2_MIN_X = joy[1].stick[0].axis[0].pos; - JOY2_MID_X = joy[1].stick[0].axis[0].pos; - JOY2_MAX_X = joy[1].stick[0].axis[0].pos; - JOY2_MIN_Y = joy[1].stick[0].axis[1].pos; - JOY2_MID_Y = joy[1].stick[0].axis[1].pos; - JOY2_MAX_Y = joy[1].stick[0].axis[1].pos; - } - } + { + if (joy[1].stick[0].num_axis >= 2) + { + JOY2_MIN_X = joy[1].stick[0].axis[0].pos; + JOY2_MID_X = joy[1].stick[0].axis[0].pos; + JOY2_MAX_X = joy[1].stick[0].axis[0].pos; + JOY2_MIN_Y = joy[1].stick[0].axis[1].pos; + JOY2_MID_Y = joy[1].stick[0].axis[1].pos; + JOY2_MAX_Y = joy[1].stick[0].axis[1].pos; + } + } } my_poll_joystick (); @@ -204,75 +204,75 @@ poll_joystick (); if (num_joysticks >= 1) - { - if (joy[0].num_sticks >= 1) - { - if (joy[0].stick[0].num_axis >= 2) - { - JOY1_MIN_X = MIN (joy[0].stick[0].axis[0].pos, JOY1_MIN_X); - JOY1_MAX_X = MAX (joy[0].stick[0].axis[0].pos, JOY1_MAX_X); - JOY1_MID_X = (JOY1_MIN_X + JOY1_MAX_X) / 2; - JOY1_MIN_Y = MIN (joy[0].stick[0].axis[1].pos, JOY1_MIN_Y); - JOY1_MAX_Y = MAX (joy[0].stick[0].axis[1].pos, JOY1_MAX_Y); - JOY1_MID_Y = (JOY1_MIN_Y + JOY1_MAX_Y) / 2; - - JOYSTICK_CONTROL_JOY1_UP = - (joy[0].stick[0].axis[1].pos < - (JOY1_MIN_Y + 2 * JOY1_MID_Y) / 3) ? 1 : 0; - JOYSTICK_CONTROL_JOY1_RIGHT = - (joy[0].stick[0].axis[0].pos > - (JOY1_MAX_X + 2 * JOY1_MID_X) / 3) ? 1 : 0; - JOYSTICK_CONTROL_JOY1_DOWN = - (joy[0].stick[0].axis[1].pos > - (JOY1_MAX_Y + 2 * JOY1_MID_Y) / 3) ? 1 : 0; - JOYSTICK_CONTROL_JOY1_LEFT = - (joy[0].stick[0].axis[0].pos < - (JOY1_MIN_X + 2 * JOY1_MID_X) / 3) ? 1 : 0; - } - } - if (joy[0].num_buttons >= 2) - { - JOYSTICK_CONTROL_JOY1_B1 = joy[0].button[0].b; - JOYSTICK_CONTROL_JOY1_B2 = joy[0].button[1].b; - } - if (joy[0].num_buttons >= 4) - { - JOYSTICK_CONTROL_JOY1_B3 = joy[0].button[2].b; - JOYSTICK_CONTROL_JOY1_B4 = joy[0].button[3].b; - } - } + { + if (joy[0].num_sticks >= 1) + { + if (joy[0].stick[0].num_axis >= 2) + { + JOY1_MIN_X = MIN (joy[0].stick[0].axis[0].pos, JOY1_MIN_X); + JOY1_MAX_X = MAX (joy[0].stick[0].axis[0].pos, JOY1_MAX_X); + JOY1_MID_X = (JOY1_MIN_X + JOY1_MAX_X) / 2; + JOY1_MIN_Y = MIN (joy[0].stick[0].axis[1].pos, JOY1_MIN_Y); + JOY1_MAX_Y = MAX (joy[0].stick[0].axis[1].pos, JOY1_MAX_Y); + JOY1_MID_Y = (JOY1_MIN_Y + JOY1_MAX_Y) / 2; + + JOYSTICK_CONTROL_JOY1_UP = + (joy[0].stick[0].axis[1].pos < + (JOY1_MIN_Y + 2 * JOY1_MID_Y) / 3) ? 1 : 0; + JOYSTICK_CONTROL_JOY1_RIGHT = + (joy[0].stick[0].axis[0].pos > + (JOY1_MAX_X + 2 * JOY1_MID_X) / 3) ? 1 : 0; + JOYSTICK_CONTROL_JOY1_DOWN = + (joy[0].stick[0].axis[1].pos > + (JOY1_MAX_Y + 2 * JOY1_MID_Y) / 3) ? 1 : 0; + JOYSTICK_CONTROL_JOY1_LEFT = + (joy[0].stick[0].axis[0].pos < + (JOY1_MIN_X + 2 * JOY1_MID_X) / 3) ? 1 : 0; + } + } + if (joy[0].num_buttons >= 2) + { + JOYSTICK_CONTROL_JOY1_B1 = joy[0].button[0].b; + JOYSTICK_CONTROL_JOY1_B2 = joy[0].button[1].b; + } + if (joy[0].num_buttons >= 4) + { + JOYSTICK_CONTROL_JOY1_B3 = joy[0].button[2].b; + JOYSTICK_CONTROL_JOY1_B4 = joy[0].button[3].b; + } + } if (num_joysticks >= 2) - { - if (joy[1].num_sticks >= 1) - { - if (joy[1].stick[0].num_axis >= 2) - { - JOY2_MIN_X = MIN (joy[1].stick[0].axis[0].pos, JOY2_MIN_X); - JOY2_MAX_X = MAX (joy[1].stick[0].axis[0].pos, JOY2_MAX_X); - JOY2_MID_Y = (JOY2_MIN_X + JOY2_MAX_X) / 2; - JOY2_MIN_Y = MIN (joy[1].stick[0].axis[1].pos, JOY2_MIN_Y); - JOY2_MAX_Y = MAX (joy[1].stick[0].axis[1].pos, JOY2_MAX_Y); - JOY2_MID_Y = (JOY2_MIN_Y + JOY2_MAX_Y) / 2; - - JOYSTICK_CONTROL_JOY2_UP = - (joy[1].stick[0].axis[1].pos < - (JOY2_MIN_Y + 2 * JOY2_MID_Y) / 3) ? 1 : 0; - JOYSTICK_CONTROL_JOY2_RIGHT = - (joy[1].stick[0].axis[0].pos > - (JOY2_MAX_X + 2 * JOY2_MID_X) / 3) ? 1 : 0; - JOYSTICK_CONTROL_JOY2_DOWN = - (joy[1].stick[0].axis[1].pos > - (JOY2_MAX_Y + 2 * JOY2_MID_Y) / 3) ? 1 : 0; - JOYSTICK_CONTROL_JOY2_LEFT = - (joy[1].stick[0].axis[0].pos < - (JOY2_MIN_X + 2 * JOY2_MID_X) / 3) ? 1 : 0; - } - } - if (joy[0].num_buttons >= 2) - { - JOYSTICK_CONTROL_JOY2_B1 = joy[1].button[0].b; - JOYSTICK_CONTROL_JOY2_B2 = joy[1].button[1].b; - } - } + { + if (joy[1].num_sticks >= 1) + { + if (joy[1].stick[0].num_axis >= 2) + { + JOY2_MIN_X = MIN (joy[1].stick[0].axis[0].pos, JOY2_MIN_X); + JOY2_MAX_X = MAX (joy[1].stick[0].axis[0].pos, JOY2_MAX_X); + JOY2_MID_Y = (JOY2_MIN_X + JOY2_MAX_X) / 2; + JOY2_MIN_Y = MIN (joy[1].stick[0].axis[1].pos, JOY2_MIN_Y); + JOY2_MAX_Y = MAX (joy[1].stick[0].axis[1].pos, JOY2_MAX_Y); + JOY2_MID_Y = (JOY2_MIN_Y + JOY2_MAX_Y) / 2; + + JOYSTICK_CONTROL_JOY2_UP = + (joy[1].stick[0].axis[1].pos < + (JOY2_MIN_Y + 2 * JOY2_MID_Y) / 3) ? 1 : 0; + JOYSTICK_CONTROL_JOY2_RIGHT = + (joy[1].stick[0].axis[0].pos > + (JOY2_MAX_X + 2 * JOY2_MID_X) / 3) ? 1 : 0; + JOYSTICK_CONTROL_JOY2_DOWN = + (joy[1].stick[0].axis[1].pos > + (JOY2_MAX_Y + 2 * JOY2_MID_Y) / 3) ? 1 : 0; + JOYSTICK_CONTROL_JOY2_LEFT = + (joy[1].stick[0].axis[0].pos < + (JOY2_MIN_X + 2 * JOY2_MID_X) / 3) ? 1 : 0; + } + } + if (joy[0].num_buttons >= 2) + { + JOYSTICK_CONTROL_JOY2_B1 = joy[1].button[0].b; + JOYSTICK_CONTROL_JOY2_B2 = joy[1].button[1].b; + } + } } } diff -Nru liquidwar-5.6.4/src/joystick.h liquidwar-5.6.5/src/joystick.h --- liquidwar-5.6.4/src/joystick.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/joystick.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/keyboard.c liquidwar-5.6.5/src/keyboard.c --- liquidwar-5.6.4/src/keyboard.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/keyboard.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -105,91 +105,91 @@ switch (i) { case KEY_JOY1_UP: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_UP; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_UP; + break; case KEY_JOY1_RIGHT: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_RIGHT; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_RIGHT; + break; case KEY_JOY1_DOWN: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_DOWN; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_DOWN; + break; case KEY_JOY1_LEFT: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_LEFT; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_LEFT; + break; case KEY_JOY1_B1: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_B1; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_B1; + break; case KEY_JOY1_B2: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_B2; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_B2; + break; case KEY_JOY1_B3: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_B3; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_B3; + break; case KEY_JOY1_B4: - found = 1; - retval = JOYSTICK_CONTROL_JOY1_B4; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY1_B4; + break; case KEY_JOY2_UP: - found = 1; - retval = JOYSTICK_CONTROL_JOY2_UP; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY2_UP; + break; case KEY_JOY2_RIGHT: - found = 1; - retval = JOYSTICK_CONTROL_JOY2_RIGHT; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY2_RIGHT; + break; case KEY_JOY2_DOWN: - found = 1; - retval = JOYSTICK_CONTROL_JOY2_DOWN; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY2_DOWN; + break; case KEY_JOY2_LEFT: - found = 1; - retval = JOYSTICK_CONTROL_JOY2_LEFT; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY2_LEFT; + break; case KEY_JOY2_B1: - found = 1; - retval = JOYSTICK_CONTROL_JOY2_B1; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY2_B1; + break; case KEY_JOY2_B2: - found = 1; - retval = JOYSTICK_CONTROL_JOY2_B2; - break; + found = 1; + retval = JOYSTICK_CONTROL_JOY2_B2; + break; } if (!found) switch (i) { case KEY_MOUSE_UP: - retval = MOUSE_CONTROL_UP; - break; + retval = MOUSE_CONTROL_UP; + break; case KEY_MOUSE_RIGHT: - retval = MOUSE_CONTROL_RIGHT; - break; + retval = MOUSE_CONTROL_RIGHT; + break; case KEY_MOUSE_DOWN: - retval = MOUSE_CONTROL_DOWN; - break; + retval = MOUSE_CONTROL_DOWN; + break; case KEY_MOUSE_LEFT: - retval = MOUSE_CONTROL_LEFT; - break; + retval = MOUSE_CONTROL_LEFT; + break; default: - if (i >= 128) - { - i -= 128; - retval = (key[i] & KB_EXTENDED) && ALLOWED_KEYBOARD_KEY[i]; - } - else - retval = (key[i] & KB_NORMAL) && ALLOWED_KEYBOARD_KEY[i]; + if (i >= 128) + { + i -= 128; + retval = (key[i] & KB_EXTENDED) && ALLOWED_KEYBOARD_KEY[i]; + } + else + retval = (key[i] & KB_NORMAL) && ALLOWED_KEYBOARD_KEY[i]; } @@ -203,7 +203,6 @@ { int touched, i; int start_tick; - int dummy; start_tick = get_ticker (); @@ -213,17 +212,17 @@ /* * Force a all to poll_keyboard if needed */ - dummy = keypressed (); + keypressed (); touched = 0; lw_mouse_update_control (); my_poll_joystick (); for (i = 0; i < 256; ++i) - if (is_touched_key (i)) - touched = 1; + if (is_touched_key (i)) + touched = 1; } while (touched && - get_ticker () < start_tick + LW_KEYBOARD_WAITNOKEY_TICK_LIMIT); + get_ticker () < start_tick + LW_KEYBOARD_WAITNOKEY_TICK_LIMIT); } /*------------------------------------------------------------------*/ @@ -232,27 +231,26 @@ { int touched = 0, i, result = 0; int start_tick; - int dummy; start_tick = get_ticker (); lw_mouse_reset_control (); while ((!touched) && - get_ticker () < start_tick + LW_KEYBOARD_WAITKEYPRESSED_TICK_LIMIT) + get_ticker () < start_tick + LW_KEYBOARD_WAITKEYPRESSED_TICK_LIMIT) { /* * Force a all to poll_keyboard if needed */ - dummy = keypressed (); + keypressed (); lw_mouse_update_control (); my_poll_joystick (); for (i = 0; i < 256 && !touched; ++i) - if (is_touched_key (i)) - { - touched = 1; - result = i; - } + if (is_touched_key (i)) + { + touched = 1; + result = i; + } } /* @@ -287,7 +285,7 @@ if (keyboard_state) { - log_println_str ("Error: unable to reinstall keyboard"); + log_println_str ("Error: unable to reinstall keyboard"); } } #endif diff -Nru liquidwar-5.6.4/src/keyboard.h liquidwar-5.6.5/src/keyboard.h --- liquidwar-5.6.4/src/keyboard.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/keyboard.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/keyexch.c liquidwar-5.6.5/src/keyexch.c --- liquidwar-5.6.4/src/keyexch.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/keyexch.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -97,9 +97,9 @@ * controlled only. */ if (!cursors[i].from_network) - { - netkey.key_states[i] = cursors[i].key_state; - } + { + netkey.key_states[i] = cursors[i].key_state; + } } /* @@ -159,10 +159,10 @@ * Now we check for checksum errors */ if (!netkey.checksum) - { - log_println_str - ("Error: incorrect checksum, the game is broken, or someone is cheating"); - } + { + log_println_str + ("Error: incorrect checksum, the game is broken, or someone is cheating"); + } } return result; diff -Nru liquidwar-5.6.4/src/keyexch.h liquidwar-5.6.5/src/keyexch.h --- liquidwar-5.6.4/src/keyexch.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/keyexch.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/lang.c liquidwar-5.6.5/src/lang.c --- liquidwar-5.6.4/src/lang.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/lang.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -63,6 +63,7 @@ #include "langdk.h" #include "langen.h" #include "langfr.h" +#include "langpl.h" #include "config.h" /*==================================================================*/ @@ -79,6 +80,7 @@ lw_langdk_init (); lw_langen_init (); lw_langfr_init (); + lw_langpl_init (); } /*------------------------------------------------------------------*/ @@ -98,7 +100,7 @@ case LW_LANG_LANGUAGE_DEUTSCH: result = lw_langde_string (id); break; - case LW_LANG_LANGUAGE_DANISH: + case LW_LANG_LANGUAGE_DANSK: result = lw_langdk_string (id); break; case LW_LANG_LANGUAGE_ENGLISH: @@ -107,6 +109,9 @@ case LW_LANG_LANGUAGE_FRANCAIS: result = lw_langfr_string (id); break; + case LW_LANG_LANGUAGE_POLSKI: + result = lw_langpl_string (id); + break; } if (!result) @@ -130,7 +135,7 @@ case LW_LANG_LANGUAGE_DEUTSCH: result = lw_langde_string (LW_LANG_STRING_LANGUAGE); break; - case LW_LANG_LANGUAGE_DANISH: + case LW_LANG_LANGUAGE_DANSK: result = lw_langdk_string (LW_LANG_STRING_LANGUAGE); break; case LW_LANG_LANGUAGE_ENGLISH: @@ -139,6 +144,9 @@ case LW_LANG_LANGUAGE_FRANCAIS: result = lw_langfr_string (LW_LANG_STRING_LANGUAGE); break; + case LW_LANG_LANGUAGE_POLSKI: + result = lw_langpl_string (LW_LANG_STRING_LANGUAGE); + break; } if (!result) @@ -170,35 +178,45 @@ if (env_lang != NULL) { - /* - * We try and check if LANG is set to "DE..." to enable German - * support. - */ - if (strncmp (env_lang, "DE", 2) == 0 || - strncmp (env_lang, "de", 2) == 0) - { - language = LW_LANG_LANGUAGE_DEUTSCH; - } - - /* - * We try and check if LANG is set to "DK..." to enable Danish - * support. - */ - if (strncmp (env_lang, "DK", 2) == 0 || - strncmp (env_lang, "dk", 2) == 0) - { - language = LW_LANG_LANGUAGE_DANISH; - } - - /* - * We try and check if LANG is set to "FR..." to enable French - * support. - */ - if (strncmp (env_lang, "FR", 2) == 0 || - strncmp (env_lang, "fr", 2) == 0) - { - language = LW_LANG_LANGUAGE_FRANCAIS; - } + /* + * We try and check if LANG is set to "DE..." to enable German + * support. + */ + if (strncmp (env_lang, "DE", 2) == 0 || + strncmp (env_lang, "de", 2) == 0) + { + language = LW_LANG_LANGUAGE_DEUTSCH; + } + + /* + * We try and check if LANG is set to "DK..." to enable Danish + * support. + */ + if (strncmp (env_lang, "DK", 2) == 0 || + strncmp (env_lang, "dk", 2) == 0) + { + language = LW_LANG_LANGUAGE_DANSK; + } + + /* + * We try and check if LANG is set to "FR..." to enable French + * support. + */ + if (strncmp (env_lang, "FR", 2) == 0 || + strncmp (env_lang, "fr", 2) == 0) + { + language = LW_LANG_LANGUAGE_FRANCAIS; + } + + /* + * We try and check if LANG is set to "PL..." to enable Polish + * support. + */ + if (strncmp (env_lang, "PL", 2) == 0 || + strncmp (env_lang, "pl", 2) == 0) + { + language = LW_LANG_LANGUAGE_POLSKI; + } } } #endif @@ -213,8 +231,10 @@ * Lists of some Windows language codes, got it online: * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp * - * 0x0406 Danish + * 0x0006 Danish + * 0x0406 Danish (Denmark) * + * 0x000c French * 0x040c French (Standard) * 0x080c French (Belgian) * 0x0c0c French (Canadian) @@ -222,33 +242,44 @@ * 0x140c French (Luxembourg) * 0x180c Windows 98/Me, Windows 2000/XP: French (Monaco) * + * 0x0007 German * 0x0407 German (Standard) * 0x0807 German (Switzerland) * 0x0c07 German (Austria) * 0x1007 German (Luxembourg) * 0x1407 German (Liechtenstein) + * + * 0x0015 Polish + * 0x0415 Polisg (Poland) */ switch (lang_id) { + case 0x0007: case 0x0407: case 0x0807: case 0x0c07: case 0x1007: case 0x1407: - language = LW_LANG_LANGUAGE_DEUTSCH; - break; + language = LW_LANG_LANGUAGE_DEUTSCH; + break; + case 0x0006: case 0x0406: - language = LW_LANG_LANGUAGE_DANISH; - break; + language = LW_LANG_LANGUAGE_DANSK; + break; + case 0x000c: case 0x040c: case 0x080c: case 0x0c0c: case 0x100c: case 0x140c: case 0x180c: - language = LW_LANG_LANGUAGE_FRANCAIS; - break; + language = LW_LANG_LANGUAGE_FRANCAIS; + break; + case 0x0015: + case 0x0415: + language = LW_LANG_LANGUAGE_POLSKI; + break; } } #endif diff -Nru liquidwar-5.6.4/src/langde.c liquidwar-5.6.5/src/langde.c --- liquidwar-5.6.4/src/langde.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langde.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -76,9 +76,9 @@ LW_LANGDE_DATA[LW_LANG_STRING_APPNAME] = "Liquid War " LW_VERSION; LW_LANGDE_DATA[LW_LANG_STRING_HELP_CREDITS] = - "Idee: \n* Thomas Colcombet\n\nProgrammation: \n* Christian Mauduit\n\nMusik: \n* Tim Chadburn\n\nAndere Mitwirkende:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n\nFuer weitere Informationen, siehe www.ufoot.org/liquidwar/v5\n"; + "Idee: \n* Thomas Colcombet\n\nProgrammation: \n* Christian Mauduit\n\nMusik: \n* Tim Chadburn\n\nAndere Mitwirkende:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n* Mikhail Yakshin\n* Valerie Mauduit\n* Florence Mauduit\n* Joey Dodson\n* Jan Szenborn\n\nFuer weitere Informationen, siehe www.ufoot.org/liquidwar/v5\n"; LW_LANGDE_DATA[LW_LANG_STRING_HELP_COPYRIGHT] = - "Liquid War ist ein Kriegspiel fuer mehrere Teilnehmer.\nCopyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org)\n\nDieses Programm ist freie Software. Sie koennen es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veroeffentlicht, weitergeben und/oder modifizieren, entweder gemaess Version 2 der Lizenz oder (nach Ihrer Option) jeder spaeteren Version.\n\nDie Veroeffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FUER EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.\n\nSie sollten eine Kopie der GNU General Public License zusammen mit diesem Programm erhalten haben. Falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.\n\nFuer weitere Informationen, siehe www.ufoot.org/liquidwar/v5\n"; + "Liquid War ist ein Kriegspiel fuer mehrere Teilnehmer.\nCopyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org)\n\nDieses Programm ist freie Software. Sie koennen es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veroeffentlicht, weitergeben und/oder modifizieren, entweder gemaess Version 2 der Lizenz oder (nach Ihrer Option) jeder spaeteren Version.\n\nDie Veroeffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FUER EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.\n\nSie sollten eine Kopie der GNU General Public License zusammen mit diesem Programm erhalten haben. Falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.\n\nFuer weitere Informationen, siehe www.ufoot.org/liquidwar/v5\n"; /* * Stupid Microsoft VC++ can't handle strings over 2048 chars correctly, * (compiler error C2026) so we had to split this one... @@ -336,7 +336,7 @@ LW_LANGDE_DATA[LW_LANG_STRING_POPUP_INITFAIL] = "Initalisierung fehlgeschlagen."; LW_LANGDE_DATA[LW_LANG_STRING_POPUP_MEMTROUBLE] = - "Für Bilder ist nicht genug Speicher vorhanden."; + "Fuer Bilder ist nicht genug Speicher vorhanden."; LW_LANGDE_DATA[LW_LANG_STRING_POPUP_BIGDATA] = "Nicht genug Speicher vorhanden."; LW_LANGDE_DATA[LW_LANG_STRING_POPUP_LOADFAIL] = @@ -345,6 +345,10 @@ "Die selbsterstellten Daten konnten nicht geladen werden."; LW_LANGDE_DATA[LW_LANG_STRING_POPUP_GRAPHICSFAIL] = "Graphiken konnten nicht geladen werden."; + + LW_LANGDE_DATA[LW_LANG_STRING_LW6_INFO] = + "Dieses Programm ist veraltet. Denke ueber ein Upgrade auf Liquid War 6 nach, welches unter folgender Adresse verfuegbar ist:\n\nhttp://www.gnu.org/software/liquidwar6/\n\nLiquid War 5 steht dir weiterhin zur Verfuegung, und kann kostenlos benutzt werden. In Zukunft werden jedoch nur noch groessere Sicherheitsloecher gefixt, eine Weiterentwicklung des Liquid War 5 Baumes sollte nicht erwartet werden."; + LW_LANGDE_DATA[LW_LANG_STRING_LW6_OK] = "OK"; } /*------------------------------------------------------------------*/ diff -Nru liquidwar-5.6.4/src/langde.h liquidwar-5.6.5/src/langde.h --- liquidwar-5.6.4/src/langde.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langde.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/langdk.c liquidwar-5.6.5/src/langdk.c --- liquidwar-5.6.4/src/langdk.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langdk.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -71,13 +71,13 @@ { memset (LW_LANGDK_DATA, 0, sizeof (LW_LANGDK_DATA)); - LW_LANGDK_DATA[LW_LANG_STRING_LANGUAGE] = "Danish"; + LW_LANGDK_DATA[LW_LANG_STRING_LANGUAGE] = "Dansk"; LW_LANGDK_DATA[LW_LANG_STRING_APPNAME] = "Liquid War " LW_VERSION; LW_LANGDK_DATA[LW_LANG_STRING_HELP_CREDITS] = - "Idea: \n* Thomas Colcombet\n\nCoding: \n* Christian Mauduit\n\nMusic:\n* Tim Chadburn\n\nOther contributors:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; + "Idea: \n* Thomas Colcombet\n\nCoding: \n* Christian Mauduit\n\nMusic:\n* Tim Chadburn\n\nOther contributors:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n* Mikhail Yakshin\n* Valerie Mauduit\n* Florence Mauduit\n* Joey Dodson\n* Jan Szenborn\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; LW_LANGDK_DATA[LW_LANG_STRING_HELP_COPYRIGHT] = - "Liquid War er et flerpersoners krigsspil.\nCopyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org)\n\nDette program er frit software; Du kan kopiere og aendre det under betingelserne i GNU General Public License, udgivet af Free Software Foundation; enten version 2 af Licensen, eller (dit valg) hvilken som helst senere version.\n\nDette program er udgivet i haabet om at det er brugbart, men UDEN NOGEN SOM HELST GARANTI; ikke engang nogen indforstaaet garanti for BRUGBARHED eller BRUGBARHED TIL ET SPECIFIKT FORMAAL. Laes GNU General Public License for flere detaljer.\n\nDu skulle have modtaget en kopi af GNU General Public License sammen med dette program; hvis ikke, skriv til Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\nMere information paa www.ufoot.org/liquidwar/v5\n"; + "Liquid War er et flerpersoners krigsspil.\nCopyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org)\n\nDette program er frit software; Du kan kopiere og aendre det under betingelserne i GNU General Public License, udgivet af Free Software Foundation; enten version 2 af Licensen, eller (dit valg) hvilken som helst senere version.\n\nDette program er udgivet i haabet om at det er brugbart, men UDEN NOGEN SOM HELST GARANTI; ikke engang nogen indforstaaet garanti for BRUGBARHED eller BRUGBARHED TIL ET SPECIFIKT FORMAAL. Laes GNU General Public License for flere detaljer.\n\nDu skulle have modtaget en kopi af GNU General Public License sammen med dette program; hvis ikke, skriv til Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\nMere information paa www.ufoot.org/liquidwar/v5\n"; /* * Stupid Microsoft VC++ can't handle strings over 2048 chars correctly, * (compiler error C2026) so we had to split this one... @@ -320,6 +320,10 @@ "Kan ikke loade custom data."; LW_LANGDK_DATA[LW_LANG_STRING_POPUP_GRAPHICSFAIL] = "Kan ikke initialisere grafik."; + + LW_LANGDK_DATA[LW_LANG_STRING_LW6_INFO] = + "This program is obsolete, please consider upgrading to Liquid War 6, available on\n\nhttp://www.gnu.org/software/liquidwar6/\n\nHowever, Liquid War 5 is still available for your convenience, and you can play it freely. Only major security holes will be fixed, expect no major changes on this legacy branch."; + LW_LANGDK_DATA[LW_LANG_STRING_LW6_OK] = "OK"; } diff -Nru liquidwar-5.6.4/src/langdk.h liquidwar-5.6.5/src/langdk.h --- liquidwar-5.6.4/src/langdk.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langdk.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/langen.c liquidwar-5.6.5/src/langen.c --- liquidwar-5.6.4/src/langen.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langen.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -76,9 +76,9 @@ LW_LANGEN_DATA[LW_LANG_STRING_APPNAME] = "Liquid War " LW_VERSION; LW_LANGEN_DATA[LW_LANG_STRING_HELP_CREDITS] = - "Idea: \n* Thomas Colcombet\n\nCoding: \n* Christian Mauduit\n\nMusic:\n* Tim Chadburn\n\nOther contributors:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; + "Idea: \n* Thomas Colcombet\n\nCoding: \n* Christian Mauduit\n\nMusic:\n* Tim Chadburn\n\nOther contributors:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n* Mikhail Yakshin\n* Valerie Mauduit\n* Florence Mauduit\n* Joey Dodson\n* Jan Szenborn\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; LW_LANGEN_DATA[LW_LANG_STRING_HELP_COPYRIGHT] = - "Liquid War is a multiplayer wargame.\nCopyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org)\n\nThis 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.\n\nThis 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.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; + "Liquid War is a multiplayer wargame.\nCopyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org)\n\nThis 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.\n\nThis 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.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; /* * Stupid Microsoft VC++ can't handle strings over 2048 chars correctly, * (compiler error C2026) so we had to split this one... @@ -312,6 +312,10 @@ "Unable to load custom data."; LW_LANGEN_DATA[LW_LANG_STRING_POPUP_GRAPHICSFAIL] = "Unable to initialize graphics."; + + LW_LANGEN_DATA[LW_LANG_STRING_LW6_INFO] = + "This program is obsolete, please consider upgrading to Liquid War 6, available on\n\nhttp://www.gnu.org/software/liquidwar6/\n\nHowever, Liquid War 5 is still available for your convenience, and you can play it freely. Only major security holes will be fixed, expect no major changes on this legacy branch."; + LW_LANGEN_DATA[LW_LANG_STRING_LW6_OK] = "OK"; } /*------------------------------------------------------------------*/ diff -Nru liquidwar-5.6.4/src/langen.h liquidwar-5.6.5/src/langen.h --- liquidwar-5.6.4/src/langen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/langfr.c liquidwar-5.6.5/src/langfr.c --- liquidwar-5.6.4/src/langfr.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langfr.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -76,9 +76,9 @@ LW_LANGFR_DATA[LW_LANG_STRING_APPNAME] = "Liquid War " LW_VERSION; LW_LANGFR_DATA[LW_LANG_STRING_HELP_CREDITS] = - "Idee: \n* Thomas Colcombet\n\nProgrammation: \n* Christian Mauduit\n\nMusique: \n* Tim Chadburn\n\nAutres contributeurs:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n\nPlus d'informations sur www.ufoot.org/liquidwar/v5\n"; + "Idee: \n* Thomas Colcombet\n\nProgrammation: \n* Christian Mauduit\n\nMusique: \n* Tim Chadburn\n\nAutres contributeurs:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n* Mikhail Yakshin\n* Valerie Mauduit\n* Florence Mauduit\n* Joey Dodson\n* Jan Szenborn\n\nPlus d'informations sur www.ufoot.org/liquidwar/v5\n"; LW_LANGFR_DATA[LW_LANG_STRING_HELP_COPYRIGHT] = - "Liquid War est un \"wargame\" multijoueur.\nCopyright (C) 1998-2007 Christian Mauduit (ufoot@ufoot.org)\n\nCe programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformement aux dispositions de la Licence Publique Generale GNU, telle que publiee par la Free Software Foundation ; version 2 de la licence, ou encore (a votre choix) toute version ulterieure.\n\nCe programme est distribue dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans meme la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de detail, voir la Licence Publique Generale GNU .\n\nVous devez avoir recu un exemplaire de la Licence Publique Generale GNU en meme temps que ce programme ; si ce n'est pas le cas, ecrivez a la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.\n\nPlus d'informations sur www.ufoot.org/liquidwar/v5\n"; + "Liquid War est un \"wargame\" multijoueur.\nCopyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org)\n\nCe programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformement aux dispositions de la Licence Publique Generale GNU, telle que publiee par la Free Software Foundation ; version 2 de la licence, ou encore (a votre choix) toute version ulterieure.\n\nCe programme est distribue dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans meme la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de detail, voir la Licence Publique Generale GNU .\n\nVous devez avoir recu un exemplaire de la Licence Publique Generale GNU en meme temps que ce programme ; si ce n'est pas le cas, ecrivez a la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.\n\nPlus d'informations sur www.ufoot.org/liquidwar/v5\n"; /* * Stupid Microsoft VC++ can't handle strings over 2048 chars correctly, * (compiler error C2026) so we had to split this one... @@ -340,6 +340,10 @@ "Impossible de charger les fichiers de données utilisateur."; LW_LANGFR_DATA[LW_LANG_STRING_POPUP_GRAPHICSFAIL] = "Impossible de passer en mode graphique."; + + LW_LANGFR_DATA[LW_LANG_STRING_LW6_INFO] = + "Ce programme est obsolete, vous devriez essayer Liquid War 6, disponible sur\n\nhttp://www.gnu.org/software/liquidwar6/\n\nDans tous les cas, Liquid War 5 reste encore disponible et vous pouvez y jouer librement. Seules les failles de securite majeures seront corrigees, ne pas s'attendre a de gros changement sur cette vieille version."; + LW_LANGFR_DATA[LW_LANG_STRING_LW6_OK] = "OK"; } /*------------------------------------------------------------------*/ diff -Nru liquidwar-5.6.4/src/langfr.h liquidwar-5.6.5/src/langfr.h --- liquidwar-5.6.4/src/langfr.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/langfr.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/lang.h liquidwar-5.6.5/src/lang.h --- liquidwar-5.6.4/src/lang.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/lang.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -66,9 +66,10 @@ #define LW_LANG_LANGUAGE_ENGLISH 0 #define LW_LANG_LANGUAGE_FRANCAIS 1 #define LW_LANG_LANGUAGE_DEUTSCH 2 -#define LW_LANG_LANGUAGE_DANISH 3 +#define LW_LANG_LANGUAGE_DANSK 3 +#define LW_LANG_LANGUAGE_POLSKI 4 -#define LW_LANG_NB_LANGUAGES 4 +#define LW_LANG_NB_LANGUAGES 5 /*------------------------------------------------------------------*/ /* Declaration of all available strings */ @@ -285,7 +286,10 @@ #define LW_LANG_STRING_POPUP_CUSTOMFAIL 183 #define LW_LANG_STRING_POPUP_GRAPHICSFAIL 184 -#define LW_LANG_NB_STRINGS 185 +#define LW_LANG_STRING_LW6_INFO 185 +#define LW_LANG_STRING_LW6_OK 186 + +#define LW_LANG_NB_STRINGS 187 /*==================================================================*/ /* globals */ diff -Nru liquidwar-5.6.4/src/langpl.c liquidwar-5.6.5/src/langpl.c --- liquidwar-5.6.4/src/langpl.c 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/src/langpl.c 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,344 @@ +/********************************************************************/ +/* */ +/* L I QQ U U I DD W W A RR 555 */ +/* L I Q Q U U I D D W W A A R R 5 */ +/* L I Q Q U U I D D W W W AAA RR 55 */ +/* L I Q Q U U I D D WW WW A A R R 5 */ +/* LLL I Q Q U I DD W W A A R R 55 */ +/* */ +/* b */ +/* bb y y */ +/* b b yyy */ +/* bb y */ +/* yy */ +/* */ +/* U U FFF O O TTT */ +/* U U F O O O O T */ +/* U U TIRET FF O O O O T */ +/* U U F O O O O T */ +/* U F O O T */ +/* */ +/********************************************************************/ + +/*****************************************************************************/ +/* Liquid War is a multiplayer wargame */ +/* Copyright (C) 1998-2018 Christian Mauduit */ +/* */ +/* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ +/* Contact author : ufoot@ufoot.org */ +/* Autor of translation: aso.gdynia@gmail.com (http://aso.uh.net.pl) */ +/*****************************************************************************/ + +/********************************************************************/ +/* name : langpl.c */ +/* content : handles Polish dependent stuff (locale) */ +/********************************************************************/ + +/*==================================================================*/ +/* includes */ +/*==================================================================*/ + +#include +#include + +#include "lang.h" +#include "langpl.h" +#include "base.h" + +/*==================================================================*/ +/* globals */ +/*==================================================================*/ + +static char *LW_LANGPL_DATA[LW_LANG_NB_STRINGS]; + +/*------------------------------------------------------------------*/ +/* initializes the string table */ +/*------------------------------------------------------------------*/ +void +lw_langpl_init () +{ + memset (LW_LANGPL_DATA, 0, sizeof (LW_LANGPL_DATA)); + + LW_LANGPL_DATA[LW_LANG_STRING_LANGUAGE] = "Polski"; + LW_LANGPL_DATA[LW_LANG_STRING_APPNAME] = "Liquid War " LW_VERSION; + + LW_LANGPL_DATA[LW_LANG_STRING_HELP_CREDITS] = + "Idea:: \n* Thomas Colcombet\n\nKod: \n* Christian Mauduit\n\nMuzyka:\n* Tim Chadburn\n\nInni:\n* Alstar\n* Peter Wang\n* Cort Danger Stratton\n* Jan Gretschuskin (www.game-factor.de)\n* Mouse\n* Rene Stach\n* Roderick Schertler\n* Ryan D. Brown\n* Eduard Bloch\n* Michael Terry\n* Kasper Hviid\n* David Redick\n* Alexandre Pineau\n* Michael Wagner\n* Peter Williams\n* Jan Samohyl\n* Gavin\n* Dave Vasilevsky\n* 2 of Omega\n* 666-REFIZUL-666\n* Thomas Klausner\n* Joan Dolc\n* Mikhail Yakshin\n* Valerie Mauduit\n* Florence Mauduit\n* Joey Dodson\n* Jan Szenborn\n\nWiÄ™cej informacji na www.ufoot.org/liquidwar/v5\n"; + LW_LANGPL_DATA[LW_LANG_STRING_HELP_COPYRIGHT] = + "Liquid War jest wojennÄ… grÄ… multiplayer.\nCopyright (C) 1998-2018 Christian Mauduit (ufoot@ufoot.org)\n\nTen program jest darmowy; możesz go rozpowszechniać i/lub modyfikować zgodnie z zasadami GNU General Public License wydanej przez Free Software Foundation, zgodnie z wersjÄ… drugÄ… tej licencji albo (wedÅ‚ug Twojego wyboru) późniejszÄ… wersjÄ….\n\nTen program jest rozpowszechniany z nadziejÄ… na bycie użytecznym, ale CAÅKOWICIE BEZ GWARANCJI; nawet bez gwarancji PRZYDATNOÅšCI HANDLOWEJ albo PRZYDATNOÅšCI DO OKREÅšLONYCH ZASTOSOWAŃ. Zobacz GNU General Public License po wiÄ™cej szczegółów.\n\nPowinieneÅ› dostać kopiÄ™ licencji GNU razem z tym programem; jeżeli nie, napisz do Free Software Foundation, Inc., 51 Franklin St, 5 piÄ™tro, Boston, MA 02110-1301 USA\n\nWiÄ™cej informacji na www.ufoot.org/liquidwar/v5\n"; + /* + * Stupid Microsoft VC++ can't handle strings over 2048 chars correctly, + * (compiler error C2026) so we had to split this one... + */ + LW_LANGPL_DATA[LW_LANG_STRING_HELP_LICENSE] = + "GNU GENERAL PUBLIC LICENSE\nVersion 2, June 1991\n\nCopyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA\n\nEveryone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\n\nPreamble\n\nThe 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.\n\nWhen 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. \n\nTo 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. \n\nFor 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.\n\nWe 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.\n\nAlso, " "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.\n\nFinally, 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.\n\nThe precise terms and conditions for copying, distribution and modification follow.\n\nGNU GENERAL PUBLIC LICENSE\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n0. 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\".\nActivities 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. \n\n1. 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. \nYou 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.\n\n2. 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: \na) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.\nb) 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.\nc) 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.)\nThese 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.\nThus, 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. \nIn 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. \n\n3. 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:\na) 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,\nb) 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,\nc) 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.)\nThe 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.\nIf 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. \n\n4. 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.\n\n5. 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.\n\n6. 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.\n\n7. 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.\nIf 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.\nIt 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.\nThis section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\n\n8. " "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.\n\n9. 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.\nEach 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. \n\n10. 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.\n\nNO WARRANTY\n\n11. 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. \n\n12. 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.\n\nEND OF TERMS AND CONDITIONS\n\nMore informations on www.ufoot.org/liquidwar/v5\n"; + LW_LANGPL_DATA[LW_LANG_STRING_HELP_VERSION] = + "Liquid War by U-Foot\n\nv" LW_VERSION " \n\nskompilowany " __DATE__ " o " + __TIME__ "\n\nWiÄ™cej informacji na www.ufoot.org/liquidwar/v5\n"; + + LW_LANGPL_DATA[LW_LANG_STRING_MENU_PLAY] = "Graj"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_NETGAME] = "Gra sieciowa"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_MAP] = "Mapy"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_TEAMS] = "Drużyny"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_OPTIONS] = "Opcje"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_ABOUT] = "Informacje"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_EXIT] = "WyjÅ›cie"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_EXITDOS] = "Wyjdź do DOS"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_EXITWINDOWS] = "WyjÅ›cie"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_EXITUNIX] = "WyjÅ›cie"; + LW_LANGPL_DATA[LW_LANG_STRING_MENU_BACK] = "Wróć do LW"; + + LW_LANGPL_DATA[LW_LANG_STRING_DIALOG_QUIT] = "Zamknij"; + LW_LANGPL_DATA[LW_LANG_STRING_DIALOG_BACK] = "Wróć"; + LW_LANGPL_DATA[LW_LANG_STRING_DIALOG_PLAY] = "Graj"; + LW_LANGPL_DATA[LW_LANG_STRING_DIALOG_MAIN] = "Menu główne"; + + LW_LANGPL_DATA[LW_LANG_STRING_PLAY_GETREADY] = "Przygotuj siÄ™!"; + + LW_LANGPL_DATA[LW_LANG_STRING_NETGAME_STARTGAME] = "Rozpocznij grÄ™"; + LW_LANGPL_DATA[LW_LANG_STRING_NETGAME_SERVERADDR] = "Adres serwera"; + LW_LANGPL_DATA[LW_LANG_STRING_NETGAME_SERVERPORT] = "Port serwera"; + LW_LANGPL_DATA[LW_LANG_STRING_NETGAME_SEARCH] = "Szukaj gier w internecie"; + LW_LANGPL_DATA[LW_LANG_STRING_NETGAME_PASSWORD] = "HasÅ‚o (*)"; + LW_LANGPL_DATA[LW_LANG_STRING_NETGAME_WEAKPASSWORD] = + "(*) UWAGA! Wybierz sÅ‚abe hasÅ‚o typu \"hello\", ponieważ jest przechowywane i wysyÅ‚ane do serwera w postaci czystego tekstu."; + + LW_LANGPL_DATA[LW_LANG_STRING_LANGUAGE_AUTO] = "Automatycznie"; + + LW_LANGPL_DATA[LW_LANG_STRING_TEAM_OFF] = "WyÅ‚Ä…cz"; + LW_LANGPL_DATA[LW_LANG_STRING_TEAM_HUMAN] = "CzÅ‚owiek"; + LW_LANGPL_DATA[LW_LANG_STRING_TEAM_CPU] = "Komputer"; + + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_GRAPHICS] = "Grafika"; + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_SOUND] = "DźwiÄ™k"; + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_RULES] = "Zasady"; + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_SPEEDS] = "PrÄ™dkość"; + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_CONTROLS] = "Klawisze"; + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_LANGUAGE] = "JÄ™zyk"; + LW_LANGPL_DATA[LW_LANG_STRING_OPTIONS_DEFAULT] = "Ust. domyÅ›lne"; + + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_GAME] = "Gra"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_MENU] = "Menu"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_ON] = "WÅ‚."; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_OFF] = "WyÅ‚."; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_FULLSCREEN] = "PeÅ‚en ekran"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_WINDOWED] = "Okno"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_ADVANCED] = "Zaawansowane"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_VIDEOMODE] = "Tryb grafiki"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_BRIGHTNESS] = "Jasność"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_VIEWPORTSIZE] = + "Obszar generowania grafiki"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_PAGEFLIPPING] = "Page flipping"; + LW_LANGPL_DATA[LW_LANG_STRING_GRAPHICS_WAVES] = "Fale (F4)"; + + LW_LANGPL_DATA[LW_LANG_STRING_VOLUME_SFX] = "DźwiÄ™ki"; + LW_LANGPL_DATA[LW_LANG_STRING_VOLUME_CLICK] = "Klik"; + LW_LANGPL_DATA[LW_LANG_STRING_VOLUME_GAMEWATER] = "Woda w grze"; + LW_LANGPL_DATA[LW_LANG_STRING_VOLUME_MENUWATER] = "Woda w menu"; + LW_LANGPL_DATA[LW_LANG_STRING_VOLUME_MUSIC] = "Muzyka"; + + LW_LANGPL_DATA[LW_LANG_STRING_RULES_TIME] = "Czas"; + LW_LANGPL_DATA[LW_LANG_STRING_RULES_ADVANCED] = "Zaawansowane"; + LW_LANGPL_DATA[LW_LANG_STRING_RULES_ARMYSIZE] = "Rozmiar armii"; + LW_LANGPL_DATA[LW_LANG_STRING_RULES_CURSOR] = "Kursor"; + LW_LANGPL_DATA[LW_LANG_STRING_RULES_DEFAULT] = "DomyÅ›lnie"; + LW_LANGPL_DATA[LW_LANG_STRING_RULES_MINMAPRES] = "Min. "; + + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_ATTACK] = "Atak"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_DEFENSE] = "Obrona"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_BASEHEALTH] = "Zdrowie bazowe"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_WINNERHELP] = "Pomoc zwyciÄ™scy"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_CPUSTRENGTH] = "SiÅ‚a CPU"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_CPUVSHUMAN] = + "Komputer przeciwko graczowi"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_ALWAYS] = "Zawsze"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_RANDOM] = "Losowo"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_NEVER] = "Nigdy"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_ASMALGORITHM] = "Algorytm"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_ASSEMBLY] = "Wbudowany"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_STANDARDC] = "Standardowy C"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_ALLOWNETWORKBOTS] = + "Zezwól na boty w sieci"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_YES] = "Tak"; + LW_LANGPL_DATA[LW_LANG_STRING_ADVANCED_NO] = "Nie"; + + LW_LANGPL_DATA[LW_LANG_STRING_SPEEDS_FPS] = "klatki/s"; + LW_LANGPL_DATA[LW_LANG_STRING_SPEEDS_NOFPSLIMIT] = "Brak limitu klatek"; + LW_LANGPL_DATA[LW_LANG_STRING_SPEEDS_RPS] = "rounds/s"; + LW_LANGPL_DATA[LW_LANG_STRING_SPEEDS_NORPSLIMIT] = "Brak limitu RPS"; + + LW_LANGPL_DATA[LW_LANG_STRING_CONTROLS_JOYSTICK] = "Joystick"; + LW_LANGPL_DATA[LW_LANG_STRING_CONTROLS_OFF] = "WyÅ‚Ä…czony"; + LW_LANGPL_DATA[LW_LANG_STRING_CONTROLS_2JOYSTICKS] = "2 joystiki"; + LW_LANGPL_DATA[LW_LANG_STRING_CONTROLS_4BUTTONS] = "4 przyciski"; + LW_LANGPL_DATA[LW_LANG_STRING_CONTROLS_STANDARD] = "Standardowo"; + LW_LANGPL_DATA[LW_LANG_STRING_CONTROLS_MOUSESENSIB] = + "CzuÅ‚ość myszy w grze"; + + LW_LANGPL_DATA[LW_LANG_STRING_ABOUT_CREDITS] = "Autorzy"; + LW_LANGPL_DATA[LW_LANG_STRING_ABOUT_COPYRIGHT] = "Prawa autorskie"; + LW_LANGPL_DATA[LW_LANG_STRING_ABOUT_LICENSE] = "Licencja"; + LW_LANGPL_DATA[LW_LANG_STRING_ABOUT_VERSION] = "Wersja"; + + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_REFRESH] = "OdÅ›wież"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_JOINNOW] = "DoÅ‚Ä…cz"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_PORT] = "Port"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_PASSWORD] = "HasÅ‚o"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_YES] = "tak"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_NO] = "nie"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_UPTIME] = "Czas dziaÅ‚ania"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_DAYS] = "dni"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_DAY] = "dzieÅ„"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_HOURS] = "h"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_MINUTES] = "min"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_SECONDS] = "s"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_UNREACHABLE] = "NieosiÄ…galny"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_PING] = "Ping"; + LW_LANGPL_DATA[LW_LANG_STRING_INTERNET_MSEC] = "ms"; + + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_AMPLI] = "Amplituda"; + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_NUMBER] = "Liczba"; + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_SPEED] = "PRÄ™dkość"; + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_WX] = "WX"; + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_HY] = "HY"; + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_WY] = "WY"; + LW_LANGPL_DATA[LW_LANG_STRING_WAVE_HX] = "HX"; + + LW_LANGPL_DATA[LW_LANG_STRING_CONNECT_STARTNOW] = "Rozpicznij"; + LW_LANGPL_DATA[LW_LANG_STRING_CONNECT_WAITING] = "Oczekiwanie..."; + LW_LANGPL_DATA[LW_LANG_STRING_CONNECT_WAITINGFOR] = "Oczekiwanie na "; + LW_LANGPL_DATA[LW_LANG_STRING_CONNECT_TEAMS] = " drużyn(Ä™)"; + LW_LANGPL_DATA[LW_LANG_STRING_CONNECT_SENDMESSAGE] = "WyÅ›lij wiadomość"; + + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_CONNECT] = "PoÅ‚Ä…cz"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_PING] = "Ping"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_CHECKPROGRAM] = "Sprawdź program"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_CHECKVERSION] = "Sprawdź wersjÄ™"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_SENDPASSWORD] = "HasÅ‚o"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_FREETEAMS] = "Free teams?"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_RESERVETEAMS] = "Zarezerwuj drużyny"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_SENDCONFIG] = "WyÅ›lij ustawienia"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_SENDMAP] = "WyÅ›lij mapÄ™"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_WAITING] = "Oczekiwanie..."; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_WHOPLAYS] = "Kto gra?"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_RECVCONFIG] = "Odbierz ustawienia"; + LW_LANGPL_DATA[LW_LANG_STRING_NETPLAY_RECVMAP] = "Odbierz mapÄ™"; + + LW_LANGPL_DATA[LW_LANG_STRING_LEVEL_USEDEFAULTTEXTURE] = + "Użyj domyÅ›lnej tekstury"; + LW_LANGPL_DATA[LW_LANG_STRING_LEVEL_ON] = "WÅ‚."; + LW_LANGPL_DATA[LW_LANG_STRING_LEVEL_OFF] = "WyÅ‚."; + LW_LANGPL_DATA[LW_LANG_STRING_LEVEL_RANDOMMAP] = "Losowa mapa"; + + LW_LANGPL_DATA[LW_LANG_STRING_CODE_FPS] = "klatki/s "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_RPS] = "rounds/s "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_PERCENTCALC] = "% calc "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_PERCENTDISPLAY] = "% ekranu "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_SPREADGRADTIME] = "Spread grad time "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_MOVEARMYTIME] = "Czas ruchu armii "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_DISPLAYTIME] = "Czas wyÅ›wietlania "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_FLIPTIME] = "Flip time "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_OTHERCALCTIME] = "Other calc time "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GLOBALTIME] = "Czas globalny "; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_STANDARDDISPLAY] = "Standardowy ekran"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GRADIENT1] = "Gradient 1"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GRADIENT2] = "Gradient 2"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GRADIENT3] = "Gradient 3"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GRADIENT4] = "Gradient 4"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GRADIENT5] = "Gradient 5"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_GRADIENT6] = "Gradient 6"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_MESHSIZE] = "Mesh size"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_MESHSTRUCTURE] = "Mesh structure"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_PAUSEOFF] = "WyÅ‚. pauzÄ™"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_PAUSEON] = "WÅ‚. pauzÄ™"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_WAVEEFFECTSOFF] = "Efekt fali wyÅ‚."; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_WAVEEFFECTSON] = "Efekt fali wÅ‚."; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_CAPTUREOFF] = "Video capture off"; + LW_LANGPL_DATA[LW_LANG_STRING_CODE_CAPTUREON] = "Video capture on"; + + LW_LANGPL_DATA[LW_LANG_STRING_SCORE_WINNER] = "ZwyciÄ™sca"; + + LW_LANGPL_DATA[LW_LANG_STRING_GAME_BACKMEMFAIL] = "Back mem fail"; + LW_LANGPL_DATA[LW_LANG_STRING_GAME_DISPMEMFAIL] = "Disp mem fail"; + LW_LANGPL_DATA[LW_LANG_STRING_GAME_MESHMEMFAIL] = "Mesh mem fail"; + LW_LANGPL_DATA[LW_LANG_STRING_GAME_AREAMEMFAIL] = "Area mem fail"; + LW_LANGPL_DATA[LW_LANG_STRING_GAME_ARMYMEMFAIL] = "Army mem fail"; + + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_NOTENOUGHTEAMS] = + "Za maÅ‚o drużyn.\nMusisz zaznaczyć min. 2 drużyny z menu \"Drużyny\"."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_NOTENOUGHBIGDATA] = + "Brak pamiÄ™ci do obsÅ‚ugi poziomu.\nWybierz mniejszy poziom albo zobacz do dokumentacji i wypróbuj opcje z linii komend, np. \"-mem n\"."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_GRAPHICSINITFAILED] = + "Nie udaÅ‚o siÄ™ uruchomić trybu graficznego"; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_NONETWORKSUPPORT] = + "Brak wsparcia sieci dla tej platformy.\nTylko Windows i UNIX obsÅ‚ugujÄ… sieć."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_UNABLETOCONNECT] = + "Nie można siÄ™ poÅ‚Ä…czyć z serwerem.\nMożliwe że nie jest poprawnie skonfigurowany albo jesteÅ› za firewallem który blokuje poÅ‚Ä…czenie."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_NOTALIQUIDWARSERVER] = + "Brak komunikacji z serwerem.\nPrawdopodobnie nie jest to serwer Liquid War."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_WRONGVERSION] = + "ZÅ‚a wersja klienta/serwera.\nSerwer i klient muszÄ… być w tej samej wersji (wersja tej gry to \"" + LW_VERSION "\")."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_NETWORKPROBLEM] = + "WystÄ…piÅ‚ bÅ‚Ä…d sieci.\nTo wystÄ™puje czÄ™sto gdy poÅ‚Ä…czenie z serwerem jest za wolne albo zostaÅ‚o utracone."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_CANTSENDMAP] = + "Nie udaÅ‚o siÄ™ wysÅ‚ać mapy na serwer."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_CANTRECEIVEMAP] = + "Nie udaÅ‚o siÄ™ odebrać mapy z serwera."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_SERVERFULL] = + "Serwer jest obecnie peÅ‚ny i nie akceptuje nowych drużyn."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_BADPASSWORD] = "NieprawidÅ‚owe hasÅ‚o."; + LW_LANGPL_DATA[LW_LANG_STRING_ERROR_BADCONFIGRANGE] = + "Jeden z parametrów gry jest poza zakresem. To może być bÅ‚Ä…d gry lub ktoÅ› próbuje cheatów i/lub hacków."; + + LW_LANGPL_DATA[LW_LANG_STRING_POPUP_INITFAIL] = "BÅ‚Ä…d inicjacji."; + LW_LANGPL_DATA[LW_LANG_STRING_POPUP_MEMTROUBLE] = + "Brak wystarczajÄ…cej pamiÄ™ci na bitmapy."; + LW_LANGPL_DATA[LW_LANG_STRING_POPUP_BIGDATA] = "Za maÅ‚o pamiÄ™ci."; + LW_LANGPL_DATA[LW_LANG_STRING_POPUP_LOADFAIL] = + "Nie można zaÅ‚adować pliku danych. Gra jest zainstalowany poprawnie?"; + LW_LANGPL_DATA[LW_LANG_STRING_POPUP_CUSTOMFAIL] = + "Nie mozna zaÅ‚adować wÅ‚asnych danych."; + LW_LANGPL_DATA[LW_LANG_STRING_POPUP_GRAPHICSFAIL] = + "Nie można zainicjować grafiki."; + + LW_LANGPL_DATA[LW_LANG_STRING_LW6_INFO] = + "This program is obsolete, please consider upgrading to Liquid War 6, available on\n\nhttp://www.gnu.org/software/liquidwar6/\n\nHowever, Liquid War 5 is still available for your convenience, and you can play it freely. Only major security holes will be fixed, expect no major changes on this legacy branch."; + LW_LANGPL_DATA[LW_LANG_STRING_LW6_OK] = "OK"; +} + +/*------------------------------------------------------------------*/ +/* returns the English string associated to an id */ +/*------------------------------------------------------------------*/ +char * +lw_langpl_string (int id) +{ + char *result = NULL; + + if (id >= 0 && id < LW_LANG_NB_STRINGS) + { + result = LW_LANGPL_DATA[id]; + } + + if (!result) + { + result = "??? en"; + } + + return result; +} diff -Nru liquidwar-5.6.4/src/langpl.h liquidwar-5.6.5/src/langpl.h --- liquidwar-5.6.4/src/langpl.h 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/src/langpl.h 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,72 @@ +/********************************************************************/ +/* */ +/* L I QQ U U I DD W W A RR 555 */ +/* L I Q Q U U I D D W W A A R R 5 */ +/* L I Q Q U U I D D W W W AAA RR 55 */ +/* L I Q Q U U I D D WW WW A A R R 5 */ +/* LLL I Q Q U I DD W W A A R R 55 */ +/* */ +/* b */ +/* bb y y */ +/* b b yyy */ +/* bb y */ +/* yy */ +/* */ +/* U U FFF O O TTT */ +/* U U F O O O O T */ +/* U U TIRET FF O O O O T */ +/* U U F O O O O T */ +/* U F O O T */ +/* */ +/********************************************************************/ + +/*****************************************************************************/ +/* Liquid War is a multiplayer wargame */ +/* Copyright (C) 1998-2018 Christian Mauduit */ +/* */ +/* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ +/* Contact author : ufoot@ufoot.org */ +/*****************************************************************************/ + +/********************************************************************/ +/* name : langpl.h */ +/* content : handles Polish dependant stuff (locale) */ +/********************************************************************/ + +#ifndef LIQUID_WAR_INCLUDE_LANGPL +#define LIQUID_WAR_INCLUDE_LANGPL + +/*==================================================================*/ +/* includes */ +/*==================================================================*/ + +/*==================================================================*/ +/* constants */ +/*==================================================================*/ + +/*==================================================================*/ +/* globals */ +/*==================================================================*/ + +/*==================================================================*/ +/* functions */ +/*==================================================================*/ + +extern void lw_langpl_init (); +extern char *lw_langpl_string (int id); + +#endif diff -Nru liquidwar-5.6.4/src/language.c liquidwar-5.6.5/src/language.c --- liquidwar-5.6.4/src/language.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/language.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -107,32 +107,32 @@ { choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 4: - CONFIG_LANGUAGE = LW_LANG_LANGUAGE_AUTO; - update_language (d); - break; - default: - if (choix >= 5 && choix < 5 + LW_LANG_NB_LANGUAGES) - { - CONFIG_LANGUAGE = choix - 5; - update_language (d); - } - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 4: + CONFIG_LANGUAGE = LW_LANG_LANGUAGE_AUTO; + update_language (d); + break; + default: + if (choix >= 5 && choix < 5 + LW_LANG_NB_LANGUAGES) + { + CONFIG_LANGUAGE = choix - 5; + update_language (d); + } + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/language.h liquidwar-5.6.5/src/language.h --- liquidwar-5.6.4/src/language.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/language.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/level.c liquidwar-5.6.5/src/level.c --- liquidwar-5.6.4/src/level.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/level.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -109,9 +109,9 @@ for (j = 0; j < 10; ++j) { - d[k].x = x + j * w1; - d[k].y = y + i * h1; - ++k; + d[k].x = x + j * w1; + d[k].y = y + i * h1; + ++k; } d[k].x = x; d[k].y = y + 12 * h1; @@ -133,13 +133,13 @@ /*------------------------------------------------------------------*/ static void retrieve_choose_level_xy (int *x1, int *x2, int *x3, int *x4, int *x5, - int *x6, int *x7, int *x8, int *y1, int *y2, - int *y3, int *y4, int *y5, int *y6, int *y7, - int *y8) + int *x6, int *x7, int *x8, int *y1, int *y2, + int *y3, int *y4, int *y5, int *y6, int *y7, + int *y8) { (*x1) = (MENU_VIRTUAL_W - MENU_W_LEVEL * 2 - - MENU_H_LEVEL * 2 - - MENU_W_SPACE * 2 - MENU_H_SPACE * 2 - MENU_W_SAMPLE) / 2; + - MENU_H_LEVEL * 2 + - MENU_W_SPACE * 2 - MENU_H_SPACE * 2 - MENU_W_SAMPLE) / 2; (*x2) = (*x1) + MENU_H_SPACE + MENU_H_LEVEL; (*x3) = (*x1) + MENU_W_SPACE + MENU_W_LEVEL; (*x4) = (*x3) + MENU_H_LEVEL + MENU_H_SPACE; @@ -148,7 +148,7 @@ (*x6) = (*x7) - MENU_H_SPACE - MENU_H_LEVEL; (*x8) = (*x7) + MENU_H_LEVEL + MENU_H_SPACE; (*y1) = (MENU_VIRTUAL_H - MENU_H_LEVEL * 4 - - MENU_H_SPACE * 4 - MENU_H_SAMPLE) / 2; + - MENU_H_SPACE * 4 - MENU_H_SAMPLE) / 2; (*y2) = (*y1) + MENU_H_LEVEL + MENU_H_SPACE; (*y3) = (*y1) + MENU_W_LEVEL + MENU_H_SPACE; (*y4) = (*y1) + MENU_H_SAMPLE - MENU_H_LEVEL; @@ -169,14 +169,14 @@ int max_w, max_h, bmp_w, bmp_h; BITMAP *pour_voir; retrieve_choose_level_xy (&x1, &x2, &x3, &x4, &x5, &x6, &x7, &x8, - &y1, &y2, &y3, &y4, &y5, &y6, &y7, &y8); + &y1, &y2, &y3, &y4, &y5, &y6, &y7, &y8); rectfill (screen, menu_real_x (x4), menu_real_y (y1), - menu_real_x (x4 + MENU_W_SAMPLE) - 1, - menu_real_y (y1 + MENU_H_SAMPLE) - 1, MENU_BG); + menu_real_x (x4 + MENU_W_SAMPLE) - 1, + menu_real_y (y1 + MENU_H_SAMPLE) - 1, MENU_BG); lw_maptex_set_fg_palette (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, 0, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); lw_maptex_set_bg_palette (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, 0, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); my_set_palette (); pour_voir = lw_maptex_create_map (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, CONFIG_LEVEL_BG, 0, LW_RANDOM_ON, @@ -191,21 +191,21 @@ bmp_h = pour_voir->h; if (max_w * bmp_h < max_h * bmp_w) - { - sample_w = max_w; - sample_h = (max_w * bmp_h) / bmp_w; - } + { + sample_w = max_w; + sample_h = (max_w * bmp_h) / bmp_w; + } else - { - sample_w = (max_h * bmp_w) / bmp_h; - sample_h = max_h; - } + { + sample_w = (max_h * bmp_w) / bmp_h; + sample_h = max_h; + } sample_x = menu_real_x (x4) + (max_w - sample_w) / 2; sample_y = menu_real_y (y1) + (max_h - sample_h) / 2; stretch_blit (pour_voir, screen, 0, 0, bmp_w, bmp_h, sample_x, - sample_y, sample_w, sample_h); + sample_y, sample_w, sample_h); destroy_bitmap (pour_voir); } if (!lw_maptex_is_custom_texture_used @@ -214,20 +214,20 @@ { rectfill (screen, menu_real_x (x1), menu_real_y (y1), - menu_real_x (x1 + MENU_W_LEVEL) - 1, - menu_real_y (y1 + MENU_W_LEVEL) - 1, MENU_BG); + menu_real_x (x1 + MENU_W_LEVEL) - 1, + menu_real_y (y1 + MENU_W_LEVEL) - 1, MENU_BG); pour_voir = - lw_maptex_create_fg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, 0, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + lw_maptex_create_fg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, 0, + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); if (pour_voir) - { - stretch_blit (pour_voir, screen, 0, 0, pour_voir->w, pour_voir->h, - menu_real_x (x1), menu_real_x (y1), - menu_real_x (MENU_W_LEVEL), - menu_real_x (MENU_W_LEVEL)); - destroy_bitmap (pour_voir); - } + { + stretch_blit (pour_voir, screen, 0, 0, pour_voir->w, pour_voir->h, + menu_real_x (x1), menu_real_x (y1), + menu_real_x (MENU_W_LEVEL), + menu_real_x (MENU_W_LEVEL)); + destroy_bitmap (pour_voir); + } } if (!lw_maptex_is_custom_texture_used (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, 0, LW_RANDOM_ON, @@ -235,20 +235,20 @@ { rectfill (screen, menu_real_x (x8), menu_real_y (y1), - menu_real_x (x8 + MENU_W_LEVEL) - 1, - menu_real_y (y1 + MENU_W_LEVEL) - 1, MENU_BG); + menu_real_x (x8 + MENU_W_LEVEL) - 1, + menu_real_y (y1 + MENU_W_LEVEL) - 1, MENU_BG); pour_voir = - lw_maptex_create_bg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, 0, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + lw_maptex_create_bg (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, 0, + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); if (pour_voir) - { - stretch_blit (pour_voir, screen, 0, 0, pour_voir->w, pour_voir->h, - menu_real_x (x8), menu_real_x (y1), - menu_real_x (MENU_W_LEVEL), - menu_real_x (MENU_W_LEVEL)); - destroy_bitmap (pour_voir); - } + { + stretch_blit (pour_voir, screen, 0, 0, pour_voir->w, pour_voir->h, + menu_real_x (x8), menu_real_x (y1), + menu_real_x (MENU_W_LEVEL), + menu_real_x (MENU_W_LEVEL)); + destroy_bitmap (pour_voir); + } } } @@ -285,8 +285,8 @@ int i; state = !lw_maptex_is_custom_texture_used (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, 0, - LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); + LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); if (state == 0 && last_state != 0) { @@ -314,8 +314,8 @@ int i; state = !lw_maptex_is_custom_texture_used (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, 0, - LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); + LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); if (state == 0 && last_state != 0) { @@ -345,7 +345,7 @@ int y1, y2, y3, y4, y5, y6, y7, y8; memset (d, 0, sizeof (d)); retrieve_choose_level_xy (&x1, &x2, &x3, &x4, &x5, &x6, &x7, &x8, - &y1, &y2, &y3, &y4, &y5, &y6, &y7, &y8); + &y1, &y2, &y3, &y4, &y5, &y6, &y7, &y8); d[0].x = x4; d[0].y = y1; d[0].w = MENU_W_SAMPLE; @@ -396,7 +396,7 @@ { d[2].flags = d[5].flags |= D_HIDDEN; } - d[6].proc = NULL; /* 6 remplace par 9 pour boites des sliders */ + d[6].proc = NULL; /* 6 remplace par 9 pour boites des sliders */ /* caduque depuis que my_slider fait tout tout seul */ dp = my_init_dialog (d, 0); @@ -408,7 +408,7 @@ /*------------------------------------------------------------------*/ static void update_choose_map (DIALOG * d, int map, int fg, int bg, int random, - int use_default_texture) + int use_default_texture) { static char res_buffer[30]; int res_w, res_h; @@ -434,81 +434,81 @@ set_bg_dialogs_visibility (d, &just_hidden); if (just_hidden) - { + { - /* - * OK, now we need to "hide" some part of the screen - * therefore we simply paste the background image and - * redraw everything. This is called a performance killer. - */ - display_back_image (); - for (i = 0; (d + i)->proc != NULL; ++i) - - { - if (!((d + i)->flags & D_HIDDEN)) - - { - (d + i)->proc (MSG_DRAW, d + i, 0); - } - } - } + /* + * OK, now we need to "hide" some part of the screen + * therefore we simply paste the background image and + * redraw everything. This is called a performance killer. + */ + display_back_image (); + for (i = 0; (d + i)->proc != NULL; ++i) + + { + if (!((d + i)->flags & D_HIDDEN)) + + { + (d + i)->proc (MSG_DRAW, d + i, 0); + } + } + } box_for_choose_map (); LW_MACRO_SNPRINTF1 ((char *) d[13].dp, BUFFER_EDIT_NUMBER, "%d", - CONFIG_LEVEL_MAP + 1); + CONFIG_LEVEL_MAP + 1); if (!((d + 13)->flags & D_HIDDEN)) - { - my_edit_proc (MSG_DRAW, d + 13, 0); - } + { + my_edit_proc (MSG_DRAW, d + 13, 0); + } LW_MACRO_SNPRINTF1 ((char *) d[14].dp, BUFFER_EDIT_NUMBER, "%d", - CONFIG_LEVEL_FG + 1); + CONFIG_LEVEL_FG + 1); if (!((d + 14)->flags & D_HIDDEN)) - { - my_edit_proc (MSG_DRAW, d + 14, 0); - } + { + my_edit_proc (MSG_DRAW, d + 14, 0); + } LW_MACRO_SNPRINTF1 ((char *) d[15].dp, BUFFER_EDIT_NUMBER, "%d", - CONFIG_LEVEL_BG + 1); + CONFIG_LEVEL_BG + 1); if (!((d + 15)->flags & D_HIDDEN)) - { - my_edit_proc (MSG_DRAW, d + 15, 0); - } + { + my_edit_proc (MSG_DRAW, d + 15, 0); + } d[4].d2 = CONFIG_LEVEL_MAP; if (CONFIG_LEVEL_FG >= CHOOSE_COLOR_NUMBER) - d[5].d2 = CONFIG_LEVEL_FG - CHOOSE_COLOR_NUMBER; + d[5].d2 = CONFIG_LEVEL_FG - CHOOSE_COLOR_NUMBER; if (CONFIG_LEVEL_BG >= CHOOSE_COLOR_NUMBER) - d[6].d2 = CONFIG_LEVEL_BG - CHOOSE_COLOR_NUMBER; + d[6].d2 = CONFIG_LEVEL_BG - CHOOSE_COLOR_NUMBER; if (d[4].d2 < 0) - d[4].d2 = d[4].d1; + d[4].d2 = d[4].d1; if (d[4].d2 > d[4].d1) - d[4].d2 = 0; + d[4].d2 = 0; if (!((d + 4)->flags & D_HIDDEN)) - { - my_slider_proc (MSG_DRAW, d + 4, 0); - } + { + my_slider_proc (MSG_DRAW, d + 4, 0); + } if (d[5].d2 < 0) - d[5].d2 = d[5].d1; + d[5].d2 = d[5].d1; if (d[5].d2 > d[5].d1) - d[5].d2 = 0; + d[5].d2 = 0; if (!((d + 5)->flags & D_HIDDEN)) - { - my_slider_proc (MSG_DRAW, d + 5, 0); - } + { + my_slider_proc (MSG_DRAW, d + 5, 0); + } if (d[6].d2 < 0) - d[6].d2 = d[6].d1; + d[6].d2 = d[6].d1; if (d[6].d2 > d[6].d1) - d[6].d2 = 0; + d[6].d2 = 0; if (!((d + 6)->flags & D_HIDDEN)) - { - my_slider_proc (MSG_DRAW, d + 6, 0); - } + { + my_slider_proc (MSG_DRAW, d + 6, 0); + } lw_map_get_res (CONFIG_LEVEL_MAP, &res_w, &res_h, 0, LW_RANDOM_ON, - MIN_MAP_RES_W[CONFIG_MIN_MAP_RES], - MIN_MAP_RES_H[CONFIG_MIN_MAP_RES]); + MIN_MAP_RES_W[CONFIG_MIN_MAP_RES], + MIN_MAP_RES_H[CONFIG_MIN_MAP_RES]); LW_MACRO_SPRINTF2 (res_buffer, "%dx%d", res_w, res_h); d[16].dp = res_buffer; my_textbox_proc (MSG_DRAW, d + 16, 0); @@ -537,7 +537,7 @@ d = dp3; map = d2; update_choose_map (d, map, CONFIG_LEVEL_FG, CONFIG_LEVEL_BG, 0, - CONFIG_USE_DEFAULT_TEXTURE); + CONFIG_USE_DEFAULT_TEXTURE); return 0; } @@ -552,7 +552,7 @@ d = dp3; fg = d2 + CHOOSE_COLOR_NUMBER; update_choose_map (d, CONFIG_LEVEL_MAP, fg, CONFIG_LEVEL_BG, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); + CONFIG_USE_DEFAULT_TEXTURE); return 0; } @@ -567,7 +567,7 @@ d = dp3; bg = d2 + CHOOSE_COLOR_NUMBER; update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, bg, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); + CONFIG_USE_DEFAULT_TEXTURE); return 0; } @@ -579,9 +579,9 @@ static char state_buffer[30]; scare_mouse (); LW_MACRO_SPRINTF0 (state_buffer, - lw_lang_string (CONFIG_USE_DEFAULT_TEXTURE ? - LW_LANG_STRING_LEVEL_ON : - LW_LANG_STRING_LEVEL_OFF)); + lw_lang_string (CONFIG_USE_DEFAULT_TEXTURE ? + LW_LANG_STRING_LEVEL_ON : + LW_LANG_STRING_LEVEL_OFF)); d[19].dp = state_buffer; my_button_proc (MSG_DRAW, d + 19, 0); unscare_mouse (); @@ -607,7 +607,7 @@ set_palette_for_choose_color (); quick_buttons (d); retrieve_choose_level_xy (&x1, &x2, &x3, &x4, &x5, &x6, &x7, &x8, - &y1, &y2, &y3, &y4, &y5, &y6, &y7, &y8); + &y1, &y2, &y3, &y4, &y5, &y6, &y7, &y8); d[4].proc = d[5].proc = d[6].proc = my_slider_proc; d[4].dp = d[5].dp = d[6].dp = NULL; d[4].key = d[5].key = d[6].key = 0; @@ -706,147 +706,147 @@ menu_real_coord (d + i); } palette_128 (d + 21, menu_real_x (x1), menu_real_y (y3), - menu_real_x (MENU_W_LEVEL), - menu_real_y (y4 - y3 - MENU_H_SPACE)); + menu_real_x (MENU_W_LEVEL), + menu_real_y (y4 - y3 - MENU_H_SPACE)); palette_128 (d + 149, menu_real_x (x8), menu_real_y (y3), - menu_real_x (MENU_W_LEVEL), - menu_real_y (y4 - y3 - MENU_H_SPACE)); + menu_real_x (MENU_W_LEVEL), + menu_real_y (y4 - y3 - MENU_H_SPACE)); box_for_choose_map (); d[277].proc = NULL; update_use_default_texture_state (d); update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, CONFIG_LEVEL_BG, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); while (retour == 0) { choix = my_do_dialog_no_clear (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - - else - - { - display_back_image (); - box_for_choose_map (); - update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, - CONFIG_LEVEL_BG, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); - } - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 7: - d[4].d2--; - if (d[4].d2 < 0) - d[4].d2 = d[4].d1; - slider_map (d[4].dp3, d[4].d2); - break; - case 8: - d[4].d2++; - if (d[4].d2 > d[4].d1) - d[4].d2 = 0; - slider_map (d[4].dp3, d[4].d2); - break; - case 9: - d[5].d2--; - if (d[5].d2 < 0) - d[5].d2 = d[5].d1; - slider_fg (d[5].dp3, d[5].d2); - break; - case 10: - d[5].d2++; - if (d[5].d2 > d[5].d1) - d[5].d2 = 0; - slider_fg (d[5].dp3, d[5].d2); - break; - case 11: - d[6].d2--; - if (d[6].d2 < 0) - d[6].d2 = d[6].d1; - slider_bg (d[6].dp3, d[6].d2); - break; - case 12: - d[6].d2++; - if (d[6].d2 > d[6].d1) - d[6].d2 = 0; - slider_bg (d[6].dp3, d[6].d2); - break; - case 13: - i = atoi (d[13].dp) - 1; - if (!(i >= 0 && i < RAW_MAP_NUMBER)) - - { - i = CONFIG_LEVEL_MAP; - } - play_click (); - update_choose_map (d, i, CONFIG_LEVEL_FG, CONFIG_LEVEL_BG, 0, - CONFIG_USE_DEFAULT_TEXTURE); - break; - case 14: - i = atoi (d[14].dp) - 1; - if (!(i >= 0 && i < RAW_TEXTURE_NUMBER + CHOOSE_COLOR_NUMBER)) - - { - i = CONFIG_LEVEL_FG; - } - play_click (); - update_choose_map (d, CONFIG_LEVEL_MAP, i, CONFIG_LEVEL_BG, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); - break; - case 15: - i = atoi (d[15].dp) - 1; - if (!(i >= 0 && i < RAW_TEXTURE_NUMBER + CHOOSE_COLOR_NUMBER)) - - { - i = CONFIG_LEVEL_BG; - } - play_click (); - update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, i, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); - break; - case 19: - i = CONFIG_USE_DEFAULT_TEXTURE ? 0 : 1; - update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, - CONFIG_LEVEL_BG, LW_RANDOM_ON, i); - update_use_default_texture_state (d); - break; - case 20: - if (lw_random_generate_map ()) - - { - update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, - CONFIG_LEVEL_BG, 1, - CONFIG_USE_DEFAULT_TEXTURE); - } - break; - default: - if (choix >= 21 && choix < 149) - - { - i = choix - 21; - update_choose_map (d, CONFIG_LEVEL_MAP, i, CONFIG_LEVEL_BG, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); - } - if (choix >= 149 && choix < 277) - - { - i = choix - 149; - update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, i, - LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); - } - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + + else + + { + display_back_image (); + box_for_choose_map (); + update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, + CONFIG_LEVEL_BG, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); + } + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 7: + d[4].d2--; + if (d[4].d2 < 0) + d[4].d2 = d[4].d1; + slider_map (d[4].dp3, d[4].d2); + break; + case 8: + d[4].d2++; + if (d[4].d2 > d[4].d1) + d[4].d2 = 0; + slider_map (d[4].dp3, d[4].d2); + break; + case 9: + d[5].d2--; + if (d[5].d2 < 0) + d[5].d2 = d[5].d1; + slider_fg (d[5].dp3, d[5].d2); + break; + case 10: + d[5].d2++; + if (d[5].d2 > d[5].d1) + d[5].d2 = 0; + slider_fg (d[5].dp3, d[5].d2); + break; + case 11: + d[6].d2--; + if (d[6].d2 < 0) + d[6].d2 = d[6].d1; + slider_bg (d[6].dp3, d[6].d2); + break; + case 12: + d[6].d2++; + if (d[6].d2 > d[6].d1) + d[6].d2 = 0; + slider_bg (d[6].dp3, d[6].d2); + break; + case 13: + i = atoi (d[13].dp) - 1; + if (!(i >= 0 && i < RAW_MAP_NUMBER)) + + { + i = CONFIG_LEVEL_MAP; + } + play_click (); + update_choose_map (d, i, CONFIG_LEVEL_FG, CONFIG_LEVEL_BG, 0, + CONFIG_USE_DEFAULT_TEXTURE); + break; + case 14: + i = atoi (d[14].dp) - 1; + if (!(i >= 0 && i < RAW_TEXTURE_NUMBER + CHOOSE_COLOR_NUMBER)) + + { + i = CONFIG_LEVEL_FG; + } + play_click (); + update_choose_map (d, CONFIG_LEVEL_MAP, i, CONFIG_LEVEL_BG, + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + break; + case 15: + i = atoi (d[15].dp) - 1; + if (!(i >= 0 && i < RAW_TEXTURE_NUMBER + CHOOSE_COLOR_NUMBER)) + + { + i = CONFIG_LEVEL_BG; + } + play_click (); + update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, i, + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + break; + case 19: + i = CONFIG_USE_DEFAULT_TEXTURE ? 0 : 1; + update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, + CONFIG_LEVEL_BG, LW_RANDOM_ON, i); + update_use_default_texture_state (d); + break; + case 20: + if (lw_random_generate_map ()) + + { + update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, + CONFIG_LEVEL_BG, 1, + CONFIG_USE_DEFAULT_TEXTURE); + } + break; + default: + if (choix >= 21 && choix < 149) + + { + i = choix - 21; + update_choose_map (d, CONFIG_LEVEL_MAP, i, CONFIG_LEVEL_BG, + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + } + if (choix >= 149 && choix < 277) + + { + i = choix - 149; + update_choose_map (d, CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, i, + LW_RANDOM_ON, CONFIG_USE_DEFAULT_TEXTURE); + } + } } if (retour > 0) retour--; diff -Nru liquidwar-5.6.4/src/level.h liquidwar-5.6.5/src/level.h --- liquidwar-5.6.4/src/level.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/level.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/logcli.c liquidwar-5.6.5/src/logcli.c --- liquidwar-5.6.4/src/logcli.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/logcli.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -112,6 +112,7 @@ } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -128,6 +129,7 @@ } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -147,6 +149,7 @@ } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -166,6 +169,7 @@ } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -182,10 +186,10 @@ if (LW_LOG_FILE) { fprintf (LW_LOG_FILE, "\n"); - log_flush (); } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -202,10 +206,10 @@ if (LW_LOG_FILE) { fprintf (LW_LOG_FILE, "%s\n", str); - log_flush (); } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -222,10 +226,10 @@ if (LW_LOG_FILE) { fprintf (LW_LOG_FILE, "%d\n", i); - log_flush (); } #endif + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } @@ -233,8 +237,9 @@ void log_flush () { - lw_mutex_lock (&LOG_MUTEX); - +#ifdef GP2X + usleep (100); +#endif #ifndef WIN32 fflush (stdout); #endif @@ -244,8 +249,6 @@ fflush (LW_LOG_FILE); } #endif - - lw_mutex_unlock (&LOG_MUTEX); } /*------------------------------------------------------------------*/ @@ -269,6 +272,7 @@ #endif } + log_flush (); lw_mutex_unlock (&LOG_MUTEX); } diff -Nru liquidwar-5.6.4/src/log.h liquidwar-5.6.5/src/log.h --- liquidwar-5.6.4/src/log.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/log.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/logsrv.c liquidwar-5.6.5/src/logsrv.c --- liquidwar-5.6.4/src/logsrv.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/logsrv.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -94,13 +94,13 @@ time_stamp = time (NULL); time_struct = localtime (&time_stamp); LW_MACRO_SPRINTF6 (time_str, "%04d-%02d-%02d %02d:%02d:%02d: ", - time_struct->tm_year + 1900, - time_struct->tm_mon + 1, - time_struct->tm_mday, - time_struct->tm_hour, - time_struct->tm_min, time_struct->tm_sec); + time_struct->tm_year + 1900, + time_struct->tm_mon + 1, + time_struct->tm_mday, + time_struct->tm_hour, + time_struct->tm_min, time_struct->tm_sec); - fprintf (LW_LOG_FILE, time_str); + fprintf (LW_LOG_FILE, "%s", time_str); } LW_LOG_NEW_LINE = 0; } diff -Nru liquidwar-5.6.4/src/lw6.c liquidwar-5.6.5/src/lw6.c --- liquidwar-5.6.4/src/lw6.c 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/src/lw6.c 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,109 @@ +/********************************************************************/ +/* */ +/* L I QQ U U I DD W W A RR 555 */ +/* L I Q Q U U I D D W W A A R R 5 */ +/* L I Q Q U U I D D W W W AAA RR 55 */ +/* L I Q Q U U I D D WW WW A A R R 5 */ +/* LLL I Q Q U I DD W W A A R R 55 */ +/* */ +/* b */ +/* bb y y */ +/* b b yyy */ +/* bb y */ +/* yy */ +/* */ +/* U U FFF O O TTT */ +/* U U F O O O O T */ +/* U U TIRET FF O O O O T */ +/* U U F O O O O T */ +/* U F O O T */ +/* */ +/********************************************************************/ + +/*****************************************************************************/ +/* Liquid War is a multiplayer wargame */ +/* Copyright (C) 1998-2018 Christian Mauduit */ +/* */ +/* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ +/* Contact author : ufoot@ufoot.org */ +/*****************************************************************************/ + +/********************************************************************/ +/* nom : lw6.c */ +/* contenu : advertising for Liquid War 6 */ +/* date de modif : 2010 */ +/********************************************************************/ + +/*==================================================================*/ +/* includes */ +/*==================================================================*/ + +#include + +#include "back.h" +#include "dialog.h" +#include "help.h" +#include "menu.h" +#include "lw6.h" +#include "options.h" +#include "play.h" +#include "error.h" +#include "about.h" +#include "lang.h" +#include "log.h" + +/*==================================================================*/ +/* fonctions */ +/*==================================================================*/ + +/*------------------------------------------------------------------*/ +int +lw6_advertise_menu (int fade_in) +{ + int ret = 0; + DIALOG d[3]; + + memset (d, 0, sizeof (d)); + + display_back_image (); + + if (fade_in) + { + my_fade_in (); + } + + d[2].proc = NULL; + standard_button (d, 0, 0, 1, 1); + standard_button (d + 1, 0, 9, 1, 10); + + d[0].proc = my_textbox_proc; + d[0].d2 = 0; + d[0].key = 0; + d[0].flags = 0; + d[0].x = MENU_W_SPACE / 2; + d[0].y = (MENU_H_SPACE * 3) / 2 + MENU_H_STANDARD * 2; + d[0].w = MENU_VIRTUAL_W - MENU_W_SPACE; + d[0].h = (MENU_H_SPACE * 6) + MENU_H_STANDARD * 7; + menu_real_coord (d); + + d[0].dp = lw_lang_string (LW_LANG_STRING_LW6_INFO); + d[1].dp = lw_lang_string (LW_LANG_STRING_LW6_OK); + + ret = (my_do_dialog (d, 0) == 1) ? 1 : 0; + + return ret; +} diff -Nru liquidwar-5.6.4/src/lw6.h liquidwar-5.6.5/src/lw6.h --- liquidwar-5.6.4/src/lw6.h 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/src/lw6.h 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,68 @@ +/********************************************************************/ +/* */ +/* L I QQ U U I DD W W A RR 555 */ +/* L I Q Q U U I D D W W A A R R 5 */ +/* L I Q Q U U I D D W W W AAA RR 55 */ +/* L I Q Q U U I D D WW WW A A R R 5 */ +/* LLL I Q Q U I DD W W A A R R 55 */ +/* */ +/* b */ +/* bb y y */ +/* b b yyy */ +/* bb y */ +/* yy */ +/* */ +/* U U FFF O O TTT */ +/* U U F O O O O T */ +/* U U TIRET FF O O O O T */ +/* U U F O O O O T */ +/* U F O O T */ +/* */ +/********************************************************************/ + +/*****************************************************************************/ +/* Liquid War is a multiplayer wargame */ +/* Copyright (C) 1998-2018 Christian Mauduit */ +/* */ +/* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ +/* Contact author : ufoot@ufoot.org */ +/*****************************************************************************/ + +/********************************************************************/ +/* nom : lw6.h */ +/* contenu : advertising for Liquid War 6 */ +/* date de modif : 2010 */ +/********************************************************************/ + +#ifndef LIQUID_WAR_INCLUDE_LW6 +#define LIQUID_WAR_INCLUDE_LW6 + +/*==================================================================*/ +/* includes */ +/*==================================================================*/ + +/*==================================================================*/ +/* variables globales */ +/*==================================================================*/ + +/*==================================================================*/ +/* fonctions globales */ +/*==================================================================*/ + +int lw6_advertise_menu (int fade_in); + +#endif diff -Nru liquidwar-5.6.4/src/lwwin.rc liquidwar-5.6.5/src/lwwin.rc --- liquidwar-5.6.4/src/lwwin.rc 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/lwwin.rc 2018-12-23 19:04:36.000000000 +0000 @@ -3,8 +3,8 @@ allegro_icon ICON "./misc/liquidwar.ico" 1 VERSIONINFO -FILEVERSION 5, 6, 4, 1 -PRODUCTVERSION 5, 6, 4, 1 +FILEVERSION 5, 6, 5, 1 +PRODUCTVERSION 5, 6, 5, 1 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS VOS__WINDOWS32 @@ -17,13 +17,13 @@ BEGIN VALUE "Comments", "A unique multiplayer wargame\0" VALUE "CompanyName", "N/A\0" - VALUE "FileDescription", "Liquid War 5.6.4 for Microsoft Windows\0" - VALUE "FileVersion", "5.6.4-1\0" + VALUE "FileDescription", "Liquid War 5.6.5 for Microsoft Windows\0" + VALUE "FileVersion", "5.6.5-1\0" VALUE "InternalName", "liquidwar\0" - VALUE "LegalCopyright", "Copyright (C) 1998-2007 Christian Mauduit\0" + VALUE "LegalCopyright", "Copyright (C) 1998-2018 Christian Mauduit\0" VALUE "OriginalFilename", "lwwin.exe\0" VALUE "ProductName", "Liquid War\0" - VALUE "ProductVersion", "5.6.4\0" + VALUE "ProductVersion", "5.6.5\0" END END END diff -Nru liquidwar-5.6.4/src/lwwin.rc.in liquidwar-5.6.5/src/lwwin.rc.in --- liquidwar-5.6.4/src/lwwin.rc.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/lwwin.rc.in 2018-12-23 19:04:36.000000000 +0000 @@ -20,7 +20,7 @@ VALUE "FileDescription", "Liquid War @VERSION@ for Microsoft Windows\0" VALUE "FileVersion", "@VERSION@-@VERSION_REL@\0" VALUE "InternalName", "liquidwar\0" - VALUE "LegalCopyright", "Copyright (C) 1998-2007 Christian Mauduit\0" + VALUE "LegalCopyright", "Copyright (C) 1998-2018 Christian Mauduit\0" VALUE "OriginalFilename", "lwwin.exe\0" VALUE "ProductName", "Liquid War\0" VALUE "ProductVersion", "@VERSION@\0" diff -Nru liquidwar-5.6.4/src/macro.h liquidwar-5.6.5/src/macro.h --- liquidwar-5.6.4/src/macro.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/macro.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -67,7 +67,7 @@ #define LW_MACRO_MEMSET0(BUFFER) { memset((BUFFER),0,sizeof(BUFFER)); } -#define LW_MACRO_STRNCPY(DST,SRC,SIZE) { memset((DST),0,(SIZE)); strncpy((DST),(SRC),(SIZE)-1); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_STRNCPY(DST,SRC,SIZE) { memset((DST),0,(SIZE)); strncpy((DST),(SRC),(SIZE)); (DST)[(SIZE)-1]='\0'; } #define LW_MACRO_STRCPY(DST,SRC) { LW_MACRO_STRNCPY((DST),(SRC),sizeof(DST)); } #define LW_MACRO_STRNCAT(DST,SRC,SIZE) { int len,pos; pos=strlen(DST); len=(SIZE)-1-pos; if (len>0) { int end; strncat((DST),(SRC),len); end = pos+strlen(SRC); if (end<(int) ((SIZE)-1)) { (DST)[end]='\0'; } } (DST)[(SIZE)-1]='\0'; } @@ -75,21 +75,21 @@ /* * GCC 3.0 supports "..." parameters, together with __VA_ARGS__, however - * GCC 2.95 does not seem to support it. Since we want LW to be + * GCC 2.95 does not seem to support it. Since we want LW to be * "GCC 2.95 friendly" we do not use this stuff. It's in C99 however... * So that's why there are zillion macros depending on how many args are * provided to the snprintf function. 8-( */ #define LW_MACRO_SNPRINTF0(DST,SIZE,FMT) { LW_MACRO_STRNCPY((DST),(FMT),(SIZE)); } -#define LW_MACRO_SNPRINTF1(DST,SIZE,FMT,A) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF2(DST,SIZE,FMT,A,B) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF3(DST,SIZE,FMT,A,B,C) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),C); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF4(DST,SIZE,FMT,A,B,C,D) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),C,(D)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF5(DST,SIZE,FMT,A,B,C,D,E) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),C,(D),(E)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF6(DST,SIZE,FMT,A,B,C,D,E,F) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),C,(D),(E),(F)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF7(DST,SIZE,FMT,A,B,C,D,E,F,G) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),C,(D),(E),(F),(G)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF8(DST,SIZE,FMT,A,B,C,D,E,F,G,H) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),(C),(D),(E),(F),(G),(H)); (DST)[(SIZE)-1]='\0'; } -#define LW_MACRO_SNPRINTF9(DST,SIZE,FMT,A,B,C,D,E,F,G,H,I) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE)-1,(FMT),(A),(B),(C),(D),(E),(F),(G),(H),(I)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF1(DST,SIZE,FMT,A) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF2(DST,SIZE,FMT,A,B) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF3(DST,SIZE,FMT,A,B,C) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),C); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF4(DST,SIZE,FMT,A,B,C,D) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),C,(D)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF5(DST,SIZE,FMT,A,B,C,D,E) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),C,(D),(E)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF6(DST,SIZE,FMT,A,B,C,D,E,F) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),C,(D),(E),(F)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF7(DST,SIZE,FMT,A,B,C,D,E,F,G) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),C,(D),(E),(F),(G)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF8(DST,SIZE,FMT,A,B,C,D,E,F,G,H) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),(C),(D),(E),(F),(G),(H)); (DST)[(SIZE)-1]='\0'; } +#define LW_MACRO_SNPRINTF9(DST,SIZE,FMT,A,B,C,D,E,F,G,H,I) { memset((DST),0,(SIZE)); snprintf((DST),(SIZE),(FMT),(A),(B),(C),(D),(E),(F),(G),(H),(I)); (DST)[(SIZE)-1]='\0'; } #define LW_MACRO_SPRINTF0(DST,FMT) { LW_MACRO_SNPRINTF0((DST),sizeof(DST),(FMT)); } #define LW_MACRO_SPRINTF1(DST,FMT,A) { LW_MACRO_SNPRINTF1((DST),sizeof(DST),(FMT),(A)); } diff -Nru liquidwar-5.6.4/src/main.c liquidwar-5.6.5/src/main.c --- liquidwar-5.6.4/src/main.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/main.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -64,6 +64,7 @@ #include "init.h" #include "log.h" #include "menu.h" +#include "lw6.h" #include "parser.h" #include "sound.h" #include "startup.h" @@ -114,30 +115,30 @@ init_success = init_all (); if (init_success) - { - big_data_success = (malloc_big_data () != NULL); - log_println (); - load_dat_success = load_dat (); - log_println (); - load_custom_success = load_custom (); - log_println (); + { + big_data_success = (malloc_big_data () != NULL); + log_println (); + load_dat_success = load_dat (); + log_println (); + load_custom_success = load_custom (); + log_println (); #ifdef DOS - if (STARTUP_STOP) - readkey (); - else - delay (500); + if (STARTUP_STOP) + readkey (); + else + delay (500); #endif - } + } if (!init_success) - my_exit (EXIT_CODE_INIT_FAIL); + my_exit (EXIT_CODE_INIT_FAIL); if (!big_data_success) - my_exit (EXIT_CODE_BIG_DATA); + my_exit (EXIT_CODE_BIG_DATA); if (!load_dat_success) - my_exit (EXIT_CODE_LOAD_FAIL); + my_exit (EXIT_CODE_LOAD_FAIL); if (!load_custom_success) - my_exit (EXIT_CODE_CUSTOM_FAIL); + my_exit (EXIT_CODE_CUSTOM_FAIL); order_map (); check_config_range (); @@ -146,7 +147,15 @@ start_graphic (); start_water (); - main_menu (); + if (CONFIG_LW6_ADVERTISING_DONE || CONFIG_LW6_ADVERTISING_SKIP) + { + main_menu (1); + } + else + { + CONFIG_LW6_ADVERTISING_DONE = lw6_advertise_menu (1); + main_menu (0); + } my_exit (EXIT_CODE_OK); } diff -Nru liquidwar-5.6.4/src/Makefile.in liquidwar-5.6.5/src/Makefile.in --- liquidwar-5.6.4/src/Makefile.in 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/Makefile.in 2018-12-23 19:04:36.000000000 +0000 @@ -1,34 +1,35 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ datadir = @datadir@ DATADIR = $(datadir)/games/liquidwar GAMEDIR = $(exec_prefix)/games -TARGET_OPT = @TARGET_OPT@ +HOST_OPT = @HOST_OPT@ STATIC = @STATIC@ SNPRINTF = @SNPRINTF@ ALCFLAGS = @ALCFLAGS@ -ALLIBS = @ALLIBS@ ASM = @ASM@ DEBUG = @DEBUG@ EFENCE = @EFENCE@ PTHREAD = @PTHREAD@ +GP2X = @GP2X@ -ifeq ($(TARGET_OPT),yes) - TARGET = @target@ - TARGET_CPU = @target_cpu@ - TARGET_CPU_CC = "-march=@target_cpu@" +ifeq ($(HOST_OPT),yes) + HOST = @host@ + HOST_CPU = @host_cpu@ + HOST_CPU_CC = "-march=@host_cpu@" else - TARGET = default - TARGET_CPU = default - TARGET_CPU_CC = + HOST = default + HOST_CPU = default + HOST_CPU_CC = endif # -mcpu=x86_64 doesn't work, here's a workarround -ifeq ("@target_cpu@","x86_64") - TARGET_CPU_CC = "-m64" +ifeq ("@host_cpu@","x86_64") + HOST_CPU_CC = "-m64" endif @@ -45,7 +46,13 @@ ifeq ($(EFENCE),yes) EFENCE_LIBRARY = -lefence else - EFENCE_LIBRARY = + EFENCE_LIBRARY = +endif + +ifeq ($(GP2X),yes) + GP2X_OPTIONS = -DGP2X +else + GP2X_OPTIONS = endif ifeq ($(SNPRINTF),yes) @@ -55,7 +62,7 @@ else SNPRINTF_NAMES = ../utils/snprintf/snprintf SNPRINTF_OPTIONS = -DSNPRINTF - SNPRINTF_MODE = "using Mark Martinec's implementation" + SNPRINTF_MODE = "using Mark Martinec's implementation" endif ifeq ($(ASM),yes) @@ -112,9 +119,11 @@ langdk \ langen \ langfr \ + langpl \ language \ level \ logcli \ + lw6 \ main \ map \ maptex \ @@ -162,6 +171,7 @@ watchdog \ wave \ wwwcli \ + x11icon \ $(SNPRINTF_NAMES) \ $(ASM_NAMES) @@ -210,7 +220,7 @@ ../utils/lwmapgen/rand_poly \ ../utils/lwmapgen/rand_poly_cut \ ../utils/lwmapgen/street \ - ../utils/lwmapgen/worms + ../utils/lwmapgen/worms OBJ_FILES = $(addsuffix .o, $(OBJ_NAMES)) OBJ_FILES_SRV = $(addsuffix .o, $(OBJ_NAMES_SRV)) @@ -222,7 +232,7 @@ LINK_OPTIONS = --static EXTERN_LIBS = `allegro-config --static $(ALLEGRO_LIBRARY)` $(EFENCE_LIBRARY) else - LINK_OPTIONS = + LINK_OPTIONS = EXTERN_LIBS = `allegro-config --libs $(ALLEGRO_LIBRARY)` $(EFENCE_LIBRARY) endif @@ -235,22 +245,22 @@ -DCONFIG_UNIX_SRV=\"$(GAMEDIR)/liquidwar-server\" \ -DCONFIG_UNIX_GEN=\"$(GAMEDIR)/liquidwar-mapgen\" -CMD_CC = $(CC) $(CFLAGS) $(ALCFLAGS) -c $(DEBUG_FLAGS) -Wall -W $(TARGET_CPU_CC) $(CONFIG_OPTIONS) $(DEBUG_OPTIONS) $(SPRINTF_OPTIONS) $(ASM_OPTIONS) -DUNIX -D_THREAD_SAFE +CMD_CC = $(CC) $(CFLAGS) $(ALCFLAGS) -c $(DEBUG_FLAGS) -Wall -W $(HOST_CPU_CC) $(CONFIG_OPTIONS) $(DEBUG_OPTIONS) $(SPRINTF_OPTIONS) $(ASM_OPTIONS) $(GP2X_OPTIONS) -DUNIX -D_THREAD_SAFE CMD_AS = $(AS) $(ASFLAGS) --32 all: $(EXE_FILES) liquidwar: $(OBJ_FILES) - @echo "Linking $@ (target=$(TARGET), debug=$(DEBUG), static=$(STATIC), asm=$(ASM))" - @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES) $(PTHREAD) $(EXTERN_LIBS) + @echo "Linking $@ (host=$(HOST), debug=$(DEBUG), static=$(STATIC), asm=$(ASM))" + @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES) $(PTHREAD) $(EXTERN_LIBS) liquidwar-server: $(OBJ_FILES_SRV) - @echo "Linking $@ (target=$(TARGET), debug=$(DEBUG), static=$(STATIC))" + @echo "Linking $@ (host=$(HOST), debug=$(DEBUG), static=$(STATIC))" @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES_SRV) $(PTHREAD) liquidwar-mapgen: $(OBJ_FILES_MAPGEN) - @echo "Linking $@ (target=$(TARGET), debug=$(DEBUG), static=$(STATIC))" - @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES_MAPGEN) $(PTHREAD) $(EXTERN_LIBS) + @echo "Linking $@ (host=$(HOST), debug=$(DEBUG), static=$(STATIC))" + @$(CC) $(LDFLAGS) $(LINK_OPTIONS) -o $@ $(OBJ_FILES_MAPGEN) -lm $(PTHREAD) $(EXTERN_LIBS) dep: @find . \ @@ -260,7 +270,7 @@ xargs $(CMD_CC) -M | \ sed "s/\(.*\.o:\)/\1/g;" > Makefile.dep -clean: +clean: @rm -f *.o *.obj @rm -f $(OBJ_FILES) $(OBJ_FILES_SRV) $(OBJ_FILES_MAPGEN) @rm -f $(EXE_FILES) @@ -269,23 +279,26 @@ @rm -f Makefile Makefile.dep %.o: %.c - @echo "Compiling $< (cpu=$(TARGET_CPU), debug=$(DEBUG), asm=$(ASM))" + @echo "Compiling $< (cpu=$(HOST_CPU), debug=$(DEBUG), asm=$(ASM))" @$(CMD_CC) $< -o $@ %.o: %.s @echo "Assembling" $< @$(CMD_AS) $< -o $@ -config: print_config print_cmd_cc print_cmd_as +config: print_config print_cmd_cc print_cmd_as print_cmd_ld @true check: - @find . -name "*.[c|h]" -a ! -path "*32*" -exec indent {} \; + @echo No unit tests, blame the lazy developper. + +indent: + @find . -name "*.[c|h]" -a ! -path "*32*" -exec indent -nut {} \; @find . -name "*.[c|h]" -a ! -path "*32*" -exec splint {} \; print_config: @echo "The configuration options to generate binaries are:" - @echo "Target :" $(TARGET) + @echo "Host :" $(HOST) @echo "Debug :" $(DEBUG) @echo "Static link :" $(STATIC) @echo "Assembly :" $(ASM) @@ -299,7 +312,8 @@ @echo "The command line to compile .s files in this directory is:" @echo $(CMD_AS) -include Makefile.dep - - +print_cmd_ld: + @echo "The command line to link .o files in this directory is:" + @echo $(CC) $(LDFLAGS) $(LINK_OPTIONS) $(PTHREAD) $(EXTERN_LIBS) +include Makefile.dep diff -Nru liquidwar-5.6.4/src/map.c liquidwar-5.6.5/src/map.c --- liquidwar-5.6.4/src/map.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/map.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -112,9 +112,9 @@ for (i = 0; i < 256; ++i) { if (6 * pal[i].r + 3 * pal[i].g + pal[i].b > LIGHT_OR_DARK_TRESHOLD) - table[i] = CONSIDERED_AS_LIGHT; + table[i] = CONSIDERED_AS_LIGHT; else - table[i] = CONSIDERED_AS_DARK; + table[i] = CONSIDERED_AS_DARK; } for (y = 0; y < bmp->h; ++y) @@ -137,16 +137,16 @@ for (y = 0; y < src->h; ++y) for (x = 0; x < src->w; ++x) if (getpixel (src, x, y) == CONSIDERED_AS_DARK) - { - if (min_x > x) - min_x = x; - if (min_y > y) - min_y = y; - if (max_x < x) - max_x = x; - if (max_y < y) - max_y = y; - } + { + if (min_x > x) + min_x = x; + if (min_y > y) + min_y = y; + if (max_x < x) + max_x = x; + if (max_y < y) + max_y = y; + } dst_x = min_x; dst_y = min_y; dst_w = max_x - min_x + 1; @@ -158,7 +158,7 @@ { result = my_create_bitmap (dst_w, dst_h); if (result) - blit (src, result, dst_x, dst_y, 0, 0, dst_w, dst_h); + blit (src, result, dst_x, dst_y, 0, 0, dst_w, dst_h); } return result; @@ -173,41 +173,41 @@ for (y = 0; y < bmp->h; ++y) for (x = 0; x < bmp->w; ++x) if (getpixel (bmp, x, y) == color2) - { - x1 = x - 1; - if (x1 < 0) - x1 = 0; - x2 = x + 1; - if (x2 > bmp->w - 1) - x2 = bmp->w - 1; - y1 = y - 1; - if (y1 < 0) - y1 = 0; - y2 = y + 1; - if (y2 > bmp->h - 1) - y2 = bmp->h - 1; - - if (getpixel (bmp, x2, y) == color1) - { - putpixel (bmp, x2, y, color2); - found++; - } - if (getpixel (bmp, x2, y2) == color1) - { - putpixel (bmp, x2, y2, color2); - found++; - } - if (getpixel (bmp, x, y2) == color1) - { - putpixel (bmp, x, y2, color2); - found++; - } - if (getpixel (bmp, x1, y2) == color1) - { - putpixel (bmp, x1, y2, color2); - found++; - } - } + { + x1 = x - 1; + if (x1 < 0) + x1 = 0; + x2 = x + 1; + if (x2 > bmp->w - 1) + x2 = bmp->w - 1; + y1 = y - 1; + if (y1 < 0) + y1 = 0; + y2 = y + 1; + if (y2 > bmp->h - 1) + y2 = bmp->h - 1; + + if (getpixel (bmp, x2, y) == color1) + { + putpixel (bmp, x2, y, color2); + found++; + } + if (getpixel (bmp, x2, y2) == color1) + { + putpixel (bmp, x2, y2, color2); + found++; + } + if (getpixel (bmp, x, y2) == color1) + { + putpixel (bmp, x, y2, color2); + found++; + } + if (getpixel (bmp, x1, y2) == color1) + { + putpixel (bmp, x1, y2, color2); + found++; + } + } return found; } @@ -221,41 +221,41 @@ for (y = bmp->h - 1; y >= 0; --y) for (x = bmp->w - 1; x >= 0; --x) if (getpixel (bmp, x, y) == color2) - { - x1 = x - 1; - if (x1 < 0) - x1 = 0; - x2 = x + 1; - if (x2 > bmp->w - 1) - x2 = bmp->w - 1; - y1 = y - 1; - if (y1 < 0) - y1 = 0; - y2 = y + 1; - if (y2 > bmp->h - 1) - y2 = bmp->h - 1; - - if (getpixel (bmp, x1, y) == color1) - { - putpixel (bmp, x1, y, color2); - found++; - } - if (getpixel (bmp, x1, y1) == color1) - { - putpixel (bmp, x1, y1, color2); - found++; - } - if (getpixel (bmp, x, y1) == color1) - { - putpixel (bmp, x, y1, color2); - found++; - } - if (getpixel (bmp, x2, y1) == color1) - { - putpixel (bmp, x2, y1, color2); - found++; - } - } + { + x1 = x - 1; + if (x1 < 0) + x1 = 0; + x2 = x + 1; + if (x2 > bmp->w - 1) + x2 = bmp->w - 1; + y1 = y - 1; + if (y1 < 0) + y1 = 0; + y2 = y + 1; + if (y2 > bmp->h - 1) + y2 = bmp->h - 1; + + if (getpixel (bmp, x1, y) == color1) + { + putpixel (bmp, x1, y, color2); + found++; + } + if (getpixel (bmp, x1, y1) == color1) + { + putpixel (bmp, x1, y1, color2); + found++; + } + if (getpixel (bmp, x, y1) == color1) + { + putpixel (bmp, x, y1, color2); + found++; + } + if (getpixel (bmp, x2, y1) == color1) + { + putpixel (bmp, x2, y1, color2); + found++; + } + } return found; } @@ -282,17 +282,17 @@ for (y = 0; y < bmp->h && y0 < 0; ++y) for (x = 0; x < bmp->w && x0 < 0; ++x) if (getpixel (bmp, x, y) == CONSIDERED_AS_LIGHT) - { - x0 = x; - y0 = y; - } + { + x0 = x; + y0 = y; + } if (x0 > 0 && y0 > 0) { putpixel (bmp, x, y, PLAYABLE_AREA); while (spread_color_down (bmp, CONSIDERED_AS_LIGHT, - PLAYABLE_AREA) - + spread_color_up (bmp, CONSIDERED_AS_LIGHT, PLAYABLE_AREA)); + PLAYABLE_AREA) + + spread_color_up (bmp, CONSIDERED_AS_LIGHT, PLAYABLE_AREA)); } else unplayable |= 1; @@ -300,7 +300,7 @@ for (y = 0; y < bmp->h; ++y) for (x = 0; x < bmp->w; ++x) if (getpixel (bmp, x, y) == PLAYABLE_AREA) - ++playable_place; + ++playable_place; unplayable |= (playable_place < MINI_PLAYABLE_AREA); @@ -320,10 +320,10 @@ for (y = 0; y < bmp->h; ++y) { for (x = 0; x < bmp->w; ++x) - { - putpixel (bmp, x, y, - getpixel (bmp, x, y) == PLAYABLE_AREA ? bg : fg); - } + { + putpixel (bmp, x, y, + getpixel (bmp, x, y) == PLAYABLE_AREA ? bg : fg); + } } } @@ -344,24 +344,24 @@ { l = 0; if (data[pos_src] != PLAYABLE_AREA) - { - while (pos_src < wh && (data[pos_src] != PLAYABLE_AREA) && l < 127) - { - l++; - pos_src++; - } - buffer[(*size)++] = l; - } + { + while (pos_src < wh && (data[pos_src] != PLAYABLE_AREA) && l < 127) + { + l++; + pos_src++; + } + buffer[(*size)++] = l; + } else - { - while (pos_src < wh && (data[pos_src] == PLAYABLE_AREA) && l < 127) - { - l++; - pos_src++; - } - buffer[(*size)++] = -l; - (*bg_size) += l; - } + { + while (pos_src < wh && (data[pos_src] == PLAYABLE_AREA) && l < 127) + { + l++; + pos_src++; + } + buffer[(*size)++] = -l; + (*bg_size) += l; + } } buffer[(*size)++] = 0; } @@ -383,66 +383,66 @@ sort_light_and_dark (bmp, pal); sub_bmp = extract_significant_part (bmp); if (sub_bmp) - { - w = sub_bmp->w; - h = sub_bmp->h; - if (check_if_playable (sub_bmp)) - { - temp = malloc_in_big_data_bottom (w * h + 1); - if (temp) - convert_to_buffer (sub_bmp, temp, &size, &bg_size); - } - destroy_bitmap (sub_bmp); - } + { + w = sub_bmp->w; + h = sub_bmp->h; + if (check_if_playable (sub_bmp)) + { + temp = malloc_in_big_data_bottom (w * h + 1); + if (temp) + convert_to_buffer (sub_bmp, temp, &size, &bg_size); + } + destroy_bitmap (sub_bmp); + } destroy_bitmap (bmp); } if (temp) { result = - malloc (size + 8 + LW_MAP_SYSTEM_NAME_SIZE + - LW_MAP_READABLE_NAME_SIZE); + malloc (size + 8 + LW_MAP_SYSTEM_NAME_SIZE + + LW_MAP_READABLE_NAME_SIZE); if (result) - { - /* - * Write the header (size + geometry) - */ - lw_serial_set_map_header ((void *) result, size, (short) w, - (short) h); - - /* - * Then we store its system name - */ - memset (system_name_buffer, 0, sizeof (system_name_buffer)); - LW_MACRO_STRCPY (system_name_buffer, - lw_path_get_system_name (filename)); - memcpy (result + 8, system_name_buffer, LW_MAP_SYSTEM_NAME_SIZE); - - /* - * Then we store its readable name - */ - memset (readable_name_buffer, 0, sizeof (readable_name_buffer)); - if (strcmp (filename, "lwmapgen") == 0) - { - /* - * This is a map generated by lwmapgen, we label it as such. - */ - LW_MACRO_SPRINTF0 (readable_name_buffer, "Random map"); - } - else - { - LW_MACRO_SPRINTF1 (readable_name_buffer, "Custom map %d", - index++); - } - memcpy (result + 8 + LW_MAP_SYSTEM_NAME_SIZE, readable_name_buffer, - LW_MAP_READABLE_NAME_SIZE); - - /* - * And at last we write the map itself - */ - memcpy (result + 8 + LW_MAP_SYSTEM_NAME_SIZE + - LW_MAP_READABLE_NAME_SIZE, temp, size); - } + { + /* + * Write the header (size + geometry) + */ + lw_serial_set_map_header ((void *) result, size, (short) w, + (short) h); + + /* + * Then we store its system name + */ + memset (system_name_buffer, 0, sizeof (system_name_buffer)); + LW_MACRO_STRCPY (system_name_buffer, + lw_path_get_system_name (filename)); + memcpy (result + 8, system_name_buffer, LW_MAP_SYSTEM_NAME_SIZE); + + /* + * Then we store its readable name + */ + memset (readable_name_buffer, 0, sizeof (readable_name_buffer)); + if (strcmp (filename, "lwmapgen") == 0) + { + /* + * This is a map generated by lwmapgen, we label it as such. + */ + LW_MACRO_SPRINTF0 (readable_name_buffer, "Random map"); + } + else + { + LW_MACRO_SPRINTF1 (readable_name_buffer, "Custom map %d", + index++); + } + memcpy (result + 8 + LW_MAP_SYSTEM_NAME_SIZE, readable_name_buffer, + LW_MAP_READABLE_NAME_SIZE); + + /* + * And at last we write the map itself + */ + memcpy (result + 8 + LW_MAP_SYSTEM_NAME_SIZE + + LW_MAP_READABLE_NAME_SIZE, temp, size); + } free_last_big_data_bottom (); } @@ -485,13 +485,13 @@ else { if (random && LW_RANDOM_RAW_MAP != NULL) - { - raw_map = LW_RANDOM_RAW_MAP; - } + { + raw_map = LW_RANDOM_RAW_MAP; + } else - { - raw_map = RAW_MAP_ORDERED[num]; - } + { + raw_map = RAW_MAP_ORDERED[num]; + } } return raw_map; @@ -500,8 +500,8 @@ /*------------------------------------------------------------------*/ BITMAP * lw_map_create_bicolor (int num, int fg, int bg, - int network, int random, int min_w, int min_h, - int *zoom_factor) + int network, int random, int min_w, int min_h, + int *zoom_factor) { int pos_dst, pos_src, i, j, l, color; short w, h; @@ -532,52 +532,52 @@ { data_dst = temp->dat; while (pos_src < size && (l = data_src[pos_src++]) != 0) - { - if (l > 0) - color = CONSIDERED_AS_DARK; - else - { - l = -l; - color = CONSIDERED_AS_LIGHT; - } - for (i = 0; i < l && pos_dst < surface; ++i) - data_dst[pos_dst++] = color; - } + { + if (l > 0) + color = CONSIDERED_AS_DARK; + else + { + l = -l; + color = CONSIDERED_AS_LIGHT; + } + for (i = 0; i < l && pos_dst < surface; ++i) + data_dst[pos_dst++] = color; + } /* * We check if the map is "playable". Normally unplayable maps * should never make it there but... */ if (check_if_playable (temp)) - { - fill_with_fg_and_bg (temp, fg, bg); + { + fill_with_fg_and_bg (temp, fg, bg); - result = my_create_bitmap (w * (*zoom_factor), h * (*zoom_factor)); + result = my_create_bitmap (w * (*zoom_factor), h * (*zoom_factor)); - if (result) - { - /* - * Not we magnify the map if needed, so that very small - * maps are interesting to play on fast fancy computers - */ - for (y = 0; y < h; ++y) - for (x = 0; x < w; ++x) - { - color = getpixel (temp, x, y); - for (i = 0; i < *zoom_factor; ++i) - for (j = 0; j < *zoom_factor; ++j) - { - putpixel (result, - x * *zoom_factor + j, - y * *zoom_factor + i, color); - } - } - } - } + if (result) + { + /* + * Not we magnify the map if needed, so that very small + * maps are interesting to play on fast fancy computers + */ + for (y = 0; y < h; ++y) + for (x = 0; x < w; ++x) + { + color = getpixel (temp, x, y); + for (i = 0; i < *zoom_factor; ++i) + for (j = 0; j < *zoom_factor; ++j) + { + putpixel (result, + x * *zoom_factor + j, + y * *zoom_factor + i, color); + } + } + } + } else - { - log_println_str ("Error: unplayable map!"); - } + { + log_println_str ("Error: unplayable map!"); + } destroy_bitmap (temp); } @@ -588,7 +588,7 @@ /*------------------------------------------------------------------*/ BITMAP * lw_map_create_textured (int num, int fg, int bg, - int network, int random, int min_w, int min_h) + int network, int random, int min_w, int min_h) { int x, y, w, h, color; BITMAP *result = NULL, *bg_tex, *fg_tex; @@ -607,39 +607,39 @@ fg_h = fg_tex->h; result = - lw_map_create_bicolor (num, 1, 0, network, random, - min_w, min_h, &zoom_factor); + lw_map_create_bicolor (num, 1, 0, network, random, + min_w, min_h, &zoom_factor); if (result) - { - w = result->w; - h = result->h; - zoom_factor_fg = zoom_factor_bg = zoom_factor; - if (w != zoom_factor * fg_tex->w || h != zoom_factor * fg_tex->h) - { - zoom_factor_fg = 1; - } - if (w != zoom_factor * bg_tex->w || h != zoom_factor * bg_tex->h) - { - zoom_factor_bg = 1; - } - for (y = 0; y < h; ++y) - for (x = 0; x < w; ++x) - { - if (getpixel (result, x, y)) - { - color = - getpixel (fg_tex, (x / zoom_factor_fg) % fg_w, - (y / zoom_factor_bg) % fg_h); - } - else - { - color = - getpixel (bg_tex, (x / zoom_factor_bg) % bg_w, - (y / zoom_factor_bg) % bg_h); - } - putpixel (result, x, y, color); - } - } + { + w = result->w; + h = result->h; + zoom_factor_fg = zoom_factor_bg = zoom_factor; + if (w != zoom_factor * fg_tex->w || h != zoom_factor * fg_tex->h) + { + zoom_factor_fg = 1; + } + if (w != zoom_factor * bg_tex->w || h != zoom_factor * bg_tex->h) + { + zoom_factor_bg = 1; + } + for (y = 0; y < h; ++y) + for (x = 0; x < w; ++x) + { + if (getpixel (result, x, y)) + { + color = + getpixel (fg_tex, (x / zoom_factor_fg) % fg_w, + (y / zoom_factor_bg) % fg_h); + } + else + { + color = + getpixel (bg_tex, (x / zoom_factor_bg) % bg_w, + (y / zoom_factor_bg) % bg_h); + } + putpixel (result, x, y, color); + } + } } if (bg_tex) @@ -682,7 +682,7 @@ LW_MACRO_MEMSET0 (result); memcpy (result, char_ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE, - LW_MAP_READABLE_NAME_SIZE); + LW_MAP_READABLE_NAME_SIZE); result[sizeof (result) - 1] = '\0'; return result; @@ -691,7 +691,7 @@ /*------------------------------------------------------------------*/ void lw_map_get_res (int num, int *w, int *h, int network, int random, int min_w, - int min_h) + int min_h) { void *raw_map; short res_w, res_h; diff -Nru liquidwar-5.6.4/src/map.h liquidwar-5.6.5/src/map.h --- liquidwar-5.6.4/src/map.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/map.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -70,16 +70,16 @@ void *lw_map_archive_raw (const char *filename); void *lw_map_archive_raw_bmp (BITMAP * bmp, PALETTE pal, - const char *filename); + const char *filename); BITMAP *lw_map_create_bicolor (int num, int fg, int bg, - int network, int random, int min_w, int min_h, - int *zoom_factor); + int network, int random, int min_w, int min_h, + int *zoom_factor); BITMAP *lw_map_create_textured (int num, int fg, int bg, - int network, int random, int min_w, - int min_h); + int network, int random, int min_w, + int min_h); char *lw_map_get_system_name (int num, int network, int random); char *lw_map_get_readable_name (int num, int network, int random); void lw_map_get_res (int num, int *w, int *h, - int network, int random, int min_w, int min_h); + int network, int random, int min_w, int min_h); #endif diff -Nru liquidwar-5.6.4/src/maptex.c liquidwar-5.6.5/src/maptex.c --- liquidwar-5.6.4/src/maptex.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/maptex.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -74,8 +74,8 @@ /*-----------------------------------------------------------------*/ static int calc_real_texture_number (int num, - int texture, int network, int random, - int use_default_texture, int *found) + int texture, int network, int random, + int use_default_texture, int *found) { int i; char *map_name; @@ -93,15 +93,15 @@ map_name = lw_map_get_system_name (num, network, random); for (i = CHOOSE_COLOR_NUMBER; - i < CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER + RAW_MAPTEX_NUMBER - && !(*found); ++i) - { - if (strcmp (map_name, lw_texture_get_system_name (i)) == 0) - { - *found = 1; - real_texture = i; - } - } + i < CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER + RAW_MAPTEX_NUMBER + && !(*found); ++i) + { + if (strcmp (map_name, lw_texture_get_system_name (i)) == 0) + { + *found = 1; + real_texture = i; + } + } } return real_texture; @@ -110,14 +110,14 @@ /*-----------------------------------------------------------------*/ int lw_maptex_is_custom_texture_used (int num, - int texture, - int network, int random, - int use_default_texture) + int texture, + int network, int random, + int use_default_texture) { int result = 0; calc_real_texture_number (num, texture, network, random, - use_default_texture, &result); + use_default_texture, &result); return result; } @@ -125,22 +125,22 @@ /*-----------------------------------------------------------------*/ BITMAP * lw_maptex_create_map (int num, int fg, int bg, - int network, int random, int min_w, int min_h, - int use_default_texture) + int network, int random, int min_w, int min_h, + int use_default_texture) { BITMAP *result; int found; result = lw_map_create_textured (num, - calc_real_texture_number (num, fg, - network, random, - use_default_texture, - &found), - calc_real_texture_number (num, bg, - network, random, - use_default_texture, - &found), - network, random, min_w, min_h); + calc_real_texture_number (num, fg, + network, random, + use_default_texture, + &found), + calc_real_texture_number (num, bg, + network, random, + use_default_texture, + &found), + network, random, min_w, min_h); return result; } @@ -148,15 +148,15 @@ /*-----------------------------------------------------------------*/ BITMAP * lw_maptex_create_fg (int num, int fg, int network, int random, - int use_default_texture) + int use_default_texture) { BITMAP *result; int found; result = lw_texture_create_fg (calc_real_texture_number - (num, fg, network, random, use_default_texture, - &found)); + (num, fg, network, random, use_default_texture, + &found)); return result; } @@ -164,15 +164,15 @@ /*-----------------------------------------------------------------*/ BITMAP * lw_maptex_create_bg (int num, int bg, int network, int random, - int use_default_texture) + int use_default_texture) { BITMAP *result; int found; result = lw_texture_create_bg (calc_real_texture_number - (num, bg, network, random, use_default_texture, - &found)); + (num, bg, network, random, use_default_texture, + &found)); return result; } @@ -180,25 +180,25 @@ /*-----------------------------------------------------------------*/ void lw_maptex_set_fg_palette (int num, - int fg, int network, int random, - int use_default_texture) + int fg, int network, int random, + int use_default_texture) { int found; set_fg_texture_palette (calc_real_texture_number - (num, fg, network, random, use_default_texture, - &found)); + (num, fg, network, random, use_default_texture, + &found)); } /*-----------------------------------------------------------------*/ void lw_maptex_set_bg_palette (int num, - int bg, int network, int random, - int use_default_texture) + int bg, int network, int random, + int use_default_texture) { int found; set_bg_texture_palette (calc_real_texture_number - (num, bg, network, random, use_default_texture, - &found)); + (num, bg, network, random, use_default_texture, + &found)); } diff -Nru liquidwar-5.6.4/src/maptex.h liquidwar-5.6.5/src/maptex.h --- liquidwar-5.6.4/src/maptex.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/maptex.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -66,19 +66,19 @@ /*==================================================================*/ int lw_maptex_is_custom_texture_used (int num, - int texture, - int network, int random, - int use_default_texture); + int texture, + int network, int random, + int use_default_texture); BITMAP *lw_maptex_create_map (int num, int fg, int bg, int network, - int random, int min_w, int min_h, - int use_default_texture); + int random, int min_w, int min_h, + int use_default_texture); BITMAP *lw_maptex_create_fg (int num, int fg, int network, int random, - int use_default_texture); + int use_default_texture); BITMAP *lw_maptex_create_bg (int num, int bg, int network, int random, - int use_default_texture); + int use_default_texture); void lw_maptex_set_fg_palette (int num, int fg, int network, int random, - int use_default_texture); + int use_default_texture); void lw_maptex_set_bg_palette (int num, int bg, int network, int random, - int use_default_texture); + int use_default_texture); #endif diff -Nru liquidwar-5.6.4/src/menu.c liquidwar-5.6.5/src/menu.c --- liquidwar-5.6.4/src/menu.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/menu.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -97,7 +97,7 @@ d[0].dp = lw_lang_string (LW_LANG_STRING_MENU_EXITUNIX); #endif d[1].dp = lw_lang_string (LW_LANG_STRING_MENU_BACK); - d[0].key = 'd'; + d[0].key = 'q'; d[1].key = 'w'; return (my_do_dialog (d, 0) == 0); @@ -109,7 +109,7 @@ /*------------------------------------------------------------------*/ void -main_menu (void) +main_menu (int fade_in) { DIALOG d[11]; int i, choix = 4, retour = 0; @@ -117,17 +117,16 @@ memset (d, 0, sizeof (d)); display_back_image (); - /* - dp=my_init_dialog (d,4); - my_update_dialog (dp); - shutdown_dialog (dp); - */ - my_fade_in (); + + if (fade_in) + { + my_fade_in (); + } while (retour != MENU_EXIT) { for (i = 0; i < 6; ++i) - standard_button (d + i + 4, 0, i, 1, 6); + standard_button (d + i + 4, 0, i, 1, 6); quick_buttons (d); d[MENU_QUICK_BACK].flags = D_HIDDEN; @@ -142,56 +141,56 @@ choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 4: - LW_NETWORK_ON = 0; - retour = play_sequence (); - break; - case 5: + { + case -1: + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 4: + LW_NETWORK_ON = 0; + retour = play_sequence (); + break; + case 5: #ifndef DOS - retour = network_game (); + retour = network_game (); #else - retour = error_no_network_support (); + retour = error_no_network_support (); #endif - break; - case 6: - retour = choose_map (); - break; - case 7: - retour = choose_teams (); - break; - case 8: - retour = options (); - break; - case 9: - retour = lw_about (); - break; - } + break; + case 6: + retour = choose_map (); + break; + case 7: + retour = choose_teams (); + break; + case 8: + retour = options (); + break; + case 9: + retour = lw_about (); + break; + } /* * We handle the quick top-right "Play" button */ if (retour == MENU_PLAY) - { - if (LW_NETWORK_ON) - { + { + if (LW_NETWORK_ON) + { #ifndef DOS - retour = netplay_sequence (); + retour = netplay_sequence (); #else - retour = play_sequence (); + retour = play_sequence (); #endif - } - else - { - retour = play_sequence (); - } - } + } + else + { + retour = play_sequence (); + } + } } } diff -Nru liquidwar-5.6.4/src/menu.h liquidwar-5.6.5/src/menu.h --- liquidwar-5.6.4/src/menu.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/menu.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -64,6 +64,6 @@ /*==================================================================*/ int confirm_quit (void); -void main_menu (void); +void main_menu (int fade_in); #endif diff -Nru liquidwar-5.6.4/src/mesh.c liquidwar-5.6.5/src/mesh.c --- liquidwar-5.6.4/src/mesh.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mesh.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -112,46 +112,46 @@ if (result != NULL) { for (i = 0; i < size; ++i) - { - result[i].size = 1; - result[i].corres = 3; - for (j = 0; j < NB_DIRS; ++j) - result[i].link[j] = NULL; - } + { + result[i].size = 1; + result[i].corres = 3; + for (j = 0; j < NB_DIRS; ++j) + result[i].link[j] = NULL; + } for (y = 0; y < h; ++y) - for (x = 0; x < w; ++x) - result[y * w + x].used = (getpixel (map, x, y) == MESH_FG) ? 0 : 1; + for (x = 0; x < w; ++x) + result[y * w + x].used = (getpixel (map, x, y) == MESH_FG) ? 0 : 1; for (y = 1; y < h - 1; ++y) - for (x = 1; x < w - 1; ++x) - { - i = y * w + x; - - if (result[i].used) - { - if (result[i - w].used) - result[i].link[DIR_NNW] = result[i].link[DIR_NNE] - = result + i - w; - if (result[i - w + 1].used) - result[i].link[DIR_NE] = result + i - w + 1; - if (result[i + 1].used) - result[i].link[DIR_ENE] = result[i].link[DIR_ESE] - = result + i + 1; - if (result[i + w + 1].used) - result[i].link[DIR_SE] = result + i + w + 1; - if (result[i + w].used) - result[i].link[DIR_SSE] = result[i].link[DIR_SSW] - = result + i + w; - if (result[i + w - 1].used) - result[i].link[DIR_SW] = result + i + w - 1; - if (result[i - 1].used) - result[i].link[DIR_WSW] = result[i].link[DIR_WNW] - = result + i - 1; - if (result[i - w - 1].used) - result[i].link[DIR_NW] = result + i - w - 1; - } - } + for (x = 1; x < w - 1; ++x) + { + i = y * w + x; + + if (result[i].used) + { + if (result[i - w].used) + result[i].link[DIR_NNW] = result[i].link[DIR_NNE] + = result + i - w; + if (result[i - w + 1].used) + result[i].link[DIR_NE] = result + i - w + 1; + if (result[i + 1].used) + result[i].link[DIR_ENE] = result[i].link[DIR_ESE] + = result + i + 1; + if (result[i + w + 1].used) + result[i].link[DIR_SE] = result + i + w + 1; + if (result[i + w].used) + result[i].link[DIR_SSE] = result[i].link[DIR_SSW] + = result + i + w; + if (result[i + w - 1].used) + result[i].link[DIR_SW] = result + i + w - 1; + if (result[i - 1].used) + result[i].link[DIR_WSW] = result[i].link[DIR_WNW] + = result + i - 1; + if (result[i - w - 1].used) + result[i].link[DIR_NW] = result + i - w - 1; + } + } } return result; @@ -166,66 +166,65 @@ group_mesher (MESHER * mesher, BITMAP * map, int step) { int found = 0; - int x, y, w, h, size, i, j, k; + int x, y, w, h, i, j, k; MESHER *ne, *se, *sw, *nw, *test; w = map->w; h = map->h; - size = h * w; for (y = 0; y < h - step; y += step * 2) for (x = 0; x < w - step; x += step * 2) { - i = y * w + x; - ne = mesher + i + step; - se = mesher + i + (w + 1) * step; - sw = mesher + i + w * step; - nw = mesher + i; - - if (ne->used && ne->size == step - && se->used && se->size == step - && sw->used && sw->size == step - && nw->used && nw->size == step - && ne->link[DIR_NNW] == ne->link[DIR_NNE] - && ne->link[DIR_ENE] == ne->link[DIR_ESE] - && se->link[DIR_ENE] == se->link[DIR_ESE] - && se->link[DIR_SSE] == se->link[DIR_SSW] - && sw->link[DIR_SSE] == sw->link[DIR_SSW] - && sw->link[DIR_WSW] == sw->link[DIR_WNW] - && nw->link[DIR_WSW] == nw->link[DIR_WNW] - && nw->link[DIR_NNW] == nw->link[DIR_NNE] - && ne->link[DIR_NE] != NULL - && se->link[DIR_SE] != NULL - && sw->link[DIR_SW] != NULL && nw->link[DIR_NW] != NULL) - { - ne->used = 0; - se->used = 0; - sw->used = 0; - - nw->size = step * 2; - nw->link[DIR_NNE] = ne->link[DIR_NNE]; - nw->link[DIR_NE] = ne->link[DIR_NE]; - nw->link[DIR_ENE] = ne->link[DIR_ENE]; - nw->link[DIR_ESE] = se->link[DIR_ESE]; - nw->link[DIR_SE] = se->link[DIR_SE]; - nw->link[DIR_SSE] = se->link[DIR_SSE]; - nw->link[DIR_SSW] = sw->link[DIR_SSW]; - nw->link[DIR_SW] = sw->link[DIR_SW]; - nw->link[DIR_WSW] = sw->link[DIR_WSW]; - - for (j = 0; j < NB_DIRS; ++j) - for (k = 0; k < NB_DIRS; ++k) - { - if (nw->link[j]) - { - test = ((MESHER *) (nw->link[j]))->link[k]; - if (test == ne || test == se || test == sw) - ((MESHER *) (nw->link[j]))->link[k] = nw; - } - } + i = y * w + x; + ne = mesher + i + step; + se = mesher + i + (w + 1) * step; + sw = mesher + i + w * step; + nw = mesher + i; + + if (ne->used && ne->size == step + && se->used && se->size == step + && sw->used && sw->size == step + && nw->used && nw->size == step + && ne->link[DIR_NNW] == ne->link[DIR_NNE] + && ne->link[DIR_ENE] == ne->link[DIR_ESE] + && se->link[DIR_ENE] == se->link[DIR_ESE] + && se->link[DIR_SSE] == se->link[DIR_SSW] + && sw->link[DIR_SSE] == sw->link[DIR_SSW] + && sw->link[DIR_WSW] == sw->link[DIR_WNW] + && nw->link[DIR_WSW] == nw->link[DIR_WNW] + && nw->link[DIR_NNW] == nw->link[DIR_NNE] + && ne->link[DIR_NE] != NULL + && se->link[DIR_SE] != NULL + && sw->link[DIR_SW] != NULL && nw->link[DIR_NW] != NULL) + { + ne->used = 0; + se->used = 0; + sw->used = 0; + + nw->size = step * 2; + nw->link[DIR_NNE] = ne->link[DIR_NNE]; + nw->link[DIR_NE] = ne->link[DIR_NE]; + nw->link[DIR_ENE] = ne->link[DIR_ENE]; + nw->link[DIR_ESE] = se->link[DIR_ESE]; + nw->link[DIR_SE] = se->link[DIR_SE]; + nw->link[DIR_SSE] = se->link[DIR_SSE]; + nw->link[DIR_SSW] = sw->link[DIR_SSW]; + nw->link[DIR_SW] = sw->link[DIR_SW]; + nw->link[DIR_WSW] = sw->link[DIR_WSW]; + + for (j = 0; j < NB_DIRS; ++j) + for (k = 0; k < NB_DIRS; ++k) + { + if (nw->link[j]) + { + test = ((MESHER *) (nw->link[j]))->link[k]; + if (test == ne || test == se || test == sw) + ((MESHER *) (nw->link[j]))->link[k] = nw; + } + } - ++found; - } + ++found; + } } return found; @@ -257,25 +256,25 @@ { j = 0; for (i = 0; i < mesher_size; ++i) - { - if (mesher[i].used) - { - result[j].x = i % (*w); - result[j].y = i / (*w); - result[j].side.decal_for_dir = 0; - result[j].side.size = mesher[i].size; - for (k = 0; k < NB_DIRS; ++k) - result[j].link[k] = mesher[i].link[k]; - mesher[i].corres = j; - - j++; - } - } + { + if (mesher[i].used) + { + result[j].x = i % (*w); + result[j].y = i / (*w); + result[j].side.decal_for_dir = 0; + result[j].side.size = mesher[i].size; + for (k = 0; k < NB_DIRS; ++k) + result[j].link[k] = mesher[i].link[k]; + mesher[i].corres = j; + + j++; + } + } for (j = 0; j < (*size); ++j) - for (k = 0; k < NB_DIRS; ++k) - if ((temp = (result[j].link[k])) != NULL) - result[j].link[k] = result + temp->corres; + for (k = 0; k < NB_DIRS; ++k) + if ((temp = (result[j].link[k])) != NULL) + result[j].link[k] = result + temp->corres; } return result; @@ -294,10 +293,10 @@ for (i = 0; i < CURRENT_MESH_SIZE; ++i) { for (j = 0; j < NB_TEAMS; ++j) - { - CURRENT_MESH[i].info[j].state.dir = (i + j) % NB_DIRS; - CURRENT_MESH[i].info[j].update.time = -1; - } + { + CURRENT_MESH[i].info[j].state.dir = (i + j) % NB_DIRS; + CURRENT_MESH[i].info[j].update.time = -1; + } } } @@ -306,15 +305,23 @@ test_one_mesh (MESH * test) { MESH m; - MESH *bof; - int i; - i = m.x = test->x; - i = m.y = test->y; + m.x = test->x; + m.y = test->y; m.side = test->side; m.info[NB_TEAMS - 1] = test->info[NB_TEAMS - 1]; + m.link[NB_DIRS - 1] = test->link[NB_DIRS - 1]; - bof = m.link[NB_DIRS - 1] = test->link[NB_DIRS - 1]; + if (m.x >= 0 && m.y >= 0) + { + /* + * Test above is worth nothing, actually it's + * to get rid of a computer warning, but to + * be honest this function existence is just + * to check memory handling is OK and show + * up basic pointers errors and reveal bugs. + */ + } } /*------------------------------------------------------------------*/ @@ -327,8 +334,8 @@ { test_one_mesh (CURRENT_MESH + i); for (k = 0; k < NB_DIRS; ++k) - if (CURRENT_MESH[i].link[k] != NULL) - test_one_mesh (CURRENT_MESH[i].link[k]); + if (CURRENT_MESH[i].link[k] != NULL) + test_one_mesh (CURRENT_MESH[i].link[k]); } } @@ -348,29 +355,29 @@ if ((map = lw_map_create_bicolor (CONFIG_LEVEL_MAP, - MESH_FG, - MESH_BG, - LW_NETWORK_ON, - LW_RANDOM_ON, - MIN_MAP_RES_W[LW_CONFIG_CURRENT_RULES.min_map_res], - MIN_MAP_RES_H[LW_CONFIG_CURRENT_RULES.min_map_res], - &zoom_factor)) != NULL) + MESH_FG, + MESH_BG, + LW_NETWORK_ON, + LW_RANDOM_ON, + MIN_MAP_RES_W[LW_CONFIG_CURRENT_RULES.min_map_res], + MIN_MAP_RES_H[LW_CONFIG_CURRENT_RULES.min_map_res], + &zoom_factor)) != NULL) { mesher = create_first_mesher (map); if (mesher != NULL) - { - i = 1; - while (i <= MESH_MAX_ELEM_SIZE / 2 && group_mesher (mesher, map, i)) - i *= 2; - CURRENT_MESH = mesher_to_mesh (mesher, map, - &CURRENT_MESH_SIZE, - &CURRENT_AREA_W, &CURRENT_AREA_H); - free_last_big_data_top (); - } + { + i = 1; + while (i <= MESH_MAX_ELEM_SIZE / 2 && group_mesher (mesher, map, i)) + i *= 2; + CURRENT_MESH = mesher_to_mesh (mesher, map, + &CURRENT_MESH_SIZE, + &CURRENT_AREA_W, &CURRENT_AREA_H); + free_last_big_data_top (); + } destroy_bitmap (map); } if (CURRENT_MESH == NULL) - retour = -1; /* pas assez de memoire */ + retour = -1; /* pas assez de memoire */ return retour; } @@ -398,29 +405,29 @@ if (result) { for (i = 0; i < CURRENT_MESH_SIZE; ++i) - { - switch (mode) - { - case 0: - color = 0; - j = CURRENT_MESH[i].side.size; - while (j > 1) - { - j /= 2; - ++color; - } - break; - default: - color = i; - } - - rectfill (result, CURRENT_MESH[i].x, - CURRENT_MESH[i].y, - CURRENT_MESH[i].x + - CURRENT_MESH[i].side.size - 1, - CURRENT_MESH[i].y + - CURRENT_MESH[i].side.size - 1, 96 + color % 32); - } + { + switch (mode) + { + case 0: + color = 0; + j = CURRENT_MESH[i].side.size; + while (j > 1) + { + j /= 2; + ++color; + } + break; + default: + color = i; + } + + rectfill (result, CURRENT_MESH[i].x, + CURRENT_MESH[i].y, + CURRENT_MESH[i].x + + CURRENT_MESH[i].side.size - 1, + CURRENT_MESH[i].y + + CURRENT_MESH[i].side.size - 1, 96 + color % 32); + } } return result; diff -Nru liquidwar-5.6.4/src/mesh.h liquidwar-5.6.5/src/mesh.h --- liquidwar-5.6.4/src/mesh.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mesh.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/message.c liquidwar-5.6.5/src/message.c --- liquidwar-5.6.4/src/message.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/message.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -95,19 +95,19 @@ for (i = 0; i < MESSAGE_NB; ++i) if (!MESSAGE_DISPLAYED[i]) { - MESSAGE_DISPLAYED[i] = 1; - MESSAGE_TICKER[i] = new_ticker + MESSAGE_DELAY * (i + 1); + MESSAGE_DISPLAYED[i] = 1; + MESSAGE_TICKER[i] = new_ticker + MESSAGE_DELAY * (i + 1); } while (MESSAGE_NB > 0 - && MESSAGE_DISPLAYED[0] && new_ticker > MESSAGE_TICKER[0]) + && MESSAGE_DISPLAYED[0] && new_ticker > MESSAGE_TICKER[0]) { for (i = 0; i < MESSAGE_NB - 1; ++i) - for (j = 0; j < MESSAGE_SIZE + 1; ++j) - { - MESSAGE[i][j] = MESSAGE[i + 1][j]; - MESSAGE_TICKER[i] = MESSAGE_TICKER[i + 1]; - } + for (j = 0; j < MESSAGE_SIZE + 1; ++j) + { + MESSAGE[i][j] = MESSAGE[i + 1][j]; + MESSAGE_TICKER[i] = MESSAGE_TICKER[i + 1]; + } MESSAGE_NB--; } @@ -115,8 +115,8 @@ //text_mode (-1); deprecated for (i = 0; i < MESSAGE_NB; ++i) textout_ex (NEXT_SCREEN, font, MESSAGE[i], - NEXT_SCREEN->w - text_length (font, MESSAGE[i]), - NEXT_SCREEN->h - (MESSAGE_NB - i) * h, -1, -1); + NEXT_SCREEN->w - text_length (font, MESSAGE[i]), + NEXT_SCREEN->h - (MESSAGE_NB - i) * h, -1, -1); } /*------------------------------------------------------------------*/ @@ -128,10 +128,10 @@ while (MESSAGE_NB >= MESSAGE_MAX) { for (i = 0; i < MESSAGE_NB - 1; ++i) - { - LW_MACRO_STRCPY (MESSAGE[i], MESSAGE[i + 1]); - MESSAGE_TICKER[i] = MESSAGE_TICKER[i + 1] - MESSAGE_DELAY; - } + { + LW_MACRO_STRCPY (MESSAGE[i], MESSAGE[i + 1]); + MESSAGE_TICKER[i] = MESSAGE_TICKER[i + 1] - MESSAGE_DELAY; + } MESSAGE_NB--; } diff -Nru liquidwar-5.6.4/src/message.h liquidwar-5.6.5/src/message.h --- liquidwar-5.6.4/src/message.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/message.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/monster.h liquidwar-5.6.5/src/monster.h --- liquidwar-5.6.4/src/monster.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/monster.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -64,29 +64,29 @@ /*==================================================================*/ extern void LW_ASM_FUNC boost_move_fighters (FIGHTER * current_army, - int current_army_size, - PLACE * current_area, - int current_area_w, - int *active_fighters, - int *attack, - int *defense, - int *new_health, - int max_fighter_health_1, - int sens, - int start, - int neg_global_clock, - int *fighter_move_xy, - int *fighter_move_offset, - char *current_area_back_data, - char *current_area_disp_data, - int *color_first_entry, - int colors_per_team, - int *local_dir, - int temp1, - int temp2, - int temp3, - int temp4, - int temp5, - int temp6, int temp7, int temp8); + int current_army_size, + PLACE * current_area, + int current_area_w, + int *active_fighters, + int *attack, + int *defense, + int *new_health, + int max_fighter_health_1, + int sens, + int start, + int neg_global_clock, + int *fighter_move_xy, + int *fighter_move_offset, + char *current_area_back_data, + char *current_area_disp_data, + int *color_first_entry, + int colors_per_team, + int *local_dir, + int temp1, + int temp2, + int temp3, + int temp4, + int temp5, + int temp6, int temp7, int temp8); #endif diff -Nru liquidwar-5.6.4/src/monster.s liquidwar-5.6.5/src/monster.s --- liquidwar-5.6.4/src/monster.s 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/monster.s 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/mouse.c liquidwar-5.6.5/src/mouse.c --- liquidwar-5.6.4/src/mouse.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mouse.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -141,13 +141,13 @@ if (MOUSE_ON) { if (font == BIG_FONT) - { - set_mouse_sprite (BIG_MOUSE_CURSOR); - } + { + set_mouse_sprite (BIG_MOUSE_CURSOR); + } if (font == SMALL_FONT) - { - set_mouse_sprite (SMALL_MOUSE_CURSOR); - } + { + set_mouse_sprite (SMALL_MOUSE_CURSOR); + } show_mouse (screen); } else diff -Nru liquidwar-5.6.4/src/mouse.h liquidwar-5.6.5/src/mouse.h --- liquidwar-5.6.4/src/mouse.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mouse.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/move.c liquidwar-5.6.5/src/move.c --- liquidwar-5.6.4/src/move.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/move.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -114,84 +114,84 @@ */ case 1: if (CURRENT_AREA[((*y) - 1) * CURRENT_AREA_W + (*x)].mesh) - { - (*y)--; - moved = 1; - } + { + (*y)--; + moved = 1; + } break; /* * trying to go NORTH EAST */ case 2: if (CURRENT_AREA[((*y) - 1) * CURRENT_AREA_W + (*x) + 1].mesh) - { - (*y)--; - (*x)++; - moved = 1; - } + { + (*y)--; + (*x)++; + moved = 1; + } break; /* * trying to go EAST */ case 3: if (CURRENT_AREA[(*y) * CURRENT_AREA_W + (*x) + 1].mesh) - { - (*x)++; - moved = 1; - } + { + (*x)++; + moved = 1; + } break; /* * trying to go SOUTH EAST */ case 4: if (CURRENT_AREA[((*y) + 1) * CURRENT_AREA_W + (*x) + 1].mesh) - { - (*x)++; - (*y)++; - moved = 1; - } + { + (*x)++; + (*y)++; + moved = 1; + } break; /* * trying to go SOUTH */ case 5: if (CURRENT_AREA[((*y) + 1) * CURRENT_AREA_W + (*x)].mesh) - { - (*y)++; - moved = 1; - } + { + (*y)++; + moved = 1; + } break; /* * trying to go SOUTH WEST */ case 6: if (CURRENT_AREA[((*y) + 1) * CURRENT_AREA_W + (*x) - 1].mesh) - { - (*y)++; - (*x)--; - moved = 1; - } + { + (*y)++; + (*x)--; + moved = 1; + } break; /* * trying to go WEST */ case 7: if (CURRENT_AREA[(*y) * CURRENT_AREA_W + (*x) - 1].mesh) - { - (*x)--; - moved = 1; - } + { + (*x)--; + moved = 1; + } break; /* * trying to go NORTH WEST */ case 8: if (CURRENT_AREA[((*y) - 1) * CURRENT_AREA_W + (*x) - 1].mesh) - { - (*x)--; - (*y)--; - moved = 1; - } + { + (*x)--; + (*y)--; + moved = 1; + } } return moved; } @@ -217,7 +217,7 @@ * we get the mesh item associated to the current position of the cursor */ mesh = CURRENT_AREA[CURRENT_CURSOR[indice].y * CURRENT_AREA_W - + CURRENT_CURSOR[indice].x].mesh; + + CURRENT_CURSOR[indice].x].mesh; /* * we tell the mesh that the info won't be up to date anymore concerning * this position @@ -324,71 +324,71 @@ * we first try to move in the direction we have calculated */ moved = move_if_free (&(CURRENT_CURSOR[indice].x), - &(CURRENT_CURSOR[indice].y), dir); + &(CURRENT_CURSOR[indice].y), dir); /* * if it did not work, we try another direction * for instance if the direction was NORTH WEST we try WEST */ if (!moved) - moved = move_if_free (&(CURRENT_CURSOR[indice].x), - &(CURRENT_CURSOR[indice].y), dir - 1); + moved = move_if_free (&(CURRENT_CURSOR[indice].x), + &(CURRENT_CURSOR[indice].y), dir - 1); /* * if it did not work, we try another direction * for instance if the direction was NORTH WEST we try NORTH */ if (!moved) - moved = move_if_free (&(CURRENT_CURSOR[indice].x), - &(CURRENT_CURSOR[indice].y), dir + 1); + moved = move_if_free (&(CURRENT_CURSOR[indice].x), + &(CURRENT_CURSOR[indice].y), dir + 1); /* * The following code allows the cursor to really "slip" on walls. * Not very elegant, but it works 8-) */ if (!moved) - { - int xa1, ya1; - int xb1, yb1; - int xa2, ya2; - int xb2, yb2; - int i = 0; - - xa1 = xb1 = CURRENT_CURSOR[indice].x; - ya1 = yb1 = CURRENT_CURSOR[indice].y; - - while (!moved && i < LW_MOVE_SIDE_LIMIT) - { - if (move_if_free (&xa1, &ya1, dir - 2)) - { - xa2 = xa1; - ya2 = ya1; - if (move_if_free (&xa2, &ya2, dir - 1)) - { - /* - * Normally moved should be true after this - */ - moved = move_if_free (&(CURRENT_CURSOR[indice].x), - &(CURRENT_CURSOR[indice].y), - dir - 2); - } - } - - if (move_if_free (&xb1, &yb1, dir + 2)) - { - xb2 = xb1; - yb2 = yb1; - if (move_if_free (&xb2, &yb2, dir + 1)) - { - /* - * Normally moved should be true after this - */ - moved = move_if_free (&(CURRENT_CURSOR[indice].x), - &(CURRENT_CURSOR[indice].y), - dir + 2); - } - } - - i++; - } - } + { + int xa1, ya1; + int xb1, yb1; + int xa2, ya2; + int xb2, yb2; + int i = 0; + + xa1 = xb1 = CURRENT_CURSOR[indice].x; + ya1 = yb1 = CURRENT_CURSOR[indice].y; + + while (!moved && i < LW_MOVE_SIDE_LIMIT) + { + if (move_if_free (&xa1, &ya1, dir - 2)) + { + xa2 = xa1; + ya2 = ya1; + if (move_if_free (&xa2, &ya2, dir - 1)) + { + /* + * Normally moved should be true after this + */ + moved = move_if_free (&(CURRENT_CURSOR[indice].x), + &(CURRENT_CURSOR[indice].y), + dir - 2); + } + } + + if (move_if_free (&xb1, &yb1, dir + 2)) + { + xb2 = xb1; + yb2 = yb1; + if (move_if_free (&xb2, &yb2, dir + 1)) + { + /* + * Normally moved should be true after this + */ + moved = move_if_free (&(CURRENT_CURSOR[indice].x), + &(CURRENT_CURSOR[indice].y), + dir + 2); + } + } + + i++; + } + } } /* * now this is quite a subtle line @@ -410,7 +410,7 @@ * we retrieve the new mesh item associated to the new position */ mesh = CURRENT_AREA[CURRENT_CURSOR[indice].y * CURRENT_AREA_W - + CURRENT_CURSOR[indice].x].mesh; + + CURRENT_CURSOR[indice].x].mesh; /* * we tell the mesh where the cursor is * this information is redundant but it avoids complex things such as @@ -487,55 +487,55 @@ * loop for all the teams, the cursor of which is active */ for (i = 0; i < NB_TEAMS; ++i) - { - if (CURRENT_CURSOR[i].active) - { - /* - * If the cursor is network controlled, we do nothing yet - */ - if (!CURRENT_CURSOR[i].from_network) - { - if (CURRENT_CURSOR[i].control_type == - CONFIG_CONTROL_TYPE_CPU) - { - /* - * the cursor is controlled by the computer - */ - update_key_cpu_cursor (i); - } - else - { - /* - * the cursor is controlled by a human local player - */ - update_key_local_cursor (i); - } - } - } - } + { + if (CURRENT_CURSOR[i].active) + { + /* + * If the cursor is network controlled, we do nothing yet + */ + if (!CURRENT_CURSOR[i].from_network) + { + if (CURRENT_CURSOR[i].control_type == + CONFIG_CONTROL_TYPE_CPU) + { + /* + * the cursor is controlled by the computer + */ + update_key_cpu_cursor (i); + } + else + { + /* + * the cursor is controlled by a human local player + */ + update_key_local_cursor (i); + } + } + } + } /* * we flush network informations if needed. */ if (LW_NETWORK_ON) - { - checksum = lw_checksum_calc (CURRENT_ARMY, CURRENT_ARMY_SIZE); + { + checksum = lw_checksum_calc (CURRENT_ARMY, CURRENT_ARMY_SIZE); - /* - * This call will automatically overwrite the key states - * with those received from the network - */ - if (!lw_keyexch_flush (CURRENT_CURSOR, checksum)) - { - LW_NETWORK_ERROR_DETECTED = 1; - } - } + /* + * This call will automatically overwrite the key states + * with those received from the network + */ + if (!lw_keyexch_flush (CURRENT_CURSOR, checksum)) + { + LW_NETWORK_ERROR_DETECTED = 1; + } + } for (i = 0; i < NB_TEAMS; ++i) - { - if (CURRENT_CURSOR[i].active) - { - move_cursor (i); - } - } + { + if (CURRENT_CURSOR[i].active) + { + move_cursor (i); + } + } } } diff -Nru liquidwar-5.6.4/src/move.h liquidwar-5.6.5/src/move.h --- liquidwar-5.6.4/src/move.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/move.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/music.c liquidwar-5.6.5/src/music.c --- liquidwar-5.6.4/src/music.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/music.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -95,27 +95,27 @@ * the last music played */ if (MIDI_MUSIC_NUMBER >= 2) - { - do - { - i = random () % MIDI_MUSIC_NUMBER; - } - while (i == last_file); - } + { + do + { + i = random () % MIDI_MUSIC_NUMBER; + } + while (i == last_file); + } else - { - /* - * we have only 1 midi file loaded... - */ - i = 0; - } + { + /* + * we have only 1 midi file loaded... + */ + i = 0; + } last_file = i; if (CONFIG_MUSIC_VOLUME != last_volume) - { - set_volume (-1, MUSIC_VOLUME_VALUES[CONFIG_MUSIC_VOLUME]); - last_volume = CONFIG_MUSIC_VOLUME; - } + { + set_volume (-1, MUSIC_VOLUME_VALUES[CONFIG_MUSIC_VOLUME]); + last_volume = CONFIG_MUSIC_VOLUME; + } result = play_midi (MIDI_MUSIC[i], TRUE); } diff -Nru liquidwar-5.6.4/src/music.h liquidwar-5.6.5/src/music.h --- liquidwar-5.6.4/src/music.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/music.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/mutxdos.c liquidwar-5.6.5/src/mutxdos.c --- liquidwar-5.6.4/src/mutxdos.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mutxdos.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/mutxgen.h liquidwar-5.6.5/src/mutxgen.h --- liquidwar-5.6.4/src/mutxgen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mutxgen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/mutxunix.c liquidwar-5.6.5/src/mutxunix.c --- liquidwar-5.6.4/src/mutxunix.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mutxunix.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -137,9 +137,9 @@ if (m) { if (pthread_mutex_trylock (m) != EBUSY) - { - result = 1; - } + { + result = 1; + } } return result; diff -Nru liquidwar-5.6.4/src/mutxw32.c liquidwar-5.6.5/src/mutxw32.c --- liquidwar-5.6.4/src/mutxw32.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/mutxw32.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -88,15 +88,15 @@ (*h) = CreateMutex (NULL, TRUE, NULL); if ((*h) != NULL) - { - result = 1; - } + { + result = 1; + } else - { - log_println ("Error: can't create mutex..."); - free (mutex->data); - mutex->data = NULL; - } + { + log_println ("Error: can't create mutex..."); + free (mutex->data); + mutex->data = NULL; + } } return result; @@ -122,9 +122,9 @@ if (h) { if (WaitForSingleObject (h, INFINITE) == WAIT_OBJECT_0) - { - result = 1; - } + { + result = 1; + } } return result; @@ -151,9 +151,9 @@ if (h) { if (WaitForSingleObject (h, 0) == WAIT_OBJECT_0) - { - result = 1; - } + { + result = 1; + } } return result; } diff -Nru liquidwar-5.6.4/src/netconf.c liquidwar-5.6.5/src/netconf.c --- liquidwar-5.6.4/src/netconf.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netconf.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -119,52 +119,50 @@ { LW_MACRO_SPRINTF1 (buffer, "%d", config->fighter_attack); if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", config->fighter_defense); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", config->fighter_new_health); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", config->number_influence); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", - config->fighter_number); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", config->game_time); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", - config->cpu_advantage); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", - config->cpu_vs_human); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", - config-> - asm_algorithm); - if (lw_sock_send_str (sock, buffer)) - { - LW_MACRO_SPRINTF1 (buffer, "%d", - config-> - min_map_res); - if (lw_sock_send_str (sock, buffer)) - { - result = 1; - } - } - } - } - } - } - } - } - } - } + { + LW_MACRO_SPRINTF1 (buffer, "%d", config->fighter_defense); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", config->fighter_new_health); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", config->number_influence); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", + config->fighter_number); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", config->game_time); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", + config->cpu_advantage); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", + config->cpu_vs_human); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", + config->asm_algorithm); + if (lw_sock_send_str (sock, buffer)) + { + LW_MACRO_SPRINTF1 (buffer, "%d", + config->min_map_res); + if (lw_sock_send_str (sock, buffer)) + { + result = 1; + } + } + } + } + } + } + } + } + } + } } return result; @@ -186,49 +184,49 @@ { config->cursor_increase_speed = atoi (buffer); if (lw_sock_recv_str (sock, buffer)) - { - config->fighter_attack = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->fighter_defense = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->fighter_new_health = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->number_influence = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->fighter_number = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->game_time = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->cpu_advantage = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->cpu_vs_human = atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->asm_algorithm = - atoi (buffer); - if (lw_sock_recv_str (sock, buffer)) - { - config->min_map_res = - atoi (buffer); - - result = 1; - } - } - } - } - } - } - } - } - } - } + { + config->fighter_attack = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->fighter_defense = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->fighter_new_health = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->number_influence = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->fighter_number = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->game_time = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->cpu_advantage = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->cpu_vs_human = atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->asm_algorithm = + atoi (buffer); + if (lw_sock_recv_str (sock, buffer)) + { + config->min_map_res = + atoi (buffer); + + result = 1; + } + } + } + } + } + } + } + } + } + } } return result; diff -Nru liquidwar-5.6.4/src/netconf.h liquidwar-5.6.5/src/netconf.h --- liquidwar-5.6.4/src/netconf.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netconf.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/netgame.c liquidwar-5.6.5/src/netgame.c --- liquidwar-5.6.4/src/netgame.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netgame.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -163,32 +163,32 @@ lw_netmess_cleanup_arg (CONFIG_PASSWORD); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - case 4: - /* - * the "Play" and "Start game" buttons have the same meaning here, - * so there's no break; - */ - retour = netplay_sequence (); - break; - case 15: - retour = internet_find (); - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + case 4: + /* + * the "Play" and "Start game" buttons have the same meaning here, + * so there's no break; + */ + retour = netplay_sequence (); + break; + case 15: + retour = internet_find (); + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/netgame.h liquidwar-5.6.5/src/netgame.h --- liquidwar-5.6.4/src/netgame.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netgame.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/netkey.c liquidwar-5.6.5/src/netkey.c --- liquidwar-5.6.4/src/netkey.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netkey.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -240,8 +240,8 @@ encode (netkey_serialized, netkey); result = lw_sock_send_buffer (sock, - (char *) netkey_serialized, - LW_NETKEY_SERIALIZED_SIZE); + (char *) netkey_serialized, + LW_NETKEY_SERIALIZED_SIZE); return result; } @@ -257,8 +257,8 @@ LW_NETKEY_SERIALIZED netkey_serialized; result = lw_sock_recv_buffer (sock, - (char *) netkey_serialized, - LW_NETKEY_SERIALIZED_SIZE); + (char *) netkey_serialized, + LW_NETKEY_SERIALIZED_SIZE); decode (netkey, netkey_serialized); diff -Nru liquidwar-5.6.4/src/netkey.h liquidwar-5.6.5/src/netkey.h --- liquidwar-5.6.4/src/netkey.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netkey.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -73,9 +73,9 @@ */ typedef struct { - int key_states[NB_TEAMS]; /* the keys states as in the cursor */ - int cmd; /* a special command */ - int arg; /* an argument for the command */ + int key_states[NB_TEAMS]; /* the keys states as in the cursor */ + int cmd; /* a special command */ + int arg; /* an argument for the command */ unsigned int checksum; } LW_NETKEY; diff -Nru liquidwar-5.6.4/src/netmap.c liquidwar-5.6.5/src/netmap.c --- liquidwar-5.6.4/src/netmap.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netmap.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -87,46 +87,44 @@ { int result = 0; char *ptr; - unsigned char *header; int size; int sent; int to_send; ptr = (char *) netmap; - header = (unsigned char *) netmap; if (lw_sock_send_buffer (sock, ptr, 8)) { if (lw_sock_send_buffer (sock, ptr + 8, LW_MAP_SYSTEM_NAME_SIZE)) - { - if (lw_sock_send_buffer - (sock, ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE, - LW_MAP_READABLE_NAME_SIZE)) - { - lw_serial_get_map_header (netmap, &size, NULL, NULL); - - result = 1; - sent = 0; - while (sent < size && result) - { - to_send = size - sent; - if (to_send > LW_NETMAP_CHUNK_SIZE) - { - to_send = LW_NETMAP_CHUNK_SIZE; - } - if (lw_sock_send_buffer - (sock, - ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE + - LW_MAP_READABLE_NAME_SIZE + sent, to_send)) - { - sent += to_send; - } - else - { - result = 0; - } - } - } - } + { + if (lw_sock_send_buffer + (sock, ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE, + LW_MAP_READABLE_NAME_SIZE)) + { + lw_serial_get_map_header (netmap, &size, NULL, NULL); + + result = 1; + sent = 0; + while (sent < size && result) + { + to_send = size - sent; + if (to_send > LW_NETMAP_CHUNK_SIZE) + { + to_send = LW_NETMAP_CHUNK_SIZE; + } + if (lw_sock_send_buffer + (sock, + ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE + + LW_MAP_READABLE_NAME_SIZE + sent, to_send)) + { + sent += to_send; + } + else + { + result = 0; + } + } + } + } } return result; @@ -157,54 +155,54 @@ if (lw_sock_recv_buffer (sock, buffer, 8)) { if (lw_sock_recv_buffer (sock, buffer + 8, LW_MAP_SYSTEM_NAME_SIZE)) - { - if (lw_sock_recv_buffer - (sock, buffer + 8 + LW_MAP_SYSTEM_NAME_SIZE, - LW_MAP_READABLE_NAME_SIZE)) - { - lw_serial_get_map_header ((void *) buffer, &size, &w, &h); - - /* - * A map under 3 bytes is reasonably not a "real" map... - */ - if (size >= 10) - { - ptr = - malloc (size + 8 + LW_MAP_SYSTEM_NAME_SIZE + - LW_MAP_READABLE_NAME_SIZE); - if (ptr != NULL) - { - memcpy (ptr, buffer, - 8 + LW_MAP_SYSTEM_NAME_SIZE + - LW_MAP_READABLE_NAME_SIZE); - - result = 1; - received = 0; - while (received < size && result) - { - to_receive = size - received; - if (to_receive > LW_NETMAP_CHUNK_SIZE) - { - to_receive = LW_NETMAP_CHUNK_SIZE; - } - - if (lw_sock_recv_buffer - (sock, - ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE + - LW_MAP_READABLE_NAME_SIZE + received, - to_receive)) - { - received += to_receive; - } - else - { - result = 0; - } - } - } - } - } - } + { + if (lw_sock_recv_buffer + (sock, buffer + 8 + LW_MAP_SYSTEM_NAME_SIZE, + LW_MAP_READABLE_NAME_SIZE)) + { + lw_serial_get_map_header ((void *) buffer, &size, &w, &h); + + /* + * A map under 3 bytes is reasonably not a "real" map... + */ + if (size >= 10) + { + ptr = + malloc (size + 8 + LW_MAP_SYSTEM_NAME_SIZE + + LW_MAP_READABLE_NAME_SIZE); + if (ptr != NULL) + { + memcpy (ptr, buffer, + 8 + LW_MAP_SYSTEM_NAME_SIZE + + LW_MAP_READABLE_NAME_SIZE); + + result = 1; + received = 0; + while (received < size && result) + { + to_receive = size - received; + if (to_receive > LW_NETMAP_CHUNK_SIZE) + { + to_receive = LW_NETMAP_CHUNK_SIZE; + } + + if (lw_sock_recv_buffer + (sock, + ptr + 8 + LW_MAP_SYSTEM_NAME_SIZE + + LW_MAP_READABLE_NAME_SIZE + received, + to_receive)) + { + received += to_receive; + } + else + { + result = 0; + } + } + } + } + } + } } (*netmap) = (void *) ptr; diff -Nru liquidwar-5.6.4/src/netmap.h liquidwar-5.6.5/src/netmap.h --- liquidwar-5.6.4/src/netmap.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netmap.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/netmess.c liquidwar-5.6.5/src/netmess.c --- liquidwar-5.6.4/src/netmess.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netmess.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -149,9 +149,9 @@ begin = *message; while ((**message) != quote_char && (**message) != '\0') - { - ++(*message); - } + { + ++(*message); + } len = (*message) - begin; @@ -162,10 +162,10 @@ begin = *message; while ((!isspace (**message)) && (**message) != ',' - && (**message) != '\0') - { - ++(*message); - } + && (**message) != '\0') + { + ++(*message); + } len = (*message) - begin; } @@ -174,15 +174,15 @@ { result = (char *) malloc (len + 1); if (result != NULL) - { - if (len > 0) - { - strncpy (result, begin, len); - } - result[len] = 0; + { + if (len > 0) + { + strncpy (result, begin, len); + } + result[len] = 0; - lw_netmess_cleanup_arg (result); - } + lw_netmess_cleanup_arg (result); + } } eat_space (message); @@ -202,110 +202,110 @@ if (read_separator (message) == 0) { if ((command = read_word (message)) != NULL) - { - if (strcasecmp (command, LW_NETMESS_TEXT_OK) == 0) - { - result = LW_NETMESS_CODE_OK; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_ERR) == 0) - { - result = LW_NETMESS_CODE_ERR; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_PING) == 0) - { - result = LW_NETMESS_CODE_PING; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_ECHO) == 0) - { - result = LW_NETMESS_CODE_ECHO; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_PROGRAM) == 0) - { - result = LW_NETMESS_CODE_PROGRAM; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_VERSION) == 0) - { - result = LW_NETMESS_CODE_VERSION; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_PASSWORD) == 0) - { - result = LW_NETMESS_CODE_PASSWORD; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_FREE) == 0) - { - result = LW_NETMESS_CODE_FREE; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_TEAM) == 0) - { - result = LW_NETMESS_CODE_TEAM; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_READY) == 0) - { - result = LW_NETMESS_CODE_READY; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_START) == 0) - { - result = LW_NETMESS_CODE_START; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_WAITING) == 0) - { - result = LW_NETMESS_CODE_WAITING; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_NEXT) == 0) - { - result = LW_NETMESS_CODE_NEXT; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_TEAMSTARTINFO) == 0) - { - result = LW_NETMESS_CODE_TEAMSTARTINFO; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_WHO) == 0) - { - result = LW_NETMESS_CODE_WHO; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_LOCAL) == 0) - { - result = LW_NETMESS_CODE_LOCAL; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_NETWORK) == 0) - { - result = LW_NETMESS_CODE_NETWORK; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_NOBODY) == 0) - { - result = LW_NETMESS_CODE_NOBODY; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_SENDMAP) == 0) - { - result = LW_NETMESS_CODE_SENDMAP; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_RECVMAP) == 0) - { - result = LW_NETMESS_CODE_RECVMAP; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_SENDCONFIG) == 0) - { - result = LW_NETMESS_CODE_SENDCONFIG; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_RECVCONFIG) == 0) - { - result = LW_NETMESS_CODE_RECVCONFIG; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_CHATTALK) == 0) - { - result = LW_NETMESS_CODE_CHATTALK; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_CHATLISTEN) == 0) - { - result = LW_NETMESS_CODE_CHATLISTEN; - } - else if (strcasecmp (command, LW_NETMESS_TEXT_QUIT) == 0) - { - result = LW_NETMESS_CODE_QUIT; - } + { + if (strcasecmp (command, LW_NETMESS_TEXT_OK) == 0) + { + result = LW_NETMESS_CODE_OK; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_ERR) == 0) + { + result = LW_NETMESS_CODE_ERR; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_PING) == 0) + { + result = LW_NETMESS_CODE_PING; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_ECHO) == 0) + { + result = LW_NETMESS_CODE_ECHO; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_PROGRAM) == 0) + { + result = LW_NETMESS_CODE_PROGRAM; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_VERSION) == 0) + { + result = LW_NETMESS_CODE_VERSION; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_PASSWORD) == 0) + { + result = LW_NETMESS_CODE_PASSWORD; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_FREE) == 0) + { + result = LW_NETMESS_CODE_FREE; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_TEAM) == 0) + { + result = LW_NETMESS_CODE_TEAM; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_READY) == 0) + { + result = LW_NETMESS_CODE_READY; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_START) == 0) + { + result = LW_NETMESS_CODE_START; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_WAITING) == 0) + { + result = LW_NETMESS_CODE_WAITING; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_NEXT) == 0) + { + result = LW_NETMESS_CODE_NEXT; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_TEAMSTARTINFO) == 0) + { + result = LW_NETMESS_CODE_TEAMSTARTINFO; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_WHO) == 0) + { + result = LW_NETMESS_CODE_WHO; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_LOCAL) == 0) + { + result = LW_NETMESS_CODE_LOCAL; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_NETWORK) == 0) + { + result = LW_NETMESS_CODE_NETWORK; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_NOBODY) == 0) + { + result = LW_NETMESS_CODE_NOBODY; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_SENDMAP) == 0) + { + result = LW_NETMESS_CODE_SENDMAP; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_RECVMAP) == 0) + { + result = LW_NETMESS_CODE_RECVMAP; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_SENDCONFIG) == 0) + { + result = LW_NETMESS_CODE_SENDCONFIG; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_RECVCONFIG) == 0) + { + result = LW_NETMESS_CODE_RECVCONFIG; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_CHATTALK) == 0) + { + result = LW_NETMESS_CODE_CHATTALK; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_CHATLISTEN) == 0) + { + result = LW_NETMESS_CODE_CHATLISTEN; + } + else if (strcasecmp (command, LW_NETMESS_TEXT_QUIT) == 0) + { + result = LW_NETMESS_CODE_QUIT; + } - free (command); - } + free (command); + } } return result; @@ -327,25 +327,25 @@ if (read_separator (&message) == 0) { if (message[0] == '\0') - { - null_arg = 1; - } + { + null_arg = 1; + } word = read_word (&message); if (word != NULL) - { - free (word); - result = 1; - while (read_separator (&message) == 1) - { - word = read_word (&message); - if (word != NULL) - { - free (word); - result++; - } - } - } + { + free (word); + result = 1; + while (read_separator (&message) == 1) + { + word = read_word (&message); + if (word != NULL) + { + free (word); + result++; + } + } + } } if (result == 1 && null_arg) @@ -371,28 +371,28 @@ { result = (char **) malloc (argc * sizeof (char *)); if (result != NULL) - { - word = read_word (&message); - if (word != NULL) - { - result[i] = word; - i = 1; - while (i < argc && read_separator (&message) == 1) - { - word = read_word (&message); - if (word != NULL) - { - result[i] = word; - i++; - } - } - } - } + { + word = read_word (&message); + if (word != NULL) + { + result[i] = word; + i = 1; + while (i < argc && read_separator (&message) == 1) + { + word = read_word (&message); + if (word != NULL) + { + result[i] = word; + i++; + } + } + } + } if (i != argc) - { - free (result); - result = NULL; - } + { + free (result); + result = NULL; + } } return result; @@ -436,16 +436,16 @@ if (ptr != NULL) { if (ptr->argv != NULL) - { - for (i = 0; i < ptr->argc; ++i) - { - free (ptr->argv[i]); - } - if (ptr->argc > 0) - { - free (ptr->argv); - } - } + { + for (i = 0; i < ptr->argc; ++i) + { + free (ptr->argv[i]); + } + if (ptr->argc > 0) + { + free (ptr->argv); + } + } } } @@ -464,9 +464,9 @@ while ((c = *pos) != '\0') { if (c < 32 || c > 127 || strchr ("'\",", c)) - { - (*pos) = ' '; - } + { + (*pos) = ' '; + } pos++; } } diff -Nru liquidwar-5.6.4/src/netmess.h liquidwar-5.6.5/src/netmess.h --- liquidwar-5.6.4/src/netmess.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netmess.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -65,9 +65,9 @@ */ typedef struct { - int argc; /* the number of arguments */ - int code; /* the code of the command (ex: LW_NETMESS_CODE_OK) */ - char **argv; /* the parsed arguments, like in the main() func */ + int argc; /* the number of arguments */ + int code; /* the code of the command (ex: LW_NETMESS_CODE_OK) */ + char **argv; /* the parsed arguments, like in the main() func */ } LW_NETMESS; diff -Nru liquidwar-5.6.4/src/netplay.c liquidwar-5.6.5/src/netplay.c --- liquidwar-5.6.4/src/netplay.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netplay.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -129,23 +129,23 @@ lw_config_set_current_rules_to_default (); if (connect_on_server_start (&sock, - CONFIG_SERVER_ADDRESS, CONFIG_SERVER_PORT)) + CONFIG_SERVER_ADDRESS, CONFIG_SERVER_PORT)) { if (connect_on_server_continue (sock)) - { - result = lw_connect_menu (sock); + { + result = lw_connect_menu (sock); - if (result == MENU_OK) - { - if (connect_on_server_finish (sock)) - { - LW_NETWORK_ON = 1; - lw_network_attribute_colors (); - lw_network_attribute_parts (); - result = play_sequence_ex (); - } - } - } + if (result == MENU_OK) + { + if (connect_on_server_finish (sock)) + { + LW_NETWORK_ON = 1; + lw_network_attribute_colors (); + lw_network_attribute_parts (); + result = play_sequence_ex (); + } + } + } } LW_KEYEXCH_SOCK = -1; @@ -167,7 +167,6 @@ LW_NETPLAY_CONNECT_DATA *connect_data; LW_NETPLAY_CONNECT_DATA connect_data_stack; int esc_pressed = 0; - int dummy; connect_data = (LW_NETPLAY_CONNECT_DATA *) malloc (sizeof (LW_NETPLAY_CONNECT_DATA)); @@ -216,14 +215,14 @@ while (connect_data->running && !esc_pressed) { if (key[KEY_ESC]) - { - esc_pressed = 1; - } + { + esc_pressed = 1; + } /* * We call keypressed() to force Allegro to call automatically * poll_keyboard() if needed */ - dummy = keypressed (); + keypressed (); rest (LW_NETPLAY_DELAY); lw_capture_dump_menu (); my_exit_poll (); @@ -236,9 +235,9 @@ { *sock = -1; if (!esc_pressed) - { - error_unable_to_connect (); - } + { + error_unable_to_connect (); + } } /* @@ -263,8 +262,8 @@ connect_data = (LW_NETPLAY_CONNECT_DATA *) arg; connect_data->result = lw_sock_connect (&(connect_data->sock), - connect_data->address, - connect_data->port); + connect_data->address, + connect_data->port); connect_data->running = 0; /* @@ -299,122 +298,122 @@ { display_center_message (lw_lang_string (LW_LANG_STRING_NETPLAY_PING)); if (!lw_protocol_do_ping (&sock)) - { - result = 0; - error_not_a_liquidwar_server (); - } + { + result = 0; + error_not_a_liquidwar_server (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_CHECKPROGRAM)); + (LW_LANG_STRING_NETPLAY_CHECKPROGRAM)); if (!lw_protocol_tell_program (&sock, LW_PROGRAM)) - { - result = 0; - error_not_a_liquidwar_server (); - } + { + result = 0; + error_not_a_liquidwar_server (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_CHECKVERSION)); + (LW_LANG_STRING_NETPLAY_CHECKVERSION)); if (!lw_protocol_tell_version (&sock, LW_VERSION)) - { - result = 0; - error_wrong_version (); - } + { + result = 0; + error_wrong_version (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_SENDPASSWORD)); + (LW_LANG_STRING_NETPLAY_SENDPASSWORD)); if (!lw_protocol_tell_password (&sock, CONFIG_PASSWORD)) - { - result = 0; - error_bad_password (); - } + { + result = 0; + error_bad_password (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_FREETEAMS)); + (LW_LANG_STRING_NETPLAY_FREETEAMS)); if (lw_protocol_ask_free_teams (&sock, &free_teams)) - { - if (free_teams <= 0) - { - result = 0; - error_server_full (); - } - } + { + if (free_teams <= 0) + { + result = 0; + error_server_full (); + } + } else - { - result = 0; - error_network_problem (); - } + { + result = 0; + error_network_problem (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_RESERVETEAMS)); + (LW_LANG_STRING_NETPLAY_RESERVETEAMS)); for (i = 0; i < NB_TEAMS && free_teams > 0 && result == 1; ++i) - { - if (CONFIG_CONTROL_TYPE[i] == CONFIG_CONTROL_TYPE_HUMAN || - ((CONFIG_CONTROL_TYPE[i] == CONFIG_CONTROL_TYPE_CPU) && - CONFIG_ALLOW_NETWORK_BOTS)) - { - if (lw_protocol_reserve_team (&sock, i, - CONFIG_CONTROL_TYPE[i], - CONFIG_PLAYER_NAME[i])) - { - free_teams--; - } - else - { - result = 0; - error_network_problem (); - } - } - } + { + if (CONFIG_CONTROL_TYPE[i] == CONFIG_CONTROL_TYPE_HUMAN || + ((CONFIG_CONTROL_TYPE[i] == CONFIG_CONTROL_TYPE_CPU) && + CONFIG_ALLOW_NETWORK_BOTS)) + { + if (lw_protocol_reserve_team (&sock, i, + CONFIG_CONTROL_TYPE[i], + CONFIG_PLAYER_NAME[i])) + { + free_teams--; + } + else + { + result = 0; + error_network_problem (); + } + } + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_SENDCONFIG)); + (LW_LANG_STRING_NETPLAY_SENDCONFIG)); if (!lw_protocol_send_config (&sock)) - { - result = 0; - error_network_problem (); - } + { + result = 0; + error_network_problem (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_SENDMAP)); + (LW_LANG_STRING_NETPLAY_SENDMAP)); if (!lw_protocol_send_map - (&sock, - LW_RANDOM_ON ? LW_RANDOM_RAW_MAP : - RAW_MAP_ORDERED[CONFIG_LEVEL_MAP])) - { - result = 0; - error_cant_send_map (); - } + (&sock, + LW_RANDOM_ON ? LW_RANDOM_RAW_MAP : + RAW_MAP_ORDERED[CONFIG_LEVEL_MAP])) + { + result = 0; + error_cant_send_map (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_WAITING)); + (LW_LANG_STRING_NETPLAY_WAITING)); if (!lw_protocol_i_am_ready (&sock)) - { - result = 0; - error_network_problem (); - } + { + result = 0; + error_network_problem (); + } } /* @@ -448,57 +447,57 @@ if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_WHOPLAYS)); + (LW_LANG_STRING_NETPLAY_WHOPLAYS)); for (i = 0; i < NB_TEAMS && result == 1; ++i) - { - if (!lw_protocol_ask_who (&sock, i, &(LW_NETWORK_INFO[i]))) - { - result = 0; - error_network_problem (); - } - } + { + if (!lw_protocol_ask_who (&sock, i, &(LW_NETWORK_INFO[i]))) + { + result = 0; + error_network_problem (); + } + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_RECVCONFIG)); + (LW_LANG_STRING_NETPLAY_RECVCONFIG)); if (!lw_protocol_recv_config (&sock)) - { - result = 0; - error_network_problem (); - } + { + result = 0; + error_network_problem (); + } } if (result == 1) { if (!lw_netconf_check (&LW_CONFIG_CURRENT_RULES)) - { - result = 0; - error_bad_config_range (); - } + { + result = 0; + error_bad_config_range (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_RECVMAP)); + (LW_LANG_STRING_NETPLAY_RECVMAP)); if (!lw_protocol_recv_map (&sock, &LW_NETWORK_RAW_MAP)) - { - result = 0; - error_cant_receive_map (); - } + { + result = 0; + error_cant_receive_map (); + } } if (result == 1) { display_center_message (lw_lang_string - (LW_LANG_STRING_NETPLAY_WAITING)); + (LW_LANG_STRING_NETPLAY_WAITING)); if (!lw_protocol_i_am_ready (&sock)) - { - result = 0; - error_network_problem (); - } + { + result = 0; + error_network_problem (); + } } /* diff -Nru liquidwar-5.6.4/src/netplay.h liquidwar-5.6.5/src/netplay.h --- liquidwar-5.6.4/src/netplay.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/netplay.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/network.c liquidwar-5.6.5/src/network.c --- liquidwar-5.6.4/src/network.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/network.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -147,30 +147,30 @@ { closeness[i] = 0; for (j = 0; j < NB_TEAMS; ++j) - { - if (LW_NETWORK_INFO[j].active) - { - dist = distance_between_colors (LW_NETWORK_INFO[j].color, i); - if (dist > 0) - { - if (LW_NETWORK_INFO[j].network) - { - /* - * We consider network color conflicts - * to be less important than conflicts with - * local colors, therefore we increase the - * distance for network teams. - */ - dist++; - } - closeness[i] += LW_NETWORK_COLOR_DIST_SCALE / (dist * dist); - } - else - { - closeness[i] = LW_NETWORK_COLOR_DIST_MAXINT; - } - } - } + { + if (LW_NETWORK_INFO[j].active) + { + dist = distance_between_colors (LW_NETWORK_INFO[j].color, i); + if (dist > 0) + { + if (LW_NETWORK_INFO[j].network) + { + /* + * We consider network color conflicts + * to be less important than conflicts with + * local colors, therefore we increase the + * distance for network teams. + */ + dist++; + } + closeness[i] += LW_NETWORK_COLOR_DIST_SCALE / (dist * dist); + } + else + { + closeness[i] = LW_NETWORK_COLOR_DIST_MAXINT; + } + } + } } /* @@ -182,10 +182,10 @@ for (i = 0; i < LW_NETWORK_COLOR_NB; ++i) { if (closeness[i] < closeness_min) - { - color = i; - closeness_min = closeness[i]; - } + { + color = i; + closeness_min = closeness[i]; + } } return color; @@ -203,29 +203,29 @@ for (i = 0; i < NB_TEAMS; ++i) { if (LW_NETWORK_INFO[i].active) - { - if (LW_NETWORK_INFO[i].network) - { - /* - * -1 is a temporary value which will be overwritten - * by the _real_ value later - */ - LW_NETWORK_INFO[i].color = -1; - } - else - { - LW_NETWORK_INFO[i].color = CONFIG_TEAM_COLOR[i]; - } - } + { + if (LW_NETWORK_INFO[i].network) + { + /* + * -1 is a temporary value which will be overwritten + * by the _real_ value later + */ + LW_NETWORK_INFO[i].color = -1; + } + else + { + LW_NETWORK_INFO[i].color = CONFIG_TEAM_COLOR[i]; + } + } } for (i = 0; i < NB_TEAMS; ++i) { if (LW_NETWORK_INFO[i].active && LW_NETWORK_INFO[i].network) - { - color = choose_different_color (); - LW_NETWORK_INFO[i].color = color; - } + { + color = choose_different_color (); + LW_NETWORK_INFO[i].color = color; + } } } @@ -242,8 +242,8 @@ for (i = 0; i < NB_TEAMS; ++i) { if (LW_NETWORK_INFO[i].active) - { - LW_NETWORK_INFO[i].part = order[LW_NETWORK_INFO[i].server_id]; - } + { + LW_NETWORK_INFO[i].part = order[LW_NETWORK_INFO[i].server_id]; + } } } diff -Nru liquidwar-5.6.4/src/network.h liquidwar-5.6.5/src/network.h --- liquidwar-5.6.4/src/network.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/network.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/options.c liquidwar-5.6.5/src/options.c --- liquidwar-5.6.4/src/options.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/options.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -97,7 +97,7 @@ while (retour == 0) { for (i = 0; i < 6; ++i) - standard_button (d + i + 4, 0, i, 1, 8); + standard_button (d + i + 4, 0, i, 1, 8); standard_button (d + 10, 0, 7, 1, 8); quick_buttons (d); @@ -115,79 +115,79 @@ display_back_image (); if (gfxmode_change) - { - gfxmode_change = 0; - display_back_image (); - dp = my_init_dialog (d, choix); - my_fade_in (); - } + { + gfxmode_change = 0; + display_back_image (); + dp = my_init_dialog (d, choix); + my_fade_in (); + } else - { - dp = my_init_dialog (d, choix); - } + { + dp = my_init_dialog (d, choix); + } show_mouse (screen); while (my_update_dialog (dp)) - ; + ; choix = shutdown_dialog (dp); play_click (); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 4: - retour = graphic_options (); - break; - case 5: - retour = sound_options (); - break; - case 6: - retour = rules_options (); - break; - case 7: - retour = speeds_options (); - break; - case 8: - retour = controls_options (); - break; - case 9: - retour = language_options (); - break; - case 10: - load_default_options (); - - /* - * The volume might have changed, so we update it - */ - WATER_VOLUME = CONFIG_WATER_VOLUME_MENU; - /* - * If the graphics settings changed, we reflect them - */ - if (old_gfx_menu != CONFIG_GFX_MENU || - old_fullscreen != CONFIG_FULLSCREEN) - { - gfxmode_change = 1; - set_resolution (CONFIG_GFX_MENU, 0, CONFIG_FULLSCREEN, NULL); - } - retour = 0; - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 4: + retour = graphic_options (); + break; + case 5: + retour = sound_options (); + break; + case 6: + retour = rules_options (); + break; + case 7: + retour = speeds_options (); + break; + case 8: + retour = controls_options (); + break; + case 9: + retour = language_options (); + break; + case 10: + load_default_options (); + + /* + * The volume might have changed, so we update it + */ + WATER_VOLUME = CONFIG_WATER_VOLUME_MENU; + /* + * If the graphics settings changed, we reflect them + */ + if (old_gfx_menu != CONFIG_GFX_MENU || + old_fullscreen != CONFIG_FULLSCREEN) + { + gfxmode_change = 1; + set_resolution (CONFIG_GFX_MENU, 0, CONFIG_FULLSCREEN, NULL); + } + retour = 0; + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/options.h liquidwar-5.6.5/src/options.h --- liquidwar-5.6.4/src/options.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/options.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/palette.c liquidwar-5.6.5/src/palette.c --- liquidwar-5.6.4/src/palette.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/palette.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -88,7 +88,7 @@ { int result; - result = fsqrt (i * 256) / 256; + result = fixsqrt (i * 256) / 256; if (result > 255) result = 255; @@ -121,28 +121,28 @@ if (brightness != 0) for (i = 0; i < 256; ++i) { - rgb = old_pal + i; - r = rgb->r * 4; - g = rgb->g * 4; - b = rgb->b * 4; - - if (brightness > 0) - { - r = (brightness * sqrt255 (r) + (8 - brightness) * r) / 8; - g = (brightness * sqrt255 (g) + (8 - brightness) * g) / 8; - b = (brightness * sqrt255 (b) + (8 - brightness) * b) / 8; - } - if (brightness < 0) - { - r = (-brightness * sqr255 (r) + (8 + brightness) * r) / 8; - g = (-brightness * sqr255 (g) + (8 + brightness) * g) / 8; - b = (-brightness * sqr255 (b) + (8 + brightness) * b) / 8; - } - - rgb = new_pal + i; - rgb->r = r / 4; - rgb->g = g / 4; - rgb->b = b / 4; + rgb = old_pal + i; + r = rgb->r * 4; + g = rgb->g * 4; + b = rgb->b * 4; + + if (brightness > 0) + { + r = (brightness * sqrt255 (r) + (8 - brightness) * r) / 8; + g = (brightness * sqrt255 (g) + (8 - brightness) * g) / 8; + b = (brightness * sqrt255 (b) + (8 - brightness) * b) / 8; + } + if (brightness < 0) + { + r = (-brightness * sqr255 (r) + (8 + brightness) * r) / 8; + g = (-brightness * sqr255 (g) + (8 + brightness) * g) / 8; + b = (-brightness * sqr255 (b) + (8 + brightness) * b) / 8; + } + + rgb = new_pal + i; + rgb->r = r / 4; + rgb->g = g / 4; + rgb->b = b / 4; } else for (i = 0; i < 256; ++i) @@ -241,39 +241,39 @@ else { if (num >= CHOOSE_COLOR_NUMBER - && num < CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER) - { - if (LOADED_TEXTURE) - { - set_raw_texture_palette (RAW_TEXTURE - [num - CHOOSE_COLOR_NUMBER], - BG_TEXTURE_FIRST_COLOR); - } - else - { - set_mono_texture_palette (BG_TEXTURE_DEFAULT_COLOR, - BG_TEXTURE_FIRST_COLOR); - } - } + && num < CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER) + { + if (LOADED_TEXTURE) + { + set_raw_texture_palette (RAW_TEXTURE + [num - CHOOSE_COLOR_NUMBER], + BG_TEXTURE_FIRST_COLOR); + } + else + { + set_mono_texture_palette (BG_TEXTURE_DEFAULT_COLOR, + BG_TEXTURE_FIRST_COLOR); + } + } if (num >= CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER - && num < - CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER + RAW_MAPTEX_NUMBER) - { - if (LOADED_MAPTEX) - { - set_raw_texture_palette (RAW_MAPTEX - [num - - (CHOOSE_COLOR_NUMBER + - RAW_TEXTURE_NUMBER)], - BG_TEXTURE_FIRST_COLOR); - } - else - { - set_mono_texture_palette (BG_TEXTURE_DEFAULT_COLOR, - BG_TEXTURE_FIRST_COLOR); - } - } + && num < + CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER + RAW_MAPTEX_NUMBER) + { + if (LOADED_MAPTEX) + { + set_raw_texture_palette (RAW_MAPTEX + [num - + (CHOOSE_COLOR_NUMBER + + RAW_TEXTURE_NUMBER)], + BG_TEXTURE_FIRST_COLOR); + } + else + { + set_mono_texture_palette (BG_TEXTURE_DEFAULT_COLOR, + BG_TEXTURE_FIRST_COLOR); + } + } } } @@ -288,39 +288,39 @@ else { if (num >= CHOOSE_COLOR_NUMBER - && num < CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER) - { - if (LOADED_TEXTURE) - { - set_raw_texture_palette (RAW_TEXTURE - [num - CHOOSE_COLOR_NUMBER], - FG_TEXTURE_FIRST_COLOR); - } - else - { - set_mono_texture_palette (FG_TEXTURE_DEFAULT_COLOR, - FG_TEXTURE_FIRST_COLOR); - } - } + && num < CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER) + { + if (LOADED_TEXTURE) + { + set_raw_texture_palette (RAW_TEXTURE + [num - CHOOSE_COLOR_NUMBER], + FG_TEXTURE_FIRST_COLOR); + } + else + { + set_mono_texture_palette (FG_TEXTURE_DEFAULT_COLOR, + FG_TEXTURE_FIRST_COLOR); + } + } if (num >= CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER - && num < - CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER + RAW_MAPTEX_NUMBER) - { - if (LOADED_MAPTEX) - { - set_raw_texture_palette (RAW_MAPTEX - [num - - (CHOOSE_COLOR_NUMBER + - RAW_TEXTURE_NUMBER)], - FG_TEXTURE_FIRST_COLOR); - } - else - { - set_mono_texture_palette (FG_TEXTURE_DEFAULT_COLOR, - FG_TEXTURE_FIRST_COLOR); - } - } + && num < + CHOOSE_COLOR_NUMBER + RAW_TEXTURE_NUMBER + RAW_MAPTEX_NUMBER) + { + if (LOADED_MAPTEX) + { + set_raw_texture_palette (RAW_MAPTEX + [num - + (CHOOSE_COLOR_NUMBER + + RAW_TEXTURE_NUMBER)], + FG_TEXTURE_FIRST_COLOR); + } + else + { + set_mono_texture_palette (FG_TEXTURE_DEFAULT_COLOR, + FG_TEXTURE_FIRST_COLOR); + } + } } } @@ -372,32 +372,32 @@ color = 0; active = 0; if (LW_NETWORK_ON) - { - for (j = 0; j < NB_TEAMS; ++j) - { - if (LW_NETWORK_INFO[j].active && - LW_NETWORK_INFO[j].server_id == i) - { - active = 1; - color = LW_NETWORK_INFO[j].color; - } - } - } + { + for (j = 0; j < NB_TEAMS; ++j) + { + if (LW_NETWORK_INFO[j].active && + LW_NETWORK_INFO[j].server_id == i) + { + active = 1; + color = LW_NETWORK_INFO[j].color; + } + } + } else - { - if (CONFIG_CONTROL_TYPE[i] != CONFIG_CONTROL_TYPE_OFF) - { - active = 1; - color = CONFIG_TEAM_COLOR[i]; - } - } + { + if (CONFIG_CONTROL_TYPE[i] != CONFIG_CONTROL_TYPE_OFF) + { + active = 1; + color = CONFIG_TEAM_COLOR[i]; + } + } if (active) - { - COLOR_FIRST_ENTRY[n] = 128 + n * COLORS_PER_TEAM; - set_team_color (color, COLOR_FIRST_ENTRY[n], COLORS_PER_TEAM); - n++; - } + { + COLOR_FIRST_ENTRY[n] = 128 + n * COLORS_PER_TEAM; + set_team_color (color, COLOR_FIRST_ENTRY[n], COLORS_PER_TEAM); + n++; + } } } diff -Nru liquidwar-5.6.4/src/palette.h liquidwar-5.6.5/src/palette.h --- liquidwar-5.6.4/src/palette.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/palette.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/parser.c liquidwar-5.6.5/src/parser.c --- liquidwar-5.6.4/src/parser.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/parser.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -99,7 +99,7 @@ while (*str) { if ((*str) == '/' || (*str) == '\\') - EXECUTABLE_NAME = (str + 1); + EXECUTABLE_NAME = (str + 1); str++; } @@ -107,19 +107,19 @@ { str = argv[i]; if (is_arg_marker (str[0])) - { - ARGUMENT_NAME[j] = str + 1; - if (i < argc - 1) - { - str = argv[i + 1]; - if (!is_arg_marker (str[0])) - { - ARGUMENT_VALUE[j] = str; - i++; - } - } - j++; - } + { + ARGUMENT_NAME[j] = str + 1; + if (i < argc - 1) + { + str = argv[i + 1]; + if (!is_arg_marker (str[0])) + { + ARGUMENT_VALUE[j] = str; + i++; + } + } + j++; + } } } diff -Nru liquidwar-5.6.4/src/parser.h liquidwar-5.6.5/src/parser.h --- liquidwar-5.6.4/src/parser.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/parser.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/path.c liquidwar-5.6.5/src/path.c --- liquidwar-5.6.4/src/path.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/path.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -80,7 +80,7 @@ char buf1[LW_STARTUP_MAX_PATH_LENGTH]; static char buf2[LW_STARTUP_MAX_PATH_LENGTH]; char *start; - char *end; + //char *end; char *search; LW_MACRO_STRCPY (buf1, filename); @@ -97,14 +97,17 @@ LW_MACRO_STRCPY (buf2, start); - if ((search = strchr (buf2, '.')) != NULL) - { - end = search; - } - else - { - end = buf2 + strlen (buf2); - } + search = strchr (buf2, '.'); + /* + if (search != NULL) + { + end = search; + } + else + { + end = buf2 + strlen (buf2); + } + */ if (search == NULL) { diff -Nru liquidwar-5.6.4/src/path.h liquidwar-5.6.5/src/path.h --- liquidwar-5.6.4/src/path.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/path.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/ping.c liquidwar-5.6.5/src/ping.c --- liquidwar-5.6.4/src/ping.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/ping.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -132,23 +132,23 @@ try_data->result = -1; if (lw_thread_start (try_server_callback, try_data)) - { - start_time = get_ticker (); - while (try_data->done == 0 && - get_ticker () < start_time + LW_PING_TEST_MAX) - { - rest (LW_PING_DELAY); - } - result = try_data->result; - try_data->allow_exit = 1; - } + { + start_time = get_ticker (); + while (try_data->done == 0 && + get_ticker () < start_time + LW_PING_TEST_MAX) + { + rest (LW_PING_DELAY); + } + result = try_data->result; + try_data->allow_exit = 1; + } else - { - /* - * The thread could not be launched... - */ - free (try_data); - } + { + /* + * The thread could not be launched... + */ + free (try_data); + } } return result; @@ -178,7 +178,7 @@ } result = lw_sock_connect (&(try_data->sock), - try_data->address, try_data->port); + try_data->address, try_data->port); if (result == 1) { @@ -188,30 +188,30 @@ n = 0; global_start_time = get_ticker (); for (i = 0; result == 1 && - i < LW_PING_NB_RETRIES && - get_ticker () < global_start_time + LW_PING_TEST_MAX; ++i) - { - start_time = get_ticker (); - result = lw_protocol_do_ping (&try_data->sock); - if (result == 1) - { - delay[i] = get_ticker () - start_time; - n = i + 1; - } - - /* - * We calculate an average ping from all the values we have - */ - sum = 0; - for (i = 0; i < n; ++i) - { - sum += delay[i]; - } - if (n > 0) - { - try_data->result = sum / n; - } - } + i < LW_PING_NB_RETRIES && + get_ticker () < global_start_time + LW_PING_TEST_MAX; ++i) + { + start_time = get_ticker (); + result = lw_protocol_do_ping (&try_data->sock); + if (result == 1) + { + delay[i] = get_ticker () - start_time; + n = i + 1; + } + + /* + * We calculate an average ping from all the values we have + */ + sum = 0; + for (i = 0; i < n; ++i) + { + sum += delay[i]; + } + if (n > 0) + { + try_data->result = sum / n; + } + } /* * OK we're done the calling thread can abort @@ -222,9 +222,9 @@ * We're polite, we tell the server we quit. */ if (result) - { - lw_protocol_quit (&try_data->sock); - } + { + lw_protocol_quit (&try_data->sock); + } lw_sock_close (&try_data->sock); } diff -Nru liquidwar-5.6.4/src/ping.h liquidwar-5.6.5/src/ping.h --- liquidwar-5.6.4/src/ping.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/ping.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/pion.c liquidwar-5.6.5/src/pion.c --- liquidwar-5.6.4/src/pion.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/pion.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -151,12 +151,12 @@ { color_back = 0; while (color_back < FG_TEXTURE_FIRST_COLOR - || color_back >= FG_TEXTURE_FIRST_COLOR + 32) - { - x = random () % CURRENT_AREA_W; - y = random () % CURRENT_AREA_H; - color_back = getpixel (CURRENT_AREA_BACK, x, y); - } + || color_back >= FG_TEXTURE_FIRST_COLOR + 32) + { + x = random () % CURRENT_AREA_W; + y = random () % CURRENT_AREA_H; + color_back = getpixel (CURRENT_AREA_BACK, x, y); + } CURSOR_COLOR_BACK[i] = color_back; } } @@ -178,18 +178,18 @@ y = y0 + CURSOR_LAYOUT[i].y; CURSOR_GRAPHIC_MEMORY[number][i] = getpixel (CURRENT_AREA_DISP, x, y); switch (CURSOR_LAYOUT[i].row) - { - case CL_OUTSIDE: - case CL_INSIDE: - case CL_MIDDLE: - putpixel (CURRENT_AREA_DISP, x, y, - CURSOR_COLOR_MAP[CURSOR_LAYOUT[i].color] + color_offset); - break; - case CL_MIDDLE2: - putpixel (CURRENT_AREA_DISP, x, y, - CURSOR_COLOR_BACK[CURSOR_LAYOUT[i].color]); - break; - } + { + case CL_OUTSIDE: + case CL_INSIDE: + case CL_MIDDLE: + putpixel (CURRENT_AREA_DISP, x, y, + CURSOR_COLOR_MAP[CURSOR_LAYOUT[i].color] + color_offset); + break; + case CL_MIDDLE2: + putpixel (CURRENT_AREA_DISP, x, y, + CURSOR_COLOR_BACK[CURSOR_LAYOUT[i].color]); + break; + } } } @@ -205,8 +205,8 @@ for (i = 0; i < CURSOR_POINT_NUMBER; ++i) { putpixel (CURRENT_AREA_DISP, - x0 + CURSOR_LAYOUT[i].x, - y0 + CURSOR_LAYOUT[i].y, CURSOR_GRAPHIC_MEMORY[number][i]); + x0 + CURSOR_LAYOUT[i].x, + y0 + CURSOR_LAYOUT[i].y, CURSOR_GRAPHIC_MEMORY[number][i]); } } @@ -224,18 +224,18 @@ for (i = 0; i < CURSOR_COLOR_NUMBER; ++i) { if (ip < COLORS_PER_TEAM) - CURSOR_COLOR_MAP[i] = ip; + CURSOR_COLOR_MAP[i] = ip; else - CURSOR_COLOR_MAP[i] = 2 * COLORS_PER_TEAM - 1 - ip; + CURSOR_COLOR_MAP[i] = 2 * COLORS_PER_TEAM - 1 - ip; fp += COLORS_PER_TEAM; while (fp >= degrad_size) - { - fp -= degrad_size; - ip++; - } + { + fp -= degrad_size; + ip++; + } while (ip >= 2 * COLORS_PER_TEAM) - ip -= 2 * COLORS_PER_TEAM; + ip -= 2 * COLORS_PER_TEAM; } for (i = 0; i < NB_TEAMS; ++i) diff -Nru liquidwar-5.6.4/src/pion.h liquidwar-5.6.5/src/pion.h --- liquidwar-5.6.4/src/pion.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/pion.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/play.c liquidwar-5.6.5/src/play.c --- liquidwar-5.6.4/src/play.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/play.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -110,7 +110,7 @@ play_sequence_ex (void) { char *message; - int result, retour = 0; + int retour = 0; DIALOG d[2]; DIALOG_PLAYER *dp; int flip_enabled = 0; @@ -141,11 +141,11 @@ * the textures the user has chosen */ lw_maptex_set_fg_palette (CONFIG_LEVEL_MAP, CONFIG_LEVEL_FG, - LW_NETWORK_ON, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); + LW_NETWORK_ON, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); lw_maptex_set_bg_palette (CONFIG_LEVEL_MAP, CONFIG_LEVEL_BG, - LW_NETWORK_ON, LW_RANDOM_ON, - CONFIG_USE_DEFAULT_TEXTURE); + LW_NETWORK_ON, LW_RANDOM_ON, + CONFIG_USE_DEFAULT_TEXTURE); /* * we calculate how many teams are playing */ @@ -171,107 +171,106 @@ * and if it does it returns a string containing the error message */ if (!(message = init_game ())) - { - /* - * we set up the sound of waves a little louder so that the player - * understands he's playing *now* - */ - WATER_VOLUME = CONFIG_WATER_VOLUME_GAME; - /* - * fade out cause we're going to switch video modes - */ - my_fade_out (); - - /* - * we change the resolution, but only if the game resolution is - * actually different from the menu resolution - */ - if (need_to_change_mode (CONFIG_GFX_GAME, - CONFIG_GFX_MENU, CONFIG_PAGE_FLIP)) - result = set_resolution (CONFIG_GFX_GAME, - CONFIG_PAGE_FLIP, - CONFIG_FULLSCREEN, &flip_enabled); - - lw_mouse_hide (); - - /* - * the blank round function initializes the double-buffer system - * and the main display target, it might fail because of lacking memory - */ - if (!blank_round ()) - { - /* - * fiat lux - */ - my_fade_in (); - - /* - * start playing some music - */ - start_music (); - - /* - * OK, here we go, let's enter the main game loop - */ - game (); - - /* - * stop the music - */ - stop_music (); - } - - /* - * let's be clean 8-) - */ - free_game_memory (); - - /* - * we close the network socket abruptly - */ - lw_sock_close (&LW_KEYEXCH_SOCK); - - /* - * we turn the volume down - */ - WATER_VOLUME = CONFIG_WATER_VOLUME_MENU; - - /* - * fade out before video mode switching - */ - my_fade_out (); - /* - * again, we change the video mode only if it is really required - */ - if (need_to_change_mode (CONFIG_GFX_GAME, - CONFIG_GFX_MENU, - CONFIG_PAGE_FLIP && flip_enabled)) - result = - set_resolution (CONFIG_GFX_MENU, 0, CONFIG_FULLSCREEN, NULL); - - lw_mouse_show (); - - /* - * displays the 3 tubes with the score - */ - retour = display_scores (); - } + { + /* + * we set up the sound of waves a little louder so that the player + * understands he's playing *now* + */ + WATER_VOLUME = CONFIG_WATER_VOLUME_GAME; + /* + * fade out cause we're going to switch video modes + */ + my_fade_out (); + + /* + * we change the resolution, but only if the game resolution is + * actually different from the menu resolution + */ + if (need_to_change_mode (CONFIG_GFX_GAME, + CONFIG_GFX_MENU, CONFIG_PAGE_FLIP)) + set_resolution (CONFIG_GFX_GAME, + CONFIG_PAGE_FLIP, + CONFIG_FULLSCREEN, &flip_enabled); + + lw_mouse_hide (); + + /* + * the blank round function initializes the double-buffer system + * and the main display target, it might fail because of lacking memory + */ + if (!blank_round ()) + { + /* + * fiat lux + */ + my_fade_in (); + + /* + * start playing some music + */ + start_music (); + + /* + * OK, here we go, let's enter the main game loop + */ + game (); + + /* + * stop the music + */ + stop_music (); + } + + /* + * let's be clean 8-) + */ + free_game_memory (); + + /* + * we close the network socket abruptly + */ + lw_sock_close (&LW_KEYEXCH_SOCK); + + /* + * we turn the volume down + */ + WATER_VOLUME = CONFIG_WATER_VOLUME_MENU; + + /* + * fade out before video mode switching + */ + my_fade_out (); + /* + * again, we change the video mode only if it is really required + */ + if (need_to_change_mode (CONFIG_GFX_GAME, + CONFIG_GFX_MENU, + CONFIG_PAGE_FLIP && flip_enabled)) + set_resolution (CONFIG_GFX_MENU, 0, CONFIG_FULLSCREEN, NULL); + + lw_mouse_show (); + + /* + * displays the 3 tubes with the score + */ + retour = display_scores (); + } else - { - /* - * the main reason why init_game should fail is a lack of big data - * this can be cured by selecting a smaller level or increasing the - * amount of data reserved at startup (command line parameter) - */ - free_game_memory (); - - /* - * we close the network socket abruptly - */ - lw_sock_close (&LW_KEYEXCH_SOCK); + { + /* + * the main reason why init_game should fail is a lack of big data + * this can be cured by selecting a smaller level or increasing the + * amount of data reserved at startup (command line parameter) + */ + free_game_memory (); + + /* + * we close the network socket abruptly + */ + lw_sock_close (&LW_KEYEXCH_SOCK); - error_not_enough_big_data (); - } + error_not_enough_big_data (); + } } return retour; diff -Nru liquidwar-5.6.4/src/play.h liquidwar-5.6.5/src/play.h --- liquidwar-5.6.4/src/play.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/play.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/popupgen.h liquidwar-5.6.5/src/popupgen.h --- liquidwar-5.6.4/src/popupgen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/popupgen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/popupw32.c liquidwar-5.6.5/src/popupw32.c --- liquidwar-5.6.4/src/popupw32.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/popupw32.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -81,8 +81,8 @@ hwnd = (HWND) win_get_window (); MessageBox (hwnd, - lw_lang_string (LW_LANG_STRING_POPUP_INITFAIL), - lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); + lw_lang_string (LW_LANG_STRING_POPUP_INITFAIL), + lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); } /*------------------------------------------------------------------*/ @@ -93,8 +93,8 @@ hwnd = (HWND) win_get_window (); MessageBox (hwnd, - lw_lang_string (LW_LANG_STRING_POPUP_MEMTROUBLE), - lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); + lw_lang_string (LW_LANG_STRING_POPUP_MEMTROUBLE), + lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); } /*------------------------------------------------------------------*/ @@ -105,8 +105,8 @@ hwnd = (HWND) win_get_window (); MessageBox (hwnd, - lw_lang_string (LW_LANG_STRING_POPUP_BIGDATA), - lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); + lw_lang_string (LW_LANG_STRING_POPUP_BIGDATA), + lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); } /*------------------------------------------------------------------*/ @@ -117,8 +117,8 @@ hwnd = (HWND) win_get_window (); MessageBox (hwnd, - lw_lang_string (LW_LANG_STRING_POPUP_LOADFAIL), - lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); + lw_lang_string (LW_LANG_STRING_POPUP_LOADFAIL), + lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); } /*------------------------------------------------------------------*/ @@ -129,8 +129,8 @@ hwnd = (HWND) win_get_window (); MessageBox (hwnd, - lw_lang_string (LW_LANG_STRING_POPUP_CUSTOMFAIL), - lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); + lw_lang_string (LW_LANG_STRING_POPUP_CUSTOMFAIL), + lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); } /*------------------------------------------------------------------*/ @@ -141,6 +141,6 @@ hwnd = (HWND) win_get_window (); MessageBox (hwnd, - lw_lang_string (LW_LANG_STRING_POPUP_GRAPHICSFAIL), - lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); + lw_lang_string (LW_LANG_STRING_POPUP_GRAPHICSFAIL), + lw_lang_string (LW_LANG_STRING_APPNAME), LW_POPUP_ERROR_FLAGS); } diff -Nru liquidwar-5.6.4/src/profile.c liquidwar-5.6.5/src/profile.c --- liquidwar-5.6.4/src/profile.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/profile.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -128,7 +128,7 @@ { if (PROFILE_DATA[indice].record_number > 0) return (PROFILE_DATA[indice].total_time - / PROFILE_DATA[indice].record_number); + / PROFILE_DATA[indice].record_number); else return 0; } diff -Nru liquidwar-5.6.4/src/profile.h liquidwar-5.6.5/src/profile.h --- liquidwar-5.6.4/src/profile.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/profile.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/protocol.c liquidwar-5.6.5/src/protocol.c --- liquidwar-5.6.4/src/protocol.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/protocol.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -88,13 +88,13 @@ { netmess = lw_netmess_read (message); if (netmess != NULL) - { - if (netmess->code == LW_NETMESS_CODE_OK && netmess->argc == 0) - { - result = 1; - } - lw_netmess_free (netmess); - } + { + if (netmess->code == LW_NETMESS_CODE_OK && netmess->argc == 0) + { + result = 1; + } + lw_netmess_free (netmess); + } } return result; @@ -113,9 +113,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_PING)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -137,9 +137,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, message)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -159,9 +159,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, message)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -181,9 +181,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, message)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -206,18 +206,18 @@ { while (*sock >= 0 && (ret = lw_sock_recv_str (sock, message)) == 0); if (*sock >= 0 && ret > 0) - { - netmess = lw_netmess_read (message); - if (netmess != NULL) - { - if (netmess->code == LW_NETMESS_CODE_OK && netmess->argc == 1) - { - *nb = atoi (netmess->argv[0]); - result = 1; - } - lw_netmess_free (netmess); - } - } + { + netmess = lw_netmess_read (message); + if (netmess != NULL) + { + if (netmess->code == LW_NETMESS_CODE_OK && netmess->argc == 1) + { + *nb = atoi (netmess->argv[0]); + result = 1; + } + lw_netmess_free (netmess); + } + } } return result; @@ -234,13 +234,13 @@ char message[LW_SOCK_MESSAGE_SIZE]; LW_MACRO_SPRINTF4 (message, "%s %d,%d,'%s'", - LW_NETMESS_TEXT_TEAM, num, control_type, name); + LW_NETMESS_TEXT_TEAM, num, control_type, name); if (*sock >= 0 && lw_sock_send_str (sock, message)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -268,43 +268,43 @@ { while (*sock >= 0 && (ret = lw_sock_recv_str (sock, message)) == 0); if (*sock >= 0 && ret > 0) - { - netmess = lw_netmess_read (message); - if (netmess != NULL) - { - switch (netmess->code) - { - case LW_NETMESS_CODE_NOBODY: - if (netmess->argc == 0) - { - /* - * We leave the server id to the default -1 value - */ - result = 1; - } - break; - case LW_NETMESS_CODE_NETWORK: - who->network = 1; - /* - * no "break" here since the only difference between - * the LOCAL and NETWORK messages is that the network - * flag is set to 1 in the "NETWORK" case. - */ - case LW_NETMESS_CODE_LOCAL: - if (netmess->argc == 3) - { - who->active = 1; - who->server_id = atoi (netmess->argv[0]); - who->control_type = atoi (netmess->argv[1]); - strncpy (who->name, netmess->argv[2], NAME_SIZE); - who->name[NAME_SIZE] = '\0'; - result = 1; - } - break; - } - lw_netmess_free (netmess); - } - } + { + netmess = lw_netmess_read (message); + if (netmess != NULL) + { + switch (netmess->code) + { + case LW_NETMESS_CODE_NOBODY: + if (netmess->argc == 0) + { + /* + * We leave the server id to the default -1 value + */ + result = 1; + } + break; + case LW_NETMESS_CODE_NETWORK: + who->network = 1; + /* + * no "break" here since the only difference between + * the LOCAL and NETWORK messages is that the network + * flag is set to 1 in the "NETWORK" case. + */ + case LW_NETMESS_CODE_LOCAL: + if (netmess->argc == 3) + { + who->active = 1; + who->server_id = atoi (netmess->argv[0]); + who->control_type = atoi (netmess->argv[1]); + strncpy (who->name, netmess->argv[2], NAME_SIZE); + who->name[NAME_SIZE] = '\0'; + result = 1; + } + break; + } + lw_netmess_free (netmess); + } + } } return result; @@ -322,12 +322,12 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_SENDMAP)) { if (lw_netmap_send (sock, map)) - { - if (recv_ok (sock)) - { - result = 1; - } - } + { + if (recv_ok (sock)) + { + result = 1; + } + } } return result; @@ -345,12 +345,12 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_RECVMAP)) { if (lw_netmap_recv (sock, map)) - { - if (recv_ok (sock)) - { - result = 1; - } - } + { + if (recv_ok (sock)) + { + result = 1; + } + } } return result; @@ -372,12 +372,12 @@ memcpy (&config, &LW_CONFIG_CURRENT_RULES, sizeof (LW_NETCONF)); if (lw_netconf_send (sock, &config)) - { - if (recv_ok (sock)) - { - result = 1; - } - } + { + if (recv_ok (sock)) + { + result = 1; + } + } } return result; @@ -396,14 +396,14 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_RECVCONFIG)) { if (lw_netconf_recv (sock, &config)) - { - if (recv_ok (sock)) - { - memcpy (&LW_CONFIG_CURRENT_RULES, &config, sizeof (LW_NETCONF)); - - result = 1; - } - } + { + if (recv_ok (sock)) + { + memcpy (&LW_CONFIG_CURRENT_RULES, &config, sizeof (LW_NETCONF)); + + result = 1; + } + } } return result; @@ -421,9 +421,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_READY)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -458,18 +458,18 @@ { while (*sock >= 0 && (ret = lw_sock_recv_str (sock, message)) == 0); if (*sock >= 0 && ret > 0) - { - netmess = lw_netmess_read (message); - if (netmess != NULL) - { - if (netmess->code == LW_NETMESS_CODE_OK && netmess->argc == 1) - { - *waited_teams = atoi (netmess->argv[0]); - result = 1; - } - lw_netmess_free (netmess); - } - } + { + netmess = lw_netmess_read (message); + if (netmess != NULL) + { + if (netmess->code == LW_NETMESS_CODE_OK && netmess->argc == 1) + { + *waited_teams = atoi (netmess->argv[0]); + result = 1; + } + lw_netmess_free (netmess); + } + } } return result; @@ -487,9 +487,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_START)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -507,9 +507,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, LW_NETMESS_TEXT_NEXT)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -521,7 +521,7 @@ */ int lw_protocol_ask_teamstartinfo (int *sock, int team, - LW_TEAMSTARTINFO * team_start_info) + LW_TEAMSTARTINFO * team_start_info) { int result = 0; char message[LW_SOCK_MESSAGE_SIZE]; @@ -535,28 +535,28 @@ { while (*sock >= 0 && (ret = lw_sock_recv_str (sock, message)) == 0); if (*sock >= 0 && ret > 0) - { - netmess = lw_netmess_read (message); - if (netmess != NULL) - { - switch (netmess->code) - { - case LW_NETMESS_CODE_OK: - if (netmess->argc == 3) - { - team_start_info->active = atoi (netmess->argv[0]); - team_start_info->start = atoi (netmess->argv[1]); - strncpy (team_start_info->name, netmess->argv[2], - NAME_SIZE); - team_start_info->name[NAME_SIZE] = '\0'; - - result = 1; - } - break; - } - lw_netmess_free (netmess); - } - } + { + netmess = lw_netmess_read (message); + if (netmess != NULL) + { + switch (netmess->code) + { + case LW_NETMESS_CODE_OK: + if (netmess->argc == 3) + { + team_start_info->active = atoi (netmess->argv[0]); + team_start_info->start = atoi (netmess->argv[1]); + strncpy (team_start_info->name, netmess->argv[2], + NAME_SIZE); + team_start_info->name[NAME_SIZE] = '\0'; + + result = 1; + } + break; + } + lw_netmess_free (netmess); + } + } } return result; @@ -577,9 +577,9 @@ if (*sock >= 0 && lw_sock_send_str (sock, message)) { if (recv_ok (sock)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -601,35 +601,35 @@ { while (*sock >= 0 && (ret = lw_sock_recv_str (sock, message)) == 0); if (*sock >= 0 && ret > 0) - { - netmess = lw_netmess_read (message); - if (netmess != NULL) - { - switch (netmess->code) - { - case LW_NETMESS_CODE_OK: - switch (netmess->argc) - { - case 0: - /* - * No message, we do nothing - */ - result = 1; - break; - case 2: - /* - * Message received, enqueue it - */ - lw_chat_push (chat_history, - netmess->argv[0], netmess->argv[1]); - result = 1; - break; - } - break; - } - lw_netmess_free (netmess); - } - } + { + netmess = lw_netmess_read (message); + if (netmess != NULL) + { + switch (netmess->code) + { + case LW_NETMESS_CODE_OK: + switch (netmess->argc) + { + case 0: + /* + * No message, we do nothing + */ + result = 1; + break; + case 2: + /* + * Message received, enqueue it + */ + lw_chat_push (chat_history, + netmess->argv[0], netmess->argv[1]); + result = 1; + break; + } + break; + } + lw_netmess_free (netmess); + } + } } return result; diff -Nru liquidwar-5.6.4/src/protocol.h liquidwar-5.6.5/src/protocol.h --- liquidwar-5.6.4/src/protocol.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/protocol.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -83,7 +83,7 @@ int lw_protocol_tell_password (int *sock, char *password); int lw_protocol_ask_free_teams (int *sock, int *nb); int lw_protocol_reserve_team (int *sock, int num, - int control_type, char *name); + int control_type, char *name); int lw_protocol_ask_who (int *sock, int num, LW_WHO * who); int lw_protocol_send_map (int *sock, void *map); int lw_protocol_recv_map (int *sock, void **map); @@ -94,7 +94,7 @@ int lw_protocol_force_start (int *sock); int lw_protocol_next (int *sock); int lw_protocol_ask_teamstartinfo (int *sock, int team, - LW_TEAMSTARTINFO * team_start_info); + LW_TEAMSTARTINFO * team_start_info); int lw_protocol_chat_talk (int *sock, char *text); int lw_protocol_chat_listen (int *sock, LW_CHAT_HISTORY * chat_history); int lw_protocol_quit (int *sock); diff -Nru liquidwar-5.6.4/src/random.c liquidwar-5.6.5/src/random.c --- liquidwar-5.6.4/src/random.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/random.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -77,6 +77,7 @@ #else #define LW_RANDOM_COMMAND_END "" #endif +#define LW_COMMAND_EXTRA_SIZE 100 /*==================================================================*/ /* variables globales */ @@ -91,7 +92,7 @@ /*------------------------------------------------------------------*/ /* - * Generates a black&white palette which is suitable for + * Generates a black&white palette which is suitable for * the game to handle nicely maps generated by lwmapgen. Basically * all we need is color 0 == black and color 2555 = white, but * we do a full grayscale, just to say the palette is not full of @@ -118,7 +119,7 @@ PALETTE pal; char filename[LW_STARTUP_MAX_PATH_LENGTH]; - char command[LW_STARTUP_MAX_PATH_LENGTH]; + char command[LW_STARTUP_MAX_PATH_LENGTH + LW_COMMAND_EXTRA_SIZE]; int size; int ok = 0; @@ -127,8 +128,8 @@ LW_MACRO_SPRINTF1 (filename, "%s.bmp", tmpnam (NULL)); LW_MACRO_SPRINTF4 (command, - "%s --out %s --size %d%s", - STARTUP_GEN_PATH, filename, size, LW_RANDOM_COMMAND_END); + "%s --out %s --size %d%s", + STARTUP_GEN_PATH, filename, size, LW_RANDOM_COMMAND_END); log_print_str ("Generating random map with command: \""); log_print_str (command); @@ -146,7 +147,7 @@ for (i = 0; i < LW_RANDOM_RUN_RETRIES && !exists (filename); ++i) { - rest (LW_RANDOM_RUN_DELAY); + rest (LW_RANDOM_RUN_DELAY); } } #endif @@ -173,8 +174,8 @@ for (i = 0; i < LW_RANDOM_RUN_RETRIES && exists (filename); ++i) { - rest (LW_RANDOM_RUN_DELAY); - delete_file (filename); + rest (LW_RANDOM_RUN_DELAY); + delete_file (filename); } } #endif @@ -202,9 +203,9 @@ if (raw_map) { if (LW_RANDOM_RAW_MAP) - { - free (LW_RANDOM_RAW_MAP); - } + { + free (LW_RANDOM_RAW_MAP); + } LW_RANDOM_RAW_MAP = raw_map; result = 1; } diff -Nru liquidwar-5.6.4/src/random.h liquidwar-5.6.5/src/random.h --- liquidwar-5.6.4/src/random.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/random.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/rules.c liquidwar-5.6.5/src/rules.c --- liquidwar-5.6.4/src/rules.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/rules.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -87,10 +87,10 @@ str = d->dp; LW_MACRO_SNPRINTF2 (str, - LW_RULES_CIS_SIZE, - "%s x%d", - lw_lang_string (LW_LANG_STRING_RULES_CURSOR), - CONFIG_CURSOR_INCREASE_SPEED + 1); + LW_RULES_CIS_SIZE, + "%s x%d", + lw_lang_string (LW_LANG_STRING_RULES_CURSOR), + CONFIG_CURSOR_INCREASE_SPEED + 1); } /*------------------------------------------------------------------*/ @@ -158,11 +158,11 @@ str = d->dp; LW_MACRO_SNPRINTF3 (str, - LW_RULES_MMR_SIZE, - "%s%dx%d", - lw_lang_string (LW_LANG_STRING_RULES_MINMAPRES), - MIN_MAP_RES_W[CONFIG_MIN_MAP_RES], - MIN_MAP_RES_H[CONFIG_MIN_MAP_RES]); + LW_RULES_MMR_SIZE, + "%s%dx%d", + lw_lang_string (LW_LANG_STRING_RULES_MINMAPRES), + MIN_MAP_RES_W[CONFIG_MIN_MAP_RES], + MIN_MAP_RES_H[CONFIG_MIN_MAP_RES]); } /*------------------------------------------------------------------*/ @@ -200,7 +200,7 @@ memset (d, 0, sizeof (d)); LW_MACRO_SPRINTF1 (time_str, "%-8s00:00", - lw_lang_string (LW_LANG_STRING_RULES_TIME)); + lw_lang_string (LW_LANG_STRING_RULES_TIME)); for (i = 0; i < 4; ++i) { @@ -256,41 +256,41 @@ { choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - case 12: - retour = advanced_options (); - break; - case 13: - load_default_rules (); - - /* - * Needed because the slider function works in a weird way - */ - LW_CONFIG_CURRENT_RULES.game_time = CONFIG_GAME_TIME; - - d[8].d2 = CONFIG_GAME_TIME; - d[9].d2 = CONFIG_FIGHTER_NUMBER; - d[10].d2 = CONFIG_CURSOR_INCREASE_SPEED; - d[11].d2 = CONFIG_MIN_MAP_RES; - write_time_setting (d + 4); - write_cis_setting (d + 6); - write_mmr_setting (d + 7); - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + case 12: + retour = advanced_options (); + break; + case 13: + load_default_rules (); + + /* + * Needed because the slider function works in a weird way + */ + LW_CONFIG_CURRENT_RULES.game_time = CONFIG_GAME_TIME; + + d[8].d2 = CONFIG_GAME_TIME; + d[9].d2 = CONFIG_FIGHTER_NUMBER; + d[10].d2 = CONFIG_CURSOR_INCREASE_SPEED; + d[11].d2 = CONFIG_MIN_MAP_RES; + write_time_setting (d + 4); + write_cis_setting (d + 6); + write_mmr_setting (d + 7); + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/rules.h liquidwar-5.6.5/src/rules.h --- liquidwar-5.6.4/src/rules.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/rules.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/score.c liquidwar-5.6.5/src/score.c --- liquidwar-5.6.4/src/score.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/score.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -101,25 +101,25 @@ for (i = 0; i < NB_TEAMS; ++i) if (CURRENT_CURSOR[i].active && CURRENT_CURSOR[i].loose_time < 0) { - CURRENT_CURSOR[i].score_order = 1; + CURRENT_CURSOR[i].score_order = 1; - for (j = 0; j < i; ++j) - if (CURRENT_CURSOR[j].active && - ACTIVE_FIGHTERS[CURRENT_CURSOR[i].team] - <= ACTIVE_FIGHTERS[CURRENT_CURSOR[j].team]) - CURRENT_CURSOR[i].score_order++; - for (j = i + 1; j < NB_TEAMS; ++j) - if (CURRENT_CURSOR[j].active && - ACTIVE_FIGHTERS[CURRENT_CURSOR[i].team] - < ACTIVE_FIGHTERS[CURRENT_CURSOR[j].team]) - CURRENT_CURSOR[i].score_order++; + for (j = 0; j < i; ++j) + if (CURRENT_CURSOR[j].active && + ACTIVE_FIGHTERS[CURRENT_CURSOR[i].team] + <= ACTIVE_FIGHTERS[CURRENT_CURSOR[j].team]) + CURRENT_CURSOR[i].score_order++; + for (j = i + 1; j < NB_TEAMS; ++j) + if (CURRENT_CURSOR[j].active && + ACTIVE_FIGHTERS[CURRENT_CURSOR[i].team] + < ACTIVE_FIGHTERS[CURRENT_CURSOR[j].team]) + CURRENT_CURSOR[i].score_order++; } for (i = 0; i < NB_TEAMS; ++i) { if (CURRENT_CURSOR[i].score_order == classement - && (CURRENT_CURSOR[i].active || CURRENT_CURSOR[i].loose_time >= 0)) - indice_curseur = i; + && (CURRENT_CURSOR[i].active || CURRENT_CURSOR[i].loose_time >= 0)) + indice_curseur = i; } return indice_curseur; @@ -135,54 +135,54 @@ if (indice >= 0) { if (fill_level < 0) - fill_level = 0; + fill_level = 0; if (fill_level > 1000) - fill_level = 1000; + fill_level = 1000; if (!STARTUP_TOMBOLA) - { - if (CURRENT_CURSOR[indice].score_order == 1 && PLAYING_TEAMS == 1) - { - LW_MACRO_STRNCPY (buffer, - lw_lang_string (LW_LANG_STRING_SCORE_WINNER), - LW_SCORE_DISP_BUFFER_SIZE); - } - else - { - if (CURRENT_CURSOR[indice].loose_time <= 0) - { - pourmille = - (ACTIVE_FIGHTERS[CURRENT_CURSOR[indice].team] * - fill_level) / CURRENT_ARMY_SIZE; - pourcent = pourmille / 10; - decimale = pourmille % 10; - LW_MACRO_SNPRINTF2 (buffer, - LW_SCORE_DISP_BUFFER_SIZE, - "%d.%01d%%", pourcent, decimale); - } - else - { - time = - (CURRENT_CURSOR[indice].loose_time * fill_level) / 1000; - min = time / 60; - sec = time % 60; - LW_MACRO_SNPRINTF2 (buffer, - LW_SCORE_DISP_BUFFER_SIZE, - "%02d:%02d", min, sec); - } - } - } + { + if (CURRENT_CURSOR[indice].score_order == 1 && PLAYING_TEAMS == 1) + { + LW_MACRO_STRNCPY (buffer, + lw_lang_string (LW_LANG_STRING_SCORE_WINNER), + LW_SCORE_DISP_BUFFER_SIZE); + } + else + { + if (CURRENT_CURSOR[indice].loose_time <= 0) + { + pourmille = + (ACTIVE_FIGHTERS[CURRENT_CURSOR[indice].team] * + fill_level) / CURRENT_ARMY_SIZE; + pourcent = pourmille / 10; + decimale = pourmille % 10; + LW_MACRO_SNPRINTF2 (buffer, + LW_SCORE_DISP_BUFFER_SIZE, + "%d.%01d%%", pourcent, decimale); + } + else + { + time = + (CURRENT_CURSOR[indice].loose_time * fill_level) / 1000; + min = time / 60; + sec = time % 60; + LW_MACRO_SNPRINTF2 (buffer, + LW_SCORE_DISP_BUFFER_SIZE, + "%02d:%02d", min, sec); + } + } + } else - { - /* - * OK, we're in "tombola" mode, so we display a random - * number instead of the score. - */ - - tombola = (LW_SCORE_TOMBOLA_RESULT[indice] * fill_level) / 1000; - LW_MACRO_SNPRINTF1 (buffer, - LW_SCORE_DISP_BUFFER_SIZE, "%03d", tombola); - } + { + /* + * OK, we're in "tombola" mode, so we display a random + * number instead of the score. + */ + + tombola = (LW_SCORE_TOMBOLA_RESULT[indice] * fill_level) / 1000; + LW_MACRO_SNPRINTF1 (buffer, + LW_SCORE_DISP_BUFFER_SIZE, "%03d", tombola); + } } else { @@ -242,15 +242,15 @@ rectfill (bitmap, 0, 0, w, h, 0); if (to_be_filled) - ellipsefill (bitmap, x_mid, y_rect2, x_mid, ellipse_h / 2, color1); + ellipsefill (bitmap, x_mid, y_rect2, x_mid, ellipse_h / 2, color1); ellipse (bitmap, x_mid, y_rect2, x_mid, ellipse_h / 2, MENU_FG); if (to_be_filled) - { - rectfill (bitmap, 1, fill_level, x_mid * 2 - 1, y_rect2 - 1, - color1); - ellipsefill (bitmap, x_mid, fill_level, x_mid - 1, - ellipse_h / 2 - 1, color2); - } + { + rectfill (bitmap, 1, fill_level, x_mid * 2 - 1, y_rect2 - 1, + color1); + ellipsefill (bitmap, x_mid, fill_level, x_mid - 1, + ellipse_h / 2 - 1, color2); + } vline (bitmap, 0, y_rect1, y_rect2, MENU_FG); vline (bitmap, x_mid * 2, y_rect1, y_rect2, MENU_FG); @@ -352,91 +352,91 @@ while (retour == 0) { if (!last_draw_done) - { - dp = my_init_dialog (d, choix); - while (my_update_dialog (dp) && !last_draw_done) - { - scare_mouse (); - diff_ticker = get_ticker () - first_ticker; - if (cursor[0] < 0) - diff_ticker += 1000; - - for (i = 0; i < 3; ++i) - { - if (!done[i]) - { - fill_level = diff_ticker - time_delay[i]; - if (draw_score_bitmap - (eprouvette[i], cursor[i], ellipse_h, fill_level)) - { - draw_sprite (screen, eprouvette[i], x[i], y - h[i]); - if (fill_level > 0) - { - write_score (cursor[i], buf[i], fill_level); - if (strcmp (buf[i], buf_old[i]) != 0) - { - d[4 + i].dp = buf[i]; - d[4 + i].proc (MSG_DRAW, d + 4 + i, 0); - LW_MACRO_STRCPY (buf_old[i], buf[i]); - } - } - } - else - { - if (i == 1) - { - last_draw_done = 1; - } - - d[7 + i].dp = CURRENT_CURSOR[cursor[i]].name; - d[7 + i].flags = 0; - d[7 + i].proc (MSG_DRAW, d + 7 + i, 0); - - done[i] = 1; - } - } - } - unscare_mouse (); - - rest (10); - } - choix = shutdown_dialog (dp); - } + { + dp = my_init_dialog (d, choix); + while (my_update_dialog (dp) && !last_draw_done) + { + scare_mouse (); + diff_ticker = get_ticker () - first_ticker; + if (cursor[0] < 0) + diff_ticker += 1000; + + for (i = 0; i < 3; ++i) + { + if (!done[i]) + { + fill_level = diff_ticker - time_delay[i]; + if (draw_score_bitmap + (eprouvette[i], cursor[i], ellipse_h, fill_level)) + { + draw_sprite (screen, eprouvette[i], x[i], y - h[i]); + if (fill_level > 0) + { + write_score (cursor[i], buf[i], fill_level); + if (strcmp (buf[i], buf_old[i]) != 0) + { + d[4 + i].dp = buf[i]; + d[4 + i].proc (MSG_DRAW, d + 4 + i, 0); + LW_MACRO_STRCPY (buf_old[i], buf[i]); + } + } + } + else + { + if (i == 1) + { + last_draw_done = 1; + } + + d[7 + i].dp = CURRENT_CURSOR[cursor[i]].name; + d[7 + i].flags = 0; + d[7 + i].proc (MSG_DRAW, d + 7 + i, 0); + + done[i] = 1; + } + } + } + unscare_mouse (); + + rest (10); + } + choix = shutdown_dialog (dp); + } if (last_draw_done) - { - scare_mouse (); - for (i = 0; i < 3; ++i) - draw_sprite (screen, eprouvette[i], x[i], y - h[i]); - unscare_mouse (); - - d[MENU_QUICK_QUIT].flags = D_EXIT; - d[MENU_QUICK_PLAY].flags = D_EXIT; - choix = my_do_dialog_no_clear (d, - last_draw_done == 1 ? MENU_QUICK_BACK - : choix); - last_draw_done = 2; - } + { + scare_mouse (); + for (i = 0; i < 3; ++i) + draw_sprite (screen, eprouvette[i], x[i], y - h[i]); + unscare_mouse (); + + d[MENU_QUICK_QUIT].flags = D_EXIT; + d[MENU_QUICK_PLAY].flags = D_EXIT; + choix = my_do_dialog_no_clear (d, + last_draw_done == 1 ? MENU_QUICK_BACK + : choix); + last_draw_done = 2; + } switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + } } for (i = 0; i < 3; ++i) diff -Nru liquidwar-5.6.4/src/score.h liquidwar-5.6.5/src/score.h --- liquidwar-5.6.4/src/score.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/score.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/serial.c liquidwar-5.6.5/src/serial.c --- liquidwar-5.6.4/src/serial.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/serial.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/serial.h liquidwar-5.6.5/src/serial.h --- liquidwar-5.6.4/src/serial.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/serial.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/server.c liquidwar-5.6.5/src/server.c --- liquidwar-5.6.4/src/server.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/server.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -116,9 +116,9 @@ { LW_MACRO_SPRINTF1 (str_i, "%d", i); if (exist_argument (str_i)) - { - result = i; - } + { + result = i; + } } if (result < 2 || result > NB_TEAMS) @@ -128,13 +128,13 @@ while ((c = getchar ()) == '\n'); if (c >= '2' && c <= '0' + NB_TEAMS) - { - result = c - '0'; + { + result = c - '0'; - log_print_str ("Use \"-"); - log_print_int (result); - log_println_str ("\" to get rid of this question."); - } + log_print_str ("Use \"-"); + log_print_int (result); + log_println_str ("\" to get rid of this question."); + } } return result; @@ -157,9 +157,9 @@ { result = get_argument_int (LW_SERVER_IDENT_LAG); if (result < 0) - { - result = 0; - } + { + result = 0; + } } return result; @@ -178,9 +178,9 @@ { result = get_argument_int (LW_SERVER_IDENT_PORT); if (result <= 0) - { - result = LW_SERVER_DEFAULT_PORT; - } + { + result = LW_SERVER_DEFAULT_PORT; + } } return result; @@ -230,18 +230,18 @@ while ((c = getchar ()) == '\n'); if (c == 'y' || c == 'Y') - { - result = 1; - } + { + result = 1; + } if (result) - { - log_println_str ("Use \"-public\" to get rid of this question."); - } + { + log_println_str ("Use \"-public\" to get rid of this question."); + } else - { - log_println_str ("Use \"-private\" to get rid of this question."); - } + { + log_println_str ("Use \"-private\" to get rid of this question."); + } } return result; @@ -351,7 +351,6 @@ char *metaserver; int nb_teams; int port; - int res = 1; lw_sock_init (); @@ -368,52 +367,52 @@ nb_teams = get_nb_teams (); if (nb_teams >= 2 && nb_teams <= NB_TEAMS) - { - port = get_port (); - metaserver = get_metaserver (); - /* - * we initialize the www_data struct which will contain - * all the informations to be transmitted to the metaserver - */ - lw_wwwsrv_init (&www_data, - get_privacy (metaserver), - 0, - metaserver, - port, 0, 0, get_password (), get_comment ()); - - log_flush (); - log_set_server_mode (1); - - /* - * a good old infinite loop, the server has to be stopped - * with CTRL-C - */ - while (1) - { - if (lw_srvcont_wait_teams (&cont, - &www_data, - nb_teams, - port, - get_password (), get_callback ())) - { - if (lw_srvcont_tell_who (&cont)) - { - if (lw_srvcont_final_ok (&cont)) - { - res = lw_srvcont_replicate_keys - (&cont, &www_data, get_lag (), get_password ()); - } - } - } - lw_srvcont_close (&cont); - - log_flush (); - } - } + { + port = get_port (); + metaserver = get_metaserver (); + /* + * we initialize the www_data struct which will contain + * all the informations to be transmitted to the metaserver + */ + lw_wwwsrv_init (&www_data, + get_privacy (metaserver), + 0, + metaserver, + port, 0, 0, get_password (), get_comment ()); + + log_flush (); + log_set_server_mode (1); + + /* + * a good old infinite loop, the server has to be stopped + * with CTRL-C + */ + while (1) + { + if (lw_srvcont_wait_teams (&cont, + &www_data, + nb_teams, + port, + get_password (), get_callback ())) + { + if (lw_srvcont_tell_who (&cont)) + { + if (lw_srvcont_final_ok (&cont)) + { + lw_srvcont_replicate_keys + (&cont, &www_data, get_lag (), get_password ()); + } + } + } + lw_srvcont_close (&cont); + + log_flush (); + } + } else - { - log_println_str ("Not enough or too many teams!"); - } + { + log_println_str ("Not enough or too many teams!"); + } } else { diff -Nru liquidwar-5.6.4/src/server.h liquidwar-5.6.5/src/server.h --- liquidwar-5.6.4/src/server.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/server.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -57,7 +57,7 @@ #define LW_SERVER_DEFAULT_ADDRESS "127.0.0.1" #define LW_SERVER_DEFAULT_PORT 8035 #define LW_SERVER_DEFAULT_LAG 6 -#define LW_SERVER_DEFAULT_METASERVER "www.ufoot.org/metaserver/" +#define LW_SERVER_DEFAULT_METASERVER "www.ufoot.org:8053/" #define LW_SERVER_METASERVER_PROTOCOL "1.0" diff -Nru liquidwar-5.6.4/src/sock2cli.c liquidwar-5.6.5/src/sock2cli.c --- liquidwar-5.6.4/src/sock2cli.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sock2cli.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -117,9 +117,9 @@ while (limit_ticker > get_ticker () && !result && *sock >= 0) { if (lw_sock_send_str_ex (sock, str)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -141,9 +141,9 @@ while (limit_ticker > get_ticker () && !result && *sock >= 0) { if (lw_sock_recv_str_ex (sock, str)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -165,9 +165,9 @@ while (limit_ticker > get_ticker () && !result && *sock >= 0) { if (lw_sock_send_buffer_ex (sock, buffer, len)) - { - result = 1; - } + { + result = 1; + } } return result; @@ -189,12 +189,12 @@ while (limit_ticker > get_ticker () && !result && *sock >= 0) { if (lw_sock_peek_ex (sock, len)) - { - if (lw_sock_recv_buffer_ex (sock, buffer, len)) - { - result = 1; - } - } + { + if (lw_sock_recv_buffer_ex (sock, buffer, len)) + { + result = 1; + } + } } return result; diff -Nru liquidwar-5.6.4/src/sock2gen.h liquidwar-5.6.5/src/sock2gen.h --- liquidwar-5.6.4/src/sock2gen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sock2gen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/sock2srv.c liquidwar-5.6.5/src/sock2srv.c --- liquidwar-5.6.4/src/sock2srv.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sock2srv.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/sockdos.c liquidwar-5.6.5/src/sockdos.c --- liquidwar-5.6.4/src/sockdos.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sockdos.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/sockex.c liquidwar-5.6.5/src/sockex.c --- liquidwar-5.6.4/src/sockex.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sockex.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -71,6 +71,7 @@ #include #include +#include "macro.h" #include "sockgen.h" #include "log.h" @@ -124,9 +125,9 @@ for (i = 0; i < len; ++i) { if (!isalnum (buffer[i]) && buffer[i] != '-' && buffer[i] != '+') - { - buffer[i] = '.'; - } + { + buffer[i] = '.'; + } } } @@ -147,26 +148,26 @@ if ((sock_copy = *sock) >= 0) { if (len <= LW_SOCK_MESSAGE_SIZE - 1) - { - FD_ZERO (&read); - FD_SET (sock_copy, &read); - tv.tv_sec = 0; - tv.tv_usec = 0; - res = select (sock_copy + 1, &read, NULL, NULL, &tv); - if (res > 0) - { - if (FD_ISSET (sock_copy, &read)) - { - /* - * First we test if there's enough data available - */ - if (recv (sock_copy, buffer, len, MSG_PEEK) == len) - { - result = 1; - } - } - } - } + { + FD_ZERO (&read); + FD_SET (sock_copy, &read); + tv.tv_sec = 0; + tv.tv_usec = 0; + res = select (sock_copy + 1, &read, NULL, NULL, &tv); + if (res > 0) + { + if (FD_ISSET (sock_copy, &read)) + { + /* + * First we test if there's enough data available + */ + if (recv (sock_copy, buffer, len, MSG_PEEK) == len) + { + result = 1; + } + } + } + } } return result; @@ -203,9 +204,8 @@ * We put the string in a buffer, since we'll probably have * to modify it (cut if it's too long, add a tailing CR+LF). */ - len = strlen (str); - len = MIN (len, LW_SOCK_MESSAGE_SIZE - 3); - strncpy (buffer, str, len); + len = LW_SOCK_MESSAGE_SIZE - 3; + LW_MACRO_STRNCPY (buffer, str, len); buffer[len] = '\x0d'; ++len; buffer[len] = '\x0a'; @@ -214,76 +214,76 @@ total_sent = 0; while (total_sent < len && result && (sock_copy = *sock) >= 0) - { - FD_ZERO (&write); - FD_SET (sock_copy, &write); - tv.tv_sec = LW_SOCK_SEND_SEC; - tv.tv_usec = LW_SOCK_SEND_USEC; - - errno = 0; - res = select (sock_copy + 1, NULL, &write, NULL, &tv); - - switch (res) - { - case -1: + { + FD_ZERO (&write); + FD_SET (sock_copy, &write); + tv.tv_sec = LW_SOCK_SEND_SEC; + tv.tv_usec = LW_SOCK_SEND_USEC; + + errno = 0; + res = select (sock_copy + 1, NULL, &write, NULL, &tv); + + switch (res) + { + case -1: #ifdef WIN32 - winerr = WSAGetLastError (); - if (winerr != WSAEINTR && winerr != WSAENOBUFS) - { - result = 0; - } + winerr = WSAGetLastError (); + if (winerr != WSAEINTR && winerr != WSAENOBUFS) + { + result = 0; + } #else - if (errno != EINTR && errno != ENOBUFS) - { - result = 0; - } -#endif - break; - case 1: - if (FD_ISSET (sock_copy, &write)) - { - sent = - send (sock_copy, buffer + total_sent, len - total_sent, - 0); - if (sent > 0 && sent <= len - total_sent) - { - total_sent += sent; - } - else - { - result = 0; - } - } - break; - default: - result = 0; - } - } + if (errno != EINTR && errno != ENOBUFS) + { + result = 0; + } +#endif + break; + case 1: + if (FD_ISSET (sock_copy, &write)) + { + sent = + send (sock_copy, buffer + total_sent, len - total_sent, + 0); + if (sent > 0 && sent <= len - total_sent) + { + total_sent += sent; + } + else + { + result = 0; + } + } + break; + default: + result = 0; + } + } if (LW_SOCK_LOG) - { - switch (result) - { - case 1: - log_print_int (sock_copy); - log_print_str (" > \""); - log_print_str (str); - log_print_str ("\""); - log_println (); - log_flush (); - break; - case 0: - log_print_int (sock_copy); - log_print_str (" > timeout!"); - log_println (); - break; - default: - log_print_int (sock_copy); - log_print_str (" > unexpected error!"); - log_println (); - break; - } - } + { + switch (result) + { + case 1: + log_print_int (sock_copy); + log_print_str (" > \""); + log_print_str (str); + log_print_str ("\""); + log_println (); + log_flush (); + break; + case 0: + log_print_int (sock_copy); + log_print_str (" > timeout!"); + log_println (); + break; + default: + log_print_int (sock_copy); + log_print_str (" > unexpected error!"); + log_println (); + break; + } + } } return result; } @@ -331,146 +331,146 @@ cr_found = 0; pos = 0; while (!cr_found && pos < LW_SOCK_MESSAGE_SIZE - 1 && result > 0 - && (sock_copy = *sock) >= 0) - { - FD_ZERO (&read); - FD_SET (sock_copy, &read); - tv.tv_sec = LW_SOCK_RECV_SEC; - tv.tv_usec = LW_SOCK_RECV_USEC; - - errno = 0; - res = select (sock_copy + 1, &read, NULL, NULL, &tv); - - switch (res) - { - case -1: + && (sock_copy = *sock) >= 0) + { + FD_ZERO (&read); + FD_SET (sock_copy, &read); + tv.tv_sec = LW_SOCK_RECV_SEC; + tv.tv_usec = LW_SOCK_RECV_USEC; + + errno = 0; + res = select (sock_copy + 1, &read, NULL, NULL, &tv); + + switch (res) + { + case -1: #ifdef WIN32 - winerr = WSAGetLastError (); - if (winerr != WSAEINTR) - { - result = 0; - } + winerr = WSAGetLastError (); + if (winerr != WSAEINTR) + { + result = 0; + } #else - if (errno != EINTR) - { - result = 0; - } -#endif - break; - case 1: - /* - * We check that the event we just received concerns the socket - * we are polling. If the event is not for us, let's consider - * everything is fine... - */ - if (!FD_ISSET (sock_copy, &read)) - { - result = 1; - } - else - { - /* - * We get the caracters one by one. This is a performance - * killer but we don't care since this routine is only - * used at the very beginning of the game, when the players - * are connecting themselves. And it has the *big* advantage - * that "netkeys" are not eaten up by this routine. More - * precisely, there's used to be a bug because when reading - * the final "OK" message, the clients read some netkeys - * along with it, which caused some network inconsistency - * since the messages had "disappeared". - */ - if ((l = recv (sock_copy, str + pos, 1, 0)) <= 0) - { - /* - * OK, now we have received a message on this socket - * but there's no data. In most of the cases this means - * the socket is dead, so we return -1 instead of 0 - * so that the caller can make the difference between - * a timeout (0) and a dead socket (-1). - */ - result = -1; - } - else - { - /* - * pos is an offset in the buffer. It is used to keep a - * trace of where new data should be appended in case we - * have to call recv several times to retrieve the whole - * message. - */ - pos += l; - /* - * We add a tailing '\0' so that the string is "C compliant" - */ - str[pos] = 0; - /* - * We seek for character 10, which should be '\n' - */ - if ((cr = strchr (str, '\x0a')) != NULL) - { - cr_found = 1; - /* - * We handle the special character '13' for very often, - * especially when using telnet, the strings come - * with char(13)chr(10) at the end. So if it happens - * that after removing the 10 there's still a 13, then - * we remove the 13 as well. - */ - if ((cr - str) >= 1 && (*(cr - 1)) == '\x0d') - { - /* - * Let's cut this ugly "ascii 13" character - * along with "ascii 10" - */ - (*(cr - 1)) = 0; - } - else - { - /* - * No "ascii 13" in sight, simply remove "ascii 10" - */ - (*cr) = 0; - } - } - result = 1; - } - } - break; - default: - result = 0; - } - } + if (errno != EINTR) + { + result = 0; + } +#endif + break; + case 1: + /* + * We check that the event we just received concerns the socket + * we are polling. If the event is not for us, let's consider + * everything is fine... + */ + if (!FD_ISSET (sock_copy, &read)) + { + result = 1; + } + else + { + /* + * We get the caracters one by one. This is a performance + * killer but we don't care since this routine is only + * used at the very beginning of the game, when the players + * are connecting themselves. And it has the *big* advantage + * that "netkeys" are not eaten up by this routine. More + * precisely, there's used to be a bug because when reading + * the final "OK" message, the clients read some netkeys + * along with it, which caused some network inconsistency + * since the messages had "disappeared". + */ + if ((l = recv (sock_copy, str + pos, 1, 0)) <= 0) + { + /* + * OK, now we have received a message on this socket + * but there's no data. In most of the cases this means + * the socket is dead, so we return -1 instead of 0 + * so that the caller can make the difference between + * a timeout (0) and a dead socket (-1). + */ + result = -1; + } + else + { + /* + * pos is an offset in the buffer. It is used to keep a + * trace of where new data should be appended in case we + * have to call recv several times to retrieve the whole + * message. + */ + pos += l; + /* + * We add a tailing '\0' so that the string is "C compliant" + */ + str[pos] = 0; + /* + * We seek for character 10, which should be '\n' + */ + if ((cr = strchr (str, '\x0a')) != NULL) + { + cr_found = 1; + /* + * We handle the special character '13' for very often, + * especially when using telnet, the strings come + * with char(13)chr(10) at the end. So if it happens + * that after removing the 10 there's still a 13, then + * we remove the 13 as well. + */ + if ((cr - str) >= 1 && (*(cr - 1)) == '\x0d') + { + /* + * Let's cut this ugly "ascii 13" character + * along with "ascii 10" + */ + (*(cr - 1)) = 0; + } + else + { + /* + * No "ascii 13" in sight, simply remove "ascii 10" + */ + (*cr) = 0; + } + } + result = 1; + } + } + break; + default: + result = 0; + } + } if (LW_SOCK_LOG) - { - switch (result) - { - case 1: - log_print_int (sock_copy); - log_print_str (" < \""); - log_print_str (str); - log_print_str ("\""); - log_println (); - log_flush (); - break; - case 0: - log_print_int (sock_copy); - log_print_str (" < timeout!"); - log_println (); - break; - case -1: - log_print_int (sock_copy); - log_print_str (" < closed!"); - log_println (); - break; - default: - log_print_int (sock_copy); - log_print_str (" < unexpected error!"); - log_println (); - break; - } - } + { + switch (result) + { + case 1: + log_print_int (sock_copy); + log_print_str (" < \""); + log_print_str (str); + log_print_str ("\""); + log_println (); + log_flush (); + break; + case 0: + log_print_int (sock_copy); + log_print_str (" < timeout!"); + log_println (); + break; + case -1: + log_print_int (sock_copy); + log_print_str (" < closed!"); + log_println (); + break; + default: + log_print_int (sock_copy); + log_print_str (" < unexpected error!"); + log_println (); + break; + } + } } return result; @@ -501,88 +501,88 @@ result = 1; if (len <= LW_SOCK_MESSAGE_SIZE - 1) - { - total_sent = 0; - while (total_sent < len && result && (sock_copy = *sock) >= 0) - { - FD_ZERO (&write); - FD_SET (sock_copy, &write); - tv.tv_sec = LW_SOCK_SEND_SEC; - tv.tv_usec = LW_SOCK_SEND_USEC; - - errno = 0; - res = select (sock_copy + 1, NULL, &write, NULL, &tv); - - switch (res) - { - case -1: + { + total_sent = 0; + while (total_sent < len && result && (sock_copy = *sock) >= 0) + { + FD_ZERO (&write); + FD_SET (sock_copy, &write); + tv.tv_sec = LW_SOCK_SEND_SEC; + tv.tv_usec = LW_SOCK_SEND_USEC; + + errno = 0; + res = select (sock_copy + 1, NULL, &write, NULL, &tv); + + switch (res) + { + case -1: #ifdef WIN32 - winerr = WSAGetLastError (); - if (winerr != WSAEINTR && winerr != WSAENOBUFS) - { - result = 0; - } + winerr = WSAGetLastError (); + if (winerr != WSAEINTR && winerr != WSAENOBUFS) + { + result = 0; + } #else - if (errno != EINTR && errno != ENOBUFS) - { - result = 0; - } -#endif - break; - case 1: - if (FD_ISSET (sock_copy, &write)) - { - sent = send (sock_copy, - buffer + total_sent, - MIN (len - total_sent, - LW_SOCK_SEND_BUFFER_SIZE), 0); - if (sent > 0 && sent <= len - total_sent) - { - total_sent += sent; - } - else - { - result = 0; - } - } - break; - default: - result = 0; - } - } - - if (LW_SOCK_LOG) - { - if (result) - { - strncpy (trace, buffer, len); - trace[len] = '\0'; - log_print_int (sock_copy); - log_print_str (" > ["); - clean_buffer (trace, len); - log_print_str (trace); - log_print_str ("]"); - log_println (); - log_flush (); - } - else - { - log_print_int (sock_copy); - log_print_str (" > timeout!"); - log_println (); - } - } - } + if (errno != EINTR && errno != ENOBUFS) + { + result = 0; + } +#endif + break; + case 1: + if (FD_ISSET (sock_copy, &write)) + { + sent = send (sock_copy, + buffer + total_sent, + MIN (len - total_sent, + LW_SOCK_SEND_BUFFER_SIZE), 0); + if (sent > 0 && sent <= len - total_sent) + { + total_sent += sent; + } + else + { + result = 0; + } + } + break; + default: + result = 0; + } + } + + if (LW_SOCK_LOG) + { + if (result) + { + LW_MACRO_STRNCPY (trace, buffer, len); + trace[len] = '\0'; + log_print_int (sock_copy); + log_print_str (" > ["); + clean_buffer (trace, len); + log_print_str (trace); + log_print_str ("]"); + log_println (); + log_flush (); + } + else + { + log_print_int (sock_copy); + log_print_str (" > timeout!"); + log_println (); + } + } + } else - { - result = 0; - if (LW_SOCK_LOG) - { - log_print_int (sock_copy); - log_print_str (" > message too large!"); - log_println (); - } - } + { + result = 0; + if (LW_SOCK_LOG) + { + log_print_int (sock_copy); + log_print_str (" > message too large!"); + log_println (); + } + } } return result; @@ -615,88 +615,88 @@ result = 1; if (len <= LW_SOCK_MESSAGE_SIZE - 1) - { - total_received = 0; - while (total_received < len && result && (sock_copy = *sock) >= 0) - { - FD_ZERO (&read); - FD_SET (sock_copy, &read); - tv.tv_sec = LW_SOCK_RECV_SEC; - tv.tv_usec = LW_SOCK_RECV_USEC; - - errno = 0; - res = select (sock_copy + 1, &read, NULL, NULL, &tv); - - switch (res) - { - case -1: + { + total_received = 0; + while (total_received < len && result && (sock_copy = *sock) >= 0) + { + FD_ZERO (&read); + FD_SET (sock_copy, &read); + tv.tv_sec = LW_SOCK_RECV_SEC; + tv.tv_usec = LW_SOCK_RECV_USEC; + + errno = 0; + res = select (sock_copy + 1, &read, NULL, NULL, &tv); + + switch (res) + { + case -1: #ifdef WIN32 - winerr = WSAGetLastError (); - if (winerr != WSAEINTR) - { - result = 0; - } + winerr = WSAGetLastError (); + if (winerr != WSAEINTR) + { + result = 0; + } #else - if (errno != EINTR) - { - result = 0; - } -#endif - break; - case 1: - if (FD_ISSET (sock_copy, &read)) - { - received = recv (sock_copy, - buffer + total_received, - MIN (len - total_received, - LW_SOCK_RECV_BUFFER_SIZE), 0); - if (received > 0 && received <= len - total_received) - { - total_received += received; - } - else - { - result = 0; - } - } - break; - default: - result = 0; - } - } - - if (LW_SOCK_LOG) - { - if (result) - { - strncpy (trace, buffer, len); - trace[len] = '\0'; - log_print_int (sock_copy); - log_print_str (" < ["); - clean_buffer (trace, len); - log_print_str (trace); - log_print_str ("]"); - log_println (); - log_flush (); - } - else - { - log_print_int (sock_copy); - log_print_str (" < timeout!"); - log_println (); - } - } - } + if (errno != EINTR) + { + result = 0; + } +#endif + break; + case 1: + if (FD_ISSET (sock_copy, &read)) + { + received = recv (sock_copy, + buffer + total_received, + MIN (len - total_received, + LW_SOCK_RECV_BUFFER_SIZE), 0); + if (received > 0 && received <= len - total_received) + { + total_received += received; + } + else + { + result = 0; + } + } + break; + default: + result = 0; + } + } + + if (LW_SOCK_LOG) + { + if (result) + { + LW_MACRO_STRNCPY (trace, buffer, len); + trace[len] = '\0'; + log_print_int (sock_copy); + log_print_str (" < ["); + clean_buffer (trace, len); + log_print_str (trace); + log_print_str ("]"); + log_println (); + log_flush (); + } + else + { + log_print_int (sock_copy); + log_print_str (" < timeout!"); + log_println (); + } + } + } else - { - result = 0; - if (LW_SOCK_LOG) - { - log_print_int (sock_copy); - log_print_str (" < message too large!"); - log_println (); - } - } + { + result = 0; + if (LW_SOCK_LOG) + { + log_print_int (sock_copy); + log_print_str (" < message too large!"); + log_println (); + } + } } return result; diff -Nru liquidwar-5.6.4/src/sockgen.h liquidwar-5.6.5/src/sockgen.h --- liquidwar-5.6.4/src/sockgen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sockgen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -58,7 +58,7 @@ int lw_sock_exit (); int lw_sock_listen (int *sock, int port); int lw_sock_accept (int *new_sock, char *ip, int *port, - int listening_sock, int wait); + int listening_sock, int wait); int lw_sock_connect (int *sock, char *ip, int port); int lw_sock_peek_ex (int *sock, int len); int lw_sock_send_str_ex (int *sock, char *str); diff -Nru liquidwar-5.6.4/src/sockunix.c liquidwar-5.6.5/src/sockunix.c --- liquidwar-5.6.4/src/sockunix.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sockunix.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -149,18 +149,18 @@ if (*sock >= 0) { setsockopt (*sock, SOL_SOCKET, SO_REUSEADDR, - (char *) &enable, sizeof (int)); + (char *) &enable, sizeof (int)); name.sin_family = AF_INET; name.sin_addr.s_addr = INADDR_ANY; name.sin_port = htons (port); if (bind (*sock, (struct sockaddr *) &name, sizeof name) >= 0) - { - if (listen ((*sock), LW_SOCK_NB_BACKLOG) >= 0) - { - result = 1; - } - } + { + if (listen ((*sock), LW_SOCK_NB_BACKLOG) >= 0) + { + result = 1; + } + } } return result; @@ -173,7 +173,7 @@ */ int lw_sock_accept (int *new_sock, char *ip, int *port, - int listening_sock, int wait) + int listening_sock, int wait) { int result = 0; struct sockaddr_in name; @@ -194,40 +194,40 @@ FD_ZERO (&read); FD_SET (listening_sock, &read); if (wait) - { - tv.tv_sec = LW_SOCK_ACCEPT_SEC; - tv.tv_usec = LW_SOCK_ACCEPT_USEC; - } + { + tv.tv_sec = LW_SOCK_ACCEPT_SEC; + tv.tv_usec = LW_SOCK_ACCEPT_USEC; + } else - { - tv.tv_sec = 0; - tv.tv_usec = 0; - } + { + tv.tv_sec = 0; + tv.tv_usec = 0; + } res = select (listening_sock + 1, &read, NULL, NULL, &tv); if (res >= 1) - { - (*new_sock) = - accept (listening_sock, (struct sockaddr *) &name, &namelen); - if ((*new_sock) >= 0) - { - li.l_onoff = 0; - li.l_linger = 0; - setsockopt (*new_sock, SOL_SOCKET, SO_KEEPALIVE, - (char *) &enable, sizeof (int)); - setsockopt (*new_sock, SOL_SOCKET, SO_OOBINLINE, - (char *) &disable, sizeof (int)); - setsockopt (*new_sock, SOL_SOCKET, SO_LINGER, - (char *) &li, sizeof (struct linger)); - - fcntl (*new_sock, F_SETFL, O_NONBLOCK, 0); - - strncpy (ip, inet_ntoa (name.sin_addr), LW_SOCK_IP_SIZE - 1); - ip[LW_SOCK_IP_SIZE - 1] = 0; - (*port) = (int) ntohs (name.sin_port); - - result = 1; - } - } + { + (*new_sock) = + accept (listening_sock, (struct sockaddr *) &name, &namelen); + if ((*new_sock) >= 0) + { + li.l_onoff = 0; + li.l_linger = 0; + setsockopt (*new_sock, SOL_SOCKET, SO_KEEPALIVE, + (char *) &enable, sizeof (int)); + setsockopt (*new_sock, SOL_SOCKET, SO_OOBINLINE, + (char *) &disable, sizeof (int)); + setsockopt (*new_sock, SOL_SOCKET, SO_LINGER, + (char *) &li, sizeof (struct linger)); + + fcntl (*new_sock, F_SETFL, O_NONBLOCK, 0); + + strncpy (ip, inet_ntoa (name.sin_addr), LW_SOCK_IP_SIZE - 1); + ip[LW_SOCK_IP_SIZE - 1] = 0; + (*port) = (int) ntohs (name.sin_port); + + result = 1; + } + } } return result; @@ -255,33 +255,33 @@ name.sin_addr.s_addr = INADDR_ANY; name.sin_port = 0; if (bind (*sock, (struct sockaddr *) &name, sizeof name) >= 0) - { - name.sin_family = AF_INET; - if (inet_aton (ip, &name.sin_addr) != 0) - { - name.sin_port = htons (port); - if (connect ((*sock), (struct sockaddr *) &name, sizeof name) >= - 0) - { - /* - * Added this code copied/paste from accept. - * don'tknow if it's usefull - */ - li.l_onoff = 0; - li.l_linger = 0; - setsockopt (*sock, SOL_SOCKET, SO_KEEPALIVE, - (char *) &enable, sizeof (int)); - setsockopt (*sock, SOL_SOCKET, SO_OOBINLINE, - (char *) &disable, sizeof (int)); - setsockopt (*sock, SOL_SOCKET, SO_LINGER, - (char *) &li, sizeof (struct linger)); - - fcntl (*sock, F_SETFL, O_NONBLOCK, 0); - - result = 1; - } - } - } + { + name.sin_family = AF_INET; + if (inet_aton (ip, &name.sin_addr) != 0) + { + name.sin_port = htons (port); + if (connect ((*sock), (struct sockaddr *) &name, sizeof name) >= + 0) + { + /* + * Added this code copied/paste from accept. + * don'tknow if it's usefull + */ + li.l_onoff = 0; + li.l_linger = 0; + setsockopt (*sock, SOL_SOCKET, SO_KEEPALIVE, + (char *) &enable, sizeof (int)); + setsockopt (*sock, SOL_SOCKET, SO_OOBINLINE, + (char *) &disable, sizeof (int)); + setsockopt (*sock, SOL_SOCKET, SO_LINGER, + (char *) &li, sizeof (struct linger)); + + fcntl (*sock, F_SETFL, O_NONBLOCK, 0); + + result = 1; + } + } + } } return result; diff -Nru liquidwar-5.6.4/src/sockw32.c liquidwar-5.6.5/src/sockw32.c --- liquidwar-5.6.4/src/sockw32.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sockw32.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -111,9 +111,9 @@ if (err != 0) { if (LW_SOCK_LOG) - { - log_println_str ("Unable to initialize winsock API"); - } + { + log_println_str ("Unable to initialize winsock API"); + } } else { @@ -153,18 +153,18 @@ if (*sock >= 0) { setsockopt (*sock, SOL_SOCKET, SO_REUSEADDR, - (char *) &enable, sizeof (int)); + (char *) &enable, sizeof (int)); name.sin_family = AF_INET; name.sin_addr.s_addr = INADDR_ANY; name.sin_port = htons ((short) port); if (bind (*sock, (struct sockaddr *) &name, sizeof name) >= 0) - { - if (listen ((*sock), LW_SOCK_NB_BACKLOG) >= 0) - { - result = 1; - } - } + { + if (listen ((*sock), LW_SOCK_NB_BACKLOG) >= 0) + { + result = 1; + } + } } return result; @@ -177,7 +177,7 @@ */ int lw_sock_accept (int *new_sock, char *ip, int *port, - int listening_sock, int wait) + int listening_sock, int wait) { int result = 0; struct sockaddr_in name; @@ -199,40 +199,40 @@ FD_ZERO (&read); FD_SET (listening_sock, &read); if (wait) - { - tv.tv_sec = LW_SOCK_ACCEPT_SEC; - tv.tv_usec = LW_SOCK_ACCEPT_USEC; - } + { + tv.tv_sec = LW_SOCK_ACCEPT_SEC; + tv.tv_usec = LW_SOCK_ACCEPT_USEC; + } else - { - tv.tv_sec = 0; - tv.tv_usec = 0; - } + { + tv.tv_sec = 0; + tv.tv_usec = 0; + } res = select (listening_sock + 1, &read, NULL, NULL, &tv); if (res >= 1) - { - (*new_sock) = - accept (listening_sock, (struct sockaddr *) &name, &namelen); - if ((*new_sock) >= 0) - { - li.l_onoff = 0; - li.l_linger = 0; - setsockopt (*new_sock, SOL_SOCKET, SO_KEEPALIVE, - (char *) &enable, sizeof (int)); - setsockopt (*new_sock, SOL_SOCKET, SO_OOBINLINE, - (char *) &disable, sizeof (int)); - setsockopt (*new_sock, SOL_SOCKET, SO_LINGER, - (char *) &li, sizeof (struct linger)); - - ioctlsocket (*new_sock, FIONBIO, &disable_ul); - - strncpy (ip, inet_ntoa (name.sin_addr), LW_SOCK_IP_SIZE - 1); - ip[LW_SOCK_IP_SIZE - 1] = 0; - (*port) = (int) ntohs (name.sin_port); - - result = 1; - } - } + { + (*new_sock) = + accept (listening_sock, (struct sockaddr *) &name, &namelen); + if ((*new_sock) >= 0) + { + li.l_onoff = 0; + li.l_linger = 0; + setsockopt (*new_sock, SOL_SOCKET, SO_KEEPALIVE, + (char *) &enable, sizeof (int)); + setsockopt (*new_sock, SOL_SOCKET, SO_OOBINLINE, + (char *) &disable, sizeof (int)); + setsockopt (*new_sock, SOL_SOCKET, SO_LINGER, + (char *) &li, sizeof (struct linger)); + + ioctlsocket (*new_sock, FIONBIO, &disable_ul); + + strncpy (ip, inet_ntoa (name.sin_addr), LW_SOCK_IP_SIZE - 1); + ip[LW_SOCK_IP_SIZE - 1] = 0; + (*port) = (int) ntohs (name.sin_port); + + result = 1; + } + } } return result; @@ -261,30 +261,30 @@ name.sin_addr.s_addr = INADDR_ANY; name.sin_port = 0; if (bind (*sock, (struct sockaddr *) &name, sizeof name) >= 0) - { - name.sin_family = AF_INET; - name.sin_addr.s_addr = inet_addr (ip); - name.sin_port = htons ((short) port); - if (connect ((*sock), (struct sockaddr *) &name, sizeof name) >= 0) - { - /* - * Added this code copied/paste from accept. - * don'tknow if it's usefull - */ - li.l_onoff = 0; - li.l_linger = 0; - setsockopt (*sock, SOL_SOCKET, SO_KEEPALIVE, - (char *) &enable, sizeof (int)); - setsockopt (*sock, SOL_SOCKET, SO_OOBINLINE, - (char *) &disable, sizeof (int)); - setsockopt (*sock, SOL_SOCKET, SO_LINGER, - (char *) &li, sizeof (struct linger)); - - ioctlsocket (*sock, FIONBIO, &disable_ul); - - result = 1; - } - } + { + name.sin_family = AF_INET; + name.sin_addr.s_addr = inet_addr (ip); + name.sin_port = htons ((short) port); + if (connect ((*sock), (struct sockaddr *) &name, sizeof name) >= 0) + { + /* + * Added this code copied/paste from accept. + * don'tknow if it's usefull + */ + li.l_onoff = 0; + li.l_linger = 0; + setsockopt (*sock, SOL_SOCKET, SO_KEEPALIVE, + (char *) &enable, sizeof (int)); + setsockopt (*sock, SOL_SOCKET, SO_OOBINLINE, + (char *) &disable, sizeof (int)); + setsockopt (*sock, SOL_SOCKET, SO_LINGER, + (char *) &li, sizeof (struct linger)); + + ioctlsocket (*sock, FIONBIO, &disable_ul); + + result = 1; + } + } } return result; diff -Nru liquidwar-5.6.4/src/sound.c liquidwar-5.6.5/src/sound.c --- liquidwar-5.6.4/src/sound.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sound.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -97,13 +97,13 @@ if (WATER_VOLUME > 0) { if (HASARD_INDEX % 2) - pan = 192; + pan = 192; else - pan = 64; + pan = 64; hasard = HASARD_VALUE[HASARD_INDEX] % SAMPLE_WATER_NUMBER; play_sample (SAMPLE_WATER[hasard], - SOUND_VOLUME_VALUES[WATER_VOLUME], pan, 1000, 0); + SOUND_VOLUME_VALUES[WATER_VOLUME], pan, 1000, 0); } } @@ -172,14 +172,14 @@ * simultaneously from several threads. */ if (lw_mutex_trylock (&mutex)) - { - my_play_sample (SAMPLE_SFX_CLICK, CONFIG_CLICK_VOLUME); - lw_mutex_unlock (&mutex); - } + { + my_play_sample (SAMPLE_SFX_CLICK, CONFIG_CLICK_VOLUME); + lw_mutex_unlock (&mutex); + } else - { - log_println_str ("Warning: too many calls to \"play_click\"..."); - } + { + log_println_str ("Warning: too many calls to \"play_click\"..."); + } } } diff -Nru liquidwar-5.6.4/src/sound.h liquidwar-5.6.5/src/sound.h --- liquidwar-5.6.4/src/sound.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/sound.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/speeds.c liquidwar-5.6.5/src/speeds.c --- liquidwar-5.6.4/src/speeds.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/speeds.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -87,17 +87,17 @@ if (DISPLAY_DELAY_MIN[CONFIG_FRAMES_PER_SEC_LIMIT] != 0) { LW_MACRO_SNPRINTF2 (str, - LW_SPEEDS_FPS_SIZE, - "%d %s", - 1000 / - (DISPLAY_DELAY_MIN[CONFIG_FRAMES_PER_SEC_LIMIT]), - lw_lang_string (LW_LANG_STRING_SPEEDS_FPS)); + LW_SPEEDS_FPS_SIZE, + "%d %s", + 1000 / + (DISPLAY_DELAY_MIN[CONFIG_FRAMES_PER_SEC_LIMIT]), + lw_lang_string (LW_LANG_STRING_SPEEDS_FPS)); } else { LW_MACRO_SNPRINTF0 (str, - LW_SPEEDS_FPS_SIZE, - lw_lang_string (LW_LANG_STRING_SPEEDS_NOFPSLIMIT)); + LW_SPEEDS_FPS_SIZE, + lw_lang_string (LW_LANG_STRING_SPEEDS_NOFPSLIMIT)); } } @@ -131,17 +131,17 @@ if (LOGIC_DELAY_MIN[CONFIG_ROUNDS_PER_SEC_LIMIT] != 0) { LW_MACRO_SNPRINTF2 (str, - LW_SPEEDS_RPS_SIZE, - "%d %s", - 1000 / - (LOGIC_DELAY_MIN[CONFIG_ROUNDS_PER_SEC_LIMIT]), - lw_lang_string (LW_LANG_STRING_SPEEDS_RPS)); + LW_SPEEDS_RPS_SIZE, + "%d %s", + 1000 / + (LOGIC_DELAY_MIN[CONFIG_ROUNDS_PER_SEC_LIMIT]), + lw_lang_string (LW_LANG_STRING_SPEEDS_RPS)); } else { LW_MACRO_SNPRINTF0 (str, - LW_SPEEDS_RPS_SIZE, - lw_lang_string (LW_LANG_STRING_SPEEDS_NORPSLIMIT)); + LW_SPEEDS_RPS_SIZE, + lw_lang_string (LW_LANG_STRING_SPEEDS_NORPSLIMIT)); } } @@ -216,22 +216,22 @@ { choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/speeds.h liquidwar-5.6.5/src/speeds.h --- liquidwar-5.6.4/src/speeds.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/speeds.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/spread.h liquidwar-5.6.5/src/spread.h --- liquidwar-5.6.4/src/spread.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/spread.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -63,25 +63,25 @@ /*==================================================================*/ extern void LW_ASM_FUNC boost_gradient_down_2 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_down_3 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_down_4 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_down_5 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_down_6 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_up_2 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_up_3 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_up_4 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_up_5 (MESH * first, - int size, int offset); + int size, int offset); extern void LW_ASM_FUNC boost_gradient_up_6 (MESH * first, - int size, int offset); + int size, int offset); #endif diff -Nru liquidwar-5.6.4/src/spread.s liquidwar-5.6.5/src/spread.s --- liquidwar-5.6.4/src/spread.s 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/spread.s 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/srvchan.c liquidwar-5.6.5/src/srvchan.c --- liquidwar-5.6.4/src/srvchan.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvchan.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -68,30 +68,41 @@ /* Constants */ /*==================================================================*/ +/* + * Following NULL-terminated list contains all versions which + * are compatible with current. + */ +static char *ACCEPTED_VERSIONS[] = { "5.6.3", + "5.6.4", + "5.6.5", + LW_VERSION, + NULL +}; + /*==================================================================*/ /* static functions */ /*==================================================================*/ static void reset (LW_SRVCHAN * chan); static int handle_team (LW_SRVCHAN * chan, LW_NETMESS * mess, - int *free_teams); + int *free_teams); static int handle_ready (LW_SRVCHAN * chan, LW_NETMESS * mess); static int handle_start (LW_SRVCHAN * chan, LW_NETMESS * mess); static int handle_waiting (LW_SRVCHAN * chan, - LW_NETMESS * mess, int free_teams); + LW_NETMESS * mess, int free_teams); static int handle_next (LW_SRVCHAN * chan, LW_NETMESS * mess, int *next); static int handle_teamstartinfo (LW_SRVCHAN * chan, LW_NETMESS * mess, - LW_TEAMSTARTINFO * team_start_info); + LW_TEAMSTARTINFO * team_start_info); static int handle_chattalk (LW_SRVCHAN * chan, LW_NETMESS * mess, - LW_CHAT_HISTORY * chat); + LW_CHAT_HISTORY * chat); static int handle_chatlisten (LW_SRVCHAN * chan, LW_NETMESS * mess); static int handle_who (LW_SRVCHAN * chan, LW_NETMESS * mess); static int handle_sendmap (LW_SRVCHAN * chan, LW_NETMESS * mess, void **map); static int handle_recvmap (LW_SRVCHAN * chan, LW_NETMESS * mess, void *map); static int handle_sendconfig (LW_SRVCHAN * chan, LW_NETMESS * mess, - LW_NETCONF * config); + LW_NETCONF * config); static int handle_recvconfig (LW_SRVCHAN * chan, LW_NETMESS * mess, - LW_NETCONF * config); + LW_NETCONF * config); /*------------------------------------------------------------------*/ /* @@ -165,13 +176,13 @@ while (i < mess->argc) { if (i == 0) - { - LW_MACRO_STRCAT (answer, " "); - } + { + LW_MACRO_STRCAT (answer, " "); + } else - { - LW_MACRO_STRCAT (answer, ","); - } + { + LW_MACRO_STRCAT (answer, ","); + } LW_MACRO_STRCAT (answer, mess->argv[i]); i++; } @@ -198,10 +209,10 @@ * is not really a liquidwar client, it will be thrown away */ if (strcmp (mess->argv[0], LW_PROGRAM) == 0) - { - (*ok) = 1; - result = 1; - } + { + (*ok) = 1; + result = 1; + } } /* @@ -227,20 +238,22 @@ lw_srvchan_handle_version (int sock, LW_NETMESS * mess, int *ok) { int result = 0; + int i = 0; if (mess->argc == 1) { /* - * OK, there's an argument, we check if it's the good version. - * This prevents form accepting random connections: if the client - * is not a liquidwar client with the right version number, it will - * be thrown away... + * We accept "some" versions... But cross-version connections are + * not recommended... */ - if (strcmp (mess->argv[0], LW_VERSION) == 0) - { - (*ok) = 1; - result = 1; - } + for (i = 0; ACCEPTED_VERSIONS[i] != NULL; ++i) + { + if (strcmp (mess->argv[0], ACCEPTED_VERSIONS[i]) == 0) + { + (*ok) = 1; + result = 1; + } + } } /* @@ -264,7 +277,7 @@ */ int lw_srvchan_handle_password (int sock, LW_NETMESS * mess, - int *ok, char *password) + int *ok, char *password) { int result = 0; @@ -275,10 +288,10 @@ * OK, there's an argument, we check if it's the good password. */ if (strncmp (mess->argv[0], password, PASSWORD_SIZE) == 0) - { - (*ok) = 1; - result = 1; - } + { + (*ok) = 1; + result = 1; + } break; } @@ -349,50 +362,50 @@ */ i = atoi (mess->argv[0]); if (i >= 0 && i < NB_TEAMS) - { - if (!chan->team[i].active) - { - /* - * The message from the client makes sense, we - * return OK - */ - result = 1; - - /* - * Now we activate the team only if there's still - * room. If not we still return OK but the "WHO" - * message will later inform the client that some - * of his requests have been cancelled... - */ - if ((*free_teams) > 0) - { - (*free_teams)--; - chan->team[i].active = 1; - - chan->team[i].control_type = atoi (mess->argv[1]); - strncpy (chan->team[i].name, mess->argv[2], NAME_SIZE); - chan->team[i].name[NAME_SIZE] = '\0'; - - log_print_str ("Team \""); - log_print_str (mess->argv[2]); - log_print_str ("\" on client \""); - log_print_str (chan->ip); - log_print_str (":"); - log_print_int (chan->port); - log_println_str ("\" accepted"); - } - else - { - log_print_str ("Team \""); - log_print_str (mess->argv[2]); - log_print_str ("\" on client \""); - log_print_str (chan->ip); - log_print_str (":"); - log_print_int (chan->port); - log_println_str ("\" refused!"); - } - } - } + { + if (!chan->team[i].active) + { + /* + * The message from the client makes sense, we + * return OK + */ + result = 1; + + /* + * Now we activate the team only if there's still + * room. If not we still return OK but the "WHO" + * message will later inform the client that some + * of his requests have been cancelled... + */ + if ((*free_teams) > 0) + { + (*free_teams)--; + chan->team[i].active = 1; + + chan->team[i].control_type = atoi (mess->argv[1]); + strncpy (chan->team[i].name, mess->argv[2], NAME_SIZE); + chan->team[i].name[NAME_SIZE] = '\0'; + + log_print_str ("Team \""); + log_print_str (mess->argv[2]); + log_print_str ("\" on client \""); + log_print_str (chan->ip); + log_print_str (":"); + log_print_int (chan->port); + log_println_str ("\" accepted"); + } + else + { + log_print_str ("Team \""); + log_print_str (mess->argv[2]); + log_print_str ("\" on client \""); + log_print_str (chan->ip); + log_print_str (":"); + log_print_int (chan->port); + log_println_str ("\" refused!"); + } + } + } } /* @@ -428,38 +441,38 @@ */ i = atoi (mess->argv[0]); if (i >= 0 && i < NB_TEAMS) - { - LW_MACRO_SPRINTF1 (answer, "%s", LW_NETMESS_TEXT_ERR); + { + LW_MACRO_SPRINTF1 (answer, "%s", LW_NETMESS_TEXT_ERR); - if (chan->team[i].active) - { - if (chan->team[i].network) - { - LW_MACRO_SPRINTF4 (answer, - "%s %d,%d,'%s'", - LW_NETMESS_TEXT_NETWORK, - chan->team[i].server_id, - chan->team[i].control_type, - chan->team[i].name); - } - else - { - LW_MACRO_SPRINTF4 (answer, - "%s %d,%d,'%s'", - LW_NETMESS_TEXT_LOCAL, - chan->team[i].server_id, - chan->team[i].control_type, - chan->team[i].name); - } - } - else - { - LW_MACRO_SPRINTF1 (answer, "%s", LW_NETMESS_TEXT_NOBODY); - } - - lw_sock_send_str (&(chan->sock), answer); - result = 1; - } + if (chan->team[i].active) + { + if (chan->team[i].network) + { + LW_MACRO_SPRINTF4 (answer, + "%s %d,%d,'%s'", + LW_NETMESS_TEXT_NETWORK, + chan->team[i].server_id, + chan->team[i].control_type, + chan->team[i].name); + } + else + { + LW_MACRO_SPRINTF4 (answer, + "%s %d,%d,'%s'", + LW_NETMESS_TEXT_LOCAL, + chan->team[i].server_id, + chan->team[i].control_type, + chan->team[i].name); + } + } + else + { + LW_MACRO_SPRINTF1 (answer, "%s", LW_NETMESS_TEXT_NOBODY); + } + + lw_sock_send_str (&(chan->sock), answer); + result = 1; + } } /* @@ -593,7 +606,7 @@ */ static int handle_teamstartinfo (LW_SRVCHAN * chan, LW_NETMESS * mess, - LW_TEAMSTARTINFO * team_start_info) + LW_TEAMSTARTINFO * team_start_info) { int result = 0; int i; @@ -606,18 +619,18 @@ */ i = atoi (mess->argv[0]); if (i >= 0 && i < NB_TEAMS) - { - LW_MACRO_SPRINTF4 (answer, - "%s %d,%d,'%s'", - LW_NETMESS_TEXT_OK, - team_start_info[i].active, - team_start_info[i].start, - team_start_info[i].name); + { + LW_MACRO_SPRINTF4 (answer, + "%s %d,%d,'%s'", + LW_NETMESS_TEXT_OK, + team_start_info[i].active, + team_start_info[i].start, + team_start_info[i].name); - lw_sock_send_str (&(chan->sock), answer); + lw_sock_send_str (&(chan->sock), answer); - result = 1; - } + result = 1; + } } /* @@ -689,19 +702,19 @@ if (mess->argc == 0) { if (lw_chat_pop (&(chan->chat), &message)) - { - /* - * OK, there's a message in the queue, we send it - */ - LW_MACRO_SPRINTF3 (answer, - "%s '%s','%s'", - LW_NETMESS_TEXT_OK, - message.author, message.content); - } + { + /* + * OK, there's a message in the queue, we send it + */ + LW_MACRO_SPRINTF3 (answer, + "%s '%s','%s'", + LW_NETMESS_TEXT_OK, + message.author, message.content); + } else - { - LW_MACRO_SPRINTF0 (answer, LW_NETMESS_TEXT_OK); - } + { + LW_MACRO_SPRINTF0 (answer, LW_NETMESS_TEXT_OK); + } lw_sock_send_str (&(chan->sock), answer); @@ -894,8 +907,8 @@ */ int lw_srvchan_wait_teams (LW_SRVCHAN * chan, int *free_teams, - int sock, void **map, LW_NETCONF * config, - char *password) + int sock, void **map, LW_NETCONF * config, + char *password) { int result = 0; int ret; @@ -916,134 +929,134 @@ log_flush (); while ((!chan->ready_ok) && ret_mess && - ((ret = lw_sock_recv_str (&(chan->sock), message)) >= 0)) - { - if (ret > 0) - { - mess = lw_netmess_read (message); - if (mess != NULL) - { - /* - * switch to handle the different possible messages - */ - switch (mess->code) - { - case LW_NETMESS_CODE_PING: - ret_mess = lw_srvchan_handle_ping (chan->sock, mess); - break; - case LW_NETMESS_CODE_ECHO: - ret_mess = lw_srvchan_handle_echo (chan->sock, mess); - break; - case LW_NETMESS_CODE_PROGRAM: - ret_mess = lw_srvchan_handle_program (chan->sock, mess, - &(chan-> - program_ok)); - break; - case LW_NETMESS_CODE_VERSION: - ret_mess = lw_srvchan_handle_version (chan->sock, mess, - &(chan-> - version_ok)); - break; - case LW_NETMESS_CODE_PASSWORD: - ret_mess = lw_srvchan_handle_password (chan->sock, mess, - &(chan-> - password_ok), - password); - break; - case LW_NETMESS_CODE_FREE: - ret_mess = lw_srvchan_handle_free (chan->sock, mess, - *free_teams, - &free_received); - break; - case LW_NETMESS_CODE_TEAM: - ret_mess = handle_team (chan, mess, free_teams); - break; - case LW_NETMESS_CODE_READY: - ret_mess = handle_ready (chan, mess); - break; - case LW_NETMESS_CODE_SENDMAP: - ret_mess = handle_sendmap (chan, mess, map); - break; - case LW_NETMESS_CODE_SENDCONFIG: - ret_mess = handle_sendconfig (chan, mess, config); - break; - case LW_NETMESS_CODE_QUIT: - ret_mess = lw_srvchan_handle_quit (chan->sock, mess, - &(chan-> - normal_quit)); - break; - default: - ret_mess = lw_srvchan_handle_unknown (sock, mess); - break; - } - - /* - * lw_netmess_free must *not* be forgetted - */ - lw_netmess_free (mess); - - if (!ret_mess) - { - log_print_str ("Error processing \""); - log_print_str (message); - log_print_str ("\""); - log_println (); - } - } - else - { - log_println_str ("Serious memory problem 8-("); - ret_mess = 0; - } - } - } + ((ret = lw_sock_recv_str (&(chan->sock), message)) >= 0)) + { + if (ret > 0) + { + mess = lw_netmess_read (message); + if (mess != NULL) + { + /* + * switch to handle the different possible messages + */ + switch (mess->code) + { + case LW_NETMESS_CODE_PING: + ret_mess = lw_srvchan_handle_ping (chan->sock, mess); + break; + case LW_NETMESS_CODE_ECHO: + ret_mess = lw_srvchan_handle_echo (chan->sock, mess); + break; + case LW_NETMESS_CODE_PROGRAM: + ret_mess = lw_srvchan_handle_program (chan->sock, mess, + & + (chan->program_ok)); + break; + case LW_NETMESS_CODE_VERSION: + ret_mess = lw_srvchan_handle_version (chan->sock, mess, + & + (chan->version_ok)); + break; + case LW_NETMESS_CODE_PASSWORD: + ret_mess = lw_srvchan_handle_password (chan->sock, mess, + & + (chan->password_ok), + password); + break; + case LW_NETMESS_CODE_FREE: + ret_mess = lw_srvchan_handle_free (chan->sock, mess, + *free_teams, + &free_received); + break; + case LW_NETMESS_CODE_TEAM: + ret_mess = handle_team (chan, mess, free_teams); + break; + case LW_NETMESS_CODE_READY: + ret_mess = handle_ready (chan, mess); + break; + case LW_NETMESS_CODE_SENDMAP: + ret_mess = handle_sendmap (chan, mess, map); + break; + case LW_NETMESS_CODE_SENDCONFIG: + ret_mess = handle_sendconfig (chan, mess, config); + break; + case LW_NETMESS_CODE_QUIT: + ret_mess = lw_srvchan_handle_quit (chan->sock, mess, + & + (chan->normal_quit)); + break; + default: + ret_mess = lw_srvchan_handle_unknown (sock, mess); + break; + } + + /* + * lw_netmess_free must *not* be forgetted + */ + lw_netmess_free (mess); + + if (!ret_mess) + { + log_print_str ("Error processing \""); + log_print_str (message); + log_print_str ("\""); + log_println (); + } + } + else + { + log_println_str ("Serious memory problem 8-("); + ret_mess = 0; + } + } + } if (chan->program_ok && - chan->version_ok && chan->password_ok && chan->ready_ok && ret_mess) - { - result = 1; - - log_print_str ("Client \""); - log_print_str (chan->ip); - log_print_str (":"); - log_print_int (chan->port); - log_println_str ("\" accepted"); - - /* - * We play a little sound for people who have the server - * opened on a console and want it to beep when someone - * connects - */ - log_beep (); - } + chan->version_ok && chan->password_ok && chan->ready_ok && ret_mess) + { + result = 1; + + log_print_str ("Client \""); + log_print_str (chan->ip); + log_print_str (":"); + log_print_int (chan->port); + log_println_str ("\" accepted"); + + /* + * We play a little sound for people who have the server + * opened on a console and want it to beep when someone + * connects + */ + log_beep (); + } else - { - if (chan->ready_ok) - { - /* - * Now if we are here it means we have received a "READY" - * message, but still the client did not send the correct - * messages before => we send an "ERR" messageon the - * network for consistency, since the client did not receive - * any message to his "READY" query yet. - */ - lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_ERR); - } - lw_sock_close (&(chan->sock)); - - log_print_str ("Client \""); - log_print_str (chan->ip); - log_print_str (":"); - log_print_int (chan->port); - if (chan->normal_quit) - { - log_println_str ("\" disconnected (probably a ping)"); - } - else - { - log_println_str ("\" rejected!"); - } - } + { + if (chan->ready_ok) + { + /* + * Now if we are here it means we have received a "READY" + * message, but still the client did not send the correct + * messages before => we send an "ERR" messageon the + * network for consistency, since the client did not receive + * any message to his "READY" query yet. + */ + lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_ERR); + } + lw_sock_close (&(chan->sock)); + + log_print_str ("Client \""); + log_print_str (chan->ip); + log_print_str (":"); + log_print_int (chan->port); + if (chan->normal_quit) + { + log_println_str ("\" disconnected (probably a ping)"); + } + else + { + log_println_str ("\" rejected!"); + } + } } return result; @@ -1056,9 +1069,9 @@ */ int lw_srvchan_keepalive (LW_SRVCHAN * chan, - int waited_teams, - LW_TEAMSTARTINFO * team_start_info, - LW_CHAT_HISTORY * chat) + int waited_teams, + LW_TEAMSTARTINFO * team_start_info, + LW_CHAT_HISTORY * chat) { int result = 0; int ret; @@ -1080,106 +1093,106 @@ if (lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_OK)) { while ((!chan->ready_ok) && (!next) && ret_mess && - ((ret = lw_sock_recv_str (&(chan->sock), message)) >= 0)) - { - if (ret > 0) - { - mess = lw_netmess_read (message); - if (mess != NULL) - { - /* - * switch to handle the different possible messages - */ - switch (mess->code) - { - case LW_NETMESS_CODE_PING: - ret_mess = lw_srvchan_handle_ping (chan->sock, mess); - break; - case LW_NETMESS_CODE_ECHO: - ret_mess = lw_srvchan_handle_echo (chan->sock, mess); - break; - case LW_NETMESS_CODE_START: - ret_mess = handle_start (chan, mess); - break; - case LW_NETMESS_CODE_WAITING: - ret_mess = handle_waiting (chan, mess, waited_teams); - break; - case LW_NETMESS_CODE_NEXT: - ret_mess = handle_next (chan, mess, &next); - break; - case LW_NETMESS_CODE_TEAMSTARTINFO: - ret_mess = handle_teamstartinfo (chan, mess, - team_start_info); - break; - case LW_NETMESS_CODE_CHATTALK: - ret_mess = handle_chattalk (chan, mess, chat); - break; - case LW_NETMESS_CODE_CHATLISTEN: - ret_mess = handle_chatlisten (chan, mess); - break; - case LW_NETMESS_CODE_READY: - ret_mess = handle_ready (chan, mess); - break; - case LW_NETMESS_CODE_QUIT: - ret_mess = lw_srvchan_handle_quit (chan->sock, mess, - &(chan-> - normal_quit)); - break; - default: - ret_mess = lw_srvchan_handle_unknown (chan->sock, mess); - break; - } - - /* - * lw_netmess_free must *not* be forgetted - */ - lw_netmess_free (mess); - - if (!ret_mess) - { - log_print_str ("Error processing \""); - log_print_str (message); - log_print_str ("\""); - log_println (); - } - } - else - { - log_println_str ("Serious memory problem 8-("); - ret_mess = 0; - } - } - } + ((ret = lw_sock_recv_str (&(chan->sock), message)) >= 0)) + { + if (ret > 0) + { + mess = lw_netmess_read (message); + if (mess != NULL) + { + /* + * switch to handle the different possible messages + */ + switch (mess->code) + { + case LW_NETMESS_CODE_PING: + ret_mess = lw_srvchan_handle_ping (chan->sock, mess); + break; + case LW_NETMESS_CODE_ECHO: + ret_mess = lw_srvchan_handle_echo (chan->sock, mess); + break; + case LW_NETMESS_CODE_START: + ret_mess = handle_start (chan, mess); + break; + case LW_NETMESS_CODE_WAITING: + ret_mess = handle_waiting (chan, mess, waited_teams); + break; + case LW_NETMESS_CODE_NEXT: + ret_mess = handle_next (chan, mess, &next); + break; + case LW_NETMESS_CODE_TEAMSTARTINFO: + ret_mess = handle_teamstartinfo (chan, mess, + team_start_info); + break; + case LW_NETMESS_CODE_CHATTALK: + ret_mess = handle_chattalk (chan, mess, chat); + break; + case LW_NETMESS_CODE_CHATLISTEN: + ret_mess = handle_chatlisten (chan, mess); + break; + case LW_NETMESS_CODE_READY: + ret_mess = handle_ready (chan, mess); + break; + case LW_NETMESS_CODE_QUIT: + ret_mess = lw_srvchan_handle_quit (chan->sock, mess, + & + (chan->normal_quit)); + break; + default: + ret_mess = lw_srvchan_handle_unknown (chan->sock, mess); + break; + } + + /* + * lw_netmess_free must *not* be forgetted + */ + lw_netmess_free (mess); + + if (!ret_mess) + { + log_print_str ("Error processing \""); + log_print_str (message); + log_print_str ("\""); + log_println (); + } + } + else + { + log_println_str ("Serious memory problem 8-("); + ret_mess = 0; + } + } + } if ((chan->ready_ok || next) && ret_mess) - { - result = 1; - if (chan->ready_ok) - { - log_print_str ("Client \""); - log_print_str (chan->ip); - log_print_str (":"); - log_print_int (chan->port); - log_println_str ("\" ready"); - } - } + { + result = 1; + if (chan->ready_ok) + { + log_print_str ("Client \""); + log_print_str (chan->ip); + log_print_str (":"); + log_print_int (chan->port); + log_println_str ("\" ready"); + } + } else - { - if (chan->ready_ok || next) - { - /* - * Now if we are here it means we have received a "READY" - * message, but still the client did not send the correct - * messages before => we send an "ERR" messageon the - * network for consistency, since the client did not receive - * any message to his "READY" query yet. - */ - lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_ERR); - } - lw_sock_close (&(chan->sock)); + { + if (chan->ready_ok || next) + { + /* + * Now if we are here it means we have received a "READY" + * message, but still the client did not send the correct + * messages before => we send an "ERR" messageon the + * network for consistency, since the client did not receive + * any message to his "READY" query yet. + */ + lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_ERR); + } + lw_sock_close (&(chan->sock)); - //log_println_str("Player KO"); - } + //log_println_str("Player KO"); + } } return result; @@ -1219,84 +1232,84 @@ if (lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_OK)) { while ((!chan->ready_ok) && ret_mess && - ((ret = lw_sock_recv_str (&(chan->sock), message)) >= 0)) - { - if (ret > 0) - { - mess = lw_netmess_read (message); - if (mess != NULL) - { - /* - * switch to handle the different possible messages - */ - switch (mess->code) - { - case LW_NETMESS_CODE_PING: - ret_mess = lw_srvchan_handle_ping (chan->sock, mess); - break; - case LW_NETMESS_CODE_ECHO: - ret_mess = lw_srvchan_handle_echo (chan->sock, mess); - break; - case LW_NETMESS_CODE_WHO: - ret_mess = handle_who (chan, mess); - break; - case LW_NETMESS_CODE_READY: - ret_mess = handle_ready (chan, mess); - break; - case LW_NETMESS_CODE_RECVMAP: - ret_mess = handle_recvmap (chan, mess, map); - break; - case LW_NETMESS_CODE_RECVCONFIG: - ret_mess = handle_recvconfig (chan, mess, config); - break; - default: - ret_mess = lw_srvchan_handle_unknown (chan->sock, mess); - break; - } - - /* - * lw_netmess_free must *not* be forgetted - */ - lw_netmess_free (mess); - - if (!ret_mess) - { - log_print_str ("Error processing \""); - log_print_str (message); - log_print_str ("\""); - log_println (); - } - } - else - { - log_println_str ("Serious memory problem 8-("); - ret_mess = 0; - } - } - } + ((ret = lw_sock_recv_str (&(chan->sock), message)) >= 0)) + { + if (ret > 0) + { + mess = lw_netmess_read (message); + if (mess != NULL) + { + /* + * switch to handle the different possible messages + */ + switch (mess->code) + { + case LW_NETMESS_CODE_PING: + ret_mess = lw_srvchan_handle_ping (chan->sock, mess); + break; + case LW_NETMESS_CODE_ECHO: + ret_mess = lw_srvchan_handle_echo (chan->sock, mess); + break; + case LW_NETMESS_CODE_WHO: + ret_mess = handle_who (chan, mess); + break; + case LW_NETMESS_CODE_READY: + ret_mess = handle_ready (chan, mess); + break; + case LW_NETMESS_CODE_RECVMAP: + ret_mess = handle_recvmap (chan, mess, map); + break; + case LW_NETMESS_CODE_RECVCONFIG: + ret_mess = handle_recvconfig (chan, mess, config); + break; + default: + ret_mess = lw_srvchan_handle_unknown (chan->sock, mess); + break; + } + + /* + * lw_netmess_free must *not* be forgetted + */ + lw_netmess_free (mess); + + if (!ret_mess) + { + log_print_str ("Error processing \""); + log_print_str (message); + log_print_str ("\""); + log_println (); + } + } + else + { + log_println_str ("Serious memory problem 8-("); + ret_mess = 0; + } + } + } if (chan->ready_ok && ret_mess) - { - result = 1; - // log_println_str("Player OK"); - } + { + result = 1; + // log_println_str("Player OK"); + } else - { - if (chan->ready_ok) - { - /* - * Now if we are here it means we have received a "READY" - * message, but still the client did not send the correct - * messages before => we send an "ERR" messageon the - * network for consistency, since the client did not receive - * any message to his "READY" query yet. - */ - lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_ERR); - } - lw_sock_close (&(chan->sock)); + { + if (chan->ready_ok) + { + /* + * Now if we are here it means we have received a "READY" + * message, but still the client did not send the correct + * messages before => we send an "ERR" messageon the + * network for consistency, since the client did not receive + * any message to his "READY" query yet. + */ + lw_sock_send_str (&(chan->sock), LW_NETMESS_TEXT_ERR); + } + lw_sock_close (&(chan->sock)); - //log_println_str("Player KO"); - } + //log_println_str("Player KO"); + } } return result; @@ -1336,9 +1349,9 @@ for (i = 0; i < NB_TEAMS && result < 0; ++i) { if (chan->team[i].active && chan->team[i].server_id == server_id) - { - result = i; - } + { + result = i; + } } return result; @@ -1357,9 +1370,9 @@ for (i = 0; i < NB_TEAMS && result < 0; ++i) { if (!(chan->team[i].active)) - { - result = i; - } + { + result = i; + } } return result; @@ -1403,10 +1416,10 @@ for (i = 0; i < NB_TEAMS; ++i) { if (chan->team[i].active && !chan->team[i].network) - { - netkey->key_states[chan->team[i].server_id] = - chan_netkey.key_states[i]; - } + { + netkey->key_states[chan->team[i].server_id] = + chan_netkey.key_states[i]; + } } netkey->cmd = chan_netkey.cmd; @@ -1434,10 +1447,10 @@ for (i = 0; i < NB_TEAMS; ++i) { if (chan->team[i].active) - { - chan_netkey.key_states[i] = - netkey->key_states[chan->team[i].server_id]; - } + { + chan_netkey.key_states[i] = + netkey->key_states[chan->team[i].server_id]; + } } chan_netkey.cmd = netkey->cmd; diff -Nru liquidwar-5.6.4/src/srvchan.h liquidwar-5.6.5/src/srvchan.h --- liquidwar-5.6.4/src/srvchan.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvchan.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -94,11 +94,11 @@ /*==================================================================*/ int lw_srvchan_wait_teams (LW_SRVCHAN * chan, int *free_teams, - int sock, void **map, LW_NETCONF * config, - char *password); + int sock, void **map, LW_NETCONF * config, + char *password); int lw_srvchan_keepalive (LW_SRVCHAN * chan, int waited_teams, - LW_TEAMSTARTINFO * team_start_info, - LW_CHAT_HISTORY * chat); + LW_TEAMSTARTINFO * team_start_info, + LW_CHAT_HISTORY * chat); int lw_srvchan_tell_who (LW_SRVCHAN * chan, void *map, LW_NETCONF * config); int lw_srvchan_final_ok (LW_SRVCHAN * chan); int lw_srvchan_find_team_by_server_id (LW_SRVCHAN * chan, int server_id); @@ -112,9 +112,9 @@ int lw_srvchan_handle_program (int sock, LW_NETMESS * mess, int *ok); int lw_srvchan_handle_version (int sock, LW_NETMESS * mess, int *ok); int lw_srvchan_handle_password (int sock, LW_NETMESS * mess, - int *ok, char *password); + int *ok, char *password); int lw_srvchan_handle_free (int sock, LW_NETMESS * mess, - int free_teams, int *ok); + int free_teams, int *ok); int lw_srvchan_handle_unknown (int sock, LW_NETMESS * mess); int lw_srvchan_handle_quit (int sock, LW_NETMESS * mess, int *normal_quit); diff -Nru liquidwar-5.6.4/src/srvcont.c liquidwar-5.6.5/src/srvcont.c --- liquidwar-5.6.4/src/srvcont.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvcont.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -100,8 +100,8 @@ static int distribute_teams (LW_SRVCONT * cont); static void recalc_nb_teams (LW_SRVCONT * cont); static void find_chan_and_team_by_server_id (LW_SRVCONT * cont, - int server_id, - int *chan, int *team); + int server_id, + int *chan, int *team); static int send_lag_key_presses (LW_SRVCONT * cont, int lag); static int reject_new_clients (LW_SRVCONT * cont, char *password); static void reject_new_clients_callback (void *args); @@ -141,12 +141,12 @@ for (i = 0; i < cont->nb_chans; ++i) { for (j = 0; j < NB_TEAMS; ++j) - { - if (cont->chan[i].team[j].active) - { - cont->chan[i].team[j].server_id = k++; - } - } + { + if (cont->chan[i].team[j].active) + { + cont->chan[i].team[j].server_id = k++; + } + } } /* @@ -166,23 +166,23 @@ for (i = 0; i < cont->nb_chans; ++i) { for (k = 0; k < cont->nb_teams; ++k) - { - if (lw_srvchan_find_team_by_server_id (&(cont->chan[i]), k) < 0) - { - j = lw_srvchan_find_first_free_team (&(cont->chan[i])); - if (j >= 0) - { - cont->chan[i].team[j].active = 1; - cont->chan[i].team[j].network = 1; - cont->chan[i].team[j].server_id = k; - } - else - { - result = 0; - log_println_str ("Unable to find a free team!"); - } - } - } + { + if (lw_srvchan_find_team_by_server_id (&(cont->chan[i]), k) < 0) + { + j = lw_srvchan_find_first_free_team (&(cont->chan[i])); + if (j >= 0) + { + cont->chan[i].team[j].active = 1; + cont->chan[i].team[j].network = 1; + cont->chan[i].team[j].server_id = k; + } + else + { + result = 0; + log_println_str ("Unable to find a free team!"); + } + } + } } /* @@ -193,35 +193,36 @@ for (i = 0; i < cont->nb_chans; ++i) { for (j = 0; j < NB_TEAMS; ++j) - { - if (cont->chan[i].team[j].active) - { - find_chan_and_team_by_server_id (cont, - cont->chan[i].team[j]. - server_id, &i_orig, &j_orig); - if (i_orig >= 0 && j_orig >= 0) - { - /* - * Now we check that we're not uselessely copying - * stuff from the same struct. It's a waste of time - * and can cause some bugs depending on the implementation - * of the LW_MACRO_STRCPY macro. - */ - if (i_orig != i || j_orig != j) - { - LW_MACRO_STRCPY (cont->chan[i].team[j].name, - cont->chan[i_orig].team[j_orig].name); - cont->chan[i].team[j].control_type = - cont->chan[i_orig].team[j_orig].control_type; - } - } - else - { - result = 0; - log_println_str ("Unable to find a free team!"); - } - } - } + { + if (cont->chan[i].team[j].active) + { + find_chan_and_team_by_server_id (cont, + cont->chan[i]. + team[j].server_id, &i_orig, + &j_orig); + if (i_orig >= 0 && j_orig >= 0) + { + /* + * Now we check that we're not uselessely copying + * stuff from the same struct. It's a waste of time + * and can cause some bugs depending on the implementation + * of the LW_MACRO_STRCPY macro. + */ + if (i_orig != i || j_orig != j) + { + LW_MACRO_STRCPY (cont->chan[i].team[j].name, + cont->chan[i_orig].team[j_orig].name); + cont->chan[i].team[j].control_type = + cont->chan[i_orig].team[j_orig].control_type; + } + } + else + { + result = 0; + log_println_str ("Unable to find a free team!"); + } + } + } } /* @@ -255,12 +256,12 @@ for (i = 0; i < cont->nb_chans; ++i) { for (j = 0; j < NB_TEAMS; ++j) - { - if (cont->chan[i].team[j].active) - { - cont->nb_teams++; - } - } + { + if (cont->chan[i].team[j].active) + { + cont->nb_teams++; + } + } } } @@ -270,7 +271,7 @@ */ static void find_chan_and_team_by_server_id (LW_SRVCONT * cont, - int server_id, int *chan, int *team) + int server_id, int *chan, int *team) { int i; int j; @@ -279,15 +280,15 @@ for (i = 0; i < cont->nb_chans; ++i) { for (j = 0; j < NB_TEAMS; ++j) - { - if (cont->chan[i].team[j].active && - (cont->chan[i].team[j].server_id == server_id) && - !(cont->chan[i].team[j].network)) - { - (*chan) = i; - (*team) = j; - } - } + { + if (cont->chan[i].team[j].active && + (cont->chan[i].team[j].server_id == server_id) && + !(cont->chan[i].team[j].network)) + { + (*chan) = i; + (*team) = j; + } + } } } @@ -297,7 +298,7 @@ */ static void prepare_team_start_info (LW_TEAMSTARTINFO * team_start_info, - LW_SRVCONT * cont) + LW_SRVCONT * cont) { int i, j, k; @@ -310,16 +311,16 @@ for (i = 0; i < cont->nb_chans; ++i) { for (j = 0; j < NB_TEAMS; ++j) - { - if (cont->chan[i].team[j].active && k < NB_TEAMS) - { - team_start_info[k].active = 1; - team_start_info[k].start = cont->chan[i].start; - LW_MACRO_STRCPY (team_start_info[k].name, - cont->chan[i].team[j].name); - k++; - } - } + { + if (cont->chan[i].team[j].active && k < NB_TEAMS) + { + team_start_info[k].active = 1; + team_start_info[k].start = cont->chan[i].start; + LW_MACRO_STRCPY (team_start_info[k].name, + cont->chan[i].team[j].name); + k++; + } + } } } @@ -333,8 +334,8 @@ */ int lw_srvcont_wait_teams (LW_SRVCONT * cont, - LW_WWWSRV_DATA * www_data, - int nb_teams, int port, char *password, char *callback) + LW_WWWSRV_DATA * www_data, + int nb_teams, int port, char *password, char *callback) { int free_teams = 0; int result = 0; @@ -373,140 +374,140 @@ * Now we just wait until there are enough teams connected */ while (!started) - { - free_teams = nb_teams - cont->nb_teams; + { + free_teams = nb_teams - cont->nb_teams; - if (display_waiting_for) - { - log_print_str ("Waiting for "); - log_print_int (free_teams); - if (free_teams > 1) - { - log_print_str (" teams..."); - } - else - { - log_print_str (" team..."); - } - log_println (); - - display_waiting_for = 0; - } - - if (lw_srvchan_wait_teams (&(cont->chan[cont->nb_chans]), - &free_teams, - cont->sock, - &(cont->chan[cont->nb_chans].map), - &(cont->chan[cont->nb_chans].config), - password)) - { - if (cont->nb_teams == 0) - { - /* - * OK, this guy is the first one to connect on - * the server, so we'll fire the "callback" script/program - */ - if (callback && strlen (callback)) - { - log_print_str ("Executing \""); - log_print_str (callback); - log_println_str ("\""); - lw_exec_cmd (callback); - } - } - cont->nb_teams = nb_teams - free_teams; - ++(cont->nb_chans); - display_waiting_for = 1; - } - - /* - * Now we check if me must force a game start - */ - start = 1; - for (i = 0; i < cont->nb_chans; ++i) - { - start = start && cont->chan[i].start; - } - if (cont->nb_teams >= 2 && (start || cont->nb_teams >= nb_teams)) - { - if (cont->nb_teams < nb_teams) - { - /* - * OK, all the players have pressed the "start" button and there - * are at least 2 playing teams -> we start the game! - */ - nb_teams = cont->nb_teams; - log_print_str ("Starting game with only "); - log_print_int (cont->nb_teams); - log_println_str (" teams"); - } - free_teams = 0; - } - - /* - * The official start signal is: free_teams is set to 0. - * We use an extra flag "started" in case free_teams would - * be recalculated - */ - if (free_teams <= 0) - { - free_teams = 0; - started = 1; - } - - - /* - * We replicate chat messages - */ - while (lw_chat_pop (&chat, &chat_mess)) - { - for (i = 0; i < cont->nb_chans; ++i) - { - lw_chat_push (&(cont->chan[i].chat), - chat_mess.author, chat_mess.content); - } - } - - /* - * now we send feedback to all the connected teams - */ - prepare_team_start_info (team_start_info, cont); - /* - * loop with a step of -1 to handle correcty the - * possible disconnection of players - */ - for (i = cont->nb_chans - 1; i >= 0; --i) - { - if (!lw_srvchan_keepalive (&(cont->chan[i]), - free_teams, team_start_info, &chat)) - { - /* - * There's an error with this client, so - * we're simply going to disconnect it... - */ - disconnect_client (cont, i, "keepalive failed"); - - display_waiting_for = 1; - } - } - recalc_nb_teams (cont); - - www_data->busy_players = cont->nb_teams; - www_data->max_players = nb_teams; - - /* - * We register the server again since the number of - * connected teams might have changed - */ - cur_time = lw_srvtime_seconds (); - if (cur_time - last_time > LW_SRVCONT_REGISTER_DELAY - || display_waiting_for) - { - www_data->log = 0; - lw_wwwsrv_register (www_data); - last_time = cur_time; - } - } + if (display_waiting_for) + { + log_print_str ("Waiting for "); + log_print_int (free_teams); + if (free_teams > 1) + { + log_print_str (" teams..."); + } + else + { + log_print_str (" team..."); + } + log_println (); + + display_waiting_for = 0; + } + + if (lw_srvchan_wait_teams (&(cont->chan[cont->nb_chans]), + &free_teams, + cont->sock, + &(cont->chan[cont->nb_chans].map), + &(cont->chan[cont->nb_chans].config), + password)) + { + if (cont->nb_teams == 0) + { + /* + * OK, this guy is the first one to connect on + * the server, so we'll fire the "callback" script/program + */ + if (callback && strlen (callback)) + { + log_print_str ("Executing \""); + log_print_str (callback); + log_println_str ("\""); + lw_exec_cmd (callback); + } + } + cont->nb_teams = nb_teams - free_teams; + ++(cont->nb_chans); + display_waiting_for = 1; + } + + /* + * Now we check if me must force a game start + */ + start = 1; + for (i = 0; i < cont->nb_chans; ++i) + { + start = start && cont->chan[i].start; + } + if (cont->nb_teams >= 2 && (start || cont->nb_teams >= nb_teams)) + { + if (cont->nb_teams < nb_teams) + { + /* + * OK, all the players have pressed the "start" button and there + * are at least 2 playing teams -> we start the game! + */ + nb_teams = cont->nb_teams; + log_print_str ("Starting game with only "); + log_print_int (cont->nb_teams); + log_println_str (" teams"); + } + free_teams = 0; + } + + /* + * The official start signal is: free_teams is set to 0. + * We use an extra flag "started" in case free_teams would + * be recalculated + */ + if (free_teams <= 0) + { + free_teams = 0; + started = 1; + } + + + /* + * We replicate chat messages + */ + while (lw_chat_pop (&chat, &chat_mess)) + { + for (i = 0; i < cont->nb_chans; ++i) + { + lw_chat_push (&(cont->chan[i].chat), + chat_mess.author, chat_mess.content); + } + } + + /* + * now we send feedback to all the connected teams + */ + prepare_team_start_info (team_start_info, cont); + /* + * loop with a step of -1 to handle correcty the + * possible disconnection of players + */ + for (i = cont->nb_chans - 1; i >= 0; --i) + { + if (!lw_srvchan_keepalive (&(cont->chan[i]), + free_teams, team_start_info, &chat)) + { + /* + * There's an error with this client, so + * we're simply going to disconnect it... + */ + disconnect_client (cont, i, "keepalive failed"); + + display_waiting_for = 1; + } + } + recalc_nb_teams (cont); + + www_data->busy_players = cont->nb_teams; + www_data->max_players = nb_teams; + + /* + * We register the server again since the number of + * connected teams might have changed + */ + cur_time = lw_srvtime_seconds (); + if (cur_time - last_time > LW_SRVCONT_REGISTER_DELAY + || display_waiting_for) + { + www_data->log = 0; + lw_wwwsrv_register (www_data); + last_time = cur_time; + } + } /* * For now the server is a "blocking" server which is never statisfied @@ -545,26 +546,26 @@ { result = 1; for (i = cont->nb_chans - 1; i >= 0; --i) - { - if (!lw_srvchan_tell_who (&(cont->chan[i]), - cont->chan[0].map, - &(cont->chan[0].config))) - { - /* - * There's been an error exchanging data with this team - * so we decide to "close" it. - */ - disconnect_client (cont, i, "can't send game info"); - } - } + { + if (!lw_srvchan_tell_who (&(cont->chan[i]), + cont->chan[0].map, + &(cont->chan[0].config))) + { + /* + * There's been an error exchanging data with this team + * so we decide to "close" it. + */ + disconnect_client (cont, i, "can't send game info"); + } + } /* * We start the game only if there are more than 1 channels opened... */ if (cont->nb_chans > 0) - { - result = 1; - } + { + result = 1; + } } return result; @@ -584,9 +585,9 @@ for (i = cont->nb_chans - 1; i >= 0; --i) { if (!lw_srvchan_final_ok (&(cont->chan[i]))) - { - disconnect_client (cont, i, "can't send final ok"); - } + { + disconnect_client (cont, i, "can't send final ok"); + } } /* @@ -631,17 +632,17 @@ for (j = 0; j < lag && result; ++j) { for (i = cont->nb_chans - 1; i >= 0; --i) - { - /* - * We put the checksum to 1, to inform the clients that - * everything is OK - */ - cont->chan[i].checksum_send = 1; - if (!lw_srvchan_send_keys (&(cont->chan[i]), &netkey)) - { - disconnect_client (cont, i, "error sending lag keys"); - } - } + { + /* + * We put the checksum to 1, to inform the clients that + * everything is OK + */ + cont->chan[i].checksum_send = 1; + if (!lw_srvchan_send_keys (&(cont->chan[i]), &netkey)) + { + disconnect_client (cont, i, "error sending lag keys"); + } + } } return result; @@ -667,37 +668,37 @@ * We do not check checksums if there's only 1 connected client. */ if (cont->nb_chans >= 2) - { - for (j = 0; j < cont->nb_chans; ++j) - { - if (cont->chan[i].checksum_recv != cont->chan[j].checksum_recv) - { - ok = 0; - nb_diff++; - } - } - - /* - * Now if this channel has a different checksum - * than everyone else, we consider there's an error - * on it. But if there's at least one channel that - * has the same checksum, we consider it's OK - * (for this channel only of course...) - */ - if (nb_diff >= cont->nb_chans - 1) - { - cont->chan[i].checksum_send = 0; - - log_print_str ("Checksum error on client \""); - log_print_str (cont->chan[i].ip); - log_print_str (":"); - log_print_int (cont->chan[i].port); - log_print_str ("\" ("); - log_print_int (cont->chan[i].checksum_recv); - log_print_str (")"); - log_println (); - } - } + { + for (j = 0; j < cont->nb_chans; ++j) + { + if (cont->chan[i].checksum_recv != cont->chan[j].checksum_recv) + { + ok = 0; + nb_diff++; + } + } + + /* + * Now if this channel has a different checksum + * than everyone else, we consider there's an error + * on it. But if there's at least one channel that + * has the same checksum, we consider it's OK + * (for this channel only of course...) + */ + if (nb_diff >= cont->nb_chans - 1) + { + cont->chan[i].checksum_send = 0; + + log_print_str ("Checksum error on client \""); + log_print_str (cont->chan[i].ip); + log_print_str (":"); + log_print_int (cont->chan[i].port); + log_print_str ("\" ("); + log_print_int (cont->chan[i].checksum_recv); + log_print_str (")"); + log_println (); + } + } } return ok; @@ -709,7 +710,7 @@ */ int lw_srvcont_replicate_keys (LW_SRVCONT * cont, - LW_WWWSRV_DATA * www_data, int lag, char *password) + LW_WWWSRV_DATA * www_data, int lag, char *password) { int result = 1; LW_NETKEY netkey; @@ -754,44 +755,44 @@ * First we get the informations from all the players */ for (i = cont->nb_chans - 1; i >= 0; --i) - { - if (lw_srvchan_recv_keys (&(cont->chan[i]), &netkey)) - { - /* - * if at least a client does not request a lag - * increase, then we don't do it - */ - if (netkey.cmd == LW_NETKEY_CMD_INCREASE_LAG) - { - a_client_requests_increase_lag = 1; - } - else - { - all_clients_request_increase_lag = 0; - } - - /* - * if at least a client does not request a lag - * decrease, then we don't do it - */ - if (netkey.cmd == LW_NETKEY_CMD_DECREASE_LAG) - { - a_client_requests_decrease_lag = 1; - } - else - { - all_clients_request_decrease_lag = 0; - } - } - else - { - /* - * There's been an error receiving data from this team - * so we decide to "close" it. - */ - disconnect_client (cont, i, "no more keys"); - } - } + { + if (lw_srvchan_recv_keys (&(cont->chan[i]), &netkey)) + { + /* + * if at least a client does not request a lag + * increase, then we don't do it + */ + if (netkey.cmd == LW_NETKEY_CMD_INCREASE_LAG) + { + a_client_requests_increase_lag = 1; + } + else + { + all_clients_request_increase_lag = 0; + } + + /* + * if at least a client does not request a lag + * decrease, then we don't do it + */ + if (netkey.cmd == LW_NETKEY_CMD_DECREASE_LAG) + { + a_client_requests_decrease_lag = 1; + } + else + { + all_clients_request_decrease_lag = 0; + } + } + else + { + /* + * There's been an error receiving data from this team + * so we decide to "close" it. + */ + disconnect_client (cont, i, "no more keys"); + } + } /* * we reset the cmd and arg fields @@ -808,40 +809,48 @@ * we use a counter system, so that all client must answer * "yes we want a lag increase" several times in a row * before we actually update the lag + * + * Note that test is formulated using 2 values and a + * logical and, this is just to get rid of warning + * complaining a_client_requests_increase_lag is unused */ - if (all_clients_request_increase_lag) - { - increase_lag_counter++; - } + if (all_clients_request_increase_lag && a_client_requests_increase_lag) + { + increase_lag_counter++; + } else - { - increase_lag_counter = 0; - } + { + increase_lag_counter = 0; + } /* * we use a counter system, so that all client must answer * "yes we want a lag decrease" several times in a row * before we actually update the lag + * + * Note that test is formulated using 2 values and a + * logical or, this is just to get rid of warning + * complaining all_client_requests_decrease_lag is unused */ - if (a_client_requests_decrease_lag) - { - decrease_lag_counter++; - } + if (a_client_requests_decrease_lag || all_clients_request_decrease_lag) + { + decrease_lag_counter++; + } else - { - decrease_lag_counter = 0; - } + { + decrease_lag_counter = 0; + } /* * If we need to increase the lag, we send blank key presses */ if (increase_lag_counter >= LW_SRVCONT_INCREASE_LAG_LIMIT - && lag_key_presses_to_send == 0) - { - increase_lag_counter = 0; - lag++; - lag_key_presses_to_send++; - } + && lag_key_presses_to_send == 0) + { + increase_lag_counter = 0; + lag++; + lag_key_presses_to_send++; + } /* @@ -850,52 +859,52 @@ */ skip_keys = 0; if (decrease_lag_counter >= LW_SRVCONT_DECREASE_LAG_LIMIT) - { - decrease_lag_counter = 0; - lag--; - if (lag_key_presses_to_send > 0) - { - /* - * We cancel the planified lag keys - */ - lag_key_presses_to_send--; - } - else - { - /* - * No lag keys planned, we skip the current keys - */ - skip_keys = 1; - } - } + { + decrease_lag_counter = 0; + lag--; + if (lag_key_presses_to_send > 0) + { + /* + * We cancel the planified lag keys + */ + lag_key_presses_to_send--; + } + else + { + /* + * No lag keys planned, we skip the current keys + */ + skip_keys = 1; + } + } if (!skip_keys) - { - /* - * Now we send the information to all the players - */ - for (i = cont->nb_chans - 1; i >= 0; --i) - { - if (!lw_srvchan_send_keys (&(cont->chan[i]), &netkey)) - { - /* - * There's been an error receiving data from this team - * so we decide to "close" it. - */ - disconnect_client (cont, i, "error sending keys"); - } - } - } + { + /* + * Now we send the information to all the players + */ + for (i = cont->nb_chans - 1; i >= 0; --i) + { + if (!lw_srvchan_send_keys (&(cont->chan[i]), &netkey)) + { + /* + * There's been an error receiving data from this team + * so we decide to "close" it. + */ + disconnect_client (cont, i, "error sending keys"); + } + } + } /* * We send the lag key presses 1 by 1. This is a way * to synchronize correctly at the beginning of a game. */ if (lag_key_presses_to_send > 0) - { - lag_key_presses_to_send--; - send_lag_key_presses (cont, 1); - } + { + lag_key_presses_to_send--; + send_lag_key_presses (cont, 1); + } rounds++; last_rounds++; @@ -905,35 +914,35 @@ elapsed = end - start; if (((int) elapsed) > LW_SRVCONT_DISPLAY_STATE_DELAY) - { - if (rounds <= 0) - { - rounds = 1; - } - if (last_rounds <= 0) - { - last_rounds = 1; - } - - log_print_int (rounds); - log_print_str (" rounds, "); - log_print_int (last_rounds / ((int) elapsed)); - log_print_str (" rounds/sec, average lag is "); - log_print_int (average_lag / last_rounds); - log_println (); - - start = end; - last_rounds = 0; - average_lag = 0; - } + { + if (rounds <= 0) + { + rounds = 1; + } + if (last_rounds <= 0) + { + last_rounds = 1; + } + + log_print_int (rounds); + log_print_str (" rounds, "); + log_print_int (last_rounds / ((int) elapsed)); + log_print_str (" rounds/sec, average lag is "); + log_print_int (average_lag / last_rounds); + log_println (); + + start = end; + last_rounds = 0; + average_lag = 0; + } if (end - start2 > LW_SRVCONT_REGISTER_DELAY) - { - start2 += LW_SRVCONT_REGISTER_DELAY; + { + start2 += LW_SRVCONT_REGISTER_DELAY; - www_data->log = 0; - lw_wwwsrv_register (www_data); - } + www_data->log = 0; + lw_wwwsrv_register (www_data); + } } return result; @@ -990,23 +999,23 @@ data.password[PASSWORD_SIZE] = '\0'; if (lw_sock_accept (&(data.sock), data.ip, &(data.port), cont->sock, 0)) - { - thread_running = 1; - result = - lw_thread_start (reject_new_clients_callback, (void *) &data); - if (!result) - { - lw_sock_close (&(data.sock)); - thread_running = 0; - } - } + { + thread_running = 1; + result = + lw_thread_start (reject_new_clients_callback, (void *) &data); + if (!result) + { + lw_sock_close (&(data.sock)); + thread_running = 0; + } + } else - { - /* - * privacy is set to 0, we do not tell anyone about this server - */ - result = 1; - } + { + /* + * privacy is set to 0, we do not tell anyone about this server + */ + result = 1; + } } else { @@ -1046,70 +1055,70 @@ log_flush (); while ((!free_received) && ret_mess && - ((ret = lw_sock_recv_str (&(data.sock), message)) >= 0)) + ((ret = lw_sock_recv_str (&(data.sock), message)) >= 0)) { if (ret > 0) - { - mess = lw_netmess_read (message); - if (mess != NULL) - { - /* - * switch to handle the different possible messages - */ - switch (mess->code) - { - case LW_NETMESS_CODE_PING: - ret_mess = lw_srvchan_handle_ping (data.sock, mess); - break; - case LW_NETMESS_CODE_ECHO: - ret_mess = lw_srvchan_handle_echo (data.sock, mess); - break; - case LW_NETMESS_CODE_PROGRAM: - ret_mess = - lw_srvchan_handle_program (data.sock, mess, &program); - break; - case LW_NETMESS_CODE_VERSION: - ret_mess = - lw_srvchan_handle_version (data.sock, mess, &version); - break; - case LW_NETMESS_CODE_PASSWORD: - ret_mess = - lw_srvchan_handle_password (data.sock, mess, &password, - data.password); - break; - case LW_NETMESS_CODE_FREE: - ret_mess = - lw_srvchan_handle_free (data.sock, mess, 0, - &free_received); - break; - case LW_NETMESS_CODE_QUIT: - ret_mess = - lw_srvchan_handle_quit (data.sock, mess, &normal_quit); - break; - default: - ret_mess = lw_srvchan_handle_unknown (data.sock, mess); - break; - } - - /* - * lw_netmess_free must *not* be forgetted - */ - lw_netmess_free (mess); - - if (!ret_mess) - { - log_print_str ("Error processing \""); - log_print_str (message); - log_print_str ("\""); - log_println (); - } - } - else - { - log_println_str ("Serious memory problem 8-("); - ret_mess = 0; - } - } + { + mess = lw_netmess_read (message); + if (mess != NULL) + { + /* + * switch to handle the different possible messages + */ + switch (mess->code) + { + case LW_NETMESS_CODE_PING: + ret_mess = lw_srvchan_handle_ping (data.sock, mess); + break; + case LW_NETMESS_CODE_ECHO: + ret_mess = lw_srvchan_handle_echo (data.sock, mess); + break; + case LW_NETMESS_CODE_PROGRAM: + ret_mess = + lw_srvchan_handle_program (data.sock, mess, &program); + break; + case LW_NETMESS_CODE_VERSION: + ret_mess = + lw_srvchan_handle_version (data.sock, mess, &version); + break; + case LW_NETMESS_CODE_PASSWORD: + ret_mess = + lw_srvchan_handle_password (data.sock, mess, &password, + data.password); + break; + case LW_NETMESS_CODE_FREE: + ret_mess = + lw_srvchan_handle_free (data.sock, mess, 0, + &free_received); + break; + case LW_NETMESS_CODE_QUIT: + ret_mess = + lw_srvchan_handle_quit (data.sock, mess, &normal_quit); + break; + default: + ret_mess = lw_srvchan_handle_unknown (data.sock, mess); + break; + } + + /* + * lw_netmess_free must *not* be forgetted + */ + lw_netmess_free (mess); + + if (!ret_mess) + { + log_print_str ("Error processing \""); + log_print_str (message); + log_print_str ("\""); + log_println (); + } + } + else + { + log_println_str ("Serious memory problem 8-("); + ret_mess = 0; + } + } } log_print_str ("Refusing \""); diff -Nru liquidwar-5.6.4/src/srvcont.h liquidwar-5.6.5/src/srvcont.h --- liquidwar-5.6.4/src/srvcont.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvcont.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -78,14 +78,14 @@ /*==================================================================*/ int lw_srvcont_wait_teams (LW_SRVCONT * cont, - LW_WWWSRV_DATA * www_data, - int nb_teams, int port, - char *password, char *callback); + LW_WWWSRV_DATA * www_data, + int nb_teams, int port, + char *password, char *callback); int lw_srvcont_tell_who (LW_SRVCONT * cont); int lw_srvcont_final_ok (LW_SRVCONT * cont); int lw_srvcont_replicate_keys (LW_SRVCONT * cont, - LW_WWWSRV_DATA * www_data, - int lag, char *password); + LW_WWWSRV_DATA * www_data, + int lag, char *password); void lw_srvcont_close (LW_SRVCONT * cont); #endif diff -Nru liquidwar-5.6.4/src/srvteam.c liquidwar-5.6.5/src/srvteam.c --- liquidwar-5.6.4/src/srvteam.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvteam.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/srvteam.h liquidwar-5.6.5/src/srvteam.h --- liquidwar-5.6.4/src/srvteam.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvteam.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/srvtime.c liquidwar-5.6.5/src/srvtime.c --- liquidwar-5.6.4/src/srvtime.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvtime.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/srvtime.h liquidwar-5.6.5/src/srvtime.h --- liquidwar-5.6.4/src/srvtime.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/srvtime.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/startinf.c liquidwar-5.6.5/src/startinf.c --- liquidwar-5.6.4/src/startinf.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/startinf.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/startinf.h liquidwar-5.6.5/src/startinf.h --- liquidwar-5.6.4/src/startinf.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/startinf.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/startup.c liquidwar-5.6.5/src/startup.c --- liquidwar-5.6.4/src/startup.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/startup.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -117,14 +117,30 @@ int STARTUP_TOMBOLA = 0; #ifdef UNIX +#ifdef ALLEGRO_MACOSX +/* + * We test with ALLEGRO_MACOSX and no custom OSX define + * for this is still a variant of the UNIX port, only + * some paths differ (because of the .app bundle layout) + */ static char *DEFAULT_CFG_PATH = CONFIG_UNIX_CFG; static char *DEFAULT_LOG_PATH = ""; +static char *DEFAULT_SRV_PATH = "./liquidwar-server"; +static char *DEFAULT_GEN_PATH = "./liquidwar-mapgen"; +static char *DEFAULT_DAT_PATH = "../Resources/data/liquidwar.dat"; +static char *DEFAULT_MAP_PATH = "../Resources/custom/map/"; +static char *DEFAULT_TEX_PATH = "../Resources/custom/texture/"; +static char *DEFAULT_MID_PATH = "../Resources/custom/music/"; +#else +static char *DEFAULT_CFG_PATH = CONFIG_UNIX_CFG; +static char *DEFAULT_LOG_PATH = ""; +static char *DEFAULT_SRV_PATH = CONFIG_UNIX_SRV; +static char *DEFAULT_GEN_PATH = CONFIG_UNIX_GEN; static char *DEFAULT_DAT_PATH = CONFIG_UNIX_DAT; static char *DEFAULT_MAP_PATH = CONFIG_UNIX_MAP; static char *DEFAULT_TEX_PATH = CONFIG_UNIX_TEX; static char *DEFAULT_MID_PATH = CONFIG_UNIX_MID; -static char *DEFAULT_SRV_PATH = CONFIG_UNIX_SRV; -static char *DEFAULT_GEN_PATH = CONFIG_UNIX_GEN; +#endif #else #ifdef WIN32 static char *DEFAULT_CFG_PATH = "data/lwwin.cfg"; @@ -171,9 +187,9 @@ { bigd = get_argument_int (IDENT_MEM); if (bigd < 1) - bigd = 1; + bigd = 1; if (bigd > LW_STARTUP_MEM_MAX) - bigd = LW_STARTUP_MEM_MAX; + bigd = LW_STARTUP_MEM_MAX; STARTUP_BIG_DATA = bigd; } } @@ -292,9 +308,9 @@ { c = path[l - 1]; if (c == '/' || c == '\\') - { - path[--l] = 0; - } + { + path[--l] = 0; + } } fix_filename_case (path); @@ -325,20 +341,20 @@ #ifdef UNIX home_env = getenv ("HOME"); if (home_env != NULL) - { - LW_MACRO_SPRINTF1 (home_path, "%s/", home_env); - } + { + LW_MACRO_SPRINTF1 (home_path, "%s/", home_env); + } else - { - home_env = ""; - LW_MACRO_STRCPY (home_path, home_env); - } + { + home_env = ""; + LW_MACRO_STRCPY (home_path, home_env); + } #else home_env = ""; LW_MACRO_STRCPY (home_path, home_env); #endif LW_MACRO_SPRINTF2 (STARTUP_CFG_PATH, "%s%s", home_path, - DEFAULT_CFG_PATH); + DEFAULT_CFG_PATH); } LW_MACRO_STRCPY (STARTUP_LOG_PATH, DEFAULT_LOG_PATH); @@ -413,7 +429,7 @@ if (exist_argument_value (IDENT_METASERVER)) { LW_MACRO_STRCPY (STARTUP_METASERVER, - get_argument_str (IDENT_METASERVER)); + get_argument_str (IDENT_METASERVER)); } else { diff -Nru liquidwar-5.6.4/src/startup.h liquidwar-5.6.5/src/startup.h --- liquidwar-5.6.4/src/startup.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/startup.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/team.c liquidwar-5.6.5/src/team.c --- liquidwar-5.6.4/src/team.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/team.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -229,9 +229,9 @@ for (i = 0; i < NB_TEAMS; ++i) { if (CONFIG_TEAM_COLOR[i] == color) - { - CONFIG_TEAM_COLOR[n = i] = replacement_color; - } + { + CONFIG_TEAM_COLOR[n = i] = replacement_color; + } } return n; @@ -421,67 +421,67 @@ { choix = my_do_dialog_no_clear (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - default: - button_team = (choix - 4) / 20; - button_type = (choix - 4) % 20; - switch (button_type) - { - case 15: - switch (CONFIG_CONTROL_TYPE[button_team]) - { - case CONFIG_CONTROL_TYPE_OFF: - CONFIG_CONTROL_TYPE[button_team] = - CONFIG_CONTROL_TYPE_HUMAN; - break; - case CONFIG_CONTROL_TYPE_HUMAN: - CONFIG_CONTROL_TYPE[button_team] = CONFIG_CONTROL_TYPE_CPU; - break; - default: - CONFIG_CONTROL_TYPE[button_team] = CONFIG_CONTROL_TYPE_OFF; - } - redraw_team_box (d + 4 + 20 * button_team, button_team); - break; - case 16: - change_key (d + choix, &CONFIG_KEY_UP[button_team]); - break; - case 17: - change_key (d + choix, &CONFIG_KEY_LEFT[button_team]); - break; - case 18: - change_key (d + choix, &CONFIG_KEY_RIGHT[button_team]); - break; - case 19: - change_key (d + choix, &CONFIG_KEY_DOWN[button_team]); - break; - default: - if (button_type >= 2 && button_type < 14) - { - i = suppress_conflicting_color - (button_type - 2, CONFIG_TEAM_COLOR[button_team]); - if (i >= 0) - redraw_team_box (d + 4 + 20 * i, i); - CONFIG_TEAM_COLOR[button_team] = button_type - 2; - redraw_team_box (d + 4 + 20 * button_team, button_team); - } - } - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + default: + button_team = (choix - 4) / 20; + button_type = (choix - 4) % 20; + switch (button_type) + { + case 15: + switch (CONFIG_CONTROL_TYPE[button_team]) + { + case CONFIG_CONTROL_TYPE_OFF: + CONFIG_CONTROL_TYPE[button_team] = + CONFIG_CONTROL_TYPE_HUMAN; + break; + case CONFIG_CONTROL_TYPE_HUMAN: + CONFIG_CONTROL_TYPE[button_team] = CONFIG_CONTROL_TYPE_CPU; + break; + default: + CONFIG_CONTROL_TYPE[button_team] = CONFIG_CONTROL_TYPE_OFF; + } + redraw_team_box (d + 4 + 20 * button_team, button_team); + break; + case 16: + change_key (d + choix, &CONFIG_KEY_UP[button_team]); + break; + case 17: + change_key (d + choix, &CONFIG_KEY_LEFT[button_team]); + break; + case 18: + change_key (d + choix, &CONFIG_KEY_RIGHT[button_team]); + break; + case 19: + change_key (d + choix, &CONFIG_KEY_DOWN[button_team]); + break; + default: + if (button_type >= 2 && button_type < 14) + { + i = suppress_conflicting_color + (button_type - 2, CONFIG_TEAM_COLOR[button_team]); + if (i >= 0) + redraw_team_box (d + 4 + 20 * i, i); + CONFIG_TEAM_COLOR[button_team] = button_type - 2; + redraw_team_box (d + 4 + 20 * button_team, button_team); + } + } + } } cleanup_player_names (); diff -Nru liquidwar-5.6.4/src/team.h liquidwar-5.6.5/src/team.h --- liquidwar-5.6.4/src/team.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/team.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/texture.c liquidwar-5.6.5/src/texture.c --- liquidwar-5.6.4/src/texture.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/texture.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -115,9 +115,9 @@ for (y = 0; y < bmp->h && n < max_number; ++y) for (x = 0; x < bmp->w && n < max_number; ++x) { - color = pal[getpixel (bmp, x, y)]; - if (!exist_color (pal2, color)) - pal2[n++] = color; + color = pal[getpixel (bmp, x, y)]; + if (!exist_color (pal2, color)) + pal2[n++] = color; } return n; } @@ -125,8 +125,8 @@ /*-----------------------------------------------------------------*/ static void create_new_palette (PALETTE dst, - PALETTE src, - BITMAP * bmp, int first_color, int number_of_colors) + PALETTE src, + BITMAP * bmp, int first_color, int number_of_colors) { int i, x, y, index; int nb_retries = 0; @@ -146,15 +146,15 @@ index = getpixel (bmp, x, y); color = src[index]; if ((!exist_color (dst, color)) || - (nb_retries > LW_TEXTURE_RANDOM_MAX_RETRIES)) - { - dst[first_color + (i++)] = color; - nb_retries = 0; - } + (nb_retries > LW_TEXTURE_RANDOM_MAX_RETRIES)) + { + dst[first_color + (i++)] = color; + nb_retries = 0; + } else - { - nb_retries++; - } + { + nb_retries++; + } } } @@ -181,8 +181,8 @@ /*-----------------------------------------------------------------*/ static void create_converted_bitmap (BITMAP * bmp, - PALETTE dst, - PALETTE src, int first_color, int number_of_colors) + PALETTE dst, + PALETTE src, int first_color, int number_of_colors) { char corres[256]; int i, x, y, index; @@ -192,11 +192,11 @@ for (y = 0; y < bmp->h; ++y) for (x = 0; x < bmp->w; ++x) { - index = corres[getpixel (bmp, x, y)]; - index = (index < first_color || - index >= first_color + number_of_colors) ? - first_color : index; - putpixel (bmp, x, y, index); + index = corres[getpixel (bmp, x, y)]; + index = (index < first_color || + index >= first_color + number_of_colors) ? + first_color : index; + putpixel (bmp, x, y, index); } } @@ -220,7 +220,7 @@ /*------------------------------------------------------------------*/ static void texture_8to5 (BITMAP * bmp, PALETTE pal, void *result, - int first_color, int number_of_colors, char *filename) + int first_color, int number_of_colors, char *filename) { char *buffer; int pos = 0, pos8 = 0, x, y, i; @@ -253,25 +253,25 @@ for (y = 0; y < bmp->h; ++y) for (x = 0; x < bmp->w; ++x) { - coul = getpixel (bmp, x, y) - first_color; - toadd = 1 << pos8; - octet[0] |= (coul & 1) ? toadd : 0; - octet[1] |= (coul & 2) ? toadd : 0; - octet[2] |= (coul & 4) ? toadd : 0; - octet[3] |= (coul & 8) ? toadd : 0; - octet[4] |= (coul & 16) ? toadd : 0; - - if (pos8 == 7 || (y == bmp->h - 1 && x == bmp->w - 1)) - { - for (i = 0; i < 5; ++i) - { - buffer[pos++] = octet[i]; - octet[i] = 0; - } - pos8 = 0; - } - else - pos8++; + coul = getpixel (bmp, x, y) - first_color; + toadd = 1 << pos8; + octet[0] |= (coul & 1) ? toadd : 0; + octet[1] |= (coul & 2) ? toadd : 0; + octet[2] |= (coul & 4) ? toadd : 0; + octet[3] |= (coul & 8) ? toadd : 0; + octet[4] |= (coul & 16) ? toadd : 0; + + if (pos8 == 7 || (y == bmp->h - 1 && x == bmp->w - 1)) + { + for (i = 0; i < 5; ++i) + { + buffer[pos++] = octet[i]; + octet[i] = 0; + } + pos8 = 0; + } + else + pos8++; } } @@ -283,6 +283,7 @@ BITMAP *bmp; PALETTE pal; char *result = NULL, *temp = NULL; + char *f = (char *) filename; bmp = load_bitmap (filename, pal); if (bmp) @@ -290,30 +291,29 @@ w = bmp->w; h = bmp->h; if (w > 0 && h > 0) - { - temp = malloc (size = - 2 * sizeof (short) - + LW_TEXTURE_SYSTEM_NAME_SIZE - + 3 * TEXTURE_COLOR_NUMBER + ((w * h + 7) / 8) * 5); - if (temp) - { - red8col (bmp, pal, 0, TEXTURE_COLOR_NUMBER); - texture_8to5 (bmp, pal, temp, 0, TEXTURE_COLOR_NUMBER, - (char *) filename); - } - } + { + temp = malloc (size = + 2 * sizeof (short) + + LW_TEXTURE_SYSTEM_NAME_SIZE + + 3 * TEXTURE_COLOR_NUMBER + ((w * h + 7) / 8) * 5); + if (temp) + { + red8col (bmp, pal, 0, TEXTURE_COLOR_NUMBER); + texture_8to5 (bmp, pal, temp, 0, TEXTURE_COLOR_NUMBER, f); + } + } destroy_bitmap (bmp); } if (temp) { result = malloc (size); if (result) - { - for (i = 0; i < size; ++i) - { - result[i] = temp[i]; - } - } + { + for (i = 0; i < size; ++i) + { + result[i] = temp[i]; + } + } free (temp); } @@ -337,21 +337,21 @@ if (result) for (y = 0; y < h; ++y) for (x = 0; x < w; ++x) - { - totest = 1 << pos8; - color = first + ((data[0] & totest) ? 1 : 0) - + ((data[1] & totest) ? 2 : 0) - + ((data[2] & totest) ? 4 : 0) - + ((data[3] & totest) ? 8 : 0) + ((data[4] & totest) ? 16 : 0); - putpixel (result, x, y, color); - if (pos8 == 7) - { - data += 5; - pos8 = 0; - } - else - pos8++; - } + { + totest = 1 << pos8; + color = first + ((data[0] & totest) ? 1 : 0) + + ((data[1] & totest) ? 2 : 0) + + ((data[2] & totest) ? 4 : 0) + + ((data[3] & totest) ? 8 : 0) + ((data[4] & totest) ? 16 : 0); + putpixel (result, x, y, color); + if (pos8 == 7) + { + data += 5; + pos8 = 0; + } + else + pos8++; + } return result; } diff -Nru liquidwar-5.6.4/src/texture.h liquidwar-5.6.5/src/texture.h --- liquidwar-5.6.4/src/texture.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/texture.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/thrddos.c liquidwar-5.6.5/src/thrddos.c --- liquidwar-5.6.4/src/thrddos.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/thrddos.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/thrdgen.h liquidwar-5.6.5/src/thrdgen.h --- liquidwar-5.6.4/src/thrdgen.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/thrdgen.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/thrdunix.c liquidwar-5.6.5/src/thrdunix.c --- liquidwar-5.6.4/src/thrdunix.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/thrdunix.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -84,9 +84,9 @@ if (pthread_create (&thread, NULL, (void *(*)(void *)) func, args) == 0) { if (pthread_detach (thread) == 0) - { - result = 1; - } + { + result = 1; + } } return result; diff -Nru liquidwar-5.6.4/src/thrdw32.c liquidwar-5.6.5/src/thrdw32.c --- liquidwar-5.6.4/src/thrdw32.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/thrdw32.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/ticker.c liquidwar-5.6.5/src/ticker.c --- liquidwar-5.6.4/src/ticker.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/ticker.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/ticker.h liquidwar-5.6.5/src/ticker.h --- liquidwar-5.6.4/src/ticker.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/ticker.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/time.c liquidwar-5.6.5/src/time.c --- liquidwar-5.6.4/src/time.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/time.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -72,6 +72,7 @@ 600, 900, 1200, 1800, 3600 }; + static int TICKER_PAUSED; static int TICKER_START; static int TICKER_PAUSE_START; @@ -94,17 +95,17 @@ if (PAUSE_ON) { if (TICKER_PAUSE_START == 0) - TICKER_PAUSE_START = get_ticker (); + TICKER_PAUSE_START = get_ticker (); } else { if (TICKER_PAUSE_START != 0) - { - TICKER_PAUSED += get_ticker () - TICKER_PAUSE_START; - TICKER_PAUSE_START = 0; - } + { + TICKER_PAUSED += get_ticker () - TICKER_PAUSE_START; + TICKER_PAUSE_START = 0; + } else - TIME_ELAPSED = (get_ticker () - TICKER_START - TICKER_PAUSED) / 1000; + TIME_ELAPSED = (get_ticker () - TICKER_START - TICKER_PAUSED) / 1000; } TIME_LEFT = TIME_TABLE[LW_CONFIG_CURRENT_RULES.game_time] - TIME_ELAPSED; diff -Nru liquidwar-5.6.4/src/time.h liquidwar-5.6.5/src/time.h --- liquidwar-5.6.4/src/time.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/time.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/viewport.c liquidwar-5.6.5/src/viewport.c --- liquidwar-5.6.4/src/viewport.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/viewport.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -87,8 +87,8 @@ rect_for_viewport (void) { rect (screen, VIEWPORT_X - 1, VIEWPORT_Y - 1 + PAGE_FLIP_H, - VIEWPORT_X + VIEWPORT_W, - VIEWPORT_Y + VIEWPORT_H + PAGE_FLIP_H, MENU_FG); + VIEWPORT_X + VIEWPORT_W, + VIEWPORT_Y + VIEWPORT_H + PAGE_FLIP_H, MENU_FG); } /*------------------------------------------------------------------*/ @@ -112,17 +112,17 @@ if (CONFIG_VIEWPORT_SIZE > 0 && CONFIG_VIEWPORT_SIZE < 8) { if (scale_w * CURRENT_AREA_H < scale_h * CURRENT_AREA_W) - { - VIEWPORT_W = (scale_w * (viewport_sizes[CONFIG_VIEWPORT_SIZE - 1])) - / viewport_sizes[6]; - VIEWPORT_H = (VIEWPORT_W * CURRENT_AREA_H) / CURRENT_AREA_W; - } + { + VIEWPORT_W = (scale_w * (viewport_sizes[CONFIG_VIEWPORT_SIZE - 1])) + / viewport_sizes[6]; + VIEWPORT_H = (VIEWPORT_W * CURRENT_AREA_H) / CURRENT_AREA_W; + } else - { - VIEWPORT_H = (scale_h * (viewport_sizes[CONFIG_VIEWPORT_SIZE - 1])) - / viewport_sizes[6]; - VIEWPORT_W = (VIEWPORT_H * CURRENT_AREA_W) / CURRENT_AREA_H; - } + { + VIEWPORT_H = (scale_h * (viewport_sizes[CONFIG_VIEWPORT_SIZE - 1])) + / viewport_sizes[6]; + VIEWPORT_W = (VIEWPORT_H * CURRENT_AREA_W) / CURRENT_AREA_H; + } } if (CONFIG_VIEWPORT_SIZE <= 0) @@ -130,10 +130,10 @@ VIEWPORT_W = CURRENT_AREA_W; VIEWPORT_H = CURRENT_AREA_H; while (VIEWPORT_W > w || VIEWPORT_H > h) - { - VIEWPORT_W /= 2; - VIEWPORT_H /= 2; - } + { + VIEWPORT_W /= 2; + VIEWPORT_H /= 2; + } } else { @@ -158,9 +158,9 @@ if (CONFIG_PAGE_FLIP && VIRTUAL_H >= (2 * SCREEN_H)) { if (NEXT_SCREEN) - { - destroy_bitmap (NEXT_SCREEN); - } + { + destroy_bitmap (NEXT_SCREEN); + } lw_info_get_room_for_viewport (&x, &y, &w, &h); init_viewport_size (x, y, w, h); @@ -174,24 +174,24 @@ PAGE_FLIP_H = new_h; NEXT_SCREEN = create_sub_bitmap (screen, VIEWPORT_X, - VIEWPORT_Y + new_h, - VIEWPORT_W, VIEWPORT_H); + VIEWPORT_Y + new_h, + VIEWPORT_W, VIEWPORT_H); } else { PAGE_FLIP_H = 0; if (VIEWPORT_CHANGE_REGISTERED || !NEXT_SCREEN) - { - scroll_screen (0, 0); - set_clip_rect (screen, 0, 0, SCREEN_W - 1, SCREEN_H - 1); - - lw_info_get_room_for_viewport (&x, &y, &w, &h); - init_viewport_size (x, y, w, h); - - NEXT_SCREEN = create_sub_bitmap (screen, VIEWPORT_X, - VIEWPORT_Y, - VIEWPORT_W, VIEWPORT_H); - } + { + scroll_screen (0, 0); + set_clip_rect (screen, 0, 0, SCREEN_W - 1, SCREEN_H - 1); + + lw_info_get_room_for_viewport (&x, &y, &w, &h); + init_viewport_size (x, y, w, h); + + NEXT_SCREEN = create_sub_bitmap (screen, VIEWPORT_X, + VIEWPORT_Y, + VIEWPORT_W, VIEWPORT_H); + } } if (VIEWPORT_CHANGE_REGISTERED > 0) @@ -211,16 +211,16 @@ if (NEXT_SCREEN) { if (CONFIG_PAGE_FLIP && VIRTUAL_H >= (2 * SCREEN_H)) - { - set_clip_rect (screen, 0, 0, SCREEN_W - 1, SCREEN_H - 1); - if (!PAGE_FLIP_H) - { - blit (screen, screen, 0, SCREEN_H, 0, 0, SCREEN_W, SCREEN_H); - scroll_screen (0, 0); - } - else - PAGE_FLIP_H = 0; - } + { + set_clip_rect (screen, 0, 0, SCREEN_W - 1, SCREEN_H - 1); + if (!PAGE_FLIP_H) + { + blit (screen, screen, 0, SCREEN_H, 0, 0, SCREEN_W, SCREEN_H); + scroll_screen (0, 0); + } + else + PAGE_FLIP_H = 0; + } destroy_bitmap (NEXT_SCREEN); NEXT_SCREEN = NULL; diff -Nru liquidwar-5.6.4/src/viewport.h liquidwar-5.6.5/src/viewport.h --- liquidwar-5.6.4/src/viewport.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/viewport.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/volume.c liquidwar-5.6.5/src/volume.c --- liquidwar-5.6.4/src/volume.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/volume.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -121,27 +121,27 @@ { choix = my_do_dialog (d, choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + } } - CONFIG_WATER_VOLUME_MENU = WATER_VOLUME; // realign current volume + CONFIG_WATER_VOLUME_MENU = WATER_VOLUME; // realign current volume // and config volume if (retour > 0) retour--; diff -Nru liquidwar-5.6.4/src/volume.h liquidwar-5.6.5/src/volume.h --- liquidwar-5.6.4/src/volume.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/volume.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/watchdog.c liquidwar-5.6.5/src/watchdog.c --- liquidwar-5.6.4/src/watchdog.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/watchdog.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -93,7 +93,7 @@ if ((n = (WATCHDOG_KEYS_IN_BUFFER - WATCHDOG_MAX_WORD)) > WATCHDOG_MAX_WORD) { for (i = n; i < WATCHDOG_KEYS_IN_BUFFER; ++i) - WATCHDOG_BUFFER[i - n] = WATCHDOG_BUFFER[i]; + WATCHDOG_BUFFER[i - n] = WATCHDOG_BUFFER[i]; WATCHDOG_KEYS_IN_BUFFER -= n; old_pos -= n; } @@ -134,10 +134,10 @@ { j = 0; while (pattern[j] && - pattern[j] == ((char) WATCHDOG_BUFFER[i + j] & 0xFF)) - { - j++; - } + pattern[j] == ((char) WATCHDOG_BUFFER[i + j] & 0xFF)) + { + j++; + } found = !pattern[j]; } diff -Nru liquidwar-5.6.4/src/watchdog.h liquidwar-5.6.5/src/watchdog.h --- liquidwar-5.6.4/src/watchdog.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/watchdog.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/wave.c liquidwar-5.6.5/src/wave.c --- liquidwar-5.6.4/src/wave.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/wave.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -86,35 +86,35 @@ for (i = 0; i < 5; ++i) for (j = 0; j < 4; ++j) if (i > 0 || j > 0) - { - k = i * 4 + j + 3; - standard_small_button (d + k, j, i, 4, 5); - if (i > 0 && j > 0) - { - d[k].proc = my_slider_proc; - d[k].dp = NULL; - d[k].dp2 = slider_int; - switch (j) - { - case 1: - d[k].d1 = 16; - d[k].dp3 = &(CONFIG_WAVE_AMPLI[i - 1]); - break; - case 2: - d[k].d1 = 4; - d[k].dp3 = &(CONFIG_WAVE_NUMBER[i - 1]); - break; - case 3: - d[k].d1 = 16; - d[k].dp3 = &(CONFIG_WAVE_SPEED[i - 1]); - break; - } - temp = d[k].dp3; - d[k].d2 = *temp; - } - else - d[k].proc = my_textbox_proc; - } + { + k = i * 4 + j + 3; + standard_small_button (d + k, j, i, 4, 5); + if (i > 0 && j > 0) + { + d[k].proc = my_slider_proc; + d[k].dp = NULL; + d[k].dp2 = slider_int; + switch (j) + { + case 1: + d[k].d1 = 16; + d[k].dp3 = &(CONFIG_WAVE_AMPLI[i - 1]); + break; + case 2: + d[k].d1 = 4; + d[k].dp3 = &(CONFIG_WAVE_NUMBER[i - 1]); + break; + case 3: + d[k].d1 = 16; + d[k].dp3 = &(CONFIG_WAVE_SPEED[i - 1]); + break; + } + temp = d[k].dp3; + d[k].d2 = *temp; + } + else + d[k].proc = my_textbox_proc; + } d[23].proc = NULL; quick_buttons (d); @@ -131,28 +131,28 @@ { dp = my_init_dialog (d, choix); while (my_update_dialog (dp)) - ; + ; choix = shutdown_dialog (dp); //choix=my_do_dialog (d,choix); switch (choix) - { - case -1: - case MENU_QUICK_BACK: - retour = 1; - break; - case MENU_QUICK_MAIN: - retour = MENU_TOP; - break; - case MENU_QUICK_QUIT: - if (confirm_quit ()) - retour = MENU_EXIT; - else - display_back_image (); - break; - case MENU_QUICK_PLAY: - retour = MENU_PLAY; - break; - } + { + case -1: + case MENU_QUICK_BACK: + retour = 1; + break; + case MENU_QUICK_MAIN: + retour = MENU_TOP; + break; + case MENU_QUICK_QUIT: + if (confirm_quit ()) + retour = MENU_EXIT; + else + display_back_image (); + break; + case MENU_QUICK_PLAY: + retour = MENU_PLAY; + break; + } } if (retour > 0) diff -Nru liquidwar-5.6.4/src/wave.h liquidwar-5.6.5/src/wave.h --- liquidwar-5.6.4/src/wave.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/wave.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/wwwcli.c liquidwar-5.6.5/src/wwwcli.c --- liquidwar-5.6.4/src/wwwcli.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/wwwcli.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -71,7 +71,7 @@ #define LW_WWWCLI_HTTP_CONTENT_SIZE 100000 #define LW_WWWCLI_HTTP_URL_SIZE (URL_SIZE + 200) -#define LW_WWWCLI_URL_LIST "list.php3" +#define LW_WWWCLI_URL_LIST "list.txt.php" #define LW_WWWCLI_TEMP_BUFFER_SIZE 100 /* @@ -117,9 +117,9 @@ memset (&buffer_url, 0, sizeof (buffer_url)); LW_MACRO_SPRINTF3 (buffer_url, - "%s%s?protocol=%s&game=" LW_PROGRAM "&version=" - LW_VERSION, STARTUP_METASERVER, LW_WWWCLI_URL_LIST, - LW_SERVER_METASERVER_PROTOCOL); + "%s%s?protocol=%s&game=" LW_PROGRAM "&version=" + LW_VERSION, STARTUP_METASERVER, LW_WWWCLI_URL_LIST, + LW_SERVER_METASERVER_PROTOCOL); if (lw_httputil_get_page (buffer_content, buffer_url, sizeof (buffer_content))) @@ -129,45 +129,45 @@ while (read_eol (&pos)); while (i < (*size) && strlen (pos) > 0) - { - pos_tmp = pos; - if (read_eol_n (&pos_tmp, LW_WWWCLI_MIN_LINE_SIZE)) - { - /* - * This was just an empty or too short line... - */ - pos = pos_tmp; - } - else - { - /* - * We parse the line only if there's something on it... - */ - if (parse_line (buffer + i, &pos)) - { - if (buffer[i].busy_players < buffer[i].max_players) - { - /* - * we increment i only if there's some room left on the - * server. If it's full of people playing on it, it's - * of absolutely no use to present it as a working - * server... And not incrementing i will make it be - * overwritten by the next server. - */ - ++i; - log_print_str ("+"); - } - else - { - log_print_str ("="); - } - } - else - { - log_print_str ("-"); - } - } - } + { + pos_tmp = pos; + if (read_eol_n (&pos_tmp, LW_WWWCLI_MIN_LINE_SIZE)) + { + /* + * This was just an empty or too short line... + */ + pos = pos_tmp; + } + else + { + /* + * We parse the line only if there's something on it... + */ + if (parse_line (buffer + i, &pos)) + { + if (buffer[i].busy_players < buffer[i].max_players) + { + /* + * we increment i only if there's some room left on the + * server. If it's full of people playing on it, it's + * of absolutely no use to present it as a working + * server... And not incrementing i will make it be + * overwritten by the next server. + */ + ++i; + log_print_str ("+"); + } + else + { + log_print_str ("="); + } + } + else + { + log_print_str ("-"); + } + } + } result = 1; } @@ -223,9 +223,9 @@ read_string (result->comment, str, sizeof (result->comment))) { LW_MACRO_SPRINTF3 (result->label, - "%s (%d/%d)", - result->ip, - result->busy_players, result->max_players); + "%s (%d/%d)", + result->ip, + result->busy_players, result->max_players); result->ping_delay = lw_ping_try_server (result->ip, result->port); @@ -269,31 +269,31 @@ { ++(*str); while ((c = **str) != '\0' && c != '\n' && !done) - { - ++(*str); - if (c == '\'') - { - if ((**str) == '\'') - { - ++(*str); - if (i < size - 1) - { - result[i++] = '\''; - } - } - else - { - done = 1; - } - } - else - { - if (i < size - 1) - { - result[i++] = c; - } - } - } + { + ++(*str); + if (c == '\'') + { + if ((**str) == '\'') + { + ++(*str); + if (i < size - 1) + { + result[i++] = '\''; + } + } + else + { + done = 1; + } + } + else + { + if (i < size - 1) + { + result[i++] = c; + } + } + } } result[i++] = '\0'; @@ -398,11 +398,11 @@ if (tmp != NULL) { if (tmp - (*str) < n) - { - ok = 1; - (*str) = tmp + 1; - skip_space (str); - } + { + ok = 1; + (*str) = tmp + 1; + skip_space (str); + } } return ok; diff -Nru liquidwar-5.6.4/src/wwwcli.h liquidwar-5.6.5/src/wwwcli.h --- liquidwar-5.6.4/src/wwwcli.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/wwwcli.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ diff -Nru liquidwar-5.6.4/src/wwwsrv.c liquidwar-5.6.5/src/wwwsrv.c --- liquidwar-5.6.4/src/wwwsrv.c 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/wwwsrv.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -68,7 +68,7 @@ #define LW_WWWSRV_HTTP_CONTENT_SIZE 1000 #define LW_WWWSRV_HTTP_URL_SIZE (URL_SIZE + 200 + COMMENT_SIZE * 3) -#define LW_WWWSRV_URL_REGISTER "register.php3" +#define LW_WWWSRV_URL_REGISTER "register.txt.php" #define LW_WWWSRV_DELAY 5 #define LW_WWWSRV_OK "OK" @@ -89,12 +89,12 @@ */ void lw_wwwsrv_init (LW_WWWSRV_DATA * data, - int privacy, - int log, - char *metaserver, - int port, - int busy_players, - int max_players, char *password, char *comment) + int privacy, + int log, + char *metaserver, + int port, + int busy_players, + int max_players, char *password, char *comment) { memset (data, 0, sizeof (LW_WWWSRV_DATA)); @@ -104,8 +104,8 @@ data->port = port; data->busy_players = busy_players; data->max_players = max_players; - strncpy (data->password, password, URL_SIZE); - strncpy (data->comment, comment, URL_SIZE); + strncpy (data->password, password, PASSWORD_SIZE); + strncpy (data->comment, comment, COMMENT_SIZE); } /*------------------------------------------------------------------*/ @@ -165,9 +165,9 @@ memset (&buffer_url, 0, sizeof (buffer_url)); LW_MACRO_SPRINTF3 (buffer_url, - "%s%s?protocol=%s&game=" LW_PROGRAM "&version=" - LW_VERSION, data.metaserver, LW_WWWSRV_URL_REGISTER, - LW_SERVER_METASERVER_PROTOCOL); + "%s%s?protocol=%s&game=" LW_PROGRAM "&version=" + LW_VERSION, data.metaserver, LW_WWWSRV_URL_REGISTER, + LW_SERVER_METASERVER_PROTOCOL); LW_MACRO_SPRINTF1 (buffer_num, "%d", data.port); LW_MACRO_STRCAT (buffer_url, "&port="); @@ -193,22 +193,22 @@ LW_MACRO_STRCAT (buffer_url, "&comment="); lw_httputil_text_to_urlparam (buffer_comment, - data.comment, sizeof (buffer_comment) - 1); + data.comment, sizeof (buffer_comment) - 1); LW_MACRO_STRCAT (buffer_url, buffer_comment); if (lw_httputil_get_page (buffer_content, buffer_url, sizeof (buffer_content))) { if (strstr (buffer_content, LW_WWWSRV_OK)) - { - ok = 1; - } + { + ok = 1; + } else - { - log_print_str ("Incorrect answer from \""); - log_print_str (data.metaserver); - log_println_str ("\"!"); - } + { + log_print_str ("Incorrect answer from \""); + log_print_str (data.metaserver); + log_println_str ("\"!"); + } } else { @@ -218,18 +218,18 @@ if (data.log) { if (ok) - { - log_print_str ("Successfully registered on \""); - log_print_str (data.metaserver); - log_println_str ("\""); - log_flush (); - } + { + log_print_str ("Successfully registered on \""); + log_print_str (data.metaserver); + log_println_str ("\""); + log_flush (); + } else - { - log_print_str ("Unable to register on \""); - log_print_str (data.metaserver); - log_println_str ("\""); - log_flush (); - } + { + log_print_str ("Unable to register on \""); + log_print_str (data.metaserver); + log_println_str ("\""); + log_flush (); + } } } diff -Nru liquidwar-5.6.4/src/wwwsrv.h liquidwar-5.6.5/src/wwwsrv.h --- liquidwar-5.6.4/src/wwwsrv.h 2007-10-17 20:00:50.000000000 +0000 +++ liquidwar-5.6.5/src/wwwsrv.h 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -78,12 +78,12 @@ /*==================================================================*/ void lw_wwwsrv_init (LW_WWWSRV_DATA * data, - int privacy, - int log, - char *metaserver, - int port, - int busy_players, - int max_players, char *password, char *comment); + int privacy, + int log, + char *metaserver, + int port, + int busy_players, + int max_players, char *password, char *comment); int lw_wwwsrv_register (LW_WWWSRV_DATA * data); #endif diff -Nru liquidwar-5.6.4/src/x11icon.c liquidwar-5.6.5/src/x11icon.c --- liquidwar-5.6.4/src/x11icon.c 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/src/x11icon.c 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,300 @@ +#include +/* XPM */ +static const char *allegico_xpm[] = { +/* columns rows colors chars-per-pixel */ + "48 48 235 2", + " c #3F0B05", + ". c #320B0D", + "X c #3C1C08", + "o c #0F3E00", + "O c #123C01", + "+ c #1D3D00", + "@ c #1D3E11", + "# c #202F00", + "$ c #342B00", + "% c #3D2D00", + "& c #2C3200", + "* c #223F00", + "= c #3C3D00", + "- c #001F30", + "; c #37002F", + ": c #39002F", + "> c #35003F", + ", c #3C003A", + "< c #003222", + "1 c #003F21", + "2 c #003D2B", + "3 c #002F3E", + "4 c #013434", + "5 c #023A3F", + "6 c #530E00", + "7 c #5D0F00", + "8 c #53000C", + "9 c #5A000A", + "0 c #491100", + "q c #451900", + "w c #4C1900", + "e c #561600", + "r c #551B00", + "t c #530013", + "y c #580013", + "u c #51001A", + "i c #650100", + "p c #6C0002", + "a c #640900", + "s c #730301", + "d c #7C0200", + "f c #720800", + "g c #7B0A00", + "h c #710B08", + "j c #6A1400", + "k c #721100", + "l c #711B00", + "z c #462900", + "x c #582600", + "c c #532D00", + "v c #433C00", + "b c #622300", + "n c #782600", + "m c #650026", + "M c #0B4103", + "N c #064308", + "B c #004F0F", + "V c #1B4003", + "C c #065705", + "Z c #0C5300", + "A c #005C03", + "S c #00560E", + "D c #145400", + "F c #004D1E", + "G c #005716", + "H c #005E16", + "J c #00551D", + "K c #244600", + "L c #2A4600", + "P c #264E00", + "I c #3C4400", + "U c #324800", + "Y c #265100", + "T c #056600", + "R c #006C02", + "E c #00680A", + "W c #126400", + "Q c #116800", + "! c #007402", + "~ c #0C7600", + "^ c #017D01", + "/ c #0A7A00", + "( c #02730A", + ") c #007E08", + "_ c #006215", + "` c #006C12", + "' c #00621D", + "] c #016B1D", + "[ c #007E10", + "{ c #007118", + "} c #227000", + "| c #004723", + " . c #004C22", + ".. c #004529", + "X. c #005B22", + "o. c #00532D", + "O. c #004032", + "+. c #004937", + "@. c #004B3C", + "#. c #006223", + "$. c #00612F", + "%. c #006C2E", + "&. c #00732E", + "*. c #180D46", + "=. c #1C004C", + "-. c #001547", + ";. c #001944", + ":. c #00114F", + ">. c #001B4B", + ",. c #000C51", + "<. c #001959", + "1. c #270048", + "2. c #290051", + "3. c #003C47", + "4. c #00344D", + "5. c #013C4A", + "6. c #002E57", + "7. c #022458", + "8. c #003451", + "9. c #003A53", + "0. c #00395A", + "q. c #000D60", + "w. c #00036B", + "e. c #000868", + "r. c #1F0063", + "t. c #001160", + "y. c #001C68", + "u. c #020074", + "i. c #000B74", + "p. c #02007C", + "a. c #000F7F", + "s. c #1B007D", + "d. c #001475", + "f. c #001A73", + "g. c #001679", + "h. c #001F7D", + "j. c #250063", + "k. c #002365", + "l. c #00256C", + "z. c #003A61", + "x. c #002A70", + "c. c #420040", + "v. c #004541", + "b. c #004449", + "n. c #044252", + "m. c #004264", + "M. c #00746A", + "N. c #820100", + "B. c #8B0100", + "V. c #840A00", + "C. c #940000", + "Z. c #9B0100", + "A. c #A60100", + "S. c #AC0000", + "D. c #B30000", + "F. c #BB0000", + "G. c #962B01", + "H. c #C40001", + "J. c #CC0000", + "K. c #D40000", + "L. c #DB0000", + "P. c #E50000", + "I. c #ED0000", + "U. c #F40000", + "Y. c #FE0000", + "T. c #008401", + "R. c #0A8400", + "E. c #008A01", + "W. c #00820C", + "Q. c #1A8600", + "!. c #128E00", + "~. c #1F8800", + "^. c #019300", + "/. c #009B01", + "(. c #089D00", + "). c #02980D", + "_. c #1F9700", + "`. c #008014", + "'. c #008E11", + "]. c #009212", + "[. c #029C1A", + "{. c #318A04", + "}. c #2B9702", + "|. c #00A500", + " X c #00AB01", + ".X c #00AE0C", + "XX c #1DAB00", + "oX c #00B401", + "OX c #01BC01", + "+X c #00B40D", + "@X c #00B90C", + "#X c #00AB11", + "$X c #00BA14", + "%X c #00C200", + "&X c #00CC00", + "*X c #00D400", + "=X c #00DB00", + "-X c #00E300", + ";X c #00EB00", + ":X c #00F400", + ">X c #00FE00", + ",X c #00C020", + "X>X>X.X@.4XtXhXcXcXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvX{.=X>X>X>X-X).3.1XyXlXcXcXcXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXG.}.;X>X>X>X:X%XJ i.7XsXxXcXcXcXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXU.K.n XX>X>X>X>X>X&X#.e.7XyXxXcXcXcXcXcXcXcXcXcXcXcXzXkXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXU.U.F.l _.:X>X>X>X>X-X%.i.7XyXzXcXcXcXcXcXcXcXcXcXcXcXhXwX,XvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXY.Y.I.D.j ~.;X>X>X>X>X=X&.i.7XyXzXcXcXcXcXcXcXcXcXcXcXcXiXz.$X>XvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXY.Y.Y.L.B.r Q.;X>X>X>X:X%X$.i.7XiXxXcXcXcXcXcXcXcXcXcXcXzXrX5.+X>X>XvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXU.Y.Y.K.B.z !.-X>X>X>X:XoXv.p.7XfXcXcXcXcXcXcXcXcXcXcXcXlX9X5 @X>X>X>XvXvXvXvXvXvX", + "vXvXvXvXvXvXY.Y.Y.Y.I.A.v |.;X>X>X>X:X+X4.1XrXhXcXcXcXcXcXcXcXcXcXcXcXzX7XO.oX>X>X>XvXvXvXvXvXvX", + "vXvXvXvXvXU.Y.Y.Y.Y.U.S.I |.;X>X>X>X>X$X8.1XyXzXcXcXcXcXcXcXcXcXcXcXcXxX3X . X:X>X>X>XvXvXvXvXvX", + "vXvXvXvXvXY.Y.Y.Y.Y.U.Z.U /.=X>X>X>X>X#X6.8XfXcXcXcXcXcXcXcXcXcXcXcXcXxXh.G /.=X>X>X>XvXvXvXvXvX", + "vXvXvXvXU.Y.Y.Y.Y.Y.P.B.K E.OX:X>X>X-X'.k.sXzXcXcXcXcXcXcXcXcXcXcXcXxXfXy.` oX;X>X>X>X;XvXvXvXvX", + "vXvXvXvXY.Y.Y.Y.Y.U.K.d V ^ oX:X>X>X&X{ y.gXcXcXcXcXcXcXcXcXcXcXcXcXgX8X3 E.=X>X>X>X;XOXvXvXvXvX", + "vXvXvXvXY.Y.Y.Y.Y.P.D.a O R oX>X>X:XoX#.d.sXzXcXcXcXcXcXcXcXcXcXcXxXsXX>X>X=X.X%XvXvXvX", + "vXvXvXU.Y.Y.Y.Y.Y.K.C.6 M ! OX>X>X;X XX.d.yXgXcXcXcXlXgXgXzXcXxXcXlXtXy._ /.=X>X>X>X-X#XM.vXvXvX", + "vXvXvXU.Y.Y.Y.Y.Y.K.N.0 M ^ &X>X>X;X|. .d.tXiXzXxXgXtX7X7XuXfXgXhXsX8X3.W.OX;X>X>X>X-X[.aXvXvXvX", + "vXvXvXY.Y.Y.Y.Y.Y.K.d . N E.*X>X>X:X XF ,.8XyXgXfX5X8.3.5.9.6XyXtX8Xi.| |.-X>X>X>X>X:X|.n.vXvXvX", + "vXvXvXY.Y.Y.Y.Y.Y.H.N.X C |.-X>X>X>X*X] :.p.7X8Xl.X.) ) ) ! o.d.7Xp.-.G oX:X>X>X>X>X:X X+.0XvXvX", + "vXvXvXY.Y.Y.Y.Y.I.F.B.v ^ %X:X>X>X>X:X].;.w.u.<.' E.^.^.T.^ R 2 e.w.4 ! %X>X>X>X>X>X-X).8.iXvXvX", + "vXvXY.Y.Y.Y.Y.Y.I.D.V.U ^.=X>X>X>X>X>XOX..,.>.F T./.oX&X%X XE.A - ,.| E.*X>X>X>X>X:X&XW.k.fXvXvX", + "vXvXY.Y.Y.Y.Y.Y.U.H.g K ^.*X>X>X>X>X>X;X+X`.[ E./.OX;X>X>X:X*X^.S < B ^.-X>X>X>X>X=X X{ f.gXvXvX", + "vXvXvXY.Y.Y.Y.Y.Y.H.f K E.*X>X>X>X>X>X>X>X-X=X&X*X;X>X>X>X>X>X=X/.R ! oX:X>X>X>X:X%X^.' f.fXvXvX", + "vXvXvXY.Y.Y.Y.Y.Y.J.d & ^ OX:X>X>X>X>X>X>X>X>X>X>X>X>X>X>X>X>X>X=XOX&X;X>X>X>X>X;XOXE.o.g.gXvXvX", + "vXvXvXY.Y.Y.Y.Y.U.H.B.w Z ^.-X>X>X>X>X>X>X>X>X>X>X;X-X-X;X>X>X>X>X>X>X>X>X>X>X>X;XOXW.9.iXvXvXvX", + "vXvXvXY.Y.Y.Y.Y.U.K.D.s # ^ *X>X>X>X>X>X>X>X>X:X&XOX X|.oX=X>X>X>X>X>X>X>X>X>X>X;XOX[ x.lXvXvXvX", + "vXvXvXY.Y.Y.Y.Y.Y.U.L.Z.0 Z OX>X>X>X>X>X>X:X-X%X/.E./ Q ! oX;X>X>X>X>X>X>X>X>X>X=X|.] 6XzXvXvXvX", + "vXvXvXvXY.Y.Y.Y.Y.Y.Y.J.N.$ (.:X>X-X;X;X=X X^.E.! D % w + ^ %X;X>X>X>X>X>X>X>X*XoXR.b.uXzXvXvXvX", + "vXvXvXvXY.Y.Y.Y.Y.Y.Y.U.D.a Y oX*XoX XoX^.T D P = r i i q W |.*X;X>X>X>X>X:X=X|.^.] eXlXvXvXvXvX", + "vXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.P.C.7 I } ~ / ~ D $ e j d d d s f v R.|.OX=X-X*XOXOX|.E.( m.jXcXvXvXvXvX", + "vXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.H.C.d k b c x j V.C.C.C.C.B.B.C.h @ E ^. X|.T.! T.E.( 0.dXcXvXvXvXvXvX", + "vXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.U.H.Z.Z.C.B.C.A.F.F.F.D.D.A.Z.B.m *.1 ! T.^ ! T R E 9.pXxXcXvXvXvXvXvX", + "vXvXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.U.K.F.S.S.F.L.U.U.U.I.U.K.C.s , u.t.4 J H _ _ | 7.pXzXxXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.Y.U.I.P.U.Y.Y.Y.Y.Y.Y.J.N.8 =.7XyXuXqX6Xh.f.3XsXcXcXxXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.I.A.i : 2XfXzXcXxXzXgXfXlXcXcXcXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXY.U.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.U.F.N.u s.gXcXcXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.U.F.N.9 j.fXcXcXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.U.I.H.B.9 1.rXzXcXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXY.Y.Y.Y.Y.Y.Y.Y.L.F.Z.N.y 2.9XfXzXcXcXcXcXcXcXcXcXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvXY.Y.Y.Y.Y.U.J.Z.p t 1.s.yXhXzXcXcXcXcXxXcXcXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXY.Y.Y.P.A.9 : j.9XgXzXzXxXcXcXcXcXcXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXU.J.c.p.tXiXgXlXhXxXcXcXxXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXgXlXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX", + "vXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvXvX" +}; + +#if defined ALLEGRO_WITH_XWINDOWS && defined ALLEGRO_USE_CONSTRUCTOR +extern void *allegro_icon; +CONSTRUCTOR_FUNCTION (static void _set_allegro_icon (void)); +static void +_set_allegro_icon (void) +{ + allegro_icon = allegico_xpm; +} +#endif diff -Nru liquidwar-5.6.4/.travis.yml liquidwar-5.6.5/.travis.yml --- liquidwar-5.6.4/.travis.yml 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/.travis.yml 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,41 @@ +# Liquid War is a multiplayer wargame +# Copyright (C) 1998-2018 Christian Mauduit +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Liquid War homepage : https://ufoot.org/liquidwar/v5 +# Contact author : ufoot@ufoot.org + +language: c + +addons: + apt: + packages: + - liballegro4-dev + - libxml2-utils + +install: autoconf + +script: ./configure && make && make check && make package_source + +deploy: + provider: releases + api_key: $GITHUB_OAUTH_TOKEN + file_glob: true + file: liquidwar-*.tar.gz + skip_cleanup: true + overwrite: true + on: + tags: true diff -Nru liquidwar-5.6.4/utils/liquidwarcol.c liquidwar-5.6.5/utils/liquidwarcol.c --- liquidwar-5.6.4/utils/liquidwarcol.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/liquidwarcol.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -144,23 +144,23 @@ { found = 1; switch (str[1]) - { - case '?': - case 'h': - case 'H': - FLAG_HELP = 1; - break; - case 'b': - case 'B': - FLAG_BACKUP = 1; - break; - case 's': - case 'S': - FLAG_SILENT = 1; - break; - default: - found = 0; - } + { + case '?': + case 'h': + case 'H': + FLAG_HELP = 1; + break; + case 'b': + case 'B': + FLAG_BACKUP = 1; + break; + case 's': + case 'S': + FLAG_SILENT = 1; + break; + default: + found = 0; + } } return found; } @@ -174,45 +174,45 @@ for (i = 1; i < ARGC; ++i) { if ((!acknowledge_flag (ARGV[i]))) - { - if (j == 0) - FIRST_COLOR = atoi (ARGV[i]); - if (j == 1) - NUMBER_OF_COLORS = atoi (ARGV[i]); - if (j >= 2) - FILENAMES[j - 2] = ARGV[i]; - j++; - } + { + if (j == 0) + FIRST_COLOR = atoi (ARGV[i]); + if (j == 1) + NUMBER_OF_COLORS = atoi (ARGV[i]); + if (j >= 2) + FILENAMES[j - 2] = ARGV[i]; + j++; + } } NUMBER_OF_FILES = j - 2; if (NUMBER_OF_FILES > 0) { if (FIRST_COLOR < 0) - { - success = 0; - printf ("ERROR! First color number must be >= 0.\n"); - } + { + success = 0; + printf ("ERROR! First color number must be >= 0.\n"); + } if (FIRST_COLOR > 255) - { - success = 0; - printf ("ERROR! First color number must be < 255.\n"); - } + { + success = 0; + printf ("ERROR! First color number must be < 255.\n"); + } if (NUMBER_OF_COLORS < 1) - { - success = 0; - printf ("ERROR! Number of colors must be > 1.\n"); - } + { + success = 0; + printf ("ERROR! Number of colors must be > 1.\n"); + } if (NUMBER_OF_COLORS + FIRST_COLOR > 256) - { - success = 0; - printf ("ERROR! Last color number must be < 256.\n"); - } + { + success = 0; + printf ("ERROR! Last color number must be < 256.\n"); + } } else { success = 0; if (!FLAG_HELP) - printf ("ERROR! Two few arguments.\n"); + printf ("ERROR! Two few arguments.\n"); } return success; } @@ -300,9 +300,9 @@ for (y = 0; y < BITMAP_SRC->h && n < NUMBER_OF_COLORS; ++y) for (x = 0; x < BITMAP_SRC->w && n < NUMBER_OF_COLORS; ++x) { - color = PALETTE_SRC[getpixel (BITMAP_SRC, x, y)]; - if (!exist_color (pal, color)) - pal[n++] = color; + color = PALETTE_SRC[getpixel (BITMAP_SRC, x, y)]; + if (!exist_color (pal, color)) + pal[n++] = color; } NUMBER_OF_COLORS = n; } @@ -329,15 +329,15 @@ index = getpixel (BITMAP_SRC, x, y); color = PALETTE_SRC[index]; if ((!exist_color (PALETTE_DST, color)) || - (nb_retries > LW_TEXTURE_RANDOM_MAX_RETRIES)) - { - PALETTE_DST[FIRST_COLOR + (i++)] = color; - nb_retries = 0; - } + (nb_retries > LW_TEXTURE_RANDOM_MAX_RETRIES)) + { + PALETTE_DST[FIRST_COLOR + (i++)] = color; + nb_retries = 0; + } else - { - nb_retries++; - } + { + nb_retries++; + } } } @@ -370,17 +370,17 @@ for (i = 0; i < 256; ++i) corres[i] = bestfit_color (PALETTE_DST, - PALETTE_SRC[i].r, - PALETTE_SRC[i].g, PALETTE_SRC[i].b); + PALETTE_SRC[i].r, + PALETTE_SRC[i].g, PALETTE_SRC[i].b); BITMAP_DST = create_bitmap (BITMAP_SRC->w, BITMAP_SRC->h); for (y = 0; y < BITMAP_SRC->h; ++y) for (x = 0; x < BITMAP_SRC->w; ++x) { - index = corres[getpixel (BITMAP_SRC, x, y)]; - index = (index < FIRST_COLOR || - index >= FIRST_COLOR + NUMBER_OF_COLORS) ? - FIRST_COLOR : index; - putpixel (BITMAP_DST, x, y, index); + index = corres[getpixel (BITMAP_SRC, x, y)]; + index = (index < FIRST_COLOR || + index >= FIRST_COLOR + NUMBER_OF_COLORS) ? + FIRST_COLOR : index; + putpixel (BITMAP_DST, x, y, index); } } @@ -425,22 +425,22 @@ if (read_command_line ()) { for (i = 0; i < NUMBER_OF_FILES; ++i) - { - if (load_file (FILENAMES[i])) - { - if (FLAG_BACKUP) - save_backup (FILENAMES[i]); - convert_bitmap (FILENAMES[i]); - save_file (FILENAMES[i]); - } - } + { + if (load_file (FILENAMES[i])) + { + if (FLAG_BACKUP) + save_backup (FILENAMES[i]); + convert_bitmap (FILENAMES[i]); + save_file (FILENAMES[i]); + } + } } else { if (FLAG_HELP) - display_long_help (); + display_long_help (); else - display_short_help (); + display_short_help (); } allegro_exit (); @@ -448,9 +448,4 @@ } -#ifdef ALLEGRO_WINDOWS -END_OF_MAIN () -#endif -#ifdef ALLEGRO_UNIX - END_OF_MAIN (); -#endif +END_OF_MAIN (); diff -Nru liquidwar-5.6.4/utils/liquidwarmap.c liquidwar-5.6.5/utils/liquidwarmap.c --- liquidwar-5.6.4/utils/liquidwarmap.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/liquidwarmap.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -157,19 +157,19 @@ { found = 1; switch (str[1]) - { - case '?': - case 'h': - case 'H': - FLAG_HELP = 1; - break; - case 's': - case 'S': - FLAG_SILENT = 1; - break; - default: - found = 0; - } + { + case '?': + case 'h': + case 'H': + FLAG_HELP = 1; + break; + case 's': + case 'S': + FLAG_SILENT = 1; + break; + default: + found = 0; + } } return found; } @@ -183,17 +183,17 @@ for (i = 1; i < ARGC; ++i) { if ((!acknowledge_flag (ARGV[i]))) - { - FILENAMES[j] = ARGV[i]; - j++; - } + { + FILENAMES[j] = ARGV[i]; + j++; + } } NUMBER_OF_FILES = j; if (NUMBER_OF_FILES <= 0) { success = 0; if (!FLAG_HELP) - printf ("ERROR! Two few arguments.\n"); + printf ("ERROR! Two few arguments.\n"); } return success; } @@ -234,9 +234,9 @@ for (i = 0; i < 256; ++i) { if (6 * pal[i].r + 3 * pal[i].g + pal[i].b > LIGHT_OR_DARK_TRESHOLD) - table[i] = CONSIDERED_AS_LIGHT; + table[i] = CONSIDERED_AS_LIGHT; else - table[i] = CONSIDERED_AS_DARK; + table[i] = CONSIDERED_AS_DARK; } for (y = 0; y < bmp->h; ++y) @@ -317,28 +317,28 @@ { wall_color = CONSIDERED_AS_DARK; while (pos_src < wh) - { - l = 0; - if (data[pos_src] == wall_color) - { - while (pos_src < wh && (data[pos_src] == wall_color) && l < 127) - { - l++; - pos_src++; - } - BUFFER[pos_dst++] = l; - } - else - { - while (pos_src < wh && data[pos_src] != wall_color && l < 127) - { - l++; - pos_src++; - } - BUFFER[pos_dst++] = -l; - BG_SIZE += l; - } - } + { + l = 0; + if (data[pos_src] == wall_color) + { + while (pos_src < wh && (data[pos_src] == wall_color) && l < 127) + { + l++; + pos_src++; + } + BUFFER[pos_dst++] = l; + } + else + { + while (pos_src < wh && data[pos_src] != wall_color && l < 127) + { + l++; + pos_src++; + } + BUFFER[pos_dst++] = -l; + BG_SIZE += l; + } + } } BUFFER[pos_dst++] = 0; @@ -399,14 +399,14 @@ */ search = strchr (READABLE_NAME, 10); if (search) - { - (*search) = 0; - } + { + (*search) = 0; + } search = strchr (READABLE_NAME, 13); if (search) - { - (*search) = 0; - } + { + (*search) = 0; + } } else { @@ -416,9 +416,9 @@ strncpy (READABLE_NAME, str, sizeof (READABLE_NAME)); search = strchr (READABLE_NAME, '.'); if (search) - { - (*search) = '\0'; - } + { + (*search) = '\0'; + } } } @@ -543,29 +543,29 @@ if (read_command_line ()) { for (i = 0; i < NUMBER_OF_FILES; ++i) - { - if (load_file (FILENAMES[i])) - { - sort_light_and_dark (BITMAP_SRC, PALETTE_SRC); - get_range (); - if (BITMAP_SRC->w != BITMAP_DST->w - || BITMAP_SRC->h != BITMAP_DST->h) - write_with_new_size (FILENAMES[i]); - convert_to_buffer (); - change_ext_to_txt (FILENAMES[i]); - update_system_name (FILENAMES[i]); - update_readable_name (FILENAMES[i]); - change_ext_to_map (FILENAMES[i]); - write_to_disk (FILENAMES[i]); - } - } + { + if (load_file (FILENAMES[i])) + { + sort_light_and_dark (BITMAP_SRC, PALETTE_SRC); + get_range (); + if (BITMAP_SRC->w != BITMAP_DST->w + || BITMAP_SRC->h != BITMAP_DST->h) + write_with_new_size (FILENAMES[i]); + convert_to_buffer (); + change_ext_to_txt (FILENAMES[i]); + update_system_name (FILENAMES[i]); + update_readable_name (FILENAMES[i]); + change_ext_to_map (FILENAMES[i]); + write_to_disk (FILENAMES[i]); + } + } } else { if (FLAG_HELP) - display_long_help (); + display_long_help (); else - display_short_help (); + display_short_help (); } allegro_exit (); @@ -573,9 +573,4 @@ } -#ifdef ALLEGRO_WINDOWS END_OF_MAIN () -#endif -#ifdef ALLEGRO_UNIX - END_OF_MAIN (); -#endif diff -Nru liquidwar-5.6.4/utils/liquidwartex.c liquidwar-5.6.5/utils/liquidwartex.c --- liquidwar-5.6.4/utils/liquidwartex.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/liquidwartex.c 2018-12-23 19:04:36.000000000 +0000 @@ -22,7 +22,7 @@ /*****************************************************************************/ /* Liquid War is a multiplayer wargame */ -/* Copyright (C) 1998-2007 Christian Mauduit */ +/* Copyright (C) 1998-2018 Christian Mauduit */ /* */ /* 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 */ @@ -38,7 +38,7 @@ /* along with this program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ -/* Liquid War homepage : http://www.ufoot.org/liquidwar/v5 */ +/* Liquid War homepage : https://ufoot.org/liquidwar/v5 */ /* Contact author : ufoot@ufoot.org */ /*****************************************************************************/ @@ -144,19 +144,19 @@ { found = 1; switch (str[1]) - { - case '?': - case 'h': - case 'H': - FLAG_HELP = 1; - break; - case 's': - case 'S': - FLAG_SILENT = 1; - break; - default: - found = 0; - } + { + case '?': + case 'h': + case 'H': + FLAG_HELP = 1; + break; + case 's': + case 'S': + FLAG_SILENT = 1; + break; + default: + found = 0; + } } return found; } @@ -171,43 +171,43 @@ { success = 0; if (!FLAG_HELP) - printf ("ERROR! Too few arguments.\n"); + printf ("ERROR! Too few arguments.\n"); } else { for (i = 1; i < ARGC; ++i) - { - if ((!acknowledge_flag (ARGV[i]))) - { - if (j == 0) - FIRST_COLOR = atoi (ARGV[i]); - if (j == 1) - COLOR_NUMBER = atoi (ARGV[i]); - if (j >= 2) - FILENAMES[j - 2] = ARGV[i]; - j++; - } - } + { + if ((!acknowledge_flag (ARGV[i]))) + { + if (j == 0) + FIRST_COLOR = atoi (ARGV[i]); + if (j == 1) + COLOR_NUMBER = atoi (ARGV[i]); + if (j >= 2) + FILENAMES[j - 2] = ARGV[i]; + j++; + } + } if (COLOR_NUMBER < 8 || COLOR_NUMBER > 32) - { - /* - * COLOR_NUMBER must be <=32 for weird implementation - * reasons. There's no easy way to change this easily. - */ - success = 0; - if (!FLAG_HELP) - printf ("ERROR! Color number must be between 8 and 32"); - } + { + /* + * COLOR_NUMBER must be <=32 for weird implementation + * reasons. There's no easy way to change this easily. + */ + success = 0; + if (!FLAG_HELP) + printf ("ERROR! Color number must be between 8 and 32"); + } else - { - NUMBER_OF_FILES = j - 2; - if (NUMBER_OF_FILES <= 0) - { - success = 0; - if (!FLAG_HELP) - printf ("ERROR! Too few arguments.\n"); - } - } + { + NUMBER_OF_FILES = j - 2; + if (NUMBER_OF_FILES <= 0) + { + success = 0; + if (!FLAG_HELP) + printf ("ERROR! Too few arguments.\n"); + } + } } return success; } @@ -251,17 +251,17 @@ for (y = 0; y < BITMAP_SRC->h; ++y) for (x = 0; x < BITMAP_SRC->w; ++x) if (getpixel (BITMAP_SRC, x, y) >= FIRST_COLOR || - getpixel (BITMAP_SRC, x, y) < FIRST_COLOR + COLOR_NUMBER) - { - if (min_x > x) - min_x = x; - if (min_y > y) - min_y = y; - if (max_x < x) - max_x = x; - if (max_y < y) - max_y = y; - } + getpixel (BITMAP_SRC, x, y) < FIRST_COLOR + COLOR_NUMBER) + { + if (min_x > x) + min_x = x; + if (min_y > y) + min_y = y; + if (max_x < x) + max_x = x; + if (max_y < y) + max_y = y; + } DST_X = min_x; DST_Y = min_y; DST_W = max_x - min_x + 1; @@ -319,25 +319,25 @@ for (y = 0; y < DST_H; ++y) for (x = 0; x < DST_W; ++x) { - coul = getpixel (BITMAP_SRC, DST_X + x, DST_Y + y) - FIRST_COLOR; - toadd = 1 << pos8; - octet[0] |= (coul & 1) ? toadd : 0; - octet[1] |= (coul & 2) ? toadd : 0; - octet[2] |= (coul & 4) ? toadd : 0; - octet[3] |= (coul & 8) ? toadd : 0; - octet[4] |= (coul & 16) ? toadd : 0; - - if (pos8 == 7 || (y == DST_H - 1 && x == DST_W - 1)) - { - for (i = 0; i < 5; ++i) - { - BUFFER[pos++] = octet[i]; - octet[i] = 0; - } - pos8 = 0; - } - else - pos8++; + coul = getpixel (BITMAP_SRC, DST_X + x, DST_Y + y) - FIRST_COLOR; + toadd = 1 << pos8; + octet[0] |= (coul & 1) ? toadd : 0; + octet[1] |= (coul & 2) ? toadd : 0; + octet[2] |= (coul & 4) ? toadd : 0; + octet[3] |= (coul & 8) ? toadd : 0; + octet[4] |= (coul & 16) ? toadd : 0; + + if (pos8 == 7 || (y == DST_H - 1 && x == DST_W - 1)) + { + for (i = 0; i < 5; ++i) + { + BUFFER[pos++] = octet[i]; + octet[i] = 0; + } + pos8 = 0; + } + else + pos8++; } } @@ -420,23 +420,23 @@ if (read_command_line ()) { for (i = 0; i < NUMBER_OF_FILES; ++i) - { - if (load_file (FILENAMES[i])) - { - get_range (); - convert_to_buffer (); - update_system_name (FILENAMES[i]); - change_ext (FILENAMES[i]); - write_to_disk (FILENAMES[i]); - } - } + { + if (load_file (FILENAMES[i])) + { + get_range (); + convert_to_buffer (); + update_system_name (FILENAMES[i]); + change_ext (FILENAMES[i]); + write_to_disk (FILENAMES[i]); + } + } } else { if (FLAG_HELP) - display_long_help (); + display_long_help (); else - display_short_help (); + display_short_help (); } allegro_exit (); @@ -444,9 +444,4 @@ } -#ifdef ALLEGRO_WINDOWS END_OF_MAIN () -#endif -#ifdef ALLEGRO_UNIX - END_OF_MAIN (); -#endif diff -Nru liquidwar-5.6.4/utils/lwmapgen/big_quad.c liquidwar-5.6.5/utils/lwmapgen/big_quad.c --- liquidwar-5.6.4/utils/lwmapgen/big_quad.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/big_quad.c 2018-12-23 19:04:36.000000000 +0000 @@ -9,33 +9,34 @@ #include "misc.h" -void big_quad() +void +big_quad () { - int vert[8]; + int vert[8]; - /* - * NOTE: we don't want to overlap the areas or we get strange polys - * The 2 and the "-3" are to make sure the quad doesn't touch the - * edge of the map. - */ - - /* left side of map */ - vert[0] = rand_num(2, map.sec_width); - vert[1] = rand_num(2, map.height-3); - - /* top side of map */ - vert[2] = rand_num(map.sec_width+1, map.width-3); - vert[3] = rand_num(2, map.sec_height); - - /* right side of map */ - vert[4] = rand_num(map.width-map.sec_width , map.width-3); - vert[5] = rand_num(map.sec_height+1, map.height-3); - - /* bottom side of map */ - vert[6] = rand_num(map.sec_width+1, map.width-map.sec_width-1); - vert[7] = rand_num(map.height-map.sec_height, map.height-3); + /* + * NOTE: we don't want to overlap the areas or we get strange polys + * The 2 and the "-3" are to make sure the quad doesn't touch the + * edge of the map. + */ - polygon(map.map, 4, vert, 0); + /* left side of map */ + vert[0] = rand_num (2, map.sec_width); + vert[1] = rand_num (2, map.height - 3); -return; + /* top side of map */ + vert[2] = rand_num (map.sec_width + 1, map.width - 3); + vert[3] = rand_num (2, map.sec_height); + + /* right side of map */ + vert[4] = rand_num (map.width - map.sec_width, map.width - 3); + vert[5] = rand_num (map.sec_height + 1, map.height - 3); + + /* bottom side of map */ + vert[6] = rand_num (map.sec_width + 1, map.width - map.sec_width - 1); + vert[7] = rand_num (map.height - map.sec_height, map.height - 3); + + polygon (map.map, 4, vert, 0); + + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/boxes.c liquidwar-5.6.5/utils/lwmapgen/boxes.c --- liquidwar-5.6.4/utils/lwmapgen/boxes.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/boxes.c 2018-12-23 19:04:36.000000000 +0000 @@ -10,49 +10,50 @@ #include "map.h" -void boxes() +void +boxes () { - int r, c; - int startx, starty, endx, endy; - int pad; - - pad = 1; - - for( r = 0; r < map.num_row; r++ ) - { - for( c = 0; c < map.num_col; c++ ) - { - /* 1 out 2 chance to draw box */ - if( rand()%2 == 0 ) - { - /* - * if box is on the edge of the map i use - * the absolute pixel - */ - if( c == 0 ) - startx = pad+1; - else - startx = map.sec_width*c+pad; - - if( r == 0 ) - starty = pad+1; - else - starty = map.sec_height*r+pad; - - if( c == map.num_col-1 ) - endx = map.width-pad-2; - else - endx = map.sec_width*(c+1)-pad; - - if( r == map.num_row-1 ) - endy = map.height-pad-2; - else - endy = map.sec_height*(r+1)-pad; - - rectfill(map.map, startx, starty, endx, endy, 0); - } - } - } + int r, c; + int startx, starty, endx, endy; + int pad; + + pad = 1; + + for (r = 0; r < map.num_row; r++) + { + for (c = 0; c < map.num_col; c++) + { + /* 1 out 2 chance to draw box */ + if (rand () % 2 == 0) + { + /* + * if box is on the edge of the map i use + * the absolute pixel + */ + if (c == 0) + startx = pad + 1; + else + startx = map.sec_width * c + pad; + + if (r == 0) + starty = pad + 1; + else + starty = map.sec_height * r + pad; + + if (c == map.num_col - 1) + endx = map.width - pad - 2; + else + endx = map.sec_width * (c + 1) - pad; + + if (r == map.num_row - 1) + endy = map.height - pad - 2; + else + endy = map.sec_height * (r + 1) - pad; + + rectfill (map.map, startx, starty, endx, endy, 0); + } + } + } -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/bubbles.c liquidwar-5.6.5/utils/lwmapgen/bubbles.c --- liquidwar-5.6.4/utils/lwmapgen/bubbles.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/bubbles.c 2018-12-23 19:04:36.000000000 +0000 @@ -12,56 +12,57 @@ #include "misc.h" -void bubbles() +void +bubbles () { - int r, c, b; - int size; - int centerx, centery; - int outradius, inradius, midradius; - int bubblesx, bubblesy; /* number of bubbles in a row or column */ - int numbubbles; - - clear_invert_map(); - - /* - * outer is the main bubble - * inner is the black dot in the bubble - * what's the middle?? - */ - - size = (map.sec_width > map.sec_height ? map.sec_width : map.sec_height); - outradius = rand_num(size/3, size); - inradius = rand_num(outradius/1.5, outradius*(7.0/8.0)); - midradius = (outradius + inradius) / 2; - - midradius = (midradius == 0 ? 1 : midradius); - - - bubblesx = map.sec_width / midradius; - bubblesy = map.sec_height / midradius; - numbubbles = (bubblesx * bubblesy); - - numbubbles = (numbubbles == 0 ? 1 : numbubbles); - - - for( r = 0; r < map.num_row; r++ ) - { - for( c = 0; c < map.num_col; c++ ) - { - for( b = 0; b < numbubbles; b++ ) - { - rand_point_section_offset(¢erx, ¢ery, r, c, 0); - - /* - *centerx *= (centerx / bubblesx); - *centery *= (centery / bubblesy); - */ - - circlefill(map.map, centerx, centery, outradius, 255); - circlefill(map.map, centerx, centery, inradius, 0); - } - } /* for(c..) */ - } /* for(r..) */ + int r, c, b; + int size; + int centerx, centery; + int outradius, inradius, midradius; + int bubblesx, bubblesy; /* number of bubbles in a row or column */ + int numbubbles; + + clear_invert_map (); + + /* + * outer is the main bubble + * inner is the black dot in the bubble + * what's the middle?? + */ + + size = (map.sec_width > map.sec_height ? map.sec_width : map.sec_height); + outradius = rand_num (size / 3, size); + inradius = rand_num (outradius / 1.5, outradius * (7.0 / 8.0)); + midradius = (outradius + inradius) / 2; + + midradius = (midradius == 0 ? 1 : midradius); + + + bubblesx = map.sec_width / midradius; + bubblesy = map.sec_height / midradius; + numbubbles = (bubblesx * bubblesy); + + numbubbles = (numbubbles == 0 ? 1 : numbubbles); + + + for (r = 0; r < map.num_row; r++) + { + for (c = 0; c < map.num_col; c++) + { + for (b = 0; b < numbubbles; b++) + { + rand_point_section_offset (¢erx, ¢ery, r, c, 0); + + /* + *centerx *= (centerx / bubblesx); + *centery *= (centery / bubblesy); + */ + + circlefill (map.map, centerx, centery, outradius, 255); + circlefill (map.map, centerx, centery, inradius, 0); + } + } /* for(c..) */ + } /* for(r..) */ -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/circles.c liquidwar-5.6.5/utils/lwmapgen/circles.c --- liquidwar-5.6.4/utils/lwmapgen/circles.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/circles.c 2018-12-23 19:04:36.000000000 +0000 @@ -8,27 +8,29 @@ #include "map.h" -void circles() +void +circles () { - int r, c; - int centerx, centery; - int radius; - int size; - - - /* whats the max radius */ - size = (map.sec_width < map.sec_height ? map.sec_width : map.sec_height)/2.0; - size = (size == 0 ? 1 : size); - - for( r = 0; r < map.num_row; r++ ) - { - for( c = 0; c < map.num_col; c++ ) - { - rand_point_section_offset(¢erx, ¢ery, r, c, 0); - radius = rand()%size+1; - circlefill(map.map, centerx, centery, radius, 0); - } - } + int r, c; + int centerx, centery; + int radius; + int size; + + + /* whats the max radius */ + size = + (map.sec_width < map.sec_height ? map.sec_width : map.sec_height) / 2.0; + size = (size == 0 ? 1 : size); + + for (r = 0; r < map.num_row; r++) + { + for (c = 0; c < map.num_col; c++) + { + rand_point_section_offset (¢erx, ¢ery, r, c, 0); + radius = rand () % size + 1; + circlefill (map.map, centerx, centery, radius, 0); + } + } -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/circuit.c liquidwar-5.6.5/utils/lwmapgen/circuit.c --- liquidwar-5.6.4/utils/lwmapgen/circuit.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/circuit.c 2018-12-23 19:04:36.000000000 +0000 @@ -25,376 +25,384 @@ * its just makes the map look & play better */ -static void draw_pipe( int fromr, int fromc, int tor, int toc, int flip ) +static void +draw_pipe (int fromr, int fromc, int tor, int toc, int flip) { - int fromx, fromy, tox, toy; + int fromx, fromy, tox, toy; - if( fromc < toc ) - { - /* up/down then across */ - if( flip == 0 ) - { - /* go up/down to reach target */ - section_center(&fromx, &fromy, fromr, fromc); - section_center(&tox, &toy, tor, fromc); - rectfill(map.map, fromx-size, fromy, tox+size, toy, 255); - - /* across some num of sections */ - section_center(&fromx, &fromy, tor, fromc); - section_center(&tox, &toy, tor, toc); - rectfill(map.map, fromx, fromy-size, tox, toy+size, 255); - } - /* across then up/down */ - else - { - /* across some num of sections */ - section_center(&fromx, &fromy, fromr, fromc); - section_center(&tox, &toy, fromr, toc); - rectfill(map.map, fromx, fromy-size, tox, toy+size, 255); - - /* go up/down to reach target */ - section_center(&fromx, &fromy, fromr, toc); - section_center(&tox, &toy, tor, toc); - rectfill(map.map, fromx-size, fromy, tox+size, toy, 255); - } - } - else if( fromc > toc ) - { - /* across then up/down */ - if( flip == 0 ) - { - /* across some num of sections */ - section_center(&fromx, &fromy, fromr, fromc); - section_center(&tox, &toy, fromr, toc); - rectfill(map.map, fromx, fromy-size, tox, toy+size, 255); - - /* go up/down to reach target */ - section_center(&fromx, &fromy, fromr, toc); - section_center(&tox, &toy, tor, toc); - rectfill(map.map, fromx-size, fromy, tox+size, toy, 255); - } - /* up/down then across */ - else - { - /* go up/down to reach target */ - section_center(&fromx, &fromy, fromr, fromc); - section_center(&tox, &toy, tor, fromc); - rectfill(map.map, fromx-size, fromy, tox+size, toy, 255); - - /* across some num of sections */ - section_center(&fromx, &fromy, tor, fromc); - section_center(&tox, &toy, tor, toc); - rectfill(map.map, fromx, fromy-size, tox, toy+size, 255); - } - } - else - { + if (fromc < toc) + { + /* up/down then across */ + if (flip == 0) + { + /* go up/down to reach target */ + section_center (&fromx, &fromy, fromr, fromc); + section_center (&tox, &toy, tor, fromc); + rectfill (map.map, fromx - size, fromy, tox + size, toy, 255); + + /* across some num of sections */ + section_center (&fromx, &fromy, tor, fromc); + section_center (&tox, &toy, tor, toc); + rectfill (map.map, fromx, fromy - size, tox, toy + size, 255); + } + /* across then up/down */ + else + { + /* across some num of sections */ + section_center (&fromx, &fromy, fromr, fromc); + section_center (&tox, &toy, fromr, toc); + rectfill (map.map, fromx, fromy - size, tox, toy + size, 255); + /* go up/down to reach target */ - section_center(&fromx, &fromy, fromr, fromc); - section_center(&tox, &toy, tor, toc); - rectfill(map.map, fromx-size, fromy, tox+size, toy, 255); - } + section_center (&fromx, &fromy, fromr, toc); + section_center (&tox, &toy, tor, toc); + rectfill (map.map, fromx - size, fromy, tox + size, toy, 255); + } + } + else if (fromc > toc) + { + /* across then up/down */ + if (flip == 0) + { + /* across some num of sections */ + section_center (&fromx, &fromy, fromr, fromc); + section_center (&tox, &toy, fromr, toc); + rectfill (map.map, fromx, fromy - size, tox, toy + size, 255); -return; + /* go up/down to reach target */ + section_center (&fromx, &fromy, fromr, toc); + section_center (&tox, &toy, tor, toc); + rectfill (map.map, fromx - size, fromy, tox + size, toy, 255); + } + /* up/down then across */ + else + { + /* go up/down to reach target */ + section_center (&fromx, &fromy, fromr, fromc); + section_center (&tox, &toy, tor, fromc); + rectfill (map.map, fromx - size, fromy, tox + size, toy, 255); + + /* across some num of sections */ + section_center (&fromx, &fromy, tor, fromc); + section_center (&tox, &toy, tor, toc); + rectfill (map.map, fromx, fromy - size, tox, toy + size, 255); + } + } + else + { + /* go up/down to reach target */ + section_center (&fromx, &fromy, fromr, fromc); + section_center (&tox, &toy, tor, toc); + rectfill (map.map, fromx - size, fromy, tox + size, toy, 255); + } + + return; } /******************************************************************************/ /* connect all wells on in row */ -static void connect_rows() +static void +connect_rows () { - int r, c; - int fromc, toc; + int r, c; + int fromc, toc; - /* make gcc shutup about these being uninitialized */ - fromc = toc = -1; + /* make gcc shutup about these being uninitialized */ + fromc = toc = -1; - for( r = 0; r < map.num_row; r++ ) - { - /* can't connect if there's not 2 or more... */ - if( count[r] < 2 ) - continue; - - /* find first c... */ - for( c = 0; c < map.num_col; c++ ) - { - if( grid[r][c] == 1 ) - { - fromc = c; - break; - } - } - - /* find last c... */ - for( c++ ; c < map.num_col; c++ ) - { - if( grid[r][c] == 1 ) - toc = c; - } + for (r = 0; r < map.num_row; r++) + { + /* can't connect if there's not 2 or more... */ + if (count[r] < 2) + continue; + + /* find first c... */ + for (c = 0; c < map.num_col; c++) + { + if (grid[r][c] == 1) + { + fromc = c; + break; + } + } + + /* find last c... */ + for (c++; c < map.num_col; c++) + { + if (grid[r][c] == 1) + toc = c; + } - draw_pipe(r, fromc, r, toc, 0); - } + draw_pipe (r, fromc, r, toc, 0); + } -return; + return; } /******************************************************************************/ /* connect the first well on each row */ /* TODO: I don't think this works 100% */ -static void connect_front() +static void +connect_front () { - int r, c; - int fromr, fromc, tor, toc; + int r, c; + int fromr, fromc, tor, toc; - /* make gcc shutup about these being uninitialized */ - fromc = tor = toc = -1; + /* make gcc shutup about these being uninitialized */ + fromc = tor = toc = -1; - for( r = 0; r < map.num_row; r++ ) - { - if( count[r] == 0 ) - continue; - - fromr = r; - /* find first well */ - for( c = 0; c < map.num_col; c++ ) - { - if( grid[fromr][c] == 1 ) - { - fromc = c; - break; - } - } - - - /* tor = -1; */ - /* find next row with a well */ - for( r++; r < map.num_row; r++ ) - { - if( count[r] > 0 ) - { - tor = r; - break; - } - } - /* there might be no other wells after from row */ - if( r == map.num_row ) - break; - - /* find first well on to row */ - for( c = 0; c < map.num_col; c++ ) - { - if( grid[tor][c] == 1 ) - { - toc = c; - break; - } - } - - draw_pipe(fromr, fromc, tor, toc, 0); -printf("FRONT: %d, %d ---- %d, %d\n", fromr, fromc, tor, toc); - r = tor-1; - } + for (r = 0; r < map.num_row; r++) + { + if (count[r] == 0) + continue; + + fromr = r; + /* find first well */ + for (c = 0; c < map.num_col; c++) + { + if (grid[fromr][c] == 1) + { + fromc = c; + break; + } + } + + + /* tor = -1; */ + /* find next row with a well */ + for (r++; r < map.num_row; r++) + { + if (count[r] > 0) + { + tor = r; + break; + } + } + /* there might be no other wells after from row */ + if (r == map.num_row) + break; + + /* find first well on to row */ + for (c = 0; c < map.num_col; c++) + { + if (grid[tor][c] == 1) + { + toc = c; + break; + } + } + + draw_pipe (fromr, fromc, tor, toc, 0); + printf ("FRONT: %d, %d ---- %d, %d\n", fromr, fromc, tor, toc); + r = tor - 1; + } -return; + return; } /******************************************************************************/ /* connect the last well on each row */ /* TODO: I don't think this works 100% */ -static void connect_back() +static void +connect_back () { - int r, c; - int fromr, fromc, tor, toc; + int r, c; + int fromr, fromc, tor, toc; - /* make gcc shutup about these being uninitialized */ - fromc = tor = toc = -1; + /* make gcc shutup about these being uninitialized */ + fromc = tor = toc = -1; - for( r = 0; r < map.num_row; r++ ) - { - if( count[r] == 0 ) - continue; - - fromr = r; - /* find last well */ - for( c = map.num_col-1; c >= 0; c-- ) - { - if( grid[fromr][c] == 1 ) - { - fromc = c; - break; - } - } - - /* tor = -1; */ - /* find next row with well */ - for( r++; r < map.num_row; r++ ) - { - if( count[r] > 0 ) - { - tor = r; - break; - } - } - /* there might not be another row after from row */ - if( r == map.num_row ) - break; - - /* find last well */ - for( c = map.num_col-1; c >= 0; c-- ) - { - if( grid[tor][c] == 1 ) - { - toc = c; - break; - } - } - - draw_pipe(fromr, fromc, tor, toc, 1); -printf("BACK: %d, %d ---- %d, %d\n", fromr, fromc, tor, toc); - r = tor-1; - } + for (r = 0; r < map.num_row; r++) + { + if (count[r] == 0) + continue; + + fromr = r; + /* find last well */ + for (c = map.num_col - 1; c >= 0; c--) + { + if (grid[fromr][c] == 1) + { + fromc = c; + break; + } + } + + /* tor = -1; */ + /* find next row with well */ + for (r++; r < map.num_row; r++) + { + if (count[r] > 0) + { + tor = r; + break; + } + } + /* there might not be another row after from row */ + if (r == map.num_row) + break; + + /* find last well */ + for (c = map.num_col - 1; c >= 0; c--) + { + if (grid[tor][c] == 1) + { + toc = c; + break; + } + } + + draw_pipe (fromr, fromc, tor, toc, 1); + printf ("BACK: %d, %d ---- %d, %d\n", fromr, fromc, tor, toc); + r = tor - 1; + } -return; + return; } /******************************************************************************/ -void connect_mid() +void +connect_mid () { - int r, c; - int fromr, fromc, tor, toc; - int mid, i; - - - /* make gcc shutup about these being uninitialized */ - fromc = tor = toc = -1; - - - for( r = 0; r < map.num_row; r++ ) - { -printf("row == %d, count[%d] = %d\n", r, r, count[r]); - if( count[r] == 0 ) - continue; - - fromr = r; - - /* find first middle well */ - mid = count[fromr]/2; - i = 0; - for( c = 0; c < map.num_col; c++ ) - { - if( grid[fromr][c] == 1 ) - { - fromc = c; - if( i == mid ) - break; - i++; - } - } - - - /* tor = -1; */ - /* find to row */ - for( r++; r < map.num_row; r++ ) - { - if( count[r] > 0 ) - { - tor = r; - break; - } - } - /* there might not be another row after from row */ - if( r == map.num_row ) - break; - - - /* find first middle well */ - mid = count[tor]/2; - i = 0; -printf("count[tor]/2 == %d/2 == %d\n", count[tor], mid); - for( c = 0; c < map.num_col; c++ ) - { - if( grid[tor][c] == 1 ) - { - toc = c; - if( i == mid ) - break; - i++; - } - } - - draw_pipe(fromr, fromc, tor, toc, 0); -printf("pipe= %d, %d --- %d, %d\n", fromr, fromc, tor, toc); - r = tor - 1; - } + int r, c; + int fromr, fromc, tor, toc; + int mid, i; + + + /* make gcc shutup about these being uninitialized */ + fromc = tor = toc = -1; + + + for (r = 0; r < map.num_row; r++) + { + printf ("row == %d, count[%d] = %d\n", r, r, count[r]); + if (count[r] == 0) + continue; + + fromr = r; + + /* find first middle well */ + mid = count[fromr] / 2; + i = 0; + for (c = 0; c < map.num_col; c++) + { + if (grid[fromr][c] == 1) + { + fromc = c; + if (i == mid) + break; + i++; + } + } + + + /* tor = -1; */ + /* find to row */ + for (r++; r < map.num_row; r++) + { + if (count[r] > 0) + { + tor = r; + break; + } + } + /* there might not be another row after from row */ + if (r == map.num_row) + break; + + + /* find first middle well */ + mid = count[tor] / 2; + i = 0; + printf ("count[tor]/2 == %d/2 == %d\n", count[tor], mid); + for (c = 0; c < map.num_col; c++) + { + if (grid[tor][c] == 1) + { + toc = c; + if (i == mid) + break; + i++; + } + } + + draw_pipe (fromr, fromc, tor, toc, 0); + printf ("pipe= %d, %d --- %d, %d\n", fromr, fromc, tor, toc); + r = tor - 1; + } } /******************************************************************************/ -void circuit() +void +circuit () { - int r, c; - int do_cut; - int radius; - int centerx, centery; - - - clear_invert_map(); - - grid = (char **) create_grid(map.num_row, map.num_col, sizeof(char)); - count = (int *) create_array(map.num_row, sizeof(int)); - - radius = (map.sec_width > map.sec_height ? map.sec_width : map.sec_height)/4.0; - radius = (radius == 0 ? 1 : radius ); - - size = (map.sec_width > map.sec_height ? map.sec_width : map.sec_height)/12.0; - size = (size == 0 ? 1 : size); - - for( r = 0; r < map.num_row; r++ ) - { - count[r] = 0; - for( c = 0; c < map.num_col; c++ ) - { - if( (r == 0 || r == map.num_row-1) - && (c == 0 || c == map.num_col/2 || c == map.num_col-1) ) - do_cut = 1; - else - do_cut = rand()%4; - - if( do_cut != 1 ) - { - grid[r][c] = 0; - continue; - } - - section_center(¢erx, ¢ery, r, c); - circlefill(map.map, centerx, centery, radius, 255); - - grid[r][c] = 1; - count[r]++; - } - } - - - connect_rows(); - connect_front(); - connect_back(); - connect_mid(); - - delete_grid((void **)grid, map.num_row); - delete_array(count); - - /* redraw outline */ - /* TODO: once in a while if cuts off the edge.. */ - rect(map.map, 0, 0, map.width-1, map.height-1, 0); + int r, c; + int do_cut; + int radius; + int centerx, centery; + + + clear_invert_map (); + + grid = (char **) create_grid (map.num_row, map.num_col, sizeof (char)); + count = (int *) create_array (map.num_row, sizeof (int)); + + radius = + (map.sec_width > map.sec_height ? map.sec_width : map.sec_height) / 4.0; + radius = (radius == 0 ? 1 : radius); + + size = + (map.sec_width > map.sec_height ? map.sec_width : map.sec_height) / 12.0; + size = (size == 0 ? 1 : size); + + for (r = 0; r < map.num_row; r++) + { + count[r] = 0; + for (c = 0; c < map.num_col; c++) + { + if ((r == 0 || r == map.num_row - 1) + && (c == 0 || c == map.num_col / 2 || c == map.num_col - 1)) + do_cut = 1; + else + do_cut = rand () % 4; + + if (do_cut != 1) + { + grid[r][c] = 0; + continue; + } + + section_center (¢erx, ¢ery, r, c); + circlefill (map.map, centerx, centery, radius, 255); + + grid[r][c] = 1; + count[r]++; + } + } + + + connect_rows (); + connect_front (); + connect_back (); + connect_mid (); + + delete_grid ((void **) grid, map.num_row); + delete_array (count); + + /* redraw outline */ + /* TODO: once in a while if cuts off the edge.. */ + rect (map.map, 0, 0, map.width - 1, map.height - 1, 0); -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/cut.c liquidwar-5.6.5/utils/lwmapgen/cut.c --- liquidwar-5.6.4/utils/lwmapgen/cut.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/cut.c 2018-12-23 19:04:36.000000000 +0000 @@ -8,64 +8,66 @@ #include "map.h" -void cut() +void +cut () { - int i, size; - int startx, starty, endx, endy; - int fromr, fromc, tor, toc; - int vert[8]; - - - size = (map.sec_width > map.sec_height ? map.sec_width : map.sec_height)/8.0; - size = (size == 0 ? 1 : size); - - /* vertical */ - fromr = 0; - tor = map.num_row-1; - for( i = 0; i < map.num_col; i += 2 ) - { - fromc = rand()%map.num_col; - toc = rand()%map.num_col; - - section_center(&startx, &starty, fromr, fromc); - section_center(&endx, &endy, tor, toc); - - vert[0] = startx - size; - vert[1] = 1; - vert[2] = startx + size; - vert[3] = 1; - - vert[4] = endx + size; - vert[5] = map.height - 1; - vert[6] = endx - size; - vert[7] = map.height - 1; - - polygon(map.map, 4, vert, 255); - } - - /* horizontial */ - fromc = 0; - toc = map.num_col-1; - for( i = 0; i < map.num_row; i += 2 ) - { - fromr = rand()%map.num_row; - tor = rand()%map.num_row; - - section_center(&startx, &starty, fromr, fromc); - section_center(&endx, &endy, tor, toc); - - vert[0] = 1; - vert[1] = starty + size; - vert[2] = 1; - vert[3] = starty - size; - - vert[4] = map.width - 2; - vert[5] = endy - size; - vert[6] = map.width - 2; - vert[7] = endy + size; + int i, size; + int startx, starty, endx, endy; + int fromr, fromc, tor, toc; + int vert[8]; + + + size = + (map.sec_width > map.sec_height ? map.sec_width : map.sec_height) / 8.0; + size = (size == 0 ? 1 : size); + + /* vertical */ + fromr = 0; + tor = map.num_row - 1; + for (i = 0; i < map.num_col; i += 2) + { + fromc = rand () % map.num_col; + toc = rand () % map.num_col; + + section_center (&startx, &starty, fromr, fromc); + section_center (&endx, &endy, tor, toc); + + vert[0] = startx - size; + vert[1] = 1; + vert[2] = startx + size; + vert[3] = 1; + + vert[4] = endx + size; + vert[5] = map.height - 1; + vert[6] = endx - size; + vert[7] = map.height - 1; + + polygon (map.map, 4, vert, 255); + } + + /* horizontial */ + fromc = 0; + toc = map.num_col - 1; + for (i = 0; i < map.num_row; i += 2) + { + fromr = rand () % map.num_row; + tor = rand () % map.num_row; + + section_center (&startx, &starty, fromr, fromc); + section_center (&endx, &endy, tor, toc); + + vert[0] = 1; + vert[1] = starty + size; + vert[2] = 1; + vert[3] = starty - size; + + vert[4] = map.width - 2; + vert[5] = endy - size; + vert[6] = map.width - 2; + vert[7] = endy + size; - polygon(map.map, 4, vert, 255); - } + polygon (map.map, 4, vert, 255); + } -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/cut.h liquidwar-5.6.5/utils/lwmapgen/cut.h --- liquidwar-5.6.4/utils/lwmapgen/cut.h 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/cut.h 2018-12-23 19:04:36.000000000 +0000 @@ -6,6 +6,6 @@ #ifndef LWMAPGEN_CUT_H #define LWMAPGEN_CUT_H -void cut(); +void cut (); #endif diff -Nru liquidwar-5.6.4/utils/lwmapgen/func.c liquidwar-5.6.5/utils/lwmapgen/func.c --- liquidwar-5.6.4/utils/lwmapgen/func.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/func.c 2018-12-23 19:04:36.000000000 +0000 @@ -9,21 +9,33 @@ #include "func_list.h" -func_t func[MAX_FUNC] = -{ - /* keep this first! */ - { "rand_func", "Picks a random function.", rand_func }, +func_t func[MAX_FUNC] = { + /* keep this first! */ + {"rand_func", "Picks a random function.", rand_func} + , - { "big_quad", "One big, solid quad that takes up most of the map.", big_quad }, - { "boxes", "A bunch of boxes of the same size.", boxes }, - { "bubbles", "Random bubbles.", bubbles }, - { "circles", "Random circles.", circles }, - { "circuit", "A map that looks like a circuit board.", circuit }, - { "hole", "Randomly shaped hole.", hole }, - { "lines", "A grid of random lines.", lines }, - { "rand_box", "Random boxes.", rand_box }, - { "rand_poly", "One big, solid, random polygon that takes up most of the map.", rand_poly }, - { "rand_poly_cut", "Do rand_poly then cut lines across it.", rand_poly_cut }, - { "street", "A map that looks like a bunch of streets.", street }, - { "worms", "Random little worms.", worms } + {"big_quad", "One big, solid quad that takes up most of the map.", big_quad} + , + {"boxes", "A bunch of boxes of the same size.", boxes} + , + {"bubbles", "Random bubbles.", bubbles} + , + {"circles", "Random circles.", circles} + , + {"circuit", "A map that looks like a circuit board.", circuit} + , + {"hole", "Randomly shaped hole.", hole} + , + {"lines", "A grid of random lines.", lines} + , + {"rand_box", "Random boxes.", rand_box} + , + {"rand_poly", + "One big, solid, random polygon that takes up most of the map.", rand_poly} + , + {"rand_poly_cut", "Do rand_poly then cut lines across it.", rand_poly_cut} + , + {"street", "A map that looks like a bunch of streets.", street} + , + {"worms", "Random little worms.", worms} }; diff -Nru liquidwar-5.6.4/utils/lwmapgen/func.h liquidwar-5.6.5/utils/lwmapgen/func.h --- liquidwar-5.6.4/utils/lwmapgen/func.h 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/func.h 2018-12-23 19:04:36.000000000 +0000 @@ -15,9 +15,9 @@ typedef struct { - char *name; - char *desc; - void (*func)(); + char *name; + char *desc; + void (*func) (); } func_t; extern func_t func[MAX_FUNC]; diff -Nru liquidwar-5.6.4/utils/lwmapgen/func_list.h liquidwar-5.6.5/utils/lwmapgen/func_list.h --- liquidwar-5.6.4/utils/lwmapgen/func_list.h 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/func_list.h 2018-12-23 19:04:36.000000000 +0000 @@ -18,19 +18,19 @@ #define LWMAPGEN_FUNC_LIST_H -void big_quad(); -void boxes(); -void bubbles(); -void circles(); -void circuit(); -void hole(); -void lines(); -void rand_box(); -void rand_func(); -void rand_poly(); -void rand_poly_cut(); -void street(); -void worms(); +void big_quad (); +void boxes (); +void bubbles (); +void circles (); +void circuit (); +void hole (); +void lines (); +void rand_box (); +void rand_func (); +void rand_poly (); +void rand_poly_cut (); +void street (); +void worms (); #endif diff -Nru liquidwar-5.6.4/utils/lwmapgen/hole.c liquidwar-5.6.5/utils/lwmapgen/hole.c --- liquidwar-5.6.4/utils/lwmapgen/hole.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/hole.c 2018-12-23 19:04:36.000000000 +0000 @@ -9,11 +9,12 @@ #include "func_list.h" -void hole() +void +hole () { - map.color = 255; - clear_invert_map(); - rand_poly(); + map.color = 255; + clear_invert_map (); + rand_poly (); -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/lines.c liquidwar-5.6.5/utils/lwmapgen/lines.c --- liquidwar-5.6.4/utils/lwmapgen/lines.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/lines.c 2018-12-23 19:04:36.000000000 +0000 @@ -9,9 +9,10 @@ #include "cut.h" -void lines() +void +lines () { - clear_invert_map(); - cut(); -return; + clear_invert_map (); + cut (); + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/main.c liquidwar-5.6.5/utils/lwmapgen/main.c --- liquidwar-5.6.4/utils/lwmapgen/main.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/main.c 2018-12-23 19:04:36.000000000 +0000 @@ -14,38 +14,29 @@ #include "func.h" #include "map_generator.h" - static char *filename = NULL; static int size = DEFAULT_MAP_SIZE; static int grid_size = RANDOM_MAP_GRID_SIZE; static int func_id = MIN_FUNC; - -void do_args(int argc, char **argv); -void print_help(); -void print_version(); +void do_args (int argc, char **argv); +void print_help (); +void print_version (); #ifdef DOS /* * These macros reduce the size of the DOS executable */ BEGIN_GFX_DRIVER_LIST -END_GFX_DRIVER_LIST - -BEGIN_COLOR_DEPTH_LIST -COLOR_DEPTH_8 -END_COLOR_DEPTH_LIST - -BEGIN_DIGI_DRIVER_LIST -END_DIGI_DRIVER_LIST - -BEGIN_MIDI_DRIVER_LIST -END_MIDI_DRIVER_LIST - -BEGIN_JOYSTICK_DRIVER_LIST -END_JOYSTICK_DRIVER_LIST + END_GFX_DRIVER_LIST + BEGIN_COLOR_DEPTH_LIST + COLOR_DEPTH_8 + END_COLOR_DEPTH_LIST + BEGIN_DIGI_DRIVER_LIST + END_DIGI_DRIVER_LIST + BEGIN_MIDI_DRIVER_LIST + END_MIDI_DRIVER_LIST BEGIN_JOYSTICK_DRIVER_LIST END_JOYSTICK_DRIVER_LIST #endif - #ifdef WIN32 /* * Under Win32 we want a console executable so we don't use @@ -53,190 +44,230 @@ */ #undef main #endif - -int main( int argc, char **argv ) + int +main (int argc, char **argv) { - PALETTE pal; - int i; - - - /* init allegro and init palette */ - install_allegro(SYSTEM_NONE, &errno, atexit); - set_color_depth(8); - set_color_conversion(COLORCONV_REDUCE_TO_256); - for( i = 0; i < 256; i++ ) - { - /* divided by 4 because the colour value ranges from 0-63 */ - pal[i].r = pal[i].g = pal[i].b = i/4; - } + PALETTE pal; + int i; + /* init allegro and init palette */ + install_allegro (SYSTEM_NONE, &errno, atexit); + set_color_depth (8); + set_color_conversion (COLORCONV_REDUCE_TO_256); + for (i = 0; i < 256; i++) + { + /* divided by 4 because the colour value ranges from 0-63 */ + pal[i].r = pal[i].g = pal[i].b = i / 4; + } - srand(time(NULL)); + srand (time (NULL)); - do_args(argc, argv); + do_args (argc, argv); -printf("filename = %s\n", filename); + printf ("filename = %s\n", filename); - map_generator(filename, size, grid_size, func_id); + map_generator (filename, size, grid_size, func_id); -printf("map-- %s\n", map.filename); - save_bitmap(map.filename, map.map, pal); -printf("map-- %s\n", map.filename); + printf ("map-- %s\n", map.filename); + save_bitmap (map.filename, map.map, pal); + printf ("map-- %s\n", map.filename); -return EXIT_SUCCESS; + return EXIT_SUCCESS; } #ifndef WIN32 -END_OF_MAIN(); +END_OF_MAIN (); #endif /*****************************************************************************/ -void do_args( int argc, char **argv ) +void +do_args (int argc, char **argv) { - int i; + int i; - for( i = 1; i < argc; i++ ) - { - if( strcmp(argv[i], "-o") == 0 || strcmp(argv[i], "--out") == 0 ) - { - int len = strlen(argv[++i]); - filename = malloc( sizeof(char)*len ); - if( filename == NULL ) - { - fprintf(stderr, "fatal error: can't malloc space for map name.\n"); - exit(EXIT_FAILURE); - } - strcpy(filename, argv[i]); - } - else if( strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--size") == 0 ) - { - size = atoi(argv[++i]); - if( size < MIN_MAP_SIZE ) - { - fprintf(stderr, "map size too small using: %d\n", MIN_MAP_SIZE); - size = MIN_MAP_SIZE; - } - else if( size >= MAX_MAP_SIZE ) - { - fprintf(stderr, "map size too large using: %d\n", MAX_MAP_SIZE-1); - size = MAX_MAP_SIZE-1; - } - } - else if( strcmp(argv[i], "-g") == 0 || strcmp(argv[i], "--grid") == 0 ) - { - grid_size = atoi(argv[++i]); - if( grid_size == RANDOM_MAP_GRID_SIZE ) - { - /* ok.. don't do anything */ - } - else if( grid_size < MIN_MAP_GRID_SIZE ) - { - fprintf(stderr, "map grid too small using: %d\n", MIN_MAP_GRID_SIZE); - grid_size = MIN_MAP_GRID_SIZE; - } - else if( grid_size >= MAX_MAP_GRID_SIZE ) - { - fprintf(stderr, "map grid too large using: %d\n", MAX_MAP_GRID_SIZE-1); - grid_size = MAX_MAP_GRID_SIZE-1; - } - } - else if( strcmp(argv[i], "-f") == 0 || strcmp(argv[i], "--function") == 0 ) - { - int f; - i++; - for( f = 0; f < MAX_FUNC; f++ ) - { - if( strcmp(argv[i], func[f].name) == 0 ) - break; - } - if( f >= MAX_FUNC ) - { - fprintf(stderr, "fatal error: can't find function: %s\n", argv[i]); - exit(EXIT_FAILURE); - } - else - func_id = f; - } - else if( strcmp(argv[i], "-l") == 0 || strcmp(argv[i], "--list") == 0 ) - { - int f; - printf("Random map generating functions:\n"); - for( f = 0; f < MAX_FUNC; f++ ) - printf("%2d) %s\t%s\n", f, func[f].name, func[f].desc); - - exit(EXIT_SUCCESS); - } - else if( strcmp(argv[i], "--help") == 0 ) - { - print_version(); - print_help(); - exit(EXIT_SUCCESS); - } - else if( strcmp(argv[i], "--version") == 0 ) - { - print_version(); - exit(EXIT_SUCCESS); - } + for (i = 1; i < argc; i++) + { + if (strcmp (argv[i], "-o") == 0 || strcmp (argv[i], "--out") == 0) + { + if (i >= argc - 1) + { + fprintf (stderr, + "fatal error: %s option without any file, need one more arg.\n", + argv[i]); + exit (EXIT_FAILURE); + } + int len = strlen (argv[++i]); + filename = malloc (sizeof (char) * len); + if (filename == NULL) + { + fprintf (stderr, + "fatal error: can't malloc space for map name.\n"); + exit (EXIT_FAILURE); + } + strcpy (filename, argv[i]); + } + else if (strcmp (argv[i], "-s") == 0 || strcmp (argv[i], "--size") == 0) + { + if (i >= argc - 1) + { + fprintf (stderr, + "fatal error: %s option without any size, need one more arg.\n", + argv[i]); + exit (EXIT_FAILURE); + } + size = atoi (argv[++i]); + if (size < MIN_MAP_SIZE) + { + fprintf (stderr, + "map size too small using: %d\n", MIN_MAP_SIZE); + size = MIN_MAP_SIZE; + } + else if (size >= MAX_MAP_SIZE) + { + fprintf (stderr, + "map size too large using: %d\n", MAX_MAP_SIZE - 1); + size = MAX_MAP_SIZE - 1; + } + } + else if (strcmp (argv[i], "-g") == 0 || strcmp (argv[i], "--grid") == 0) + { + if (i >= argc - 1) + { + fprintf (stderr, + "fatal error: %s option without any value, need one more arg.\n", + argv[i]); + exit (EXIT_FAILURE); + } + grid_size = atoi (argv[++i]); + if (grid_size == RANDOM_MAP_GRID_SIZE) + { + /* ok.. don't do anything */ + } + else if (grid_size < MIN_MAP_GRID_SIZE) + { + fprintf (stderr, + "map grid too small using: %d\n", MIN_MAP_GRID_SIZE); + grid_size = MIN_MAP_GRID_SIZE; + } + else if (grid_size >= MAX_MAP_GRID_SIZE) + { + fprintf (stderr, + "map grid too large using: %d\n", + MAX_MAP_GRID_SIZE - 1); + grid_size = MAX_MAP_GRID_SIZE - 1; + } + } + else if (strcmp (argv[i], "-f") == 0 + || strcmp (argv[i], "--function") == 0) + { + int f; + + if (i >= argc - 1) + { + fprintf (stderr, + "fatal error: %s option without any function, need one more arg.\n", + argv[i]); + exit (EXIT_FAILURE); + } + i++; + for (f = 0; f < MAX_FUNC; f++) + { + if (strcmp (argv[i], func[f].name) == 0) + break; + } + if (f >= MAX_FUNC) + { + fprintf (stderr, + "fatal error: can't find function: %s\n", argv[i]); + exit (EXIT_FAILURE); + } else - { - fprintf(stderr, "error: unknown arg: %s\n", argv[i]); - fprintf(stderr, "ignoring...\n"); - } - } + func_id = f; + } + else if (strcmp (argv[i], "-l") == 0 || strcmp (argv[i], "--list") == 0) + { + int f; + printf ("Random map generating functions:\n"); + for (f = 0; f < MAX_FUNC; f++) + printf ("%2d) %s\t%s\n", f, func[f].name, func[f].desc); + + exit (EXIT_SUCCESS); + } + else if (strcmp (argv[i], "--help") == 0) + { + print_version (); + print_help (); + exit (EXIT_SUCCESS); + } + else if (strcmp (argv[i], "--version") == 0) + { + print_version (); + exit (EXIT_SUCCESS); + } + else + { + fprintf (stderr, "error: unknown arg: %s\n", argv[i]); + fprintf (stderr, "ignoring...\n"); + } + } -return; + return; } /*****************************************************************************/ -void print_help() +void +print_help () { - int i; + int i; - printf("\n"); - printf("-o --out Save bitmap to . [%s]\n", - default_filename); - printf("-s --size <%d-%d> Bitmap size. [%d]\n", - 0, MAX_MAP_SIZE-1, DEFAULT_MAP_SIZE); - printf("-g --grid <%d-%d> Map Grid Size [0]\n", - 0, MAX_MAP_GRID_SIZE-1); - printf("\n"); - printf("-f --function Which function to use. [rand_func]\n"); - printf("-l --list List all functions.\n"); - printf("\n"); - printf(" --help Print this help.\n"); - printf(" --version Print Version.\n"); - - printf("\nMap Sizes (WxH):\n"); - for( i = MIN_MAP_SIZE; i < MAX_MAP_SIZE; i++ ) - printf("(%d)%dx%d ", i, map_size[i][0], map_size[i][1]); - printf("\n"); - - printf("\nGrid Sizes (RxC):\n"); - printf("(0) Random "); - for( i = MIN_MAP_GRID_SIZE; i < MAX_MAP_GRID_SIZE; i++ ) - { - if( i > 0 && i%8 == 0 ) - printf("\n"); - printf("(%d)%dx%d ", i, map_grid_size[i][0], map_grid_size[i][1]); - } - printf("\n"); + printf ("\n"); + printf + ("-o --out Save bitmap to . [%s]\n", + default_filename); + printf + ("-s --size <%d-%d> Bitmap size. [%d]\n", + 0, MAX_MAP_SIZE - 1, DEFAULT_MAP_SIZE); + printf + ("-g --grid <%d-%d> Map Grid Size [0]\n", + 0, MAX_MAP_GRID_SIZE - 1); + printf ("\n"); + printf + ("-f --function Which function to use. [rand_func]\n"); + printf ("-l --list List all functions.\n"); + printf ("\n"); + printf (" --help Print this help.\n"); + printf (" --version Print Version.\n"); + + printf ("\nMap Sizes (WxH):\n"); + for (i = MIN_MAP_SIZE; i < MAX_MAP_SIZE; i++) + printf ("(%d)%dx%d ", i, map_size[i][0], map_size[i][1]); + printf ("\n"); + + printf ("\nGrid Sizes (RxC):\n"); + printf ("(0) Random "); + for (i = MIN_MAP_GRID_SIZE; i < MAX_MAP_GRID_SIZE; i++) + { + if (i > 0 && i % 8 == 0) + printf ("\n"); + printf ("(%d)%dx%d ", i, map_grid_size[i][0], map_grid_size[i][1]); + } + printf ("\n"); -return; + return; } /*****************************************************************************/ -void print_version() +void +print_version () { - printf( - "Liquid War Random Map Generator Version 0.0.1\n" - "Copyright (C) 2003, David Redick, Chris Guirl, Christian Mauduit.\n" - "Released under the GNU General Public License (v2).\n" - ); + printf ("Liquid War Random Map Generator Version 0.0.1\n" + "Copyright (C) 2003, David Redick, Chris Guirl, Christian Mauduit.\n" + "Released under the GNU General Public License (v2).\n"); -return; + return; } /*****************************************************************************/ diff -Nru liquidwar-5.6.4/utils/lwmapgen/Makefile liquidwar-5.6.5/utils/lwmapgen/Makefile --- liquidwar-5.6.4/utils/lwmapgen/Makefile 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -# Copyright (C) 2003, David Redick -# Released under the GNU General Public License (v2) - -CC=gcc -CFLAGS=-ggdb -O3 -Wall -W -ansi `allegro-config --cflags` -LDFLAGS=`allegro-config --libs` -lm -EXE=liquidwar-mapgen - -OBJ=big_quad.o boxes.o bubbles.o circles.o circuit.o cut.o func.o hole.o \ - lines.o map.o map_generator.o misc.o rand_box.o rand_func.o rand_poly.o \ - rand_poly_cut.o street.o worms.o - - -all: $(EXE) - -$(EXE): core main.c - $(CC) $(CFLAGS) main.c $(OBJ) $(LDFLAGS) -o $(EXE) - #strip $(EXE) - -core: $(OBJ) - @echo "" - @echo "Done compiling core functions..." - @echo "" - -clean: cleanmap - rm -rf $(EXE) *~ *.o - -cleanmaps: cleanmap - -cleanmap: - rm -rf *.bmp ./maps/* - -############################################################################### -# core files... keep func.o, map.o, map_generator.o and misc.o at top - -misc.o: misc.c misc.h - $(CC) $(CFLAGS) -c misc.c - -func.o: func.c func.h func_list.h - $(CC) $(CFLAGS) -c func.c - -map.o: map.c map.h func.o misc.o - $(CC) $(CFLAGS) -c map.c - -map_generator.o: map_generator.c map_generator.h map.o - $(CC) $(CFLAGS) -c map_generator.c - - -big_quad.o: big_quad.c map.o - $(CC) $(CFLAGS) -c big_quad.c - -boxes.o: boxes.c map.o - $(CC) $(CFLAGS) -c boxes.c - -bubbles.o: bubbles.c map.o - $(CC) $(CFLAGS) -c bubbles.c - -circles.o: circles.c map.o - $(CC) $(CFLAGS) -c circles.c - -circuit.o: circuit.c map.o - $(CC) $(CFLAGS) -c circuit.c - -cut.o: cut.c cut.h map.o - $(CC) $(CFLAGS) -c cut.c - -hole.o: hole.c rand_poly.o - $(CC) $(CFLAGS) -c hole.c - -lines.o: lines.c cut.o - $(CC) $(CFLAGS) -c lines.c - -rand_box.o: rand_box.c map.o - $(CC) $(CFLAGS) -c rand_box.c - -rand_func.o: rand_func.c map.o - $(CC) $(CFLAGS) -c rand_func.c - -rand_poly.o: rand_poly.c map.o - $(CC) $(CFLAGS) -c rand_poly.c - -rand_poly_cut.o: rand_poly_cut.c rand_poly.o cut.o - $(CC) $(CFLAGS) -c rand_poly_cut.c - -street.o: street.c map.o - $(CC) $(CFLAGS) -c street.c - -worms.o: worms.c map.o - $(CC) $(CFLAGS) -c worms.c diff -Nru liquidwar-5.6.4/utils/lwmapgen/map.c liquidwar-5.6.5/utils/lwmapgen/map.c --- liquidwar-5.6.4/utils/lwmapgen/map.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/map.c 2018-12-23 19:04:36.000000000 +0000 @@ -13,33 +13,31 @@ /* [2] for w == 0, h == 1 */ -int map_size[MAX_MAP_SIZE][2] = -{ - { 128, 95 }, /* 0 */ - { 160, 120 }, /* 1 */ - { 256, 190 }, /* 2 */ - { 320, 240 }, /* 3 */ - { 512, 380 }, /* 4 */ - { 640, 480 } /* 5 */ +int map_size[MAX_MAP_SIZE][2] = { + {128, 95}, /* 0 */ + {160, 120}, /* 1 */ + {256, 190}, /* 2 */ + {320, 240}, /* 3 */ + {512, 380}, /* 4 */ + {640, 480} /* 5 */ }; /* [2] for r == 0, c == 1 */ /* the maps just look better if the ratio is the same */ -int map_grid_size[MAX_MAP_GRID_SIZE][2] = -{ - /* this is random. keep at top */ - { 0, 0 }, /* 0 */ - - { 2, 3 }, /* 1 */ - { 4, 6 }, /* 2 */ - { 6, 9 }, /* 3 */ - { 8, 12 }, /* 4 */ - { 10, 15 }, /* 5 */ - { 12, 18 }, /* 6 */ - { 14, 21 }, /* 7 */ - { 16, 24 }, /* 8 */ - { 18, 26 } /* 9 */ +int map_grid_size[MAX_MAP_GRID_SIZE][2] = { + /* this is random. keep at top */ + {0, 0}, /* 0 */ + + {2, 3}, /* 1 */ + {4, 6}, /* 2 */ + {6, 9}, /* 3 */ + {8, 12}, /* 4 */ + {10, 15}, /* 5 */ + {12, 18}, /* 6 */ + {14, 21}, /* 7 */ + {16, 24}, /* 8 */ + {18, 26} /* 9 */ }; @@ -47,92 +45,100 @@ /*****************************************************************************/ -void clear_map() +void +clear_map () { - clear_to_color(map.map, 255); - /* draw outline */ - rect(map.map, 0, 0, map.width-1, map.height-1, 0); + clear_to_color (map.map, 255); + /* draw outline */ + rect (map.map, 0, 0, map.width - 1, map.height - 1, 0); } /*****************************************************************************/ -void clear_invert_map() +void +clear_invert_map () { - clear_to_color(map.map, 0); + clear_to_color (map.map, 0); } /*****************************************************************************/ /* print map info to stdout */ /* really for debugging */ -void print_map() +void +print_map () { - printf("Name: %s\n", map.filename); - printf("Size: %dx%d\n", map.width, map.height); - printf("Row/Col: %d/%d\n", map.num_row, map.num_col); - printf("Section: %fx%f\n", map.sec_width, map.sec_height); - printf("Function: (%d) %s\t%s\n", map.func_id, + printf ("Name: %s\n", map.filename); + printf ("Size: %dx%d\n", map.width, map.height); + printf ("Row/Col: %d/%d\n", map.num_row, map.num_col); + printf ("Section: %fx%f\n", map.sec_width, map.sec_height); + printf ("Function: (%d) %s\t%s\n", map.func_id, func[map.func_id].name, func[map.func_id].desc); } /*****************************************************************************/ /* get r, c from i */ -void section_rc( int *r, int *c, int i ) +void +section_rc (int *r, int *c, int i) { - *r = i / map.num_col; - *c = i % map.num_col; + *r = i / map.num_col; + *c = i % map.num_col; -return; + return; } /*****************************************************************************/ -void offset( int *xoffset, int *yoffset, int r, int c) +void +offset (int *xoffset, int *yoffset, int r, int c) { - *xoffset = c * map.sec_width; - *yoffset = r * map.sec_height; + *xoffset = c * map.sec_width; + *yoffset = r * map.sec_height; -return; + return; } /*****************************************************************************/ /* TODO: does this cause rounding errors? */ -void rand_point_section( int *x, int *y, int pad ) +void +rand_point_section (int *x, int *y, int pad) { - *x = rand_num(pad, map.sec_width-pad); - *y = rand_num(pad, map.sec_height-pad); + *x = rand_num (pad, map.sec_width - pad); + *y = rand_num (pad, map.sec_height - pad); -return; + return; } /*****************************************************************************/ /* TODO: does this cause rounding errors? */ -void rand_point_section_offset( int *x, int *y, int r, int c, int pad ) +void +rand_point_section_offset (int *x, int *y, int r, int c, int pad) { - int xoffset, yoffset; + int xoffset, yoffset; - offset(&xoffset, &yoffset, r, c); + offset (&xoffset, &yoffset, r, c); - *x = rand_num(pad, map.sec_width-pad) + xoffset; - *y = rand_num(pad, map.sec_height-pad) + yoffset; + *x = rand_num (pad, map.sec_width - pad) + xoffset; + *y = rand_num (pad, map.sec_height - pad) + yoffset; -return; + return; } /*****************************************************************************/ -void section_center( int *x, int *y, int r, int c ) +void +section_center (int *x, int *y, int r, int c) { - int xoffset, yoffset; + int xoffset, yoffset; - offset(&xoffset, &yoffset, r, c); + offset (&xoffset, &yoffset, r, c); - *x = (map.sec_width/2.0)+xoffset; - *y = (map.sec_height/2.0)+yoffset; + *x = (map.sec_width / 2.0) + xoffset; + *y = (map.sec_height / 2.0) + yoffset; -return; + return; } /*****************************************************************************/ diff -Nru liquidwar-5.6.4/utils/lwmapgen/map_generator.c liquidwar-5.6.5/utils/lwmapgen/map_generator.c --- liquidwar-5.6.4/utils/lwmapgen/map_generator.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/map_generator.c 2018-12-23 19:04:36.000000000 +0000 @@ -26,54 +26,55 @@ #include "map.h" -void map_generator( char *filename, int size, int grid_size, int func_id ) +void +map_generator (char *filename, int size, int grid_size, int func_id) { - char *fname; + char *fname; - if( filename == NULL ) - fname = default_filename; - else - fname = filename; + if (filename == NULL) + fname = default_filename; + else + fname = filename; - map.filename = malloc( sizeof(char)*strlen(fname) ); - if( map.filename == NULL ) - { - fprintf(stderr, "fatal error: can't malloc space for map filename.\n"); - exit(EXIT_FAILURE); - } - strcpy(map.filename, fname); + map.filename = malloc (sizeof (char) * strlen (fname)); + if (map.filename == NULL) + { + fprintf (stderr, "fatal error: can't malloc space for map filename.\n"); + exit (EXIT_FAILURE); + } + strcpy (map.filename, fname); -printf("map.filename = %s\n", map.filename); + printf ("map.filename = %s\n", map.filename); - map.width = map_size[size][0]; - map.height = map_size[size][1]; + map.width = map_size[size][0]; + map.height = map_size[size][1]; - map.map = create_bitmap_ex(8, map.width, map.height); + map.map = create_bitmap_ex (8, map.width, map.height); - if( grid_size == RANDOM_MAP_GRID_SIZE ) - grid_size = rand_num(MIN_MAP_GRID_SIZE, MAX_MAP_GRID_SIZE-1); - map.num_row = map_grid_size[grid_size][0]; - map.num_col = map_grid_size[grid_size][1]; + if (grid_size == RANDOM_MAP_GRID_SIZE) + grid_size = rand_num (MIN_MAP_GRID_SIZE, MAX_MAP_GRID_SIZE - 1); + map.num_row = map_grid_size[grid_size][0]; + map.num_col = map_grid_size[grid_size][1]; - map.sec_width = (float)map.width / (float)map.num_col; - map.sec_height = (float)map.height / (float)map.num_row; + map.sec_width = (float) map.width / (float) map.num_col; + map.sec_height = (float) map.height / (float) map.num_row; - map.color = 0; + map.color = 0; - map.func_id = func_id; - map.func = func[func_id].func; + map.func_id = func_id; + map.func = func[func_id].func; - clear_map(); + clear_map (); - printf("Generating random map using:\n\t%2d) %s\t%s\n", + printf ("Generating random map using:\n\t%2d) %s\t%s\n", func_id, func[func_id].name, func[func_id].desc); -print_map(); + print_map (); - (*map.func)(); + (*map.func) (); -print_map(); + print_map (); -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/map_generator.h liquidwar-5.6.5/utils/lwmapgen/map_generator.h --- liquidwar-5.6.4/utils/lwmapgen/map_generator.h 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/map_generator.h 2018-12-23 19:04:36.000000000 +0000 @@ -24,7 +24,7 @@ #define LWMAPGEN_MAP_GENERATOR_H -void map_generator( char *filename, int size, int grid_size, int func_id ); +void map_generator (char *filename, int size, int grid_size, int func_id); #endif diff -Nru liquidwar-5.6.4/utils/lwmapgen/map.h liquidwar-5.6.5/utils/lwmapgen/map.h --- liquidwar-5.6.4/utils/lwmapgen/map.h 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/map.h 2018-12-23 19:04:36.000000000 +0000 @@ -33,34 +33,34 @@ typedef struct { - char *filename; /* should not be changed */ + char *filename; /* should not be changed */ - int width, height; /* should not be changed */ - BITMAP *map; + int width, height; /* should not be changed */ + BITMAP *map; - /* grid size */ - int num_row, num_col; + /* grid size */ + int num_row, num_col; - /* section size */ - float sec_width, sec_height; /* should not be changed */ + /* section size */ + float sec_width, sec_height; /* should not be changed */ - /* the color to draw with */ - int color; /* 0 == normal, 255 == inverted */ + /* the color to draw with */ + int color; /* 0 == normal, 255 == inverted */ - int func_id; - void (*func)(); + int func_id; + void (*func) (); } map_t; extern map_t map; /* sets up the map for drawing */ -void clear_map(); -void clear_invert_map(); +void clear_map (); +void clear_invert_map (); /* print all the map info to stdout */ /* really for debugging */ -void print_map(); +void print_map (); /*****************************************************************************/ @@ -80,16 +80,16 @@ #define section(r,c) ( (r*map.num_col)+c ) /* get r, c from i */ -void section_rc( int *row, int *col, int i ); +void section_rc (int *row, int *col, int i); -void offset( int *xoffset, int *yoffset, int r, int c ); +void offset (int *xoffset, int *yoffset, int r, int c); -void rand_point_section( int *x, int *y, int pad ); +void rand_point_section (int *x, int *y, int pad); -void rand_point_section_offset( int *x, int *y, int r, int c, int pad ); +void rand_point_section_offset (int *x, int *y, int r, int c, int pad); -void section_center( int *x, int *y, int r, int c ); +void section_center (int *x, int *y, int r, int c); /*****************************************************************************/ diff -Nru liquidwar-5.6.4/utils/lwmapgen/misc.c liquidwar-5.6.5/utils/lwmapgen/misc.c --- liquidwar-5.6.4/utils/lwmapgen/misc.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/misc.c 2018-12-23 19:04:36.000000000 +0000 @@ -6,84 +6,93 @@ /*****************************************************************************/ /* generate a random num from min to max inclusive on both ends */ -int rand_num( int min, int max ) +int +rand_num (int min, int max) { - /* prevent /0 errors and strange numbers */ - if( min > max ) - { - fprintf(stderr, "for rand_num(%d, %d), max must be > min.\n", min, max); - return max; - } - else if( min == max ) - return max; + /* prevent /0 errors and strange numbers */ + if (min > max) + { + fprintf (stderr, "for rand_num(%d, %d), max must be > min.\n", min, + max); + return max; + } + else if (min == max) + return max; -return rand()%(max-min+1)+min; + return rand () % (max - min + 1) + min; } /*****************************************************************************/ -void * create_array( int length, int size ) +void * +create_array (int length, int size) { - void *array; + void *array; - if( length == 0 || size == 0 ) - { - fprintf(stderr, "can't create an array of 0 length. [%d](%d)\n", length, size); - return NULL; - } - - array = malloc(length*size); - if( array == NULL ) - { - fprintf(stderr, "fatal error: can't malloc space for array.\n"); - exit(EXIT_FAILURE); - } + if (length == 0 || size == 0) + { + fprintf (stderr, "can't create an array of 0 length. [%d](%d)\n", + length, size); + return NULL; + } + + array = malloc (length * size); + if (array == NULL) + { + fprintf (stderr, "fatal error: can't malloc space for array.\n"); + exit (EXIT_FAILURE); + } -return array; + return array; } -void delete_array( void *array ) +void +delete_array (void *array) { - free(array); -return; + free (array); + return; } /*****************************************************************************/ -void ** create_grid( int r, int c, int size ) +void ** +create_grid (int r, int c, int size) { - void **grid; - int i; + void **grid; + int i; - if( r == 0 || c == 0 || size == 0 ) - { - fprintf(stderr, "can't create grid with 0 dimenson/size [%d][%d](%d).\n", r, c, size); - return NULL; - } - - grid = (void **) malloc( r * sizeof(void*) ); - if( grid == NULL ) - { - fprintf(stderr, "fatal error: can't malloc space for grid rows.\n"); - exit(EXIT_FAILURE); - } + if (r == 0 || c == 0 || size == 0) + { + fprintf (stderr, + "can't create grid with 0 dimenson/size [%d][%d](%d).\n", r, c, + size); + return NULL; + } + + grid = (void **) malloc (r * sizeof (void *)); + if (grid == NULL) + { + fprintf (stderr, "fatal error: can't malloc space for grid rows.\n"); + exit (EXIT_FAILURE); + } - for( i = 0; i < r; i++ ) - grid[i] = (void *) create_array(c,size); + for (i = 0; i < r; i++) + grid[i] = (void *) create_array (c, size); -return grid; + return grid; } -void delete_grid( void **grid, int r ) +void +delete_grid (void **grid, int r) { - int i; + int i; - if( r == 0 ) - fprintf(stderr, "can't free grid with 0 rows.\n"); + if (r == 0) + fprintf (stderr, "can't free grid with 0 rows.\n"); - for( i = 0; i < r; i++ ) - delete_array(grid[i]); + for (i = 0; i < r; i++) + delete_array (grid[i]); - free(grid); -return; + free (grid); + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/misc.h liquidwar-5.6.5/utils/lwmapgen/misc.h --- liquidwar-5.6.4/utils/lwmapgen/misc.h 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/misc.h 2018-12-23 19:04:36.000000000 +0000 @@ -10,16 +10,16 @@ /* a random number from min to max inclusive on both ends */ -int rand_num( int min, int max); +int rand_num (int min, int max); /* size == the size of the elements in the array/grid */ -void * create_array( int length, int size ); -void delete_array( void *array ); +void *create_array (int length, int size); +void delete_array (void *array); -void ** create_grid( int r, int c, int size ); -void delete_grid( void **grid, int r ); +void **create_grid (int r, int c, int size); +void delete_grid (void **grid, int r); #endif diff -Nru liquidwar-5.6.4/utils/lwmapgen/rand_box.c liquidwar-5.6.5/utils/lwmapgen/rand_box.c --- liquidwar-5.6.4/utils/lwmapgen/rand_box.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/rand_box.c 2018-12-23 19:04:36.000000000 +0000 @@ -8,43 +8,44 @@ #include "map.h" -void rand_box() +void +rand_box () { - int r, c; - int xoffset, yoffset; + int r, c; + int xoffset, yoffset; - /* the start is the upper left */ - int starty, startx; - int bwidth, bheight; - - - for( r = 0; r < map.num_row; r++ ) - { - for( c = 0; c < map.num_col; c++ ) - { - offset(&xoffset, &yoffset, r, c); - - rand_point_section( &startx, &starty, 1); - - /* +1 because we don't want 0 dimensions =] */ - bwidth = rand() % (int)map.sec_width + 1; - bheight = rand() % (int)map.sec_height + 1; - - /* - * if the box goes outside the section - * then just make the box smaller - * NOTE: -1 is for the padding - */ - if( startx + bwidth > map.sec_width - 1 ) - bwidth -= (startx + bwidth) - (map.sec_width - 1); - - if( starty + bheight > map.sec_height - 1 ) - bheight -= (starty + bheight) - (map.sec_height - 1); - - rectfill(map.map, startx+xoffset, starty+yoffset, - startx+bwidth+xoffset, starty+bheight+yoffset, 0); - } - } + /* the start is the upper left */ + int starty, startx; + int bwidth, bheight; + + + for (r = 0; r < map.num_row; r++) + { + for (c = 0; c < map.num_col; c++) + { + offset (&xoffset, &yoffset, r, c); + + rand_point_section (&startx, &starty, 1); + + /* +1 because we don't want 0 dimensions =] */ + bwidth = rand () % (int) map.sec_width + 1; + bheight = rand () % (int) map.sec_height + 1; + + /* + * if the box goes outside the section + * then just make the box smaller + * NOTE: -1 is for the padding + */ + if (startx + bwidth > map.sec_width - 1) + bwidth -= (startx + bwidth) - (map.sec_width - 1); + + if (starty + bheight > map.sec_height - 1) + bheight -= (starty + bheight) - (map.sec_height - 1); + + rectfill (map.map, startx + xoffset, starty + yoffset, + startx + bwidth + xoffset, starty + bheight + yoffset, 0); + } + } -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/rand_func.c liquidwar-5.6.5/utils/lwmapgen/rand_func.c --- liquidwar-5.6.4/utils/lwmapgen/rand_func.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/rand_func.c 2018-12-23 19:04:36.000000000 +0000 @@ -14,22 +14,23 @@ #include "misc.h" -void rand_func() +void +rand_func () { - int i; - void (*rfunc)(); + int i; + void (*rfunc) (); - /* - * NOTE: I'm assuming that rand_func is the - * first function listed in func.c - * that way I can just pick from 1 to MAX_FUNC-1 - * and the code will be simple. - */ - i = rand_num(1, MAX_FUNC-1); - rfunc = func[i].func; + /* + * NOTE: I'm assuming that rand_func is the + * first function listed in func.c + * that way I can just pick from 1 to MAX_FUNC-1 + * and the code will be simple. + */ + i = rand_num (1, MAX_FUNC - 1); + rfunc = func[i].func; - printf("Random Function: %2d) %s\t%s\n", i, func[i].name, func[i].desc); - (*rfunc)(); + printf ("Random Function: %2d) %s\t%s\n", i, func[i].name, func[i].desc); + (*rfunc) (); -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/rand_poly.c liquidwar-5.6.5/utils/lwmapgen/rand_poly.c --- liquidwar-5.6.4/utils/lwmapgen/rand_poly.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/rand_poly.c 2018-12-23 19:04:36.000000000 +0000 @@ -10,60 +10,61 @@ #define PAD 5 -void rand_poly() +void +rand_poly () { - int r, c; - int num_vert; - int *vert; - int v; - - - /* -4 is for the corners */ - num_vert = (2*map.num_col) + (2*map.num_row) - 4; - vert = create_array(num_vert*2, sizeof(int)); - - v = 0; - - /* top */ - r = 0; - for( c = 0; c < map.num_col; c++ ) - { - rand_point_section_offset(&vert[v], &vert[v+1], r, c, PAD); - v += 2; - } - - - /* right side */ - c = map.num_col-1; - for( r = 1; r < map.num_row; r++ ) - { - rand_point_section_offset(&vert[v], &vert[v+1], r, c, PAD); - v += 2; - } - - - /* bottom */ - r = map.num_row-1; - for( c = map.num_col-2; c >= 0; c-- ) - { - rand_point_section_offset(&vert[v], &vert[v+1], r, c, PAD); - v += 2; - } - - - /* left side */ - c = 0; - for( r = map.num_row-2; r >= 1; r-- ) - { - rand_point_section_offset(&vert[v], &vert[v+1], r, c, PAD); - v += 2; - } - - - /* draw poly */ - polygon(map.map, num_vert, vert, map.color); - - delete_array(vert); - -return; + int r, c; + int num_vert; + int *vert; + int v; + + + /* -4 is for the corners */ + num_vert = (2 * map.num_col) + (2 * map.num_row) - 4; + vert = create_array (num_vert * 2, sizeof (int)); + + v = 0; + + /* top */ + r = 0; + for (c = 0; c < map.num_col; c++) + { + rand_point_section_offset (&vert[v], &vert[v + 1], r, c, PAD); + v += 2; + } + + + /* right side */ + c = map.num_col - 1; + for (r = 1; r < map.num_row; r++) + { + rand_point_section_offset (&vert[v], &vert[v + 1], r, c, PAD); + v += 2; + } + + + /* bottom */ + r = map.num_row - 1; + for (c = map.num_col - 2; c >= 0; c--) + { + rand_point_section_offset (&vert[v], &vert[v + 1], r, c, PAD); + v += 2; + } + + + /* left side */ + c = 0; + for (r = map.num_row - 2; r >= 1; r--) + { + rand_point_section_offset (&vert[v], &vert[v + 1], r, c, PAD); + v += 2; + } + + + /* draw poly */ + polygon (map.map, num_vert, vert, map.color); + + delete_array (vert); + + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/rand_poly_cut.c liquidwar-5.6.5/utils/lwmapgen/rand_poly_cut.c --- liquidwar-5.6.4/utils/lwmapgen/rand_poly_cut.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/rand_poly_cut.c 2018-12-23 19:04:36.000000000 +0000 @@ -10,9 +10,10 @@ #include "cut.h" -void rand_poly_cut() +void +rand_poly_cut () { - rand_poly(); - cut(); -return; + rand_poly (); + cut (); + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/README liquidwar-5.6.5/utils/lwmapgen/README --- liquidwar-5.6.4/utils/lwmapgen/README 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/README 2018-12-23 19:04:36.000000000 +0000 @@ -1,5 +1,5 @@ A Random Map Generator for Liquid War. -Liquid War: http://www.ufoot.org/liquidwar/v5/ +Liquid War: https://ufoot.org/liquidwar/v5/ Generator: http://xdavidx.sqrville.org/lwmapgen/ Requires Allegro and gcc. diff -Nru liquidwar-5.6.4/utils/lwmapgen/street.c liquidwar-5.6.5/utils/lwmapgen/street.c --- liquidwar-5.6.4/utils/lwmapgen/street.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/street.c 2018-12-23 19:04:36.000000000 +0000 @@ -17,115 +17,121 @@ #define MAX_MAIN_ROW 3 #define MAX_MAIN_COL 3 -void street() +void +street () { - int main_row[MAX_MAIN_ROW]; - int main_col[MAX_MAIN_COL]; - int startx, starty, endx, endy; - int r, c, tor, toc; - int size; - int start, way; - int i; - - - clear_invert_map(); - - /* - * TODO: its possible only have 1 main and thats bad... - * 2x3 is best... tho' it may not matter much. - * What about basing the numbers off map.num_row/col?? - * yeah I like that better than macros. - * maybe MMR = #rows % 4 + 1.. - */ - - /* pick the main rows/cols to branch from */ - for( i = 0; i < MAX_MAIN_ROW; i++ ) - main_row[i] = rand()%map.num_row; - for( i = 0; i < MAX_MAIN_COL; i++ ) - main_col[i] = rand()%map.num_col; - - - size = (map.sec_width > map.sec_height ? map.sec_width : map.sec_height)/8; - size = (size == 0 ? 1 : size); - - - /* branch off rows */ - for( i = 0; i < MAX_MAIN_ROW; i++ ) - { - r = main_row[i]; - - /* draw main row */ - section_center(&startx, &starty, r, 0); - section_center(&endx, &endy, r, map.num_col-1); - rectfill(map.map, startx, starty-size, endx, endy+size, 255); - - - /* do the branches */ - start = rand()%2; - for( c = start; c < map.num_col; c += 2 ) - { - section_center(&startx, &starty, r, c); - - way = rand()%3; - - /* draw up */ - if( r != 0 && (way == 0 || way == 2) ) - { - tor = rand()%r; - section_center(&endx, &endy, tor, c); - rectfill(map.map, startx-size, starty, endx+size, endy, 255); - } - - /* draw down */ - if( r != map.num_row-1 && (way == 1 || way == 2) ) - { - - tor = rand_num(r, map.num_row-r); - /* tor = rand()%(map.num_row-r-1)+r+1; */ - section_center(&endx, &endy, tor, c); - rectfill(map.map, startx-size, starty, endx+size, endy, 255); - } - } - } - - - /* branch off cols */ - for( i = 0; i < MAX_MAIN_COL; i++ ) - { - c = main_col[i]; - - /* draw main col */ - section_center(&startx, &starty, 0, c); - section_center(&endx, &endy, map.num_row-1, c); - rectfill(map.map, startx-size, starty, endx+size, endy, 255); - - - /* do the branches */ - start = rand()%2; - for( r = start; r < map.num_row; r += 2 ) - { - section_center(&startx, &starty, r, c); - - way = rand()%3; - - /* draw left */ - if( c != 0 && (way == 0 || way == 2) ) - { - toc = rand()%c; - section_center(&endx, &endy, r, toc); - rectfill(map.map, startx, starty-size, endx, endy+size, 255); - } - - /* draw right */ - if( c != map.num_col-1 && (way == 1 || way == 2) ) - { - toc = rand_num(c, map.num_col-c); - /* toc = rand()%(map.num_col-c-1)+c+1; */ - section_center(&endx, &endy, r, toc); - rectfill(map.map, startx-size, starty-size, endx, endy+size, 255); - } - } - } + int main_row[MAX_MAIN_ROW]; + int main_col[MAX_MAIN_COL]; + int startx, starty, endx, endy; + int r, c, tor, toc; + int size; + int start, way; + int i; + + + clear_invert_map (); + + /* + * TODO: its possible only have 1 main and thats bad... + * 2x3 is best... tho' it may not matter much. + * What about basing the numbers off map.num_row/col?? + * yeah I like that better than macros. + * maybe MMR = #rows % 4 + 1.. + */ + + /* pick the main rows/cols to branch from */ + for (i = 0; i < MAX_MAIN_ROW; i++) + main_row[i] = rand () % map.num_row; + for (i = 0; i < MAX_MAIN_COL; i++) + main_col[i] = rand () % map.num_col; + + + size = + (map.sec_width > map.sec_height ? map.sec_width : map.sec_height) / 8; + size = (size == 0 ? 1 : size); + + + /* branch off rows */ + for (i = 0; i < MAX_MAIN_ROW; i++) + { + r = main_row[i]; + + /* draw main row */ + section_center (&startx, &starty, r, 0); + section_center (&endx, &endy, r, map.num_col - 1); + rectfill (map.map, startx, starty - size, endx, endy + size, 255); + + + /* do the branches */ + start = rand () % 2; + for (c = start; c < map.num_col; c += 2) + { + section_center (&startx, &starty, r, c); + + way = rand () % 3; + + /* draw up */ + if (r != 0 && (way == 0 || way == 2)) + { + tor = rand () % r; + section_center (&endx, &endy, tor, c); + rectfill (map.map, startx - size, starty, endx + size, endy, + 255); + } + + /* draw down */ + if (r != map.num_row - 1 && (way == 1 || way == 2)) + { + + tor = rand_num (r, map.num_row - r); + /* tor = rand()%(map.num_row-r-1)+r+1; */ + section_center (&endx, &endy, tor, c); + rectfill (map.map, startx - size, starty, endx + size, endy, + 255); + } + } + } + + + /* branch off cols */ + for (i = 0; i < MAX_MAIN_COL; i++) + { + c = main_col[i]; + + /* draw main col */ + section_center (&startx, &starty, 0, c); + section_center (&endx, &endy, map.num_row - 1, c); + rectfill (map.map, startx - size, starty, endx + size, endy, 255); + + + /* do the branches */ + start = rand () % 2; + for (r = start; r < map.num_row; r += 2) + { + section_center (&startx, &starty, r, c); + + way = rand () % 3; + + /* draw left */ + if (c != 0 && (way == 0 || way == 2)) + { + toc = rand () % c; + section_center (&endx, &endy, r, toc); + rectfill (map.map, startx, starty - size, endx, endy + size, + 255); + } + + /* draw right */ + if (c != map.num_col - 1 && (way == 1 || way == 2)) + { + toc = rand_num (c, map.num_col - c); + /* toc = rand()%(map.num_col-c-1)+c+1; */ + section_center (&endx, &endy, r, toc); + rectfill (map.map, startx - size, starty - size, endx, + endy + size, 255); + } + } + } -return; + return; } diff -Nru liquidwar-5.6.4/utils/lwmapgen/worms.c liquidwar-5.6.5/utils/lwmapgen/worms.c --- liquidwar-5.6.4/utils/lwmapgen/worms.c 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/lwmapgen/worms.c 2018-12-23 19:04:36.000000000 +0000 @@ -17,78 +17,83 @@ #endif -int filled( int centerx, int centery, int rad, int startdeg, int col, int seg ) +int +filled (int centerx, int centery, int rad, int startdeg, int col, int seg) { - int deg; - int result = 0; - int check_degrees; - - /* - * int seg is the current segment - if this is the first segment of a - * worm (seg = 0) check 360 degrees around it instead of just 180 - */ - - if( 0 == seg ) - check_degrees = 180; - else - check_degrees = 90; - - - for( deg = startdeg-check_degrees; deg < startdeg+check_degrees; deg += 5 ) - { - - if( getpixel(map.map, centerx+(rad*cos(M_PI*deg/180)), centery+(rad*sin(M_PI*deg/180))) == col ) - { - result = 1; - break; - } - } + int deg; + int result = 0; + int check_degrees; + + /* + * int seg is the current segment - if this is the first segment of a + * worm (seg = 0) check 360 degrees around it instead of just 180 + */ + + if (0 == seg) + check_degrees = 180; + else + check_degrees = 90; + + + for (deg = startdeg - check_degrees; deg < startdeg + check_degrees; + deg += 5) + { + + if (getpixel + (map.map, centerx + (rad * cos (M_PI * deg / 180)), + centery + (rad * sin (M_PI * deg / 180))) == col) + { + result = 1; + break; + } + } -return result; + return result; } -void worms() +void +worms () { - int r, c, segs; - int centerx, centery; - int radius, segments; - int degree, change; - - - /* 5-15 */ - radius = rand()%10+5; - segments = rand()%10+5; - - - for( r = 0; r < map.num_row; r++ ) - { - for( c = 0; c < map.num_col; c++ ) - { - rand_point_section_offset(¢erx, ¢ery, r, c, 0); - degree = rand()%360; - - for( segs = 0; segs < segments; segs++ ) - { - /* -15 to 14 */ - change = rand()%30-15; - degree += change; - - centerx += radius*cos(M_PI*degree/180); - centery += radius*sin(M_PI*degree/180); - - if( filled(centerx, centery, radius+1, degree, 0, segs) == 0 ) - { - circlefill(map.map, centerx, centery, radius, 0); - } - else - { - /* encountered another worm, stopping... */ - break; - } - } - } /* for(c..) */ - } /* for(r..) */ + int r, c, segs; + int centerx, centery; + int radius, segments; + int degree, change; + + + /* 5-15 */ + radius = rand () % 10 + 5; + segments = rand () % 10 + 5; + + + for (r = 0; r < map.num_row; r++) + { + for (c = 0; c < map.num_col; c++) + { + rand_point_section_offset (¢erx, ¢ery, r, c, 0); + degree = rand () % 360; + + for (segs = 0; segs < segments; segs++) + { + /* -15 to 14 */ + change = rand () % 30 - 15; + degree += change; + + centerx += radius * cos (M_PI * degree / 180); + centery += radius * sin (M_PI * degree / 180); + + if (filled (centerx, centery, radius + 1, degree, 0, segs) == 0) + { + circlefill (map.map, centerx, centery, radius, 0); + } + else + { + /* encountered another worm, stopping... */ + break; + } + } + } /* for(c..) */ + } /* for(r..) */ -return; + return; } diff -Nru liquidwar-5.6.4/utils/Makefile.in liquidwar-5.6.5/utils/Makefile.in --- liquidwar-5.6.4/utils/Makefile.in 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/Makefile.in 2018-12-23 19:04:36.000000000 +0000 @@ -1,7 +1,7 @@ SNPRINTF = @SNPRINTF@ -ALCFLAGS = @ALCFLAGS@ -ALLIBS = @ALLIBS@ +ALCFLAGS = @ALCFLAGS@ +ALLIBS = @ALLIBS@ ifeq ($(SNPRINTF),yes) SNPRINTF_FILES = @@ -16,7 +16,7 @@ OBJ_NAMES = liquidwarcol liquidwarmap liquidwartex OBJ_FILES = $(addsuffix .o, $(OBJ_NAMES)) -CMD_CC = $(CC) $(CFLAGS) $(ALCFLAGS) -c -Wall -W $(SNPRINTF_OPTIONS) +CMD_CC = $(CC) $(CFLAGS) $(ALCFLAGS) -c -Wall -W $(SNPRINTF_OPTIONS) all: $(EXE_FILES) $(OBJ_FILES) @@ -26,9 +26,11 @@ check: +indent: + dep: -clean: +clean: @rm -f *.o @rm -f */*.o @rm -f $(OBJ_FILES) @@ -50,6 +52,6 @@ print_cmd_cc: @echo "The command line to compile .c files in this directory is:" - @echo $(CMD_CC) - - + @echo -- $(CMD_CC) + @echo "The command line to link .o files in this directory is" + @echo -- $(CC) $(LDFLAGS) $(ALLIBS) diff -Nru liquidwar-5.6.4/utils/snprintf/Makefile liquidwar-5.6.5/utils/snprintf/Makefile --- liquidwar-5.6.4/utils/snprintf/Makefile 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/utils/snprintf/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# Make sure you include -DHAVE_SNPRINTF in CFLAGS if your system -# does have snprintf! - -# If you need (long long int) support and you sprintf supports it, -# define -DSNPRINTF_LONGLONG_SUPPORT - -CC = gcc - -CFLAGS = -DPREFER_PORTABLE_SNPRINTF -O3 \ - -Wall -Wpointer-arith -Wwrite-strings \ - -Wcast-qual -Wcast-align -Waggregate-return \ - -Wmissing-prototypes -Wmissing-declarations \ - -Wshadow -Wstrict-prototypes - -# -DNEED_ASPRINTF -DNEED_ASNPRINTF -DNEED_VASPRINTF -DNEED_VASNPRINTF -# -DNEED_SNPRINTF_ONLY - -# Digital Unix: native compiler usually produces better code than gcc -#CC = cc -#CFLAGS = -DPREFER_PORTABLE_SNPRINTF -O4 -std1 -arch host - -# Recommend to leave COMPATIBILITY empty for normal use. -# Should be set for bug compatibility when running tests -# too keep them less chatty. -COMPATIBILITY = - -#COMPATIBILITY = -DSOLARIS_BUG_COMPATIBLE -#COMPATIBILITY = -DHPUX_BUG_COMPATIBLE -#COMPATIBILITY = -DDIGITAL_UNIX_BUG_COMPATIBLE -#COMPATIBILITY = -DPERL_BUG_COMPATIBLE -#COMPATIBILITY = -DLINUX_COMPATIBLE - -.c.o: - rm -f $@ - $(CC) $(CFLAGS) $(COMPATIBILITY) -c $*.c - -all:snprintf.o Makefile - -test::snprintf.o test.c Makefile - $(CC) $(CFLAGS) $(COMPATIBILITY) snprintf.o -o $@ test.c - -clean: - /usr/bin/rm -f *.o test core diff -Nru liquidwar-5.6.4/www/php/cleanup.php liquidwar-5.6.5/www/php/cleanup.php --- liquidwar-5.6.4/www/php/cleanup.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/cleanup.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,41 @@ + diff -Nru liquidwar-5.6.4/www/php/db.php liquidwar-5.6.5/www/php/db.php --- liquidwar-5.6.4/www/php/db.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/db.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,160 @@ +1) { + db_handle_error("First attempt to open the metaserver MySQL database failed"); + } + } + else { + db_handle_error("Unable to open connection with the metaserver MySQL database"); + } + + return $connection; +} + +//---------------------------------------------------------------------- +// closes the connection with the database +//---------------------------------------------------------------------- +function db_close_connection($connection) +{ + if ($connection) { + // Here we do not really close the connection since MySQL shares + // connections if they are opened with the same parameters, + // and it interferes with other php code on my web site. + // Anyway the connection will be closed at the end of the PHP page + // + // mysql_close($connection); + } +} + +//---------------------------------------------------------------------- +// handles a system error +//---------------------------------------------------------------------- +function db_handle_error($message) +{ + // My provider uses a patched PHP system, which does not support + // the standard "mail" function but has a replacement called "email". + // It uses 1 more argument which is a username, used to fill the + // "From" field. For a standard install, comment the "email" line + // and uncomment the "mail" line. + email("webmaster","errors@ufoot.org","[phperror]",$message); + // mail("errors@xxx.xxx","[phperror]",$message); +} + +//---------------------------------------------------------------------- +// quotes a string for inclusion in the database +//---------------------------------------------------------------------- +function db_quote($field,$size=65535) +{ + $result=""; + $len=strlen($field); + + for ($i=0;($i<$len) && ($i<$size);++$i) { + // We filter all non ASCII 128 "normal" characters + $c=substr($field,$i,1); + $ascii=ord($c); + if ($ascii>=32 && $ascii<=127) + { + // We replace any ' by '', this is the SQL default + if ($c=="'") + { + $c="''"; + } + // We filter $ \ " and %, one never knows... + else if (strchr("\$\\\"%",$c)) + { + $c=""; + } + + $result.=$c; + } + } + + $result="'".$result."'"; + + return $result; +} + +//---------------------------------------------------------------------- +// Executes a SELECT query in the database +//---------------------------------------------------------------------- +function db_exec_query_select($connection,$query) +{ + $i=0; + + if ($connection) { + $res=mysql_query($query,$connection); + + while ($arr=mysql_fetch_array($res,MYSQL_ASSOC)) { + $data[$i]=$arr; + $i++; + } + } + + return $data; +} + +//---------------------------------------------------------------------- +// Executes a query in the database, which is not a SELECT query +//---------------------------------------------------------------------- +function db_exec_query($connection,$query) +{ + $rows=-1; + + if ($connection) { + $res=mysql_query($query,$connection); + + if ($res) { + $rows=mysql_affected_rows($connection); + } + } + + return $rows; +} + + + +?> Binary files /tmp/tmpRPCzp_/uN9QuQu3uQ/liquidwar-5.6.4/www/php/favicon.ico and /tmp/tmpRPCzp_/QzKThTqrGr/liquidwar-5.6.5/www/php/favicon.ico differ diff -Nru liquidwar-5.6.4/www/php/html.php liquidwar-5.6.5/www/php/html.php --- liquidwar-5.6.4/www/php/html.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/html.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,83 @@ +0) { + if ($days>1) { + $uptime=$days." days"; + } + else{ + $uptime="1 day"; + } + } + else if ($hours>0) { + $uptime=$hours." h"; + } + else if ($minutes>0) { + $uptime=$minutes." min"; + } + else { + $uptime=$seconds." sec"; + } + + return $uptime; +} + +//---------------------------------------------------------------------- +// Transforms a UNIX timestamp into a readable date +//---------------------------------------------------------------------- +function html_date($timestamp) +{ + $date=date("Y-m-d H:i:s",$timestamp); + + return $date; +} + +?> diff -Nru liquidwar-5.6.4/www/php/index.php liquidwar-5.6.5/www/php/index.php --- liquidwar-5.6.4/www/php/index.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/index.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,138 @@ + + + + + + +U-Foot's meta-server + + + + +
+

U-Foot's meta-server

+
+
+

Introduction

+I call meta-server the software which I run on my web site to allow the +Liquid War and +U61 +servers to register themselves so that clients can automatically +find out which servers are running in the world. +
+

List of active servers

+You can use this list "as is" but you can +also get it directly from the game. + + + + + + + + + + + + +"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + } +?> +
AddressPortGameVersionUptimePlayersPasswordComment
".html_format($result[$i]["address"])."".html_format($result[$i]["port"])."".html_format($result[$i]["game"])."".html_format($result[$i]["version"])."".html_uptime($result[$i]["uptime"])."".html_format($result[$i]["busy_players"])."/".html_format($result[$i]["max_players"])."".(html_format($result[$i]["password"]) ? "yes" : "no")."".html_format($result[$i]["comment"])."
+
+

Chat

+This chat-box is not moderated, so I'm not responsible +for its content. Still, if you think something's going wrong, +contact me. +Message successfully posted."; + } + else { + echo "

Message not posted."; + } + } +?> + + + + + + + + +"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + } +?> +
AddressAgeGameMessage
".html_format($result[$i]["address"])."".html_uptime($result[$i]["age"])."".html_format($result[$i]["game"])."".html_format($result[$i]["message"])."
+

+ +
+ + + +
+
+
+More informations on +www.ufoot.org. +
+ diff -Nru liquidwar-5.6.4/www/php/list.json.php liquidwar-5.6.5/www/php/list.json.php --- liquidwar-5.6.4/www/php/list.json.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/list.json.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,68 @@ + diff -Nru liquidwar-5.6.4/www/php/list.txt.php liquidwar-5.6.5/www/php/list.txt.php --- liquidwar-5.6.4/www/php/list.txt.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/list.txt.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,57 @@ + diff -Nru liquidwar-5.6.4/www/php/metaserver.php liquidwar-5.6.5/www/php/metaserver.php --- liquidwar-5.6.4/www/php/metaserver.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/metaserver.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,341 @@ +$post_date-METASERVER_CHAT_WRITE_LIMIT) { + $forbidden=1; + } + } + + if (!$forbidden) { + $query="INSERT INTO metaserver_chat ". + "(address,". + "post_date,". + "game,". + "message)". + "VALUES ". + "(".$address.",". + $post_date.",". + $game.",". + $message.")"; + + if (db_exec_query($connection,$query)==1) { + $ok=1; + } + } + + db_close_connection($connection); + } + else { + $ok=1; + } + + return $ok; +} + +//---------------------------------------------------------------------- +// Returns the list of available servers +//---------------------------------------------------------------------- +function metaserver_read($protocol, +$game, +$limit) +{ + $connection=db_open_connection(); + + metaserver_cleanup_chat_ex($connection); + + if (!$limit) { + $limit=METASERVER_CHAT_MAX_MESSAGES; + } + + $query="SELECT ". + "address,". + "post_date,". + "game,". + "message ". + "FROM metaserver_chat "; + + if ($game) { + $query.="WHERE game=".db_quote($game,METASERVER_SIZE_GAME." "); + } + + $query.="ORDER BY post_date DESC ". + "LIMIT ".$limit; + + $data=db_exec_query_select($connection,$query); + + $now=time(); + for ($i=0;$data[$i];++$i) { + $data[$i]["age"]=$now-$data[$i]["post_date"]; + } + + db_close_connection($connection); + + return $data; +} + +?> diff -Nru liquidwar-5.6.4/www/php/register.json.php liquidwar-5.6.5/www/php/register.json.php --- liquidwar-5.6.4/www/php/register.json.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/register.json.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,48 @@ + diff -Nru liquidwar-5.6.4/www/php/register.txt.php liquidwar-5.6.5/www/php/register.txt.php --- liquidwar-5.6.4/www/php/register.txt.php 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/register.txt.php 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,48 @@ + diff -Nru liquidwar-5.6.4/www/php/robots.txt liquidwar-5.6.5/www/php/robots.txt --- liquidwar-5.6.4/www/php/robots.txt 1970-01-01 00:00:00.000000000 +0000 +++ liquidwar-5.6.5/www/php/robots.txt 2018-12-23 19:04:36.000000000 +0000 @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff -Nru liquidwar-5.6.4/www/php3/cleanup.php3 liquidwar-5.6.5/www/php3/cleanup.php3 --- liquidwar-5.6.4/www/php3/cleanup.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/cleanup.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ - diff -Nru liquidwar-5.6.4/www/php3/db.php3 liquidwar-5.6.5/www/php3/db.php3 --- liquidwar-5.6.4/www/php3/db.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/db.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,178 +0,0 @@ -1) - { - db_handle_error("First attempt to open the metaserver MySQL database failed"); - } - } - else - { - db_handle_error("Unable to open connection with the metaserver MySQL database"); - } - - return $connection; -} - -//---------------------------------------------------------------------- -// closes the connection with the database -//---------------------------------------------------------------------- -function db_close_connection($connection) -{ - if ($connection) - { - // Here we do not really close the connection since MySQL shares - // connections if they are opened with the same parameters, - // and it interferes with other php code on my web site. - // Anyway the connection will be closed at the end of the PHP page - // - // mysql_close($connection); - } -} - -//---------------------------------------------------------------------- -// handles a system error -//---------------------------------------------------------------------- -function db_handle_error($message) -{ - // My provider uses a patched PHP3 system, which does not support - // the standard "mail" function but has a replacement called "email". - // It uses 1 more argument which is a username, used to fill the - // "From" field. For a standard install, comment the "email" line - // and uncomment the "mail" line. - email("webmaster","errors@ufoot.org","[php3error]",$message); - // mail("errors@xxx.xxx","[php3error]",$message); -} - -//---------------------------------------------------------------------- -// quotes a string for inclusion in the database -//---------------------------------------------------------------------- -function db_quote($field,$size=65535) -{ - $result=""; - $len=strlen($field); - - for ($i=0;($i<$len) && ($i<$size);++$i) - { - // We filter all non ASCII 128 "normal" characters - $c=substr($field,$i,1); - $ascii=ord($c); - if ($ascii>=32 && $ascii<=127) - { - // We replace any ' by '', this is the SQL default - if ($c=="'") - { - $c="''"; - } - // We filter $ \ " and %, one never knows... - else if (strchr("\$\\\"%",$c)) - { - $c=""; - } - - $result.=$c; - } - } - - $result="'".$result."'"; - - return $result; -} - -//---------------------------------------------------------------------- -// Executes a SELECT query in the database -//---------------------------------------------------------------------- -function db_exec_query_select($connection,$query) -{ - $i=0; - - if ($connection) - { - $res=mysql_query($query,$connection); - - while ($arr=mysql_fetch_array($res,MYSQL_ASSOC)) - { - $data[$i]=$arr; - $i++; - } - } - // else - // { - // $text=mysql_error_text(); - // } - - return $data; -} - -//---------------------------------------------------------------------- -// Executes a query in the database, which is not a SELECT query -//---------------------------------------------------------------------- -function db_exec_query($connection,$query) -{ - $rows=-1; - - if ($connection) - { - $res=mysql_query($query,$connection); - - if ($res) - { - $rows=mysql_affected_rows($connection); - } - } - // else - // { - // $text=mysql_error_text(); - // } - - return $rows; -} - - - -?> diff -Nru liquidwar-5.6.4/www/php3/html.php3 liquidwar-5.6.5/www/php3/html.php3 --- liquidwar-5.6.4/www/php3/html.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/html.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -0) - { - if ($days>1) - { - $uptime=$days." days"; - } - else - { - $uptime="1 day"; - } - } - else if ($hours>0) - { - $uptime=$hours." h"; - } - else if ($minutes>0) - { - $uptime=$minutes." min"; - } - else - { - $uptime=$seconds." sec"; - } - - return $uptime; -} - -//---------------------------------------------------------------------- -// Transforms a UNIX timestamp into a readable date -//---------------------------------------------------------------------- -function html_date($timestamp) -{ - $date=date("Y-m-d H:i:s",$timestamp); - - return $date; -} - -?> diff -Nru liquidwar-5.6.4/www/php3/index.php3 liquidwar-5.6.5/www/php3/index.php3 --- liquidwar-5.6.4/www/php3/index.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/index.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ - - - - - -U-Foot's meta-server - - -
-

U-Foot's meta-server

-
-
-

Introduction

-I call meta-server the software which I run on my web site to allow the -Liquid War and -U61 -servers to register themselves so that clients can automatically -find out which servers are running in the world. -
-

List of active servers

-You can use this list "as is" but you can -also get it directly from the game. - - - - - - - - - - - - -"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - } -} -?> -
AddressPortGameVersionUptimePlayersPasswordComment
".html_format($result[$i]["address"])."".html_format($result[$i]["port"])."".html_format($result[$i]["game"])."".html_format($result[$i]["version"])."".html_uptime($result[$i]["uptime"])."".html_format($result[$i]["busy_players"])."/".html_format($result[$i]["max_players"])."".(html_format($result[$i]["password"]) ? "yes" : "no")."".html_format($result[$i]["comment"])."
-
-

Chat

-This chat-box is not moderated, so I'm not responsible -for its content. Still, if you think something's going wrong, -contact me. -Message successfully posted."; - } - else - { - echo "

Message not posted."; - } -} -?> - - - - - - - - -"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - } -} -?> -
AddressAgeGameMessage
".html_format($result[$i]["address"])."".html_uptime($result[$i]["age"])."".html_format($result[$i]["game"])."".html_format($result[$i]["message"])."
-

- -
- - - -
-
-
-More informations on -www.ufoot.org. -
- diff -Nru liquidwar-5.6.4/www/php3/list.php3 liquidwar-5.6.5/www/php3/list.php3 --- liquidwar-5.6.4/www/php3/list.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/list.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ - diff -Nru liquidwar-5.6.4/www/php3/metaserver.php3 liquidwar-5.6.5/www/php3/metaserver.php3 --- liquidwar-5.6.4/www/php3/metaserver.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/metaserver.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,366 +0,0 @@ -$post_date-METASERVER_CHAT_WRITE_LIMIT) - { - $forbidden=1; - } - } - - if (!$forbidden) - { - $query="INSERT INTO metaserver_chat ". - "(address,". - "post_date,". - "game,". - "message)". - "VALUES ". - "(".$address.",". - $post_date.",". - $game.",". - $message.")"; - - if (db_exec_query($connection,$query)==1) - { - $ok=1; - } - } - - db_close_connection($connection); - } - else - { - $ok=1; - } - - return $ok; -} - -//---------------------------------------------------------------------- -// Returns the list of available servers -//---------------------------------------------------------------------- -function metaserver_read($protocol, - $game, - $limit) -{ - $connection=db_open_connection(); - - metaserver_cleanup_chat_ex($connection); - - if (!$limit) - { - $limit=METASERVER_CHAT_MAX_MESSAGES; - } - - $query="SELECT ". - "address,". - "post_date,". - "game,". - "message ". - "FROM metaserver_chat "; - - if ($game) - { - $query.="WHERE game=".db_quote($game,METASERVER_SIZE_GAME." "); - } - - $query.="ORDER BY post_date DESC ". - "LIMIT ".$limit; - - $data=db_exec_query_select($connection,$query); - - $size = sizeof($data); - for ($i=0;$i diff -Nru liquidwar-5.6.4/www/php3/register.php3 liquidwar-5.6.5/www/php3/register.php3 --- liquidwar-5.6.4/www/php3/register.php3 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/php3/register.php3 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ - diff -Nru liquidwar-5.6.4/www/README liquidwar-5.6.5/www/README --- liquidwar-5.6.4/www/README 2007-10-17 20:00:47.000000000 +0000 +++ liquidwar-5.6.5/www/README 2018-12-23 19:04:36.000000000 +0000 @@ -9,12 +9,12 @@ You could also want to have a meta-server running on your LAN, to keep track of existing servers without informing the whole world about it. You do not need to do it, since there's a permanent meta-server running -on http://www.ufoot.org. Anyway, I see no reasons not to share this code. +on https://ufoot.org. Anyway, I see no reasons not to share this code. To set up the meta-server, you'll need: -- a working PHP3 capable system. Wether you run it on UNIX or Windows, as an +- a working PHP capable system. Wether you run it on UNIX or Windows, as an Apache module or as a CGI has absolutely no importance. You simply need - PHP3 pages to work, and must load the MySQL PHP module. I have no idea + PHP pages to work, and must load the MySQL PHP module. I have no idea wether this meta-server would work or not with a PHP4 engine. - a MySQL server. I believe almost any version of MySQL would fit, since I use very basic SQL queries. I would have prefered to run the meta-server on @@ -23,9 +23,9 @@ Note that the meta-server is not installed when you type "make install" in the root source directory. If you want to install a meta-server, you'll -need to set up the MySQL database and copy the PHP3 pages yourself. -You'll also probably need to edit the "db.php3" file since it contains the +need to set up the MySQL database and copy the PHP pages yourself. +You'll also probably need to edit the "db.php" file since it contains the user and password required to connect to MySQL the server. When you set up -the php3 server, it is a good idea to make it fetch "/index.php3" when HTTP -clients request "/". This is the default on many PHP3 installs anyway. +the php server, it is a good idea to make it fetch "/index.php" when HTTP +clients request "/". This is the default on many PHP installs anyway.