[Freeciv-Dev] [bug #24316] in player_balance_treasury_units() [cityturn.c::2099]: assertion 'FALSE' failed.

2016-01-17 Thread Michal Mazurek
Follow-up Comment #3, bug #24316 (project freeciv):

No, we ask not to do that because that would mean the ai-controlled kingom
would kill other kingdoms, which is not the point of a test game. Unattended
usually just means a work queue in the cities and workers on auto - that's
what I do.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24316] in player_balance_treasury_units() [cityturn.c::2099]: assertion 'FALSE' failed.

2016-01-16 Thread Michal Mazurek
URL:
  

 Summary: in player_balance_treasury_units()
[cityturn.c::2099]: assertion 'FALSE' failed.
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat 16 Jan 2016 09:16:36 AM UTC
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_5
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

[code]
1: in player_balance_treasury_units() [cityturn.c::2099]: assertion 'FALSE'
failed.
1: Player sigur (nb 7) cannot have negative gold!
1: Please report this message at http://gna.org/projects/freeciv/
1: in update_city_activities() [cityturn.c::595]: assertion
'pplayer->economic.gold >= 0' failed.
1: Please report this message at http://gna.org/projects/freeciv/
[/code]
This is the longturn-patched version of S2_5, based on r31159. This is
happening on a test server with 3 minute turns running on OpenBSD. Upon saving
the game, it is indeed evident that the assertion is valid for this player:
"gold=-1". As this is a fast test game, I don't have savs leading up to this
situation. The message is shown on every TC.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24316] in player_balance_treasury_units() [cityturn.c::2099]: assertion 'FALSE' failed.

2016-01-16 Thread Michal Mazurek
Follow-up Comment #1, bug #24316 (project freeciv):

I have seen this before, in a previous test game. I think it happens when
players leave their kingdom unattended overnight and a couple of hundered
turns pass. I don't have any more insights though.

Sorry for the botched markup.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24317] 22/22 bulbs in science

2016-01-16 Thread Michal Mazurek
URL:
  

 Summary: 22/22 bulbs in science
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat 16 Jan 2016 03:18:45 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_5
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

This issue was uncovered in LT36. This is the longturn-patched version of
S2_5, based on r31159. The game runs on this ruleset:
https://github.com/longturn/games/tree/master/LT36. Some chat excerpts:

+verbose+
[16:05:16] (T11 - 08:49:35)  ::this is a new one I will get pottery in 0
turn I am at 22/22  it was 23 last turn and now down to 22 but probably by
someone who researched it this turn but before me...
[16:05:16] (T11 - 08:50:35)  Yeah
[16:05:16] (T11 - 08:50:47)  The techs become cheaper and cheaper
[16:05:16] (T11 - 08:50:56)  That changes lots of things
[16:05:16] (T11 - 08:51:44)  :yes but what is strange is that I have all
the bulbs to get the tech but I am still not getting it this turn  :-(
[16:05:16] (T11 - 08:52:05)  That's really strange
[16:05:16] (T11 - 08:52:28)  Then again there is a 10% penalty for
changing the tech targets
[16:05:16] (T11 - 08:53:00)  :a little fluke in the system which is
deciding when I get the tech.
[16:05:16] (T11 - 08:53:10)  : I did not change target
[16:05:16] (T11 - 08:53:44)  Oh
[16:05:16] (T11 - 08:54:08)  Have you tried disconnecting and
reconnecting?
[16:05:16] (T11 - 08:54:12)  :maybe if I chage and come back I will get
it haha
[16:05:16] (T11 - 08:54:18)  :*change
[16:05:16] (T11 - 08:54:34)  : lets see
[16:05:16] (T11 - 08:54:39)  : disconnect first
[16:05:16] (T11 - 08:54:48) Lost connection: pipo from XXX (client
disconnected) (player Pipo).
[16:05:16] (T11 - 08:54:58) pipo has connected from XXX (player Pipo).
[16:05:16] (T11 - 08:55:36)  : nope still at 22/22
[16:05:16] (T11 - 08:55:43)  Ceremonial Burial costs 25 to me..
Surprise surprise... I don't have CerBur :)
[16:05:16] (T11 - 08:55:59)  Probably the only level 1 tech costing
more than 22
[16:05:16] (T11 - 08:57:08)  If you pick a tech you can afford, as you
know, you will get it instantly :)
[16:05:16] (T11 - 08:57:28)  :nope , I chaged to ceremonial and I got
20/25 and then back to pottery at 22/22  
[16:05:16] (T11 - 08:58:14)  Wow... Maybe the game calculates with
sub-bulb accuracy but only shows the full bulbs
[16:05:16] (T11 - 08:58:29)  : maybe
-verbose-
+verbose+
[16:10:52]  I had experienced the same issue where I had 18 of 17 bulbs
required; had not changed techs; and had tried logging out and back in, but
still showed that I would receive the tech in 0 turns. I did get the tech the
following turn, but I had never seen this happen in any prior games, so I'm
guessing it is either version or ruleset  related.
-verbose-




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24312] Include "turns idle" in the .sav

2016-01-15 Thread Michal Mazurek
URL:
  

 Summary: Include "turns idle" in the .sav
 Project: Freeciv
Submitted by: akfaew
Submitted on: Fri 15 Jan 2016 08:32:32 AM UTC
Category: general
Severity: 2 - Minor
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.6
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

The way we replace idlers in longturn is as follows:
* identify an idler
* save the game
* using a text editor replace the idle player with a new player
* restart the game from the modified save

Unfortunately, after the restart, the "turns idle" information is reset for
the other, non-replaced idlers. Would it be possible to include this
information in the .sav?




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #20739] Vertical lines when using Nvidia driver

2013-05-14 Thread Michal Mazurek
On Mon, May 13, 2013 at 01:38:36PM +0200, mir3x wrote:
 Follow-up Comment #4, bug #20739 (project freeciv):
 
 Can u check your /proc/mtrr ?
 if u see all mem uncachable, u should fix that (probably in bios, or by
 mtrr cleanup in kernel) and check if it helped for freeciv.

reg00: base=0x0 (0MB), size= 2048MB, count=1: write-back
reg01: base=0x08000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x0c000 ( 3072MB), size=  256MB, count=1: write-back
reg03: base=0x0cfe0 ( 3326MB), size=2MB, count=1: uncachable

It seems ok.

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20807] More discrete server logs

2013-05-11 Thread Michal Mazurek
URL:
  http://gna.org/bugs/?20807

 Summary: More discrete server logs
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat 11 May 2013 06:00:12 PM GMT
Category: general
Severity: 1 - Wish
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

It's a bit weird for a server admin who also plays the game to see warnings of
the form:
 Did not find a cm solution in 25000 iterations for XXX
Where XXX is the city name. Perhaps it would be better if XXX was the city ID.



___

File Attachments:


---
Date: Sat 11 May 2013 06:00:12 PM GMT  Name: cmsolution.diff  Size: 484B   By:
akfaew

http://gna.org/bugs/download.php?file_id=17953

___

Reply to this item at:

  http://gna.org/bugs/?20807

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20808] noop AI for multiplayer games

2013-05-11 Thread Michal Mazurek
URL:
  http://gna.org/bugs/?20808

 Summary: noop AI for multiplayer games
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat 11 May 2013 06:04:38 PM GMT
Category: None
Severity: 1 - Wish
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

In multiplayer games, after one player is split after losing his capital the
AI comes in. And usually does stupid things like moving all units outside of
cities. An AI that does nothing, or perhaps starts building defensive units in
all cities would be more fair.




___

Reply to this item at:

  http://gna.org/bugs/?20808

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20739] Vertical lines when using Nvidia driver

2013-04-14 Thread Michal Mazurek
URL:
  http://gna.org/bugs/?20739

 Summary: Vertical lines when using Nvidia driver
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun 14 Apr 2013 06:17:07 PM GMT
Category: client-gtk-2.0
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: GNU/Linux
 Planned Release: 

___

Details:

I used to use an open source driver for my graphics card, and everything was
fine. But after buying a better card I started using the proprietary Nvidia
driver. This had an unusual effect on freeciv-gtk2 and on freeciv only, thus I
file this as a bug here. Namely, these weird vertical lines started showing:
http://akfaew.jasminek.net/crap/lines-freeciv.png
It gets worse if I enable the grid:
http://akfaew.jasminek.net/crap/lines-freeciv-grid.png

I use Gentoo Linux for this computer. This bug has been present for maybe 3
months now, and occurs in freeciv only, as far as I noticed.



___

File Attachments:


---
Date: Sun 14 Apr 2013 06:17:07 PM GMT  Name: lines-freeciv.png  Size: 320kB  
By: akfaew

http://gna.org/bugs/download.php?file_id=17750
---
Date: Sun 14 Apr 2013 06:17:07 PM GMT  Name: lines-freeciv-grid.png  Size:
280kB   By: akfaew

http://gna.org/bugs/download.php?file_id=17751

___

Reply to this item at:

  http://gna.org/bugs/?20739

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] cannot compile S2.3 on gentoo amd64

2012-10-21 Thread Michal Mazurek
On Sat, Oct 20, 2012 at 11:25:36PM +0300, Marko Lindqvist wrote:
 On 20 October 2012 16:16, Michal Mazurek akf...@jasminek.net wrote:
 
  configure:2610: checking build system type
  configure:2621: error: /bin/sh bootstrap/config.sub x86_64-unknown-linux- 
  failed
 
  I guess that should be x86_64-unknown-linux-gnu? Now where does
 that broken triplet come from... is it possibly something you have
 given yourse lf somewhere? What does running bootstrap/config.guess
 give?

config.guess gives:
x86_64-unknown-linux-

My gentoo installation was broken, cpp was not working and executing the
preprocessor script for determining LIBC failed. Sorry for the noise.


-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] cannot compile S2.3 on gentoo amd64

2012-10-20 Thread Michal Mazurek
I'm trying to compile S2.3 on gentoo/amd64, but autogen.sh fails:

[22:04:pts/4][dude@bender:~/src/freeciv:14]$ svn info
Path: .
URL: svn://svn.gna.org/svn/freeciv/branches/S2_3
Repository Root: svn://svn.gna.org/svn/freeciv
Repository UUID: a0f10bec-cc02-0410-94fc-a9cfff90b4cd
Revision: 21966
Node Kind: directory
Schedule: normal
Last Changed Author: cazfi
Last Changed Rev: 21957
Last Changed Date: 2012-10-17 03:23:32 +0200 (Wed, 17 Oct 2012)

[22:04:pts/4][dude@bender:~/src/freeciv:15]$ svn up
At revision 21966.
[22:04:pts/4][dude@bender:~/src/freeciv:16]$ ./autogen.sh 
--prefix=/home/dude/local/
+ checking for autoconf = 2.59 ... found 2.68, ok.
+ checking for autoheader = 2.59 ... found 2.68, ok.
+ checking for automake = 1.7 ... found 1.11.6, ok.
+ checking for aclocal = 1.7 ... found 1.11.6, ok.
+ checking for libtoolize = 1.4.3 ... found 2.4, ok.
+ checking for xgettext = 0.10.36 ... found 0.18.1, ok.
+ checking for msgfmt = 0.10.36 ... found 0.18.1, ok.
+ running /usr/bin/aclocal-1.11 ...
+ running autoheader ... 
+ running autoconf ... 
+ running libtoolize ... 
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `bootstrap'.
libtoolize: linking file `bootstrap/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
+ running /usr/bin/automake-1.11 ... 
common/Makefile.am:103: `%'-style pattern rules are a GNU make extension
utility/Makefile.am:65: `%'-style pattern rules are a GNU make extension
+ removing config.cache ... 
+ running configure ... 

using:  --prefix=/home/dude/local/

checking build system type... Invalid configuration `x86_64-unknown-linux-': 
machine `x86_64-unknown-linux' not recognized
configure: error: /bin/sh bootstrap/config.sub x86_64-unknown-linux- failed

configure failed
[22:05:pts/4][dude@bender:~/src/freeciv:17]$ uname -a
Linux bender 3.3.8-gentoo #8 SMP Tue Aug 7 17:26:48 CEST 2012 x86_64 AMD 
FX(tm)-8150 Eight-Core Processor AuthenticAMD GNU/Linux
[22:05:pts/4][dude@bender:~/src/freeciv:18]$ tail config.log

/* confdefs.h */
#define PACKAGE_NAME freeciv
#define PACKAGE_TARNAME freeciv
#define PACKAGE_VERSION 2.3.2+
#define PACKAGE_STRING freeciv 2.3.2+
#define PACKAGE_BUGREPORT 
#define PACKAGE_URL 

configure: exit 1
[22:05:pts/4][dude@bender:~/src/freeciv:19]$ 


-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] cannot compile S2.3 on gentoo amd64

2012-10-20 Thread Michal Mazurek
On Sat, Oct 20, 2012 at 03:46:43PM +0300, Marko Lindqvist wrote:
 On 20 October 2012 15:10, Michal Mazurek akf...@jasminek.net wrote:
  I'm trying to compile S2.3 on gentoo/amd64, but autogen.sh fails:
 
  [22:05:pts/4][dude@bender:~/src/freeciv:18]$ tail config.log
 
  Can you send full config.log? The actual error is way up from the
 config.h stuff listed in the end, and shown by tail.

config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by freeciv configure 2.3.2+, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ./configure --prefix=/home/dude/local/

## - ##
## Platform. ##
## - ##

hostname = bender
uname -m = x86_64
uname -r = 3.3.8-gentoo
uname -s = Linux
uname -v = #8 SMP Tue Aug 7 17:26:48 CEST 2012

/usr/bin/uname -p = AMD FX(tm)-8150 Eight-Core Processor
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /home/dude/local/bin
PATH: /home/dude/bin
PATH: /usr/games/bin


## --- ##
## Core tests. ##
## --- ##

configure:2610: checking build system type
configure:2621: error: /bin/sh bootstrap/config.sub x86_64-unknown-linux- failed

##  ##
## Cache variables. ##
##  ##

ac_cv_build=
ac_cv_env_CAIRO_CFLAGS_set=
ac_cv_env_CAIRO_CFLAGS_value=
ac_cv_env_CAIRO_LIBS_set=
ac_cv_env_CAIRO_LIBS_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_GTHREAD_CFLAGS_set=
ac_cv_env_GTHREAD_CFLAGS_value=
ac_cv_env_GTHREAD_LIBS_set=
ac_cv_env_GTHREAD_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_PNG_CFLAGS_set=
ac_cv_env_PNG_CFLAGS_value=
ac_cv_env_PNG_LIBS_set=
ac_cv_env_PNG_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=

## - ##
## Output variables. ##
## - ##

ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
AR=''
AUDIO_SDL_FALSE=''
AUDIO_SDL_TRUE=''
AUTH_CFLAGS=''
AUTH_LIBS=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AUTO_DEPS=''
AWK=''
BUG_URL=''
CAIRO_CFLAGS=''
CAIRO_LIBS=''
CATALOGS=''
CATOBJEXT=''
CC=''
CCDEPMODE=''
CFLAGS=''
CLIENT_FALSE=''
CLIENT_GUI_BEOS_FALSE=''
CLIENT_GUI_BEOS_TRUE=''
CLIENT_GUI_FTWL_FALSE=''
CLIENT_GUI_FTWL_TRUE=''
CLIENT_GUI_GTK_2_0_FALSE=''
CLIENT_GUI_GTK_2_0_TRUE=''
CLIENT_GUI_SDL_FALSE=''
CLIENT_GUI_SDL_TRUE=''
CLIENT_GUI_STUB_FALSE=''
CLIENT_GUI_STUB_TRUE=''
CLIENT_GUI_WIN32_FALSE=''
CLIENT_GUI_WIN32_TRUE=''
CLIENT_GUI_XAW_FALSE=''
CLIENT_GUI_XAW_TRUE=''
CLIENT_LIBS=''
CLIENT_TRUE=''
COMMON_LIBS=''
CONFIGURE_DEPENDENCIES=''
CPP=''
CPPFLAGS=''
CYGPATH_W=''
DATADIRNAME=''
DATASUBDIR=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
FT2_CFLAGS=''
FT2_CONFIG=''
FT2_LIBS=''
FTWL_CFLAGS=''
FTWL_FALSE=''
FTWL_OPENGL_FALSE=''
FTWL_OPENGL_TRUE=''
FTWL_SDL_FALSE=''
FTWL_SDL_TRUE=''
FTWL_TRUE=''
FTWL_X11_FALSE=''
FTWL_X11_TRUE=''
GGZDMOD_INCLUDES=''
GGZDMOD_LDFLAGS=''
GGZMOD_INCLUDES=''
GGZMOD_LDFLAGS=''
GGZ_CLIENT_FALSE=''
GGZ_CLIENT_TRUE=''
GGZ_CONFIG=''
GGZ_GTK_FALSE=''
GGZ_GTK_INCLUDES=''
GGZ_GTK_LDFLAGS=''
GGZ_GTK_TRUE=''
GGZ_SERVER_FALSE=''
GGZ_SERVER_TRUE=''
GMOFILES=''
GMSGFMT=''
GNULIB_CALLOC_POSIX=''
GNULIB_GETSUBOPT=''
GNULIB_MALLOC_POSIX=''
GNULIB_MKDTEMP=''
GNULIB_MKSTEMP=''
GNULIB_PUTENV=''
GNULIB_REALLOC_POSIX=''
GNULIB_RPMATCH=''
GNULIB_SETENV=''
GNULIB_STRTOD=''
GNULIB_UNSETENV=''
GREP=''
GTHREAD_CFLAGS=''
GTHREAD_LIBS=''
GTK_CFLAGS=''
GTK_LIBS=''
GUI_beos_CFLAGS=''
GUI_beos_LDFLAGS=''
GUI_beos_LIBS=''
GUI_ftwl_CFLAGS=''
GUI_ftwl_LDFLAGS=''
GUI_ftwl_LIBS=''
GUI_gtk2_CFLAGS=''
GUI_gtk2_LDFLAGS=''
GUI_gtk2_LIBS=''
GUI_sdl_CFLAGS=''
GUI_sdl_LDFLAGS=''
GUI_sdl_LIBS=''
GUI_stub_CFLAGS=''
GUI_stub_LDFLAGS=''
GUI_stub_LIBS=''
GUI_win32_CFLAGS=''
GUI_win32_LDFLAGS=''
GUI_win32_LIBS=''
GUI_xaw_CFLAGS=''
GUI_xaw_LDFLAGS=''
GUI_xaw_LIBS=''
GZIP=''
HAVE_CALLOC_POSIX=''
HAVE_GETSUBOPT=''
HAVE_MALLOC_POSIX=''
HAVE_MKDTEMP=''
HAVE_REALLOC_POSIX=''
HAVE_RPMATCH=''
HAVE_SETENV=''
HAVE_STRTOD=''
HAVE_UNSETENV=''
HOST_PATH_SEPARATOR=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
INSTOBJEXT=''
INTLLIBS=''
LD=''
LDFLAGS=''
LIBGGZ_INCLUDES=''
LIBGGZ_LDFLAGS

Re: [Freeciv-Dev] [bug #18717] Big city radius, fog of war

2012-06-19 Thread Michal Mazurek
On Tue, Jun 19, 2012 at 12:40:38AM +0200, Marko Lindqvist wrote:
 Follow-up Comment #6, bug #18717 (project freeciv):
 
  I actually like the fact that the vision radius is less than the
  city radius.
 
  I would expect it to autoarrange workers
 
 That does not make any sense to me. You want to have city radius (which means
 just area where workers can be placed) bigger than vision radius, and then to
 force workers within vision radius (as if city radius was only equal to that).
 So, only effect from having big city radius would be that it uses more of
 server resources.

A city with a warrior inside would have full vision radius. An empty
city sees less.

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Metaserver ideas

2012-04-06 Thread Michal Mazurek
On Fri, Apr 06, 2012 at 09:24:17AM +0100, Jacob Nevins wrote:
 A couple of random ideas for improvements to the metaserver.

I'd only like to be able to advertise a game with 126 players, which is
currently not possible due to the url length limit.

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19608] Number of units built

2012-04-04 Thread Michal Mazurek
Follow-up Comment #2, bug #19608 (project freeciv):

But what does the 2 mean?

___

Reply to this item at:

  http://gna.org/bugs/?19608

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19608] Number of units built

2012-04-03 Thread Michal Mazurek
URL:
  http://gna.org/bugs/?19608

 Summary: Number of units built
 Project: Freeciv
Submitted by: akfaew
Submitted on: Tue Apr  3 15:19:30 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

I have a city with prod 81 (+70) (11 upkeep). The production reads Riflemen
1/{2*40} even though only 71 shields will be cumulated.




___

Reply to this item at:

  http://gna.org/bugs/?19608

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19471] add half-remove

2012-02-19 Thread Michal Mazurek
URL:
  http://gna.org/bugs/?19471

 Summary: add half-remove
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Feb 19 08:27:28 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

/remove is very nice, but would it be possible to add a half-remove command
that frees all the resources, but leaves an entry in the players list? In
fact, can a players death do that automatically?




___

Reply to this item at:

  http://gna.org/bugs/?19471

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19471] add half-remove

2012-02-19 Thread Michal Mazurek
Follow-up Comment #2, bug #19471 (project freeciv):

Does /kill remove all data structures related to the player, as well as
decrease the bitfields required for the map etc?

___

Reply to this item at:

  http://gna.org/bugs/?19471

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19365] global warming causes unitwaittime

2012-01-31 Thread Michal Mazurek
URL:
  http://gna.org/bugs/?19365

 Summary: global warming causes unitwaittime
 Project: Freeciv
Submitted by: akfaew
Submitted on: Tue Jan 31 20:01:23 2012
Category: None
Severity: 2 - Minor
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

The unitwaittime for my units was set after some of them were moved by global
warming turning land into ocean.




___

Reply to this item at:

  http://gna.org/bugs/?19365

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19339] Units menu and multiple units built/turn

2012-01-27 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19339

 Summary: Units menu and multiple units built/turn
 Project: Freeciv
Submitted by: akfaew
Submitted on: Fri Jan 27 19:48:54 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

The new rulesets allow a city to build more than one unit/turn. If I have a
city that will build 3 mech. infantry, the units menu will show only one as
being 'in prog'.




___

Reply to this item at:

  http://gna.org/bugs/?19339

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19311] Did not find a cm solution in 25000 iterations

2012-01-20 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19311

 Summary: Did not find a cm solution in 25000 iterations
 Project: Freeciv
Submitted by: akfaew
Submitted on: Fri Jan 20 18:26:27 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Looking at the console of LTeX I found this:

1: Did not find a cm solution in 25000 iterations for Mastiff.
1: last message repeated 2 times

Is it bad? What can I do to help fix this?




___

Reply to this item at:

  http://gna.org/bugs/?19311

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19272] The revolt_cost of a city can become negative.

2012-01-15 Thread Michal Mazurek

Follow-up Comment #3, bug #19272 (project freeciv):

Why use double? 'long long int' can be used instead, it's 64-bit long.

___

Reply to this item at:

  http://gna.org/bugs/?19272

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19219] Client crashes with LTeX2.3 server

2012-01-08 Thread Michal Mazurek

Follow-up Comment #10, bug #19219 (project freeciv):

Aczern just built A. Smith. His windows client crashed as well.

Kevin, can you share your patched windows binary?

As to delegation: I updated the sources and somehow WITH_AUTH got
undefined...

___

Reply to this item at:

  http://gna.org/bugs/?19219

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19256] metaserver reports wrong number of players

2012-01-08 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19256

 Summary: metaserver reports wrong number of players
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Jan  8 15:18:18 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

I have added the longturn servers to the metaserver list.

LT30 has 70 players, all of them human. The metaserver shows this as 39
players, Unknown of them human.

It works fine for LTeX23, which has less players.

http://meta.freeciv.org/ does not show the Topic, while the list in the
client does not show Patch.




___

Reply to this item at:

  http://gna.org/bugs/?19256

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19256] metaserver reports wrong number of players

2012-01-08 Thread Michal Mazurek

Follow-up Comment #1, bug #19256 (project freeciv):

I hope this will work, I'll test it after LT30's TC.


Index: meta.c
===
--- meta.c  (revision 20676)
+++ meta.c  (working copy)
@@ -223,8 +223,8 @@
 */
 static bool send_to_metaserver(enum meta_flag flag)
 {
-  static char msg[8192];
-  static char str[8192];
+  static char msg[131072];
+  static char str[131072];
   int rest = sizeof(str);
   int i;
   int players = 0;


___

Reply to this item at:

  http://gna.org/bugs/?19256

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19256] metaserver reports wrong number of players

2012-01-08 Thread Michal Mazurek

Follow-up Comment #2, bug #19256 (project freeciv):

It does not appear to have fixed the problem. Perhaps the metaserver expects
a read of no more than 8192 bytes.

___

Reply to this item at:

  http://gna.org/bugs/?19256

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Google Summer of Code

2012-01-08 Thread Michal Mazurek
Can Freeciv participate in GSoC?

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19219] Client crashes with LTeX2.3 server

2012-01-07 Thread Michal Mazurek

Follow-up Comment #8, bug #19219 (project freeciv):

Yes, the ruleset was based on multiplayer.

Both me and kevin delegated to you, just use the 'take' command.

___

Reply to this item at:

  http://gna.org/bugs/?19219

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19253] Bug in unit_bribe_cost

2012-01-06 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19253

 Summary: Bug in unit_bribe_cost
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Jan  7 07:13:20 2012
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

./diplomats.c:1449:   cost += cost * punit-veteran / 3; /* Extra cost for
veterans */

Of course, the 3 should be the maximum level number. diff attached



___

File Attachments:


---
Date: Sat Jan  7 07:13:20 2012  Name: a  Size: 473B   By: akfaew

http://gna.org/bugs/download.php?file_id=14771

___

Reply to this item at:

  http://gna.org/bugs/?19253

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19219] GTK Client crashes.

2011-12-27 Thread Michal Mazurek

Follow-up Comment #1, bug #19219 (project freeciv):

this happened to me as well (latest S2_3, gtk client):
[verbatim]
#0  0x1c14b3fd in is_req_active (target_player=0x80969530,
target_city=0x8bd07800, target_building=0x3c0536c0, target_tile=0x0, 
target_unittype=0x0, target_output=0x0, target_specialist=0x0,
req=0x7f923dc0, prob_type=RPT_CERTAIN) at requirements.c:566
566 if (pcity  tile_continent(pcity-tile) == continent) {
(gdb) bt
#0  0x1c14b3fd in is_req_active (target_player=0x80969530,
target_city=0x8bd07800, target_building=0x3c0536c0, target_tile=0x0, 
target_unittype=0x0, target_output=0x0, target_specialist=0x0,
req=0x7f923dc0, prob_type=RPT_CERTAIN) at requirements.c:566
#1  0x1c0bfa45 in get_target_bonus_effects (plist=0x0,
target_player=0x80969530, target_city=0x8bd07800, target_building=0x3c0536c0,

target_tile=0x0, target_unittype=0x0, target_output=0x0,
target_specialist=0x0, effect_type=EFT_UPKEEP_FREE) at effects.c:634
#2  0x1c0bfc70 in get_building_bonus (pcity=0x8bd07800, building=0x3c0536c0,
effect_type=EFT_UPKEEP_FREE) at effects.c:931
#3  0x1c0b935d in city_improvement_upkeep (pcity=0x8bd07800, b=0x3c0536c0) at
city.c:1137
#4  0x1c0b93b0 in city_total_impr_gold_upkeep (pcity=0x8bd07800) at
city.c:1082
#5  0x1c149599 in player_get_expected_income (pplayer=0x80969530) at
player.c:999
#6  0x1c06b499 in get_info_label_text (moreinfo=true) at text.c:884
#7  0x1c017dd2 in update_info_label () at mapview.c:138
#8  0x1c05ad45 in handle_city_info (packet=0x8a61) at packhand.c:754
#9  0x1c05daf2 in client_handle_packet (type=PACKET_CITY_INFO,
packet=0x8a61) at packhand_gen.c:99
#10 0x1c036024 in client_packet_input (packet=0x8a61, type=31) at
client_main.c:573
#11 0x1c03ace9 in input_from_server (fd=11) at clinet.c:419
#12 0x0d8fd52f in gdk_input_add () from
/usr/local/lib/libgdk-x11-2.0.so.2400.0
#13 0x02714ecd in g_io_channel_unix_get_fd () from
/usr/local/lib/libglib-2.0.so.2992.0
#14 0x026cc2fd in g_main_context_dispatch () from
/usr/local/lib/libglib-2.0.so.2992.0
#15 0x026cfbef in g_main_context_check () from
/usr/local/lib/libglib-2.0.so.2992.0
#16 0x026d00c5 in g_main_context_iteration () from
/usr/local/lib/libglib-2.0.so.2992.0
#17 0x04159c84 in gtk_main_iteration () from
/usr/local/lib/libgtk-x11-2.0.so.2400.0
#18 0x1c027149 in real_set_client_page (new_page=PAGE_START) at pages.c:2854
#19 0x1c07f482 in update_unqueue (data=0x0) at update_queue.c:311
#20 0x1c00de12 in idle_callback_wrapper (data=0x7d8afbf0) at gui_main.c:2008
#21 0x026c98a1 in g_source_is_destroyed () from
/usr/local/lib/libglib-2.0.so.2992.0
#22 0x026cc2fd in g_main_context_dispatch () from
/usr/local/lib/libglib-2.0.so.2992.0
#23 0x026cfbef in g_main_context_check () from
/usr/local/lib/libglib-2.0.so.2992.0
#24 0x026cff07 in g_main_loop_run () from
/usr/local/lib/libglib-2.0.so.2992.0
#25 0x04159e14 in gtk_main () from /usr/local/lib/libgtk-x11-2.0.so.2400.0
#26 0x1c011cff in ui_main (argc=1, argv=0xcfbcd1ec) at gui_main.c:1669
#27 0x1c036559 in client_main (argc=1, argv=0xcfbcd1ec) at client_main.c:516
#28 0x1c00f332 in main (argc=Cannot access memory at address 0x1f
) at gui_main.c:1506
(gdb) 
[/verbatim]

___

Reply to this item at:

  http://gna.org/bugs/?19219

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19219] GTK Client crashes.

2011-12-27 Thread Michal Mazurek

Follow-up Comment #2, bug #19219 (project freeciv):

Apparently, pcity-tile == NULL in:
if (pcity  tile_continent(pcity-tile) == continent) {

___

Reply to this item at:

  http://gna.org/bugs/?19219

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #3062] Make effect_barracks allow setting veteran level

2011-11-26 Thread Michal Mazurek

URL:
  http://gna.org/patch/?3062

 Summary: Make effect_barracks allow setting veteran level
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Nov 26 15:08:45 2011
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

With 10 veteran levels it's easy to conceive a ruleset where there are
several green levels. effect_barracks has a value field that means 'off or
on'. With this diff value describes the veteran level.

Not tested.



___

File Attachments:


---
Date: Sat Nov 26 15:08:45 2011  Name: veteran.diff  Size: 664B   By: akfaew

http://gna.org/patch/download.php?file_id=14606

___

Reply to this item at:

  http://gna.org/patch/?3062

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2935] UNIX domain socket for freeciv.

2011-11-23 Thread Michal Mazurek

Follow-up Comment #3, patch #2935 (project freeciv):

freeciv.fi also uses the `tail -f` trick. UNIX sockets are a nice and useful
feature.

___

Reply to this item at:

  http://gna.org/patch/?2935

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19047] outdated comment in common/unit.c

2011-11-23 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19047

 Summary: outdated comment in common/unit.c
 Project: Freeciv
Submitted by: akfaew
Submitted on: Wed Nov 23 11:05:46 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

A comment in common/unit.c says:

923   Note that if you make changes here you should also change the code
for
924   autosettlers in server/settler.c. The code there does not use this
925   function as it would be a major CPU hog.

There is no server/settler.c. This comment appears in S2_3 and trunk.




___

Reply to this item at:

  http://gna.org/bugs/?19047

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19029] Trouble saving/loading players' known territory for player indices =40

2011-11-20 Thread Michal Mazurek

Follow-up Comment #4, bug #19029 (project freeciv):

From n1256:

6.5.7 Bitwise shift operators
Syntax
shift-expression:
additive-expression
shift-expression  additive-expression
shift-expression  additive-expression
Constraints
Each of the operands shall have integer type.
Semantics
The integer promotions are performed on each of the operands. The type of the
result is
that of the promoted left operand. If the value of the right operand is
negative or is
greater than or equal to the width of the promoted left operand, the behavior
is undefined.

So we have undefined behaviour.

sparc64 output of your program:

  0:   1,   1
  1:   2,   2
  2:   4,   4
  3:   8,   8
  4:  16,  16
  5:  32,  32
  6:  64,  64
  7: 128, 128
  8: 256, 256
  9: 512, 512
 10:1024,1024
 11:2048,2048
 12:4096,4096
 13:8192,8192
 14:   16384,   16384
 15:   32768,   32768
 16:   65536,   65536
 17:  131072,  131072
 18:  262144,  262144
 19:  524288,  524288
 20: 1048576, 1048576
 21: 2097152, 2097152
 22: 4194304, 4194304
 23: 8388608, 8388608
 24:16777216,16777216
 25:33554432,33554432
 26:67108864,67108864
 27:   134217728,   134217728
 28:   268435456,   268435456
 29:   536870912,   536870912
 30:  1073741824,  1073741824
 31: -2147483648,  2147483648
 32:16777216,16777216
 33:33554432,33554432
 34:67108864,67108864
 35:   134217728,   134217728
 36:   268435456,   268435456
 37:   536870912,   536870912
 38:  1073741824,  1073741824
 39: -2147483648,  2147483648
 40:   1,   1
 41:   2,   2
 42:   4,   4
 43:   8,   8
 44:  16,  16
 45:  32,  32
 46:  64,  64
 47: 128, 128
 48: 256, 256
 49: 512, 512
 50:1024,1024
 51:2048,2048
 52:4096,4096
 53:8192,8192
 54:   16384,   16384
 55:   32768,   32768
 56:   65536,   65536
 57:  131072,  131072
 58:  262144,  262144
 59:  524288,  524288
 60: 1048576, 1048576
 61: 2097152, 2097152
 62: 4194304, 4194304
 63: 8388608, 8388608
 64:   65536,   65536
 65:  131072,  131072
 66:  262144,  262144
 67:  524288,  524288
 68: 1048576, 1048576
 69: 2097152, 2097152
 70: 4194304, 4194304
 71: 8388608, 8388608
 72:16777216,16777216
 73:33554432,33554432
 74:67108864,67108864
 75:   134217728,   134217728
 76:   268435456,   268435456
 77:   536870912,   536870912
 78:  1073741824,  1073741824
 79: -2147483648,  2147483648
 80:   1,   1
 81:   2,   2
 82:   4,   4
 83:   8,   8
 84:  16,  16
 85:  32,  32
 86:  64,  64
 87: 128, 128
 88: 256, 256
 89: 512, 512
 90:1024,1024
 91:2048,2048
 92:4096,4096
 93:8192,8192
 94:   16384,   16384
 95:   32768,   32768
 96: 256, 256
 97: 512, 512
 98:1024,1024
 99:2048,2048
100:4096,4096
101:8192,8192
102:   16384,   16384
103:   32768,   32768
104:   65536,   65536
105:  131072,  131072
106:  262144,  262144
107:  524288,  524288
108: 1048576, 1048576
109: 2097152, 2097152
110: 4194304, 4194304
111: 8388608, 8388608
112:16777216,16777216
113:33554432,

[Freeciv-Dev] [bug #19033] Add a LUA 'tick' event

2011-11-20 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19033

 Summary: Add a LUA 'tick' event
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Nov 20 11:24:33 2011
Category: None
Severity: 1 - Wish
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Lua does not support sleep(). I want to be able to save the game every 15
minutes. Please add a 'tick' event that ticks every minute, or second, and
that I can bind a LUA function to.

Other use: disconnect idle players after 30 mins of inactivity.




___

Reply to this item at:

  http://gna.org/bugs/?19033

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18957] /wall not persistent

2011-11-20 Thread Michal Mazurek

Follow-up Comment #2, bug #18957 (project freeciv):

I missed that.

The problem was, that the window poped up each time you connect, instead of
only just once. Two example messages that can be sent:
server will be restarted at 12:00
server crashed, savegame from previous turn restored

___

Reply to this item at:

  http://gna.org/bugs/?18957

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19030] gmake of trunk on OpenBSD includes postgresql with wrong path

2011-11-19 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19030

 Summary: gmake of trunk on OpenBSD includes postgresql with
wrong path
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Nov 19 17:47:15 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: r20592
 Discussion Lock: Any
Operating System: *BSD
 Planned Release: 

___

Details:


$ ./autogen.sh --disable-nls --disable-client --enable-fcdb=postgres
! nls checks disabled
+ checking for autoconf = 2.59 ... found 2.60, ok.
+ checking for autoheader = 2.59 ... found 2.60, ok.
+ checking for automake = 1.7 ... found 1.9.6, ok.
+ checking for aclocal = 1.7 ... found 1.9.6, ok.
+ checking for libtoolize = 1.4.3 ... found 2.4.2, ok.
...
checking for pg_config... /usr/local/bin/pg_config
checking for PostgreSQL libraries... yes
...
ls_postgres.c:23:28: error: pgsql/libpq-fe.h: No such file or directory



[18:43:ttyp8][dude@hopek:/usr/local/include:5]$ find . -iname 'libpq-fe.h'  

./postgresql/libpq-fe.h



$ pg_config
BINDIR = /usr/local/bin
DOCDIR = /usr/local/share/doc/postgresql
HTMLDIR = /usr/local/share/doc/postgresql
INCLUDEDIR = /usr/local/include/postgresql
PKGINCLUDEDIR = /usr/local/include/postgresql
INCLUDEDIR-SERVER = /usr/local/include/postgresql/server
LIBDIR = /usr/local/lib
PKGLIBDIR = /usr/local/lib/postgresql
LOCALEDIR = /usr/local/share/locale
MANDIR = /usr/local/man
SHAREDIR = /usr/local/share/postgresql
SYSCONFDIR = /etc/postgresql
PGXS = /usr/local/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--disable-rpath' '--with-openssl=/usr' '--with-perl'
'--enable-integer-datetimes' '--includedir=/usr/local/include/postgresql'
'--datadir=/usr/local/share/postgresql'
'--docdir=/usr/local/share/doc/postgresql' '--with-includes=/usr/local/include
/usr/include/kerberosV' '--with-libraries=/usr/local/lib'
'--with-system-tzdata=/usr/share/zoneinfo' '--with-openssl' '--with-ossp-uuid'
'--with-libxml' '--disable-thread-safety' '--with-krb5' '--prefix=/usr/local'
'--sysconfdir=/etc' '--mandir=/usr/local/man' '--infodir=/usr/local/info'
'--disable-silent-rules' 'CC=cc' 'CFLAGS=-O2 -pipe'
CC = cc
CPPFLAGS = -I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/include -I/usr/include/kerberosV
CFLAGS = -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv
CFLAGS_SL = -fpic -DPIC
LDFLAGS = -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -Wl,-Bdynamic
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgport -lxml2 -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline
-ltermcap -lm 
VERSION = PostgreSQL 9.1.1







___

Reply to this item at:

  http://gna.org/bugs/?19030

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19029] Trouble saving/loading players' known territory for player indices =40

2011-11-19 Thread Michal Mazurek

Follow-up Comment #1, bug #19029 (project freeciv):

Please make 'p - l * 32' into 'p % 32', it will be much clearer, and it is
equivalent.

And this affects games with 33 players, since for p = 32, p - l * 8 maps to
24 and overwrites another players vision.



___

Reply to this item at:

  http://gna.org/bugs/?19029

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19031] Creating players from the server, before they connect

2011-11-19 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19031

 Summary: Creating players from the server, before they
connect
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Nov 19 18:16:20 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Sometimes there is a need to create a bunch of human players and /start the
server, without waiting for players to connect. Until now i've been doing that
with the autocreate command (attached), it takes as argument a file with a
list of player:team:nation:. In hindsight it should take 3 arguments (player,
team, nation), not a file.

I want to reduce the number of diffs in my tree.

Can this be done from LUA?

A different approach is:
/create playername
/team playername 4 
/ai playername
/take playername playername
But here I cannot assign a nation to a player, so if I want to abandon my
diff I would need to make at least a /nation command.

Can a /create_human command be added, that does the above commands and takes
3 arguments?

What do you think?



___

File Attachments:


---
Date: Sat Nov 19 18:16:20 2011  Name: autocreate.c  Size: 2kB   By: akfaew

http://gna.org/bugs/download.php?file_id=14588

___

Reply to this item at:

  http://gna.org/bugs/?19031

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19031] Creating players from the server, before they connect

2011-11-19 Thread Michal Mazurek

Follow-up Comment #1, bug #19031 (project freeciv):

The server operator at freeciv.fi creates players this way:

lua create_player(playername, find.nation_type(British))
aitoggle playername

___

Reply to this item at:

  http://gna.org/bugs/?19031

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19007] Player slots miscounted when saving/loading known tiles = crashes and/or players forgetting territory

2011-11-19 Thread Michal Mazurek

Follow-up Comment #7, bug #19007 (project freeciv):

 For me there are odd disconnected spots of known territory
This may be what I had and posted some time ago! Then I blamed it on possible
sea map trade.

___

Reply to this item at:

  http://gna.org/bugs/?19007

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19007] fix known map in savegame2

2011-11-18 Thread Michal Mazurek

Follow-up Comment #2, bug #19007 (project freeciv):

From what I understand, if there are a lot of players saving their vision is
buggy. It seems the /remove problem uncovered a number of bugs with saving a
game.

___

Reply to this item at:

  http://gna.org/bugs/?19007

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-17 Thread Michal Mazurek
On Wed, Nov 16, 2011 at 10:38:15PM +0100, Matthias Pfafferodt wrote:
 Am Mittwoch, 16. November 2011, 19:47:45 schrieb Michal Mazurek:
  On Tue, Nov 15, 2011 at 09:48:07PM +0100, Matthias Pfafferodt wrote:
   The hardest part is the
   transmission of the veteran ruleset definitions (IMHO).
  
  Speaking of veterans, while looking at freecivs png files i noticed
  there are four more veteran levels graphics. Did freeciv use to have 8
  veteran levels?
 
 Freeciv 2.3 supports up to 10 veteran levels but only 4 are used; in 2.4 this 
 will be increased to 20 levels which can be different for different units. 
 See 
 the experimental ruleset for an example (settlers).

This is great! Here are the values I think I'll use for LTeX:

veteran_names = _(green), _(veteran 1), _(veteran 2), _(veteran 3), 
_(hardened 1), _(hardened 2), _(hardened 3), _(elite 1 ), _(elite 2), 
_(elite 3)
veteran_raise_chance = 50, 45, 40, 35, 30, 25, 20, 15, 10, 0
veteran_power_fact = 100, 150, 175, 200, 225, 250, 275, 300, 325, 350
veteran_work_raise_chance = 12, 9, 9, 9, 7, 7, 7, 5, 5, 5
veteran_move_bonus = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9


-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19012] bumb event cache size

2011-11-17 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19012

 Summary: bumb event cache size
 Project: Freeciv
Submitted by: akfaew
Submitted on: Thu Nov 17 15:54:25 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Bump GAME_MAX_EVENT_CACHE_TURNS to 20, and set default to 5.
Also bump GAME_MAX_EVENT_CACHE_MAX_SIZE to 5000.

From discussion in bug #18742.



___

File Attachments:


---
Date: Thu Nov 17 15:54:25 2011  Name: ecache.diff  Size: 835B   By: akfaew

http://gna.org/bugs/download.php?file_id=14567

___

Reply to this item at:

  http://gna.org/bugs/?19012

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Michal Mazurek

Follow-up Comment #27, bug #18776 (project freeciv):

p = player_index(pplayer);
l = player_index(pplayer) / 32;
(p - l * 32)

Can't we just use modulo here?

Won't this break existing save games? If i saved using the '8' code, I cannot
load using the '32' code. Well, at least if i have a player index  31. Then
again, the save game is botched anyway, player 32 overwrites player 24.

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Michal Mazurek

Follow-up Comment #28, bug #18776 (project freeciv):

What does this code save anyway? Map tiles without fog of war? Can't this be
recreated after /load?

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18993] Bug in swiss.ruleset?

2011-11-16 Thread Michal Mazurek

Follow-up Comment #2, bug #18993 (project freeciv):

Huh, I didn't know that. Anyway, I created a list of nations:
http://longturn.org/nations/ and it seems every nation except the Swiss have
the same name in the ruleset as is the filename of the flag.

___

Reply to this item at:

  http://gna.org/bugs/?18993

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18653] Upper case first letter of player name

2011-11-16 Thread Michal Mazurek

Follow-up Comment #5, bug #18653 (project freeciv):

I really feel strongly that the current behaviour is bad, and should be
reverted. A new reason is: I dump statistics to a database. The database does
not have a user 'Akfaew', but 'akfaew'. I can use nickname, which remains
'akfaew', but won't it change during delegation, to the controling player?

___

Reply to this item at:

  http://gna.org/bugs/?18653

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19005] calloc can overflow

2011-11-16 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19005

 Summary: calloc can overflow
 Project: Freeciv
Submitted by: akfaew
Submitted on: Wed Nov 16 08:54:10 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

fc_real_calloc states:

size_t size = nelem*elsize;   /* potential overflow */

A check for potential overflow is the only reason calloc was created in the
first place (at least I think that was the case).

Here is how OpenBSD does it:

/usr/src/lib/libc/stdlib/malloc.c:1383: if ((nmemb = MUL_NO_OVERFLOW
|| size = MUL_NO_OVERFLOW) 
/usr/src/lib/libc/stdlib/malloc.c:1384: nmemb  0  SIZE_MAX /
nmemb  size) {
/usr/src/lib/libc/stdlib/malloc.c:1385: _MALLOC_UNLOCK();
/usr/src/lib/libc/stdlib/malloc.c:1386: if
(mopts.malloc_xmalloc)
/usr/src/lib/libc/stdlib/malloc.c:1387: wrterror(out
of memory, NULL);
/usr/src/lib/libc/stdlib/malloc.c:1388: errno = ENOMEM;
/usr/src/lib/libc/stdlib/malloc.c:1389: return NULL;
/usr/src/lib/libc/stdlib/malloc.c:1390: }


The attached patch ports this behaviour. It is untested.



___

File Attachments:


---
Date: Wed Nov 16 08:54:10 2011  Name: calloc.diff  Size: 2kB   By: akfaew

http://gna.org/bugs/download.php?file_id=14562

___

Reply to this item at:

  http://gna.org/bugs/?19005

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Michal Mazurek

Follow-up Comment #21, bug #18776 (project freeciv):

It does not crash. And i tested it without your previous patches, the ones
with vision - while they might have fixed something they were not the cause of
my segfaults.

Still, could you help me understand: 1u  (p - l * 8), which really means 
1u  (p - p / 4), which is of course 1u  (0.75 * p). For 126 players, you
cannot shift 1 by 94 bits left!

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18758] status popup in the way of path

2011-11-16 Thread Michal Mazurek

Follow-up Comment #1, bug #18758 (project freeciv):

I agree, this sometimes is an annoyance, and I also scroll the map in such
ways as to display the popup on the other side of the cursor. A slight
transparency would be nice, if GTK supports it.

Or perhaps display the info on the left, below the 'Turn done' button?

___

Reply to this item at:

  http://gna.org/bugs/?18758

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18742] Turn change resets event cache?

2011-11-16 Thread Michal Mazurek

Follow-up Comment #2, bug #18742 (project freeciv):

Sorry, I forgot to answer to this - I really though I did.

Thank you Jacob, indeed my ec_ options were the problem.

I set:

set ec_turns=9
set ec_max_size=1000
set ec_chat=enabled
set ec_info=enabled


Why are these values not the default? Event cache does not consume that much
memory, when compared to the map, does it?

Why are these values limited to 9 and 1000? Sometimes i browse thru the event
cache to determine when my enemy is most likely to log in.

___

Reply to this item at:

  http://gna.org/bugs/?18742

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Michal Mazurek

Follow-up Comment #22, bug #18776 (project freeciv):

I removed half the players in LTeX (idlers). The memory usage dropped by
about half. I saved the game then restarted the server, and a turn was made -
everything is ok.

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19006] Add a lua_blacklist setting

2011-11-16 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?19006

 Summary: Add a lua_blacklist setting
 Project: Freeciv
Submitted by: akfaew
Submitted on: Wed Nov 16 18:43:29 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

I want to be able to dofile! :)

This diff is made against S2_3.



___

File Attachments:


---
Date: Wed Nov 16 18:43:29 2011  Name: lua_blacklist.diff  Size: 2kB   By:
akfaew

http://gna.org/bugs/download.php?file_id=14564

___

Reply to this item at:

  http://gna.org/bugs/?19006

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-16 Thread Michal Mazurek
On Tue, Nov 15, 2011 at 09:48:07PM +0100, Matthias Pfafferodt wrote:
 The hardest part is the 
 transmission of the veteran ruleset definitions (IMHO).

Speaking of veterans, while looking at freecivs png files i noticed
there are four more veteran levels graphics. Did freeciv use to have 8
veteran levels?

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Diplomatic ZOC

2011-11-16 Thread Michal Mazurek
With longturns 3x movement it's hard to defend against spies. Would
changes to the client be required if spies had diplomatic ZOC, that
would only affect other spies?

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #19005] calloc can overflow

2011-11-16 Thread Michal Mazurek

Follow-up Comment #2, bug #19005 (project freeciv):

fc_real_malloc will handle that, it calls sanity_check_size. Calloc only
cares about overflow. The SIZE_MAX part is redundant I think, it is equivalent
to SIZE_MAX  nmemb * size. It can be important on some strange platforms, but
on both Intel and sparc processors max adressable memory is equal to what
size_t can contain. OpenBSD supports various strange architectures. I might be
mistaken though.

#define  SIZE_MAXUINTPTR_MAX
/usr/include/stdint.h:155: #ifdef __LP64__
/usr/include/stdint.h:156: #define  INTPTR_MIN  INT64_MIN
/usr/include/stdint.h:157: #define  INTPTR_MAX  INT64_MAX
/usr/include/stdint.h:158: #define  UINTPTR_MAX UINT64_MAX
/usr/include/stdint.h:159: #else
/usr/include/stdint.h:160: #define  INTPTR_MIN  INT32_MIN
/usr/include/stdint.h:161: #define  INTPTR_MAX  INT32_MAX
/usr/include/stdint.h:162: #define  UINTPTR_MAX UINT32_MAX
/usr/include/stdint.h:163: #endif

so size_t * size_t will never be greater than SIZE_MAX on a PC.

___

Reply to this item at:

  http://gna.org/bugs/?19005

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Michal Mazurek

Follow-up Comment #24, bug #18776 (project freeciv):

 [bit] = p - floor(p/32) * 8 
 which limits it to values between 0 and 31. 

Does it? p - player index in 0..127. let p = 127.
p - floor(p/32) * 8 = 127 - 3 * 8 = 103.

I run just this part in a test c program. This is really weird.


#include stdio.h

int
main()
{
int a;
for (a = 0; a  128; a++) {
int l = a / 32;
printf(%xn, 1u  (a - l * 8));
}
return 0;
}


I didn't restart a game with  32 players, with a player with an index  32
being not an idler. The Finns didn't respond to me on irc, if they restarted
their server or not. But something tells me this code will do strange things
if there are more than 32 players (I still dont understand it). Why isn't that
1 just shifted by p % 32?

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-15 Thread Michal Mazurek
On Mon, Nov 14, 2011 at 10:09:56AM +0100, Michal Mazurek wrote:
 Can i have other files than the default.lua and script.lua? I want each
 functionality (auth, newcomers) to be in a separate file.

I added dofile(longturn.lua) to script.lua. This is what i got:

1: lua error:
data/longturn/script.lua:56: attempt to call global 'dofile' (a nil 
value)
stack traceback:
data/longturn/script.lua:56: in main chunk
0: data/longturn/script.lua: could not load ruleset script.


Why can't i dofile() in freeciv?

The version is S2_3, I'm yet to apply the svn revisions Matthias said I
should

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-15 Thread Michal Mazurek
On Mon, Nov 14, 2011 at 09:40:51PM +0100, Matthias Pfafferodt wrote:
 missed an important thing:
 
 The needed patches are only in S2_4 and trunk; you have to pick svn20274-
 sv20277 and svn20286-svn20296. These patches do not change the network 
 interface. Thus, they should be easily be backported to S2_3.

I have trouble applying those revisions.

This is what i do:
[11:17:ttyp9][dude@hopek:~:3]$ cat /tmp/diff
git svn log -p -r 20274  /tmp/lua/20274
git svn log -p -r 20275  /tmp/lua/20275
git svn log -p -r 20276  /tmp/lua/20276
git svn log -p -r 20277  /tmp/lua/20277
git svn log -p -r 20286  /tmp/lua/20286
git svn log -p -r 20287  /tmp/lua/20287
git svn log -p -r 20288  /tmp/lua/20288
git svn log -p -r 20289  /tmp/lua/20289
git svn log -p -r 20290  /tmp/lua/20290
git svn log -p -r 20291  /tmp/lua/20291
git svn log -p -r 20292  /tmp/lua/20292
git svn log -p -r 20293  /tmp/lua/20293
git svn log -p -r 20294  /tmp/lua/20294
git svn log -p -r 20295  /tmp/lua/20295
git svn log -p -r 20296  /tmp/lua/20296

Run this script after 'git checkout master'
Run 'git checkout S2_3-lua' which is a branch i created from the
remotes/S2_3 branch.
Try to apply the first revision:
[11:18:ttyp6][dude@hopek:~/src/freeciv:65]$ patch -p1  /tmp/lua/20274

Get many errors:
[lots of output]
Hunk #1 failed at 0.
1 out of 1 hunks failed--saving rejects to server/scripting/api_actions.c.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff --git a/server/scripting/api_actions.h b/server/scripting/api_actions.h
|deleted file mode 100644
|index 871038a..000
|--- a/server/scripting/api_actions.h
|+++ /dev/null
--
Patching file server/scripting/api_actions.h using Plan A...
Empty context always matches.
Hunk #1 failed at 0.
1 out of 1 hunks failed--saving rejects to server/scripting/api_actions.h.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff --git a/server/scripting/api_auth.c b/server/scripting/api_auth.c
|deleted file mode 100644
|index df568f5..000
|--- a/server/scripting/api_auth.c
|+++ /dev/null
--
File to patch: 

I kill it after this, since it waits for some input.

Some chunks succeed, some fail. I use OpenBSD's patch, not GNU patch, if
that matters.

This is `git stat` after trying to apply the first diff:
[11:22:ttyp6][dude@hopek:~/src/freeciv:67]$ git stat
# On branch S2_3-lua
# Changes not staged for commit:
#   (use git add file... to update what will be committed)
#   (use git checkout -- file... to discard changes in working directory)
#
#   modified:   common/Makefile.am
#   modified:   configure.ac
#   modified:   manual/Makefile.am
#   modified:   server/auth.c
#   modified:   server/citytools.c
#   modified:   server/cityturn.c
#   modified:   server/diplhand.c
#
# Untracked files:
#   (use git add file... to include in what will be committed)
#
#   common/scriptcore/
no changes added to commit (use git add and/or git commit -a)

What is curious, is that previous commits are empty:
[11:24:ttyp6][dude@hopek:~/src/freeciv:76]$ git svn log -p -r 20273 

[11:25:ttyp6][dude@hopek:~/src/freeciv:77]$ git svn log -p -r 20272 

r20271 fixes some bug in the client so it is not relevant.


-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-15 Thread Michal Mazurek

Follow-up Comment #19, bug #18776 (project freeciv):

The allocated table is not always of constant size:
+verbose+
int lines = player_count()/32 + 1;
---
./player.c:640: int player_count(void)
./player.c:641: {
./player.c:642:   return player_slots.used_slots;
./player.c:643: }
+verbose+

Should this be MAX_NUM_PLAYERS?

This part is really perplexing:
+verbose+
   2782 known[l * MAP_INDEX_SIZE + tile_index(ptile)]
   2783   |= (1u  (p - l * 8));
-verbose-
Suppose there is a player with index 60. p = 60, l = 1. (p - l * 8) = (60 -
8) = 52. 1  52 bits is more than an int can handle.

I added these lines:
+verbose+
   2779 fprintf(stderr, save: size of known: %dn, lines *
MAP_INDEX_SIZE * sizeof(*known));
   2780 fprintf(stderr, save: known index: %dn, l *
MAP_INDEX_SIZE + tile_index(ptile));

---

save: size of known: 336960
save: known index: 86016
Segmentation fault (core dumped)
-verbose-
336960/4 = 84240.

I don't really understand what this code does, especially the SAVE_MAP_CHAR
so I didn't attempt to fix it. Will this code work, if there are two players
with indexes 0 and 125?

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18781] /save - strips everything from dot to eol

2011-11-15 Thread Michal Mazurek

Follow-up Comment #2, bug #18781 (project freeciv):

I don't understand how this helps with security. Is it supposed to prevent
escaping from a save directory?

___

Reply to this item at:

  http://gna.org/bugs/?18781

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18843] The setting 'trading_city' can't be modified after the game has started.

2011-11-15 Thread Michal Mazurek

Follow-up Comment #2, bug #18843 (project freeciv):

I think the admin with access to the console should be able to change
everything that is possible to be changed. I mean Freeciv is open source, a
cheating admin can always change one flag and be able to change trading_city.

___

Reply to this item at:

  http://gna.org/bugs/?18843

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-15 Thread Michal Mazurek
On Tue, Nov 15, 2011 at 06:27:31PM +0100, Matthias Pfafferodt wrote:
 Am Dienstag, 15. November 2011, 10:59:47 schrieb Michal Mazurek:
  On Mon, Nov 14, 2011 at 10:09:56AM +0100, Michal Mazurek wrote:
   Can i have other files than the default.lua and script.lua? I want each
   functionality (auth, newcomers) to be in a separate file.
  
  I added dofile(longturn.lua) to script.lua. This is what i got:
  
  1: lua error:
  data/longturn/script.lua:56: attempt to call global 'dofile' (a nil 
 value)
  stack traceback:
  data/longturn/script.lua:56: in main chunk
  0: data/longturn/script.lua: could not load ruleset script.
  
  
  Why can't i dofile() in freeciv?
 
 The usage of such commands is restricted due to security implications. You 
 can 
 not load a lua file! Only default.lua and script.lua are read. Or you have to 
 use the command 'lua file ...' (I think it is named luafile in S2_3).

In S2_3 there is only lua that executes a line of lua code. There is no
functionality to load a file, I'll try to backport it to my repo
tomorrow.


Frankly, I dont understand how that helps with security. If you are the
administrator you can do anything anyway, so why restrict yourself?
Could you please provide a scenario when dofile can lead to something
nasty?

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-15 Thread Michal Mazurek
On Tue, Nov 15, 2011 at 07:11:10PM +0100, Matthias Pfafferodt wrote:
  In S2_3 there is only lua that executes a line of lua code. There is no
  functionality to load a file, I'll try to backport it to my repo
  tomorrow.
  
  
  Frankly, I dont understand how that helps with security. If you are the
  administrator you can do anything anyway, so why restrict yourself?
  Could you please provide a scenario when dofile can lead to something
  nasty?
 
 This restriction is a long time thing for freeciv. This prevents bad script 
 from doing nasty things, or do you check all scripts you run (new rulesets, 
 etc)? Also, not everybody who runs a server is an admin and knows what can 
 happen if there is something hidden in a script file.

I still don't get it. Where does the included nasty code come from in
the first place? Or differently: why do you assume script.lua is ok,
while something that's included is not? From what I understand, this
restriction is so that a ruleset I download from dubious sources does
not, from it's script.lua, run a file i already have on my filesystem,
that's nasty. Even though it could just contain it, instead of dofileing
it in the first place. dofile in lua is just like #include in c. I
really see no harm in allowing it.

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Moving Longturn patches to Lua

2011-11-15 Thread Michal Mazurek
On Tue, Nov 15, 2011 at 10:11:58PM +0200, Marko Lindqvist wrote:
 On 15 November 2011 21:52, Michal Mazurek akf...@jasminek.net wrote:
   a ruleset I download from dubious sources does
  not, from it's script.lua, run a file i already have on my filesystem,
  that's nasty. Even though it could just contain it,
 
  You consider all files already in your system something that everyone
 should be allowed to read/use? It could hardly contain something that
 its author does not know contents of.
 Not that I can come up with any real attack scenario offhand, but
 better to be safe than sorry.

Can there at least be a GNU-style flag like --allow-lua-dofile?

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Optimizing /save (I failed)

2011-11-15 Thread Michal Mazurek
My sparc64 502mhz is taking 4 minutes now to /save a game. I tried poor
mans optimization and inlined a couple of functions. I tested it on a
8x3400mhz intel i7. The test .serv was loading the game, and saving it
10 times. I managed to only go down to 11.76 from 13.56 seconds, that's
not very much. Most of the time is spent doing real stuff, so i guess
500mhz is not adequate to run games with max map. About 5 seconds of
that time is just starting the server and loading the map.

The function tile_index is called 495681563 times, I cant see how this
can be cut down.

sg_save_player_vision is called 370 times and takes most time, 12%. But
it seems to be doing real stuff, also hard to cut down. And even if it
is cut down, it's still only 12%.

A decent computer saves the game rather fast, so I just guess my
computer is just too old to run longturn games.


However, I think that inlining functions like:
int player_slot_count(void)
{
  return (MAX_NUM_PLAYER_SLOTS);
}
would actually not only be faster, but also take less space.


-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Moving Longturn patches to Lua

2011-11-14 Thread Michal Mazurek
Now that i finished the new website i want to move the c patches to lua.
I guess I'll start with postgres authentication.

I have some questions though:
Can the lua scripts be reloaded while the server is running?
Can i have other files than the default.lua and script.lua? I want each
functionality (auth, newcomers) to be in a separate file.


I'm collecting statistics and generating plots:
http://longturn.org/game/LTeX23/ . Maybe this can be incorporated into
freeciv? Right now i write statistics to files called (T%03d) % turn,
and then parse them with perl and generate plots with gnuplot. Freeciv
already generates gifs of the map across time, plots would be a nice
addition.


-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18993] Bug in swiss.ruleset?

2011-11-12 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18993

 Summary: Bug in swiss.ruleset?
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Nov 12 13:58:34 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

The flag switzerland does not exist.
-flag=switzerland
+flag=swiss



___

File Attachments:


---
Date: Sat Nov 12 13:58:34 2011  Name: swiss.diff  Size: 356B   By: akfaew

http://gna.org/bugs/download.php?file_id=14545

___

Reply to this item at:

  http://gna.org/bugs/?18993

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18979] Fix some clang analyze errors

2011-11-11 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18979

 Summary: Fix some clang analyze errors
 Project: Freeciv
Submitted by: akfaew
Submitted on: Fri Nov 11 18:06:13 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

After running llvms scan-build some possible bugs were detected. A couple of
diffs attached.



___

File Attachments:


---
Date: Fri Nov 11 18:06:13 2011  Name: 0002-add-else-in-advdiplomacy.c.patch 
Size: 894B   By: akfaew

http://gna.org/bugs/download.php?file_id=14520
---
Date: Fri Nov 11 18:06:13 2011  Name:
0003-fix-Array-subscript-is-undefined-in-utility-distribu.patch  Size: 790B  
By: akfaew

http://gna.org/bugs/download.php?file_id=14521
---
Date: Fri Nov 11 18:06:13 2011  Name:
0004-fix-Called-function-pointer-is-null-null-dereference.patch  Size: 1020B  
By: akfaew

http://gna.org/bugs/download.php?file_id=14522
---
Date: Fri Nov 11 18:06:13 2011  Name:
0005-make-fulltradesize-notradesize-more-explicit-in-comm.patch  Size: 932B  
By: akfaew

http://gna.org/bugs/download.php?file_id=14523

___

Reply to this item at:

  http://gna.org/bugs/?18979

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18979] Fix some clang analyze errors

2011-11-11 Thread Michal Mazurek

Additional Item Attachment, bug #18979 (project freeciv):

File name: 0006-fix-possible-dereference-of-a-null-pointer-in-common.patch
Size:0 KB
File name: 0007-fix-Value-stored-to-type-during-its-initialization-i.patch
Size:0 KB
File name: 0008-fix-previous-in-common-dataio.c.patch Size:1 KB
File name: 0009-remove-clang-warning-The-left-operand-of-is-a-garbag.patch
Size:1 KB


___

Reply to this item at:

  http://gna.org/bugs/?18979

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18979] Fix some clang analyze errors

2011-11-11 Thread Michal Mazurek

Additional Item Attachment, bug #18979 (project freeciv):

File name: 0010-add-some-assertions-in-server-unittools.c.patch Size:2 KB
File name: 0011-fix-Function-call-argument-is-an-uninitialized-value.patch
Size:0 KB
File name: 0012-fix-Function-call-argument-is-an-uninitialized-value.patch
Size:0 KB
File name: 0014-fix-Function-call-argument-is-an-uninitialized-value.patch
Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?18979

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18979] Fix some clang analyze errors

2011-11-11 Thread Michal Mazurek

Additional Item Attachment, bug #18979 (project freeciv):

File name: 0015-fix-Function-call-argument-is-an-uninitialized-value.patch
Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?18979

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18957] /wall not persistent

2011-11-09 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18957

 Summary: /wall not persistent
 Project: Freeciv
Submitted by: akfaew
Submitted on: Wed Nov  9 17:41:32 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Right now /wall sends a message only to connected players, not all players
connecting during the current turn. Was this behaviour changed? If so, can it
be reverted? In it's current form /wall is rather useless.




___

Reply to this item at:

  http://gna.org/bugs/?18957

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-06 Thread Michal Mazurek

Follow-up Comment #16, bug #18776 (project freeciv):


   2785 p = player_index(pplayer);
   2786 l = p / 32;
   2787 known[l * MAP_INDEX_SIZE + tile_index(ptile)]
   2788   |= (1u  (p - l * 8));


Are player indexes updated for existing players, after one from the middle is
removed?

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-05 Thread Michal Mazurek

Follow-up Comment #14, bug #18776 (project freeciv):

I applied file #14319 and file #14320.

... /removed 15 players ...
 /save removed
Segmentation fault (core dumped)


#0  0x0019925c in sg_save_map_known (saving=0x208c3b000) at
savegame2.c:2787
2787known[l * MAP_INDEX_SIZE + tile_index(ptile)]
(gdb) bt
#0  0x0019925c in sg_save_map_known (saving=0x208c3b000) at
savegame2.c:2787
#1  0x001aa58c in savegame2_save (file=0x205fa0440,
save_reason=Variable save_reason is not available.
) at savegame2.c:2162
#2  0x0010ac84 in save_game (orig_filename=Variable orig_filename
is not available.
) at srv_main.c:1181
#3  0x0011b330 in handle_stdin_input_real (caller=0x0, str=Variable
str is not available.
) at stdinhand.c:725
#4  0x0011c678 in handle_stdin_input (caller=0x0, str=0x203e93120
/save removed, check=false) at stdinhand.c:3954
#5  0x001ad2fc in handle_readline_input_callback (line=0x208c3c720
/save removed) at sernet.c:191
#6  0x00020f9eb21c in rl_callback_read_char () at
/usr/src/gnu/lib/libreadline/callback.c:123
#7  0x001ade64 in server_sniff_all_input () at sernet.c:765
#8  0x0010e33c in srv_main () at srv_main.c:2174
#9  0x00103e98 in main (argc=16, argv=0xfffd5a08) at
civserver.c:375
(gdb) bt full
#0  0x0019925c in sg_save_map_known (saving=0x208c3b000) at
savegame2.c:2787
pplayer = Variable pplayer is not available.


___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18768] Some tiles mysteriously revealed

2011-11-01 Thread Michal Mazurek

Follow-up Comment #2, bug #18768 (project freeciv):

I am sorry about this, but it now occurs to me this might have been the
effect of trading sea maps :)

___

Reply to this item at:

  http://gna.org/bugs/?18768

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] S2_4 branching

2011-11-01 Thread Michal Mazurek
On Tue, Nov 01, 2011 at 12:52:11AM +0200, Marko Lindqvist wrote:
  I'm going to branch S2_4 2-Nov. But as you well know, day begins in
 first timezones 48h before it ends in last one. I'm not yet sure if I
 have to do branching night between 1:st and 2:nd EET (in about 24h),
 or do I have time night between 2:nd and 3:rd (in about 48h). So if
 you have something that absolutely must be committed before branching,
 don't wait until evening of 2:nd your local time - or at least inform
 me that branching has to wait.

There has been played at least one game that I'm aware of with 126 human
players (by the freeciv.fi people). Any chance to bump this limit some more?

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18885] goto changes cursor in other menus

2011-10-31 Thread Michal Mazurek

Follow-up Comment #2, bug #18885 (project freeciv):

I use S2_3, which i update from time to time. Sorry, I'll post revisions
also. This bug is for r20284.

___

Reply to this item at:

  http://gna.org/bugs/?18885

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18885] goto changes cursor in other menus

2011-10-30 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18885

 Summary: goto changes cursor in other menus
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Oct 30 08:10:08 2011
Category: client-gtk-2.0
Severity: 2 - Minor
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Select a unit, press 'g' for goto, open a 'Players' tab or something other -
the cursor from goto remains.




___

Reply to this item at:

  http://gna.org/bugs/?18885

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-27 Thread Michal Mazurek

Follow-up Comment #8, bug #18776 (project freeciv):

It still crashes, though there were no assertion failures this time. The
crash is at TC, apparently during the /save phase.


#0  0x001991bc in sg_save_map_known (saving=0x20c060c00) at
savegame2.c:2782
2782known[l * MAP_INDEX_SIZE + tile_index(ptile)]
(gdb) bt full
#0  0x001991bc in sg_save_map_known (saving=0x20c060c00) at
savegame2.c:2782
pplayer = Variable pplayer is not available.
(gdb) bt
#0  0x001991bc in sg_save_map_known (saving=0x20c060c00) at
savegame2.c:2782
#1  0x001aa36c in savegame2_save (file=0x20e72c080,
save_reason=Variable save_reason is not available.
) at savegame2.c:2157
#2  0x0010ac84 in save_game (orig_filename=Variable orig_filename
is not available.
) at srv_main.c:1181
#3  0x0010b088 in save_game_auto (save_reason=0x3f24c0 SIGINT,
reason_filename=0x3f24c8 interrupted) at srv_main.c:1262
#4  0x00104788 in signal_handler (sig=2) at civserver.c:90
#5  signal handler called
#6  0x000201b247d4 in sigprocmask () from /usr/lib/libc.so.58.0
#7  0x00020ed14b94 in rl_signal_handler (sig=2) at
/usr/src/gnu/lib/libreadline/signals.c:165
#8  signal handler called
#9  0x000201a9afec in select () from /usr/lib/libc.so.58.0
#10 0x001ad7a4 in server_sniff_all_input () at sernet.c:661
#11 0x0010e328 in srv_main () at srv_main.c:2174
#12 0x00103e98 in main (argc=16, argv=0x1d88) at
civserver.c:375


___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18855] gtk client, cities window, units supported

2011-10-26 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18855

 Summary: gtk client, cities window, units supported
 Project: Freeciv
Submitted by: akfaew
Submitted on: Wed Oct 26 17:38:49 2011
Category: client-gtk-2.0
Severity: 1 - Wish
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.2
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

There are columns for best defence, units here, units owned, but not units
paid for. If a city owns 4 musks and 2 diplos, units owned says 6. There
should be a column that says 4 (diplos are free), so that I can relocate one
unit (3 are free of upkeep in some govs).




___

Reply to this item at:

  http://gna.org/bugs/?18855

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18843] The setting 'trading_city' can't be modified after the game has started.

2011-10-24 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18843

 Summary: The setting 'trading_city' can't be modified after
the game has started.
 Project: Freeciv
Submitted by: akfaew
Submitted on: Mon Oct 24 12:21:08 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

 set trading_city disabled
The setting 'trading_city' can't be modified after the game has started.

Why not? I think only settings that are difficult/impossible to change after
/start should have this limitation.




___

Reply to this item at:

  http://gna.org/bugs/?18843

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-24 Thread Michal Mazurek

Follow-up Comment #5, bug #18776 (project freeciv):

Did anyone have a chance to look at this bug?

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14264] wish: border walls

2011-10-05 Thread Michal Mazurek

Follow-up Comment #2, bug #14264 (project freeciv):

This is dumb. We already have fortress + ZOC.

___

Reply to this item at:

  http://gna.org/bugs/?14264

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18773] statue of liberty hack

2011-10-03 Thread Michal Mazurek

Follow-up Comment #3, bug #18773 (project freeciv):

An alternative possibility: the Statue of Liberty could do away with
Anarchy, but revolution could be prevented for the length of time that they
would have been in Anarchy. 

I don't really understand.

___

Reply to this item at:

  http://gna.org/bugs/?18773

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-03 Thread Michal Mazurek

Follow-up Comment #3, bug #18776 (project freeciv):

Version is S2.3


#0  0x001ab454 in calc_civ_score (pplayer=0x20d084000) at
score.c:199
199   pcmap-player[player_index(owner)].landarea++;
(gdb) bt full
#0  0x001ab454 in calc_civ_score (pplayer=0x20d084000) at
score.c:199
pcity = Variable pcity is not available.
(gdb) bt
#0  0x001ab454 in calc_civ_score (pplayer=0x20d084000) at
score.c:199
#1  0x0010e85c in srv_main () at srv_main.c:833
#2  0x00103e98 in main (argc=16, argv=0x4ad8) at
civserver.c:375


___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18781] /save - strips everything from dot to eol

2011-10-03 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18781

 Summary: /save - strips everything from dot to eol
 Project: Freeciv
Submitted by: akfaew
Submitted on: Mon Oct  3 09:40:21 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:


 /save 111003.newcomer

[11:34:ttypn][longturn@spock:~/server:3]$ ls -lrt ltex2.3/save/ 
...
-rw-r--r--  1 longturn  longturn625940 Oct  3 11:28 111003.sav.gz


Is this deliberate? If so, /help save does not say anything about it.




___

Reply to this item at:

  http://gna.org/bugs/?18781

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2980] Spoils of war

2011-10-03 Thread Michal Mazurek

Follow-up Comment #1, patch #2980 (project freeciv):

I wrote the gold spoils of war, but i honestly have no idea where to add the
function calls. Here is what i got so far.

(file #14196)
___

Additional Item Attachment:

File name: sp.goldSize:4 KB


___

Reply to this item at:

  http://gna.org/patch/?2980

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18773] statue of liberty hack

2011-10-03 Thread Michal Mazurek

Follow-up Comment #5, bug #18773 (project freeciv):

Great, this sounds good to me as well.

___

Reply to this item at:

  http://gna.org/bugs/?18773

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18773] statue of liberty hack

2011-10-02 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18773

 Summary: statue of liberty hack
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Oct  2 07:10:18 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

There is a hack players use with statue of liberty: be in democracy during
the turn, switch to communism a second before TC. That way you have all the
benefits of communism while having unbribable cities. Now that we use small
wonders, this will be even more unbarable. I propose a fix: you can switch
govt not more often than once every 2 turns. What do you think? This would
require a dedicated variable in struct player for this wonder only.




___

Reply to this item at:

  http://gna.org/bugs/?18773

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-02 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18776

 Summary: /remove perhaps faulty
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sun Oct  2 13:07:04 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

I removed around 15 players using the /remove command. The server crashed. I
only have a savegame from right before the /removes (which implies the turn
change did not get to save). Here is what i got:


#0  0x001ab454 in calc_civ_score (pplayer=0x20e131000) at
score.c:199
199   pcmap-player[player_index(owner)].landarea++;

Either /remove is faulty, or my newcomer code is.




___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-02 Thread Michal Mazurek

Follow-up Comment #1, bug #18776 (project freeciv):

I managed to recreate the crash. Again I removed the players.

... remove 15 players ...
 /remove alex pancho
2: Removing player Alex Pancho.
Removed player Alex Pancho from the game.
 /save test
Game saved as /home/longturn/server/ltex2.3//save/test.sav.gz
 /set timeout 120
Console: 'timeout' has been set to 120.
 Segmentation fault (core dumped)

segfault occured about 10 seconds after /set timeout 120.

#0  0x001ab454 in calc_civ_score (pplayer=0x20d084000) at
score.c:199
199   pcmap-player[player_index(owner)].landarea++;

___

Reply to this item at:

  http://gna.org/bugs/?18776

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-02 Thread Michal Mazurek

Follow-up Comment #2, bug #18776 (project freeciv):

After loading test.sav.gz:

1: Player shuffle 22 used two times
1: Failure loading savegame!

The savegame cannot be loaded.

Complete log:

[15:17:ttyp9][longturn@spock:~/server/ltex2.3:11]$ sh ltex2.3.sh test.sav.gz 
 
This is the server for Freeciv version 2.3.0+
You can learn a lot about Freeciv at http://www.freeciv.org/
2: Loading rulesets.
2: Ruleset: 'generator' has been set to Island-based (ISLAND).
2: Ruleset: 'topology' has been set to Wrap East-West and Wrap
North-South (WRAPX|WRAPY).
2: Ruleset: 'startpos' has been set to One player per continent (SINGLE).
2: Ruleset: 'alltemperate' has been set to enabled.
2: Ruleset: 'separatepoles' has been set to disabled.
2: Ruleset: 'huts' has been set to 0.
2: Ruleset: 'aifill' has been set to 0.
2: Ruleset: 'diplomacy' has been set to Disabled for everyone (DISABLED).
2: Ruleset: 'contactturns' has been set to 0.
2: Ruleset: 'revolen' has been set to 2.
2: Ruleset: 'barbarians' has been set to No barbarians (DISABLED).
2: Ruleset: 'techpenalty' has been set to 0.
2: Ruleset: 'startunits' has been set to cccwww.
2: Ruleset: 'specials' has been set to 350.
2: Ruleset: 'borders' has been set to Disabled (DISABLED).
2: Savegame: 'size' has been set to 84.
2: Savegame: 'xsize' has been set to 468.
2: Savegame: 'ysize' has been set to 180.
2: Savegame: 'topology' has been set to Wrap East-West (WRAPX).
2: Savegame: 'startpos' has been set to Generator's choice (DEFAULT).
2: Savegame: 'separatepoles' has been set to enabled.
2: Savegame: 'alltemperate' has been set to disabled.
2: Savegame: 'mapseed' has been set to 1805029910.
2: Savegame: 'gameseed' has been set to 1313942453.
2: Savegame: 'specials' has been set to 140.
2: Savegame: 'maxplayers' has been set to 29.
2: Savegame: 'ec_info' has been set to enabled.
2: Savegame: 'startunits' has been set to wwxxk.
2: Savegame: 'newcomerunits' has been set to wxk.
2: Savegame: 'dispersion' has been set to 4.
2: Savegame: 'techpenalty' has been set to 100.
2: Savegame: 'citymindist' has been set to 5.
2: Savegame: 'borders' has been set to Enabled (ENABLED).
2: Savegame: 'diplomacy' has been set to Enabled for everyone (ALL).
2: Savegame: 'onsetbarbs' has been set to 0.
2: Savegame: 'diplchance' has been set to 50.
2: Savegame: 'spacerace' has been set to disabled.
2: Savegame: 'contactturns' has been set to 20.
2: Savegame: 'allowtake' has been set to .
2: Savegame: 'timeout' has been set to 82800.
1: Player shuffle 22 used two times
1: Failure loading savegame!
2: AI*1 has been added as Easy level AI-controlled player.
2: AI*2 has been added as Easy level AI-controlled player.
2: AI*3 has been added as Easy level AI-controlled player.
2: AI*4 has been added as Easy level AI-controlled player.
2: AI*5 has been added as Easy level AI-controlled player.
2: Loading script file 'ltex2.3.serv'.
Ruleset directory set to longturn
2: Loading rulesets.
2: Ruleset: 'generator' has been set to Island-based (ISLAND).
2: Ruleset: 'topology' has been set to Wrap East-West and Wrap
North-South (WRAPX|WRAPY).
2: Ruleset: 'startpos' has been set to One player per continent (SINGLE).
2: Ruleset: 'alltemperate' has been set to enabled.
2: Ruleset: 'separatepoles' has been set to disabled.
2: Ruleset: 'huts' has been set to 0.
2: Ruleset: 'aifill' has been set to 0.
2: Ruleset: 'diplomacy' has been set to Disabled for everyone (DISABLED).
2: Ruleset: 'contactturns' has been set to 0.
2: Ruleset: 'revolen' has been set to 2.
2: Ruleset: 'barbarians' has been set to No barbarians (DISABLED).
2: Ruleset: 'techpenalty' has been set to 0.
2: Ruleset: 'startunits' has been set to cccwww.
2: Ruleset: 'specials' has been set to 350.
2: Ruleset: 'borders' has been set to Disabled (DISABLED).
2: Removing player AI*5.
2: Removing player AI*4.
2: Removing player AI*3.
2: Removing player AI*2.
2: Removing player AI*1.
Console: 'maxplayers' has been set to 126.
Console: 'saveturns' has been set to 1.
No match for 1.
Console: 'citymindist' has been set to 5.
Console: 'dispersion' has been set to 4.
Console: 'startunits' has been set to wwxxk.
Console: 'newcomerunits' has been set to wxk.
Console: 'aifill' has been set to 0.
Console: 'techlevel' has been set to 0.
Console: 'diplchance' has been set to 50.
Undefined argument.  Usage:
set option-name value
No match for 0.
Console: 'timeout' has been set to 82800.
Console: 'revolen' has been set to 2.
Console: 'trading_city' has been set to disabled.
Not enough human players; game will not start.
--
All options with non-default values
--
In the column '##' the status of the option is shown:
 - a '!' means the option is locked by the ruleset.
 - a '+' means you may change the option.
 - a '=' means the option is on its default 

[Freeciv-Dev] [patch #2980] Spoils of war

2011-10-01 Thread Michal Mazurek

URL:
  http://gna.org/patch/?2980

 Summary: Spoils of war
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Oct  1 11:16:34 2011
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

I was working on the spoils of war diff (attached) and I started wondering
how to handle science. I want the victor to learn some technology from the
arms gathered from the battlefield. I was thinking total_victim_bulbs -
total_victor_bulbs * rand(0-5%). However there is a problem: variable tech
cost, depending on who we have embassies with. Any suggestions on how
scientific spoils of war should look like?

I attach what i have so far.



___

File Attachments:


---
Date: Sat Oct  1 11:16:34 2011  Name: spoils.diff  Size: 3kB   By: akfaew

http://gna.org/patch/download.php?file_id=14186

___

Reply to this item at:

  http://gna.org/patch/?2980

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18768] Some tiles mysteriously revealed

2011-10-01 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18768

 Summary: Some tiles mysteriously revealed
 Project: Freeciv
Submitted by: akfaew
Submitted on: Sat Oct  1 18:42:05 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Some random yet seemingly related tiles got revealed in ltex 2.3. I am in
alliance with another player, with shared vision. After TC these tiles were
not revealed, only after i logged in sometime later. What can this be?



___

File Attachments:


---
Date: Sat Oct  1 18:42:05 2011  Name: ltex.png  Size: 149kB   By: akfaew

http://gna.org/bugs/download.php?file_id=14189

___

Reply to this item at:

  http://gna.org/bugs/?18768

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #18742] Turn change resets event cache?

2011-09-27 Thread Michal Mazurek
On Mon, Sep 26, 2011 at 11:35:02PM +0200, Jacob Nevins wrote:
 What are your ec_* options set to?
 
 I can't reproduce this with head-of-S2_3 -- will all the stops pulled out in
 ec_*, after starting a game with clients A/B, having a new client C connect
 and chat (during T0), then doing turn change (to T1), another client D freshly
 connecting sees messages for client C's connection and chat during T0.

ec_turns  += 1 (0, 9)
ec_max_size   += 256 (10, 1000)
ec_chat   += enabled
ec_info   += disabled

Surely I need to set ec_turns to 9 and max_size to 1000. Thank you.

Maybe bump ec_turns from 1 to something bigger by default? 1000 lines of
backlog take not much memory.

-- 
Michal Mazurek

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18742] TC resets backlog?

2011-09-26 Thread Michal Mazurek

URL:
  http://gna.org/bugs/?18742

 Summary: TC resets backlog?
 Project: Freeciv
Submitted by: akfaew
Submitted on: Mon Sep 26 20:06:17 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2.3
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Normally I see info about logins and logouts, also chat in the backlog. But
after logging in after TC all i get is:

[21:17:39] Freeciv is free software and you are welcome to distribute copies
of it under certain conditions;
[21:17:39] See the Copying item on the Help menu.
[21:17:39] Now ... Go give 'em hell!
[21:17:47] Welcome to the Freeciv version 2.3.0+ Server running at
spock.jasminek.net port .
[21:17:57] You are logged in as 'dude' connected to Dude.

This is inconsistent with S2.2, I concider this a bug.




___

Reply to this item at:

  http://gna.org/bugs/?18742

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #18717] Big city radius, fog of war

2011-09-24 Thread Michal Mazurek

Follow-up Comment #4, bug #18717 (project freeciv):

This is a good question. I would expect it to autoarrange workers, like
clicking on the city icon in the city dialogue would. This might not be what
others expect (set worker to specialist?)

I didn't check, I wonder what happens at turn change when a worker
disappears. Assertion failure I presume. I would like to say that all those
assertions all around the code are a really great thing, it makes writing
patches much easier, knowing if something is wrong i'll be notified, yet the
game wont crash.

I would also like to express how much i hate gna.

___

Reply to this item at:

  http://gna.org/bugs/?18717

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


  1   2   >